diff --git a/src/votingapp/windows/VotingApp/VotingWeb/Views/Home/Index.cshtml b/src/votingapp/windows/VotingApp/VotingWeb/Views/Home/Index.cshtml index 4d7d9b53..073e7bcf 100644 --- a/src/votingapp/windows/VotingApp/VotingWeb/Views/Home/Index.cshtml +++ b/src/votingapp/windows/VotingApp/VotingWeb/Views/Home/Index.cshtml @@ -2,7 +2,7 @@ ViewData["Title"] = "Azure Service Fabric Mesh - Voting Sample"; } -
+
@@ -18,12 +18,12 @@
-
+
- +
- +
@@ -31,17 +31,7 @@
-
-
- -
-
- -
+
diff --git a/src/votingapp/windows/VotingApp/VotingWeb/Views/Shared/_Layout.cshtml b/src/votingapp/windows/VotingApp/VotingWeb/Views/Shared/_Layout.cshtml index 2e12e79b..74b973d2 100644 --- a/src/votingapp/windows/VotingApp/VotingWeb/Views/Shared/_Layout.cshtml +++ b/src/votingapp/windows/VotingApp/VotingWeb/Views/Shared/_Layout.cshtml @@ -7,7 +7,7 @@ - + @@ -16,10 +16,7 @@ @RenderBody()
- - - - + @RenderSection("Scripts", required: false) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower.json b/src/votingapp/windows/VotingApp/VotingWeb/bower.json deleted file mode 100644 index ba60951b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "asp.net", - "private": true, - "dependencies": { - "bootstrap": "v4.0.0", - "jquery": "3.3.1", - "jquery-validation": "1.17.0", - "jquery-validation-unobtrusive": "3.2.6", - "angular": "v1.6.9", - "angular-bootstrap": "2.5.0" - }, - "resolutions": { - "angular": "v1.6.9", - "jquery": "3.3.1", - "jquery-validation": "1.17.0", - "angular-bootstrap": "2.5.0", - "bootstrap": "v4.0.0" - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.bower.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.bower.json deleted file mode 100644 index aec7c339..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.bower.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "author": { - "name": "https://github.com/angular-ui/bootstrap/graphs/contributors" - }, - "name": "angular-bootstrap", - "keywords": [ - "angular", - "angular-ui", - "bootstrap" - ], - "license": "MIT", - "ignore": [], - "description": "Native AngularJS (Angular) directives for Bootstrap.", - "version": "2.5.0", - "main": [ - "./ui-bootstrap-tpls.js" - ], - "dependencies": { - "angular": ">=1.4.0" - }, - "homepage": "https://github.com/angular-ui/bootstrap-bower", - "_release": "2.5.0", - "_resolution": { - "type": "version", - "tag": "2.5.0", - "commit": "2ab82fe5b072269e897d5d11333e9925888df456" - }, - "_source": "https://github.com/angular-ui/bootstrap-bower.git", - "_target": "2.5.0", - "_originalSource": "angular-bootstrap" -} \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.gitignore b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.gitignore deleted file mode 100644 index 496ee2ca..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.DS_Store \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.npmignore b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.npmignore deleted file mode 100644 index d62f9b6e..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/.npmignore +++ /dev/null @@ -1 +0,0 @@ -bower.json \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/README.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/README.md deleted file mode 100644 index 9607c65f..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/README.md +++ /dev/null @@ -1,120 +0,0 @@ -### UI Bootstrap - [AngularJS](http://angularjs.org/) directives specific to [Bootstrap](http://getbootstrap.com) - -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://secure.travis-ci.org/angular-ui/bootstrap.svg)](http://travis-ci.org/angular-ui/bootstrap) -[![devDependency Status](https://david-dm.org/angular-ui/bootstrap/dev-status.svg?branch=master)](https://david-dm.org/angular-ui/bootstrap#info=devDependencies) - -### Quick links -- [Demo](#demo) -- [Installation](#installation) - - [NPM](#install-with-npm) - - [Bower](#install-with-bower) - - [NuGet](#install-with-nuget) - - [Custom](#custom-build) - - [Manual](#manual-download) -- [Support](#support) - - [FAQ](#faq) - - [Supported browsers](#supported-browsers) - - [Need help?](#need-help) - - [Found a bug?](#found-a-bug) -- [Contributing to the project](#contributing-to-the-project) -- [Development, meeting minutes, roadmap and more.](#development-meeting-minutes-roadmap-and-more) - - -# Demo - -Do you want to see directives in action? Visit http://angular-ui.github.io/bootstrap/! - -# Installation - -Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required. -Note: Since version 0.13.0, UI Bootstrap depends on [ngAnimate](https://docs.angularjs.org/api/ngAnimate) for transitions and animations, such as the accordion, carousel, etc. Include `ngAnimate` in the module dependencies for your app in order to enable animation. - -#### Install with NPM - -```sh -$ npm install angular-ui-bootstrap -``` - -This will install AngularJS and Bootstrap NPM packages. - -#### Install with Bower -```sh -$ bower install angular-bootstrap -``` - -Note: do not install 'angular-ui-bootstrap'. A separate repository - [bootstrap-bower](https://github.com/angular-ui/bootstrap-bower) - hosts the compiled javascript file and bower.json. - -#### Install with NuGet -To install AngularJS UI Bootstrap, run the following command in the Package Manager Console - -```sh -PM> Install-Package Angular.UI.Bootstrap -``` - -#### Custom build - -Head over to http://angular-ui.github.io/bootstrap/ and hit the *Custom build* button to create your own custom UI Bootstrap build, just the way you like it. - -#### Manual download - -After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here: -https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files -Don't worry, if you are not sure which file to take, opt for `ui-bootstrap-tpls-[version].min.js`. - -### Adding dependency to your project - -When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the `ui.bootstrap` AngularJS module: - -```js -angular.module('myModule', ['ui.bootstrap']); -``` - -If you're a Browserify or Webpack user, you can do: - -```js -var uibs = require('angular-ui-bootstrap'); - -angular.module('myModule', [uibs]); -``` - -# Support - -## FAQ - -https://github.com/angular-ui/bootstrap/wiki/FAQ - -## Supported browsers - -Directives from this repository are automatically tested with the following browsers: -* Chrome (stable and canary channel) -* Firefox -* IE 9 and 10 -* Opera -* Safari - -Modern mobile browsers should work without problems. - - -## Need help? -Need help using UI Bootstrap? - -* Live help in the IRC (`#angularjs` channel at the `freenode` network). Use this [webchat](https://webchat.freenode.net/) or your own IRC client. -* Ask a question in [StackOverflow](http://stackoverflow.com/) under the [angular-ui-bootstrap](http://stackoverflow.com/questions/tagged/angular-ui-bootstrap) tag. - -**Please do not create new issues in this repository to ask questions about using UI Bootstrap** - -## Found a bug? -Please take a look at [CONTRIBUTING.md](CONTRIBUTING.md#you-think-youve-found-a-bug) and submit your issue [here](https://github.com/angular-ui/bootstrap/issues/new). - - ----- - - -# Contributing to the project - -We are always looking for the quality contributions! Please check the [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution guidelines. - -# Development, meeting minutes, roadmap and more. - -Head over to the [Wiki](https://github.com/angular-ui/bootstrap/wiki) for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more. diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/bower.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/bower.json deleted file mode 100644 index 05163bea..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/bower.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "author": { - "name": "https://github.com/angular-ui/bootstrap/graphs/contributors" - }, - "name": "angular-bootstrap", - "keywords": [ - "angular", - "angular-ui", - "bootstrap" - ], - "license": "MIT", - "ignore": [], - "description": "Native AngularJS (Angular) directives for Bootstrap.", - "version": "2.5.0", - "main": ["./ui-bootstrap-tpls.js"], - "dependencies": { - "angular": ">=1.4.0" - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/index.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/index.js deleted file mode 100644 index a174f26d..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/index.js +++ /dev/null @@ -1,2 +0,0 @@ -require('./ui-bootstrap-tpls'); -module.exports = 'ui.bootstrap'; diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/package.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/package.json deleted file mode 100644 index 4ff93d62..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "angular-ui-bootstrap", - "version": "2.5.0", - "description": "Bootstrap widgets for Angular", - "main": "index.js", - "homepage": "http://angular-ui.github.io/bootstrap/", - "repository": { - "type": "git", - "url": "https://github.com/angular-ui/bootstrap.git" - }, - "keywords": [ - "angular", - "bootstrap", - "angular-ui", - "components", - "client-side" - ], - "author": "https://github.com/angular-ui/bootstrap/graphs/contributors", - "peerDependencies": { - "angular": ">= 1.4.0-beta.0 || >= 1.5.0-beta.0" - }, - "license": "MIT" -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-csp.css b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-csp.css deleted file mode 100644 index 3b69cf64..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-csp.css +++ /dev/null @@ -1,115 +0,0 @@ -/* Include this file in your html if you are using the CSP mode. */ - -.ng-animate.item:not(.left):not(.right) { - -webkit-transition: 0s ease-in-out left; - transition: 0s ease-in-out left -} -.uib-datepicker .uib-title { - width: 100%; -} - -.uib-day button, .uib-month button, .uib-year button { - min-width: 100%; -} - -.uib-left, .uib-right { - width: 100% -} - -.uib-position-measure { - display: block !important; - visibility: hidden !important; - position: absolute !important; - top: -9999px !important; - left: -9999px !important; -} - -.uib-position-scrollbar-measure { - position: absolute !important; - top: -9999px !important; - width: 50px !important; - height: 50px !important; - overflow: scroll !important; -} - -.uib-position-body-scrollbar-measure { - overflow: scroll !important; -} -.uib-datepicker-popup.dropdown-menu { - display: block; - float: none; - margin: 0; -} - -.uib-button-bar { - padding: 10px 9px 2px; -} - -[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow, -[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow, -[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow, -[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow, -[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow, -[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow, -[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow, -[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow, -[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow, -[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow, -[uib-popover-popup].popover.top-left > .arrow, -[uib-popover-popup].popover.top-right > .arrow, -[uib-popover-popup].popover.bottom-left > .arrow, -[uib-popover-popup].popover.bottom-right > .arrow, -[uib-popover-popup].popover.left-top > .arrow, -[uib-popover-popup].popover.left-bottom > .arrow, -[uib-popover-popup].popover.right-top > .arrow, -[uib-popover-popup].popover.right-bottom > .arrow, -[uib-popover-html-popup].popover.top-left > .arrow, -[uib-popover-html-popup].popover.top-right > .arrow, -[uib-popover-html-popup].popover.bottom-left > .arrow, -[uib-popover-html-popup].popover.bottom-right > .arrow, -[uib-popover-html-popup].popover.left-top > .arrow, -[uib-popover-html-popup].popover.left-bottom > .arrow, -[uib-popover-html-popup].popover.right-top > .arrow, -[uib-popover-html-popup].popover.right-bottom > .arrow, -[uib-popover-template-popup].popover.top-left > .arrow, -[uib-popover-template-popup].popover.top-right > .arrow, -[uib-popover-template-popup].popover.bottom-left > .arrow, -[uib-popover-template-popup].popover.bottom-right > .arrow, -[uib-popover-template-popup].popover.left-top > .arrow, -[uib-popover-template-popup].popover.left-bottom > .arrow, -[uib-popover-template-popup].popover.right-top > .arrow, -[uib-popover-template-popup].popover.right-bottom > .arrow { - top: auto; - bottom: auto; - left: auto; - right: auto; - margin: 0; -} - -[uib-popover-popup].popover, -[uib-popover-html-popup].popover, -[uib-popover-template-popup].popover { - display: block !important; -} - -.uib-time input { - width: 50px; -} - -[uib-typeahead-popup].dropdown-menu { - display: block; -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-tpls.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-tpls.js deleted file mode 100644 index 67838936..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-tpls.js +++ /dev/null @@ -1,7776 +0,0 @@ -/* - * angular-ui-bootstrap - * http://angular-ui.github.io/bootstrap/ - - * Version: 2.5.0 - 2017-01-28 - * License: MIT - */angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","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", ["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]); -angular.module('ui.bootstrap.collapse', []) - - .directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) { - var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null; - return { - link: function(scope, element, attrs) { - var expandingExpr = $parse(attrs.expanding), - expandedExpr = $parse(attrs.expanded), - collapsingExpr = $parse(attrs.collapsing), - collapsedExpr = $parse(attrs.collapsed), - horizontal = false, - css = {}, - cssTo = {}; - - init(); - - function init() { - horizontal = !!('horizontal' in attrs); - if (horizontal) { - css = { - width: '' - }; - cssTo = {width: '0'}; - } else { - css = { - height: '' - }; - cssTo = {height: '0'}; - } - if (!scope.$eval(attrs.uibCollapse)) { - element.addClass('in') - .addClass('collapse') - .attr('aria-expanded', true) - .attr('aria-hidden', false) - .css(css); - } - } - - function getScrollFromElement(element) { - if (horizontal) { - return {width: element.scrollWidth + 'px'}; - } - return {height: element.scrollHeight + 'px'}; - } - - function expand() { - if (element.hasClass('collapse') && element.hasClass('in')) { - return; - } - - $q.resolve(expandingExpr(scope)) - .then(function() { - element.removeClass('collapse') - .addClass('collapsing') - .attr('aria-expanded', true) - .attr('aria-hidden', false); - - if ($animateCss) { - $animateCss(element, { - addClass: 'in', - easing: 'ease', - css: { - overflow: 'hidden' - }, - to: getScrollFromElement(element[0]) - }).start()['finally'](expandDone); - } else { - $animate.addClass(element, 'in', { - css: { - overflow: 'hidden' - }, - to: getScrollFromElement(element[0]) - }).then(expandDone); - } - }, angular.noop); - } - - function expandDone() { - element.removeClass('collapsing') - .addClass('collapse') - .css(css); - expandedExpr(scope); - } - - function collapse() { - if (!element.hasClass('collapse') && !element.hasClass('in')) { - return collapseDone(); - } - - $q.resolve(collapsingExpr(scope)) - .then(function() { - element - // IMPORTANT: The width must be set before adding "collapsing" class. - // Otherwise, the browser attempts to animate from width 0 (in - // collapsing class) to the given width here. - .css(getScrollFromElement(element[0])) - // initially all panel collapse have the collapse class, this removal - // prevents the animation from jumping to collapsed state - .removeClass('collapse') - .addClass('collapsing') - .attr('aria-expanded', false) - .attr('aria-hidden', true); - - if ($animateCss) { - $animateCss(element, { - removeClass: 'in', - to: cssTo - }).start()['finally'](collapseDone); - } else { - $animate.removeClass(element, 'in', { - to: cssTo - }).then(collapseDone); - } - }, angular.noop); - } - - function collapseDone() { - element.css(cssTo); // Required so that collapse works when animation is disabled - element.removeClass('collapsing') - .addClass('collapse'); - collapsedExpr(scope); - } - - scope.$watch(attrs.uibCollapse, function(shouldCollapse) { - if (shouldCollapse) { - collapse(); - } else { - expand(); - } - }); - } - }; - }]); - -angular.module('ui.bootstrap.tabindex', []) - -.directive('uibTabindexToggle', function() { - return { - restrict: 'A', - link: function(scope, elem, attrs) { - attrs.$observe('disabled', function(disabled) { - attrs.$set('tabindex', disabled ? -1 : null); - }); - } - }; -}); - -angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse', 'ui.bootstrap.tabindex']) - -.constant('uibAccordionConfig', { - closeOthers: true -}) - -.controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) { - // This array keeps track of the accordion groups - this.groups = []; - - // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to - this.closeOthers = function(openGroup) { - var closeOthers = angular.isDefined($attrs.closeOthers) ? - $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers; - if (closeOthers) { - angular.forEach(this.groups, function(group) { - if (group !== openGroup) { - group.isOpen = false; - } - }); - } - }; - - // This is called from the accordion-group directive to add itself to the accordion - this.addGroup = function(groupScope) { - var that = this; - this.groups.push(groupScope); - - groupScope.$on('$destroy', function(event) { - that.removeGroup(groupScope); - }); - }; - - // This is called from the accordion-group directive when to remove itself - this.removeGroup = function(group) { - var index = this.groups.indexOf(group); - if (index !== -1) { - this.groups.splice(index, 1); - } - }; -}]) - -// The accordion directive simply sets up the directive controller -// and adds an accordion CSS class to itself element. -.directive('uibAccordion', function() { - return { - controller: 'UibAccordionController', - controllerAs: 'accordion', - transclude: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/accordion/accordion.html'; - } - }; -}) - -// The accordion-group directive indicates a block of html that will expand and collapse in an accordion -.directive('uibAccordionGroup', function() { - return { - require: '^uibAccordion', // We need this directive to be inside an accordion - transclude: true, // It transcludes the contents of the directive into the template - restrict: 'A', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/accordion/accordion-group.html'; - }, - scope: { - heading: '@', // Interpolate the heading attribute onto this scope - panelClass: '@?', // Ditto with panelClass - isOpen: '=?', - isDisabled: '=?' - }, - controller: function() { - this.setHeading = function(element) { - this.heading = element; - }; - }, - link: function(scope, element, attrs, accordionCtrl) { - element.addClass('panel'); - accordionCtrl.addGroup(scope); - - scope.openClass = attrs.openClass || 'panel-open'; - scope.panelClass = attrs.panelClass || 'panel-default'; - scope.$watch('isOpen', function(value) { - element.toggleClass(scope.openClass, !!value); - if (value) { - accordionCtrl.closeOthers(scope); - } - }); - - scope.toggleOpen = function($event) { - if (!scope.isDisabled) { - if (!$event || $event.which === 32) { - scope.isOpen = !scope.isOpen; - } - } - }; - - var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000); - scope.headingId = id + '-tab'; - scope.panelId = id + '-panel'; - } - }; -}) - -// Use accordion-heading below an accordion-group to provide a heading containing HTML -.directive('uibAccordionHeading', function() { - return { - transclude: true, // Grab the contents to be used as the heading - template: '', // In effect remove this element! - replace: true, - require: '^uibAccordionGroup', - link: function(scope, element, attrs, accordionGroupCtrl, transclude) { - // Pass the heading to the accordion-group controller - // so that it can be transcluded into the right place in the template - // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat] - accordionGroupCtrl.setHeading(transclude(scope, angular.noop)); - } - }; -}) - -// Use in the accordion-group template to indicate where you want the heading to be transcluded -// You must provide the property on the accordion-group controller that will hold the transcluded element -.directive('uibAccordionTransclude', function() { - return { - require: '^uibAccordionGroup', - link: function(scope, element, attrs, controller) { - scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) { - if (heading) { - var elem = angular.element(element[0].querySelector(getHeaderSelectors())); - elem.html(''); - elem.append(heading); - } - }); - } - }; - - function getHeaderSelectors() { - return 'uib-accordion-header,' + - 'data-uib-accordion-header,' + - 'x-uib-accordion-header,' + - 'uib\\:accordion-header,' + - '[uib-accordion-header],' + - '[data-uib-accordion-header],' + - '[x-uib-accordion-header]'; - } -}); - -angular.module('ui.bootstrap.alert', []) - -.controller('UibAlertController', ['$scope', '$element', '$attrs', '$interpolate', '$timeout', function($scope, $element, $attrs, $interpolate, $timeout) { - $scope.closeable = !!$attrs.close; - $element.addClass('alert'); - $attrs.$set('role', 'alert'); - if ($scope.closeable) { - $element.addClass('alert-dismissible'); - } - - var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ? - $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null; - - if (dismissOnTimeout) { - $timeout(function() { - $scope.close(); - }, parseInt(dismissOnTimeout, 10)); - } -}]) - -.directive('uibAlert', function() { - return { - controller: 'UibAlertController', - controllerAs: 'alert', - restrict: 'A', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/alert/alert.html'; - }, - transclude: true, - scope: { - close: '&' - } - }; -}); - -angular.module('ui.bootstrap.buttons', []) - -.constant('uibButtonConfig', { - activeClass: 'active', - toggleEvent: 'click' -}) - -.controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) { - this.activeClass = buttonConfig.activeClass || 'active'; - this.toggleEvent = buttonConfig.toggleEvent || 'click'; -}]) - -.directive('uibBtnRadio', ['$parse', function($parse) { - return { - require: ['uibBtnRadio', 'ngModel'], - controller: 'UibButtonsController', - controllerAs: 'buttons', - link: function(scope, element, attrs, ctrls) { - var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - var uncheckableExpr = $parse(attrs.uibUncheckable); - - element.find('input').css({display: 'none'}); - - //model -> UI - ngModelCtrl.$render = function() { - element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio))); - }; - - //ui->model - element.on(buttonsCtrl.toggleEvent, function() { - if (attrs.disabled) { - return; - } - - var isActive = element.hasClass(buttonsCtrl.activeClass); - - if (!isActive || angular.isDefined(attrs.uncheckable)) { - scope.$apply(function() { - ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio)); - ngModelCtrl.$render(); - }); - } - }); - - if (attrs.uibUncheckable) { - scope.$watch(uncheckableExpr, function(uncheckable) { - attrs.$set('uncheckable', uncheckable ? '' : undefined); - }); - } - } - }; -}]) - -.directive('uibBtnCheckbox', function() { - return { - require: ['uibBtnCheckbox', 'ngModel'], - controller: 'UibButtonsController', - controllerAs: 'button', - link: function(scope, element, attrs, ctrls) { - var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - element.find('input').css({display: 'none'}); - - function getTrueValue() { - return getCheckboxValue(attrs.btnCheckboxTrue, true); - } - - function getFalseValue() { - return getCheckboxValue(attrs.btnCheckboxFalse, false); - } - - function getCheckboxValue(attribute, defaultValue) { - return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue; - } - - //model -> UI - ngModelCtrl.$render = function() { - element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue())); - }; - - //ui->model - element.on(buttonsCtrl.toggleEvent, function() { - if (attrs.disabled) { - return; - } - - scope.$apply(function() { - ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue()); - ngModelCtrl.$render(); - }); - }); - } - }; -}); - -angular.module('ui.bootstrap.carousel', []) - -.controller('UibCarouselController', ['$scope', '$element', '$interval', '$timeout', '$animate', function($scope, $element, $interval, $timeout, $animate) { - var self = this, - slides = self.slides = $scope.slides = [], - SLIDE_DIRECTION = 'uib-slideDirection', - currentIndex = $scope.active, - currentInterval, isPlaying; - - var destroyed = false; - $element.addClass('carousel'); - - self.addSlide = function(slide, element) { - slides.push({ - slide: slide, - element: element - }); - slides.sort(function(a, b) { - return +a.slide.index - +b.slide.index; - }); - //if this is the first slide or the slide is set to active, select it - if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) { - if ($scope.$currentTransition) { - $scope.$currentTransition = null; - } - - currentIndex = slide.index; - $scope.active = slide.index; - setActive(currentIndex); - self.select(slides[findSlideIndex(slide)]); - if (slides.length === 1) { - $scope.play(); - } - } - }; - - self.getCurrentIndex = function() { - for (var i = 0; i < slides.length; i++) { - if (slides[i].slide.index === currentIndex) { - return i; - } - } - }; - - self.next = $scope.next = function() { - var newIndex = (self.getCurrentIndex() + 1) % slides.length; - - if (newIndex === 0 && $scope.noWrap()) { - $scope.pause(); - return; - } - - return self.select(slides[newIndex], 'next'); - }; - - self.prev = $scope.prev = function() { - var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1; - - if ($scope.noWrap() && newIndex === slides.length - 1) { - $scope.pause(); - return; - } - - return self.select(slides[newIndex], 'prev'); - }; - - self.removeSlide = function(slide) { - var index = findSlideIndex(slide); - - //get the index of the slide inside the carousel - slides.splice(index, 1); - if (slides.length > 0 && currentIndex === index) { - if (index >= slides.length) { - currentIndex = slides.length - 1; - $scope.active = currentIndex; - setActive(currentIndex); - self.select(slides[slides.length - 1]); - } else { - currentIndex = index; - $scope.active = currentIndex; - setActive(currentIndex); - self.select(slides[index]); - } - } else if (currentIndex > index) { - currentIndex--; - $scope.active = currentIndex; - } - - //clean the active value when no more slide - if (slides.length === 0) { - currentIndex = null; - $scope.active = null; - } - }; - - /* direction: "prev" or "next" */ - self.select = $scope.select = function(nextSlide, direction) { - var nextIndex = findSlideIndex(nextSlide.slide); - //Decide direction if it's not given - if (direction === undefined) { - direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev'; - } - //Prevent this user-triggered transition from occurring if there is already one in progress - if (nextSlide.slide.index !== currentIndex && - !$scope.$currentTransition) { - goNext(nextSlide.slide, nextIndex, direction); - } - }; - - /* Allow outside people to call indexOf on slides array */ - $scope.indexOfSlide = function(slide) { - return +slide.slide.index; - }; - - $scope.isActive = function(slide) { - return $scope.active === slide.slide.index; - }; - - $scope.isPrevDisabled = function() { - return $scope.active === 0 && $scope.noWrap(); - }; - - $scope.isNextDisabled = function() { - return $scope.active === slides.length - 1 && $scope.noWrap(); - }; - - $scope.pause = function() { - if (!$scope.noPause) { - isPlaying = false; - resetTimer(); - } - }; - - $scope.play = function() { - if (!isPlaying) { - isPlaying = true; - restartTimer(); - } - }; - - $element.on('mouseenter', $scope.pause); - $element.on('mouseleave', $scope.play); - - $scope.$on('$destroy', function() { - destroyed = true; - resetTimer(); - }); - - $scope.$watch('noTransition', function(noTransition) { - $animate.enabled($element, !noTransition); - }); - - $scope.$watch('interval', restartTimer); - - $scope.$watchCollection('slides', resetTransition); - - $scope.$watch('active', function(index) { - if (angular.isNumber(index) && currentIndex !== index) { - for (var i = 0; i < slides.length; i++) { - if (slides[i].slide.index === index) { - index = i; - break; - } - } - - var slide = slides[index]; - if (slide) { - setActive(index); - self.select(slides[index]); - currentIndex = index; - } - } - }); - - function getSlideByIndex(index) { - for (var i = 0, l = slides.length; i < l; ++i) { - if (slides[i].index === index) { - return slides[i]; - } - } - } - - function setActive(index) { - for (var i = 0; i < slides.length; i++) { - slides[i].slide.active = i === index; - } - } - - function goNext(slide, index, direction) { - if (destroyed) { - return; - } - - angular.extend(slide, {direction: direction}); - angular.extend(slides[currentIndex].slide || {}, {direction: direction}); - if ($animate.enabled($element) && !$scope.$currentTransition && - slides[index].element && self.slides.length > 1) { - slides[index].element.data(SLIDE_DIRECTION, slide.direction); - var currentIdx = self.getCurrentIndex(); - - if (angular.isNumber(currentIdx) && slides[currentIdx].element) { - slides[currentIdx].element.data(SLIDE_DIRECTION, slide.direction); - } - - $scope.$currentTransition = true; - $animate.on('addClass', slides[index].element, function(element, phase) { - if (phase === 'close') { - $scope.$currentTransition = null; - $animate.off('addClass', element); - } - }); - } - - $scope.active = slide.index; - currentIndex = slide.index; - setActive(index); - - //every time you change slides, reset the timer - restartTimer(); - } - - function findSlideIndex(slide) { - for (var i = 0; i < slides.length; i++) { - if (slides[i].slide === slide) { - return i; - } - } - } - - function resetTimer() { - if (currentInterval) { - $interval.cancel(currentInterval); - currentInterval = null; - } - } - - function resetTransition(slides) { - if (!slides.length) { - $scope.$currentTransition = null; - } - } - - function restartTimer() { - resetTimer(); - var interval = +$scope.interval; - if (!isNaN(interval) && interval > 0) { - currentInterval = $interval(timerFn, interval); - } - } - - function timerFn() { - var interval = +$scope.interval; - if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) { - $scope.next(); - } else { - $scope.pause(); - } - } -}]) - -.directive('uibCarousel', function() { - return { - transclude: true, - controller: 'UibCarouselController', - controllerAs: 'carousel', - restrict: 'A', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/carousel/carousel.html'; - }, - scope: { - active: '=', - interval: '=', - noTransition: '=', - noPause: '=', - noWrap: '&' - } - }; -}) - -.directive('uibSlide', ['$animate', function($animate) { - return { - require: '^uibCarousel', - restrict: 'A', - transclude: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/carousel/slide.html'; - }, - scope: { - actual: '=?', - index: '=?' - }, - link: function (scope, element, attrs, carouselCtrl) { - element.addClass('item'); - carouselCtrl.addSlide(scope, element); - //when the scope is destroyed then remove the slide from the current slides array - scope.$on('$destroy', function() { - carouselCtrl.removeSlide(scope); - }); - - scope.$watch('active', function(active) { - $animate[active ? 'addClass' : 'removeClass'](element, 'active'); - }); - } - }; -}]) - -.animation('.item', ['$animateCss', -function($animateCss) { - var SLIDE_DIRECTION = 'uib-slideDirection'; - - function removeClass(element, className, callback) { - element.removeClass(className); - if (callback) { - callback(); - } - } - - return { - beforeAddClass: function(element, className, done) { - if (className === 'active') { - var stopped = false; - var direction = element.data(SLIDE_DIRECTION); - var directionClass = direction === 'next' ? 'left' : 'right'; - var removeClassFn = removeClass.bind(this, element, - directionClass + ' ' + direction, done); - element.addClass(direction); - - $animateCss(element, {addClass: directionClass}) - .start() - .done(removeClassFn); - - return function() { - stopped = true; - }; - } - done(); - }, - beforeRemoveClass: function (element, className, done) { - if (className === 'active') { - var stopped = false; - var direction = element.data(SLIDE_DIRECTION); - var directionClass = direction === 'next' ? 'left' : 'right'; - var removeClassFn = removeClass.bind(this, element, directionClass, done); - - $animateCss(element, {addClass: directionClass}) - .start() - .done(removeClassFn); - - return function() { - stopped = true; - }; - } - done(); - } - }; -}]); - -angular.module('ui.bootstrap.dateparser', []) - -.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) { - // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js - var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; - - var localeId; - var formatCodeToRegex; - - this.init = function() { - localeId = $locale.id; - - this.parsers = {}; - this.formatters = {}; - - formatCodeToRegex = [ - { - key: 'yyyy', - regex: '\\d{4}', - apply: function(value) { this.year = +value; }, - formatter: function(date) { - var _date = new Date(); - _date.setFullYear(Math.abs(date.getFullYear())); - return dateFilter(_date, 'yyyy'); - } - }, - { - key: 'yy', - regex: '\\d{2}', - apply: function(value) { value = +value; this.year = value < 69 ? value + 2000 : value + 1900; }, - formatter: function(date) { - var _date = new Date(); - _date.setFullYear(Math.abs(date.getFullYear())); - return dateFilter(_date, 'yy'); - } - }, - { - key: 'y', - regex: '\\d{1,4}', - apply: function(value) { this.year = +value; }, - formatter: function(date) { - var _date = new Date(); - _date.setFullYear(Math.abs(date.getFullYear())); - return dateFilter(_date, 'y'); - } - }, - { - key: 'M!', - regex: '0?[1-9]|1[0-2]', - apply: function(value) { this.month = value - 1; }, - formatter: function(date) { - var value = date.getMonth(); - if (/^[0-9]$/.test(value)) { - return dateFilter(date, 'MM'); - } - - return dateFilter(date, 'M'); - } - }, - { - key: 'MMMM', - regex: $locale.DATETIME_FORMATS.MONTH.join('|'), - apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); }, - formatter: function(date) { return dateFilter(date, 'MMMM'); } - }, - { - key: 'MMM', - regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'), - apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); }, - formatter: function(date) { return dateFilter(date, 'MMM'); } - }, - { - key: 'MM', - regex: '0[1-9]|1[0-2]', - apply: function(value) { this.month = value - 1; }, - formatter: function(date) { return dateFilter(date, 'MM'); } - }, - { - key: 'M', - regex: '[1-9]|1[0-2]', - apply: function(value) { this.month = value - 1; }, - formatter: function(date) { return dateFilter(date, 'M'); } - }, - { - key: 'd!', - regex: '[0-2]?[0-9]{1}|3[0-1]{1}', - apply: function(value) { this.date = +value; }, - formatter: function(date) { - var value = date.getDate(); - if (/^[1-9]$/.test(value)) { - return dateFilter(date, 'dd'); - } - - return dateFilter(date, 'd'); - } - }, - { - key: 'dd', - regex: '[0-2][0-9]{1}|3[0-1]{1}', - apply: function(value) { this.date = +value; }, - formatter: function(date) { return dateFilter(date, 'dd'); } - }, - { - key: 'd', - regex: '[1-2]?[0-9]{1}|3[0-1]{1}', - apply: function(value) { this.date = +value; }, - formatter: function(date) { return dateFilter(date, 'd'); } - }, - { - key: 'EEEE', - regex: $locale.DATETIME_FORMATS.DAY.join('|'), - formatter: function(date) { return dateFilter(date, 'EEEE'); } - }, - { - key: 'EEE', - regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|'), - formatter: function(date) { return dateFilter(date, 'EEE'); } - }, - { - key: 'HH', - regex: '(?:0|1)[0-9]|2[0-3]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'HH'); } - }, - { - key: 'hh', - regex: '0[0-9]|1[0-2]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'hh'); } - }, - { - key: 'H', - regex: '1?[0-9]|2[0-3]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'H'); } - }, - { - key: 'h', - regex: '[0-9]|1[0-2]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'h'); } - }, - { - key: 'mm', - regex: '[0-5][0-9]', - apply: function(value) { this.minutes = +value; }, - formatter: function(date) { return dateFilter(date, 'mm'); } - }, - { - key: 'm', - regex: '[0-9]|[1-5][0-9]', - apply: function(value) { this.minutes = +value; }, - formatter: function(date) { return dateFilter(date, 'm'); } - }, - { - key: 'sss', - regex: '[0-9][0-9][0-9]', - apply: function(value) { this.milliseconds = +value; }, - formatter: function(date) { return dateFilter(date, 'sss'); } - }, - { - key: 'ss', - regex: '[0-5][0-9]', - apply: function(value) { this.seconds = +value; }, - formatter: function(date) { return dateFilter(date, 'ss'); } - }, - { - key: 's', - regex: '[0-9]|[1-5][0-9]', - apply: function(value) { this.seconds = +value; }, - formatter: function(date) { return dateFilter(date, 's'); } - }, - { - key: 'a', - regex: $locale.DATETIME_FORMATS.AMPMS.join('|'), - apply: function(value) { - if (this.hours === 12) { - this.hours = 0; - } - - if (value === 'PM') { - this.hours += 12; - } - }, - formatter: function(date) { return dateFilter(date, 'a'); } - }, - { - key: 'Z', - regex: '[+-]\\d{4}', - apply: function(value) { - var matches = value.match(/([+-])(\d{2})(\d{2})/), - sign = matches[1], - hours = matches[2], - minutes = matches[3]; - this.hours += toInt(sign + hours); - this.minutes += toInt(sign + minutes); - }, - formatter: function(date) { - return dateFilter(date, 'Z'); - } - }, - { - key: 'ww', - regex: '[0-4][0-9]|5[0-3]', - formatter: function(date) { return dateFilter(date, 'ww'); } - }, - { - key: 'w', - regex: '[0-9]|[1-4][0-9]|5[0-3]', - formatter: function(date) { return dateFilter(date, 'w'); } - }, - { - key: 'GGGG', - regex: $locale.DATETIME_FORMATS.ERANAMES.join('|').replace(/\s/g, '\\s'), - formatter: function(date) { return dateFilter(date, 'GGGG'); } - }, - { - key: 'GGG', - regex: $locale.DATETIME_FORMATS.ERAS.join('|'), - formatter: function(date) { return dateFilter(date, 'GGG'); } - }, - { - key: 'GG', - regex: $locale.DATETIME_FORMATS.ERAS.join('|'), - formatter: function(date) { return dateFilter(date, 'GG'); } - }, - { - key: 'G', - regex: $locale.DATETIME_FORMATS.ERAS.join('|'), - formatter: function(date) { return dateFilter(date, 'G'); } - } - ]; - - if (angular.version.major >= 1 && angular.version.minor > 4) { - formatCodeToRegex.push({ - key: 'LLLL', - regex: $locale.DATETIME_FORMATS.STANDALONEMONTH.join('|'), - apply: function(value) { this.month = $locale.DATETIME_FORMATS.STANDALONEMONTH.indexOf(value); }, - formatter: function(date) { return dateFilter(date, 'LLLL'); } - }); - } - }; - - this.init(); - - function getFormatCodeToRegex(key) { - return filterFilter(formatCodeToRegex, {key: key}, true)[0]; - } - - this.getParser = function (key) { - var f = getFormatCodeToRegex(key); - return f && f.apply || null; - }; - - this.overrideParser = function (key, parser) { - var f = getFormatCodeToRegex(key); - if (f && angular.isFunction(parser)) { - this.parsers = {}; - f.apply = parser; - } - }.bind(this); - - function createParser(format) { - var map = [], regex = format.split(''); - - // check for literal values - var quoteIndex = format.indexOf('\''); - if (quoteIndex > -1) { - var inLiteral = false; - format = format.split(''); - for (var i = quoteIndex; i < format.length; i++) { - if (inLiteral) { - if (format[i] === '\'') { - if (i + 1 < format.length && format[i+1] === '\'') { // escaped single quote - format[i+1] = '$'; - regex[i+1] = ''; - } else { // end of literal - regex[i] = ''; - inLiteral = false; - } - } - format[i] = '$'; - } else { - if (format[i] === '\'') { // start of literal - format[i] = '$'; - regex[i] = ''; - inLiteral = true; - } - } - } - - format = format.join(''); - } - - angular.forEach(formatCodeToRegex, function(data) { - var index = format.indexOf(data.key); - - if (index > -1) { - format = format.split(''); - - regex[index] = '(' + data.regex + ')'; - format[index] = '$'; // Custom symbol to define consumed part of format - for (var i = index + 1, n = index + data.key.length; i < n; i++) { - regex[i] = ''; - format[i] = '$'; - } - format = format.join(''); - - map.push({ - index: index, - key: data.key, - apply: data.apply, - matcher: data.regex - }); - } - }); - - return { - regex: new RegExp('^' + regex.join('') + '$'), - map: orderByFilter(map, 'index') - }; - } - - function createFormatter(format) { - var formatters = []; - var i = 0; - var formatter, literalIdx; - while (i < format.length) { - if (angular.isNumber(literalIdx)) { - if (format.charAt(i) === '\'') { - if (i + 1 >= format.length || format.charAt(i + 1) !== '\'') { - formatters.push(constructLiteralFormatter(format, literalIdx, i)); - literalIdx = null; - } - } else if (i === format.length) { - while (literalIdx < format.length) { - formatter = constructFormatterFromIdx(format, literalIdx); - formatters.push(formatter); - literalIdx = formatter.endIdx; - } - } - - i++; - continue; - } - - if (format.charAt(i) === '\'') { - literalIdx = i; - i++; - continue; - } - - formatter = constructFormatterFromIdx(format, i); - - formatters.push(formatter.parser); - i = formatter.endIdx; - } - - return formatters; - } - - function constructLiteralFormatter(format, literalIdx, endIdx) { - return function() { - return format.substr(literalIdx + 1, endIdx - literalIdx - 1); - }; - } - - function constructFormatterFromIdx(format, i) { - var currentPosStr = format.substr(i); - for (var j = 0; j < formatCodeToRegex.length; j++) { - if (new RegExp('^' + formatCodeToRegex[j].key).test(currentPosStr)) { - var data = formatCodeToRegex[j]; - return { - endIdx: i + data.key.length, - parser: data.formatter - }; - } - } - - return { - endIdx: i + 1, - parser: function() { - return currentPosStr.charAt(0); - } - }; - } - - this.filter = function(date, format) { - if (!angular.isDate(date) || isNaN(date) || !format) { - return ''; - } - - format = $locale.DATETIME_FORMATS[format] || format; - - if ($locale.id !== localeId) { - this.init(); - } - - if (!this.formatters[format]) { - this.formatters[format] = createFormatter(format); - } - - var formatters = this.formatters[format]; - - return formatters.reduce(function(str, formatter) { - return str + formatter(date); - }, ''); - }; - - this.parse = function(input, format, baseDate) { - if (!angular.isString(input) || !format) { - return input; - } - - format = $locale.DATETIME_FORMATS[format] || format; - format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&'); - - if ($locale.id !== localeId) { - this.init(); - } - - if (!this.parsers[format]) { - this.parsers[format] = createParser(format, 'apply'); - } - - var parser = this.parsers[format], - regex = parser.regex, - map = parser.map, - results = input.match(regex), - tzOffset = false; - if (results && results.length) { - var fields, dt; - if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) { - fields = { - year: baseDate.getFullYear(), - month: baseDate.getMonth(), - date: baseDate.getDate(), - hours: baseDate.getHours(), - minutes: baseDate.getMinutes(), - seconds: baseDate.getSeconds(), - milliseconds: baseDate.getMilliseconds() - }; - } else { - if (baseDate) { - $log.warn('dateparser:', 'baseDate is not a valid date'); - } - fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }; - } - - for (var i = 1, n = results.length; i < n; i++) { - var mapper = map[i - 1]; - if (mapper.matcher === 'Z') { - tzOffset = true; - } - - if (mapper.apply) { - mapper.apply.call(fields, results[i]); - } - } - - var datesetter = tzOffset ? Date.prototype.setUTCFullYear : - Date.prototype.setFullYear; - var timesetter = tzOffset ? Date.prototype.setUTCHours : - Date.prototype.setHours; - - if (isValid(fields.year, fields.month, fields.date)) { - if (angular.isDate(baseDate) && !isNaN(baseDate.getTime()) && !tzOffset) { - dt = new Date(baseDate); - datesetter.call(dt, fields.year, fields.month, fields.date); - timesetter.call(dt, fields.hours, fields.minutes, - fields.seconds, fields.milliseconds); - } else { - dt = new Date(0); - datesetter.call(dt, fields.year, fields.month, fields.date); - timesetter.call(dt, fields.hours || 0, fields.minutes || 0, - fields.seconds || 0, fields.milliseconds || 0); - } - } - - return dt; - } - }; - - // Check if date is valid for specific month (and year for February). - // Month: 0 = Jan, 1 = Feb, etc - function isValid(year, month, date) { - if (date < 1) { - return false; - } - - if (month === 1 && date > 28) { - return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0); - } - - if (month === 3 || month === 5 || month === 8 || month === 10) { - return date < 31; - } - - return true; - } - - function toInt(str) { - return parseInt(str, 10); - } - - this.toTimezone = toTimezone; - this.fromTimezone = fromTimezone; - this.timezoneToOffset = timezoneToOffset; - this.addDateMinutes = addDateMinutes; - this.convertTimezoneToLocal = convertTimezoneToLocal; - - function toTimezone(date, timezone) { - return date && timezone ? convertTimezoneToLocal(date, timezone) : date; - } - - function fromTimezone(date, timezone) { - return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date; - } - - //https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207 - function timezoneToOffset(timezone, fallback) { - timezone = timezone.replace(/:/g, ''); - var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; - return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; - } - - function addDateMinutes(date, minutes) { - date = new Date(date.getTime()); - date.setMinutes(date.getMinutes() + minutes); - return date; - } - - function convertTimezoneToLocal(date, timezone, reverse) { - reverse = reverse ? -1 : 1; - var dateTimezoneOffset = date.getTimezoneOffset(); - var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); - return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset)); - } -}]); - -// Avoiding use of ng-class as it creates a lot of watchers when a class is to be applied to -// at most one element. -angular.module('ui.bootstrap.isClass', []) -.directive('uibIsClass', [ - '$animate', -function ($animate) { - // 11111111 22222222 - var ON_REGEXP = /^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/; - // 11111111 22222222 - var IS_REGEXP = /^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/; - - var dataPerTracked = {}; - - return { - restrict: 'A', - compile: function(tElement, tAttrs) { - var linkedScopes = []; - var instances = []; - var expToData = {}; - var lastActivated = null; - var onExpMatches = tAttrs.uibIsClass.match(ON_REGEXP); - var onExp = onExpMatches[2]; - var expsStr = onExpMatches[1]; - var exps = expsStr.split(','); - - return linkFn; - - function linkFn(scope, element, attrs) { - linkedScopes.push(scope); - instances.push({ - scope: scope, - element: element - }); - - exps.forEach(function(exp, k) { - addForExp(exp, scope); - }); - - scope.$on('$destroy', removeScope); - } - - function addForExp(exp, scope) { - var matches = exp.match(IS_REGEXP); - var clazz = scope.$eval(matches[1]); - var compareWithExp = matches[2]; - var data = expToData[exp]; - if (!data) { - var watchFn = function(compareWithVal) { - var newActivated = null; - instances.some(function(instance) { - var thisVal = instance.scope.$eval(onExp); - if (thisVal === compareWithVal) { - newActivated = instance; - return true; - } - }); - if (data.lastActivated !== newActivated) { - if (data.lastActivated) { - $animate.removeClass(data.lastActivated.element, clazz); - } - if (newActivated) { - $animate.addClass(newActivated.element, clazz); - } - data.lastActivated = newActivated; - } - }; - expToData[exp] = data = { - lastActivated: null, - scope: scope, - watchFn: watchFn, - compareWithExp: compareWithExp, - watcher: scope.$watch(compareWithExp, watchFn) - }; - } - data.watchFn(scope.$eval(compareWithExp)); - } - - function removeScope(e) { - var removedScope = e.targetScope; - var index = linkedScopes.indexOf(removedScope); - linkedScopes.splice(index, 1); - instances.splice(index, 1); - if (linkedScopes.length) { - var newWatchScope = linkedScopes[0]; - angular.forEach(expToData, function(data) { - if (data.scope === removedScope) { - data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn); - data.scope = newWatchScope; - } - }); - } else { - expToData = {}; - } - } - } - }; -}]); -angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.isClass']) - -.value('$datepickerSuppressError', false) - -.value('$datepickerLiteralWarning', true) - -.constant('uibDatepickerConfig', { - datepickerMode: 'day', - formatDay: 'dd', - formatMonth: 'MMMM', - formatYear: 'yyyy', - formatDayHeader: 'EEE', - formatDayTitle: 'MMMM yyyy', - formatMonthTitle: 'yyyy', - maxDate: null, - maxMode: 'year', - minDate: null, - minMode: 'day', - monthColumns: 3, - ngModelOptions: {}, - shortcutPropagation: false, - showWeeks: true, - yearColumns: 5, - yearRows: 4 -}) - -.controller('UibDatepickerController', ['$scope', '$element', '$attrs', '$parse', '$interpolate', '$locale', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerLiteralWarning', '$datepickerSuppressError', 'uibDateParser', - function($scope, $element, $attrs, $parse, $interpolate, $locale, $log, dateFilter, datepickerConfig, $datepickerLiteralWarning, $datepickerSuppressError, dateParser) { - var self = this, - ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl; - ngModelOptions = {}, - watchListeners = []; - - $element.addClass('uib-datepicker'); - $attrs.$set('role', 'application'); - - if (!$scope.datepickerOptions) { - $scope.datepickerOptions = {}; - } - - // Modes chain - this.modes = ['day', 'month', 'year']; - - [ - 'customClass', - 'dateDisabled', - 'datepickerMode', - 'formatDay', - 'formatDayHeader', - 'formatDayTitle', - 'formatMonth', - 'formatMonthTitle', - 'formatYear', - 'maxDate', - 'maxMode', - 'minDate', - 'minMode', - 'monthColumns', - 'showWeeks', - 'shortcutPropagation', - 'startingDay', - 'yearColumns', - 'yearRows' - ].forEach(function(key) { - switch (key) { - case 'customClass': - case 'dateDisabled': - $scope[key] = $scope.datepickerOptions[key] || angular.noop; - break; - case 'datepickerMode': - $scope.datepickerMode = angular.isDefined($scope.datepickerOptions.datepickerMode) ? - $scope.datepickerOptions.datepickerMode : datepickerConfig.datepickerMode; - break; - case 'formatDay': - case 'formatDayHeader': - case 'formatDayTitle': - case 'formatMonth': - case 'formatMonthTitle': - case 'formatYear': - self[key] = angular.isDefined($scope.datepickerOptions[key]) ? - $interpolate($scope.datepickerOptions[key])($scope.$parent) : - datepickerConfig[key]; - break; - case 'monthColumns': - case 'showWeeks': - case 'shortcutPropagation': - case 'yearColumns': - case 'yearRows': - self[key] = angular.isDefined($scope.datepickerOptions[key]) ? - $scope.datepickerOptions[key] : datepickerConfig[key]; - break; - case 'startingDay': - if (angular.isDefined($scope.datepickerOptions.startingDay)) { - self.startingDay = $scope.datepickerOptions.startingDay; - } else if (angular.isNumber(datepickerConfig.startingDay)) { - self.startingDay = datepickerConfig.startingDay; - } else { - self.startingDay = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7; - } - - break; - case 'maxDate': - case 'minDate': - $scope.$watch('datepickerOptions.' + key, function(value) { - if (value) { - if (angular.isDate(value)) { - self[key] = dateParser.fromTimezone(new Date(value), ngModelOptions.getOption('timezone')); - } else { - if ($datepickerLiteralWarning) { - $log.warn('Literal date support has been deprecated, please switch to date object usage'); - } - - self[key] = new Date(dateFilter(value, 'medium')); - } - } else { - self[key] = datepickerConfig[key] ? - dateParser.fromTimezone(new Date(datepickerConfig[key]), ngModelOptions.getOption('timezone')) : - null; - } - - self.refreshView(); - }); - - break; - case 'maxMode': - case 'minMode': - if ($scope.datepickerOptions[key]) { - $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) { - self[key] = $scope[key] = angular.isDefined(value) ? value : $scope.datepickerOptions[key]; - if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) || - key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) { - $scope.datepickerMode = self[key]; - $scope.datepickerOptions.datepickerMode = self[key]; - } - }); - } else { - self[key] = $scope[key] = datepickerConfig[key] || null; - } - - break; - } - }); - - $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000); - - $scope.disabled = angular.isDefined($attrs.disabled) || false; - if (angular.isDefined($attrs.ngDisabled)) { - watchListeners.push($scope.$parent.$watch($attrs.ngDisabled, function(disabled) { - $scope.disabled = disabled; - self.refreshView(); - })); - } - - $scope.isActive = function(dateObject) { - if (self.compare(dateObject.date, self.activeDate) === 0) { - $scope.activeDateId = dateObject.uid; - return true; - } - return false; - }; - - this.init = function(ngModelCtrl_) { - ngModelCtrl = ngModelCtrl_; - ngModelOptions = extractOptions(ngModelCtrl); - - if ($scope.datepickerOptions.initDate) { - self.activeDate = dateParser.fromTimezone($scope.datepickerOptions.initDate, ngModelOptions.getOption('timezone')) || new Date(); - $scope.$watch('datepickerOptions.initDate', function(initDate) { - if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) { - self.activeDate = dateParser.fromTimezone(initDate, ngModelOptions.getOption('timezone')); - self.refreshView(); - } - }); - } else { - self.activeDate = new Date(); - } - - var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date(); - this.activeDate = !isNaN(date) ? - dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')) : - dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone')); - - ngModelCtrl.$render = function() { - self.render(); - }; - }; - - this.render = function() { - if (ngModelCtrl.$viewValue) { - var date = new Date(ngModelCtrl.$viewValue), - isValid = !isNaN(date); - - if (isValid) { - this.activeDate = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')); - } else if (!$datepickerSuppressError) { - $log.error('Datepicker directive: "ng-model" value must be a Date object'); - } - } - this.refreshView(); - }; - - this.refreshView = function() { - if (this.element) { - $scope.selectedDt = null; - this._refreshView(); - if ($scope.activeDt) { - $scope.activeDateId = $scope.activeDt.uid; - } - - var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null; - date = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')); - ngModelCtrl.$setValidity('dateDisabled', !date || - this.element && !this.isDisabled(date)); - } - }; - - this.createDateObject = function(date, format) { - var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null; - model = dateParser.fromTimezone(model, ngModelOptions.getOption('timezone')); - var today = new Date(); - today = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone')); - var time = this.compare(date, today); - var dt = { - date: date, - label: dateParser.filter(date, format), - selected: model && this.compare(date, model) === 0, - disabled: this.isDisabled(date), - past: time < 0, - current: time === 0, - future: time > 0, - customClass: this.customClass(date) || null - }; - - if (model && this.compare(date, model) === 0) { - $scope.selectedDt = dt; - } - - if (self.activeDate && this.compare(dt.date, self.activeDate) === 0) { - $scope.activeDt = dt; - } - - return dt; - }; - - this.isDisabled = function(date) { - return $scope.disabled || - this.minDate && this.compare(date, this.minDate) < 0 || - this.maxDate && this.compare(date, this.maxDate) > 0 || - $scope.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode}); - }; - - this.customClass = function(date) { - return $scope.customClass({date: date, mode: $scope.datepickerMode}); - }; - - // Split array into smaller arrays - this.split = function(arr, size) { - var arrays = []; - while (arr.length > 0) { - arrays.push(arr.splice(0, size)); - } - return arrays; - }; - - $scope.select = function(date) { - if ($scope.datepickerMode === self.minMode) { - var dt = ngModelCtrl.$viewValue ? dateParser.fromTimezone(new Date(ngModelCtrl.$viewValue), ngModelOptions.getOption('timezone')) : new Date(0, 0, 0, 0, 0, 0, 0); - dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); - dt = dateParser.toTimezone(dt, ngModelOptions.getOption('timezone')); - ngModelCtrl.$setViewValue(dt); - ngModelCtrl.$render(); - } else { - self.activeDate = date; - setMode(self.modes[self.modes.indexOf($scope.datepickerMode) - 1]); - - $scope.$emit('uib:datepicker.mode'); - } - - $scope.$broadcast('uib:datepicker.focus'); - }; - - $scope.move = function(direction) { - var year = self.activeDate.getFullYear() + direction * (self.step.years || 0), - month = self.activeDate.getMonth() + direction * (self.step.months || 0); - self.activeDate.setFullYear(year, month, 1); - self.refreshView(); - }; - - $scope.toggleMode = function(direction) { - direction = direction || 1; - - if ($scope.datepickerMode === self.maxMode && direction === 1 || - $scope.datepickerMode === self.minMode && direction === -1) { - return; - } - - setMode(self.modes[self.modes.indexOf($scope.datepickerMode) + direction]); - - $scope.$emit('uib:datepicker.mode'); - }; - - // Key event mapper - $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' }; - - var focusElement = function() { - self.element[0].focus(); - }; - - // Listen for focus requests from popup directive - $scope.$on('uib:datepicker.focus', focusElement); - - $scope.keydown = function(evt) { - var key = $scope.keys[evt.which]; - - if (!key || evt.shiftKey || evt.altKey || $scope.disabled) { - return; - } - - evt.preventDefault(); - if (!self.shortcutPropagation) { - evt.stopPropagation(); - } - - if (key === 'enter' || key === 'space') { - if (self.isDisabled(self.activeDate)) { - return; // do nothing - } - $scope.select(self.activeDate); - } else if (evt.ctrlKey && (key === 'up' || key === 'down')) { - $scope.toggleMode(key === 'up' ? 1 : -1); - } else { - self.handleKeyDown(key, evt); - self.refreshView(); - } - }; - - $element.on('keydown', function(evt) { - $scope.$apply(function() { - $scope.keydown(evt); - }); - }); - - $scope.$on('$destroy', function() { - //Clear all watch listeners on destroy - while (watchListeners.length) { - watchListeners.shift()(); - } - }); - - function setMode(mode) { - $scope.datepickerMode = mode; - $scope.datepickerOptions.datepickerMode = mode; - } - - function extractOptions(ngModelCtrl) { - var ngModelOptions; - - if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing - // guarantee a value - ngModelOptions = ngModelCtrl.$options || - $scope.datepickerOptions.ngModelOptions || - datepickerConfig.ngModelOptions || - {}; - - // mimic 1.6+ api - ngModelOptions.getOption = function (key) { - return ngModelOptions[key]; - }; - } else { // in angular >=1.6 $options is always present - // ng-model-options defaults timezone to null; don't let its precedence squash a non-null value - var timezone = ngModelCtrl.$options.getOption('timezone') || - ($scope.datepickerOptions.ngModelOptions ? $scope.datepickerOptions.ngModelOptions.timezone : null) || - (datepickerConfig.ngModelOptions ? datepickerConfig.ngModelOptions.timezone : null); - - // values passed to createChild override existing values - ngModelOptions = ngModelCtrl.$options // start with a ModelOptions instance - .createChild(datepickerConfig.ngModelOptions) // lowest precedence - .createChild($scope.datepickerOptions.ngModelOptions) - .createChild(ngModelCtrl.$options) // highest precedence - .createChild({timezone: timezone}); // to keep from squashing a non-null value - } - - return ngModelOptions; - } -}]) - -.controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) { - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - this.step = { months: 1 }; - this.element = $element; - function getDaysInMonth(year, month) { - return month === 1 && year % 4 === 0 && - (year % 100 !== 0 || year % 400 === 0) ? 29 : DAYS_IN_MONTH[month]; - } - - this.init = function(ctrl) { - angular.extend(ctrl, this); - scope.showWeeks = ctrl.showWeeks; - ctrl.refreshView(); - }; - - this.getDates = function(startDate, n) { - var dates = new Array(n), current = new Date(startDate), i = 0, date; - while (i < n) { - date = new Date(current); - dates[i++] = date; - current.setDate(current.getDate() + 1); - } - return dates; - }; - - this._refreshView = function() { - var year = this.activeDate.getFullYear(), - month = this.activeDate.getMonth(), - firstDayOfMonth = new Date(this.activeDate); - - firstDayOfMonth.setFullYear(year, month, 1); - - var difference = this.startingDay - firstDayOfMonth.getDay(), - numDisplayedFromPreviousMonth = difference > 0 ? - 7 - difference : - difference, - firstDate = new Date(firstDayOfMonth); - - if (numDisplayedFromPreviousMonth > 0) { - firstDate.setDate(-numDisplayedFromPreviousMonth + 1); - } - - // 42 is the number of days on a six-week calendar - var days = this.getDates(firstDate, 42); - for (var i = 0; i < 42; i ++) { - days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), { - secondary: days[i].getMonth() !== month, - uid: scope.uniqueId + '-' + i - }); - } - - scope.labels = new Array(7); - for (var j = 0; j < 7; j++) { - scope.labels[j] = { - abbr: dateFilter(days[j].date, this.formatDayHeader), - full: dateFilter(days[j].date, 'EEEE') - }; - } - - scope.title = dateFilter(this.activeDate, this.formatDayTitle); - scope.rows = this.split(days, 7); - - if (scope.showWeeks) { - scope.weekNumbers = []; - var thursdayIndex = (4 + 7 - this.startingDay) % 7, - numWeeks = scope.rows.length; - for (var curWeek = 0; curWeek < numWeeks; curWeek++) { - scope.weekNumbers.push( - getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date)); - } - } - }; - - this.compare = function(date1, date2) { - var _date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()); - var _date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()); - _date1.setFullYear(date1.getFullYear()); - _date2.setFullYear(date2.getFullYear()); - return _date1 - _date2; - }; - - function getISO8601WeekNumber(date) { - var checkDate = new Date(date); - checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday - var time = checkDate.getTime(); - checkDate.setMonth(0); // Compare with Jan 1 - checkDate.setDate(1); - return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; - } - - this.handleKeyDown = function(key, evt) { - var date = this.activeDate.getDate(); - - if (key === 'left') { - date = date - 1; - } else if (key === 'up') { - date = date - 7; - } else if (key === 'right') { - date = date + 1; - } else if (key === 'down') { - date = date + 7; - } else if (key === 'pageup' || key === 'pagedown') { - var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1); - this.activeDate.setMonth(month, 1); - date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date); - } else if (key === 'home') { - date = 1; - } else if (key === 'end') { - date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()); - } - this.activeDate.setDate(date); - }; -}]) - -.controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) { - this.step = { years: 1 }; - this.element = $element; - - this.init = function(ctrl) { - angular.extend(ctrl, this); - ctrl.refreshView(); - }; - - this._refreshView = function() { - var months = new Array(12), - year = this.activeDate.getFullYear(), - date; - - for (var i = 0; i < 12; i++) { - date = new Date(this.activeDate); - date.setFullYear(year, i, 1); - months[i] = angular.extend(this.createDateObject(date, this.formatMonth), { - uid: scope.uniqueId + '-' + i - }); - } - - scope.title = dateFilter(this.activeDate, this.formatMonthTitle); - scope.rows = this.split(months, this.monthColumns); - scope.yearHeaderColspan = this.monthColumns > 3 ? this.monthColumns - 2 : 1; - }; - - this.compare = function(date1, date2) { - var _date1 = new Date(date1.getFullYear(), date1.getMonth()); - var _date2 = new Date(date2.getFullYear(), date2.getMonth()); - _date1.setFullYear(date1.getFullYear()); - _date2.setFullYear(date2.getFullYear()); - return _date1 - _date2; - }; - - this.handleKeyDown = function(key, evt) { - var date = this.activeDate.getMonth(); - - if (key === 'left') { - date = date - 1; - } else if (key === 'up') { - date = date - this.monthColumns; - } else if (key === 'right') { - date = date + 1; - } else if (key === 'down') { - date = date + this.monthColumns; - } else if (key === 'pageup' || key === 'pagedown') { - var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1); - this.activeDate.setFullYear(year); - } else if (key === 'home') { - date = 0; - } else if (key === 'end') { - date = 11; - } - this.activeDate.setMonth(date); - }; -}]) - -.controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) { - var columns, range; - this.element = $element; - - function getStartingYear(year) { - return parseInt((year - 1) / range, 10) * range + 1; - } - - this.yearpickerInit = function() { - columns = this.yearColumns; - range = this.yearRows * columns; - this.step = { years: range }; - }; - - this._refreshView = function() { - var years = new Array(range), date; - - for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) { - date = new Date(this.activeDate); - date.setFullYear(start + i, 0, 1); - years[i] = angular.extend(this.createDateObject(date, this.formatYear), { - uid: scope.uniqueId + '-' + i - }); - } - - scope.title = [years[0].label, years[range - 1].label].join(' - '); - scope.rows = this.split(years, columns); - scope.columns = columns; - }; - - this.compare = function(date1, date2) { - return date1.getFullYear() - date2.getFullYear(); - }; - - this.handleKeyDown = function(key, evt) { - var date = this.activeDate.getFullYear(); - - if (key === 'left') { - date = date - 1; - } else if (key === 'up') { - date = date - columns; - } else if (key === 'right') { - date = date + 1; - } else if (key === 'down') { - date = date + columns; - } else if (key === 'pageup' || key === 'pagedown') { - date += (key === 'pageup' ? - 1 : 1) * range; - } else if (key === 'home') { - date = getStartingYear(this.activeDate.getFullYear()); - } else if (key === 'end') { - date = getStartingYear(this.activeDate.getFullYear()) + range - 1; - } - this.activeDate.setFullYear(date); - }; -}]) - -.directive('uibDatepicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/datepicker.html'; - }, - scope: { - datepickerOptions: '=?' - }, - require: ['uibDatepicker', '^ngModel'], - restrict: 'A', - controller: 'UibDatepickerController', - controllerAs: 'datepicker', - link: function(scope, element, attrs, ctrls) { - var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - datepickerCtrl.init(ngModelCtrl); - } - }; -}) - -.directive('uibDaypicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/day.html'; - }, - require: ['^uibDatepicker', 'uibDaypicker'], - restrict: 'A', - controller: 'UibDaypickerController', - link: function(scope, element, attrs, ctrls) { - var datepickerCtrl = ctrls[0], - daypickerCtrl = ctrls[1]; - - daypickerCtrl.init(datepickerCtrl); - } - }; -}) - -.directive('uibMonthpicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/month.html'; - }, - require: ['^uibDatepicker', 'uibMonthpicker'], - restrict: 'A', - controller: 'UibMonthpickerController', - link: function(scope, element, attrs, ctrls) { - var datepickerCtrl = ctrls[0], - monthpickerCtrl = ctrls[1]; - - monthpickerCtrl.init(datepickerCtrl); - } - }; -}) - -.directive('uibYearpicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/year.html'; - }, - require: ['^uibDatepicker', 'uibYearpicker'], - restrict: 'A', - controller: 'UibYearpickerController', - link: function(scope, element, attrs, ctrls) { - var ctrl = ctrls[0]; - angular.extend(ctrl, ctrls[1]); - ctrl.yearpickerInit(); - - ctrl.refreshView(); - } - }; -}); - -angular.module('ui.bootstrap.position', []) - -/** - * A set of utility methods for working with the DOM. - * It is meant to be used where we need to absolute-position elements in - * relation to another element (this is the case for tooltips, popovers, - * typeahead suggestions etc.). - */ - .factory('$uibPosition', ['$document', '$window', function($document, $window) { - /** - * Used by scrollbarWidth() function to cache scrollbar's width. - * Do not access this variable directly, use scrollbarWidth() instead. - */ - var SCROLLBAR_WIDTH; - /** - * scrollbar on body and html element in IE and Edge overlay - * content and should be considered 0 width. - */ - var BODY_SCROLLBAR_WIDTH; - var OVERFLOW_REGEX = { - normal: /(auto|scroll)/, - hidden: /(auto|scroll|hidden)/ - }; - var PLACEMENT_REGEX = { - auto: /\s?auto?\s?/i, - primary: /^(top|bottom|left|right)$/, - secondary: /^(top|bottom|left|right|center)$/, - vertical: /^(top|bottom)$/ - }; - var BODY_REGEX = /(HTML|BODY)/; - - return { - - /** - * Provides a raw DOM element from a jQuery/jQLite element. - * - * @param {element} elem - The element to convert. - * - * @returns {element} A HTML element. - */ - getRawNode: function(elem) { - return elem.nodeName ? elem : elem[0] || elem; - }, - - /** - * Provides a parsed number for a style property. Strips - * units and casts invalid numbers to 0. - * - * @param {string} value - The style value to parse. - * - * @returns {number} A valid number. - */ - parseStyle: function(value) { - value = parseFloat(value); - return isFinite(value) ? value : 0; - }, - - /** - * Provides the closest positioned ancestor. - * - * @param {element} element - The element to get the offest parent for. - * - * @returns {element} The closest positioned ancestor. - */ - offsetParent: function(elem) { - elem = this.getRawNode(elem); - - var offsetParent = elem.offsetParent || $document[0].documentElement; - - function isStaticPositioned(el) { - return ($window.getComputedStyle(el).position || 'static') === 'static'; - } - - while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) { - offsetParent = offsetParent.offsetParent; - } - - return offsetParent || $document[0].documentElement; - }, - - /** - * Provides the scrollbar width, concept from TWBS measureScrollbar() - * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js - * In IE and Edge, scollbar on body and html element overlay and should - * return a width of 0. - * - * @returns {number} The width of the browser scollbar. - */ - scrollbarWidth: function(isBody) { - if (isBody) { - if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) { - var bodyElem = $document.find('body'); - bodyElem.addClass('uib-position-body-scrollbar-measure'); - BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth; - BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0; - bodyElem.removeClass('uib-position-body-scrollbar-measure'); - } - return BODY_SCROLLBAR_WIDTH; - } - - if (angular.isUndefined(SCROLLBAR_WIDTH)) { - var scrollElem = angular.element('
'); - $document.find('body').append(scrollElem); - SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth; - SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0; - scrollElem.remove(); - } - - return SCROLLBAR_WIDTH; - }, - - /** - * Provides the padding required on an element to replace the scrollbar. - * - * @returns {object} An object with the following properties: - *
    - *
  • **scrollbarWidth**: the width of the scrollbar
  • - *
  • **widthOverflow**: whether the the width is overflowing
  • - *
  • **right**: the amount of right padding on the element needed to replace the scrollbar
  • - *
  • **rightOriginal**: the amount of right padding currently on the element
  • - *
  • **heightOverflow**: whether the the height is overflowing
  • - *
  • **bottom**: the amount of bottom padding on the element needed to replace the scrollbar
  • - *
  • **bottomOriginal**: the amount of bottom padding currently on the element
  • - *
- */ - scrollbarPadding: function(elem) { - elem = this.getRawNode(elem); - - var elemStyle = $window.getComputedStyle(elem); - var paddingRight = this.parseStyle(elemStyle.paddingRight); - var paddingBottom = this.parseStyle(elemStyle.paddingBottom); - var scrollParent = this.scrollParent(elem, false, true); - var scrollbarWidth = this.scrollbarWidth(BODY_REGEX.test(scrollParent.tagName)); - - return { - scrollbarWidth: scrollbarWidth, - widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth, - right: paddingRight + scrollbarWidth, - originalRight: paddingRight, - heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight, - bottom: paddingBottom + scrollbarWidth, - originalBottom: paddingBottom - }; - }, - - /** - * Checks to see if the element is scrollable. - * - * @param {element} elem - The element to check. - * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered, - * default is false. - * - * @returns {boolean} Whether the element is scrollable. - */ - isScrollable: function(elem, includeHidden) { - elem = this.getRawNode(elem); - - var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal; - var elemStyle = $window.getComputedStyle(elem); - return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX); - }, - - /** - * Provides the closest scrollable ancestor. - * A port of the jQuery UI scrollParent method: - * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js - * - * @param {element} elem - The element to find the scroll parent of. - * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered, - * default is false. - * @param {boolean=} [includeSelf=false] - Should the element being passed be - * included in the scrollable llokup. - * - * @returns {element} A HTML element. - */ - scrollParent: function(elem, includeHidden, includeSelf) { - elem = this.getRawNode(elem); - - var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal; - var documentEl = $document[0].documentElement; - var elemStyle = $window.getComputedStyle(elem); - if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) { - return elem; - } - var excludeStatic = elemStyle.position === 'absolute'; - var scrollParent = elem.parentElement || documentEl; - - if (scrollParent === documentEl || elemStyle.position === 'fixed') { - return documentEl; - } - - while (scrollParent.parentElement && scrollParent !== documentEl) { - var spStyle = $window.getComputedStyle(scrollParent); - if (excludeStatic && spStyle.position !== 'static') { - excludeStatic = false; - } - - if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) { - break; - } - scrollParent = scrollParent.parentElement; - } - - return scrollParent; - }, - - /** - * Provides read-only equivalent of jQuery's position function: - * http://api.jquery.com/position/ - distance to closest positioned - * ancestor. Does not account for margins by default like jQuery position. - * - * @param {element} elem - The element to caclulate the position on. - * @param {boolean=} [includeMargins=false] - Should margins be accounted - * for, default is false. - * - * @returns {object} An object with the following properties: - *
    - *
  • **width**: the width of the element
  • - *
  • **height**: the height of the element
  • - *
  • **top**: distance to top edge of offset parent
  • - *
  • **left**: distance to left edge of offset parent
  • - *
- */ - position: function(elem, includeMagins) { - elem = this.getRawNode(elem); - - var elemOffset = this.offset(elem); - if (includeMagins) { - var elemStyle = $window.getComputedStyle(elem); - elemOffset.top -= this.parseStyle(elemStyle.marginTop); - elemOffset.left -= this.parseStyle(elemStyle.marginLeft); - } - var parent = this.offsetParent(elem); - var parentOffset = {top: 0, left: 0}; - - if (parent !== $document[0].documentElement) { - parentOffset = this.offset(parent); - parentOffset.top += parent.clientTop - parent.scrollTop; - parentOffset.left += parent.clientLeft - parent.scrollLeft; - } - - return { - width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth), - height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight), - top: Math.round(elemOffset.top - parentOffset.top), - left: Math.round(elemOffset.left - parentOffset.left) - }; - }, - - /** - * Provides read-only equivalent of jQuery's offset function: - * http://api.jquery.com/offset/ - distance to viewport. Does - * not account for borders, margins, or padding on the body - * element. - * - * @param {element} elem - The element to calculate the offset on. - * - * @returns {object} An object with the following properties: - *
    - *
  • **width**: the width of the element
  • - *
  • **height**: the height of the element
  • - *
  • **top**: distance to top edge of viewport
  • - *
  • **right**: distance to bottom edge of viewport
  • - *
- */ - offset: function(elem) { - elem = this.getRawNode(elem); - - var elemBCR = elem.getBoundingClientRect(); - return { - width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth), - height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight), - top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)), - left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft)) - }; - }, - - /** - * Provides offset distance to the closest scrollable ancestor - * or viewport. Accounts for border and scrollbar width. - * - * Right and bottom dimensions represent the distance to the - * respective edge of the viewport element. If the element - * edge extends beyond the viewport, a negative value will be - * reported. - * - * @param {element} elem - The element to get the viewport offset for. - * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead - * of the first scrollable element, default is false. - * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element - * be accounted for, default is true. - * - * @returns {object} An object with the following properties: - *
    - *
  • **top**: distance to the top content edge of viewport element
  • - *
  • **bottom**: distance to the bottom content edge of viewport element
  • - *
  • **left**: distance to the left content edge of viewport element
  • - *
  • **right**: distance to the right content edge of viewport element
  • - *
- */ - viewportOffset: function(elem, useDocument, includePadding) { - elem = this.getRawNode(elem); - includePadding = includePadding !== false ? true : false; - - var elemBCR = elem.getBoundingClientRect(); - var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0}; - - var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem); - var offsetParentBCR = offsetParent.getBoundingClientRect(); - - offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop; - offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft; - if (offsetParent === $document[0].documentElement) { - offsetBCR.top += $window.pageYOffset; - offsetBCR.left += $window.pageXOffset; - } - offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight; - offsetBCR.right = offsetBCR.left + offsetParent.clientWidth; - - if (includePadding) { - var offsetParentStyle = $window.getComputedStyle(offsetParent); - offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop); - offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom); - offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft); - offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight); - } - - return { - top: Math.round(elemBCR.top - offsetBCR.top), - bottom: Math.round(offsetBCR.bottom - elemBCR.bottom), - left: Math.round(elemBCR.left - offsetBCR.left), - right: Math.round(offsetBCR.right - elemBCR.right) - }; - }, - - /** - * Provides an array of placement values parsed from a placement string. - * Along with the 'auto' indicator, supported placement strings are: - *
    - *
  • top: element on top, horizontally centered on host element.
  • - *
  • top-left: element on top, left edge aligned with host element left edge.
  • - *
  • top-right: element on top, lerightft edge aligned with host element right edge.
  • - *
  • bottom: element on bottom, horizontally centered on host element.
  • - *
  • bottom-left: element on bottom, left edge aligned with host element left edge.
  • - *
  • bottom-right: element on bottom, right edge aligned with host element right edge.
  • - *
  • left: element on left, vertically centered on host element.
  • - *
  • left-top: element on left, top edge aligned with host element top edge.
  • - *
  • left-bottom: element on left, bottom edge aligned with host element bottom edge.
  • - *
  • right: element on right, vertically centered on host element.
  • - *
  • right-top: element on right, top edge aligned with host element top edge.
  • - *
  • right-bottom: element on right, bottom edge aligned with host element bottom edge.
  • - *
- * A placement string with an 'auto' indicator is expected to be - * space separated from the placement, i.e: 'auto bottom-left' If - * the primary and secondary placement values do not match 'top, - * bottom, left, right' then 'top' will be the primary placement and - * 'center' will be the secondary placement. If 'auto' is passed, true - * will be returned as the 3rd value of the array. - * - * @param {string} placement - The placement string to parse. - * - * @returns {array} An array with the following values - *
    - *
  • **[0]**: The primary placement.
  • - *
  • **[1]**: The secondary placement.
  • - *
  • **[2]**: If auto is passed: true, else undefined.
  • - *
- */ - parsePlacement: function(placement) { - var autoPlace = PLACEMENT_REGEX.auto.test(placement); - if (autoPlace) { - placement = placement.replace(PLACEMENT_REGEX.auto, ''); - } - - placement = placement.split('-'); - - placement[0] = placement[0] || 'top'; - if (!PLACEMENT_REGEX.primary.test(placement[0])) { - placement[0] = 'top'; - } - - placement[1] = placement[1] || 'center'; - if (!PLACEMENT_REGEX.secondary.test(placement[1])) { - placement[1] = 'center'; - } - - if (autoPlace) { - placement[2] = true; - } else { - placement[2] = false; - } - - return placement; - }, - - /** - * Provides coordinates for an element to be positioned relative to - * another element. Passing 'auto' as part of the placement parameter - * will enable smart placement - where the element fits. i.e: - * 'auto left-top' will check to see if there is enough space to the left - * of the hostElem to fit the targetElem, if not place right (same for secondary - * top placement). Available space is calculated using the viewportOffset - * function. - * - * @param {element} hostElem - The element to position against. - * @param {element} targetElem - The element to position. - * @param {string=} [placement=top] - The placement for the targetElem, - * default is 'top'. 'center' is assumed as secondary placement for - * 'top', 'left', 'right', and 'bottom' placements. Available placements are: - *
    - *
  • top
  • - *
  • top-right
  • - *
  • top-left
  • - *
  • bottom
  • - *
  • bottom-left
  • - *
  • bottom-right
  • - *
  • left
  • - *
  • left-top
  • - *
  • left-bottom
  • - *
  • right
  • - *
  • right-top
  • - *
  • right-bottom
  • - *
- * @param {boolean=} [appendToBody=false] - Should the top and left values returned - * be calculated from the body element, default is false. - * - * @returns {object} An object with the following properties: - *
    - *
  • **top**: Value for targetElem top.
  • - *
  • **left**: Value for targetElem left.
  • - *
  • **placement**: The resolved placement.
  • - *
- */ - positionElements: function(hostElem, targetElem, placement, appendToBody) { - hostElem = this.getRawNode(hostElem); - targetElem = this.getRawNode(targetElem); - - // need to read from prop to support tests. - var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth'); - var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight'); - - placement = this.parsePlacement(placement); - - var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem); - var targetElemPos = {top: 0, left: 0, placement: ''}; - - if (placement[2]) { - var viewportOffset = this.viewportOffset(hostElem, appendToBody); - - var targetElemStyle = $window.getComputedStyle(targetElem); - var adjustedSize = { - width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))), - height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom))) - }; - - placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' : - placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' : - placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' : - placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' : - placement[0]; - - placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' : - placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' : - placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' : - placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' : - placement[1]; - - if (placement[1] === 'center') { - if (PLACEMENT_REGEX.vertical.test(placement[0])) { - var xOverflow = hostElemPos.width / 2 - targetWidth / 2; - if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) { - placement[1] = 'left'; - } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) { - placement[1] = 'right'; - } - } else { - var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2; - if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) { - placement[1] = 'top'; - } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) { - placement[1] = 'bottom'; - } - } - } - } - - switch (placement[0]) { - case 'top': - targetElemPos.top = hostElemPos.top - targetHeight; - break; - case 'bottom': - targetElemPos.top = hostElemPos.top + hostElemPos.height; - break; - case 'left': - targetElemPos.left = hostElemPos.left - targetWidth; - break; - case 'right': - targetElemPos.left = hostElemPos.left + hostElemPos.width; - break; - } - - switch (placement[1]) { - case 'top': - targetElemPos.top = hostElemPos.top; - break; - case 'bottom': - targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight; - break; - case 'left': - targetElemPos.left = hostElemPos.left; - break; - case 'right': - targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth; - break; - case 'center': - if (PLACEMENT_REGEX.vertical.test(placement[0])) { - targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2; - } else { - targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2; - } - break; - } - - targetElemPos.top = Math.round(targetElemPos.top); - targetElemPos.left = Math.round(targetElemPos.left); - targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1]; - - return targetElemPos; - }, - - /** - * Provides a way to adjust the top positioning after first - * render to correctly align element to top after content - * rendering causes resized element height - * - * @param {array} placementClasses - The array of strings of classes - * element should have. - * @param {object} containerPosition - The object with container - * position information - * @param {number} initialHeight - The initial height for the elem. - * @param {number} currentHeight - The current height for the elem. - */ - adjustTop: function(placementClasses, containerPosition, initialHeight, currentHeight) { - if (placementClasses.indexOf('top') !== -1 && initialHeight !== currentHeight) { - return { - top: containerPosition.top - currentHeight + 'px' - }; - } - }, - - /** - * Provides a way for positioning tooltip & dropdown - * arrows when using placement options beyond the standard - * left, right, top, or bottom. - * - * @param {element} elem - The tooltip/dropdown element. - * @param {string} placement - The placement for the elem. - */ - positionArrow: function(elem, placement) { - elem = this.getRawNode(elem); - - var innerElem = elem.querySelector('.tooltip-inner, .popover-inner'); - if (!innerElem) { - return; - } - - var isTooltip = angular.element(innerElem).hasClass('tooltip-inner'); - - var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow'); - if (!arrowElem) { - return; - } - - var arrowCss = { - top: '', - bottom: '', - left: '', - right: '' - }; - - placement = this.parsePlacement(placement); - if (placement[1] === 'center') { - // no adjustment necessary - just reset styles - angular.element(arrowElem).css(arrowCss); - return; - } - - var borderProp = 'border-' + placement[0] + '-width'; - var borderWidth = $window.getComputedStyle(arrowElem)[borderProp]; - - var borderRadiusProp = 'border-'; - if (PLACEMENT_REGEX.vertical.test(placement[0])) { - borderRadiusProp += placement[0] + '-' + placement[1]; - } else { - borderRadiusProp += placement[1] + '-' + placement[0]; - } - borderRadiusProp += '-radius'; - var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp]; - - switch (placement[0]) { - case 'top': - arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth; - break; - case 'bottom': - arrowCss.top = isTooltip ? '0' : '-' + borderWidth; - break; - case 'left': - arrowCss.right = isTooltip ? '0' : '-' + borderWidth; - break; - case 'right': - arrowCss.left = isTooltip ? '0' : '-' + borderWidth; - break; - } - - arrowCss[placement[1]] = borderRadius; - - angular.element(arrowElem).css(arrowCss); - } - }; - }]); - -angular.module('ui.bootstrap.datepickerPopup', ['ui.bootstrap.datepicker', 'ui.bootstrap.position']) - -.value('$datepickerPopupLiteralWarning', true) - -.constant('uibDatepickerPopupConfig', { - altInputFormats: [], - appendToBody: false, - clearText: 'Clear', - closeOnDateSelection: true, - closeText: 'Done', - currentText: 'Today', - datepickerPopup: 'yyyy-MM-dd', - datepickerPopupTemplateUrl: 'uib/template/datepickerPopup/popup.html', - datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html', - html5Types: { - date: 'yyyy-MM-dd', - 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss', - 'month': 'yyyy-MM' - }, - onOpenFocus: true, - showButtonBar: true, - placement: 'auto bottom-left' -}) - -.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$log', '$parse', '$window', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig', '$datepickerPopupLiteralWarning', -function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout, datepickerConfig, $datepickerPopupLiteralWarning) { - var cache = {}, - isHtml5DateInput = false; - var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus, - datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl, scrollParentEl, - ngModel, ngModelOptions, $popup, altInputFormats, watchListeners = []; - - this.init = function(_ngModel_) { - ngModel = _ngModel_; - ngModelOptions = extractOptions(ngModel); - closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ? - $scope.$parent.$eval($attrs.closeOnDateSelection) : - datepickerPopupConfig.closeOnDateSelection; - appendToBody = angular.isDefined($attrs.datepickerAppendToBody) ? - $scope.$parent.$eval($attrs.datepickerAppendToBody) : - datepickerPopupConfig.appendToBody; - onOpenFocus = angular.isDefined($attrs.onOpenFocus) ? - $scope.$parent.$eval($attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus; - datepickerPopupTemplateUrl = angular.isDefined($attrs.datepickerPopupTemplateUrl) ? - $attrs.datepickerPopupTemplateUrl : - datepickerPopupConfig.datepickerPopupTemplateUrl; - datepickerTemplateUrl = angular.isDefined($attrs.datepickerTemplateUrl) ? - $attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl; - altInputFormats = angular.isDefined($attrs.altInputFormats) ? - $scope.$parent.$eval($attrs.altInputFormats) : - datepickerPopupConfig.altInputFormats; - - $scope.showButtonBar = angular.isDefined($attrs.showButtonBar) ? - $scope.$parent.$eval($attrs.showButtonBar) : - datepickerPopupConfig.showButtonBar; - - if (datepickerPopupConfig.html5Types[$attrs.type]) { - dateFormat = datepickerPopupConfig.html5Types[$attrs.type]; - isHtml5DateInput = true; - } else { - dateFormat = $attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup; - $attrs.$observe('uibDatepickerPopup', function(value, oldValue) { - var newDateFormat = value || datepickerPopupConfig.datepickerPopup; - // Invalidate the $modelValue to ensure that formatters re-run - // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764 - if (newDateFormat !== dateFormat) { - dateFormat = newDateFormat; - ngModel.$modelValue = null; - - if (!dateFormat) { - throw new Error('uibDatepickerPopup must have a date format specified.'); - } - } - }); - } - - if (!dateFormat) { - throw new Error('uibDatepickerPopup must have a date format specified.'); - } - - if (isHtml5DateInput && $attrs.uibDatepickerPopup) { - throw new Error('HTML5 date input types do not support custom formats.'); - } - - // popup element used to display calendar - popupEl = angular.element('
'); - - popupEl.attr({ - 'ng-model': 'date', - 'ng-change': 'dateSelection(date)', - 'template-url': datepickerPopupTemplateUrl - }); - - // datepicker element - datepickerEl = angular.element(popupEl.children()[0]); - datepickerEl.attr('template-url', datepickerTemplateUrl); - - if (!$scope.datepickerOptions) { - $scope.datepickerOptions = {}; - } - - if (isHtml5DateInput) { - if ($attrs.type === 'month') { - $scope.datepickerOptions.datepickerMode = 'month'; - $scope.datepickerOptions.minMode = 'month'; - } - } - - datepickerEl.attr('datepicker-options', 'datepickerOptions'); - - if (!isHtml5DateInput) { - // Internal API to maintain the correct ng-invalid-[key] class - ngModel.$$parserName = 'date'; - ngModel.$validators.date = validator; - ngModel.$parsers.unshift(parseDate); - ngModel.$formatters.push(function(value) { - if (ngModel.$isEmpty(value)) { - $scope.date = value; - return value; - } - - if (angular.isNumber(value)) { - value = new Date(value); - } - - $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone')); - - return dateParser.filter($scope.date, dateFormat); - }); - } else { - ngModel.$formatters.push(function(value) { - $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone')); - return value; - }); - } - - // Detect changes in the view from the text box - ngModel.$viewChangeListeners.push(function() { - $scope.date = parseDateString(ngModel.$viewValue); - }); - - $element.on('keydown', inputKeydownBind); - - $popup = $compile(popupEl)($scope); - // Prevent jQuery cache memory leak (template is now redundant after linking) - popupEl.remove(); - - if (appendToBody) { - $document.find('body').append($popup); - } else { - $element.after($popup); - } - - $scope.$on('$destroy', function() { - if ($scope.isOpen === true) { - if (!$rootScope.$$phase) { - $scope.$apply(function() { - $scope.isOpen = false; - }); - } - } - - $popup.remove(); - $element.off('keydown', inputKeydownBind); - $document.off('click', documentClickBind); - if (scrollParentEl) { - scrollParentEl.off('scroll', positionPopup); - } - angular.element($window).off('resize', positionPopup); - - //Clear all watch listeners on destroy - while (watchListeners.length) { - watchListeners.shift()(); - } - }); - }; - - $scope.getText = function(key) { - return $scope[key + 'Text'] || datepickerPopupConfig[key + 'Text']; - }; - - $scope.isDisabled = function(date) { - if (date === 'today') { - date = dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone')); - } - - var dates = {}; - angular.forEach(['minDate', 'maxDate'], function(key) { - if (!$scope.datepickerOptions[key]) { - dates[key] = null; - } else if (angular.isDate($scope.datepickerOptions[key])) { - dates[key] = new Date($scope.datepickerOptions[key]); - } else { - if ($datepickerPopupLiteralWarning) { - $log.warn('Literal date support has been deprecated, please switch to date object usage'); - } - - dates[key] = new Date(dateFilter($scope.datepickerOptions[key], 'medium')); - } - }); - - return $scope.datepickerOptions && - dates.minDate && $scope.compare(date, dates.minDate) < 0 || - dates.maxDate && $scope.compare(date, dates.maxDate) > 0; - }; - - $scope.compare = function(date1, date2) { - return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()); - }; - - // Inner change - $scope.dateSelection = function(dt) { - $scope.date = dt; - var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function - $element.val(date); - ngModel.$setViewValue(date); - - if (closeOnDateSelection) { - $scope.isOpen = false; - $element[0].focus(); - } - }; - - $scope.keydown = function(evt) { - if (evt.which === 27) { - evt.stopPropagation(); - $scope.isOpen = false; - $element[0].focus(); - } - }; - - $scope.select = function(date, evt) { - evt.stopPropagation(); - - if (date === 'today') { - var today = new Date(); - if (angular.isDate($scope.date)) { - date = new Date($scope.date); - date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate()); - } else { - date = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone')); - date.setHours(0, 0, 0, 0); - } - } - $scope.dateSelection(date); - }; - - $scope.close = function(evt) { - evt.stopPropagation(); - - $scope.isOpen = false; - $element[0].focus(); - }; - - $scope.disabled = angular.isDefined($attrs.disabled) || false; - if ($attrs.ngDisabled) { - watchListeners.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(disabled) { - $scope.disabled = disabled; - })); - } - - $scope.$watch('isOpen', function(value) { - if (value) { - if (!$scope.disabled) { - $timeout(function() { - positionPopup(); - - if (onOpenFocus) { - $scope.$broadcast('uib:datepicker.focus'); - } - - $document.on('click', documentClickBind); - - var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement; - if (appendToBody || $position.parsePlacement(placement)[2]) { - scrollParentEl = scrollParentEl || angular.element($position.scrollParent($element)); - if (scrollParentEl) { - scrollParentEl.on('scroll', positionPopup); - } - } else { - scrollParentEl = null; - } - - angular.element($window).on('resize', positionPopup); - }, 0, false); - } else { - $scope.isOpen = false; - } - } else { - $document.off('click', documentClickBind); - if (scrollParentEl) { - scrollParentEl.off('scroll', positionPopup); - } - angular.element($window).off('resize', positionPopup); - } - }); - - function cameltoDash(string) { - return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); }); - } - - function parseDateString(viewValue) { - var date = dateParser.parse(viewValue, dateFormat, $scope.date); - if (isNaN(date)) { - for (var i = 0; i < altInputFormats.length; i++) { - date = dateParser.parse(viewValue, altInputFormats[i], $scope.date); - if (!isNaN(date)) { - return date; - } - } - } - return date; - } - - function parseDate(viewValue) { - if (angular.isNumber(viewValue)) { - // presumably timestamp to date object - viewValue = new Date(viewValue); - } - - if (!viewValue) { - return null; - } - - if (angular.isDate(viewValue) && !isNaN(viewValue)) { - return viewValue; - } - - if (angular.isString(viewValue)) { - var date = parseDateString(viewValue); - if (!isNaN(date)) { - return dateParser.toTimezone(date, ngModelOptions.getOption('timezone')); - } - } - - return ngModelOptions.getOption('allowInvalid') ? viewValue : undefined; - } - - function validator(modelValue, viewValue) { - var value = modelValue || viewValue; - - if (!$attrs.ngRequired && !value) { - return true; - } - - if (angular.isNumber(value)) { - value = new Date(value); - } - - if (!value) { - return true; - } - - if (angular.isDate(value) && !isNaN(value)) { - return true; - } - - if (angular.isString(value)) { - return !isNaN(parseDateString(value)); - } - - return false; - } - - function documentClickBind(event) { - if (!$scope.isOpen && $scope.disabled) { - return; - } - - var popup = $popup[0]; - var dpContainsTarget = $element[0].contains(event.target); - // The popup node may not be an element node - // In some browsers (IE) only element nodes have the 'contains' function - var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target); - if ($scope.isOpen && !(dpContainsTarget || popupContainsTarget)) { - $scope.$apply(function() { - $scope.isOpen = false; - }); - } - } - - function inputKeydownBind(evt) { - if (evt.which === 27 && $scope.isOpen) { - evt.preventDefault(); - evt.stopPropagation(); - $scope.$apply(function() { - $scope.isOpen = false; - }); - $element[0].focus(); - } else if (evt.which === 40 && !$scope.isOpen) { - evt.preventDefault(); - evt.stopPropagation(); - $scope.$apply(function() { - $scope.isOpen = true; - }); - } - } - - function positionPopup() { - if ($scope.isOpen) { - var dpElement = angular.element($popup[0].querySelector('.uib-datepicker-popup')); - var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement; - var position = $position.positionElements($element, dpElement, placement, appendToBody); - dpElement.css({top: position.top + 'px', left: position.left + 'px'}); - if (dpElement.hasClass('uib-position-measure')) { - dpElement.removeClass('uib-position-measure'); - } - } - } - - function extractOptions(ngModelCtrl) { - var ngModelOptions; - - if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing - // guarantee a value - ngModelOptions = angular.isObject(ngModelCtrl.$options) ? - ngModelCtrl.$options : - { - timezone: null - }; - - // mimic 1.6+ api - ngModelOptions.getOption = function (key) { - return ngModelOptions[key]; - }; - } else { // in angular >=1.6 $options is always present - ngModelOptions = ngModelCtrl.$options; - } - - return ngModelOptions; - } - - $scope.$on('uib:datepicker.mode', function() { - $timeout(positionPopup, 0, false); - }); -}]) - -.directive('uibDatepickerPopup', function() { - return { - require: ['ngModel', 'uibDatepickerPopup'], - controller: 'UibDatepickerPopupController', - scope: { - datepickerOptions: '=?', - isOpen: '=?', - currentText: '@', - clearText: '@', - closeText: '@' - }, - link: function(scope, element, attrs, ctrls) { - var ngModel = ctrls[0], - ctrl = ctrls[1]; - - ctrl.init(ngModel); - } - }; -}) - -.directive('uibDatepickerPopupWrap', function() { - return { - restrict: 'A', - transclude: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html'; - } - }; -}); - -angular.module('ui.bootstrap.debounce', []) -/** - * A helper, internal service that debounces a function - */ - .factory('$$debounce', ['$timeout', function($timeout) { - return function(callback, debounceTime) { - var timeoutPromise; - - return function() { - var self = this; - var args = Array.prototype.slice.call(arguments); - if (timeoutPromise) { - $timeout.cancel(timeoutPromise); - } - - timeoutPromise = $timeout(function() { - callback.apply(self, args); - }, debounceTime); - }; - }; - }]); - -angular.module('ui.bootstrap.multiMap', []) -/** - * A helper, internal data structure that stores all references attached to key - */ - .factory('$$multiMap', function() { - return { - createNew: function() { - var map = {}; - - return { - entries: function() { - return Object.keys(map).map(function(key) { - return { - key: key, - value: map[key] - }; - }); - }, - get: function(key) { - return map[key]; - }, - hasKey: function(key) { - return !!map[key]; - }, - keys: function() { - return Object.keys(map); - }, - put: function(key, value) { - if (!map[key]) { - map[key] = []; - } - - map[key].push(value); - }, - remove: function(key, value) { - var values = map[key]; - - if (!values) { - return; - } - - var idx = values.indexOf(value); - - if (idx !== -1) { - values.splice(idx, 1); - } - - if (!values.length) { - delete map[key]; - } - } - }; - } - }; - }); - -angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.position']) - -.constant('uibDropdownConfig', { - appendToOpenClass: 'uib-dropdown-open', - openClass: 'open' -}) - -.service('uibDropdownService', ['$document', '$rootScope', '$$multiMap', function($document, $rootScope, $$multiMap) { - var openScope = null; - var openedContainers = $$multiMap.createNew(); - - this.isOnlyOpen = function(dropdownScope, appendTo) { - var openedDropdowns = openedContainers.get(appendTo); - if (openedDropdowns) { - var openDropdown = openedDropdowns.reduce(function(toClose, dropdown) { - if (dropdown.scope === dropdownScope) { - return dropdown; - } - - return toClose; - }, {}); - if (openDropdown) { - return openedDropdowns.length === 1; - } - } - - return false; - }; - - this.open = function(dropdownScope, element, appendTo) { - if (!openScope) { - $document.on('click', closeDropdown); - } - - if (openScope && openScope !== dropdownScope) { - openScope.isOpen = false; - } - - openScope = dropdownScope; - - if (!appendTo) { - return; - } - - var openedDropdowns = openedContainers.get(appendTo); - if (openedDropdowns) { - var openedScopes = openedDropdowns.map(function(dropdown) { - return dropdown.scope; - }); - if (openedScopes.indexOf(dropdownScope) === -1) { - openedContainers.put(appendTo, { - scope: dropdownScope - }); - } - } else { - openedContainers.put(appendTo, { - scope: dropdownScope - }); - } - }; - - this.close = function(dropdownScope, element, appendTo) { - if (openScope === dropdownScope) { - $document.off('click', closeDropdown); - $document.off('keydown', this.keybindFilter); - openScope = null; - } - - if (!appendTo) { - return; - } - - var openedDropdowns = openedContainers.get(appendTo); - if (openedDropdowns) { - var dropdownToClose = openedDropdowns.reduce(function(toClose, dropdown) { - if (dropdown.scope === dropdownScope) { - return dropdown; - } - - return toClose; - }, {}); - if (dropdownToClose) { - openedContainers.remove(appendTo, dropdownToClose); - } - } - }; - - var closeDropdown = function(evt) { - // This method may still be called during the same mouse event that - // unbound this event handler. So check openScope before proceeding. - if (!openScope || !openScope.isOpen) { return; } - - if (evt && openScope.getAutoClose() === 'disabled') { return; } - - if (evt && evt.which === 3) { return; } - - var toggleElement = openScope.getToggleElement(); - if (evt && toggleElement && toggleElement[0].contains(evt.target)) { - return; - } - - var dropdownElement = openScope.getDropdownElement(); - if (evt && openScope.getAutoClose() === 'outsideClick' && - dropdownElement && dropdownElement[0].contains(evt.target)) { - return; - } - - openScope.focusToggleElement(); - openScope.isOpen = false; - - if (!$rootScope.$$phase) { - openScope.$apply(); - } - }; - - this.keybindFilter = function(evt) { - if (!openScope) { - // see this.close as ESC could have been pressed which kills the scope so we can not proceed - return; - } - - var dropdownElement = openScope.getDropdownElement(); - var toggleElement = openScope.getToggleElement(); - var dropdownElementTargeted = dropdownElement && dropdownElement[0].contains(evt.target); - var toggleElementTargeted = toggleElement && toggleElement[0].contains(evt.target); - if (evt.which === 27) { - evt.stopPropagation(); - openScope.focusToggleElement(); - closeDropdown(); - } else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen && (dropdownElementTargeted || toggleElementTargeted)) { - evt.preventDefault(); - evt.stopPropagation(); - openScope.focusDropdownEntry(evt.which); - } - }; -}]) - -.controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) { - var self = this, - scope = $scope.$new(), // create a child scope so we are not polluting original one - templateScope, - appendToOpenClass = dropdownConfig.appendToOpenClass, - openClass = dropdownConfig.openClass, - getIsOpen, - setIsOpen = angular.noop, - toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop, - keynavEnabled = false, - selectedOption = null, - body = $document.find('body'); - - $element.addClass('dropdown'); - - this.init = function() { - if ($attrs.isOpen) { - getIsOpen = $parse($attrs.isOpen); - setIsOpen = getIsOpen.assign; - - $scope.$watch(getIsOpen, function(value) { - scope.isOpen = !!value; - }); - } - - keynavEnabled = angular.isDefined($attrs.keyboardNav); - }; - - this.toggle = function(open) { - scope.isOpen = arguments.length ? !!open : !scope.isOpen; - if (angular.isFunction(setIsOpen)) { - setIsOpen(scope, scope.isOpen); - } - - return scope.isOpen; - }; - - // Allow other directives to watch status - this.isOpen = function() { - return scope.isOpen; - }; - - scope.getToggleElement = function() { - return self.toggleElement; - }; - - scope.getAutoClose = function() { - return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled' - }; - - scope.getElement = function() { - return $element; - }; - - scope.isKeynavEnabled = function() { - return keynavEnabled; - }; - - scope.focusDropdownEntry = function(keyCode) { - var elems = self.dropdownMenu ? //If append to body is used. - angular.element(self.dropdownMenu).find('a') : - $element.find('ul').eq(0).find('a'); - - switch (keyCode) { - case 40: { - if (!angular.isNumber(self.selectedOption)) { - self.selectedOption = 0; - } else { - self.selectedOption = self.selectedOption === elems.length - 1 ? - self.selectedOption : - self.selectedOption + 1; - } - break; - } - case 38: { - if (!angular.isNumber(self.selectedOption)) { - self.selectedOption = elems.length - 1; - } else { - self.selectedOption = self.selectedOption === 0 ? - 0 : self.selectedOption - 1; - } - break; - } - } - elems[self.selectedOption].focus(); - }; - - scope.getDropdownElement = function() { - return self.dropdownMenu; - }; - - scope.focusToggleElement = function() { - if (self.toggleElement) { - self.toggleElement[0].focus(); - } - }; - - function removeDropdownMenu() { - $element.append(self.dropdownMenu); - } - - scope.$watch('isOpen', function(isOpen, wasOpen) { - var appendTo = null, - appendToBody = false; - - if (angular.isDefined($attrs.dropdownAppendTo)) { - var appendToEl = $parse($attrs.dropdownAppendTo)(scope); - if (appendToEl) { - appendTo = angular.element(appendToEl); - } - } - - if (angular.isDefined($attrs.dropdownAppendToBody)) { - var appendToBodyValue = $parse($attrs.dropdownAppendToBody)(scope); - if (appendToBodyValue !== false) { - appendToBody = true; - } - } - - if (appendToBody && !appendTo) { - appendTo = body; - } - - if (appendTo && self.dropdownMenu) { - if (isOpen) { - appendTo.append(self.dropdownMenu); - $element.on('$destroy', removeDropdownMenu); - } else { - $element.off('$destroy', removeDropdownMenu); - removeDropdownMenu(); - } - } - - if (appendTo && self.dropdownMenu) { - var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true), - css, - rightalign, - scrollbarPadding, - scrollbarWidth = 0; - - css = { - top: pos.top + 'px', - display: isOpen ? 'block' : 'none' - }; - - rightalign = self.dropdownMenu.hasClass('dropdown-menu-right'); - if (!rightalign) { - css.left = pos.left + 'px'; - css.right = 'auto'; - } else { - css.left = 'auto'; - scrollbarPadding = $position.scrollbarPadding(appendTo); - - if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - scrollbarWidth = scrollbarPadding.scrollbarWidth; - } - - css.right = window.innerWidth - scrollbarWidth - - (pos.left + $element.prop('offsetWidth')) + 'px'; - } - - // Need to adjust our positioning to be relative to the appendTo container - // if it's not the body element - if (!appendToBody) { - var appendOffset = $position.offset(appendTo); - - css.top = pos.top - appendOffset.top + 'px'; - - if (!rightalign) { - css.left = pos.left - appendOffset.left + 'px'; - } else { - css.right = window.innerWidth - - (pos.left - appendOffset.left + $element.prop('offsetWidth')) + 'px'; - } - } - - self.dropdownMenu.css(css); - } - - var openContainer = appendTo ? appendTo : $element; - var dropdownOpenClass = appendTo ? appendToOpenClass : openClass; - var hasOpenClass = openContainer.hasClass(dropdownOpenClass); - var isOnlyOpen = uibDropdownService.isOnlyOpen($scope, appendTo); - - if (hasOpenClass === !isOpen) { - var toggleClass; - if (appendTo) { - toggleClass = !isOnlyOpen ? 'addClass' : 'removeClass'; - } else { - toggleClass = isOpen ? 'addClass' : 'removeClass'; - } - $animate[toggleClass](openContainer, dropdownOpenClass).then(function() { - if (angular.isDefined(isOpen) && isOpen !== wasOpen) { - toggleInvoker($scope, { open: !!isOpen }); - } - }); - } - - if (isOpen) { - if (self.dropdownMenuTemplateUrl) { - $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) { - templateScope = scope.$new(); - $compile(tplContent.trim())(templateScope, function(dropdownElement) { - var newEl = dropdownElement; - self.dropdownMenu.replaceWith(newEl); - self.dropdownMenu = newEl; - $document.on('keydown', uibDropdownService.keybindFilter); - }); - }); - } else { - $document.on('keydown', uibDropdownService.keybindFilter); - } - - scope.focusToggleElement(); - uibDropdownService.open(scope, $element, appendTo); - } else { - uibDropdownService.close(scope, $element, appendTo); - if (self.dropdownMenuTemplateUrl) { - if (templateScope) { - templateScope.$destroy(); - } - var newEl = angular.element(''); - self.dropdownMenu.replaceWith(newEl); - self.dropdownMenu = newEl; - } - - self.selectedOption = null; - } - - if (angular.isFunction(setIsOpen)) { - setIsOpen($scope, isOpen); - } - }); -}]) - -.directive('uibDropdown', function() { - return { - controller: 'UibDropdownController', - link: function(scope, element, attrs, dropdownCtrl) { - dropdownCtrl.init(); - } - }; -}) - -.directive('uibDropdownMenu', function() { - return { - restrict: 'A', - require: '?^uibDropdown', - link: function(scope, element, attrs, dropdownCtrl) { - if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) { - return; - } - - element.addClass('dropdown-menu'); - - var tplUrl = attrs.templateUrl; - if (tplUrl) { - dropdownCtrl.dropdownMenuTemplateUrl = tplUrl; - } - - if (!dropdownCtrl.dropdownMenu) { - dropdownCtrl.dropdownMenu = element; - } - } - }; -}) - -.directive('uibDropdownToggle', function() { - return { - require: '?^uibDropdown', - link: function(scope, element, attrs, dropdownCtrl) { - if (!dropdownCtrl) { - return; - } - - element.addClass('dropdown-toggle'); - - dropdownCtrl.toggleElement = element; - - var toggleDropdown = function(event) { - event.preventDefault(); - - if (!element.hasClass('disabled') && !attrs.disabled) { - scope.$apply(function() { - dropdownCtrl.toggle(); - }); - } - }; - - element.on('click', toggleDropdown); - - // WAI-ARIA - element.attr({ 'aria-haspopup': true, 'aria-expanded': false }); - scope.$watch(dropdownCtrl.isOpen, function(isOpen) { - element.attr('aria-expanded', !!isOpen); - }); - - scope.$on('$destroy', function() { - element.off('click', toggleDropdown); - }); - } - }; -}); - -angular.module('ui.bootstrap.stackedMap', []) -/** - * A helper, internal data structure that acts as a map but also allows getting / removing - * elements in the LIFO order - */ - .factory('$$stackedMap', function() { - return { - createNew: function() { - var stack = []; - - return { - add: function(key, value) { - stack.push({ - key: key, - value: value - }); - }, - get: function(key) { - for (var i = 0; i < stack.length; i++) { - if (key === stack[i].key) { - return stack[i]; - } - } - }, - keys: function() { - var keys = []; - for (var i = 0; i < stack.length; i++) { - keys.push(stack[i].key); - } - return keys; - }, - top: function() { - return stack[stack.length - 1]; - }, - remove: function(key) { - var idx = -1; - for (var i = 0; i < stack.length; i++) { - if (key === stack[i].key) { - idx = i; - break; - } - } - return stack.splice(idx, 1)[0]; - }, - removeTop: function() { - return stack.pop(); - }, - length: function() { - return stack.length; - } - }; - } - }; - }); -angular.module('ui.bootstrap.modal', ['ui.bootstrap.multiMap', 'ui.bootstrap.stackedMap', 'ui.bootstrap.position']) -/** - * Pluggable resolve mechanism for the modal resolve resolution - * Supports UI Router's $resolve service - */ - .provider('$uibResolve', function() { - var resolve = this; - this.resolver = null; - - this.setResolver = function(resolver) { - this.resolver = resolver; - }; - - this.$get = ['$injector', '$q', function($injector, $q) { - var resolver = resolve.resolver ? $injector.get(resolve.resolver) : null; - return { - resolve: function(invocables, locals, parent, self) { - if (resolver) { - return resolver.resolve(invocables, locals, parent, self); - } - - var promises = []; - - angular.forEach(invocables, function(value) { - if (angular.isFunction(value) || angular.isArray(value)) { - promises.push($q.resolve($injector.invoke(value))); - } else if (angular.isString(value)) { - promises.push($q.resolve($injector.get(value))); - } else { - promises.push($q.resolve(value)); - } - }); - - return $q.all(promises).then(function(resolves) { - var resolveObj = {}; - var resolveIter = 0; - angular.forEach(invocables, function(value, key) { - resolveObj[key] = resolves[resolveIter++]; - }); - - return resolveObj; - }); - } - }; - }]; - }) - -/** - * A helper directive for the $modal service. It creates a backdrop element. - */ - .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack', - function($animate, $injector, $modalStack) { - return { - restrict: 'A', - compile: function(tElement, tAttrs) { - tElement.addClass(tAttrs.backdropClass); - return linkFn; - } - }; - - function linkFn(scope, element, attrs) { - if (attrs.modalInClass) { - $animate.addClass(element, attrs.modalInClass); - - scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) { - var done = setIsAsync(); - if (scope.modalOptions.animation) { - $animate.removeClass(element, attrs.modalInClass).then(done); - } else { - done(); - } - }); - } - } - }]) - - .directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document', - function($modalStack, $q, $animateCss, $document) { - return { - scope: { - index: '@' - }, - restrict: 'A', - transclude: true, - templateUrl: function(tElement, tAttrs) { - return tAttrs.templateUrl || 'uib/template/modal/window.html'; - }, - link: function(scope, element, attrs) { - element.addClass(attrs.windowTopClass || ''); - scope.size = attrs.size; - - scope.close = function(evt) { - var modal = $modalStack.getTop(); - if (modal && modal.value.backdrop && - modal.value.backdrop !== 'static' && - evt.target === evt.currentTarget) { - evt.preventDefault(); - evt.stopPropagation(); - $modalStack.dismiss(modal.key, 'backdrop click'); - } - }; - - // moved from template to fix issue #2280 - element.on('click', scope.close); - - // This property is only added to the scope for the purpose of detecting when this directive is rendered. - // We can detect that by using this property in the template associated with this directive and then use - // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}. - scope.$isRendered = true; - - // Deferred object that will be resolved when this modal is rendered. - var modalRenderDeferObj = $q.defer(); - // Resolve render promise post-digest - scope.$$postDigest(function() { - modalRenderDeferObj.resolve(); - }); - - modalRenderDeferObj.promise.then(function() { - var animationPromise = null; - - if (attrs.modalInClass) { - animationPromise = $animateCss(element, { - addClass: attrs.modalInClass - }).start(); - - scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) { - var done = setIsAsync(); - $animateCss(element, { - removeClass: attrs.modalInClass - }).start().then(done); - }); - } - - - $q.when(animationPromise).then(function() { - // Notify {@link $modalStack} that modal is rendered. - var modal = $modalStack.getTop(); - if (modal) { - $modalStack.modalRendered(modal.key); - } - - /** - * If something within the freshly-opened modal already has focus (perhaps via a - * directive that causes focus) then there's no need to try to focus anything. - */ - if (!($document[0].activeElement && element[0].contains($document[0].activeElement))) { - var inputWithAutofocus = element[0].querySelector('[autofocus]'); - /** - * Auto-focusing of a freshly-opened modal element causes any child elements - * with the autofocus attribute to lose focus. This is an issue on touch - * based devices which will show and then hide the onscreen keyboard. - * Attempts to refocus the autofocus element via JavaScript will not reopen - * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus - * the modal element if the modal does not contain an autofocus element. - */ - if (inputWithAutofocus) { - inputWithAutofocus.focus(); - } else { - element[0].focus(); - } - } - }); - }); - } - }; - }]) - - .directive('uibModalAnimationClass', function() { - return { - compile: function(tElement, tAttrs) { - if (tAttrs.modalAnimation) { - tElement.addClass(tAttrs.uibModalAnimationClass); - } - } - }; - }) - - .directive('uibModalTransclude', ['$animate', function($animate) { - return { - link: function(scope, element, attrs, controller, transclude) { - transclude(scope.$parent, function(clone) { - element.empty(); - $animate.enter(clone, element); - }); - } - }; - }]) - - .factory('$uibModalStack', ['$animate', '$animateCss', '$document', - '$compile', '$rootScope', '$q', '$$multiMap', '$$stackedMap', '$uibPosition', - function($animate, $animateCss, $document, $compile, $rootScope, $q, $$multiMap, $$stackedMap, $uibPosition) { - var OPENED_MODAL_CLASS = 'modal-open'; - - var backdropDomEl, backdropScope; - var openedWindows = $$stackedMap.createNew(); - var openedClasses = $$multiMap.createNew(); - var $modalStack = { - NOW_CLOSING_EVENT: 'modal.stack.now-closing' - }; - var topModalIndex = 0; - var previousTopOpenedModal = null; - var ARIA_HIDDEN_ATTRIBUTE_NAME = 'data-bootstrap-modal-aria-hidden-count'; - - //Modal focus behavior - var tabbableSelector = 'a[href], area[href], input:not([disabled]):not([tabindex=\'-1\']), ' + - 'button:not([disabled]):not([tabindex=\'-1\']),select:not([disabled]):not([tabindex=\'-1\']), textarea:not([disabled]):not([tabindex=\'-1\']), ' + - 'iframe, object, embed, *[tabindex]:not([tabindex=\'-1\']), *[contenteditable=true]'; - var scrollbarPadding; - var SNAKE_CASE_REGEXP = /[A-Z]/g; - - // TODO: extract into common dependency with tooltip - function snake_case(name) { - var separator = '-'; - return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) { - return (pos ? separator : '') + letter.toLowerCase(); - }); - } - - function isVisible(element) { - return !!(element.offsetWidth || - element.offsetHeight || - element.getClientRects().length); - } - - function backdropIndex() { - var topBackdropIndex = -1; - var opened = openedWindows.keys(); - for (var i = 0; i < opened.length; i++) { - if (openedWindows.get(opened[i]).value.backdrop) { - topBackdropIndex = i; - } - } - - // If any backdrop exist, ensure that it's index is always - // right below the top modal - if (topBackdropIndex > -1 && topBackdropIndex < topModalIndex) { - topBackdropIndex = topModalIndex; - } - return topBackdropIndex; - } - - $rootScope.$watch(backdropIndex, function(newBackdropIndex) { - if (backdropScope) { - backdropScope.index = newBackdropIndex; - } - }); - - function removeModalWindow(modalInstance, elementToReceiveFocus) { - var modalWindow = openedWindows.get(modalInstance).value; - var appendToElement = modalWindow.appendTo; - - //clean up the stack - openedWindows.remove(modalInstance); - previousTopOpenedModal = openedWindows.top(); - if (previousTopOpenedModal) { - topModalIndex = parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10); - } - - removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() { - var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS; - openedClasses.remove(modalBodyClass, modalInstance); - var areAnyOpen = openedClasses.hasKey(modalBodyClass); - appendToElement.toggleClass(modalBodyClass, areAnyOpen); - if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - if (scrollbarPadding.originalRight) { - appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'}); - } else { - appendToElement.css({paddingRight: ''}); - } - scrollbarPadding = null; - } - toggleTopWindowClass(true); - }, modalWindow.closedDeferred); - checkRemoveBackdrop(); - - //move focus to specified element if available, or else to body - if (elementToReceiveFocus && elementToReceiveFocus.focus) { - elementToReceiveFocus.focus(); - } else if (appendToElement.focus) { - appendToElement.focus(); - } - } - - // Add or remove "windowTopClass" from the top window in the stack - function toggleTopWindowClass(toggleSwitch) { - var modalWindow; - - if (openedWindows.length() > 0) { - modalWindow = openedWindows.top().value; - modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch); - } - } - - function checkRemoveBackdrop() { - //remove backdrop if no longer needed - if (backdropDomEl && backdropIndex() === -1) { - var backdropScopeRef = backdropScope; - removeAfterAnimate(backdropDomEl, backdropScope, function() { - backdropScopeRef = null; - }); - backdropDomEl = undefined; - backdropScope = undefined; - } - } - - function removeAfterAnimate(domEl, scope, done, closedDeferred) { - var asyncDeferred; - var asyncPromise = null; - var setIsAsync = function() { - if (!asyncDeferred) { - asyncDeferred = $q.defer(); - asyncPromise = asyncDeferred.promise; - } - - return function asyncDone() { - asyncDeferred.resolve(); - }; - }; - scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync); - - // Note that it's intentional that asyncPromise might be null. - // That's when setIsAsync has not been called during the - // NOW_CLOSING_EVENT broadcast. - return $q.when(asyncPromise).then(afterAnimating); - - function afterAnimating() { - if (afterAnimating.done) { - return; - } - afterAnimating.done = true; - - $animate.leave(domEl).then(function() { - if (done) { - done(); - } - - domEl.remove(); - if (closedDeferred) { - closedDeferred.resolve(); - } - }); - - scope.$destroy(); - } - } - - $document.on('keydown', keydownListener); - - $rootScope.$on('$destroy', function() { - $document.off('keydown', keydownListener); - }); - - function keydownListener(evt) { - if (evt.isDefaultPrevented()) { - return evt; - } - - var modal = openedWindows.top(); - if (modal) { - switch (evt.which) { - case 27: { - if (modal.value.keyboard) { - evt.preventDefault(); - $rootScope.$apply(function() { - $modalStack.dismiss(modal.key, 'escape key press'); - }); - } - break; - } - case 9: { - var list = $modalStack.loadFocusElementList(modal); - var focusChanged = false; - if (evt.shiftKey) { - if ($modalStack.isFocusInFirstItem(evt, list) || $modalStack.isModalFocused(evt, modal)) { - focusChanged = $modalStack.focusLastFocusableElement(list); - } - } else { - if ($modalStack.isFocusInLastItem(evt, list)) { - focusChanged = $modalStack.focusFirstFocusableElement(list); - } - } - - if (focusChanged) { - evt.preventDefault(); - evt.stopPropagation(); - } - - break; - } - } - } - } - - $modalStack.open = function(modalInstance, modal) { - var modalOpener = $document[0].activeElement, - modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS; - - toggleTopWindowClass(false); - - // Store the current top first, to determine what index we ought to use - // for the current top modal - previousTopOpenedModal = openedWindows.top(); - - openedWindows.add(modalInstance, { - deferred: modal.deferred, - renderDeferred: modal.renderDeferred, - closedDeferred: modal.closedDeferred, - modalScope: modal.scope, - backdrop: modal.backdrop, - keyboard: modal.keyboard, - openedClass: modal.openedClass, - windowTopClass: modal.windowTopClass, - animation: modal.animation, - appendTo: modal.appendTo - }); - - openedClasses.put(modalBodyClass, modalInstance); - - var appendToElement = modal.appendTo, - currBackdropIndex = backdropIndex(); - - if (currBackdropIndex >= 0 && !backdropDomEl) { - backdropScope = $rootScope.$new(true); - backdropScope.modalOptions = modal; - backdropScope.index = currBackdropIndex; - backdropDomEl = angular.element('
'); - backdropDomEl.attr({ - 'class': 'modal-backdrop', - 'ng-style': '{\'z-index\': 1040 + (index && 1 || 0) + index*10}', - 'uib-modal-animation-class': 'fade', - 'modal-in-class': 'in' - }); - if (modal.backdropClass) { - backdropDomEl.addClass(modal.backdropClass); - } - - if (modal.animation) { - backdropDomEl.attr('modal-animation', 'true'); - } - $compile(backdropDomEl)(backdropScope); - $animate.enter(backdropDomEl, appendToElement); - if ($uibPosition.isScrollable(appendToElement)) { - scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement); - if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - appendToElement.css({paddingRight: scrollbarPadding.right + 'px'}); - } - } - } - - var content; - if (modal.component) { - content = document.createElement(snake_case(modal.component.name)); - content = angular.element(content); - content.attr({ - resolve: '$resolve', - 'modal-instance': '$uibModalInstance', - close: '$close($value)', - dismiss: '$dismiss($value)' - }); - } else { - content = modal.content; - } - - // Set the top modal index based on the index of the previous top modal - topModalIndex = previousTopOpenedModal ? parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10) + 1 : 0; - var angularDomEl = angular.element('
'); - angularDomEl.attr({ - 'class': 'modal', - 'template-url': modal.windowTemplateUrl, - 'window-top-class': modal.windowTopClass, - 'role': 'dialog', - 'aria-labelledby': modal.ariaLabelledBy, - 'aria-describedby': modal.ariaDescribedBy, - 'size': modal.size, - 'index': topModalIndex, - 'animate': 'animate', - 'ng-style': '{\'z-index\': 1050 + $$topModalIndex*10, display: \'block\'}', - 'tabindex': -1, - 'uib-modal-animation-class': 'fade', - 'modal-in-class': 'in' - }).append(content); - if (modal.windowClass) { - angularDomEl.addClass(modal.windowClass); - } - - if (modal.animation) { - angularDomEl.attr('modal-animation', 'true'); - } - - appendToElement.addClass(modalBodyClass); - if (modal.scope) { - // we need to explicitly add the modal index to the modal scope - // because it is needed by ngStyle to compute the zIndex property. - modal.scope.$$topModalIndex = topModalIndex; - } - $animate.enter($compile(angularDomEl)(modal.scope), appendToElement); - - openedWindows.top().value.modalDomEl = angularDomEl; - openedWindows.top().value.modalOpener = modalOpener; - - applyAriaHidden(angularDomEl); - - function applyAriaHidden(el) { - if (!el || el[0].tagName === 'BODY') { - return; - } - - getSiblings(el).forEach(function(sibling) { - var elemIsAlreadyHidden = sibling.getAttribute('aria-hidden') === 'true', - ariaHiddenCount = parseInt(sibling.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10); - - if (!ariaHiddenCount) { - ariaHiddenCount = elemIsAlreadyHidden ? 1 : 0; - } - - sibling.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, ariaHiddenCount + 1); - sibling.setAttribute('aria-hidden', 'true'); - }); - - return applyAriaHidden(el.parent()); - - function getSiblings(el) { - var children = el.parent() ? el.parent().children() : []; - - return Array.prototype.filter.call(children, function(child) { - return child !== el[0]; - }); - } - } - }; - - function broadcastClosing(modalWindow, resultOrReason, closing) { - return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented; - } - - function unhideBackgroundElements() { - Array.prototype.forEach.call( - document.querySelectorAll('[' + ARIA_HIDDEN_ATTRIBUTE_NAME + ']'), - function(hiddenEl) { - var ariaHiddenCount = parseInt(hiddenEl.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10), - newHiddenCount = ariaHiddenCount - 1; - hiddenEl.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, newHiddenCount); - - if (!newHiddenCount) { - hiddenEl.removeAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME); - hiddenEl.removeAttribute('aria-hidden'); - } - } - ); - } - - $modalStack.close = function(modalInstance, result) { - var modalWindow = openedWindows.get(modalInstance); - unhideBackgroundElements(); - if (modalWindow && broadcastClosing(modalWindow, result, true)) { - modalWindow.value.modalScope.$$uibDestructionScheduled = true; - modalWindow.value.deferred.resolve(result); - removeModalWindow(modalInstance, modalWindow.value.modalOpener); - return true; - } - - return !modalWindow; - }; - - $modalStack.dismiss = function(modalInstance, reason) { - var modalWindow = openedWindows.get(modalInstance); - unhideBackgroundElements(); - if (modalWindow && broadcastClosing(modalWindow, reason, false)) { - modalWindow.value.modalScope.$$uibDestructionScheduled = true; - modalWindow.value.deferred.reject(reason); - removeModalWindow(modalInstance, modalWindow.value.modalOpener); - return true; - } - return !modalWindow; - }; - - $modalStack.dismissAll = function(reason) { - var topModal = this.getTop(); - while (topModal && this.dismiss(topModal.key, reason)) { - topModal = this.getTop(); - } - }; - - $modalStack.getTop = function() { - return openedWindows.top(); - }; - - $modalStack.modalRendered = function(modalInstance) { - var modalWindow = openedWindows.get(modalInstance); - if (modalWindow) { - modalWindow.value.renderDeferred.resolve(); - } - }; - - $modalStack.focusFirstFocusableElement = function(list) { - if (list.length > 0) { - list[0].focus(); - return true; - } - return false; - }; - - $modalStack.focusLastFocusableElement = function(list) { - if (list.length > 0) { - list[list.length - 1].focus(); - return true; - } - return false; - }; - - $modalStack.isModalFocused = function(evt, modalWindow) { - if (evt && modalWindow) { - var modalDomEl = modalWindow.value.modalDomEl; - if (modalDomEl && modalDomEl.length) { - return (evt.target || evt.srcElement) === modalDomEl[0]; - } - } - return false; - }; - - $modalStack.isFocusInFirstItem = function(evt, list) { - if (list.length > 0) { - return (evt.target || evt.srcElement) === list[0]; - } - return false; - }; - - $modalStack.isFocusInLastItem = function(evt, list) { - if (list.length > 0) { - return (evt.target || evt.srcElement) === list[list.length - 1]; - } - return false; - }; - - $modalStack.loadFocusElementList = function(modalWindow) { - if (modalWindow) { - var modalDomE1 = modalWindow.value.modalDomEl; - if (modalDomE1 && modalDomE1.length) { - var elements = modalDomE1[0].querySelectorAll(tabbableSelector); - return elements ? - Array.prototype.filter.call(elements, function(element) { - return isVisible(element); - }) : elements; - } - } - }; - - return $modalStack; - }]) - - .provider('$uibModal', function() { - var $modalProvider = { - options: { - animation: true, - backdrop: true, //can also be false or 'static' - keyboard: true - }, - $get: ['$rootScope', '$q', '$document', '$templateRequest', '$controller', '$uibResolve', '$uibModalStack', - function ($rootScope, $q, $document, $templateRequest, $controller, $uibResolve, $modalStack) { - var $modal = {}; - - function getTemplatePromise(options) { - return options.template ? $q.when(options.template) : - $templateRequest(angular.isFunction(options.templateUrl) ? - options.templateUrl() : options.templateUrl); - } - - var promiseChain = null; - $modal.getPromiseChain = function() { - return promiseChain; - }; - - $modal.open = function(modalOptions) { - var modalResultDeferred = $q.defer(); - var modalOpenedDeferred = $q.defer(); - var modalClosedDeferred = $q.defer(); - var modalRenderDeferred = $q.defer(); - - //prepare an instance of a modal to be injected into controllers and returned to a caller - var modalInstance = { - result: modalResultDeferred.promise, - opened: modalOpenedDeferred.promise, - closed: modalClosedDeferred.promise, - rendered: modalRenderDeferred.promise, - close: function (result) { - return $modalStack.close(modalInstance, result); - }, - dismiss: function (reason) { - return $modalStack.dismiss(modalInstance, reason); - } - }; - - //merge and clean up options - modalOptions = angular.extend({}, $modalProvider.options, modalOptions); - modalOptions.resolve = modalOptions.resolve || {}; - modalOptions.appendTo = modalOptions.appendTo || $document.find('body').eq(0); - - if (!modalOptions.appendTo.length) { - throw new Error('appendTo element not found. Make sure that the element passed is in DOM.'); - } - - //verify options - if (!modalOptions.component && !modalOptions.template && !modalOptions.templateUrl) { - throw new Error('One of component or template or templateUrl options is required.'); - } - - var templateAndResolvePromise; - if (modalOptions.component) { - templateAndResolvePromise = $q.when($uibResolve.resolve(modalOptions.resolve, {}, null, null)); - } else { - templateAndResolvePromise = - $q.all([getTemplatePromise(modalOptions), $uibResolve.resolve(modalOptions.resolve, {}, null, null)]); - } - - function resolveWithTemplate() { - return templateAndResolvePromise; - } - - // Wait for the resolution of the existing promise chain. - // Then switch to our own combined promise dependency (regardless of how the previous modal fared). - // Then add to $modalStack and resolve opened. - // Finally clean up the chain variable if no subsequent modal has overwritten it. - var samePromise; - samePromise = promiseChain = $q.all([promiseChain]) - .then(resolveWithTemplate, resolveWithTemplate) - .then(function resolveSuccess(tplAndVars) { - var providedScope = modalOptions.scope || $rootScope; - - var modalScope = providedScope.$new(); - modalScope.$close = modalInstance.close; - modalScope.$dismiss = modalInstance.dismiss; - - modalScope.$on('$destroy', function() { - if (!modalScope.$$uibDestructionScheduled) { - modalScope.$dismiss('$uibUnscheduledDestruction'); - } - }); - - var modal = { - scope: modalScope, - deferred: modalResultDeferred, - renderDeferred: modalRenderDeferred, - closedDeferred: modalClosedDeferred, - animation: modalOptions.animation, - backdrop: modalOptions.backdrop, - keyboard: modalOptions.keyboard, - backdropClass: modalOptions.backdropClass, - windowTopClass: modalOptions.windowTopClass, - windowClass: modalOptions.windowClass, - windowTemplateUrl: modalOptions.windowTemplateUrl, - ariaLabelledBy: modalOptions.ariaLabelledBy, - ariaDescribedBy: modalOptions.ariaDescribedBy, - size: modalOptions.size, - openedClass: modalOptions.openedClass, - appendTo: modalOptions.appendTo - }; - - var component = {}; - var ctrlInstance, ctrlInstantiate, ctrlLocals = {}; - - if (modalOptions.component) { - constructLocals(component, false, true, false); - component.name = modalOptions.component; - modal.component = component; - } else if (modalOptions.controller) { - constructLocals(ctrlLocals, true, false, true); - - // the third param will make the controller instantiate later,private api - // @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126 - ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs); - if (modalOptions.controllerAs && modalOptions.bindToController) { - ctrlInstance = ctrlInstantiate.instance; - ctrlInstance.$close = modalScope.$close; - ctrlInstance.$dismiss = modalScope.$dismiss; - angular.extend(ctrlInstance, { - $resolve: ctrlLocals.$scope.$resolve - }, providedScope); - } - - ctrlInstance = ctrlInstantiate(); - - if (angular.isFunction(ctrlInstance.$onInit)) { - ctrlInstance.$onInit(); - } - } - - if (!modalOptions.component) { - modal.content = tplAndVars[0]; - } - - $modalStack.open(modalInstance, modal); - modalOpenedDeferred.resolve(true); - - function constructLocals(obj, template, instanceOnScope, injectable) { - obj.$scope = modalScope; - obj.$scope.$resolve = {}; - if (instanceOnScope) { - obj.$scope.$uibModalInstance = modalInstance; - } else { - obj.$uibModalInstance = modalInstance; - } - - var resolves = template ? tplAndVars[1] : tplAndVars; - angular.forEach(resolves, function(value, key) { - if (injectable) { - obj[key] = value; - } - - obj.$scope.$resolve[key] = value; - }); - } - }, function resolveError(reason) { - modalOpenedDeferred.reject(reason); - modalResultDeferred.reject(reason); - })['finally'](function() { - if (promiseChain === samePromise) { - promiseChain = null; - } - }); - - return modalInstance; - }; - - return $modal; - } - ] - }; - - return $modalProvider; - }); - -angular.module('ui.bootstrap.paging', []) -/** - * Helper internal service for generating common controller code between the - * pager and pagination components - */ -.factory('uibPaging', ['$parse', function($parse) { - return { - create: function(ctrl, $scope, $attrs) { - ctrl.setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop; - ctrl.ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl - ctrl._watchers = []; - - ctrl.init = function(ngModelCtrl, config) { - ctrl.ngModelCtrl = ngModelCtrl; - ctrl.config = config; - - ngModelCtrl.$render = function() { - ctrl.render(); - }; - - if ($attrs.itemsPerPage) { - ctrl._watchers.push($scope.$parent.$watch($attrs.itemsPerPage, function(value) { - ctrl.itemsPerPage = parseInt(value, 10); - $scope.totalPages = ctrl.calculateTotalPages(); - ctrl.updatePage(); - })); - } else { - ctrl.itemsPerPage = config.itemsPerPage; - } - - $scope.$watch('totalItems', function(newTotal, oldTotal) { - if (angular.isDefined(newTotal) || newTotal !== oldTotal) { - $scope.totalPages = ctrl.calculateTotalPages(); - ctrl.updatePage(); - } - }); - }; - - ctrl.calculateTotalPages = function() { - var totalPages = ctrl.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / ctrl.itemsPerPage); - return Math.max(totalPages || 0, 1); - }; - - ctrl.render = function() { - $scope.page = parseInt(ctrl.ngModelCtrl.$viewValue, 10) || 1; - }; - - $scope.selectPage = function(page, evt) { - if (evt) { - evt.preventDefault(); - } - - var clickAllowed = !$scope.ngDisabled || !evt; - if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) { - if (evt && evt.target) { - evt.target.blur(); - } - ctrl.ngModelCtrl.$setViewValue(page); - ctrl.ngModelCtrl.$render(); - } - }; - - $scope.getText = function(key) { - return $scope[key + 'Text'] || ctrl.config[key + 'Text']; - }; - - $scope.noPrevious = function() { - return $scope.page === 1; - }; - - $scope.noNext = function() { - return $scope.page === $scope.totalPages; - }; - - ctrl.updatePage = function() { - ctrl.setNumPages($scope.$parent, $scope.totalPages); // Readonly variable - - if ($scope.page > $scope.totalPages) { - $scope.selectPage($scope.totalPages); - } else { - ctrl.ngModelCtrl.$render(); - } - }; - - $scope.$on('$destroy', function() { - while (ctrl._watchers.length) { - ctrl._watchers.shift()(); - } - }); - } - }; -}]); - -angular.module('ui.bootstrap.pager', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex']) - -.controller('UibPagerController', ['$scope', '$attrs', 'uibPaging', 'uibPagerConfig', function($scope, $attrs, uibPaging, uibPagerConfig) { - $scope.align = angular.isDefined($attrs.align) ? $scope.$parent.$eval($attrs.align) : uibPagerConfig.align; - - uibPaging.create(this, $scope, $attrs); -}]) - -.constant('uibPagerConfig', { - itemsPerPage: 10, - previousText: '« Previous', - nextText: 'Next »', - align: true -}) - -.directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) { - return { - scope: { - totalItems: '=', - previousText: '@', - nextText: '@', - ngDisabled: '=' - }, - require: ['uibPager', '?ngModel'], - restrict: 'A', - controller: 'UibPagerController', - controllerAs: 'pager', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/pager/pager.html'; - }, - link: function(scope, element, attrs, ctrls) { - element.addClass('pager'); - var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - if (!ngModelCtrl) { - return; // do nothing if no ng-model - } - - paginationCtrl.init(ngModelCtrl, uibPagerConfig); - } - }; -}]); - -angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex']) -.controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) { - var ctrl = this; - // Setup configuration parameters - var maxSize = angular.isDefined($attrs.maxSize) ? $scope.$parent.$eval($attrs.maxSize) : uibPaginationConfig.maxSize, - rotate = angular.isDefined($attrs.rotate) ? $scope.$parent.$eval($attrs.rotate) : uibPaginationConfig.rotate, - forceEllipses = angular.isDefined($attrs.forceEllipses) ? $scope.$parent.$eval($attrs.forceEllipses) : uibPaginationConfig.forceEllipses, - boundaryLinkNumbers = angular.isDefined($attrs.boundaryLinkNumbers) ? $scope.$parent.$eval($attrs.boundaryLinkNumbers) : uibPaginationConfig.boundaryLinkNumbers, - pageLabel = angular.isDefined($attrs.pageLabel) ? function(idx) { return $scope.$parent.$eval($attrs.pageLabel, {$page: idx}); } : angular.identity; - $scope.boundaryLinks = angular.isDefined($attrs.boundaryLinks) ? $scope.$parent.$eval($attrs.boundaryLinks) : uibPaginationConfig.boundaryLinks; - $scope.directionLinks = angular.isDefined($attrs.directionLinks) ? $scope.$parent.$eval($attrs.directionLinks) : uibPaginationConfig.directionLinks; - $attrs.$set('role', 'menu'); - - uibPaging.create(this, $scope, $attrs); - - if ($attrs.maxSize) { - ctrl._watchers.push($scope.$parent.$watch($parse($attrs.maxSize), function(value) { - maxSize = parseInt(value, 10); - ctrl.render(); - })); - } - - // Create page object used in template - function makePage(number, text, isActive) { - return { - number: number, - text: text, - active: isActive - }; - } - - function getPages(currentPage, totalPages) { - var pages = []; - - // Default page limits - var startPage = 1, endPage = totalPages; - var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages; - - // recompute if maxSize - if (isMaxSized) { - if (rotate) { - // Current page is displayed in the middle of the visible ones - startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1); - endPage = startPage + maxSize - 1; - - // Adjust if limit is exceeded - if (endPage > totalPages) { - endPage = totalPages; - startPage = endPage - maxSize + 1; - } - } else { - // Visible pages are paginated with maxSize - startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1; - - // Adjust last page if limit is exceeded - endPage = Math.min(startPage + maxSize - 1, totalPages); - } - } - - // Add page number links - for (var number = startPage; number <= endPage; number++) { - var page = makePage(number, pageLabel(number), number === currentPage); - pages.push(page); - } - - // Add links to move between page sets - if (isMaxSized && maxSize > 0 && (!rotate || forceEllipses || boundaryLinkNumbers)) { - if (startPage > 1) { - if (!boundaryLinkNumbers || startPage > 3) { //need ellipsis for all options unless range is too close to beginning - var previousPageSet = makePage(startPage - 1, '...', false); - pages.unshift(previousPageSet); - } - if (boundaryLinkNumbers) { - if (startPage === 3) { //need to replace ellipsis when the buttons would be sequential - var secondPageLink = makePage(2, '2', false); - pages.unshift(secondPageLink); - } - //add the first page - var firstPageLink = makePage(1, '1', false); - pages.unshift(firstPageLink); - } - } - - if (endPage < totalPages) { - if (!boundaryLinkNumbers || endPage < totalPages - 2) { //need ellipsis for all options unless range is too close to end - var nextPageSet = makePage(endPage + 1, '...', false); - pages.push(nextPageSet); - } - if (boundaryLinkNumbers) { - if (endPage === totalPages - 2) { //need to replace ellipsis when the buttons would be sequential - var secondToLastPageLink = makePage(totalPages - 1, totalPages - 1, false); - pages.push(secondToLastPageLink); - } - //add the last page - var lastPageLink = makePage(totalPages, totalPages, false); - pages.push(lastPageLink); - } - } - } - return pages; - } - - var originalRender = this.render; - this.render = function() { - originalRender(); - if ($scope.page > 0 && $scope.page <= $scope.totalPages) { - $scope.pages = getPages($scope.page, $scope.totalPages); - } - }; -}]) - -.constant('uibPaginationConfig', { - itemsPerPage: 10, - boundaryLinks: false, - boundaryLinkNumbers: false, - directionLinks: true, - firstText: 'First', - previousText: 'Previous', - nextText: 'Next', - lastText: 'Last', - rotate: true, - forceEllipses: false -}) - -.directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, uibPaginationConfig) { - return { - scope: { - totalItems: '=', - firstText: '@', - previousText: '@', - nextText: '@', - lastText: '@', - ngDisabled:'=' - }, - require: ['uibPagination', '?ngModel'], - restrict: 'A', - controller: 'UibPaginationController', - controllerAs: 'pagination', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/pagination/pagination.html'; - }, - link: function(scope, element, attrs, ctrls) { - element.addClass('pagination'); - var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - if (!ngModelCtrl) { - return; // do nothing if no ng-model - } - - paginationCtrl.init(ngModelCtrl, uibPaginationConfig); - } - }; -}]); - -/** - * The following features are still outstanding: animation as a - * function, placement as a function, inside, support for more triggers than - * just mouse enter/leave, html tooltips, and selector delegation. - */ -angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap']) - -/** - * The $tooltip service creates tooltip- and popover-like directives as well as - * houses global options for them. - */ -.provider('$uibTooltip', function() { - // The default options tooltip and popover. - var defaultOptions = { - placement: 'top', - placementClassPrefix: '', - animation: true, - popupDelay: 0, - popupCloseDelay: 0, - useContentExp: false - }; - - // Default hide triggers for each show trigger - var triggerMap = { - 'mouseenter': 'mouseleave', - 'click': 'click', - 'outsideClick': 'outsideClick', - 'focus': 'blur', - 'none': '' - }; - - // The options specified to the provider globally. - var globalOptions = {}; - - /** - * `options({})` allows global configuration of all tooltips in the - * application. - * - * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) { - * // place tooltips left instead of top by default - * $tooltipProvider.options( { placement: 'left' } ); - * }); - */ - this.options = function(value) { - angular.extend(globalOptions, value); - }; - - /** - * This allows you to extend the set of trigger mappings available. E.g.: - * - * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } ); - */ - this.setTriggers = function setTriggers(triggers) { - angular.extend(triggerMap, triggers); - }; - - /** - * This is a helper function for translating camel-case to snake_case. - */ - function snake_case(name) { - var regexp = /[A-Z]/g; - var separator = '-'; - return name.replace(regexp, function(letter, pos) { - return (pos ? separator : '') + letter.toLowerCase(); - }); - } - - /** - * Returns the actual instance of the $tooltip service. - * TODO support multiple triggers - */ - this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) { - var openedTooltips = $$stackedMap.createNew(); - $document.on('keyup', keypressListener); - - $rootScope.$on('$destroy', function() { - $document.off('keyup', keypressListener); - }); - - function keypressListener(e) { - if (e.which === 27) { - var last = openedTooltips.top(); - if (last) { - last.value.close(); - last = null; - } - } - } - - return function $tooltip(ttType, prefix, defaultTriggerShow, options) { - options = angular.extend({}, defaultOptions, globalOptions, options); - - /** - * Returns an object of show and hide triggers. - * - * If a trigger is supplied, - * it is used to show the tooltip; otherwise, it will use the `trigger` - * option passed to the `$tooltipProvider.options` method; else it will - * default to the trigger supplied to this directive factory. - * - * The hide trigger is based on the show trigger. If the `trigger` option - * was passed to the `$tooltipProvider.options` method, it will use the - * mapped trigger from `triggerMap` or the passed trigger if the map is - * undefined; otherwise, it uses the `triggerMap` value of the show - * trigger; else it will just use the show trigger. - */ - function getTriggers(trigger) { - var show = (trigger || options.trigger || defaultTriggerShow).split(' '); - var hide = show.map(function(trigger) { - return triggerMap[trigger] || trigger; - }); - return { - show: show, - hide: hide - }; - } - - var directiveName = snake_case(ttType); - - var startSym = $interpolate.startSymbol(); - var endSym = $interpolate.endSymbol(); - var template = - '
' + - '
'; - - return { - compile: function(tElem, tAttrs) { - var tooltipLinker = $compile(template); - - return function link(scope, element, attrs, tooltipCtrl) { - var tooltip; - var tooltipLinkedScope; - var transitionTimeout; - var showTimeout; - var hideTimeout; - var positionTimeout; - var adjustmentTimeout; - var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false; - var triggers = getTriggers(undefined); - var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']); - var ttScope = scope.$new(true); - var repositionScheduled = false; - var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false; - var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false; - var observers = []; - var lastPlacement; - - var positionTooltip = function() { - // check if tooltip exists and is not empty - if (!tooltip || !tooltip.html()) { return; } - - if (!positionTimeout) { - positionTimeout = $timeout(function() { - var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody); - var initialHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight'); - var elementPos = appendToBody ? $position.offset(element) : $position.position(element); - tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' }); - var placementClasses = ttPosition.placement.split('-'); - - if (!tooltip.hasClass(placementClasses[0])) { - tooltip.removeClass(lastPlacement.split('-')[0]); - tooltip.addClass(placementClasses[0]); - } - - if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) { - tooltip.removeClass(options.placementClassPrefix + lastPlacement); - tooltip.addClass(options.placementClassPrefix + ttPosition.placement); - } - - adjustmentTimeout = $timeout(function() { - var currentHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight'); - var adjustment = $position.adjustTop(placementClasses, elementPos, initialHeight, currentHeight); - if (adjustment) { - tooltip.css(adjustment); - } - adjustmentTimeout = null; - }, 0, false); - - // first time through tt element will have the - // uib-position-measure class or if the placement - // has changed we need to position the arrow. - if (tooltip.hasClass('uib-position-measure')) { - $position.positionArrow(tooltip, ttPosition.placement); - tooltip.removeClass('uib-position-measure'); - } else if (lastPlacement !== ttPosition.placement) { - $position.positionArrow(tooltip, ttPosition.placement); - } - lastPlacement = ttPosition.placement; - - positionTimeout = null; - }, 0, false); - } - }; - - // Set up the correct scope to allow transclusion later - ttScope.origScope = scope; - - // By default, the tooltip is not open. - // TODO add ability to start tooltip opened - ttScope.isOpen = false; - - function toggleTooltipBind() { - if (!ttScope.isOpen) { - showTooltipBind(); - } else { - hideTooltipBind(); - } - } - - // Show the tooltip with delay if specified, otherwise show it immediately - function showTooltipBind() { - if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) { - return; - } - - cancelHide(); - prepareTooltip(); - - if (ttScope.popupDelay) { - // Do nothing if the tooltip was already scheduled to pop-up. - // This happens if show is triggered multiple times before any hide is triggered. - if (!showTimeout) { - showTimeout = $timeout(show, ttScope.popupDelay, false); - } - } else { - show(); - } - } - - function hideTooltipBind() { - cancelShow(); - - if (ttScope.popupCloseDelay) { - if (!hideTimeout) { - hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false); - } - } else { - hide(); - } - } - - // Show the tooltip popup element. - function show() { - cancelShow(); - cancelHide(); - - // Don't show empty tooltips. - if (!ttScope.content) { - return angular.noop; - } - - createTooltip(); - - // And show the tooltip. - ttScope.$evalAsync(function() { - ttScope.isOpen = true; - assignIsOpen(true); - positionTooltip(); - }); - } - - function cancelShow() { - if (showTimeout) { - $timeout.cancel(showTimeout); - showTimeout = null; - } - - if (positionTimeout) { - $timeout.cancel(positionTimeout); - positionTimeout = null; - } - } - - // Hide the tooltip popup element. - function hide() { - if (!ttScope) { - return; - } - - // First things first: we don't show it anymore. - ttScope.$evalAsync(function() { - if (ttScope) { - ttScope.isOpen = false; - assignIsOpen(false); - // And now we remove it from the DOM. However, if we have animation, we - // need to wait for it to expire beforehand. - // FIXME: this is a placeholder for a port of the transitions library. - // The fade transition in TWBS is 150ms. - if (ttScope.animation) { - if (!transitionTimeout) { - transitionTimeout = $timeout(removeTooltip, 150, false); - } - } else { - removeTooltip(); - } - } - }); - } - - function cancelHide() { - if (hideTimeout) { - $timeout.cancel(hideTimeout); - hideTimeout = null; - } - - if (transitionTimeout) { - $timeout.cancel(transitionTimeout); - transitionTimeout = null; - } - } - - function createTooltip() { - // There can only be one tooltip element per directive shown at once. - if (tooltip) { - return; - } - - tooltipLinkedScope = ttScope.$new(); - tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) { - if (appendToBody) { - $document.find('body').append(tooltip); - } else { - element.after(tooltip); - } - }); - - openedTooltips.add(ttScope, { - close: hide - }); - - prepObservers(); - } - - function removeTooltip() { - cancelShow(); - cancelHide(); - unregisterObservers(); - - if (tooltip) { - tooltip.remove(); - - tooltip = null; - if (adjustmentTimeout) { - $timeout.cancel(adjustmentTimeout); - } - } - - openedTooltips.remove(ttScope); - - if (tooltipLinkedScope) { - tooltipLinkedScope.$destroy(); - tooltipLinkedScope = null; - } - } - - /** - * Set the initial scope values. Once - * the tooltip is created, the observers - * will be added to keep things in sync. - */ - function prepareTooltip() { - ttScope.title = attrs[prefix + 'Title']; - if (contentParse) { - ttScope.content = contentParse(scope); - } else { - ttScope.content = attrs[ttType]; - } - - ttScope.popupClass = attrs[prefix + 'Class']; - ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement; - var placement = $position.parsePlacement(ttScope.placement); - lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0]; - - var delay = parseInt(attrs[prefix + 'PopupDelay'], 10); - var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10); - ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay; - ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay; - } - - function assignIsOpen(isOpen) { - if (isOpenParse && angular.isFunction(isOpenParse.assign)) { - isOpenParse.assign(scope, isOpen); - } - } - - ttScope.contentExp = function() { - return ttScope.content; - }; - - /** - * Observe the relevant attributes. - */ - attrs.$observe('disabled', function(val) { - if (val) { - cancelShow(); - } - - if (val && ttScope.isOpen) { - hide(); - } - }); - - if (isOpenParse) { - scope.$watch(isOpenParse, function(val) { - if (ttScope && !val === ttScope.isOpen) { - toggleTooltipBind(); - } - }); - } - - function prepObservers() { - observers.length = 0; - - if (contentParse) { - observers.push( - scope.$watch(contentParse, function(val) { - ttScope.content = val; - if (!val && ttScope.isOpen) { - hide(); - } - }) - ); - - observers.push( - tooltipLinkedScope.$watch(function() { - if (!repositionScheduled) { - repositionScheduled = true; - tooltipLinkedScope.$$postDigest(function() { - repositionScheduled = false; - if (ttScope && ttScope.isOpen) { - positionTooltip(); - } - }); - } - }) - ); - } else { - observers.push( - attrs.$observe(ttType, function(val) { - ttScope.content = val; - if (!val && ttScope.isOpen) { - hide(); - } else { - positionTooltip(); - } - }) - ); - } - - observers.push( - attrs.$observe(prefix + 'Title', function(val) { - ttScope.title = val; - if (ttScope.isOpen) { - positionTooltip(); - } - }) - ); - - observers.push( - attrs.$observe(prefix + 'Placement', function(val) { - ttScope.placement = val ? val : options.placement; - if (ttScope.isOpen) { - positionTooltip(); - } - }) - ); - } - - function unregisterObservers() { - if (observers.length) { - angular.forEach(observers, function(observer) { - observer(); - }); - observers.length = 0; - } - } - - // hide tooltips/popovers for outsideClick trigger - function bodyHideTooltipBind(e) { - if (!ttScope || !ttScope.isOpen || !tooltip) { - return; - } - // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked - if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) { - hideTooltipBind(); - } - } - - // KeyboardEvent handler to hide the tooltip on Escape key press - function hideOnEscapeKey(e) { - if (e.which === 27) { - hideTooltipBind(); - } - } - - var unregisterTriggers = function() { - triggers.show.forEach(function(trigger) { - if (trigger === 'outsideClick') { - element.off('click', toggleTooltipBind); - } else { - element.off(trigger, showTooltipBind); - element.off(trigger, toggleTooltipBind); - } - element.off('keypress', hideOnEscapeKey); - }); - triggers.hide.forEach(function(trigger) { - if (trigger === 'outsideClick') { - $document.off('click', bodyHideTooltipBind); - } else { - element.off(trigger, hideTooltipBind); - } - }); - }; - - function prepTriggers() { - var showTriggers = [], hideTriggers = []; - var val = scope.$eval(attrs[prefix + 'Trigger']); - unregisterTriggers(); - - if (angular.isObject(val)) { - Object.keys(val).forEach(function(key) { - showTriggers.push(key); - hideTriggers.push(val[key]); - }); - triggers = { - show: showTriggers, - hide: hideTriggers - }; - } else { - triggers = getTriggers(val); - } - - if (triggers.show !== 'none') { - triggers.show.forEach(function(trigger, idx) { - if (trigger === 'outsideClick') { - element.on('click', toggleTooltipBind); - $document.on('click', bodyHideTooltipBind); - } else if (trigger === triggers.hide[idx]) { - element.on(trigger, toggleTooltipBind); - } else if (trigger) { - element.on(trigger, showTooltipBind); - element.on(triggers.hide[idx], hideTooltipBind); - } - element.on('keypress', hideOnEscapeKey); - }); - } - } - - prepTriggers(); - - var animation = scope.$eval(attrs[prefix + 'Animation']); - ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation; - - var appendToBodyVal; - var appendKey = prefix + 'AppendToBody'; - if (appendKey in attrs && attrs[appendKey] === undefined) { - appendToBodyVal = true; - } else { - appendToBodyVal = scope.$eval(attrs[appendKey]); - } - - appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody; - - // Make sure tooltip is destroyed and removed. - scope.$on('$destroy', function onDestroyTooltip() { - unregisterTriggers(); - removeTooltip(); - ttScope = null; - }); - }; - } - }; - }; - }]; -}) - -// This is mostly ngInclude code but with a custom scope -.directive('uibTooltipTemplateTransclude', [ - '$animate', '$sce', '$compile', '$templateRequest', -function ($animate, $sce, $compile, $templateRequest) { - return { - link: function(scope, elem, attrs) { - var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope); - - var changeCounter = 0, - currentScope, - previousElement, - currentElement; - - var cleanupLastIncludeContent = function() { - if (previousElement) { - previousElement.remove(); - previousElement = null; - } - - if (currentScope) { - currentScope.$destroy(); - currentScope = null; - } - - if (currentElement) { - $animate.leave(currentElement).then(function() { - previousElement = null; - }); - previousElement = currentElement; - currentElement = null; - } - }; - - scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) { - var thisChangeId = ++changeCounter; - - if (src) { - //set the 2nd param to true to ignore the template request error so that the inner - //contents and scope can be cleaned up. - $templateRequest(src, true).then(function(response) { - if (thisChangeId !== changeCounter) { return; } - var newScope = origScope.$new(); - var template = response; - - var clone = $compile(template)(newScope, function(clone) { - cleanupLastIncludeContent(); - $animate.enter(clone, elem); - }); - - currentScope = newScope; - currentElement = clone; - - currentScope.$emit('$includeContentLoaded', src); - }, function() { - if (thisChangeId === changeCounter) { - cleanupLastIncludeContent(); - scope.$emit('$includeContentError', src); - } - }); - scope.$emit('$includeContentRequested', src); - } else { - cleanupLastIncludeContent(); - } - }); - - scope.$on('$destroy', cleanupLastIncludeContent); - } - }; -}]) - -/** - * Note that it's intentional that these classes are *not* applied through $animate. - * They must not be animated as they're expected to be present on the tooltip on - * initialization. - */ -.directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) { - return { - restrict: 'A', - link: function(scope, element, attrs) { - // need to set the primary position so the - // arrow has space during position measure. - // tooltip.positionTooltip() - if (scope.placement) { - // // There are no top-left etc... classes - // // in TWBS, so we need the primary position. - var position = $uibPosition.parsePlacement(scope.placement); - element.addClass(position[0]); - } - - if (scope.popupClass) { - element.addClass(scope.popupClass); - } - - if (scope.animation) { - element.addClass(attrs.tooltipAnimationClass); - } - } - }; -}]) - -.directive('uibTooltipPopup', function() { - return { - restrict: 'A', - scope: { content: '@' }, - templateUrl: 'uib/template/tooltip/tooltip-popup.html' - }; -}) - -.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter'); -}]) - -.directive('uibTooltipTemplatePopup', function() { - return { - restrict: 'A', - scope: { contentExp: '&', originScope: '&' }, - templateUrl: 'uib/template/tooltip/tooltip-template-popup.html' - }; -}) - -.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', { - useContentExp: true - }); -}]) - -.directive('uibTooltipHtmlPopup', function() { - return { - restrict: 'A', - scope: { contentExp: '&' }, - templateUrl: 'uib/template/tooltip/tooltip-html-popup.html' - }; -}) - -.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', { - useContentExp: true - }); -}]); - -/** - * The following features are still outstanding: popup delay, animation as a - * function, placement as a function, inside, support for more triggers than - * just mouse enter/leave, and selector delegatation. - */ -angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip']) - -.directive('uibPopoverTemplatePopup', function() { - return { - restrict: 'A', - scope: { uibTitle: '@', contentExp: '&', originScope: '&' }, - templateUrl: 'uib/template/popover/popover-template.html' - }; -}) - -.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibPopoverTemplate', 'popover', 'click', { - useContentExp: true - }); -}]) - -.directive('uibPopoverHtmlPopup', function() { - return { - restrict: 'A', - scope: { contentExp: '&', uibTitle: '@' }, - templateUrl: 'uib/template/popover/popover-html.html' - }; -}) - -.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibPopoverHtml', 'popover', 'click', { - useContentExp: true - }); -}]) - -.directive('uibPopoverPopup', function() { - return { - restrict: 'A', - scope: { uibTitle: '@', content: '@' }, - templateUrl: 'uib/template/popover/popover.html' - }; -}) - -.directive('uibPopover', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibPopover', 'popover', 'click'); -}]); - -angular.module('ui.bootstrap.progressbar', []) - -.constant('uibProgressConfig', { - animate: true, - max: 100 -}) - -.controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) { - var self = this, - animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate; - - this.bars = []; - $scope.max = getMaxOrDefault(); - - this.addBar = function(bar, element, attrs) { - if (!animate) { - element.css({'transition': 'none'}); - } - - this.bars.push(bar); - - bar.max = getMaxOrDefault(); - bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar'; - - bar.$watch('value', function(value) { - bar.recalculatePercentage(); - }); - - bar.recalculatePercentage = function() { - var totalPercentage = self.bars.reduce(function(total, bar) { - bar.percent = +(100 * bar.value / bar.max).toFixed(2); - return total + bar.percent; - }, 0); - - if (totalPercentage > 100) { - bar.percent -= totalPercentage - 100; - } - }; - - bar.$on('$destroy', function() { - element = null; - self.removeBar(bar); - }); - }; - - this.removeBar = function(bar) { - this.bars.splice(this.bars.indexOf(bar), 1); - this.bars.forEach(function (bar) { - bar.recalculatePercentage(); - }); - }; - - //$attrs.$observe('maxParam', function(maxParam) { - $scope.$watch('maxParam', function(maxParam) { - self.bars.forEach(function(bar) { - bar.max = getMaxOrDefault(); - bar.recalculatePercentage(); - }); - }); - - function getMaxOrDefault () { - return angular.isDefined($scope.maxParam) ? $scope.maxParam : progressConfig.max; - } -}]) - -.directive('uibProgress', function() { - return { - replace: true, - transclude: true, - controller: 'UibProgressController', - require: 'uibProgress', - scope: { - maxParam: '=?max' - }, - templateUrl: 'uib/template/progressbar/progress.html' - }; -}) - -.directive('uibBar', function() { - return { - replace: true, - transclude: true, - require: '^uibProgress', - scope: { - value: '=', - type: '@' - }, - templateUrl: 'uib/template/progressbar/bar.html', - link: function(scope, element, attrs, progressCtrl) { - progressCtrl.addBar(scope, element, attrs); - } - }; -}) - -.directive('uibProgressbar', function() { - return { - replace: true, - transclude: true, - controller: 'UibProgressController', - scope: { - value: '=', - maxParam: '=?max', - type: '@' - }, - templateUrl: 'uib/template/progressbar/progressbar.html', - link: function(scope, element, attrs, progressCtrl) { - progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title}); - } - }; -}); - -angular.module('ui.bootstrap.rating', []) - -.constant('uibRatingConfig', { - max: 5, - stateOn: null, - stateOff: null, - enableReset: true, - titles: ['one', 'two', 'three', 'four', 'five'] -}) - -.controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) { - var ngModelCtrl = { $setViewValue: angular.noop }, - self = this; - - this.init = function(ngModelCtrl_) { - ngModelCtrl = ngModelCtrl_; - ngModelCtrl.$render = this.render; - - ngModelCtrl.$formatters.push(function(value) { - if (angular.isNumber(value) && value << 0 !== value) { - value = Math.round(value); - } - - return value; - }); - - this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn; - this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff; - this.enableReset = angular.isDefined($attrs.enableReset) ? - $scope.$parent.$eval($attrs.enableReset) : ratingConfig.enableReset; - var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles; - this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ? - tmpTitles : ratingConfig.titles; - - var ratingStates = angular.isDefined($attrs.ratingStates) ? - $scope.$parent.$eval($attrs.ratingStates) : - new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max); - $scope.range = this.buildTemplateObjects(ratingStates); - }; - - this.buildTemplateObjects = function(states) { - for (var i = 0, n = states.length; i < n; i++) { - states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]); - } - return states; - }; - - this.getTitle = function(index) { - if (index >= this.titles.length) { - return index + 1; - } - - return this.titles[index]; - }; - - $scope.rate = function(value) { - if (!$scope.readonly && value >= 0 && value <= $scope.range.length) { - var newViewValue = self.enableReset && ngModelCtrl.$viewValue === value ? 0 : value; - ngModelCtrl.$setViewValue(newViewValue); - ngModelCtrl.$render(); - } - }; - - $scope.enter = function(value) { - if (!$scope.readonly) { - $scope.value = value; - } - $scope.onHover({value: value}); - }; - - $scope.reset = function() { - $scope.value = ngModelCtrl.$viewValue; - $scope.onLeave(); - }; - - $scope.onKeydown = function(evt) { - if (/(37|38|39|40)/.test(evt.which)) { - evt.preventDefault(); - evt.stopPropagation(); - $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1)); - } - }; - - this.render = function() { - $scope.value = ngModelCtrl.$viewValue; - $scope.title = self.getTitle($scope.value - 1); - }; -}]) - -.directive('uibRating', function() { - return { - require: ['uibRating', 'ngModel'], - restrict: 'A', - scope: { - readonly: '=?readOnly', - onHover: '&', - onLeave: '&' - }, - controller: 'UibRatingController', - templateUrl: 'uib/template/rating/rating.html', - link: function(scope, element, attrs, ctrls) { - var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - ratingCtrl.init(ngModelCtrl); - } - }; -}); - -angular.module('ui.bootstrap.tabs', []) - -.controller('UibTabsetController', ['$scope', function ($scope) { - var ctrl = this, - oldIndex; - ctrl.tabs = []; - - ctrl.select = function(index, evt) { - if (!destroyed) { - var previousIndex = findTabIndex(oldIndex); - var previousSelected = ctrl.tabs[previousIndex]; - if (previousSelected) { - previousSelected.tab.onDeselect({ - $event: evt, - $selectedIndex: index - }); - if (evt && evt.isDefaultPrevented()) { - return; - } - previousSelected.tab.active = false; - } - - var selected = ctrl.tabs[index]; - if (selected) { - selected.tab.onSelect({ - $event: evt - }); - selected.tab.active = true; - ctrl.active = selected.index; - oldIndex = selected.index; - } else if (!selected && angular.isDefined(oldIndex)) { - ctrl.active = null; - oldIndex = null; - } - } - }; - - ctrl.addTab = function addTab(tab) { - ctrl.tabs.push({ - tab: tab, - index: tab.index - }); - ctrl.tabs.sort(function(t1, t2) { - if (t1.index > t2.index) { - return 1; - } - - if (t1.index < t2.index) { - return -1; - } - - return 0; - }); - - if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) { - var newActiveIndex = findTabIndex(tab.index); - ctrl.select(newActiveIndex); - } - }; - - ctrl.removeTab = function removeTab(tab) { - var index; - for (var i = 0; i < ctrl.tabs.length; i++) { - if (ctrl.tabs[i].tab === tab) { - index = i; - break; - } - } - - if (ctrl.tabs[index].index === ctrl.active) { - var newActiveTabIndex = index === ctrl.tabs.length - 1 ? - index - 1 : index + 1 % ctrl.tabs.length; - ctrl.select(newActiveTabIndex); - } - - ctrl.tabs.splice(index, 1); - }; - - $scope.$watch('tabset.active', function(val) { - if (angular.isDefined(val) && val !== oldIndex) { - ctrl.select(findTabIndex(val)); - } - }); - - var destroyed; - $scope.$on('$destroy', function() { - destroyed = true; - }); - - function findTabIndex(index) { - for (var i = 0; i < ctrl.tabs.length; i++) { - if (ctrl.tabs[i].index === index) { - return i; - } - } - } -}]) - -.directive('uibTabset', function() { - return { - transclude: true, - replace: true, - scope: {}, - bindToController: { - active: '=?', - type: '@' - }, - controller: 'UibTabsetController', - controllerAs: 'tabset', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/tabs/tabset.html'; - }, - link: function(scope, element, attrs) { - scope.vertical = angular.isDefined(attrs.vertical) ? - scope.$parent.$eval(attrs.vertical) : false; - scope.justified = angular.isDefined(attrs.justified) ? - scope.$parent.$eval(attrs.justified) : false; - } - }; -}) - -.directive('uibTab', ['$parse', function($parse) { - return { - require: '^uibTabset', - replace: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/tabs/tab.html'; - }, - transclude: true, - scope: { - heading: '@', - index: '=?', - classes: '@?', - onSelect: '&select', //This callback is called in contentHeadingTransclude - //once it inserts the tab's content into the dom - onDeselect: '&deselect' - }, - controller: function() { - //Empty controller so other directives can require being 'under' a tab - }, - controllerAs: 'tab', - link: function(scope, elm, attrs, tabsetCtrl, transclude) { - scope.disabled = false; - if (attrs.disable) { - scope.$parent.$watch($parse(attrs.disable), function(value) { - scope.disabled = !! value; - }); - } - - if (angular.isUndefined(attrs.index)) { - if (tabsetCtrl.tabs && tabsetCtrl.tabs.length) { - scope.index = Math.max.apply(null, tabsetCtrl.tabs.map(function(t) { return t.index; })) + 1; - } else { - scope.index = 0; - } - } - - if (angular.isUndefined(attrs.classes)) { - scope.classes = ''; - } - - scope.select = function(evt) { - if (!scope.disabled) { - var index; - for (var i = 0; i < tabsetCtrl.tabs.length; i++) { - if (tabsetCtrl.tabs[i].tab === scope) { - index = i; - break; - } - } - - tabsetCtrl.select(index, evt); - } - }; - - tabsetCtrl.addTab(scope); - scope.$on('$destroy', function() { - tabsetCtrl.removeTab(scope); - }); - - //We need to transclude later, once the content container is ready. - //when this link happens, we're inside a tab heading. - scope.$transcludeFn = transclude; - } - }; -}]) - -.directive('uibTabHeadingTransclude', function() { - return { - restrict: 'A', - require: '^uibTab', - link: function(scope, elm) { - scope.$watch('headingElement', function updateHeadingElement(heading) { - if (heading) { - elm.html(''); - elm.append(heading); - } - }); - } - }; -}) - -.directive('uibTabContentTransclude', function() { - return { - restrict: 'A', - require: '^uibTabset', - link: function(scope, elm, attrs) { - var tab = scope.$eval(attrs.uibTabContentTransclude).tab; - - //Now our tab is ready to be transcluded: both the tab heading area - //and the tab content area are loaded. Transclude 'em both. - tab.$transcludeFn(tab.$parent, function(contents) { - angular.forEach(contents, function(node) { - if (isTabHeading(node)) { - //Let tabHeadingTransclude know. - tab.headingElement = node; - } else { - elm.append(node); - } - }); - }); - } - }; - - function isTabHeading(node) { - return node.tagName && ( - node.hasAttribute('uib-tab-heading') || - node.hasAttribute('data-uib-tab-heading') || - node.hasAttribute('x-uib-tab-heading') || - node.tagName.toLowerCase() === 'uib-tab-heading' || - node.tagName.toLowerCase() === 'data-uib-tab-heading' || - node.tagName.toLowerCase() === 'x-uib-tab-heading' || - node.tagName.toLowerCase() === 'uib:tab-heading' - ); - } -}); - -angular.module('ui.bootstrap.timepicker', []) - -.constant('uibTimepickerConfig', { - hourStep: 1, - minuteStep: 1, - secondStep: 1, - showMeridian: true, - showSeconds: false, - meridians: null, - readonlyInput: false, - mousewheel: true, - arrowkeys: true, - showSpinners: true, - templateUrl: 'uib/template/timepicker/timepicker.html' -}) - -.controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) { - var hoursModelCtrl, minutesModelCtrl, secondsModelCtrl; - var selected = new Date(), - watchers = [], - ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl - meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS, - padHours = angular.isDefined($attrs.padHours) ? $scope.$parent.$eval($attrs.padHours) : true; - - $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0; - $element.removeAttr('tabindex'); - - this.init = function(ngModelCtrl_, inputs) { - ngModelCtrl = ngModelCtrl_; - ngModelCtrl.$render = this.render; - - ngModelCtrl.$formatters.unshift(function(modelValue) { - return modelValue ? new Date(modelValue) : null; - }); - - var hoursInputEl = inputs.eq(0), - minutesInputEl = inputs.eq(1), - secondsInputEl = inputs.eq(2); - - hoursModelCtrl = hoursInputEl.controller('ngModel'); - minutesModelCtrl = minutesInputEl.controller('ngModel'); - secondsModelCtrl = secondsInputEl.controller('ngModel'); - - var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel; - - if (mousewheel) { - this.setupMousewheelEvents(hoursInputEl, minutesInputEl, secondsInputEl); - } - - var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys; - if (arrowkeys) { - this.setupArrowkeyEvents(hoursInputEl, minutesInputEl, secondsInputEl); - } - - $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput; - this.setupInputEvents(hoursInputEl, minutesInputEl, secondsInputEl); - }; - - var hourStep = timepickerConfig.hourStep; - if ($attrs.hourStep) { - watchers.push($scope.$parent.$watch($parse($attrs.hourStep), function(value) { - hourStep = +value; - })); - } - - var minuteStep = timepickerConfig.minuteStep; - if ($attrs.minuteStep) { - watchers.push($scope.$parent.$watch($parse($attrs.minuteStep), function(value) { - minuteStep = +value; - })); - } - - var min; - watchers.push($scope.$parent.$watch($parse($attrs.min), function(value) { - var dt = new Date(value); - min = isNaN(dt) ? undefined : dt; - })); - - var max; - watchers.push($scope.$parent.$watch($parse($attrs.max), function(value) { - var dt = new Date(value); - max = isNaN(dt) ? undefined : dt; - })); - - var disabled = false; - if ($attrs.ngDisabled) { - watchers.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(value) { - disabled = value; - })); - } - - $scope.noIncrementHours = function() { - var incrementedSelected = addMinutes(selected, hourStep * 60); - return disabled || incrementedSelected > max || - incrementedSelected < selected && incrementedSelected < min; - }; - - $scope.noDecrementHours = function() { - var decrementedSelected = addMinutes(selected, -hourStep * 60); - return disabled || decrementedSelected < min || - decrementedSelected > selected && decrementedSelected > max; - }; - - $scope.noIncrementMinutes = function() { - var incrementedSelected = addMinutes(selected, minuteStep); - return disabled || incrementedSelected > max || - incrementedSelected < selected && incrementedSelected < min; - }; - - $scope.noDecrementMinutes = function() { - var decrementedSelected = addMinutes(selected, -minuteStep); - return disabled || decrementedSelected < min || - decrementedSelected > selected && decrementedSelected > max; - }; - - $scope.noIncrementSeconds = function() { - var incrementedSelected = addSeconds(selected, secondStep); - return disabled || incrementedSelected > max || - incrementedSelected < selected && incrementedSelected < min; - }; - - $scope.noDecrementSeconds = function() { - var decrementedSelected = addSeconds(selected, -secondStep); - return disabled || decrementedSelected < min || - decrementedSelected > selected && decrementedSelected > max; - }; - - $scope.noToggleMeridian = function() { - if (selected.getHours() < 12) { - return disabled || addMinutes(selected, 12 * 60) > max; - } - - return disabled || addMinutes(selected, -12 * 60) < min; - }; - - var secondStep = timepickerConfig.secondStep; - if ($attrs.secondStep) { - watchers.push($scope.$parent.$watch($parse($attrs.secondStep), function(value) { - secondStep = +value; - })); - } - - $scope.showSeconds = timepickerConfig.showSeconds; - if ($attrs.showSeconds) { - watchers.push($scope.$parent.$watch($parse($attrs.showSeconds), function(value) { - $scope.showSeconds = !!value; - })); - } - - // 12H / 24H mode - $scope.showMeridian = timepickerConfig.showMeridian; - if ($attrs.showMeridian) { - watchers.push($scope.$parent.$watch($parse($attrs.showMeridian), function(value) { - $scope.showMeridian = !!value; - - if (ngModelCtrl.$error.time) { - // Evaluate from template - var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate(); - if (angular.isDefined(hours) && angular.isDefined(minutes)) { - selected.setHours(hours); - refresh(); - } - } else { - updateTemplate(); - } - })); - } - - // Get $scope.hours in 24H mode if valid - function getHoursFromTemplate() { - var hours = +$scope.hours; - var valid = $scope.showMeridian ? hours > 0 && hours < 13 : - hours >= 0 && hours < 24; - if (!valid || $scope.hours === '') { - return undefined; - } - - if ($scope.showMeridian) { - if (hours === 12) { - hours = 0; - } - if ($scope.meridian === meridians[1]) { - hours = hours + 12; - } - } - return hours; - } - - function getMinutesFromTemplate() { - var minutes = +$scope.minutes; - var valid = minutes >= 0 && minutes < 60; - if (!valid || $scope.minutes === '') { - return undefined; - } - return minutes; - } - - function getSecondsFromTemplate() { - var seconds = +$scope.seconds; - return seconds >= 0 && seconds < 60 ? seconds : undefined; - } - - function pad(value, noPad) { - if (value === null) { - return ''; - } - - return angular.isDefined(value) && value.toString().length < 2 && !noPad ? - '0' + value : value.toString(); - } - - // Respond on mousewheel spin - this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) { - var isScrollingUp = function(e) { - if (e.originalEvent) { - e = e.originalEvent; - } - //pick correct delta variable depending on event - var delta = e.wheelDelta ? e.wheelDelta : -e.deltaY; - return e.detail || delta > 0; - }; - - hoursInputEl.on('mousewheel wheel', function(e) { - if (!disabled) { - $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours()); - } - e.preventDefault(); - }); - - minutesInputEl.on('mousewheel wheel', function(e) { - if (!disabled) { - $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes()); - } - e.preventDefault(); - }); - - secondsInputEl.on('mousewheel wheel', function(e) { - if (!disabled) { - $scope.$apply(isScrollingUp(e) ? $scope.incrementSeconds() : $scope.decrementSeconds()); - } - e.preventDefault(); - }); - }; - - // Respond on up/down arrowkeys - this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) { - hoursInputEl.on('keydown', function(e) { - if (!disabled) { - if (e.which === 38) { // up - e.preventDefault(); - $scope.incrementHours(); - $scope.$apply(); - } else if (e.which === 40) { // down - e.preventDefault(); - $scope.decrementHours(); - $scope.$apply(); - } - } - }); - - minutesInputEl.on('keydown', function(e) { - if (!disabled) { - if (e.which === 38) { // up - e.preventDefault(); - $scope.incrementMinutes(); - $scope.$apply(); - } else if (e.which === 40) { // down - e.preventDefault(); - $scope.decrementMinutes(); - $scope.$apply(); - } - } - }); - - secondsInputEl.on('keydown', function(e) { - if (!disabled) { - if (e.which === 38) { // up - e.preventDefault(); - $scope.incrementSeconds(); - $scope.$apply(); - } else if (e.which === 40) { // down - e.preventDefault(); - $scope.decrementSeconds(); - $scope.$apply(); - } - } - }); - }; - - this.setupInputEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) { - if ($scope.readonlyInput) { - $scope.updateHours = angular.noop; - $scope.updateMinutes = angular.noop; - $scope.updateSeconds = angular.noop; - return; - } - - var invalidate = function(invalidHours, invalidMinutes, invalidSeconds) { - ngModelCtrl.$setViewValue(null); - ngModelCtrl.$setValidity('time', false); - if (angular.isDefined(invalidHours)) { - $scope.invalidHours = invalidHours; - if (hoursModelCtrl) { - hoursModelCtrl.$setValidity('hours', false); - } - } - - if (angular.isDefined(invalidMinutes)) { - $scope.invalidMinutes = invalidMinutes; - if (minutesModelCtrl) { - minutesModelCtrl.$setValidity('minutes', false); - } - } - - if (angular.isDefined(invalidSeconds)) { - $scope.invalidSeconds = invalidSeconds; - if (secondsModelCtrl) { - secondsModelCtrl.$setValidity('seconds', false); - } - } - }; - - $scope.updateHours = function() { - var hours = getHoursFromTemplate(), - minutes = getMinutesFromTemplate(); - - ngModelCtrl.$setDirty(); - - if (angular.isDefined(hours) && angular.isDefined(minutes)) { - selected.setHours(hours); - selected.setMinutes(minutes); - if (selected < min || selected > max) { - invalidate(true); - } else { - refresh('h'); - } - } else { - invalidate(true); - } - }; - - hoursInputEl.on('blur', function(e) { - ngModelCtrl.$setTouched(); - if (modelIsEmpty()) { - makeValid(); - } else if ($scope.hours === null || $scope.hours === '') { - invalidate(true); - } else if (!$scope.invalidHours && $scope.hours < 10) { - $scope.$apply(function() { - $scope.hours = pad($scope.hours, !padHours); - }); - } - }); - - $scope.updateMinutes = function() { - var minutes = getMinutesFromTemplate(), - hours = getHoursFromTemplate(); - - ngModelCtrl.$setDirty(); - - if (angular.isDefined(minutes) && angular.isDefined(hours)) { - selected.setHours(hours); - selected.setMinutes(minutes); - if (selected < min || selected > max) { - invalidate(undefined, true); - } else { - refresh('m'); - } - } else { - invalidate(undefined, true); - } - }; - - minutesInputEl.on('blur', function(e) { - ngModelCtrl.$setTouched(); - if (modelIsEmpty()) { - makeValid(); - } else if ($scope.minutes === null) { - invalidate(undefined, true); - } else if (!$scope.invalidMinutes && $scope.minutes < 10) { - $scope.$apply(function() { - $scope.minutes = pad($scope.minutes); - }); - } - }); - - $scope.updateSeconds = function() { - var seconds = getSecondsFromTemplate(); - - ngModelCtrl.$setDirty(); - - if (angular.isDefined(seconds)) { - selected.setSeconds(seconds); - refresh('s'); - } else { - invalidate(undefined, undefined, true); - } - }; - - secondsInputEl.on('blur', function(e) { - if (modelIsEmpty()) { - makeValid(); - } else if (!$scope.invalidSeconds && $scope.seconds < 10) { - $scope.$apply( function() { - $scope.seconds = pad($scope.seconds); - }); - } - }); - - }; - - this.render = function() { - var date = ngModelCtrl.$viewValue; - - if (isNaN(date)) { - ngModelCtrl.$setValidity('time', false); - $log.error('Timepicker 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.'); - } else { - if (date) { - selected = date; - } - - if (selected < min || selected > max) { - ngModelCtrl.$setValidity('time', false); - $scope.invalidHours = true; - $scope.invalidMinutes = true; - } else { - makeValid(); - } - updateTemplate(); - } - }; - - // Call internally when we know that model is valid. - function refresh(keyboardChange) { - makeValid(); - ngModelCtrl.$setViewValue(new Date(selected)); - updateTemplate(keyboardChange); - } - - function makeValid() { - if (hoursModelCtrl) { - hoursModelCtrl.$setValidity('hours', true); - } - - if (minutesModelCtrl) { - minutesModelCtrl.$setValidity('minutes', true); - } - - if (secondsModelCtrl) { - secondsModelCtrl.$setValidity('seconds', true); - } - - ngModelCtrl.$setValidity('time', true); - $scope.invalidHours = false; - $scope.invalidMinutes = false; - $scope.invalidSeconds = false; - } - - function updateTemplate(keyboardChange) { - if (!ngModelCtrl.$modelValue) { - $scope.hours = null; - $scope.minutes = null; - $scope.seconds = null; - $scope.meridian = meridians[0]; - } else { - var hours = selected.getHours(), - minutes = selected.getMinutes(), - seconds = selected.getSeconds(); - - if ($scope.showMeridian) { - hours = hours === 0 || hours === 12 ? 12 : hours % 12; // Convert 24 to 12 hour system - } - - $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours); - if (keyboardChange !== 'm') { - $scope.minutes = pad(minutes); - } - $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1]; - - if (keyboardChange !== 's') { - $scope.seconds = pad(seconds); - } - $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1]; - } - } - - function addSecondsToSelected(seconds) { - selected = addSeconds(selected, seconds); - refresh(); - } - - function addMinutes(selected, minutes) { - return addSeconds(selected, minutes*60); - } - - function addSeconds(date, seconds) { - var dt = new Date(date.getTime() + seconds * 1000); - var newDate = new Date(date); - newDate.setHours(dt.getHours(), dt.getMinutes(), dt.getSeconds()); - return newDate; - } - - function modelIsEmpty() { - return ($scope.hours === null || $scope.hours === '') && - ($scope.minutes === null || $scope.minutes === '') && - (!$scope.showSeconds || $scope.showSeconds && ($scope.seconds === null || $scope.seconds === '')); - } - - $scope.showSpinners = angular.isDefined($attrs.showSpinners) ? - $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners; - - $scope.incrementHours = function() { - if (!$scope.noIncrementHours()) { - addSecondsToSelected(hourStep * 60 * 60); - } - }; - - $scope.decrementHours = function() { - if (!$scope.noDecrementHours()) { - addSecondsToSelected(-hourStep * 60 * 60); - } - }; - - $scope.incrementMinutes = function() { - if (!$scope.noIncrementMinutes()) { - addSecondsToSelected(minuteStep * 60); - } - }; - - $scope.decrementMinutes = function() { - if (!$scope.noDecrementMinutes()) { - addSecondsToSelected(-minuteStep * 60); - } - }; - - $scope.incrementSeconds = function() { - if (!$scope.noIncrementSeconds()) { - addSecondsToSelected(secondStep); - } - }; - - $scope.decrementSeconds = function() { - if (!$scope.noDecrementSeconds()) { - addSecondsToSelected(-secondStep); - } - }; - - $scope.toggleMeridian = function() { - var minutes = getMinutesFromTemplate(), - hours = getHoursFromTemplate(); - - if (!$scope.noToggleMeridian()) { - if (angular.isDefined(minutes) && angular.isDefined(hours)) { - addSecondsToSelected(12 * 60 * (selected.getHours() < 12 ? 60 : -60)); - } else { - $scope.meridian = $scope.meridian === meridians[0] ? meridians[1] : meridians[0]; - } - } - }; - - $scope.blur = function() { - ngModelCtrl.$setTouched(); - }; - - $scope.$on('$destroy', function() { - while (watchers.length) { - watchers.shift()(); - } - }); -}]) - -.directive('uibTimepicker', ['uibTimepickerConfig', function(uibTimepickerConfig) { - return { - require: ['uibTimepicker', '?^ngModel'], - restrict: 'A', - controller: 'UibTimepickerController', - controllerAs: 'timepicker', - scope: {}, - templateUrl: function(element, attrs) { - return attrs.templateUrl || uibTimepickerConfig.templateUrl; - }, - link: function(scope, element, attrs, ctrls) { - var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - if (ngModelCtrl) { - timepickerCtrl.init(ngModelCtrl, element.find('input')); - } - } - }; -}]); - -angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap.position']) - -/** - * A helper service that can parse typeahead's syntax (string provided by users) - * Extracted to a separate service for ease of unit testing - */ - .factory('uibTypeaheadParser', ['$parse', function($parse) { - // 000001111111100000000000002222222200000000000000003333333333333330000000000044444444000 - var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/; - return { - parse: function(input) { - var match = input.match(TYPEAHEAD_REGEXP); - if (!match) { - throw new Error( - 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' + - ' but got "' + input + '".'); - } - - return { - itemName: match[3], - source: $parse(match[4]), - viewMapper: $parse(match[2] || match[1]), - modelMapper: $parse(match[1]) - }; - } - }; - }]) - - .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$$debounce', '$uibPosition', 'uibTypeaheadParser', - function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $$debounce, $position, typeaheadParser) { - var HOT_KEYS = [9, 13, 27, 38, 40]; - var eventDebounceTime = 200; - var modelCtrl, ngModelOptions; - //SUPPORTED ATTRIBUTES (OPTIONS) - - //minimal no of characters that needs to be entered before typeahead kicks-in - var minLength = originalScope.$eval(attrs.typeaheadMinLength); - if (!minLength && minLength !== 0) { - minLength = 1; - } - - originalScope.$watch(attrs.typeaheadMinLength, function (newVal) { - minLength = !newVal && newVal !== 0 ? 1 : newVal; - }); - - //minimal wait time after last character typed before typeahead kicks-in - var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0; - - //should it restrict model values to the ones selected from the popup only? - var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false; - originalScope.$watch(attrs.typeaheadEditable, function (newVal) { - isEditable = newVal !== false; - }); - - //binding to a variable that indicates if matches are being retrieved asynchronously - var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop; - - //a function to determine if an event should cause selection - var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) { - var evt = vals.$event; - return evt.which === 13 || evt.which === 9; - }; - - //a callback executed when a match is selected - var onSelectCallback = $parse(attrs.typeaheadOnSelect); - - //should it select highlighted popup value when losing focus? - var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false; - - //binding to a variable that indicates if there were no results after the query is completed - var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop; - - var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined; - - var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false; - - var appendTo = attrs.typeaheadAppendTo ? - originalScope.$eval(attrs.typeaheadAppendTo) : null; - - var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false; - - //If input matches an item of the list exactly, select it automatically - var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false; - - //binding to a variable that indicates if dropdown is open - var isOpenSetter = $parse(attrs.typeaheadIsOpen).assign || angular.noop; - - var showHint = originalScope.$eval(attrs.typeaheadShowHint) || false; - - //INTERNAL VARIABLES - - //model setter executed upon match selection - var parsedModel = $parse(attrs.ngModel); - var invokeModelSetter = $parse(attrs.ngModel + '($$$p)'); - var $setModelValue = function(scope, newValue) { - if (angular.isFunction(parsedModel(originalScope)) && - ngModelOptions.getOption('getterSetter')) { - return invokeModelSetter(scope, {$$$p: newValue}); - } - - return parsedModel.assign(scope, newValue); - }; - - //expressions used by typeahead - var parserResult = typeaheadParser.parse(attrs.uibTypeahead); - - var hasFocus; - - //Used to avoid bug in iOS webview where iOS keyboard does not fire - //mousedown & mouseup events - //Issue #3699 - var selected; - - //create a child scope for the typeahead directive so we are not polluting original scope - //with typeahead-specific data (matches, query etc.) - var scope = originalScope.$new(); - var offDestroy = originalScope.$on('$destroy', function() { - scope.$destroy(); - }); - scope.$on('$destroy', offDestroy); - - // WAI-ARIA - var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000); - element.attr({ - 'aria-autocomplete': 'list', - 'aria-expanded': false, - 'aria-owns': popupId - }); - - var inputsContainer, hintInputElem; - //add read-only input to show hint - if (showHint) { - inputsContainer = angular.element('
'); - inputsContainer.css('position', 'relative'); - element.after(inputsContainer); - hintInputElem = element.clone(); - hintInputElem.attr('placeholder', ''); - hintInputElem.attr('tabindex', '-1'); - hintInputElem.val(''); - hintInputElem.css({ - 'position': 'absolute', - 'top': '0px', - 'left': '0px', - 'border-color': 'transparent', - 'box-shadow': 'none', - 'opacity': 1, - 'background': 'none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)', - 'color': '#999' - }); - element.css({ - 'position': 'relative', - 'vertical-align': 'top', - 'background-color': 'transparent' - }); - - if (hintInputElem.attr('id')) { - hintInputElem.removeAttr('id'); // remove duplicate id if present. - } - inputsContainer.append(hintInputElem); - hintInputElem.after(element); - } - - //pop-up element used to display matches - var popUpEl = angular.element('
'); - popUpEl.attr({ - id: popupId, - matches: 'matches', - active: 'activeIdx', - select: 'select(activeIdx, evt)', - 'move-in-progress': 'moveInProgress', - query: 'query', - position: 'position', - 'assign-is-open': 'assignIsOpen(isOpen)', - debounce: 'debounceUpdate' - }); - //custom item template - if (angular.isDefined(attrs.typeaheadTemplateUrl)) { - popUpEl.attr('template-url', attrs.typeaheadTemplateUrl); - } - - if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) { - popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl); - } - - var resetHint = function() { - if (showHint) { - hintInputElem.val(''); - } - }; - - var resetMatches = function() { - scope.matches = []; - scope.activeIdx = -1; - element.attr('aria-expanded', false); - resetHint(); - }; - - var getMatchId = function(index) { - return popupId + '-option-' + index; - }; - - // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead. - // This attribute is added or removed automatically when the `activeIdx` changes. - scope.$watch('activeIdx', function(index) { - if (index < 0) { - element.removeAttr('aria-activedescendant'); - } else { - element.attr('aria-activedescendant', getMatchId(index)); - } - }); - - var inputIsExactMatch = function(inputValue, index) { - if (scope.matches.length > index && inputValue) { - return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase(); - } - - return false; - }; - - var getMatchesAsync = function(inputValue, evt) { - var locals = {$viewValue: inputValue}; - isLoadingSetter(originalScope, true); - isNoResultsSetter(originalScope, false); - $q.when(parserResult.source(originalScope, locals)).then(function(matches) { - //it might happen that several async queries were in progress if a user were typing fast - //but we are interested only in responses that correspond to the current view value - var onCurrentRequest = inputValue === modelCtrl.$viewValue; - if (onCurrentRequest && hasFocus) { - if (matches && matches.length > 0) { - scope.activeIdx = focusFirst ? 0 : -1; - isNoResultsSetter(originalScope, false); - scope.matches.length = 0; - - //transform labels - for (var i = 0; i < matches.length; i++) { - locals[parserResult.itemName] = matches[i]; - scope.matches.push({ - id: getMatchId(i), - label: parserResult.viewMapper(scope, locals), - model: matches[i] - }); - } - - scope.query = inputValue; - //position pop-up with matches - we need to re-calculate its position each time we are opening a window - //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page - //due to other elements being rendered - recalculatePosition(); - - element.attr('aria-expanded', true); - - //Select the single remaining option if user input matches - if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) { - if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) { - $$debounce(function() { - scope.select(0, evt); - }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']); - } else { - scope.select(0, evt); - } - } - - if (showHint) { - var firstLabel = scope.matches[0].label; - if (angular.isString(inputValue) && - inputValue.length > 0 && - firstLabel.slice(0, inputValue.length).toUpperCase() === inputValue.toUpperCase()) { - hintInputElem.val(inputValue + firstLabel.slice(inputValue.length)); - } else { - hintInputElem.val(''); - } - } - } else { - resetMatches(); - isNoResultsSetter(originalScope, true); - } - } - if (onCurrentRequest) { - isLoadingSetter(originalScope, false); - } - }, function() { - resetMatches(); - isLoadingSetter(originalScope, false); - isNoResultsSetter(originalScope, true); - }); - }; - - // bind events only if appendToBody params exist - performance feature - if (appendToBody) { - angular.element($window).on('resize', fireRecalculating); - $document.find('body').on('scroll', fireRecalculating); - } - - // Declare the debounced function outside recalculating for - // proper debouncing - var debouncedRecalculate = $$debounce(function() { - // if popup is visible - if (scope.matches.length) { - recalculatePosition(); - } - - scope.moveInProgress = false; - }, eventDebounceTime); - - // Default progress type - scope.moveInProgress = false; - - function fireRecalculating() { - if (!scope.moveInProgress) { - scope.moveInProgress = true; - scope.$digest(); - } - - debouncedRecalculate(); - } - - // recalculate actual position and set new values to scope - // after digest loop is popup in right position - function recalculatePosition() { - scope.position = appendToBody ? $position.offset(element) : $position.position(element); - scope.position.top += element.prop('offsetHeight'); - } - - //we need to propagate user's query so we can higlight matches - scope.query = undefined; - - //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later - var timeoutPromise; - - var scheduleSearchWithTimeout = function(inputValue) { - timeoutPromise = $timeout(function() { - getMatchesAsync(inputValue); - }, waitTime); - }; - - var cancelPreviousTimeout = function() { - if (timeoutPromise) { - $timeout.cancel(timeoutPromise); - } - }; - - resetMatches(); - - scope.assignIsOpen = function (isOpen) { - isOpenSetter(originalScope, isOpen); - }; - - scope.select = function(activeIdx, evt) { - //called from within the $digest() cycle - var locals = {}; - var model, item; - - selected = true; - locals[parserResult.itemName] = item = scope.matches[activeIdx].model; - model = parserResult.modelMapper(originalScope, locals); - $setModelValue(originalScope, model); - modelCtrl.$setValidity('editable', true); - modelCtrl.$setValidity('parse', true); - - onSelectCallback(originalScope, { - $item: item, - $model: model, - $label: parserResult.viewMapper(originalScope, locals), - $event: evt - }); - - resetMatches(); - - //return focus to the input element if a match was selected via a mouse click event - // use timeout to avoid $rootScope:inprog error - if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) { - $timeout(function() { element[0].focus(); }, 0, false); - } - }; - - //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27) - element.on('keydown', function(evt) { - //typeahead is open and an "interesting" key was pressed - if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) { - return; - } - - var shouldSelect = isSelectEvent(originalScope, {$event: evt}); - - /** - * if there's nothing selected (i.e. focusFirst) and enter or tab is hit - * or - * shift + tab is pressed to bring focus to the previous element - * then clear the results - */ - if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) { - resetMatches(); - scope.$digest(); - return; - } - - evt.preventDefault(); - var target; - switch (evt.which) { - case 27: // escape - evt.stopPropagation(); - - resetMatches(); - originalScope.$digest(); - break; - case 38: // up arrow - scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1; - scope.$digest(); - target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx]; - target.parentNode.scrollTop = target.offsetTop; - break; - case 40: // down arrow - scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length; - scope.$digest(); - target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx]; - target.parentNode.scrollTop = target.offsetTop; - break; - default: - if (shouldSelect) { - scope.$apply(function() { - if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) { - $$debounce(function() { - scope.select(scope.activeIdx, evt); - }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']); - } else { - scope.select(scope.activeIdx, evt); - } - }); - } - } - }); - - element.on('focus', function (evt) { - hasFocus = true; - if (minLength === 0 && !modelCtrl.$viewValue) { - $timeout(function() { - getMatchesAsync(modelCtrl.$viewValue, evt); - }, 0); - } - }); - - element.on('blur', function(evt) { - if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) { - selected = true; - scope.$apply(function() { - if (angular.isObject(scope.debounceUpdate) && angular.isNumber(scope.debounceUpdate.blur)) { - $$debounce(function() { - scope.select(scope.activeIdx, evt); - }, scope.debounceUpdate.blur); - } else { - scope.select(scope.activeIdx, evt); - } - }); - } - if (!isEditable && modelCtrl.$error.editable) { - modelCtrl.$setViewValue(); - scope.$apply(function() { - // Reset validity as we are clearing - modelCtrl.$setValidity('editable', true); - modelCtrl.$setValidity('parse', true); - }); - element.val(''); - } - hasFocus = false; - selected = false; - }); - - // Keep reference to click handler to unbind it. - var dismissClickHandler = function(evt) { - // Issue #3973 - // Firefox treats right click as a click on document - if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) { - resetMatches(); - if (!$rootScope.$$phase) { - originalScope.$digest(); - } - } - }; - - $document.on('click', dismissClickHandler); - - originalScope.$on('$destroy', function() { - $document.off('click', dismissClickHandler); - if (appendToBody || appendTo) { - $popup.remove(); - } - - if (appendToBody) { - angular.element($window).off('resize', fireRecalculating); - $document.find('body').off('scroll', fireRecalculating); - } - // Prevent jQuery cache memory leak - popUpEl.remove(); - - if (showHint) { - inputsContainer.remove(); - } - }); - - var $popup = $compile(popUpEl)(scope); - - if (appendToBody) { - $document.find('body').append($popup); - } else if (appendTo) { - angular.element(appendTo).eq(0).append($popup); - } else { - element.after($popup); - } - - this.init = function(_modelCtrl) { - modelCtrl = _modelCtrl; - ngModelOptions = extractOptions(modelCtrl); - - scope.debounceUpdate = $parse(ngModelOptions.getOption('debounce'))(originalScope); - - //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM - //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue - modelCtrl.$parsers.unshift(function(inputValue) { - hasFocus = true; - - if (minLength === 0 || inputValue && inputValue.length >= minLength) { - if (waitTime > 0) { - cancelPreviousTimeout(); - scheduleSearchWithTimeout(inputValue); - } else { - getMatchesAsync(inputValue); - } - } else { - isLoadingSetter(originalScope, false); - cancelPreviousTimeout(); - resetMatches(); - } - - if (isEditable) { - return inputValue; - } - - if (!inputValue) { - // Reset in case user had typed something previously. - modelCtrl.$setValidity('editable', true); - return null; - } - - modelCtrl.$setValidity('editable', false); - return undefined; - }); - - modelCtrl.$formatters.push(function(modelValue) { - var candidateViewValue, emptyViewValue; - var locals = {}; - - // The validity may be set to false via $parsers (see above) if - // the model is restricted to selected values. If the model - // is set manually it is considered to be valid. - if (!isEditable) { - modelCtrl.$setValidity('editable', true); - } - - if (inputFormatter) { - locals.$model = modelValue; - return inputFormatter(originalScope, locals); - } - - //it might happen that we don't have enough info to properly render input value - //we need to check for this situation and simply return model value if we can't apply custom formatting - locals[parserResult.itemName] = modelValue; - candidateViewValue = parserResult.viewMapper(originalScope, locals); - locals[parserResult.itemName] = undefined; - emptyViewValue = parserResult.viewMapper(originalScope, locals); - - return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue; - }); - }; - - function extractOptions(ngModelCtrl) { - var ngModelOptions; - - if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing - // guarantee a value - ngModelOptions = ngModelCtrl.$options || {}; - - // mimic 1.6+ api - ngModelOptions.getOption = function (key) { - return ngModelOptions[key]; - }; - } else { // in angular >=1.6 $options is always present - ngModelOptions = ngModelCtrl.$options; - } - - return ngModelOptions; - } - }]) - - .directive('uibTypeahead', function() { - return { - controller: 'UibTypeaheadController', - require: ['ngModel', 'uibTypeahead'], - link: function(originalScope, element, attrs, ctrls) { - ctrls[1].init(ctrls[0]); - } - }; - }) - - .directive('uibTypeaheadPopup', ['$$debounce', function($$debounce) { - return { - scope: { - matches: '=', - query: '=', - active: '=', - position: '&', - moveInProgress: '=', - select: '&', - assignIsOpen: '&', - debounce: '&' - }, - replace: true, - templateUrl: function(element, attrs) { - return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html'; - }, - link: function(scope, element, attrs) { - scope.templateUrl = attrs.templateUrl; - - scope.isOpen = function() { - var isDropdownOpen = scope.matches.length > 0; - scope.assignIsOpen({ isOpen: isDropdownOpen }); - return isDropdownOpen; - }; - - scope.isActive = function(matchIdx) { - return scope.active === matchIdx; - }; - - scope.selectActive = function(matchIdx) { - scope.active = matchIdx; - }; - - scope.selectMatch = function(activeIdx, evt) { - var debounce = scope.debounce(); - if (angular.isNumber(debounce) || angular.isObject(debounce)) { - $$debounce(function() { - scope.select({activeIdx: activeIdx, evt: evt}); - }, angular.isNumber(debounce) ? debounce : debounce['default']); - } else { - scope.select({activeIdx: activeIdx, evt: evt}); - } - }; - } - }; - }]) - - .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) { - return { - scope: { - index: '=', - match: '=', - query: '=' - }, - link: function(scope, element, attrs) { - var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html'; - $templateRequest(tplUrl).then(function(tplContent) { - var tplEl = angular.element(tplContent.trim()); - element.replaceWith(tplEl); - $compile(tplEl)(scope); - }); - } - }; - }]) - - .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) { - var isSanitizePresent; - isSanitizePresent = $injector.has('$sanitize'); - - function escapeRegexp(queryToEscape) { - // Regex: capture the whole query string and replace it with the string that will be used to match - // the results, for example if the capture is "a" the result will be \a - return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); - } - - function containsHtml(matchItem) { - return /<.*>/g.test(matchItem); - } - - return function(matchItem, query) { - if (!isSanitizePresent && containsHtml(matchItem)) { - $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger - } - matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag - if (!isSanitizePresent) { - matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive - } - return matchItem; - }; - }]); - -angular.module("uib/template/accordion/accordion-group.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/accordion/accordion-group.html", - "
\n" + - "

\n" + - " {{heading}}\n" + - "

\n" + - "
\n" + - "
\n" + - "
\n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/accordion/accordion.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/accordion/accordion.html", - "
"); -}]); - -angular.module("uib/template/alert/alert.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/alert/alert.html", - "\n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/carousel/carousel.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/carousel/carousel.html", - "
\n" + - " 1\">\n" + - " \n" + - " previous\n" + - "\n" + - " 1\">\n" + - " \n" + - " next\n" + - "\n" + - "
    1\">\n" + - "
  1. \n" + - " slide {{ $index + 1 }} of {{ slides.length }}, currently active\n" + - "
  2. \n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/carousel/slide.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/carousel/slide.html", - "
\n" + - ""); -}]); - -angular.module("uib/template/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/datepicker/datepicker.html", - "
\n" + - "
\n" + - "
\n" + - "
\n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/datepicker/day.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/datepicker/day.html", - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
{{::label.abbr}}
{{ weekNumbers[$index] }}\n" + - " \n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/datepicker/month.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/datepicker/month.html", - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
\n" + - " \n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/datepicker/year.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/datepicker/year.html", - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
\n" + - " \n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/datepickerPopup/popup.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/datepickerPopup/popup.html", - "
    \n" + - "
  • \n" + - "
  • \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
  • \n" + - "
\n" + - ""); -}]); - -angular.module("uib/template/modal/window.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/modal/window.html", - "
\n" + - ""); -}]); - -angular.module("uib/template/pager/pager.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/pager/pager.html", - "
  • {{::getText('previous')}}
  • \n" + - "
  • {{::getText('next')}}
  • \n" + - ""); -}]); - -angular.module("uib/template/pagination/pagination.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/pagination/pagination.html", - "
  • {{::getText('first')}}
  • \n" + - "
  • {{::getText('previous')}}
  • \n" + - "
  • {{page.text}}
  • \n" + - "
  • {{::getText('next')}}
  • \n" + - "
  • {{::getText('last')}}
  • \n" + - ""); -}]); - -angular.module("uib/template/tooltip/tooltip-html-popup.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/tooltip/tooltip-html-popup.html", - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/tooltip/tooltip-popup.html", - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/tooltip/tooltip-template-popup.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/tooltip/tooltip-template-popup.html", - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/popover/popover-html.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/popover/popover-html.html", - "
    \n" + - "\n" + - "
    \n" + - "

    \n" + - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/popover/popover-template.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/popover/popover-template.html", - "
    \n" + - "\n" + - "
    \n" + - "

    \n" + - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/popover/popover.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/popover/popover.html", - "
    \n" + - "\n" + - "
    \n" + - "

    \n" + - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/progressbar/bar.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/progressbar/bar.html", - "
    \n" + - ""); -}]); - -angular.module("uib/template/progressbar/progress.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/progressbar/progress.html", - "
    "); -}]); - -angular.module("uib/template/progressbar/progressbar.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/progressbar/progressbar.html", - "
    \n" + - "
    \n" + - "
    \n" + - ""); -}]); - -angular.module("uib/template/rating/rating.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/rating/rating.html", - "\n" + - " ({{ $index < value ? '*' : ' ' }})\n" + - " \n" + - "\n" + - ""); -}]); - -angular.module("uib/template/tabs/tab.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/tabs/tab.html", - "
  • \n" + - " {{heading}}\n" + - "
  • \n" + - ""); -}]); - -angular.module("uib/template/tabs/tabset.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/tabs/tabset.html", - "
    \n" + - "
      \n" + - "
      \n" + - "
      \n" + - "
      \n" + - "
      \n" + - "
      \n" + - ""); -}]); - -angular.module("uib/template/timepicker/timepicker.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/timepicker/timepicker.html", - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "
        
      \n" + - " \n" + - " :\n" + - " \n" + - " :\n" + - " \n" + - "
        
      \n" + - ""); -}]); - -angular.module("uib/template/typeahead/typeahead-match.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/typeahead/typeahead-match.html", - "\n" + - ""); -}]); - -angular.module("uib/template/typeahead/typeahead-popup.html", []).run(["$templateCache", function($templateCache) { - $templateCache.put("uib/template/typeahead/typeahead-popup.html", - "
        \n" + - "
      • \n" + - "
        \n" + - "
      • \n" + - "
      \n" + - ""); -}]); -angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend(''); angular.$$uibCarouselCss = true; }); -angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend(''); angular.$$uibDatepickerCss = true; }); -angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend(''); angular.$$uibPositionCss = true; }); -angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend(''); angular.$$uibDatepickerpopupCss = true; }); -angular.module('ui.bootstrap.tooltip').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTooltipCss && angular.element(document).find('head').prepend(''); angular.$$uibTooltipCss = true; }); -angular.module('ui.bootstrap.timepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTimepickerCss && angular.element(document).find('head').prepend(''); angular.$$uibTimepickerCss = true; }); -angular.module('ui.bootstrap.typeahead').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTypeaheadCss && angular.element(document).find('head').prepend(''); angular.$$uibTypeaheadCss = true; }); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js deleted file mode 100644 index 0b1fc7f0..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * angular-ui-bootstrap - * http://angular-ui.github.io/bootstrap/ - - * Version: 2.5.0 - 2017-01-28 - * License: MIT - */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","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",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){r=!!("horizontal"in g),r?(s={width:""},t={width:"0"}):(s={height:""},t={height:"0"}),d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(s)}function i(a){return r?{width:a.scrollWidth+"px"}:{height:a.scrollHeight+"px"}}function j(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(n(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:i(f[0])}).start()["finally"](k):a.addClass(f,"in",{css:{overflow:"hidden"},to:i(f[0])}).then(k)},angular.noop)}function k(){f.removeClass("collapsing").addClass("collapse").css(s),o(d)}function l(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(p(d)).then(function(){f.css(i(f[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:t}).start()["finally"](m):a.removeClass(f,"in",{to:t}).then(m)},angular.noop):m()}function m(){f.css(t),f.removeClass("collapsing").addClass("collapse"),q(d)}var n=c(g.expanding),o=c(g.expanded),p=c(g.collapsing),q=c(g.collapsed),r=!1,s={},t={};h(),d.$watch(g.uibCollapse,function(a){a?l():j()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(a,b,c){c.$observe("disabled",function(a){c.$set("tabindex",a?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){b.addClass("panel"),d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){function a(){return"uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"}return{require:"^uibAccordionGroup",link:function(b,c,d,e){b.$watch(function(){return e[d.uibAccordionTransclude]},function(b){if(b){var d=angular.element(c[0].querySelector(a()));d.html(""),d.append(b)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(a,b,c,d,e){a.closeable=!!c.close,b.addClass("alert"),c.$set("role","alert"),a.closeable&&b.addClass("alert-dismissible");var f=angular.isDefined(c.dismissOnTimeout)?d(c.dismissOnTimeout)(a.$parent):null;f&&e(function(){a.close()},parseInt(f,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(a){for(var b=0;b1){p[d].element.data(q,c.direction);var h=o.getCurrentIndex();angular.isNumber(h)&&p[h].element&&p[h].element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",p[d].element,function(b,c){"close"===c&&(a.$currentTransition=null,e.off("addClass",b))})}a.active=c.index,r=c.index,f(d),k()}}function h(a){for(var b=0;b0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=a.active,s=!1;b.addClass("carousel"),o.addSlide=function(b,c){p.push({slide:b,element:c}),p.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===p.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),r=b.index,a.active=b.index,f(r),o.select(p[h(b)]),1===p.length&&a.play())},o.getCurrentIndex=function(){for(var a=0;a0&&r===c?c>=p.length?(r=p.length-1,a.active=r,f(r),o.select(p[p.length-1])):(r=c,a.active=r,f(r),o.select(p[c])):r>c&&(r--,a.active=r),0===p.length&&(r=null,a.active=null)},o.select=a.select=function(b,c){var d=h(b.slide);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b.slide.index===r||a.$currentTransition||g(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===p.length-1&&a.noWrap()},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},b.on("mouseenter",a.pause),b.on("mouseleave",a.play),a.$on("$destroy",function(){s=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j),a.$watch("active",function(a){if(angular.isNumber(a)&&r!==a){for(var b=0;b-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),c[e]="("+d.regex+")",a[e]="$";for(var f=e+1,g=e+d.key.length;g>f;f++)c[f]="",a[f]="$";a=a.join(""),b.push({index:e,key:d.key,apply:d.apply,matcher:d.regex})}}),{regex:new RegExp("^"+c.join("")+"$"),map:d(b,"index")}}function h(a){for(var b,c,d=[],e=0;e=a.length||"'"!==a.charAt(e+1))&&(d.push(i(a,c,e)),c=null);else if(e===a.length)for(;cc?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function l(a){return parseInt(a,10)}function m(a,b){return a&&b?q(a,b):a}function n(a,b){return a&&b?q(a,b,!0):a}function o(a,b){a=a.replace(/:/g,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function p(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function q(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=o(b,d);return p(a,c*(e-d))}var r,s,t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){r=b.id,this.parsers={},this.formatters={},s=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=l(c+d),this.minutes+=l(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}],angular.version.major>=1&&angular.version.minor>4&&s.push({key:"LLLL",regex:b.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.STANDALONEMONTH.indexOf(a)},formatter:function(a){return c(a,"LLLL")}})},this.init(),this.getParser=function(a){var b=f(a);return b&&b.apply||null},this.overrideParser=function(a,b){var c=f(a);c&&angular.isFunction(b)&&(this.parsers={},c.apply=b)}.bind(this),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==r&&this.init(),this.formatters[c]||(this.formatters[c]=h(c));var d=this.formatters[c];return d.reduce(function(b,c){return b+c(a)},"")},this.parse=function(c,d,e){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(t,"\\$&"),b.id!==r&&this.init(),this.parsers[d]||(this.parsers[d]=g(d,"apply"));var f=this.parsers[d],h=f.regex,i=f.map,j=c.match(h),l=!1;if(j&&j.length){var m,n;angular.isDate(e)&&!isNaN(e.getTime())?m={year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}:(e&&a.warn("dateparser:","baseDate is not a valid date"),m={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var o=1,p=j.length;p>o;o++){var q=i[o-1];"Z"===q.matcher&&(l=!0),q.apply&&q.apply.call(m,j[o])}var s=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return k(m.year,m.month,m.date)&&(!angular.isDate(e)||isNaN(e.getTime())||l?(n=new Date(0),s.call(n,m.year,m.month,m.date),u.call(n,m.hours||0,m.minutes||0,m.seconds||0,m.milliseconds||0)):(n=new Date(e),s.call(n,m.year,m.month,m.date),u.call(n,m.hours,m.minutes,m.seconds,m.milliseconds))),n}},this.toTimezone=m,this.fromTimezone=n,this.timezoneToOffset=o,this.addDateMinutes=p,this.convertTimezoneToLocal=q}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}function n(b){var c;if(angular.version.minor<6)c=b.$options||a.datepickerOptions.ngModelOptions||i.ngModelOptions||{},c.getOption=function(a){return c[a]};else{var d=b.$options.getOption("timezone")||(a.datepickerOptions.ngModelOptions?a.datepickerOptions.ngModelOptions.timezone:null)||(i.ngModelOptions?i.ngModelOptions.timezone:null);c=b.$options.createChild(i.ngModelOptions).createChild(a.datepickerOptions.ngModelOptions).createChild(b.$options).createChild({timezone:d})}return c}var o=this,p={$setViewValue:angular.noop},q={},r=[];b.addClass("uib-datepicker"),c.$set("role","application"),a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:i.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":o[b]=angular.isDefined(a.datepickerOptions[b])?e(a.datepickerOptions[b])(a.$parent):i[b];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":o[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:i[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?o.startingDay=a.datepickerOptions.startingDay:angular.isNumber(i.startingDay)?o.startingDay=i.startingDay:o.startingDay=(f.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?o[b]=l.fromTimezone(new Date(a),q.getOption("timezone")):(j&&g.warn("Literal date support has been deprecated, please switch to date object usage"),o[b]=new Date(h(a,"medium"))):o[b]=i[b]?l.fromTimezone(new Date(i[b]),q.getOption("timezone")):null,o.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){o[b]=a[b]=angular.isDefined(c)?c:a.datepickerOptions[b],("minMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)o.modes.indexOf(o[b]))&&(a.datepickerMode=o[b],a.datepickerOptions.datepickerMode=o[b])}):o[b]=a[b]=i[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(c.disabled)||!1,angular.isDefined(c.ngDisabled)&&r.push(a.$parent.$watch(c.ngDisabled,function(b){a.disabled=b,o.refreshView()})),a.isActive=function(b){return 0===o.compare(b.date,o.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){p=b,q=n(p),a.datepickerOptions.initDate?(o.activeDate=l.fromTimezone(a.datepickerOptions.initDate,q.getOption("timezone"))||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(p.$isEmpty(p.$modelValue)||p.$invalid)&&(o.activeDate=l.fromTimezone(a,q.getOption("timezone")),o.refreshView())})):o.activeDate=new Date;var c=p.$modelValue?new Date(p.$modelValue):new Date;this.activeDate=isNaN(c)?l.fromTimezone(new Date,q.getOption("timezone")):l.fromTimezone(c,q.getOption("timezone")),p.$render=function(){o.render()}},this.render=function(){if(p.$viewValue){var a=new Date(p.$viewValue),b=!isNaN(a);b?this.activeDate=l.fromTimezone(a,q.getOption("timezone")):k||g.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=p.$viewValue?new Date(p.$viewValue):null;b=l.fromTimezone(b,q.getOption("timezone")),p.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=p.$viewValue?new Date(p.$viewValue):null;d=l.fromTimezone(d,q.getOption("timezone"));var e=new Date;e=l.fromTimezone(e,q.getOption("timezone"));var f=this.compare(b,e),g={date:b,label:l.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),o.activeDate&&0===this.compare(g.date,o.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===o.minMode){var c=p.$viewValue?l.fromTimezone(new Date(p.$viewValue),q.getOption("timezone")):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=l.toTimezone(c,q.getOption("timezone")),p.$setViewValue(c),p.$render()}else o.activeDate=b,m(o.modes[o.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=o.activeDate.getFullYear()+a*(o.step.years||0),c=o.activeDate.getMonth()+a*(o.step.months||0);o.activeDate.setFullYear(b,c,1),o.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===o.maxMode&&1===b||a.datepickerMode===o.minMode&&-1===b||(m(o.modes[o.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var s=function(){o.element[0].focus()};a.$on("uib:datepicker.focus",s),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),o.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(o.isDisabled(o.activeDate))return;a.select(o.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(o.handleKeyDown(c,b),o.refreshView()):a.toggleMode("up"===c?1:-1)},b.on("keydown",function(b){a.$apply(function(){a.keydown(b)})}),a.$on("$destroy",function(){for(;r.length;)r.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,this.monthColumns),a.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=this.monthColumns;else if("right"===a)c+=1;else if("down"===a)c+=this.monthColumns;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"}, -require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('
      ');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},adjustTop:function(a,b,c,d){return-1!==a.indexOf("top")&&c!==d?{top:b.top-d+"px"}:void 0},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,x,a.date);if(isNaN(c))for(var d=0;d
      "),D.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":B}),E=angular.element(D.children()[0]),E.attr("template-url",C),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),E.attr("datepicker-options","datepickerOptions"),K?G.$formatters.push(function(b){return a.date=l.fromTimezone(b,H.getOption("timezone")),b}):(G.$$parserName="date",G.$validators.date=s,G.$parsers.unshift(r),G.$formatters.push(function(b){return G.$isEmpty(b)?(a.date=b,b):(angular.isNumber(b)&&(b=new Date(b)),a.date=l.fromTimezone(b,H.getOption("timezone")),l.filter(a.date,x))})),G.$viewChangeListeners.push(function(){a.date=q(G.$viewValue)}),b.on("keydown",u),I=d(D)(a),D.remove(),z?h.find("body").append(I):b.after(I),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),I.remove(),b.off("keydown",u),h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,H.getOption("timezone")));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=new Date(a.datepickerOptions[b]):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){a.date=c;var d=a.date?l.filter(a.date,x):null;b.val(d),G.$setViewValue(d),y&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):(b=l.fromTimezone(d,H.getOption("timezone")),b.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),A&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;z||j.parsePlacement(d)[2]?(F=F||angular.element(j.scrollParent(b)),F&&F.on("scroll",v)):F=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,b,c){var d=null,e=c.createNew();this.isOnlyOpen=function(a,b){var c=e.get(b);if(c){var d=c.reduce(function(b,c){return c.scope===a?c:b},{});if(d)return 1===c.length}return!1},this.open=function(b,c,g){if(d||a.on("click",f),d&&d!==b&&(d.isOpen=!1),d=b,g){var h=e.get(g);if(h){var i=h.map(function(a){return a.scope});-1===i.indexOf(b)&&e.put(g,{scope:b})}else e.put(g,{scope:b})}},this.close=function(b,c,g){if(d===b&&(a.off("click",f),a.off("keydown",this.keybindFilter),d=null),g){var h=e.get(g);if(h){var i=h.reduce(function(a,c){return c.scope===b?c:a},{});i&&e.remove(g,i)}}};var f=function(a){if(d&&d.isOpen&&!(a&&"disabled"===d.getAutoClose()||a&&3===a.which)){var c=d.getToggleElement();if(!(a&&c&&c[0].contains(a.target))){var e=d.getDropdownElement();a&&"outsideClick"===d.getAutoClose()&&e&&e[0].contains(a.target)||(d.focusToggleElement(),d.isOpen=!1,b.$$phase||d.$apply())}}};this.keybindFilter=function(a){if(d){var b=d.getDropdownElement(),c=d.getToggleElement(),e=b&&b[0].contains(a.target),g=c&&c[0].contains(a.target);27===a.which?(a.stopPropagation(),d.focusToggleElement(),f()):d.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&d.isOpen&&(e||g)&&(a.preventDefault(),a.stopPropagation(),d.focusDropdownEntry(a.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){function l(){b.append(o.dropdownMenu)}var m,n,o=this,p=a.$new(),q=e.appendToOpenClass,r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=i.find("body");b.addClass("dropdown"),this.init=function(){c.isOpen&&(n=d(c.isOpen),s=n.assign,a.$watch(n,function(a){p.isOpen=!!a})),u=angular.isDefined(c.keyboardNav)},this.toggle=function(a){return p.isOpen=arguments.length?!!a:!p.isOpen,angular.isFunction(s)&&s(p,p.isOpen),p.isOpen},this.isOpen=function(){return p.isOpen},p.getToggleElement=function(){return o.toggleElement},p.getAutoClose=function(){return c.autoClose||"always"},p.getElement=function(){return b},p.isKeynavEnabled=function(){return u},p.focusDropdownEntry=function(a){var c=o.dropdownMenu?angular.element(o.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(o.selectedOption)?o.selectedOption=o.selectedOption===c.length-1?o.selectedOption:o.selectedOption+1:o.selectedOption=0;break;case 38:angular.isNumber(o.selectedOption)?o.selectedOption=0===o.selectedOption?0:o.selectedOption-1:o.selectedOption=c.length-1}c[o.selectedOption].focus()},p.getDropdownElement=function(){return o.dropdownMenu},p.focusToggleElement=function(){o.toggleElement&&o.toggleElement[0].focus()},p.$watch("isOpen",function(e,n){var u=null,w=!1;if(angular.isDefined(c.dropdownAppendTo)){var x=d(c.dropdownAppendTo)(p);x&&(u=angular.element(x))}if(angular.isDefined(c.dropdownAppendToBody)){var y=d(c.dropdownAppendToBody)(p);y!==!1&&(w=!0)}if(w&&!u&&(u=v),u&&o.dropdownMenu&&(e?(u.append(o.dropdownMenu),b.on("$destroy",l)):(b.off("$destroy",l),l())),u&&o.dropdownMenu){var z,A,B,C=h.positionElements(b,o.dropdownMenu,"bottom-left",!0),D=0;if(z={top:C.top+"px",display:e?"block":"none"},A=o.dropdownMenu.hasClass("dropdown-menu-right"),A?(z.left="auto",B=h.scrollbarPadding(u),B.heightOverflow&&B.scrollbarWidth&&(D=B.scrollbarWidth),z.right=window.innerWidth-D-(C.left+b.prop("offsetWidth"))+"px"):(z.left=C.left+"px",z.right="auto"),!w){var E=h.offset(u);z.top=C.top-E.top+"px",A?z.right=window.innerWidth-(C.left-E.left+b.prop("offsetWidth"))+"px":z.left=C.left-E.left+"px"}o.dropdownMenu.css(z)}var F=u?u:b,G=u?q:r,H=F.hasClass(G),I=f.isOnlyOpen(a,u);if(H===!e){var J;J=u?I?"removeClass":"addClass":e?"addClass":"removeClass",g[J](F,G).then(function(){angular.isDefined(e)&&e!==n&&t(a,{open:!!e})})}if(e)o.dropdownMenuTemplateUrl?k(o.dropdownMenuTemplateUrl).then(function(a){m=p.$new(),j(a.trim())(m,function(a){var b=a;o.dropdownMenu.replaceWith(b),o.dropdownMenu=b,i.on("keydown",f.keybindFilter)})}):i.on("keydown",f.keybindFilter),p.focusToggleElement(),f.open(p,b,u);else{if(f.close(p,b,u),o.dropdownMenuTemplateUrl){m&&m.$destroy();var K=angular.element('');o.dropdownMenu.replaceWith(K),o.dropdownMenu=K}o.selectedOption=null}angular.isFunction(s)&&s(a,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.on("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c-1&&A>a&&(a=A),a}function m(a,b){var c=x.get(a).value,d=c.appendTo;x.remove(a),B=x.top(),B&&(A=parseInt(B.value.modalDomEl.attr("index"),10)),p(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||w;y.remove(b,a);var e=y.hasKey(b);d.toggleClass(b,e),!e&&v&&v.heightOverflow&&v.scrollbarWidth&&(v.originalRight?d.css({paddingRight:v.originalRight+"px"}):d.css({paddingRight:""}),v=null),n(!0)},c.closedDeferred),o(),b&&b.focus?b.focus():d.focus&&d.focus()}function n(a){var b;x.length()>0&&(b=x.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function o(){if(t&&-1===l()){var a=u;p(t,u,function(){a=null}),t=void 0,u=void 0}}function p(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){d&&d(),b.remove(),e&&e.resolve()}),c.$destroy())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(z.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function q(a){if(a.isDefaultPrevented())return a;var b=x.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){z.dismiss(b.key,"escape key press")}));break;case 9:var c=z.loadFocusElementList(b),d=!1;a.shiftKey?(z.isFocusInFirstItem(a,c)||z.isModalFocused(a,b))&&(d=z.focusLastFocusableElement(c)):z.isFocusInLastItem(a,c)&&(d=z.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function r(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}function s(){Array.prototype.forEach.call(document.querySelectorAll("["+C+"]"),function(a){var b=parseInt(a.getAttribute(C),10),c=b-1;a.setAttribute(C,c),c||(a.removeAttribute(C),a.removeAttribute("aria-hidden"))})}var t,u,v,w="modal-open",x=h.createNew(),y=g.createNew(),z={NOW_CLOSING_EVENT:"modal.stack.now-closing"},A=0,B=null,C="data-bootstrap-modal-aria-hidden-count",D="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",E=/[A-Z]/g;return e.$watch(l,function(a){u&&(u.index=a)}),c.on("keydown",q),e.$on("$destroy",function(){c.off("keydown",q)}),z.open=function(b,f){function g(a){function b(a){var b=a.parent()?a.parent().children():[];return Array.prototype.filter.call(b,function(b){return b!==a[0]})}if(a&&"BODY"!==a[0].tagName)return b(a).forEach(function(a){var b="true"===a.getAttribute("aria-hidden"),c=parseInt(a.getAttribute(C),10);c||(c=b?1:0),a.setAttribute(C,c+1),a.setAttribute("aria-hidden","true")}),g(a.parent())}var h=c[0].activeElement,k=f.openedClass||w;n(!1),B=x.top(),x.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),y.put(k,b);var m=f.appendTo,o=l();o>=0&&!t&&(u=e.$new(!0),u.modalOptions=f,u.index=o,t=angular.element('
      '),t.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),f.backdropClass&&t.addClass(f.backdropClass),f.animation&&t.attr("modal-animation","true"),d(t)(u),a.enter(t,m),i.isScrollable(m)&&(v=i.scrollbarPadding(m),v.heightOverflow&&v.scrollbarWidth&&m.css({paddingRight:v.right+"px"})));var p;f.component?(p=document.createElement(j(f.component.name)),p=angular.element(p),p.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):p=f.content,A=B?parseInt(B.value.modalDomEl.attr("index"),10)+1:0;var q=angular.element('
      ');q.attr({"class":"modal","template-url":f.windowTemplateUrl,"window-top-class":f.windowTopClass,role:"dialog","aria-labelledby":f.ariaLabelledBy,"aria-describedby":f.ariaDescribedBy,size:f.size,index:A,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(p),f.windowClass&&q.addClass(f.windowClass),f.animation&&q.attr("modal-animation","true"),m.addClass(k),f.scope&&(f.scope.$$topModalIndex=A),a.enter(d(q)(f.scope),m),x.top().value.modalDomEl=q,x.top().value.modalOpener=h,g(q)},z.close=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),m(a,c.value.modalOpener),!0):!c},z.dismiss=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),m(a,c.value.modalOpener),!0):!c},z.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},z.getTop=function(){return x.top()},z.modalRendered=function(a){var b=x.get(a);b&&b.value.renderDeferred.resolve()},z.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},z.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},z.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},z.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},z.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},z.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(D);return c?Array.prototype.filter.call(c,function(a){return k(a)}):c}}},z}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return q}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!e.component&&!e.template&&!e.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var q;q=e.component?c.when(g.resolve(e.resolve,{},null,null)):c.all([i(e),g.resolve(e.resolve,{},null,null)]);var r;return r=k=c.all([k]).then(j,j).then(function(a){function c(b,c,d,e){b.$scope=g,b.$scope.$resolve={},d?b.$scope.$uibModalInstance=p:b.$uibModalInstance=p;var f=c?a[1]:a;angular.forEach(f,function(a,c){e&&(b[c]=a),b.$scope.$resolve[c]=a})}var d=e.scope||b,g=d.$new();g.$close=p.close,g.$dismiss=p.dismiss,g.$on("$destroy",function(){g.$$uibDestructionScheduled||g.$dismiss("$uibUnscheduledDestruction")});var i,j,k={scope:g,deferred:l,renderDeferred:o,closedDeferred:n,animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,ariaLabelledBy:e.ariaLabelledBy,ariaDescribedBy:e.ariaDescribedBy,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo},q={},r={};e.component?(c(q,!1,!0,!1),q.name=e.component,k.component=q):e.controller&&(c(r,!0,!1,!0),j=f(e.controller,r,!0,e.controllerAs),e.controllerAs&&e.bindToController&&(i=j.instance,i.$close=g.$close,i.$dismiss=g.$dismiss,angular.extend(i,{$resolve:r.$scope.$resolve},d)),i=j(),angular.isFunction(i.$onInit)&&i.$onInit()),e.component||(k.content=a[0]),h.open(p,k),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===r&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){ -b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},link:function(b,c,d,e){c.addClass("pager");var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,b.$set("role","menu"),d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},link:function(a,c,d,e){c.addClass("pagination");var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),b=null)}}var o=m.createNew();return h.on("keyup",n),k.$on("$destroy",function(){h.off("keyup",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
      ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){P.isOpen?q():m()}function m(){O&&!a.$eval(d[k+"Enable"])||(u(),x(),P.popupDelay?H||(H=g(r,P.popupDelay,!1)):r())}function q(){s(),P.popupCloseDelay?I||(I=g(t,P.popupCloseDelay,!1)):t()}function r(){return s(),u(),P.content?(v(),void P.$evalAsync(function(){P.isOpen=!0,y(!0),U()})):angular.noop}function s(){H&&(g.cancel(H),H=null),J&&(g.cancel(J),J=null)}function t(){P&&P.$evalAsync(function(){P&&(P.isOpen=!1,y(!1),P.animation?G||(G=g(w,150,!1)):w())})}function u(){I&&(g.cancel(I),I=null),G&&(g.cancel(G),G=null)}function v(){E||(F=P.$new(),E=c(F,function(a){M?h.find("body").append(a):b.after(a)}),o.add(P,{close:t}),z())}function w(){s(),u(),A(),E&&(E.remove(),E=null,K&&g.cancel(K)),o.remove(P),F&&(F.$destroy(),F=null)}function x(){P.title=d[k+"Title"],S?P.content=S(a):P.content=d[e],P.popupClass=d[k+"Class"],P.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(P.placement);L=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);P.popupDelay=isNaN(c)?n.popupDelay:c,P.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){R&&angular.isFunction(R.assign)&&R.assign(a,b)}function z(){T.length=0,S?(T.push(a.$watch(S,function(a){P.content=a,!a&&P.isOpen&&t()})),T.push(F.$watch(function(){Q||(Q=!0,F.$$postDigest(function(){Q=!1,P&&P.isOpen&&U()}))}))):T.push(d.$observe(e,function(a){P.content=a,!a&&P.isOpen?t():U()})),T.push(d.$observe(k+"Title",function(a){P.title=a,P.isOpen&&U()})),T.push(d.$observe(k+"Placement",function(a){P.placement=a?a:n.placement,P.isOpen&&U()}))}function A(){T.length&&(angular.forEach(T,function(a){a()}),T.length=0)}function B(a){P&&P.isOpen&&E&&(b[0].contains(a.target)||E[0].contains(a.target)||q())}function C(a){27===a.which&&q()}function D(){var c=[],e=[],f=a.$eval(d[k+"Trigger"]);V(),angular.isObject(f)?(Object.keys(f).forEach(function(a){c.push(a),e.push(f[a])}),N={show:c,hide:e}):N=p(f),"none"!==N.show&&N.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===N.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(N.hide[c],q)),b.on("keypress",C)})}var E,F,G,H,I,J,K,L,M=angular.isDefined(n.appendToBody)?n.appendToBody:!1,N=p(void 0),O=angular.isDefined(d[k+"Enable"]),P=a.$new(!0),Q=!1,R=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,S=n.useContentExp?l(d[e]):!1,T=[],U=function(){E&&E.html()&&(J||(J=g(function(){var a=i.positionElements(b,E,P.placement,M),c=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),d=M?i.offset(b):i.position(b);E.css({top:a.top+"px",left:a.left+"px"});var e=a.placement.split("-");E.hasClass(e[0])||(E.removeClass(L.split("-")[0]),E.addClass(e[0])),E.hasClass(n.placementClassPrefix+a.placement)||(E.removeClass(n.placementClassPrefix+L),E.addClass(n.placementClassPrefix+a.placement)),K=g(function(){var a=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),b=i.adjustTop(e,d,c,a);b&&E.css(b),K=null},0,!1),E.hasClass("uib-position-measure")?(i.positionArrow(E,a.placement),E.removeClass("uib-position-measure")):L!==a.placement&&i.positionArrow(E,a.placement),L=a.placement,J=null},0,!1)))};P.origScope=a,P.isOpen=!1,P.contentExp=function(){return P.content},d.$observe("disabled",function(a){a&&s(),a&&P.isOpen&&t()}),R&&a.$watch(R,function(a){P&&!a===P.isOpen&&j()});var V=function(){N.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j)),b.off("keypress",C)}),N.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};D();var W=a.$eval(d[k+"Animation"]);P.animation=angular.isDefined(W)?!!W:n.animation;var X,Y=k+"AppendToBody";X=Y in d&&void 0===d[Y]?!0:a.$eval(d[Y]),M=angular.isDefined(X)?X:M,a.$on("$destroy",function(){V(),w(),P=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;bb.index?1:a.index0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===y[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),x.$setViewValue(new Date(v)),n(a)}function m(){s&&s.$setValidity("hours",!0),t&&t.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),x.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(x.$modelValue){var c=v.getHours(),d=v.getMinutes(),e=v.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!z),"m"!==b&&(a.minutes=k(d)),a.meridian=v.getHours()<12?y[0]:y[1],"s"!==b&&(a.seconds=k(e)),a.meridian=v.getHours()<12?y[0]:y[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=y[0]}function o(a){v=q(v,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s,t,u,v=new Date,w=[],x={$setViewValue:angular.noop},y=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,z=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){x=b,x.$render=this.render,x.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2);s=e.controller("ngModel"),t=f.controller("ngModel"),u=h.controller("ngModel");var i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var A=g.hourStep;c.hourStep&&w.push(a.$parent.$watch(d(c.hourStep),function(a){A=+a}));var B=g.minuteStep;c.minuteStep&&w.push(a.$parent.$watch(d(c.minuteStep),function(a){B=+a}));var C;w.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);C=isNaN(b)?void 0:b}));var D;w.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);D=isNaN(b)?void 0:b}));var E=!1;c.ngDisabled&&w.push(a.$parent.$watch(d(c.ngDisabled),function(a){E=a})),a.noIncrementHours=function(){var a=p(v,60*A);return E||a>D||v>a&&C>a},a.noDecrementHours=function(){var a=p(v,60*-A);return E||C>a||a>v&&a>D},a.noIncrementMinutes=function(){var a=p(v,B);return E||a>D||v>a&&C>a},a.noDecrementMinutes=function(){var a=p(v,-B);return E||C>a||a>v&&a>D},a.noIncrementSeconds=function(){var a=q(v,F);return E||a>D||v>a&&C>a},a.noDecrementSeconds=function(){var a=q(v,-F);return E||C>a||a>v&&a>D},a.noToggleMeridian=function(){return v.getHours()<12?E||p(v,720)>D:E||p(v,-720)0};b.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){x.$setViewValue(null),x.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b,s&&s.$setValidity("hours",!1)),angular.isDefined(c)&&(a.invalidMinutes=c,t&&t.$setValidity("minutes",!1)),angular.isDefined(d)&&(a.invalidSeconds=d,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var a=h(),b=i();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(a),v.setMinutes(b),C>v||v>D?e(!0):l("h")):e(!0)},b.on("blur",function(b){x.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!z)})}),a.updateMinutes=function(){var a=i(),b=h();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(b),v.setMinutes(a),C>v||v>D?e(void 0,!0):l("m")):e(void 0,!0)},c.on("blur",function(b){x.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();x.$setDirty(),angular.isDefined(a)?(v.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.on("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=x.$viewValue;isNaN(b)?(x.$setValidity("time",!1),e.error('Timepicker 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.')):(b&&(v=b),C>v||v>D?(x.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*A*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-A*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*B)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-B)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(F)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-F)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(v.getHours()<12?60:-60)):a.meridian=a.meridian===y[0]?y[1]:y[0])},a.blur=function(){x.$setTouched()},a.$on("$destroy",function(){for(;w.length;)w.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){P.moveInProgress||(P.moveInProgress=!0,P.$digest()),$()}function o(){P.position=F?l.offset(b):l.position(b),P.position.top+=b.prop("offsetHeight")}function p(a){var b;return angular.version.minor<6?(b=a.$options||{},b.getOption=function(a){return b[a]}):b=a.$options,b}var q,r,s=[9,13,27,38,40],t=200,u=a.$eval(c.typeaheadMinLength);u||0===u||(u=1),a.$watch(c.typeaheadMinLength,function(a){u=a||0===a?a:1});var v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){w=a!==!1});var x,y,z=e(c.typeaheadLoading).assign||angular.noop,A=c.typeaheadShouldSelect?e(c.typeaheadShouldSelect):function(a,b){var c=b.$event;return 13===c.which||9===c.which},B=e(c.typeaheadOnSelect),C=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,D=e(c.typeaheadNoResults).assign||angular.noop,E=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,F=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,G=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,H=a.$eval(c.typeaheadFocusFirst)!==!1,I=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,J=e(c.typeaheadIsOpen).assign||angular.noop,K=a.$eval(c.typeaheadShowHint)||!1,L=e(c.ngModel),M=e(c.ngModel+"($$$p)"),N=function(b,c){return angular.isFunction(L(a))&&r.getOption("getterSetter")?M(b,{$$$p:c}):L.assign(b,c)},O=m.parse(c.uibTypeahead),P=a.$new(),Q=a.$on("$destroy",function(){P.$destroy()});P.$on("$destroy",Q);var R="typeahead-"+P.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":R});var S,T;K&&(S=angular.element("
      "),S.css("position","relative"),b.after(S),T=b.clone(),T.attr("placeholder",""),T.attr("tabindex","-1"),T.val(""),T.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),T.attr("id")&&T.removeAttr("id"),S.append(T),T.after(b));var U=angular.element("
      ");U.attr({id:R,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&U.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&U.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var V=function(){K&&T.val("")},W=function(){P.matches=[],P.activeIdx=-1,b.attr("aria-expanded",!1),V()},X=function(a){return R+"-option-"+a};P.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",X(a))});var Y=function(a,b){return P.matches.length>b&&a?a.toUpperCase()===P.matches[b].label.toUpperCase():!1},Z=function(c,d){var e={$viewValue:c};z(a,!0),D(a,!1),f.when(O.source(a,e)).then(function(f){var g=c===q.$viewValue;if(g&&x)if(f&&f.length>0){P.activeIdx=H?0:-1,D(a,!1),P.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?T.val(c+i.slice(c.length)):T.val("")}}else W(),D(a,!0);g&&z(a,!1)},function(){W(),z(a,!1),D(a,!0)})};F&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var $=k(function(){P.matches.length&&o(),P.moveInProgress=!1},t);P.moveInProgress=!1,P.query=void 0;var _,aa=function(a){_=g(function(){Z(a)},v)},ba=function(){_&&g.cancel(_)};W(),P.assignIsOpen=function(b){J(a,b)},P.select=function(d,e){var f,h,i={};y=!0,i[O.itemName]=h=P.matches[d].model,f=O.modelMapper(a,i),N(a,f),q.$setValidity("editable",!0),q.$setValidity("parse",!0),B(a,{$item:h,$model:f,$label:O.viewMapper(a,i),$event:e}),W(),P.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==P.matches.length&&-1!==s.indexOf(b.which)){var c=A(a,{$event:b});if(-1===P.activeIdx&&c||9===b.which&&b.shiftKey)return W(),void P.$digest();b.preventDefault();var d;switch(b.which){case 27:b.stopPropagation(),W(),a.$digest();break;case 38:P.activeIdx=(P.activeIdx>0?P.activeIdx:P.matches.length)-1,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;case 40:P.activeIdx=(P.activeIdx+1)%P.matches.length,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx], -d.parentNode.scrollTop=d.offsetTop;break;default:c&&P.$apply(function(){angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(P.activeIdx,b)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(P.activeIdx,b)})}}}),b.on("focus",function(a){x=!0,0!==u||q.$viewValue||g(function(){Z(q.$viewValue,a)},0)}),b.on("blur",function(a){C&&P.matches.length&&-1!==P.activeIdx&&!y&&(y=!0,P.$apply(function(){angular.isObject(P.debounceUpdate)&&angular.isNumber(P.debounceUpdate.blur)?k(function(){P.select(P.activeIdx,a)},P.debounceUpdate.blur):P.select(P.activeIdx,a)})),!w&&q.$error.editable&&(q.$setViewValue(),P.$apply(function(){q.$setValidity("editable",!0),q.$setValidity("parse",!0)}),b.val("")),x=!1,y=!1});var ca=function(c){b[0]!==c.target&&3!==c.which&&0!==P.matches.length&&(W(),j.$$phase||a.$digest())};h.on("click",ca),a.$on("$destroy",function(){h.off("click",ca),(F||G)&&da.remove(),F&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),U.remove(),K&&S.remove()});var da=d(U)(P);F?h.find("body").append(da):G?angular.element(G).eq(0).append(da):b.after(da),this.init=function(b){q=b,r=p(q),P.debounceUpdate=e(r.getOption("debounce"))(a),q.$parsers.unshift(function(b){return x=!0,0===u||b&&b.length>=u?v>0?(ba(),aa(b)):Z(b):(z(a,!1),ba(),W()),w?b:b?void q.$setValidity("editable",!1):(q.$setValidity("editable",!0),null)}),q.$formatters.push(function(b){var c,d,e={};return w||q.$setValidity("editable",!0),E?(e.$model=b,E(a,e)):(e[O.itemName]=b,c=O.viewMapper(a,e),e[O.itemName]=void 0,d=O.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(a,b,c,d){d[1].init(d[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'\n
      \n
      \n
      \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
      ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n
      \n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'\n\n \n previous\n\n\n \n next\n\n\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
      \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
      \n
      \n
      \n
      \n
      \n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      {{::label.abbr}}
      {{ weekNumbers[$index] }}\n \n
      \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
      \n \n
      \n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
      \n \n
      \n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html","
      \n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'
    • {{::getText(\'previous\')}}
    • \n
    • {{::getText(\'next\')}}
    • \n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n\n\n\n\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
      \n
      \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
      \n
      \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
      \n
      \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
      \n\n
      \n

      \n
      \n
      \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
      \n\n
      \n

      \n
      \n
      \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
      \n\n
      \n

      \n
      \n
      \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
      \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
      ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
      \n
      \n
      \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
      \n \n
      \n
      \n
      \n
      \n
      \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        
      \n \n :\n \n :\n \n
        
      \n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend(''),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend(''),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend(''),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap.js deleted file mode 100644 index 8bcf397b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap.js +++ /dev/null @@ -1,7412 +0,0 @@ -/* - * angular-ui-bootstrap - * http://angular-ui.github.io/bootstrap/ - - * Version: 2.5.0 - 2017-01-28 - * License: MIT - */angular.module("ui.bootstrap", ["ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","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.collapse', []) - - .directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) { - var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null; - return { - link: function(scope, element, attrs) { - var expandingExpr = $parse(attrs.expanding), - expandedExpr = $parse(attrs.expanded), - collapsingExpr = $parse(attrs.collapsing), - collapsedExpr = $parse(attrs.collapsed), - horizontal = false, - css = {}, - cssTo = {}; - - init(); - - function init() { - horizontal = !!('horizontal' in attrs); - if (horizontal) { - css = { - width: '' - }; - cssTo = {width: '0'}; - } else { - css = { - height: '' - }; - cssTo = {height: '0'}; - } - if (!scope.$eval(attrs.uibCollapse)) { - element.addClass('in') - .addClass('collapse') - .attr('aria-expanded', true) - .attr('aria-hidden', false) - .css(css); - } - } - - function getScrollFromElement(element) { - if (horizontal) { - return {width: element.scrollWidth + 'px'}; - } - return {height: element.scrollHeight + 'px'}; - } - - function expand() { - if (element.hasClass('collapse') && element.hasClass('in')) { - return; - } - - $q.resolve(expandingExpr(scope)) - .then(function() { - element.removeClass('collapse') - .addClass('collapsing') - .attr('aria-expanded', true) - .attr('aria-hidden', false); - - if ($animateCss) { - $animateCss(element, { - addClass: 'in', - easing: 'ease', - css: { - overflow: 'hidden' - }, - to: getScrollFromElement(element[0]) - }).start()['finally'](expandDone); - } else { - $animate.addClass(element, 'in', { - css: { - overflow: 'hidden' - }, - to: getScrollFromElement(element[0]) - }).then(expandDone); - } - }, angular.noop); - } - - function expandDone() { - element.removeClass('collapsing') - .addClass('collapse') - .css(css); - expandedExpr(scope); - } - - function collapse() { - if (!element.hasClass('collapse') && !element.hasClass('in')) { - return collapseDone(); - } - - $q.resolve(collapsingExpr(scope)) - .then(function() { - element - // IMPORTANT: The width must be set before adding "collapsing" class. - // Otherwise, the browser attempts to animate from width 0 (in - // collapsing class) to the given width here. - .css(getScrollFromElement(element[0])) - // initially all panel collapse have the collapse class, this removal - // prevents the animation from jumping to collapsed state - .removeClass('collapse') - .addClass('collapsing') - .attr('aria-expanded', false) - .attr('aria-hidden', true); - - if ($animateCss) { - $animateCss(element, { - removeClass: 'in', - to: cssTo - }).start()['finally'](collapseDone); - } else { - $animate.removeClass(element, 'in', { - to: cssTo - }).then(collapseDone); - } - }, angular.noop); - } - - function collapseDone() { - element.css(cssTo); // Required so that collapse works when animation is disabled - element.removeClass('collapsing') - .addClass('collapse'); - collapsedExpr(scope); - } - - scope.$watch(attrs.uibCollapse, function(shouldCollapse) { - if (shouldCollapse) { - collapse(); - } else { - expand(); - } - }); - } - }; - }]); - -angular.module('ui.bootstrap.tabindex', []) - -.directive('uibTabindexToggle', function() { - return { - restrict: 'A', - link: function(scope, elem, attrs) { - attrs.$observe('disabled', function(disabled) { - attrs.$set('tabindex', disabled ? -1 : null); - }); - } - }; -}); - -angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse', 'ui.bootstrap.tabindex']) - -.constant('uibAccordionConfig', { - closeOthers: true -}) - -.controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) { - // This array keeps track of the accordion groups - this.groups = []; - - // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to - this.closeOthers = function(openGroup) { - var closeOthers = angular.isDefined($attrs.closeOthers) ? - $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers; - if (closeOthers) { - angular.forEach(this.groups, function(group) { - if (group !== openGroup) { - group.isOpen = false; - } - }); - } - }; - - // This is called from the accordion-group directive to add itself to the accordion - this.addGroup = function(groupScope) { - var that = this; - this.groups.push(groupScope); - - groupScope.$on('$destroy', function(event) { - that.removeGroup(groupScope); - }); - }; - - // This is called from the accordion-group directive when to remove itself - this.removeGroup = function(group) { - var index = this.groups.indexOf(group); - if (index !== -1) { - this.groups.splice(index, 1); - } - }; -}]) - -// The accordion directive simply sets up the directive controller -// and adds an accordion CSS class to itself element. -.directive('uibAccordion', function() { - return { - controller: 'UibAccordionController', - controllerAs: 'accordion', - transclude: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/accordion/accordion.html'; - } - }; -}) - -// The accordion-group directive indicates a block of html that will expand and collapse in an accordion -.directive('uibAccordionGroup', function() { - return { - require: '^uibAccordion', // We need this directive to be inside an accordion - transclude: true, // It transcludes the contents of the directive into the template - restrict: 'A', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/accordion/accordion-group.html'; - }, - scope: { - heading: '@', // Interpolate the heading attribute onto this scope - panelClass: '@?', // Ditto with panelClass - isOpen: '=?', - isDisabled: '=?' - }, - controller: function() { - this.setHeading = function(element) { - this.heading = element; - }; - }, - link: function(scope, element, attrs, accordionCtrl) { - element.addClass('panel'); - accordionCtrl.addGroup(scope); - - scope.openClass = attrs.openClass || 'panel-open'; - scope.panelClass = attrs.panelClass || 'panel-default'; - scope.$watch('isOpen', function(value) { - element.toggleClass(scope.openClass, !!value); - if (value) { - accordionCtrl.closeOthers(scope); - } - }); - - scope.toggleOpen = function($event) { - if (!scope.isDisabled) { - if (!$event || $event.which === 32) { - scope.isOpen = !scope.isOpen; - } - } - }; - - var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000); - scope.headingId = id + '-tab'; - scope.panelId = id + '-panel'; - } - }; -}) - -// Use accordion-heading below an accordion-group to provide a heading containing HTML -.directive('uibAccordionHeading', function() { - return { - transclude: true, // Grab the contents to be used as the heading - template: '', // In effect remove this element! - replace: true, - require: '^uibAccordionGroup', - link: function(scope, element, attrs, accordionGroupCtrl, transclude) { - // Pass the heading to the accordion-group controller - // so that it can be transcluded into the right place in the template - // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat] - accordionGroupCtrl.setHeading(transclude(scope, angular.noop)); - } - }; -}) - -// Use in the accordion-group template to indicate where you want the heading to be transcluded -// You must provide the property on the accordion-group controller that will hold the transcluded element -.directive('uibAccordionTransclude', function() { - return { - require: '^uibAccordionGroup', - link: function(scope, element, attrs, controller) { - scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) { - if (heading) { - var elem = angular.element(element[0].querySelector(getHeaderSelectors())); - elem.html(''); - elem.append(heading); - } - }); - } - }; - - function getHeaderSelectors() { - return 'uib-accordion-header,' + - 'data-uib-accordion-header,' + - 'x-uib-accordion-header,' + - 'uib\\:accordion-header,' + - '[uib-accordion-header],' + - '[data-uib-accordion-header],' + - '[x-uib-accordion-header]'; - } -}); - -angular.module('ui.bootstrap.alert', []) - -.controller('UibAlertController', ['$scope', '$element', '$attrs', '$interpolate', '$timeout', function($scope, $element, $attrs, $interpolate, $timeout) { - $scope.closeable = !!$attrs.close; - $element.addClass('alert'); - $attrs.$set('role', 'alert'); - if ($scope.closeable) { - $element.addClass('alert-dismissible'); - } - - var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ? - $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null; - - if (dismissOnTimeout) { - $timeout(function() { - $scope.close(); - }, parseInt(dismissOnTimeout, 10)); - } -}]) - -.directive('uibAlert', function() { - return { - controller: 'UibAlertController', - controllerAs: 'alert', - restrict: 'A', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/alert/alert.html'; - }, - transclude: true, - scope: { - close: '&' - } - }; -}); - -angular.module('ui.bootstrap.buttons', []) - -.constant('uibButtonConfig', { - activeClass: 'active', - toggleEvent: 'click' -}) - -.controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) { - this.activeClass = buttonConfig.activeClass || 'active'; - this.toggleEvent = buttonConfig.toggleEvent || 'click'; -}]) - -.directive('uibBtnRadio', ['$parse', function($parse) { - return { - require: ['uibBtnRadio', 'ngModel'], - controller: 'UibButtonsController', - controllerAs: 'buttons', - link: function(scope, element, attrs, ctrls) { - var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - var uncheckableExpr = $parse(attrs.uibUncheckable); - - element.find('input').css({display: 'none'}); - - //model -> UI - ngModelCtrl.$render = function() { - element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio))); - }; - - //ui->model - element.on(buttonsCtrl.toggleEvent, function() { - if (attrs.disabled) { - return; - } - - var isActive = element.hasClass(buttonsCtrl.activeClass); - - if (!isActive || angular.isDefined(attrs.uncheckable)) { - scope.$apply(function() { - ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio)); - ngModelCtrl.$render(); - }); - } - }); - - if (attrs.uibUncheckable) { - scope.$watch(uncheckableExpr, function(uncheckable) { - attrs.$set('uncheckable', uncheckable ? '' : undefined); - }); - } - } - }; -}]) - -.directive('uibBtnCheckbox', function() { - return { - require: ['uibBtnCheckbox', 'ngModel'], - controller: 'UibButtonsController', - controllerAs: 'button', - link: function(scope, element, attrs, ctrls) { - var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - element.find('input').css({display: 'none'}); - - function getTrueValue() { - return getCheckboxValue(attrs.btnCheckboxTrue, true); - } - - function getFalseValue() { - return getCheckboxValue(attrs.btnCheckboxFalse, false); - } - - function getCheckboxValue(attribute, defaultValue) { - return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue; - } - - //model -> UI - ngModelCtrl.$render = function() { - element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue())); - }; - - //ui->model - element.on(buttonsCtrl.toggleEvent, function() { - if (attrs.disabled) { - return; - } - - scope.$apply(function() { - ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue()); - ngModelCtrl.$render(); - }); - }); - } - }; -}); - -angular.module('ui.bootstrap.carousel', []) - -.controller('UibCarouselController', ['$scope', '$element', '$interval', '$timeout', '$animate', function($scope, $element, $interval, $timeout, $animate) { - var self = this, - slides = self.slides = $scope.slides = [], - SLIDE_DIRECTION = 'uib-slideDirection', - currentIndex = $scope.active, - currentInterval, isPlaying; - - var destroyed = false; - $element.addClass('carousel'); - - self.addSlide = function(slide, element) { - slides.push({ - slide: slide, - element: element - }); - slides.sort(function(a, b) { - return +a.slide.index - +b.slide.index; - }); - //if this is the first slide or the slide is set to active, select it - if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) { - if ($scope.$currentTransition) { - $scope.$currentTransition = null; - } - - currentIndex = slide.index; - $scope.active = slide.index; - setActive(currentIndex); - self.select(slides[findSlideIndex(slide)]); - if (slides.length === 1) { - $scope.play(); - } - } - }; - - self.getCurrentIndex = function() { - for (var i = 0; i < slides.length; i++) { - if (slides[i].slide.index === currentIndex) { - return i; - } - } - }; - - self.next = $scope.next = function() { - var newIndex = (self.getCurrentIndex() + 1) % slides.length; - - if (newIndex === 0 && $scope.noWrap()) { - $scope.pause(); - return; - } - - return self.select(slides[newIndex], 'next'); - }; - - self.prev = $scope.prev = function() { - var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1; - - if ($scope.noWrap() && newIndex === slides.length - 1) { - $scope.pause(); - return; - } - - return self.select(slides[newIndex], 'prev'); - }; - - self.removeSlide = function(slide) { - var index = findSlideIndex(slide); - - //get the index of the slide inside the carousel - slides.splice(index, 1); - if (slides.length > 0 && currentIndex === index) { - if (index >= slides.length) { - currentIndex = slides.length - 1; - $scope.active = currentIndex; - setActive(currentIndex); - self.select(slides[slides.length - 1]); - } else { - currentIndex = index; - $scope.active = currentIndex; - setActive(currentIndex); - self.select(slides[index]); - } - } else if (currentIndex > index) { - currentIndex--; - $scope.active = currentIndex; - } - - //clean the active value when no more slide - if (slides.length === 0) { - currentIndex = null; - $scope.active = null; - } - }; - - /* direction: "prev" or "next" */ - self.select = $scope.select = function(nextSlide, direction) { - var nextIndex = findSlideIndex(nextSlide.slide); - //Decide direction if it's not given - if (direction === undefined) { - direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev'; - } - //Prevent this user-triggered transition from occurring if there is already one in progress - if (nextSlide.slide.index !== currentIndex && - !$scope.$currentTransition) { - goNext(nextSlide.slide, nextIndex, direction); - } - }; - - /* Allow outside people to call indexOf on slides array */ - $scope.indexOfSlide = function(slide) { - return +slide.slide.index; - }; - - $scope.isActive = function(slide) { - return $scope.active === slide.slide.index; - }; - - $scope.isPrevDisabled = function() { - return $scope.active === 0 && $scope.noWrap(); - }; - - $scope.isNextDisabled = function() { - return $scope.active === slides.length - 1 && $scope.noWrap(); - }; - - $scope.pause = function() { - if (!$scope.noPause) { - isPlaying = false; - resetTimer(); - } - }; - - $scope.play = function() { - if (!isPlaying) { - isPlaying = true; - restartTimer(); - } - }; - - $element.on('mouseenter', $scope.pause); - $element.on('mouseleave', $scope.play); - - $scope.$on('$destroy', function() { - destroyed = true; - resetTimer(); - }); - - $scope.$watch('noTransition', function(noTransition) { - $animate.enabled($element, !noTransition); - }); - - $scope.$watch('interval', restartTimer); - - $scope.$watchCollection('slides', resetTransition); - - $scope.$watch('active', function(index) { - if (angular.isNumber(index) && currentIndex !== index) { - for (var i = 0; i < slides.length; i++) { - if (slides[i].slide.index === index) { - index = i; - break; - } - } - - var slide = slides[index]; - if (slide) { - setActive(index); - self.select(slides[index]); - currentIndex = index; - } - } - }); - - function getSlideByIndex(index) { - for (var i = 0, l = slides.length; i < l; ++i) { - if (slides[i].index === index) { - return slides[i]; - } - } - } - - function setActive(index) { - for (var i = 0; i < slides.length; i++) { - slides[i].slide.active = i === index; - } - } - - function goNext(slide, index, direction) { - if (destroyed) { - return; - } - - angular.extend(slide, {direction: direction}); - angular.extend(slides[currentIndex].slide || {}, {direction: direction}); - if ($animate.enabled($element) && !$scope.$currentTransition && - slides[index].element && self.slides.length > 1) { - slides[index].element.data(SLIDE_DIRECTION, slide.direction); - var currentIdx = self.getCurrentIndex(); - - if (angular.isNumber(currentIdx) && slides[currentIdx].element) { - slides[currentIdx].element.data(SLIDE_DIRECTION, slide.direction); - } - - $scope.$currentTransition = true; - $animate.on('addClass', slides[index].element, function(element, phase) { - if (phase === 'close') { - $scope.$currentTransition = null; - $animate.off('addClass', element); - } - }); - } - - $scope.active = slide.index; - currentIndex = slide.index; - setActive(index); - - //every time you change slides, reset the timer - restartTimer(); - } - - function findSlideIndex(slide) { - for (var i = 0; i < slides.length; i++) { - if (slides[i].slide === slide) { - return i; - } - } - } - - function resetTimer() { - if (currentInterval) { - $interval.cancel(currentInterval); - currentInterval = null; - } - } - - function resetTransition(slides) { - if (!slides.length) { - $scope.$currentTransition = null; - } - } - - function restartTimer() { - resetTimer(); - var interval = +$scope.interval; - if (!isNaN(interval) && interval > 0) { - currentInterval = $interval(timerFn, interval); - } - } - - function timerFn() { - var interval = +$scope.interval; - if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) { - $scope.next(); - } else { - $scope.pause(); - } - } -}]) - -.directive('uibCarousel', function() { - return { - transclude: true, - controller: 'UibCarouselController', - controllerAs: 'carousel', - restrict: 'A', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/carousel/carousel.html'; - }, - scope: { - active: '=', - interval: '=', - noTransition: '=', - noPause: '=', - noWrap: '&' - } - }; -}) - -.directive('uibSlide', ['$animate', function($animate) { - return { - require: '^uibCarousel', - restrict: 'A', - transclude: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/carousel/slide.html'; - }, - scope: { - actual: '=?', - index: '=?' - }, - link: function (scope, element, attrs, carouselCtrl) { - element.addClass('item'); - carouselCtrl.addSlide(scope, element); - //when the scope is destroyed then remove the slide from the current slides array - scope.$on('$destroy', function() { - carouselCtrl.removeSlide(scope); - }); - - scope.$watch('active', function(active) { - $animate[active ? 'addClass' : 'removeClass'](element, 'active'); - }); - } - }; -}]) - -.animation('.item', ['$animateCss', -function($animateCss) { - var SLIDE_DIRECTION = 'uib-slideDirection'; - - function removeClass(element, className, callback) { - element.removeClass(className); - if (callback) { - callback(); - } - } - - return { - beforeAddClass: function(element, className, done) { - if (className === 'active') { - var stopped = false; - var direction = element.data(SLIDE_DIRECTION); - var directionClass = direction === 'next' ? 'left' : 'right'; - var removeClassFn = removeClass.bind(this, element, - directionClass + ' ' + direction, done); - element.addClass(direction); - - $animateCss(element, {addClass: directionClass}) - .start() - .done(removeClassFn); - - return function() { - stopped = true; - }; - } - done(); - }, - beforeRemoveClass: function (element, className, done) { - if (className === 'active') { - var stopped = false; - var direction = element.data(SLIDE_DIRECTION); - var directionClass = direction === 'next' ? 'left' : 'right'; - var removeClassFn = removeClass.bind(this, element, directionClass, done); - - $animateCss(element, {addClass: directionClass}) - .start() - .done(removeClassFn); - - return function() { - stopped = true; - }; - } - done(); - } - }; -}]); - -angular.module('ui.bootstrap.dateparser', []) - -.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) { - // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js - var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g; - - var localeId; - var formatCodeToRegex; - - this.init = function() { - localeId = $locale.id; - - this.parsers = {}; - this.formatters = {}; - - formatCodeToRegex = [ - { - key: 'yyyy', - regex: '\\d{4}', - apply: function(value) { this.year = +value; }, - formatter: function(date) { - var _date = new Date(); - _date.setFullYear(Math.abs(date.getFullYear())); - return dateFilter(_date, 'yyyy'); - } - }, - { - key: 'yy', - regex: '\\d{2}', - apply: function(value) { value = +value; this.year = value < 69 ? value + 2000 : value + 1900; }, - formatter: function(date) { - var _date = new Date(); - _date.setFullYear(Math.abs(date.getFullYear())); - return dateFilter(_date, 'yy'); - } - }, - { - key: 'y', - regex: '\\d{1,4}', - apply: function(value) { this.year = +value; }, - formatter: function(date) { - var _date = new Date(); - _date.setFullYear(Math.abs(date.getFullYear())); - return dateFilter(_date, 'y'); - } - }, - { - key: 'M!', - regex: '0?[1-9]|1[0-2]', - apply: function(value) { this.month = value - 1; }, - formatter: function(date) { - var value = date.getMonth(); - if (/^[0-9]$/.test(value)) { - return dateFilter(date, 'MM'); - } - - return dateFilter(date, 'M'); - } - }, - { - key: 'MMMM', - regex: $locale.DATETIME_FORMATS.MONTH.join('|'), - apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); }, - formatter: function(date) { return dateFilter(date, 'MMMM'); } - }, - { - key: 'MMM', - regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'), - apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); }, - formatter: function(date) { return dateFilter(date, 'MMM'); } - }, - { - key: 'MM', - regex: '0[1-9]|1[0-2]', - apply: function(value) { this.month = value - 1; }, - formatter: function(date) { return dateFilter(date, 'MM'); } - }, - { - key: 'M', - regex: '[1-9]|1[0-2]', - apply: function(value) { this.month = value - 1; }, - formatter: function(date) { return dateFilter(date, 'M'); } - }, - { - key: 'd!', - regex: '[0-2]?[0-9]{1}|3[0-1]{1}', - apply: function(value) { this.date = +value; }, - formatter: function(date) { - var value = date.getDate(); - if (/^[1-9]$/.test(value)) { - return dateFilter(date, 'dd'); - } - - return dateFilter(date, 'd'); - } - }, - { - key: 'dd', - regex: '[0-2][0-9]{1}|3[0-1]{1}', - apply: function(value) { this.date = +value; }, - formatter: function(date) { return dateFilter(date, 'dd'); } - }, - { - key: 'd', - regex: '[1-2]?[0-9]{1}|3[0-1]{1}', - apply: function(value) { this.date = +value; }, - formatter: function(date) { return dateFilter(date, 'd'); } - }, - { - key: 'EEEE', - regex: $locale.DATETIME_FORMATS.DAY.join('|'), - formatter: function(date) { return dateFilter(date, 'EEEE'); } - }, - { - key: 'EEE', - regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|'), - formatter: function(date) { return dateFilter(date, 'EEE'); } - }, - { - key: 'HH', - regex: '(?:0|1)[0-9]|2[0-3]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'HH'); } - }, - { - key: 'hh', - regex: '0[0-9]|1[0-2]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'hh'); } - }, - { - key: 'H', - regex: '1?[0-9]|2[0-3]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'H'); } - }, - { - key: 'h', - regex: '[0-9]|1[0-2]', - apply: function(value) { this.hours = +value; }, - formatter: function(date) { return dateFilter(date, 'h'); } - }, - { - key: 'mm', - regex: '[0-5][0-9]', - apply: function(value) { this.minutes = +value; }, - formatter: function(date) { return dateFilter(date, 'mm'); } - }, - { - key: 'm', - regex: '[0-9]|[1-5][0-9]', - apply: function(value) { this.minutes = +value; }, - formatter: function(date) { return dateFilter(date, 'm'); } - }, - { - key: 'sss', - regex: '[0-9][0-9][0-9]', - apply: function(value) { this.milliseconds = +value; }, - formatter: function(date) { return dateFilter(date, 'sss'); } - }, - { - key: 'ss', - regex: '[0-5][0-9]', - apply: function(value) { this.seconds = +value; }, - formatter: function(date) { return dateFilter(date, 'ss'); } - }, - { - key: 's', - regex: '[0-9]|[1-5][0-9]', - apply: function(value) { this.seconds = +value; }, - formatter: function(date) { return dateFilter(date, 's'); } - }, - { - key: 'a', - regex: $locale.DATETIME_FORMATS.AMPMS.join('|'), - apply: function(value) { - if (this.hours === 12) { - this.hours = 0; - } - - if (value === 'PM') { - this.hours += 12; - } - }, - formatter: function(date) { return dateFilter(date, 'a'); } - }, - { - key: 'Z', - regex: '[+-]\\d{4}', - apply: function(value) { - var matches = value.match(/([+-])(\d{2})(\d{2})/), - sign = matches[1], - hours = matches[2], - minutes = matches[3]; - this.hours += toInt(sign + hours); - this.minutes += toInt(sign + minutes); - }, - formatter: function(date) { - return dateFilter(date, 'Z'); - } - }, - { - key: 'ww', - regex: '[0-4][0-9]|5[0-3]', - formatter: function(date) { return dateFilter(date, 'ww'); } - }, - { - key: 'w', - regex: '[0-9]|[1-4][0-9]|5[0-3]', - formatter: function(date) { return dateFilter(date, 'w'); } - }, - { - key: 'GGGG', - regex: $locale.DATETIME_FORMATS.ERANAMES.join('|').replace(/\s/g, '\\s'), - formatter: function(date) { return dateFilter(date, 'GGGG'); } - }, - { - key: 'GGG', - regex: $locale.DATETIME_FORMATS.ERAS.join('|'), - formatter: function(date) { return dateFilter(date, 'GGG'); } - }, - { - key: 'GG', - regex: $locale.DATETIME_FORMATS.ERAS.join('|'), - formatter: function(date) { return dateFilter(date, 'GG'); } - }, - { - key: 'G', - regex: $locale.DATETIME_FORMATS.ERAS.join('|'), - formatter: function(date) { return dateFilter(date, 'G'); } - } - ]; - - if (angular.version.major >= 1 && angular.version.minor > 4) { - formatCodeToRegex.push({ - key: 'LLLL', - regex: $locale.DATETIME_FORMATS.STANDALONEMONTH.join('|'), - apply: function(value) { this.month = $locale.DATETIME_FORMATS.STANDALONEMONTH.indexOf(value); }, - formatter: function(date) { return dateFilter(date, 'LLLL'); } - }); - } - }; - - this.init(); - - function getFormatCodeToRegex(key) { - return filterFilter(formatCodeToRegex, {key: key}, true)[0]; - } - - this.getParser = function (key) { - var f = getFormatCodeToRegex(key); - return f && f.apply || null; - }; - - this.overrideParser = function (key, parser) { - var f = getFormatCodeToRegex(key); - if (f && angular.isFunction(parser)) { - this.parsers = {}; - f.apply = parser; - } - }.bind(this); - - function createParser(format) { - var map = [], regex = format.split(''); - - // check for literal values - var quoteIndex = format.indexOf('\''); - if (quoteIndex > -1) { - var inLiteral = false; - format = format.split(''); - for (var i = quoteIndex; i < format.length; i++) { - if (inLiteral) { - if (format[i] === '\'') { - if (i + 1 < format.length && format[i+1] === '\'') { // escaped single quote - format[i+1] = '$'; - regex[i+1] = ''; - } else { // end of literal - regex[i] = ''; - inLiteral = false; - } - } - format[i] = '$'; - } else { - if (format[i] === '\'') { // start of literal - format[i] = '$'; - regex[i] = ''; - inLiteral = true; - } - } - } - - format = format.join(''); - } - - angular.forEach(formatCodeToRegex, function(data) { - var index = format.indexOf(data.key); - - if (index > -1) { - format = format.split(''); - - regex[index] = '(' + data.regex + ')'; - format[index] = '$'; // Custom symbol to define consumed part of format - for (var i = index + 1, n = index + data.key.length; i < n; i++) { - regex[i] = ''; - format[i] = '$'; - } - format = format.join(''); - - map.push({ - index: index, - key: data.key, - apply: data.apply, - matcher: data.regex - }); - } - }); - - return { - regex: new RegExp('^' + regex.join('') + '$'), - map: orderByFilter(map, 'index') - }; - } - - function createFormatter(format) { - var formatters = []; - var i = 0; - var formatter, literalIdx; - while (i < format.length) { - if (angular.isNumber(literalIdx)) { - if (format.charAt(i) === '\'') { - if (i + 1 >= format.length || format.charAt(i + 1) !== '\'') { - formatters.push(constructLiteralFormatter(format, literalIdx, i)); - literalIdx = null; - } - } else if (i === format.length) { - while (literalIdx < format.length) { - formatter = constructFormatterFromIdx(format, literalIdx); - formatters.push(formatter); - literalIdx = formatter.endIdx; - } - } - - i++; - continue; - } - - if (format.charAt(i) === '\'') { - literalIdx = i; - i++; - continue; - } - - formatter = constructFormatterFromIdx(format, i); - - formatters.push(formatter.parser); - i = formatter.endIdx; - } - - return formatters; - } - - function constructLiteralFormatter(format, literalIdx, endIdx) { - return function() { - return format.substr(literalIdx + 1, endIdx - literalIdx - 1); - }; - } - - function constructFormatterFromIdx(format, i) { - var currentPosStr = format.substr(i); - for (var j = 0; j < formatCodeToRegex.length; j++) { - if (new RegExp('^' + formatCodeToRegex[j].key).test(currentPosStr)) { - var data = formatCodeToRegex[j]; - return { - endIdx: i + data.key.length, - parser: data.formatter - }; - } - } - - return { - endIdx: i + 1, - parser: function() { - return currentPosStr.charAt(0); - } - }; - } - - this.filter = function(date, format) { - if (!angular.isDate(date) || isNaN(date) || !format) { - return ''; - } - - format = $locale.DATETIME_FORMATS[format] || format; - - if ($locale.id !== localeId) { - this.init(); - } - - if (!this.formatters[format]) { - this.formatters[format] = createFormatter(format); - } - - var formatters = this.formatters[format]; - - return formatters.reduce(function(str, formatter) { - return str + formatter(date); - }, ''); - }; - - this.parse = function(input, format, baseDate) { - if (!angular.isString(input) || !format) { - return input; - } - - format = $locale.DATETIME_FORMATS[format] || format; - format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&'); - - if ($locale.id !== localeId) { - this.init(); - } - - if (!this.parsers[format]) { - this.parsers[format] = createParser(format, 'apply'); - } - - var parser = this.parsers[format], - regex = parser.regex, - map = parser.map, - results = input.match(regex), - tzOffset = false; - if (results && results.length) { - var fields, dt; - if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) { - fields = { - year: baseDate.getFullYear(), - month: baseDate.getMonth(), - date: baseDate.getDate(), - hours: baseDate.getHours(), - minutes: baseDate.getMinutes(), - seconds: baseDate.getSeconds(), - milliseconds: baseDate.getMilliseconds() - }; - } else { - if (baseDate) { - $log.warn('dateparser:', 'baseDate is not a valid date'); - } - fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }; - } - - for (var i = 1, n = results.length; i < n; i++) { - var mapper = map[i - 1]; - if (mapper.matcher === 'Z') { - tzOffset = true; - } - - if (mapper.apply) { - mapper.apply.call(fields, results[i]); - } - } - - var datesetter = tzOffset ? Date.prototype.setUTCFullYear : - Date.prototype.setFullYear; - var timesetter = tzOffset ? Date.prototype.setUTCHours : - Date.prototype.setHours; - - if (isValid(fields.year, fields.month, fields.date)) { - if (angular.isDate(baseDate) && !isNaN(baseDate.getTime()) && !tzOffset) { - dt = new Date(baseDate); - datesetter.call(dt, fields.year, fields.month, fields.date); - timesetter.call(dt, fields.hours, fields.minutes, - fields.seconds, fields.milliseconds); - } else { - dt = new Date(0); - datesetter.call(dt, fields.year, fields.month, fields.date); - timesetter.call(dt, fields.hours || 0, fields.minutes || 0, - fields.seconds || 0, fields.milliseconds || 0); - } - } - - return dt; - } - }; - - // Check if date is valid for specific month (and year for February). - // Month: 0 = Jan, 1 = Feb, etc - function isValid(year, month, date) { - if (date < 1) { - return false; - } - - if (month === 1 && date > 28) { - return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0); - } - - if (month === 3 || month === 5 || month === 8 || month === 10) { - return date < 31; - } - - return true; - } - - function toInt(str) { - return parseInt(str, 10); - } - - this.toTimezone = toTimezone; - this.fromTimezone = fromTimezone; - this.timezoneToOffset = timezoneToOffset; - this.addDateMinutes = addDateMinutes; - this.convertTimezoneToLocal = convertTimezoneToLocal; - - function toTimezone(date, timezone) { - return date && timezone ? convertTimezoneToLocal(date, timezone) : date; - } - - function fromTimezone(date, timezone) { - return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date; - } - - //https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207 - function timezoneToOffset(timezone, fallback) { - timezone = timezone.replace(/:/g, ''); - var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; - return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; - } - - function addDateMinutes(date, minutes) { - date = new Date(date.getTime()); - date.setMinutes(date.getMinutes() + minutes); - return date; - } - - function convertTimezoneToLocal(date, timezone, reverse) { - reverse = reverse ? -1 : 1; - var dateTimezoneOffset = date.getTimezoneOffset(); - var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); - return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset)); - } -}]); - -// Avoiding use of ng-class as it creates a lot of watchers when a class is to be applied to -// at most one element. -angular.module('ui.bootstrap.isClass', []) -.directive('uibIsClass', [ - '$animate', -function ($animate) { - // 11111111 22222222 - var ON_REGEXP = /^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/; - // 11111111 22222222 - var IS_REGEXP = /^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/; - - var dataPerTracked = {}; - - return { - restrict: 'A', - compile: function(tElement, tAttrs) { - var linkedScopes = []; - var instances = []; - var expToData = {}; - var lastActivated = null; - var onExpMatches = tAttrs.uibIsClass.match(ON_REGEXP); - var onExp = onExpMatches[2]; - var expsStr = onExpMatches[1]; - var exps = expsStr.split(','); - - return linkFn; - - function linkFn(scope, element, attrs) { - linkedScopes.push(scope); - instances.push({ - scope: scope, - element: element - }); - - exps.forEach(function(exp, k) { - addForExp(exp, scope); - }); - - scope.$on('$destroy', removeScope); - } - - function addForExp(exp, scope) { - var matches = exp.match(IS_REGEXP); - var clazz = scope.$eval(matches[1]); - var compareWithExp = matches[2]; - var data = expToData[exp]; - if (!data) { - var watchFn = function(compareWithVal) { - var newActivated = null; - instances.some(function(instance) { - var thisVal = instance.scope.$eval(onExp); - if (thisVal === compareWithVal) { - newActivated = instance; - return true; - } - }); - if (data.lastActivated !== newActivated) { - if (data.lastActivated) { - $animate.removeClass(data.lastActivated.element, clazz); - } - if (newActivated) { - $animate.addClass(newActivated.element, clazz); - } - data.lastActivated = newActivated; - } - }; - expToData[exp] = data = { - lastActivated: null, - scope: scope, - watchFn: watchFn, - compareWithExp: compareWithExp, - watcher: scope.$watch(compareWithExp, watchFn) - }; - } - data.watchFn(scope.$eval(compareWithExp)); - } - - function removeScope(e) { - var removedScope = e.targetScope; - var index = linkedScopes.indexOf(removedScope); - linkedScopes.splice(index, 1); - instances.splice(index, 1); - if (linkedScopes.length) { - var newWatchScope = linkedScopes[0]; - angular.forEach(expToData, function(data) { - if (data.scope === removedScope) { - data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn); - data.scope = newWatchScope; - } - }); - } else { - expToData = {}; - } - } - } - }; -}]); -angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.isClass']) - -.value('$datepickerSuppressError', false) - -.value('$datepickerLiteralWarning', true) - -.constant('uibDatepickerConfig', { - datepickerMode: 'day', - formatDay: 'dd', - formatMonth: 'MMMM', - formatYear: 'yyyy', - formatDayHeader: 'EEE', - formatDayTitle: 'MMMM yyyy', - formatMonthTitle: 'yyyy', - maxDate: null, - maxMode: 'year', - minDate: null, - minMode: 'day', - monthColumns: 3, - ngModelOptions: {}, - shortcutPropagation: false, - showWeeks: true, - yearColumns: 5, - yearRows: 4 -}) - -.controller('UibDatepickerController', ['$scope', '$element', '$attrs', '$parse', '$interpolate', '$locale', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerLiteralWarning', '$datepickerSuppressError', 'uibDateParser', - function($scope, $element, $attrs, $parse, $interpolate, $locale, $log, dateFilter, datepickerConfig, $datepickerLiteralWarning, $datepickerSuppressError, dateParser) { - var self = this, - ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl; - ngModelOptions = {}, - watchListeners = []; - - $element.addClass('uib-datepicker'); - $attrs.$set('role', 'application'); - - if (!$scope.datepickerOptions) { - $scope.datepickerOptions = {}; - } - - // Modes chain - this.modes = ['day', 'month', 'year']; - - [ - 'customClass', - 'dateDisabled', - 'datepickerMode', - 'formatDay', - 'formatDayHeader', - 'formatDayTitle', - 'formatMonth', - 'formatMonthTitle', - 'formatYear', - 'maxDate', - 'maxMode', - 'minDate', - 'minMode', - 'monthColumns', - 'showWeeks', - 'shortcutPropagation', - 'startingDay', - 'yearColumns', - 'yearRows' - ].forEach(function(key) { - switch (key) { - case 'customClass': - case 'dateDisabled': - $scope[key] = $scope.datepickerOptions[key] || angular.noop; - break; - case 'datepickerMode': - $scope.datepickerMode = angular.isDefined($scope.datepickerOptions.datepickerMode) ? - $scope.datepickerOptions.datepickerMode : datepickerConfig.datepickerMode; - break; - case 'formatDay': - case 'formatDayHeader': - case 'formatDayTitle': - case 'formatMonth': - case 'formatMonthTitle': - case 'formatYear': - self[key] = angular.isDefined($scope.datepickerOptions[key]) ? - $interpolate($scope.datepickerOptions[key])($scope.$parent) : - datepickerConfig[key]; - break; - case 'monthColumns': - case 'showWeeks': - case 'shortcutPropagation': - case 'yearColumns': - case 'yearRows': - self[key] = angular.isDefined($scope.datepickerOptions[key]) ? - $scope.datepickerOptions[key] : datepickerConfig[key]; - break; - case 'startingDay': - if (angular.isDefined($scope.datepickerOptions.startingDay)) { - self.startingDay = $scope.datepickerOptions.startingDay; - } else if (angular.isNumber(datepickerConfig.startingDay)) { - self.startingDay = datepickerConfig.startingDay; - } else { - self.startingDay = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7; - } - - break; - case 'maxDate': - case 'minDate': - $scope.$watch('datepickerOptions.' + key, function(value) { - if (value) { - if (angular.isDate(value)) { - self[key] = dateParser.fromTimezone(new Date(value), ngModelOptions.getOption('timezone')); - } else { - if ($datepickerLiteralWarning) { - $log.warn('Literal date support has been deprecated, please switch to date object usage'); - } - - self[key] = new Date(dateFilter(value, 'medium')); - } - } else { - self[key] = datepickerConfig[key] ? - dateParser.fromTimezone(new Date(datepickerConfig[key]), ngModelOptions.getOption('timezone')) : - null; - } - - self.refreshView(); - }); - - break; - case 'maxMode': - case 'minMode': - if ($scope.datepickerOptions[key]) { - $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) { - self[key] = $scope[key] = angular.isDefined(value) ? value : $scope.datepickerOptions[key]; - if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) || - key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) { - $scope.datepickerMode = self[key]; - $scope.datepickerOptions.datepickerMode = self[key]; - } - }); - } else { - self[key] = $scope[key] = datepickerConfig[key] || null; - } - - break; - } - }); - - $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000); - - $scope.disabled = angular.isDefined($attrs.disabled) || false; - if (angular.isDefined($attrs.ngDisabled)) { - watchListeners.push($scope.$parent.$watch($attrs.ngDisabled, function(disabled) { - $scope.disabled = disabled; - self.refreshView(); - })); - } - - $scope.isActive = function(dateObject) { - if (self.compare(dateObject.date, self.activeDate) === 0) { - $scope.activeDateId = dateObject.uid; - return true; - } - return false; - }; - - this.init = function(ngModelCtrl_) { - ngModelCtrl = ngModelCtrl_; - ngModelOptions = extractOptions(ngModelCtrl); - - if ($scope.datepickerOptions.initDate) { - self.activeDate = dateParser.fromTimezone($scope.datepickerOptions.initDate, ngModelOptions.getOption('timezone')) || new Date(); - $scope.$watch('datepickerOptions.initDate', function(initDate) { - if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) { - self.activeDate = dateParser.fromTimezone(initDate, ngModelOptions.getOption('timezone')); - self.refreshView(); - } - }); - } else { - self.activeDate = new Date(); - } - - var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date(); - this.activeDate = !isNaN(date) ? - dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')) : - dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone')); - - ngModelCtrl.$render = function() { - self.render(); - }; - }; - - this.render = function() { - if (ngModelCtrl.$viewValue) { - var date = new Date(ngModelCtrl.$viewValue), - isValid = !isNaN(date); - - if (isValid) { - this.activeDate = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')); - } else if (!$datepickerSuppressError) { - $log.error('Datepicker directive: "ng-model" value must be a Date object'); - } - } - this.refreshView(); - }; - - this.refreshView = function() { - if (this.element) { - $scope.selectedDt = null; - this._refreshView(); - if ($scope.activeDt) { - $scope.activeDateId = $scope.activeDt.uid; - } - - var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null; - date = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')); - ngModelCtrl.$setValidity('dateDisabled', !date || - this.element && !this.isDisabled(date)); - } - }; - - this.createDateObject = function(date, format) { - var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null; - model = dateParser.fromTimezone(model, ngModelOptions.getOption('timezone')); - var today = new Date(); - today = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone')); - var time = this.compare(date, today); - var dt = { - date: date, - label: dateParser.filter(date, format), - selected: model && this.compare(date, model) === 0, - disabled: this.isDisabled(date), - past: time < 0, - current: time === 0, - future: time > 0, - customClass: this.customClass(date) || null - }; - - if (model && this.compare(date, model) === 0) { - $scope.selectedDt = dt; - } - - if (self.activeDate && this.compare(dt.date, self.activeDate) === 0) { - $scope.activeDt = dt; - } - - return dt; - }; - - this.isDisabled = function(date) { - return $scope.disabled || - this.minDate && this.compare(date, this.minDate) < 0 || - this.maxDate && this.compare(date, this.maxDate) > 0 || - $scope.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode}); - }; - - this.customClass = function(date) { - return $scope.customClass({date: date, mode: $scope.datepickerMode}); - }; - - // Split array into smaller arrays - this.split = function(arr, size) { - var arrays = []; - while (arr.length > 0) { - arrays.push(arr.splice(0, size)); - } - return arrays; - }; - - $scope.select = function(date) { - if ($scope.datepickerMode === self.minMode) { - var dt = ngModelCtrl.$viewValue ? dateParser.fromTimezone(new Date(ngModelCtrl.$viewValue), ngModelOptions.getOption('timezone')) : new Date(0, 0, 0, 0, 0, 0, 0); - dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); - dt = dateParser.toTimezone(dt, ngModelOptions.getOption('timezone')); - ngModelCtrl.$setViewValue(dt); - ngModelCtrl.$render(); - } else { - self.activeDate = date; - setMode(self.modes[self.modes.indexOf($scope.datepickerMode) - 1]); - - $scope.$emit('uib:datepicker.mode'); - } - - $scope.$broadcast('uib:datepicker.focus'); - }; - - $scope.move = function(direction) { - var year = self.activeDate.getFullYear() + direction * (self.step.years || 0), - month = self.activeDate.getMonth() + direction * (self.step.months || 0); - self.activeDate.setFullYear(year, month, 1); - self.refreshView(); - }; - - $scope.toggleMode = function(direction) { - direction = direction || 1; - - if ($scope.datepickerMode === self.maxMode && direction === 1 || - $scope.datepickerMode === self.minMode && direction === -1) { - return; - } - - setMode(self.modes[self.modes.indexOf($scope.datepickerMode) + direction]); - - $scope.$emit('uib:datepicker.mode'); - }; - - // Key event mapper - $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' }; - - var focusElement = function() { - self.element[0].focus(); - }; - - // Listen for focus requests from popup directive - $scope.$on('uib:datepicker.focus', focusElement); - - $scope.keydown = function(evt) { - var key = $scope.keys[evt.which]; - - if (!key || evt.shiftKey || evt.altKey || $scope.disabled) { - return; - } - - evt.preventDefault(); - if (!self.shortcutPropagation) { - evt.stopPropagation(); - } - - if (key === 'enter' || key === 'space') { - if (self.isDisabled(self.activeDate)) { - return; // do nothing - } - $scope.select(self.activeDate); - } else if (evt.ctrlKey && (key === 'up' || key === 'down')) { - $scope.toggleMode(key === 'up' ? 1 : -1); - } else { - self.handleKeyDown(key, evt); - self.refreshView(); - } - }; - - $element.on('keydown', function(evt) { - $scope.$apply(function() { - $scope.keydown(evt); - }); - }); - - $scope.$on('$destroy', function() { - //Clear all watch listeners on destroy - while (watchListeners.length) { - watchListeners.shift()(); - } - }); - - function setMode(mode) { - $scope.datepickerMode = mode; - $scope.datepickerOptions.datepickerMode = mode; - } - - function extractOptions(ngModelCtrl) { - var ngModelOptions; - - if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing - // guarantee a value - ngModelOptions = ngModelCtrl.$options || - $scope.datepickerOptions.ngModelOptions || - datepickerConfig.ngModelOptions || - {}; - - // mimic 1.6+ api - ngModelOptions.getOption = function (key) { - return ngModelOptions[key]; - }; - } else { // in angular >=1.6 $options is always present - // ng-model-options defaults timezone to null; don't let its precedence squash a non-null value - var timezone = ngModelCtrl.$options.getOption('timezone') || - ($scope.datepickerOptions.ngModelOptions ? $scope.datepickerOptions.ngModelOptions.timezone : null) || - (datepickerConfig.ngModelOptions ? datepickerConfig.ngModelOptions.timezone : null); - - // values passed to createChild override existing values - ngModelOptions = ngModelCtrl.$options // start with a ModelOptions instance - .createChild(datepickerConfig.ngModelOptions) // lowest precedence - .createChild($scope.datepickerOptions.ngModelOptions) - .createChild(ngModelCtrl.$options) // highest precedence - .createChild({timezone: timezone}); // to keep from squashing a non-null value - } - - return ngModelOptions; - } -}]) - -.controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) { - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - this.step = { months: 1 }; - this.element = $element; - function getDaysInMonth(year, month) { - return month === 1 && year % 4 === 0 && - (year % 100 !== 0 || year % 400 === 0) ? 29 : DAYS_IN_MONTH[month]; - } - - this.init = function(ctrl) { - angular.extend(ctrl, this); - scope.showWeeks = ctrl.showWeeks; - ctrl.refreshView(); - }; - - this.getDates = function(startDate, n) { - var dates = new Array(n), current = new Date(startDate), i = 0, date; - while (i < n) { - date = new Date(current); - dates[i++] = date; - current.setDate(current.getDate() + 1); - } - return dates; - }; - - this._refreshView = function() { - var year = this.activeDate.getFullYear(), - month = this.activeDate.getMonth(), - firstDayOfMonth = new Date(this.activeDate); - - firstDayOfMonth.setFullYear(year, month, 1); - - var difference = this.startingDay - firstDayOfMonth.getDay(), - numDisplayedFromPreviousMonth = difference > 0 ? - 7 - difference : - difference, - firstDate = new Date(firstDayOfMonth); - - if (numDisplayedFromPreviousMonth > 0) { - firstDate.setDate(-numDisplayedFromPreviousMonth + 1); - } - - // 42 is the number of days on a six-week calendar - var days = this.getDates(firstDate, 42); - for (var i = 0; i < 42; i ++) { - days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), { - secondary: days[i].getMonth() !== month, - uid: scope.uniqueId + '-' + i - }); - } - - scope.labels = new Array(7); - for (var j = 0; j < 7; j++) { - scope.labels[j] = { - abbr: dateFilter(days[j].date, this.formatDayHeader), - full: dateFilter(days[j].date, 'EEEE') - }; - } - - scope.title = dateFilter(this.activeDate, this.formatDayTitle); - scope.rows = this.split(days, 7); - - if (scope.showWeeks) { - scope.weekNumbers = []; - var thursdayIndex = (4 + 7 - this.startingDay) % 7, - numWeeks = scope.rows.length; - for (var curWeek = 0; curWeek < numWeeks; curWeek++) { - scope.weekNumbers.push( - getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date)); - } - } - }; - - this.compare = function(date1, date2) { - var _date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()); - var _date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()); - _date1.setFullYear(date1.getFullYear()); - _date2.setFullYear(date2.getFullYear()); - return _date1 - _date2; - }; - - function getISO8601WeekNumber(date) { - var checkDate = new Date(date); - checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday - var time = checkDate.getTime(); - checkDate.setMonth(0); // Compare with Jan 1 - checkDate.setDate(1); - return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; - } - - this.handleKeyDown = function(key, evt) { - var date = this.activeDate.getDate(); - - if (key === 'left') { - date = date - 1; - } else if (key === 'up') { - date = date - 7; - } else if (key === 'right') { - date = date + 1; - } else if (key === 'down') { - date = date + 7; - } else if (key === 'pageup' || key === 'pagedown') { - var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1); - this.activeDate.setMonth(month, 1); - date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date); - } else if (key === 'home') { - date = 1; - } else if (key === 'end') { - date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()); - } - this.activeDate.setDate(date); - }; -}]) - -.controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) { - this.step = { years: 1 }; - this.element = $element; - - this.init = function(ctrl) { - angular.extend(ctrl, this); - ctrl.refreshView(); - }; - - this._refreshView = function() { - var months = new Array(12), - year = this.activeDate.getFullYear(), - date; - - for (var i = 0; i < 12; i++) { - date = new Date(this.activeDate); - date.setFullYear(year, i, 1); - months[i] = angular.extend(this.createDateObject(date, this.formatMonth), { - uid: scope.uniqueId + '-' + i - }); - } - - scope.title = dateFilter(this.activeDate, this.formatMonthTitle); - scope.rows = this.split(months, this.monthColumns); - scope.yearHeaderColspan = this.monthColumns > 3 ? this.monthColumns - 2 : 1; - }; - - this.compare = function(date1, date2) { - var _date1 = new Date(date1.getFullYear(), date1.getMonth()); - var _date2 = new Date(date2.getFullYear(), date2.getMonth()); - _date1.setFullYear(date1.getFullYear()); - _date2.setFullYear(date2.getFullYear()); - return _date1 - _date2; - }; - - this.handleKeyDown = function(key, evt) { - var date = this.activeDate.getMonth(); - - if (key === 'left') { - date = date - 1; - } else if (key === 'up') { - date = date - this.monthColumns; - } else if (key === 'right') { - date = date + 1; - } else if (key === 'down') { - date = date + this.monthColumns; - } else if (key === 'pageup' || key === 'pagedown') { - var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1); - this.activeDate.setFullYear(year); - } else if (key === 'home') { - date = 0; - } else if (key === 'end') { - date = 11; - } - this.activeDate.setMonth(date); - }; -}]) - -.controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) { - var columns, range; - this.element = $element; - - function getStartingYear(year) { - return parseInt((year - 1) / range, 10) * range + 1; - } - - this.yearpickerInit = function() { - columns = this.yearColumns; - range = this.yearRows * columns; - this.step = { years: range }; - }; - - this._refreshView = function() { - var years = new Array(range), date; - - for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) { - date = new Date(this.activeDate); - date.setFullYear(start + i, 0, 1); - years[i] = angular.extend(this.createDateObject(date, this.formatYear), { - uid: scope.uniqueId + '-' + i - }); - } - - scope.title = [years[0].label, years[range - 1].label].join(' - '); - scope.rows = this.split(years, columns); - scope.columns = columns; - }; - - this.compare = function(date1, date2) { - return date1.getFullYear() - date2.getFullYear(); - }; - - this.handleKeyDown = function(key, evt) { - var date = this.activeDate.getFullYear(); - - if (key === 'left') { - date = date - 1; - } else if (key === 'up') { - date = date - columns; - } else if (key === 'right') { - date = date + 1; - } else if (key === 'down') { - date = date + columns; - } else if (key === 'pageup' || key === 'pagedown') { - date += (key === 'pageup' ? - 1 : 1) * range; - } else if (key === 'home') { - date = getStartingYear(this.activeDate.getFullYear()); - } else if (key === 'end') { - date = getStartingYear(this.activeDate.getFullYear()) + range - 1; - } - this.activeDate.setFullYear(date); - }; -}]) - -.directive('uibDatepicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/datepicker.html'; - }, - scope: { - datepickerOptions: '=?' - }, - require: ['uibDatepicker', '^ngModel'], - restrict: 'A', - controller: 'UibDatepickerController', - controllerAs: 'datepicker', - link: function(scope, element, attrs, ctrls) { - var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - datepickerCtrl.init(ngModelCtrl); - } - }; -}) - -.directive('uibDaypicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/day.html'; - }, - require: ['^uibDatepicker', 'uibDaypicker'], - restrict: 'A', - controller: 'UibDaypickerController', - link: function(scope, element, attrs, ctrls) { - var datepickerCtrl = ctrls[0], - daypickerCtrl = ctrls[1]; - - daypickerCtrl.init(datepickerCtrl); - } - }; -}) - -.directive('uibMonthpicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/month.html'; - }, - require: ['^uibDatepicker', 'uibMonthpicker'], - restrict: 'A', - controller: 'UibMonthpickerController', - link: function(scope, element, attrs, ctrls) { - var datepickerCtrl = ctrls[0], - monthpickerCtrl = ctrls[1]; - - monthpickerCtrl.init(datepickerCtrl); - } - }; -}) - -.directive('uibYearpicker', function() { - return { - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepicker/year.html'; - }, - require: ['^uibDatepicker', 'uibYearpicker'], - restrict: 'A', - controller: 'UibYearpickerController', - link: function(scope, element, attrs, ctrls) { - var ctrl = ctrls[0]; - angular.extend(ctrl, ctrls[1]); - ctrl.yearpickerInit(); - - ctrl.refreshView(); - } - }; -}); - -angular.module('ui.bootstrap.position', []) - -/** - * A set of utility methods for working with the DOM. - * It is meant to be used where we need to absolute-position elements in - * relation to another element (this is the case for tooltips, popovers, - * typeahead suggestions etc.). - */ - .factory('$uibPosition', ['$document', '$window', function($document, $window) { - /** - * Used by scrollbarWidth() function to cache scrollbar's width. - * Do not access this variable directly, use scrollbarWidth() instead. - */ - var SCROLLBAR_WIDTH; - /** - * scrollbar on body and html element in IE and Edge overlay - * content and should be considered 0 width. - */ - var BODY_SCROLLBAR_WIDTH; - var OVERFLOW_REGEX = { - normal: /(auto|scroll)/, - hidden: /(auto|scroll|hidden)/ - }; - var PLACEMENT_REGEX = { - auto: /\s?auto?\s?/i, - primary: /^(top|bottom|left|right)$/, - secondary: /^(top|bottom|left|right|center)$/, - vertical: /^(top|bottom)$/ - }; - var BODY_REGEX = /(HTML|BODY)/; - - return { - - /** - * Provides a raw DOM element from a jQuery/jQLite element. - * - * @param {element} elem - The element to convert. - * - * @returns {element} A HTML element. - */ - getRawNode: function(elem) { - return elem.nodeName ? elem : elem[0] || elem; - }, - - /** - * Provides a parsed number for a style property. Strips - * units and casts invalid numbers to 0. - * - * @param {string} value - The style value to parse. - * - * @returns {number} A valid number. - */ - parseStyle: function(value) { - value = parseFloat(value); - return isFinite(value) ? value : 0; - }, - - /** - * Provides the closest positioned ancestor. - * - * @param {element} element - The element to get the offest parent for. - * - * @returns {element} The closest positioned ancestor. - */ - offsetParent: function(elem) { - elem = this.getRawNode(elem); - - var offsetParent = elem.offsetParent || $document[0].documentElement; - - function isStaticPositioned(el) { - return ($window.getComputedStyle(el).position || 'static') === 'static'; - } - - while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) { - offsetParent = offsetParent.offsetParent; - } - - return offsetParent || $document[0].documentElement; - }, - - /** - * Provides the scrollbar width, concept from TWBS measureScrollbar() - * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js - * In IE and Edge, scollbar on body and html element overlay and should - * return a width of 0. - * - * @returns {number} The width of the browser scollbar. - */ - scrollbarWidth: function(isBody) { - if (isBody) { - if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) { - var bodyElem = $document.find('body'); - bodyElem.addClass('uib-position-body-scrollbar-measure'); - BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth; - BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0; - bodyElem.removeClass('uib-position-body-scrollbar-measure'); - } - return BODY_SCROLLBAR_WIDTH; - } - - if (angular.isUndefined(SCROLLBAR_WIDTH)) { - var scrollElem = angular.element('
      '); - $document.find('body').append(scrollElem); - SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth; - SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0; - scrollElem.remove(); - } - - return SCROLLBAR_WIDTH; - }, - - /** - * Provides the padding required on an element to replace the scrollbar. - * - * @returns {object} An object with the following properties: - *
        - *
      • **scrollbarWidth**: the width of the scrollbar
      • - *
      • **widthOverflow**: whether the the width is overflowing
      • - *
      • **right**: the amount of right padding on the element needed to replace the scrollbar
      • - *
      • **rightOriginal**: the amount of right padding currently on the element
      • - *
      • **heightOverflow**: whether the the height is overflowing
      • - *
      • **bottom**: the amount of bottom padding on the element needed to replace the scrollbar
      • - *
      • **bottomOriginal**: the amount of bottom padding currently on the element
      • - *
      - */ - scrollbarPadding: function(elem) { - elem = this.getRawNode(elem); - - var elemStyle = $window.getComputedStyle(elem); - var paddingRight = this.parseStyle(elemStyle.paddingRight); - var paddingBottom = this.parseStyle(elemStyle.paddingBottom); - var scrollParent = this.scrollParent(elem, false, true); - var scrollbarWidth = this.scrollbarWidth(BODY_REGEX.test(scrollParent.tagName)); - - return { - scrollbarWidth: scrollbarWidth, - widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth, - right: paddingRight + scrollbarWidth, - originalRight: paddingRight, - heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight, - bottom: paddingBottom + scrollbarWidth, - originalBottom: paddingBottom - }; - }, - - /** - * Checks to see if the element is scrollable. - * - * @param {element} elem - The element to check. - * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered, - * default is false. - * - * @returns {boolean} Whether the element is scrollable. - */ - isScrollable: function(elem, includeHidden) { - elem = this.getRawNode(elem); - - var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal; - var elemStyle = $window.getComputedStyle(elem); - return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX); - }, - - /** - * Provides the closest scrollable ancestor. - * A port of the jQuery UI scrollParent method: - * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js - * - * @param {element} elem - The element to find the scroll parent of. - * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered, - * default is false. - * @param {boolean=} [includeSelf=false] - Should the element being passed be - * included in the scrollable llokup. - * - * @returns {element} A HTML element. - */ - scrollParent: function(elem, includeHidden, includeSelf) { - elem = this.getRawNode(elem); - - var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal; - var documentEl = $document[0].documentElement; - var elemStyle = $window.getComputedStyle(elem); - if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) { - return elem; - } - var excludeStatic = elemStyle.position === 'absolute'; - var scrollParent = elem.parentElement || documentEl; - - if (scrollParent === documentEl || elemStyle.position === 'fixed') { - return documentEl; - } - - while (scrollParent.parentElement && scrollParent !== documentEl) { - var spStyle = $window.getComputedStyle(scrollParent); - if (excludeStatic && spStyle.position !== 'static') { - excludeStatic = false; - } - - if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) { - break; - } - scrollParent = scrollParent.parentElement; - } - - return scrollParent; - }, - - /** - * Provides read-only equivalent of jQuery's position function: - * http://api.jquery.com/position/ - distance to closest positioned - * ancestor. Does not account for margins by default like jQuery position. - * - * @param {element} elem - The element to caclulate the position on. - * @param {boolean=} [includeMargins=false] - Should margins be accounted - * for, default is false. - * - * @returns {object} An object with the following properties: - *
        - *
      • **width**: the width of the element
      • - *
      • **height**: the height of the element
      • - *
      • **top**: distance to top edge of offset parent
      • - *
      • **left**: distance to left edge of offset parent
      • - *
      - */ - position: function(elem, includeMagins) { - elem = this.getRawNode(elem); - - var elemOffset = this.offset(elem); - if (includeMagins) { - var elemStyle = $window.getComputedStyle(elem); - elemOffset.top -= this.parseStyle(elemStyle.marginTop); - elemOffset.left -= this.parseStyle(elemStyle.marginLeft); - } - var parent = this.offsetParent(elem); - var parentOffset = {top: 0, left: 0}; - - if (parent !== $document[0].documentElement) { - parentOffset = this.offset(parent); - parentOffset.top += parent.clientTop - parent.scrollTop; - parentOffset.left += parent.clientLeft - parent.scrollLeft; - } - - return { - width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth), - height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight), - top: Math.round(elemOffset.top - parentOffset.top), - left: Math.round(elemOffset.left - parentOffset.left) - }; - }, - - /** - * Provides read-only equivalent of jQuery's offset function: - * http://api.jquery.com/offset/ - distance to viewport. Does - * not account for borders, margins, or padding on the body - * element. - * - * @param {element} elem - The element to calculate the offset on. - * - * @returns {object} An object with the following properties: - *
        - *
      • **width**: the width of the element
      • - *
      • **height**: the height of the element
      • - *
      • **top**: distance to top edge of viewport
      • - *
      • **right**: distance to bottom edge of viewport
      • - *
      - */ - offset: function(elem) { - elem = this.getRawNode(elem); - - var elemBCR = elem.getBoundingClientRect(); - return { - width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth), - height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight), - top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)), - left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft)) - }; - }, - - /** - * Provides offset distance to the closest scrollable ancestor - * or viewport. Accounts for border and scrollbar width. - * - * Right and bottom dimensions represent the distance to the - * respective edge of the viewport element. If the element - * edge extends beyond the viewport, a negative value will be - * reported. - * - * @param {element} elem - The element to get the viewport offset for. - * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead - * of the first scrollable element, default is false. - * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element - * be accounted for, default is true. - * - * @returns {object} An object with the following properties: - *
        - *
      • **top**: distance to the top content edge of viewport element
      • - *
      • **bottom**: distance to the bottom content edge of viewport element
      • - *
      • **left**: distance to the left content edge of viewport element
      • - *
      • **right**: distance to the right content edge of viewport element
      • - *
      - */ - viewportOffset: function(elem, useDocument, includePadding) { - elem = this.getRawNode(elem); - includePadding = includePadding !== false ? true : false; - - var elemBCR = elem.getBoundingClientRect(); - var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0}; - - var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem); - var offsetParentBCR = offsetParent.getBoundingClientRect(); - - offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop; - offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft; - if (offsetParent === $document[0].documentElement) { - offsetBCR.top += $window.pageYOffset; - offsetBCR.left += $window.pageXOffset; - } - offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight; - offsetBCR.right = offsetBCR.left + offsetParent.clientWidth; - - if (includePadding) { - var offsetParentStyle = $window.getComputedStyle(offsetParent); - offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop); - offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom); - offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft); - offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight); - } - - return { - top: Math.round(elemBCR.top - offsetBCR.top), - bottom: Math.round(offsetBCR.bottom - elemBCR.bottom), - left: Math.round(elemBCR.left - offsetBCR.left), - right: Math.round(offsetBCR.right - elemBCR.right) - }; - }, - - /** - * Provides an array of placement values parsed from a placement string. - * Along with the 'auto' indicator, supported placement strings are: - *
        - *
      • top: element on top, horizontally centered on host element.
      • - *
      • top-left: element on top, left edge aligned with host element left edge.
      • - *
      • top-right: element on top, lerightft edge aligned with host element right edge.
      • - *
      • bottom: element on bottom, horizontally centered on host element.
      • - *
      • bottom-left: element on bottom, left edge aligned with host element left edge.
      • - *
      • bottom-right: element on bottom, right edge aligned with host element right edge.
      • - *
      • left: element on left, vertically centered on host element.
      • - *
      • left-top: element on left, top edge aligned with host element top edge.
      • - *
      • left-bottom: element on left, bottom edge aligned with host element bottom edge.
      • - *
      • right: element on right, vertically centered on host element.
      • - *
      • right-top: element on right, top edge aligned with host element top edge.
      • - *
      • right-bottom: element on right, bottom edge aligned with host element bottom edge.
      • - *
      - * A placement string with an 'auto' indicator is expected to be - * space separated from the placement, i.e: 'auto bottom-left' If - * the primary and secondary placement values do not match 'top, - * bottom, left, right' then 'top' will be the primary placement and - * 'center' will be the secondary placement. If 'auto' is passed, true - * will be returned as the 3rd value of the array. - * - * @param {string} placement - The placement string to parse. - * - * @returns {array} An array with the following values - *
        - *
      • **[0]**: The primary placement.
      • - *
      • **[1]**: The secondary placement.
      • - *
      • **[2]**: If auto is passed: true, else undefined.
      • - *
      - */ - parsePlacement: function(placement) { - var autoPlace = PLACEMENT_REGEX.auto.test(placement); - if (autoPlace) { - placement = placement.replace(PLACEMENT_REGEX.auto, ''); - } - - placement = placement.split('-'); - - placement[0] = placement[0] || 'top'; - if (!PLACEMENT_REGEX.primary.test(placement[0])) { - placement[0] = 'top'; - } - - placement[1] = placement[1] || 'center'; - if (!PLACEMENT_REGEX.secondary.test(placement[1])) { - placement[1] = 'center'; - } - - if (autoPlace) { - placement[2] = true; - } else { - placement[2] = false; - } - - return placement; - }, - - /** - * Provides coordinates for an element to be positioned relative to - * another element. Passing 'auto' as part of the placement parameter - * will enable smart placement - where the element fits. i.e: - * 'auto left-top' will check to see if there is enough space to the left - * of the hostElem to fit the targetElem, if not place right (same for secondary - * top placement). Available space is calculated using the viewportOffset - * function. - * - * @param {element} hostElem - The element to position against. - * @param {element} targetElem - The element to position. - * @param {string=} [placement=top] - The placement for the targetElem, - * default is 'top'. 'center' is assumed as secondary placement for - * 'top', 'left', 'right', and 'bottom' placements. Available placements are: - *
        - *
      • top
      • - *
      • top-right
      • - *
      • top-left
      • - *
      • bottom
      • - *
      • bottom-left
      • - *
      • bottom-right
      • - *
      • left
      • - *
      • left-top
      • - *
      • left-bottom
      • - *
      • right
      • - *
      • right-top
      • - *
      • right-bottom
      • - *
      - * @param {boolean=} [appendToBody=false] - Should the top and left values returned - * be calculated from the body element, default is false. - * - * @returns {object} An object with the following properties: - *
        - *
      • **top**: Value for targetElem top.
      • - *
      • **left**: Value for targetElem left.
      • - *
      • **placement**: The resolved placement.
      • - *
      - */ - positionElements: function(hostElem, targetElem, placement, appendToBody) { - hostElem = this.getRawNode(hostElem); - targetElem = this.getRawNode(targetElem); - - // need to read from prop to support tests. - var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth'); - var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight'); - - placement = this.parsePlacement(placement); - - var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem); - var targetElemPos = {top: 0, left: 0, placement: ''}; - - if (placement[2]) { - var viewportOffset = this.viewportOffset(hostElem, appendToBody); - - var targetElemStyle = $window.getComputedStyle(targetElem); - var adjustedSize = { - width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))), - height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom))) - }; - - placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' : - placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' : - placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' : - placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' : - placement[0]; - - placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' : - placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' : - placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' : - placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' : - placement[1]; - - if (placement[1] === 'center') { - if (PLACEMENT_REGEX.vertical.test(placement[0])) { - var xOverflow = hostElemPos.width / 2 - targetWidth / 2; - if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) { - placement[1] = 'left'; - } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) { - placement[1] = 'right'; - } - } else { - var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2; - if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) { - placement[1] = 'top'; - } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) { - placement[1] = 'bottom'; - } - } - } - } - - switch (placement[0]) { - case 'top': - targetElemPos.top = hostElemPos.top - targetHeight; - break; - case 'bottom': - targetElemPos.top = hostElemPos.top + hostElemPos.height; - break; - case 'left': - targetElemPos.left = hostElemPos.left - targetWidth; - break; - case 'right': - targetElemPos.left = hostElemPos.left + hostElemPos.width; - break; - } - - switch (placement[1]) { - case 'top': - targetElemPos.top = hostElemPos.top; - break; - case 'bottom': - targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight; - break; - case 'left': - targetElemPos.left = hostElemPos.left; - break; - case 'right': - targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth; - break; - case 'center': - if (PLACEMENT_REGEX.vertical.test(placement[0])) { - targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2; - } else { - targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2; - } - break; - } - - targetElemPos.top = Math.round(targetElemPos.top); - targetElemPos.left = Math.round(targetElemPos.left); - targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1]; - - return targetElemPos; - }, - - /** - * Provides a way to adjust the top positioning after first - * render to correctly align element to top after content - * rendering causes resized element height - * - * @param {array} placementClasses - The array of strings of classes - * element should have. - * @param {object} containerPosition - The object with container - * position information - * @param {number} initialHeight - The initial height for the elem. - * @param {number} currentHeight - The current height for the elem. - */ - adjustTop: function(placementClasses, containerPosition, initialHeight, currentHeight) { - if (placementClasses.indexOf('top') !== -1 && initialHeight !== currentHeight) { - return { - top: containerPosition.top - currentHeight + 'px' - }; - } - }, - - /** - * Provides a way for positioning tooltip & dropdown - * arrows when using placement options beyond the standard - * left, right, top, or bottom. - * - * @param {element} elem - The tooltip/dropdown element. - * @param {string} placement - The placement for the elem. - */ - positionArrow: function(elem, placement) { - elem = this.getRawNode(elem); - - var innerElem = elem.querySelector('.tooltip-inner, .popover-inner'); - if (!innerElem) { - return; - } - - var isTooltip = angular.element(innerElem).hasClass('tooltip-inner'); - - var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow'); - if (!arrowElem) { - return; - } - - var arrowCss = { - top: '', - bottom: '', - left: '', - right: '' - }; - - placement = this.parsePlacement(placement); - if (placement[1] === 'center') { - // no adjustment necessary - just reset styles - angular.element(arrowElem).css(arrowCss); - return; - } - - var borderProp = 'border-' + placement[0] + '-width'; - var borderWidth = $window.getComputedStyle(arrowElem)[borderProp]; - - var borderRadiusProp = 'border-'; - if (PLACEMENT_REGEX.vertical.test(placement[0])) { - borderRadiusProp += placement[0] + '-' + placement[1]; - } else { - borderRadiusProp += placement[1] + '-' + placement[0]; - } - borderRadiusProp += '-radius'; - var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp]; - - switch (placement[0]) { - case 'top': - arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth; - break; - case 'bottom': - arrowCss.top = isTooltip ? '0' : '-' + borderWidth; - break; - case 'left': - arrowCss.right = isTooltip ? '0' : '-' + borderWidth; - break; - case 'right': - arrowCss.left = isTooltip ? '0' : '-' + borderWidth; - break; - } - - arrowCss[placement[1]] = borderRadius; - - angular.element(arrowElem).css(arrowCss); - } - }; - }]); - -angular.module('ui.bootstrap.datepickerPopup', ['ui.bootstrap.datepicker', 'ui.bootstrap.position']) - -.value('$datepickerPopupLiteralWarning', true) - -.constant('uibDatepickerPopupConfig', { - altInputFormats: [], - appendToBody: false, - clearText: 'Clear', - closeOnDateSelection: true, - closeText: 'Done', - currentText: 'Today', - datepickerPopup: 'yyyy-MM-dd', - datepickerPopupTemplateUrl: 'uib/template/datepickerPopup/popup.html', - datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html', - html5Types: { - date: 'yyyy-MM-dd', - 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss', - 'month': 'yyyy-MM' - }, - onOpenFocus: true, - showButtonBar: true, - placement: 'auto bottom-left' -}) - -.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$log', '$parse', '$window', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig', '$datepickerPopupLiteralWarning', -function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout, datepickerConfig, $datepickerPopupLiteralWarning) { - var cache = {}, - isHtml5DateInput = false; - var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus, - datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl, scrollParentEl, - ngModel, ngModelOptions, $popup, altInputFormats, watchListeners = []; - - this.init = function(_ngModel_) { - ngModel = _ngModel_; - ngModelOptions = extractOptions(ngModel); - closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ? - $scope.$parent.$eval($attrs.closeOnDateSelection) : - datepickerPopupConfig.closeOnDateSelection; - appendToBody = angular.isDefined($attrs.datepickerAppendToBody) ? - $scope.$parent.$eval($attrs.datepickerAppendToBody) : - datepickerPopupConfig.appendToBody; - onOpenFocus = angular.isDefined($attrs.onOpenFocus) ? - $scope.$parent.$eval($attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus; - datepickerPopupTemplateUrl = angular.isDefined($attrs.datepickerPopupTemplateUrl) ? - $attrs.datepickerPopupTemplateUrl : - datepickerPopupConfig.datepickerPopupTemplateUrl; - datepickerTemplateUrl = angular.isDefined($attrs.datepickerTemplateUrl) ? - $attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl; - altInputFormats = angular.isDefined($attrs.altInputFormats) ? - $scope.$parent.$eval($attrs.altInputFormats) : - datepickerPopupConfig.altInputFormats; - - $scope.showButtonBar = angular.isDefined($attrs.showButtonBar) ? - $scope.$parent.$eval($attrs.showButtonBar) : - datepickerPopupConfig.showButtonBar; - - if (datepickerPopupConfig.html5Types[$attrs.type]) { - dateFormat = datepickerPopupConfig.html5Types[$attrs.type]; - isHtml5DateInput = true; - } else { - dateFormat = $attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup; - $attrs.$observe('uibDatepickerPopup', function(value, oldValue) { - var newDateFormat = value || datepickerPopupConfig.datepickerPopup; - // Invalidate the $modelValue to ensure that formatters re-run - // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764 - if (newDateFormat !== dateFormat) { - dateFormat = newDateFormat; - ngModel.$modelValue = null; - - if (!dateFormat) { - throw new Error('uibDatepickerPopup must have a date format specified.'); - } - } - }); - } - - if (!dateFormat) { - throw new Error('uibDatepickerPopup must have a date format specified.'); - } - - if (isHtml5DateInput && $attrs.uibDatepickerPopup) { - throw new Error('HTML5 date input types do not support custom formats.'); - } - - // popup element used to display calendar - popupEl = angular.element('
      '); - - popupEl.attr({ - 'ng-model': 'date', - 'ng-change': 'dateSelection(date)', - 'template-url': datepickerPopupTemplateUrl - }); - - // datepicker element - datepickerEl = angular.element(popupEl.children()[0]); - datepickerEl.attr('template-url', datepickerTemplateUrl); - - if (!$scope.datepickerOptions) { - $scope.datepickerOptions = {}; - } - - if (isHtml5DateInput) { - if ($attrs.type === 'month') { - $scope.datepickerOptions.datepickerMode = 'month'; - $scope.datepickerOptions.minMode = 'month'; - } - } - - datepickerEl.attr('datepicker-options', 'datepickerOptions'); - - if (!isHtml5DateInput) { - // Internal API to maintain the correct ng-invalid-[key] class - ngModel.$$parserName = 'date'; - ngModel.$validators.date = validator; - ngModel.$parsers.unshift(parseDate); - ngModel.$formatters.push(function(value) { - if (ngModel.$isEmpty(value)) { - $scope.date = value; - return value; - } - - if (angular.isNumber(value)) { - value = new Date(value); - } - - $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone')); - - return dateParser.filter($scope.date, dateFormat); - }); - } else { - ngModel.$formatters.push(function(value) { - $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone')); - return value; - }); - } - - // Detect changes in the view from the text box - ngModel.$viewChangeListeners.push(function() { - $scope.date = parseDateString(ngModel.$viewValue); - }); - - $element.on('keydown', inputKeydownBind); - - $popup = $compile(popupEl)($scope); - // Prevent jQuery cache memory leak (template is now redundant after linking) - popupEl.remove(); - - if (appendToBody) { - $document.find('body').append($popup); - } else { - $element.after($popup); - } - - $scope.$on('$destroy', function() { - if ($scope.isOpen === true) { - if (!$rootScope.$$phase) { - $scope.$apply(function() { - $scope.isOpen = false; - }); - } - } - - $popup.remove(); - $element.off('keydown', inputKeydownBind); - $document.off('click', documentClickBind); - if (scrollParentEl) { - scrollParentEl.off('scroll', positionPopup); - } - angular.element($window).off('resize', positionPopup); - - //Clear all watch listeners on destroy - while (watchListeners.length) { - watchListeners.shift()(); - } - }); - }; - - $scope.getText = function(key) { - return $scope[key + 'Text'] || datepickerPopupConfig[key + 'Text']; - }; - - $scope.isDisabled = function(date) { - if (date === 'today') { - date = dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone')); - } - - var dates = {}; - angular.forEach(['minDate', 'maxDate'], function(key) { - if (!$scope.datepickerOptions[key]) { - dates[key] = null; - } else if (angular.isDate($scope.datepickerOptions[key])) { - dates[key] = new Date($scope.datepickerOptions[key]); - } else { - if ($datepickerPopupLiteralWarning) { - $log.warn('Literal date support has been deprecated, please switch to date object usage'); - } - - dates[key] = new Date(dateFilter($scope.datepickerOptions[key], 'medium')); - } - }); - - return $scope.datepickerOptions && - dates.minDate && $scope.compare(date, dates.minDate) < 0 || - dates.maxDate && $scope.compare(date, dates.maxDate) > 0; - }; - - $scope.compare = function(date1, date2) { - return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()); - }; - - // Inner change - $scope.dateSelection = function(dt) { - $scope.date = dt; - var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function - $element.val(date); - ngModel.$setViewValue(date); - - if (closeOnDateSelection) { - $scope.isOpen = false; - $element[0].focus(); - } - }; - - $scope.keydown = function(evt) { - if (evt.which === 27) { - evt.stopPropagation(); - $scope.isOpen = false; - $element[0].focus(); - } - }; - - $scope.select = function(date, evt) { - evt.stopPropagation(); - - if (date === 'today') { - var today = new Date(); - if (angular.isDate($scope.date)) { - date = new Date($scope.date); - date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate()); - } else { - date = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone')); - date.setHours(0, 0, 0, 0); - } - } - $scope.dateSelection(date); - }; - - $scope.close = function(evt) { - evt.stopPropagation(); - - $scope.isOpen = false; - $element[0].focus(); - }; - - $scope.disabled = angular.isDefined($attrs.disabled) || false; - if ($attrs.ngDisabled) { - watchListeners.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(disabled) { - $scope.disabled = disabled; - })); - } - - $scope.$watch('isOpen', function(value) { - if (value) { - if (!$scope.disabled) { - $timeout(function() { - positionPopup(); - - if (onOpenFocus) { - $scope.$broadcast('uib:datepicker.focus'); - } - - $document.on('click', documentClickBind); - - var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement; - if (appendToBody || $position.parsePlacement(placement)[2]) { - scrollParentEl = scrollParentEl || angular.element($position.scrollParent($element)); - if (scrollParentEl) { - scrollParentEl.on('scroll', positionPopup); - } - } else { - scrollParentEl = null; - } - - angular.element($window).on('resize', positionPopup); - }, 0, false); - } else { - $scope.isOpen = false; - } - } else { - $document.off('click', documentClickBind); - if (scrollParentEl) { - scrollParentEl.off('scroll', positionPopup); - } - angular.element($window).off('resize', positionPopup); - } - }); - - function cameltoDash(string) { - return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); }); - } - - function parseDateString(viewValue) { - var date = dateParser.parse(viewValue, dateFormat, $scope.date); - if (isNaN(date)) { - for (var i = 0; i < altInputFormats.length; i++) { - date = dateParser.parse(viewValue, altInputFormats[i], $scope.date); - if (!isNaN(date)) { - return date; - } - } - } - return date; - } - - function parseDate(viewValue) { - if (angular.isNumber(viewValue)) { - // presumably timestamp to date object - viewValue = new Date(viewValue); - } - - if (!viewValue) { - return null; - } - - if (angular.isDate(viewValue) && !isNaN(viewValue)) { - return viewValue; - } - - if (angular.isString(viewValue)) { - var date = parseDateString(viewValue); - if (!isNaN(date)) { - return dateParser.toTimezone(date, ngModelOptions.getOption('timezone')); - } - } - - return ngModelOptions.getOption('allowInvalid') ? viewValue : undefined; - } - - function validator(modelValue, viewValue) { - var value = modelValue || viewValue; - - if (!$attrs.ngRequired && !value) { - return true; - } - - if (angular.isNumber(value)) { - value = new Date(value); - } - - if (!value) { - return true; - } - - if (angular.isDate(value) && !isNaN(value)) { - return true; - } - - if (angular.isString(value)) { - return !isNaN(parseDateString(value)); - } - - return false; - } - - function documentClickBind(event) { - if (!$scope.isOpen && $scope.disabled) { - return; - } - - var popup = $popup[0]; - var dpContainsTarget = $element[0].contains(event.target); - // The popup node may not be an element node - // In some browsers (IE) only element nodes have the 'contains' function - var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target); - if ($scope.isOpen && !(dpContainsTarget || popupContainsTarget)) { - $scope.$apply(function() { - $scope.isOpen = false; - }); - } - } - - function inputKeydownBind(evt) { - if (evt.which === 27 && $scope.isOpen) { - evt.preventDefault(); - evt.stopPropagation(); - $scope.$apply(function() { - $scope.isOpen = false; - }); - $element[0].focus(); - } else if (evt.which === 40 && !$scope.isOpen) { - evt.preventDefault(); - evt.stopPropagation(); - $scope.$apply(function() { - $scope.isOpen = true; - }); - } - } - - function positionPopup() { - if ($scope.isOpen) { - var dpElement = angular.element($popup[0].querySelector('.uib-datepicker-popup')); - var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement; - var position = $position.positionElements($element, dpElement, placement, appendToBody); - dpElement.css({top: position.top + 'px', left: position.left + 'px'}); - if (dpElement.hasClass('uib-position-measure')) { - dpElement.removeClass('uib-position-measure'); - } - } - } - - function extractOptions(ngModelCtrl) { - var ngModelOptions; - - if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing - // guarantee a value - ngModelOptions = angular.isObject(ngModelCtrl.$options) ? - ngModelCtrl.$options : - { - timezone: null - }; - - // mimic 1.6+ api - ngModelOptions.getOption = function (key) { - return ngModelOptions[key]; - }; - } else { // in angular >=1.6 $options is always present - ngModelOptions = ngModelCtrl.$options; - } - - return ngModelOptions; - } - - $scope.$on('uib:datepicker.mode', function() { - $timeout(positionPopup, 0, false); - }); -}]) - -.directive('uibDatepickerPopup', function() { - return { - require: ['ngModel', 'uibDatepickerPopup'], - controller: 'UibDatepickerPopupController', - scope: { - datepickerOptions: '=?', - isOpen: '=?', - currentText: '@', - clearText: '@', - closeText: '@' - }, - link: function(scope, element, attrs, ctrls) { - var ngModel = ctrls[0], - ctrl = ctrls[1]; - - ctrl.init(ngModel); - } - }; -}) - -.directive('uibDatepickerPopupWrap', function() { - return { - restrict: 'A', - transclude: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html'; - } - }; -}); - -angular.module('ui.bootstrap.debounce', []) -/** - * A helper, internal service that debounces a function - */ - .factory('$$debounce', ['$timeout', function($timeout) { - return function(callback, debounceTime) { - var timeoutPromise; - - return function() { - var self = this; - var args = Array.prototype.slice.call(arguments); - if (timeoutPromise) { - $timeout.cancel(timeoutPromise); - } - - timeoutPromise = $timeout(function() { - callback.apply(self, args); - }, debounceTime); - }; - }; - }]); - -angular.module('ui.bootstrap.multiMap', []) -/** - * A helper, internal data structure that stores all references attached to key - */ - .factory('$$multiMap', function() { - return { - createNew: function() { - var map = {}; - - return { - entries: function() { - return Object.keys(map).map(function(key) { - return { - key: key, - value: map[key] - }; - }); - }, - get: function(key) { - return map[key]; - }, - hasKey: function(key) { - return !!map[key]; - }, - keys: function() { - return Object.keys(map); - }, - put: function(key, value) { - if (!map[key]) { - map[key] = []; - } - - map[key].push(value); - }, - remove: function(key, value) { - var values = map[key]; - - if (!values) { - return; - } - - var idx = values.indexOf(value); - - if (idx !== -1) { - values.splice(idx, 1); - } - - if (!values.length) { - delete map[key]; - } - } - }; - } - }; - }); - -angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.position']) - -.constant('uibDropdownConfig', { - appendToOpenClass: 'uib-dropdown-open', - openClass: 'open' -}) - -.service('uibDropdownService', ['$document', '$rootScope', '$$multiMap', function($document, $rootScope, $$multiMap) { - var openScope = null; - var openedContainers = $$multiMap.createNew(); - - this.isOnlyOpen = function(dropdownScope, appendTo) { - var openedDropdowns = openedContainers.get(appendTo); - if (openedDropdowns) { - var openDropdown = openedDropdowns.reduce(function(toClose, dropdown) { - if (dropdown.scope === dropdownScope) { - return dropdown; - } - - return toClose; - }, {}); - if (openDropdown) { - return openedDropdowns.length === 1; - } - } - - return false; - }; - - this.open = function(dropdownScope, element, appendTo) { - if (!openScope) { - $document.on('click', closeDropdown); - } - - if (openScope && openScope !== dropdownScope) { - openScope.isOpen = false; - } - - openScope = dropdownScope; - - if (!appendTo) { - return; - } - - var openedDropdowns = openedContainers.get(appendTo); - if (openedDropdowns) { - var openedScopes = openedDropdowns.map(function(dropdown) { - return dropdown.scope; - }); - if (openedScopes.indexOf(dropdownScope) === -1) { - openedContainers.put(appendTo, { - scope: dropdownScope - }); - } - } else { - openedContainers.put(appendTo, { - scope: dropdownScope - }); - } - }; - - this.close = function(dropdownScope, element, appendTo) { - if (openScope === dropdownScope) { - $document.off('click', closeDropdown); - $document.off('keydown', this.keybindFilter); - openScope = null; - } - - if (!appendTo) { - return; - } - - var openedDropdowns = openedContainers.get(appendTo); - if (openedDropdowns) { - var dropdownToClose = openedDropdowns.reduce(function(toClose, dropdown) { - if (dropdown.scope === dropdownScope) { - return dropdown; - } - - return toClose; - }, {}); - if (dropdownToClose) { - openedContainers.remove(appendTo, dropdownToClose); - } - } - }; - - var closeDropdown = function(evt) { - // This method may still be called during the same mouse event that - // unbound this event handler. So check openScope before proceeding. - if (!openScope || !openScope.isOpen) { return; } - - if (evt && openScope.getAutoClose() === 'disabled') { return; } - - if (evt && evt.which === 3) { return; } - - var toggleElement = openScope.getToggleElement(); - if (evt && toggleElement && toggleElement[0].contains(evt.target)) { - return; - } - - var dropdownElement = openScope.getDropdownElement(); - if (evt && openScope.getAutoClose() === 'outsideClick' && - dropdownElement && dropdownElement[0].contains(evt.target)) { - return; - } - - openScope.focusToggleElement(); - openScope.isOpen = false; - - if (!$rootScope.$$phase) { - openScope.$apply(); - } - }; - - this.keybindFilter = function(evt) { - if (!openScope) { - // see this.close as ESC could have been pressed which kills the scope so we can not proceed - return; - } - - var dropdownElement = openScope.getDropdownElement(); - var toggleElement = openScope.getToggleElement(); - var dropdownElementTargeted = dropdownElement && dropdownElement[0].contains(evt.target); - var toggleElementTargeted = toggleElement && toggleElement[0].contains(evt.target); - if (evt.which === 27) { - evt.stopPropagation(); - openScope.focusToggleElement(); - closeDropdown(); - } else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen && (dropdownElementTargeted || toggleElementTargeted)) { - evt.preventDefault(); - evt.stopPropagation(); - openScope.focusDropdownEntry(evt.which); - } - }; -}]) - -.controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) { - var self = this, - scope = $scope.$new(), // create a child scope so we are not polluting original one - templateScope, - appendToOpenClass = dropdownConfig.appendToOpenClass, - openClass = dropdownConfig.openClass, - getIsOpen, - setIsOpen = angular.noop, - toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop, - keynavEnabled = false, - selectedOption = null, - body = $document.find('body'); - - $element.addClass('dropdown'); - - this.init = function() { - if ($attrs.isOpen) { - getIsOpen = $parse($attrs.isOpen); - setIsOpen = getIsOpen.assign; - - $scope.$watch(getIsOpen, function(value) { - scope.isOpen = !!value; - }); - } - - keynavEnabled = angular.isDefined($attrs.keyboardNav); - }; - - this.toggle = function(open) { - scope.isOpen = arguments.length ? !!open : !scope.isOpen; - if (angular.isFunction(setIsOpen)) { - setIsOpen(scope, scope.isOpen); - } - - return scope.isOpen; - }; - - // Allow other directives to watch status - this.isOpen = function() { - return scope.isOpen; - }; - - scope.getToggleElement = function() { - return self.toggleElement; - }; - - scope.getAutoClose = function() { - return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled' - }; - - scope.getElement = function() { - return $element; - }; - - scope.isKeynavEnabled = function() { - return keynavEnabled; - }; - - scope.focusDropdownEntry = function(keyCode) { - var elems = self.dropdownMenu ? //If append to body is used. - angular.element(self.dropdownMenu).find('a') : - $element.find('ul').eq(0).find('a'); - - switch (keyCode) { - case 40: { - if (!angular.isNumber(self.selectedOption)) { - self.selectedOption = 0; - } else { - self.selectedOption = self.selectedOption === elems.length - 1 ? - self.selectedOption : - self.selectedOption + 1; - } - break; - } - case 38: { - if (!angular.isNumber(self.selectedOption)) { - self.selectedOption = elems.length - 1; - } else { - self.selectedOption = self.selectedOption === 0 ? - 0 : self.selectedOption - 1; - } - break; - } - } - elems[self.selectedOption].focus(); - }; - - scope.getDropdownElement = function() { - return self.dropdownMenu; - }; - - scope.focusToggleElement = function() { - if (self.toggleElement) { - self.toggleElement[0].focus(); - } - }; - - function removeDropdownMenu() { - $element.append(self.dropdownMenu); - } - - scope.$watch('isOpen', function(isOpen, wasOpen) { - var appendTo = null, - appendToBody = false; - - if (angular.isDefined($attrs.dropdownAppendTo)) { - var appendToEl = $parse($attrs.dropdownAppendTo)(scope); - if (appendToEl) { - appendTo = angular.element(appendToEl); - } - } - - if (angular.isDefined($attrs.dropdownAppendToBody)) { - var appendToBodyValue = $parse($attrs.dropdownAppendToBody)(scope); - if (appendToBodyValue !== false) { - appendToBody = true; - } - } - - if (appendToBody && !appendTo) { - appendTo = body; - } - - if (appendTo && self.dropdownMenu) { - if (isOpen) { - appendTo.append(self.dropdownMenu); - $element.on('$destroy', removeDropdownMenu); - } else { - $element.off('$destroy', removeDropdownMenu); - removeDropdownMenu(); - } - } - - if (appendTo && self.dropdownMenu) { - var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true), - css, - rightalign, - scrollbarPadding, - scrollbarWidth = 0; - - css = { - top: pos.top + 'px', - display: isOpen ? 'block' : 'none' - }; - - rightalign = self.dropdownMenu.hasClass('dropdown-menu-right'); - if (!rightalign) { - css.left = pos.left + 'px'; - css.right = 'auto'; - } else { - css.left = 'auto'; - scrollbarPadding = $position.scrollbarPadding(appendTo); - - if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - scrollbarWidth = scrollbarPadding.scrollbarWidth; - } - - css.right = window.innerWidth - scrollbarWidth - - (pos.left + $element.prop('offsetWidth')) + 'px'; - } - - // Need to adjust our positioning to be relative to the appendTo container - // if it's not the body element - if (!appendToBody) { - var appendOffset = $position.offset(appendTo); - - css.top = pos.top - appendOffset.top + 'px'; - - if (!rightalign) { - css.left = pos.left - appendOffset.left + 'px'; - } else { - css.right = window.innerWidth - - (pos.left - appendOffset.left + $element.prop('offsetWidth')) + 'px'; - } - } - - self.dropdownMenu.css(css); - } - - var openContainer = appendTo ? appendTo : $element; - var dropdownOpenClass = appendTo ? appendToOpenClass : openClass; - var hasOpenClass = openContainer.hasClass(dropdownOpenClass); - var isOnlyOpen = uibDropdownService.isOnlyOpen($scope, appendTo); - - if (hasOpenClass === !isOpen) { - var toggleClass; - if (appendTo) { - toggleClass = !isOnlyOpen ? 'addClass' : 'removeClass'; - } else { - toggleClass = isOpen ? 'addClass' : 'removeClass'; - } - $animate[toggleClass](openContainer, dropdownOpenClass).then(function() { - if (angular.isDefined(isOpen) && isOpen !== wasOpen) { - toggleInvoker($scope, { open: !!isOpen }); - } - }); - } - - if (isOpen) { - if (self.dropdownMenuTemplateUrl) { - $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) { - templateScope = scope.$new(); - $compile(tplContent.trim())(templateScope, function(dropdownElement) { - var newEl = dropdownElement; - self.dropdownMenu.replaceWith(newEl); - self.dropdownMenu = newEl; - $document.on('keydown', uibDropdownService.keybindFilter); - }); - }); - } else { - $document.on('keydown', uibDropdownService.keybindFilter); - } - - scope.focusToggleElement(); - uibDropdownService.open(scope, $element, appendTo); - } else { - uibDropdownService.close(scope, $element, appendTo); - if (self.dropdownMenuTemplateUrl) { - if (templateScope) { - templateScope.$destroy(); - } - var newEl = angular.element(''); - self.dropdownMenu.replaceWith(newEl); - self.dropdownMenu = newEl; - } - - self.selectedOption = null; - } - - if (angular.isFunction(setIsOpen)) { - setIsOpen($scope, isOpen); - } - }); -}]) - -.directive('uibDropdown', function() { - return { - controller: 'UibDropdownController', - link: function(scope, element, attrs, dropdownCtrl) { - dropdownCtrl.init(); - } - }; -}) - -.directive('uibDropdownMenu', function() { - return { - restrict: 'A', - require: '?^uibDropdown', - link: function(scope, element, attrs, dropdownCtrl) { - if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) { - return; - } - - element.addClass('dropdown-menu'); - - var tplUrl = attrs.templateUrl; - if (tplUrl) { - dropdownCtrl.dropdownMenuTemplateUrl = tplUrl; - } - - if (!dropdownCtrl.dropdownMenu) { - dropdownCtrl.dropdownMenu = element; - } - } - }; -}) - -.directive('uibDropdownToggle', function() { - return { - require: '?^uibDropdown', - link: function(scope, element, attrs, dropdownCtrl) { - if (!dropdownCtrl) { - return; - } - - element.addClass('dropdown-toggle'); - - dropdownCtrl.toggleElement = element; - - var toggleDropdown = function(event) { - event.preventDefault(); - - if (!element.hasClass('disabled') && !attrs.disabled) { - scope.$apply(function() { - dropdownCtrl.toggle(); - }); - } - }; - - element.on('click', toggleDropdown); - - // WAI-ARIA - element.attr({ 'aria-haspopup': true, 'aria-expanded': false }); - scope.$watch(dropdownCtrl.isOpen, function(isOpen) { - element.attr('aria-expanded', !!isOpen); - }); - - scope.$on('$destroy', function() { - element.off('click', toggleDropdown); - }); - } - }; -}); - -angular.module('ui.bootstrap.stackedMap', []) -/** - * A helper, internal data structure that acts as a map but also allows getting / removing - * elements in the LIFO order - */ - .factory('$$stackedMap', function() { - return { - createNew: function() { - var stack = []; - - return { - add: function(key, value) { - stack.push({ - key: key, - value: value - }); - }, - get: function(key) { - for (var i = 0; i < stack.length; i++) { - if (key === stack[i].key) { - return stack[i]; - } - } - }, - keys: function() { - var keys = []; - for (var i = 0; i < stack.length; i++) { - keys.push(stack[i].key); - } - return keys; - }, - top: function() { - return stack[stack.length - 1]; - }, - remove: function(key) { - var idx = -1; - for (var i = 0; i < stack.length; i++) { - if (key === stack[i].key) { - idx = i; - break; - } - } - return stack.splice(idx, 1)[0]; - }, - removeTop: function() { - return stack.pop(); - }, - length: function() { - return stack.length; - } - }; - } - }; - }); -angular.module('ui.bootstrap.modal', ['ui.bootstrap.multiMap', 'ui.bootstrap.stackedMap', 'ui.bootstrap.position']) -/** - * Pluggable resolve mechanism for the modal resolve resolution - * Supports UI Router's $resolve service - */ - .provider('$uibResolve', function() { - var resolve = this; - this.resolver = null; - - this.setResolver = function(resolver) { - this.resolver = resolver; - }; - - this.$get = ['$injector', '$q', function($injector, $q) { - var resolver = resolve.resolver ? $injector.get(resolve.resolver) : null; - return { - resolve: function(invocables, locals, parent, self) { - if (resolver) { - return resolver.resolve(invocables, locals, parent, self); - } - - var promises = []; - - angular.forEach(invocables, function(value) { - if (angular.isFunction(value) || angular.isArray(value)) { - promises.push($q.resolve($injector.invoke(value))); - } else if (angular.isString(value)) { - promises.push($q.resolve($injector.get(value))); - } else { - promises.push($q.resolve(value)); - } - }); - - return $q.all(promises).then(function(resolves) { - var resolveObj = {}; - var resolveIter = 0; - angular.forEach(invocables, function(value, key) { - resolveObj[key] = resolves[resolveIter++]; - }); - - return resolveObj; - }); - } - }; - }]; - }) - -/** - * A helper directive for the $modal service. It creates a backdrop element. - */ - .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack', - function($animate, $injector, $modalStack) { - return { - restrict: 'A', - compile: function(tElement, tAttrs) { - tElement.addClass(tAttrs.backdropClass); - return linkFn; - } - }; - - function linkFn(scope, element, attrs) { - if (attrs.modalInClass) { - $animate.addClass(element, attrs.modalInClass); - - scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) { - var done = setIsAsync(); - if (scope.modalOptions.animation) { - $animate.removeClass(element, attrs.modalInClass).then(done); - } else { - done(); - } - }); - } - } - }]) - - .directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document', - function($modalStack, $q, $animateCss, $document) { - return { - scope: { - index: '@' - }, - restrict: 'A', - transclude: true, - templateUrl: function(tElement, tAttrs) { - return tAttrs.templateUrl || 'uib/template/modal/window.html'; - }, - link: function(scope, element, attrs) { - element.addClass(attrs.windowTopClass || ''); - scope.size = attrs.size; - - scope.close = function(evt) { - var modal = $modalStack.getTop(); - if (modal && modal.value.backdrop && - modal.value.backdrop !== 'static' && - evt.target === evt.currentTarget) { - evt.preventDefault(); - evt.stopPropagation(); - $modalStack.dismiss(modal.key, 'backdrop click'); - } - }; - - // moved from template to fix issue #2280 - element.on('click', scope.close); - - // This property is only added to the scope for the purpose of detecting when this directive is rendered. - // We can detect that by using this property in the template associated with this directive and then use - // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}. - scope.$isRendered = true; - - // Deferred object that will be resolved when this modal is rendered. - var modalRenderDeferObj = $q.defer(); - // Resolve render promise post-digest - scope.$$postDigest(function() { - modalRenderDeferObj.resolve(); - }); - - modalRenderDeferObj.promise.then(function() { - var animationPromise = null; - - if (attrs.modalInClass) { - animationPromise = $animateCss(element, { - addClass: attrs.modalInClass - }).start(); - - scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) { - var done = setIsAsync(); - $animateCss(element, { - removeClass: attrs.modalInClass - }).start().then(done); - }); - } - - - $q.when(animationPromise).then(function() { - // Notify {@link $modalStack} that modal is rendered. - var modal = $modalStack.getTop(); - if (modal) { - $modalStack.modalRendered(modal.key); - } - - /** - * If something within the freshly-opened modal already has focus (perhaps via a - * directive that causes focus) then there's no need to try to focus anything. - */ - if (!($document[0].activeElement && element[0].contains($document[0].activeElement))) { - var inputWithAutofocus = element[0].querySelector('[autofocus]'); - /** - * Auto-focusing of a freshly-opened modal element causes any child elements - * with the autofocus attribute to lose focus. This is an issue on touch - * based devices which will show and then hide the onscreen keyboard. - * Attempts to refocus the autofocus element via JavaScript will not reopen - * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus - * the modal element if the modal does not contain an autofocus element. - */ - if (inputWithAutofocus) { - inputWithAutofocus.focus(); - } else { - element[0].focus(); - } - } - }); - }); - } - }; - }]) - - .directive('uibModalAnimationClass', function() { - return { - compile: function(tElement, tAttrs) { - if (tAttrs.modalAnimation) { - tElement.addClass(tAttrs.uibModalAnimationClass); - } - } - }; - }) - - .directive('uibModalTransclude', ['$animate', function($animate) { - return { - link: function(scope, element, attrs, controller, transclude) { - transclude(scope.$parent, function(clone) { - element.empty(); - $animate.enter(clone, element); - }); - } - }; - }]) - - .factory('$uibModalStack', ['$animate', '$animateCss', '$document', - '$compile', '$rootScope', '$q', '$$multiMap', '$$stackedMap', '$uibPosition', - function($animate, $animateCss, $document, $compile, $rootScope, $q, $$multiMap, $$stackedMap, $uibPosition) { - var OPENED_MODAL_CLASS = 'modal-open'; - - var backdropDomEl, backdropScope; - var openedWindows = $$stackedMap.createNew(); - var openedClasses = $$multiMap.createNew(); - var $modalStack = { - NOW_CLOSING_EVENT: 'modal.stack.now-closing' - }; - var topModalIndex = 0; - var previousTopOpenedModal = null; - var ARIA_HIDDEN_ATTRIBUTE_NAME = 'data-bootstrap-modal-aria-hidden-count'; - - //Modal focus behavior - var tabbableSelector = 'a[href], area[href], input:not([disabled]):not([tabindex=\'-1\']), ' + - 'button:not([disabled]):not([tabindex=\'-1\']),select:not([disabled]):not([tabindex=\'-1\']), textarea:not([disabled]):not([tabindex=\'-1\']), ' + - 'iframe, object, embed, *[tabindex]:not([tabindex=\'-1\']), *[contenteditable=true]'; - var scrollbarPadding; - var SNAKE_CASE_REGEXP = /[A-Z]/g; - - // TODO: extract into common dependency with tooltip - function snake_case(name) { - var separator = '-'; - return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) { - return (pos ? separator : '') + letter.toLowerCase(); - }); - } - - function isVisible(element) { - return !!(element.offsetWidth || - element.offsetHeight || - element.getClientRects().length); - } - - function backdropIndex() { - var topBackdropIndex = -1; - var opened = openedWindows.keys(); - for (var i = 0; i < opened.length; i++) { - if (openedWindows.get(opened[i]).value.backdrop) { - topBackdropIndex = i; - } - } - - // If any backdrop exist, ensure that it's index is always - // right below the top modal - if (topBackdropIndex > -1 && topBackdropIndex < topModalIndex) { - topBackdropIndex = topModalIndex; - } - return topBackdropIndex; - } - - $rootScope.$watch(backdropIndex, function(newBackdropIndex) { - if (backdropScope) { - backdropScope.index = newBackdropIndex; - } - }); - - function removeModalWindow(modalInstance, elementToReceiveFocus) { - var modalWindow = openedWindows.get(modalInstance).value; - var appendToElement = modalWindow.appendTo; - - //clean up the stack - openedWindows.remove(modalInstance); - previousTopOpenedModal = openedWindows.top(); - if (previousTopOpenedModal) { - topModalIndex = parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10); - } - - removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() { - var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS; - openedClasses.remove(modalBodyClass, modalInstance); - var areAnyOpen = openedClasses.hasKey(modalBodyClass); - appendToElement.toggleClass(modalBodyClass, areAnyOpen); - if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - if (scrollbarPadding.originalRight) { - appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'}); - } else { - appendToElement.css({paddingRight: ''}); - } - scrollbarPadding = null; - } - toggleTopWindowClass(true); - }, modalWindow.closedDeferred); - checkRemoveBackdrop(); - - //move focus to specified element if available, or else to body - if (elementToReceiveFocus && elementToReceiveFocus.focus) { - elementToReceiveFocus.focus(); - } else if (appendToElement.focus) { - appendToElement.focus(); - } - } - - // Add or remove "windowTopClass" from the top window in the stack - function toggleTopWindowClass(toggleSwitch) { - var modalWindow; - - if (openedWindows.length() > 0) { - modalWindow = openedWindows.top().value; - modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch); - } - } - - function checkRemoveBackdrop() { - //remove backdrop if no longer needed - if (backdropDomEl && backdropIndex() === -1) { - var backdropScopeRef = backdropScope; - removeAfterAnimate(backdropDomEl, backdropScope, function() { - backdropScopeRef = null; - }); - backdropDomEl = undefined; - backdropScope = undefined; - } - } - - function removeAfterAnimate(domEl, scope, done, closedDeferred) { - var asyncDeferred; - var asyncPromise = null; - var setIsAsync = function() { - if (!asyncDeferred) { - asyncDeferred = $q.defer(); - asyncPromise = asyncDeferred.promise; - } - - return function asyncDone() { - asyncDeferred.resolve(); - }; - }; - scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync); - - // Note that it's intentional that asyncPromise might be null. - // That's when setIsAsync has not been called during the - // NOW_CLOSING_EVENT broadcast. - return $q.when(asyncPromise).then(afterAnimating); - - function afterAnimating() { - if (afterAnimating.done) { - return; - } - afterAnimating.done = true; - - $animate.leave(domEl).then(function() { - if (done) { - done(); - } - - domEl.remove(); - if (closedDeferred) { - closedDeferred.resolve(); - } - }); - - scope.$destroy(); - } - } - - $document.on('keydown', keydownListener); - - $rootScope.$on('$destroy', function() { - $document.off('keydown', keydownListener); - }); - - function keydownListener(evt) { - if (evt.isDefaultPrevented()) { - return evt; - } - - var modal = openedWindows.top(); - if (modal) { - switch (evt.which) { - case 27: { - if (modal.value.keyboard) { - evt.preventDefault(); - $rootScope.$apply(function() { - $modalStack.dismiss(modal.key, 'escape key press'); - }); - } - break; - } - case 9: { - var list = $modalStack.loadFocusElementList(modal); - var focusChanged = false; - if (evt.shiftKey) { - if ($modalStack.isFocusInFirstItem(evt, list) || $modalStack.isModalFocused(evt, modal)) { - focusChanged = $modalStack.focusLastFocusableElement(list); - } - } else { - if ($modalStack.isFocusInLastItem(evt, list)) { - focusChanged = $modalStack.focusFirstFocusableElement(list); - } - } - - if (focusChanged) { - evt.preventDefault(); - evt.stopPropagation(); - } - - break; - } - } - } - } - - $modalStack.open = function(modalInstance, modal) { - var modalOpener = $document[0].activeElement, - modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS; - - toggleTopWindowClass(false); - - // Store the current top first, to determine what index we ought to use - // for the current top modal - previousTopOpenedModal = openedWindows.top(); - - openedWindows.add(modalInstance, { - deferred: modal.deferred, - renderDeferred: modal.renderDeferred, - closedDeferred: modal.closedDeferred, - modalScope: modal.scope, - backdrop: modal.backdrop, - keyboard: modal.keyboard, - openedClass: modal.openedClass, - windowTopClass: modal.windowTopClass, - animation: modal.animation, - appendTo: modal.appendTo - }); - - openedClasses.put(modalBodyClass, modalInstance); - - var appendToElement = modal.appendTo, - currBackdropIndex = backdropIndex(); - - if (currBackdropIndex >= 0 && !backdropDomEl) { - backdropScope = $rootScope.$new(true); - backdropScope.modalOptions = modal; - backdropScope.index = currBackdropIndex; - backdropDomEl = angular.element('
      '); - backdropDomEl.attr({ - 'class': 'modal-backdrop', - 'ng-style': '{\'z-index\': 1040 + (index && 1 || 0) + index*10}', - 'uib-modal-animation-class': 'fade', - 'modal-in-class': 'in' - }); - if (modal.backdropClass) { - backdropDomEl.addClass(modal.backdropClass); - } - - if (modal.animation) { - backdropDomEl.attr('modal-animation', 'true'); - } - $compile(backdropDomEl)(backdropScope); - $animate.enter(backdropDomEl, appendToElement); - if ($uibPosition.isScrollable(appendToElement)) { - scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement); - if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) { - appendToElement.css({paddingRight: scrollbarPadding.right + 'px'}); - } - } - } - - var content; - if (modal.component) { - content = document.createElement(snake_case(modal.component.name)); - content = angular.element(content); - content.attr({ - resolve: '$resolve', - 'modal-instance': '$uibModalInstance', - close: '$close($value)', - dismiss: '$dismiss($value)' - }); - } else { - content = modal.content; - } - - // Set the top modal index based on the index of the previous top modal - topModalIndex = previousTopOpenedModal ? parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10) + 1 : 0; - var angularDomEl = angular.element('
      '); - angularDomEl.attr({ - 'class': 'modal', - 'template-url': modal.windowTemplateUrl, - 'window-top-class': modal.windowTopClass, - 'role': 'dialog', - 'aria-labelledby': modal.ariaLabelledBy, - 'aria-describedby': modal.ariaDescribedBy, - 'size': modal.size, - 'index': topModalIndex, - 'animate': 'animate', - 'ng-style': '{\'z-index\': 1050 + $$topModalIndex*10, display: \'block\'}', - 'tabindex': -1, - 'uib-modal-animation-class': 'fade', - 'modal-in-class': 'in' - }).append(content); - if (modal.windowClass) { - angularDomEl.addClass(modal.windowClass); - } - - if (modal.animation) { - angularDomEl.attr('modal-animation', 'true'); - } - - appendToElement.addClass(modalBodyClass); - if (modal.scope) { - // we need to explicitly add the modal index to the modal scope - // because it is needed by ngStyle to compute the zIndex property. - modal.scope.$$topModalIndex = topModalIndex; - } - $animate.enter($compile(angularDomEl)(modal.scope), appendToElement); - - openedWindows.top().value.modalDomEl = angularDomEl; - openedWindows.top().value.modalOpener = modalOpener; - - applyAriaHidden(angularDomEl); - - function applyAriaHidden(el) { - if (!el || el[0].tagName === 'BODY') { - return; - } - - getSiblings(el).forEach(function(sibling) { - var elemIsAlreadyHidden = sibling.getAttribute('aria-hidden') === 'true', - ariaHiddenCount = parseInt(sibling.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10); - - if (!ariaHiddenCount) { - ariaHiddenCount = elemIsAlreadyHidden ? 1 : 0; - } - - sibling.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, ariaHiddenCount + 1); - sibling.setAttribute('aria-hidden', 'true'); - }); - - return applyAriaHidden(el.parent()); - - function getSiblings(el) { - var children = el.parent() ? el.parent().children() : []; - - return Array.prototype.filter.call(children, function(child) { - return child !== el[0]; - }); - } - } - }; - - function broadcastClosing(modalWindow, resultOrReason, closing) { - return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented; - } - - function unhideBackgroundElements() { - Array.prototype.forEach.call( - document.querySelectorAll('[' + ARIA_HIDDEN_ATTRIBUTE_NAME + ']'), - function(hiddenEl) { - var ariaHiddenCount = parseInt(hiddenEl.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10), - newHiddenCount = ariaHiddenCount - 1; - hiddenEl.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, newHiddenCount); - - if (!newHiddenCount) { - hiddenEl.removeAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME); - hiddenEl.removeAttribute('aria-hidden'); - } - } - ); - } - - $modalStack.close = function(modalInstance, result) { - var modalWindow = openedWindows.get(modalInstance); - unhideBackgroundElements(); - if (modalWindow && broadcastClosing(modalWindow, result, true)) { - modalWindow.value.modalScope.$$uibDestructionScheduled = true; - modalWindow.value.deferred.resolve(result); - removeModalWindow(modalInstance, modalWindow.value.modalOpener); - return true; - } - - return !modalWindow; - }; - - $modalStack.dismiss = function(modalInstance, reason) { - var modalWindow = openedWindows.get(modalInstance); - unhideBackgroundElements(); - if (modalWindow && broadcastClosing(modalWindow, reason, false)) { - modalWindow.value.modalScope.$$uibDestructionScheduled = true; - modalWindow.value.deferred.reject(reason); - removeModalWindow(modalInstance, modalWindow.value.modalOpener); - return true; - } - return !modalWindow; - }; - - $modalStack.dismissAll = function(reason) { - var topModal = this.getTop(); - while (topModal && this.dismiss(topModal.key, reason)) { - topModal = this.getTop(); - } - }; - - $modalStack.getTop = function() { - return openedWindows.top(); - }; - - $modalStack.modalRendered = function(modalInstance) { - var modalWindow = openedWindows.get(modalInstance); - if (modalWindow) { - modalWindow.value.renderDeferred.resolve(); - } - }; - - $modalStack.focusFirstFocusableElement = function(list) { - if (list.length > 0) { - list[0].focus(); - return true; - } - return false; - }; - - $modalStack.focusLastFocusableElement = function(list) { - if (list.length > 0) { - list[list.length - 1].focus(); - return true; - } - return false; - }; - - $modalStack.isModalFocused = function(evt, modalWindow) { - if (evt && modalWindow) { - var modalDomEl = modalWindow.value.modalDomEl; - if (modalDomEl && modalDomEl.length) { - return (evt.target || evt.srcElement) === modalDomEl[0]; - } - } - return false; - }; - - $modalStack.isFocusInFirstItem = function(evt, list) { - if (list.length > 0) { - return (evt.target || evt.srcElement) === list[0]; - } - return false; - }; - - $modalStack.isFocusInLastItem = function(evt, list) { - if (list.length > 0) { - return (evt.target || evt.srcElement) === list[list.length - 1]; - } - return false; - }; - - $modalStack.loadFocusElementList = function(modalWindow) { - if (modalWindow) { - var modalDomE1 = modalWindow.value.modalDomEl; - if (modalDomE1 && modalDomE1.length) { - var elements = modalDomE1[0].querySelectorAll(tabbableSelector); - return elements ? - Array.prototype.filter.call(elements, function(element) { - return isVisible(element); - }) : elements; - } - } - }; - - return $modalStack; - }]) - - .provider('$uibModal', function() { - var $modalProvider = { - options: { - animation: true, - backdrop: true, //can also be false or 'static' - keyboard: true - }, - $get: ['$rootScope', '$q', '$document', '$templateRequest', '$controller', '$uibResolve', '$uibModalStack', - function ($rootScope, $q, $document, $templateRequest, $controller, $uibResolve, $modalStack) { - var $modal = {}; - - function getTemplatePromise(options) { - return options.template ? $q.when(options.template) : - $templateRequest(angular.isFunction(options.templateUrl) ? - options.templateUrl() : options.templateUrl); - } - - var promiseChain = null; - $modal.getPromiseChain = function() { - return promiseChain; - }; - - $modal.open = function(modalOptions) { - var modalResultDeferred = $q.defer(); - var modalOpenedDeferred = $q.defer(); - var modalClosedDeferred = $q.defer(); - var modalRenderDeferred = $q.defer(); - - //prepare an instance of a modal to be injected into controllers and returned to a caller - var modalInstance = { - result: modalResultDeferred.promise, - opened: modalOpenedDeferred.promise, - closed: modalClosedDeferred.promise, - rendered: modalRenderDeferred.promise, - close: function (result) { - return $modalStack.close(modalInstance, result); - }, - dismiss: function (reason) { - return $modalStack.dismiss(modalInstance, reason); - } - }; - - //merge and clean up options - modalOptions = angular.extend({}, $modalProvider.options, modalOptions); - modalOptions.resolve = modalOptions.resolve || {}; - modalOptions.appendTo = modalOptions.appendTo || $document.find('body').eq(0); - - if (!modalOptions.appendTo.length) { - throw new Error('appendTo element not found. Make sure that the element passed is in DOM.'); - } - - //verify options - if (!modalOptions.component && !modalOptions.template && !modalOptions.templateUrl) { - throw new Error('One of component or template or templateUrl options is required.'); - } - - var templateAndResolvePromise; - if (modalOptions.component) { - templateAndResolvePromise = $q.when($uibResolve.resolve(modalOptions.resolve, {}, null, null)); - } else { - templateAndResolvePromise = - $q.all([getTemplatePromise(modalOptions), $uibResolve.resolve(modalOptions.resolve, {}, null, null)]); - } - - function resolveWithTemplate() { - return templateAndResolvePromise; - } - - // Wait for the resolution of the existing promise chain. - // Then switch to our own combined promise dependency (regardless of how the previous modal fared). - // Then add to $modalStack and resolve opened. - // Finally clean up the chain variable if no subsequent modal has overwritten it. - var samePromise; - samePromise = promiseChain = $q.all([promiseChain]) - .then(resolveWithTemplate, resolveWithTemplate) - .then(function resolveSuccess(tplAndVars) { - var providedScope = modalOptions.scope || $rootScope; - - var modalScope = providedScope.$new(); - modalScope.$close = modalInstance.close; - modalScope.$dismiss = modalInstance.dismiss; - - modalScope.$on('$destroy', function() { - if (!modalScope.$$uibDestructionScheduled) { - modalScope.$dismiss('$uibUnscheduledDestruction'); - } - }); - - var modal = { - scope: modalScope, - deferred: modalResultDeferred, - renderDeferred: modalRenderDeferred, - closedDeferred: modalClosedDeferred, - animation: modalOptions.animation, - backdrop: modalOptions.backdrop, - keyboard: modalOptions.keyboard, - backdropClass: modalOptions.backdropClass, - windowTopClass: modalOptions.windowTopClass, - windowClass: modalOptions.windowClass, - windowTemplateUrl: modalOptions.windowTemplateUrl, - ariaLabelledBy: modalOptions.ariaLabelledBy, - ariaDescribedBy: modalOptions.ariaDescribedBy, - size: modalOptions.size, - openedClass: modalOptions.openedClass, - appendTo: modalOptions.appendTo - }; - - var component = {}; - var ctrlInstance, ctrlInstantiate, ctrlLocals = {}; - - if (modalOptions.component) { - constructLocals(component, false, true, false); - component.name = modalOptions.component; - modal.component = component; - } else if (modalOptions.controller) { - constructLocals(ctrlLocals, true, false, true); - - // the third param will make the controller instantiate later,private api - // @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126 - ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs); - if (modalOptions.controllerAs && modalOptions.bindToController) { - ctrlInstance = ctrlInstantiate.instance; - ctrlInstance.$close = modalScope.$close; - ctrlInstance.$dismiss = modalScope.$dismiss; - angular.extend(ctrlInstance, { - $resolve: ctrlLocals.$scope.$resolve - }, providedScope); - } - - ctrlInstance = ctrlInstantiate(); - - if (angular.isFunction(ctrlInstance.$onInit)) { - ctrlInstance.$onInit(); - } - } - - if (!modalOptions.component) { - modal.content = tplAndVars[0]; - } - - $modalStack.open(modalInstance, modal); - modalOpenedDeferred.resolve(true); - - function constructLocals(obj, template, instanceOnScope, injectable) { - obj.$scope = modalScope; - obj.$scope.$resolve = {}; - if (instanceOnScope) { - obj.$scope.$uibModalInstance = modalInstance; - } else { - obj.$uibModalInstance = modalInstance; - } - - var resolves = template ? tplAndVars[1] : tplAndVars; - angular.forEach(resolves, function(value, key) { - if (injectable) { - obj[key] = value; - } - - obj.$scope.$resolve[key] = value; - }); - } - }, function resolveError(reason) { - modalOpenedDeferred.reject(reason); - modalResultDeferred.reject(reason); - })['finally'](function() { - if (promiseChain === samePromise) { - promiseChain = null; - } - }); - - return modalInstance; - }; - - return $modal; - } - ] - }; - - return $modalProvider; - }); - -angular.module('ui.bootstrap.paging', []) -/** - * Helper internal service for generating common controller code between the - * pager and pagination components - */ -.factory('uibPaging', ['$parse', function($parse) { - return { - create: function(ctrl, $scope, $attrs) { - ctrl.setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop; - ctrl.ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl - ctrl._watchers = []; - - ctrl.init = function(ngModelCtrl, config) { - ctrl.ngModelCtrl = ngModelCtrl; - ctrl.config = config; - - ngModelCtrl.$render = function() { - ctrl.render(); - }; - - if ($attrs.itemsPerPage) { - ctrl._watchers.push($scope.$parent.$watch($attrs.itemsPerPage, function(value) { - ctrl.itemsPerPage = parseInt(value, 10); - $scope.totalPages = ctrl.calculateTotalPages(); - ctrl.updatePage(); - })); - } else { - ctrl.itemsPerPage = config.itemsPerPage; - } - - $scope.$watch('totalItems', function(newTotal, oldTotal) { - if (angular.isDefined(newTotal) || newTotal !== oldTotal) { - $scope.totalPages = ctrl.calculateTotalPages(); - ctrl.updatePage(); - } - }); - }; - - ctrl.calculateTotalPages = function() { - var totalPages = ctrl.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / ctrl.itemsPerPage); - return Math.max(totalPages || 0, 1); - }; - - ctrl.render = function() { - $scope.page = parseInt(ctrl.ngModelCtrl.$viewValue, 10) || 1; - }; - - $scope.selectPage = function(page, evt) { - if (evt) { - evt.preventDefault(); - } - - var clickAllowed = !$scope.ngDisabled || !evt; - if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) { - if (evt && evt.target) { - evt.target.blur(); - } - ctrl.ngModelCtrl.$setViewValue(page); - ctrl.ngModelCtrl.$render(); - } - }; - - $scope.getText = function(key) { - return $scope[key + 'Text'] || ctrl.config[key + 'Text']; - }; - - $scope.noPrevious = function() { - return $scope.page === 1; - }; - - $scope.noNext = function() { - return $scope.page === $scope.totalPages; - }; - - ctrl.updatePage = function() { - ctrl.setNumPages($scope.$parent, $scope.totalPages); // Readonly variable - - if ($scope.page > $scope.totalPages) { - $scope.selectPage($scope.totalPages); - } else { - ctrl.ngModelCtrl.$render(); - } - }; - - $scope.$on('$destroy', function() { - while (ctrl._watchers.length) { - ctrl._watchers.shift()(); - } - }); - } - }; -}]); - -angular.module('ui.bootstrap.pager', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex']) - -.controller('UibPagerController', ['$scope', '$attrs', 'uibPaging', 'uibPagerConfig', function($scope, $attrs, uibPaging, uibPagerConfig) { - $scope.align = angular.isDefined($attrs.align) ? $scope.$parent.$eval($attrs.align) : uibPagerConfig.align; - - uibPaging.create(this, $scope, $attrs); -}]) - -.constant('uibPagerConfig', { - itemsPerPage: 10, - previousText: '« Previous', - nextText: 'Next »', - align: true -}) - -.directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) { - return { - scope: { - totalItems: '=', - previousText: '@', - nextText: '@', - ngDisabled: '=' - }, - require: ['uibPager', '?ngModel'], - restrict: 'A', - controller: 'UibPagerController', - controllerAs: 'pager', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/pager/pager.html'; - }, - link: function(scope, element, attrs, ctrls) { - element.addClass('pager'); - var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - if (!ngModelCtrl) { - return; // do nothing if no ng-model - } - - paginationCtrl.init(ngModelCtrl, uibPagerConfig); - } - }; -}]); - -angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex']) -.controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) { - var ctrl = this; - // Setup configuration parameters - var maxSize = angular.isDefined($attrs.maxSize) ? $scope.$parent.$eval($attrs.maxSize) : uibPaginationConfig.maxSize, - rotate = angular.isDefined($attrs.rotate) ? $scope.$parent.$eval($attrs.rotate) : uibPaginationConfig.rotate, - forceEllipses = angular.isDefined($attrs.forceEllipses) ? $scope.$parent.$eval($attrs.forceEllipses) : uibPaginationConfig.forceEllipses, - boundaryLinkNumbers = angular.isDefined($attrs.boundaryLinkNumbers) ? $scope.$parent.$eval($attrs.boundaryLinkNumbers) : uibPaginationConfig.boundaryLinkNumbers, - pageLabel = angular.isDefined($attrs.pageLabel) ? function(idx) { return $scope.$parent.$eval($attrs.pageLabel, {$page: idx}); } : angular.identity; - $scope.boundaryLinks = angular.isDefined($attrs.boundaryLinks) ? $scope.$parent.$eval($attrs.boundaryLinks) : uibPaginationConfig.boundaryLinks; - $scope.directionLinks = angular.isDefined($attrs.directionLinks) ? $scope.$parent.$eval($attrs.directionLinks) : uibPaginationConfig.directionLinks; - $attrs.$set('role', 'menu'); - - uibPaging.create(this, $scope, $attrs); - - if ($attrs.maxSize) { - ctrl._watchers.push($scope.$parent.$watch($parse($attrs.maxSize), function(value) { - maxSize = parseInt(value, 10); - ctrl.render(); - })); - } - - // Create page object used in template - function makePage(number, text, isActive) { - return { - number: number, - text: text, - active: isActive - }; - } - - function getPages(currentPage, totalPages) { - var pages = []; - - // Default page limits - var startPage = 1, endPage = totalPages; - var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages; - - // recompute if maxSize - if (isMaxSized) { - if (rotate) { - // Current page is displayed in the middle of the visible ones - startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1); - endPage = startPage + maxSize - 1; - - // Adjust if limit is exceeded - if (endPage > totalPages) { - endPage = totalPages; - startPage = endPage - maxSize + 1; - } - } else { - // Visible pages are paginated with maxSize - startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1; - - // Adjust last page if limit is exceeded - endPage = Math.min(startPage + maxSize - 1, totalPages); - } - } - - // Add page number links - for (var number = startPage; number <= endPage; number++) { - var page = makePage(number, pageLabel(number), number === currentPage); - pages.push(page); - } - - // Add links to move between page sets - if (isMaxSized && maxSize > 0 && (!rotate || forceEllipses || boundaryLinkNumbers)) { - if (startPage > 1) { - if (!boundaryLinkNumbers || startPage > 3) { //need ellipsis for all options unless range is too close to beginning - var previousPageSet = makePage(startPage - 1, '...', false); - pages.unshift(previousPageSet); - } - if (boundaryLinkNumbers) { - if (startPage === 3) { //need to replace ellipsis when the buttons would be sequential - var secondPageLink = makePage(2, '2', false); - pages.unshift(secondPageLink); - } - //add the first page - var firstPageLink = makePage(1, '1', false); - pages.unshift(firstPageLink); - } - } - - if (endPage < totalPages) { - if (!boundaryLinkNumbers || endPage < totalPages - 2) { //need ellipsis for all options unless range is too close to end - var nextPageSet = makePage(endPage + 1, '...', false); - pages.push(nextPageSet); - } - if (boundaryLinkNumbers) { - if (endPage === totalPages - 2) { //need to replace ellipsis when the buttons would be sequential - var secondToLastPageLink = makePage(totalPages - 1, totalPages - 1, false); - pages.push(secondToLastPageLink); - } - //add the last page - var lastPageLink = makePage(totalPages, totalPages, false); - pages.push(lastPageLink); - } - } - } - return pages; - } - - var originalRender = this.render; - this.render = function() { - originalRender(); - if ($scope.page > 0 && $scope.page <= $scope.totalPages) { - $scope.pages = getPages($scope.page, $scope.totalPages); - } - }; -}]) - -.constant('uibPaginationConfig', { - itemsPerPage: 10, - boundaryLinks: false, - boundaryLinkNumbers: false, - directionLinks: true, - firstText: 'First', - previousText: 'Previous', - nextText: 'Next', - lastText: 'Last', - rotate: true, - forceEllipses: false -}) - -.directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, uibPaginationConfig) { - return { - scope: { - totalItems: '=', - firstText: '@', - previousText: '@', - nextText: '@', - lastText: '@', - ngDisabled:'=' - }, - require: ['uibPagination', '?ngModel'], - restrict: 'A', - controller: 'UibPaginationController', - controllerAs: 'pagination', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/pagination/pagination.html'; - }, - link: function(scope, element, attrs, ctrls) { - element.addClass('pagination'); - var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - if (!ngModelCtrl) { - return; // do nothing if no ng-model - } - - paginationCtrl.init(ngModelCtrl, uibPaginationConfig); - } - }; -}]); - -/** - * The following features are still outstanding: animation as a - * function, placement as a function, inside, support for more triggers than - * just mouse enter/leave, html tooltips, and selector delegation. - */ -angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap']) - -/** - * The $tooltip service creates tooltip- and popover-like directives as well as - * houses global options for them. - */ -.provider('$uibTooltip', function() { - // The default options tooltip and popover. - var defaultOptions = { - placement: 'top', - placementClassPrefix: '', - animation: true, - popupDelay: 0, - popupCloseDelay: 0, - useContentExp: false - }; - - // Default hide triggers for each show trigger - var triggerMap = { - 'mouseenter': 'mouseleave', - 'click': 'click', - 'outsideClick': 'outsideClick', - 'focus': 'blur', - 'none': '' - }; - - // The options specified to the provider globally. - var globalOptions = {}; - - /** - * `options({})` allows global configuration of all tooltips in the - * application. - * - * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) { - * // place tooltips left instead of top by default - * $tooltipProvider.options( { placement: 'left' } ); - * }); - */ - this.options = function(value) { - angular.extend(globalOptions, value); - }; - - /** - * This allows you to extend the set of trigger mappings available. E.g.: - * - * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } ); - */ - this.setTriggers = function setTriggers(triggers) { - angular.extend(triggerMap, triggers); - }; - - /** - * This is a helper function for translating camel-case to snake_case. - */ - function snake_case(name) { - var regexp = /[A-Z]/g; - var separator = '-'; - return name.replace(regexp, function(letter, pos) { - return (pos ? separator : '') + letter.toLowerCase(); - }); - } - - /** - * Returns the actual instance of the $tooltip service. - * TODO support multiple triggers - */ - this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) { - var openedTooltips = $$stackedMap.createNew(); - $document.on('keyup', keypressListener); - - $rootScope.$on('$destroy', function() { - $document.off('keyup', keypressListener); - }); - - function keypressListener(e) { - if (e.which === 27) { - var last = openedTooltips.top(); - if (last) { - last.value.close(); - last = null; - } - } - } - - return function $tooltip(ttType, prefix, defaultTriggerShow, options) { - options = angular.extend({}, defaultOptions, globalOptions, options); - - /** - * Returns an object of show and hide triggers. - * - * If a trigger is supplied, - * it is used to show the tooltip; otherwise, it will use the `trigger` - * option passed to the `$tooltipProvider.options` method; else it will - * default to the trigger supplied to this directive factory. - * - * The hide trigger is based on the show trigger. If the `trigger` option - * was passed to the `$tooltipProvider.options` method, it will use the - * mapped trigger from `triggerMap` or the passed trigger if the map is - * undefined; otherwise, it uses the `triggerMap` value of the show - * trigger; else it will just use the show trigger. - */ - function getTriggers(trigger) { - var show = (trigger || options.trigger || defaultTriggerShow).split(' '); - var hide = show.map(function(trigger) { - return triggerMap[trigger] || trigger; - }); - return { - show: show, - hide: hide - }; - } - - var directiveName = snake_case(ttType); - - var startSym = $interpolate.startSymbol(); - var endSym = $interpolate.endSymbol(); - var template = - '
      ' + - '
      '; - - return { - compile: function(tElem, tAttrs) { - var tooltipLinker = $compile(template); - - return function link(scope, element, attrs, tooltipCtrl) { - var tooltip; - var tooltipLinkedScope; - var transitionTimeout; - var showTimeout; - var hideTimeout; - var positionTimeout; - var adjustmentTimeout; - var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false; - var triggers = getTriggers(undefined); - var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']); - var ttScope = scope.$new(true); - var repositionScheduled = false; - var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false; - var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false; - var observers = []; - var lastPlacement; - - var positionTooltip = function() { - // check if tooltip exists and is not empty - if (!tooltip || !tooltip.html()) { return; } - - if (!positionTimeout) { - positionTimeout = $timeout(function() { - var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody); - var initialHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight'); - var elementPos = appendToBody ? $position.offset(element) : $position.position(element); - tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' }); - var placementClasses = ttPosition.placement.split('-'); - - if (!tooltip.hasClass(placementClasses[0])) { - tooltip.removeClass(lastPlacement.split('-')[0]); - tooltip.addClass(placementClasses[0]); - } - - if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) { - tooltip.removeClass(options.placementClassPrefix + lastPlacement); - tooltip.addClass(options.placementClassPrefix + ttPosition.placement); - } - - adjustmentTimeout = $timeout(function() { - var currentHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight'); - var adjustment = $position.adjustTop(placementClasses, elementPos, initialHeight, currentHeight); - if (adjustment) { - tooltip.css(adjustment); - } - adjustmentTimeout = null; - }, 0, false); - - // first time through tt element will have the - // uib-position-measure class or if the placement - // has changed we need to position the arrow. - if (tooltip.hasClass('uib-position-measure')) { - $position.positionArrow(tooltip, ttPosition.placement); - tooltip.removeClass('uib-position-measure'); - } else if (lastPlacement !== ttPosition.placement) { - $position.positionArrow(tooltip, ttPosition.placement); - } - lastPlacement = ttPosition.placement; - - positionTimeout = null; - }, 0, false); - } - }; - - // Set up the correct scope to allow transclusion later - ttScope.origScope = scope; - - // By default, the tooltip is not open. - // TODO add ability to start tooltip opened - ttScope.isOpen = false; - - function toggleTooltipBind() { - if (!ttScope.isOpen) { - showTooltipBind(); - } else { - hideTooltipBind(); - } - } - - // Show the tooltip with delay if specified, otherwise show it immediately - function showTooltipBind() { - if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) { - return; - } - - cancelHide(); - prepareTooltip(); - - if (ttScope.popupDelay) { - // Do nothing if the tooltip was already scheduled to pop-up. - // This happens if show is triggered multiple times before any hide is triggered. - if (!showTimeout) { - showTimeout = $timeout(show, ttScope.popupDelay, false); - } - } else { - show(); - } - } - - function hideTooltipBind() { - cancelShow(); - - if (ttScope.popupCloseDelay) { - if (!hideTimeout) { - hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false); - } - } else { - hide(); - } - } - - // Show the tooltip popup element. - function show() { - cancelShow(); - cancelHide(); - - // Don't show empty tooltips. - if (!ttScope.content) { - return angular.noop; - } - - createTooltip(); - - // And show the tooltip. - ttScope.$evalAsync(function() { - ttScope.isOpen = true; - assignIsOpen(true); - positionTooltip(); - }); - } - - function cancelShow() { - if (showTimeout) { - $timeout.cancel(showTimeout); - showTimeout = null; - } - - if (positionTimeout) { - $timeout.cancel(positionTimeout); - positionTimeout = null; - } - } - - // Hide the tooltip popup element. - function hide() { - if (!ttScope) { - return; - } - - // First things first: we don't show it anymore. - ttScope.$evalAsync(function() { - if (ttScope) { - ttScope.isOpen = false; - assignIsOpen(false); - // And now we remove it from the DOM. However, if we have animation, we - // need to wait for it to expire beforehand. - // FIXME: this is a placeholder for a port of the transitions library. - // The fade transition in TWBS is 150ms. - if (ttScope.animation) { - if (!transitionTimeout) { - transitionTimeout = $timeout(removeTooltip, 150, false); - } - } else { - removeTooltip(); - } - } - }); - } - - function cancelHide() { - if (hideTimeout) { - $timeout.cancel(hideTimeout); - hideTimeout = null; - } - - if (transitionTimeout) { - $timeout.cancel(transitionTimeout); - transitionTimeout = null; - } - } - - function createTooltip() { - // There can only be one tooltip element per directive shown at once. - if (tooltip) { - return; - } - - tooltipLinkedScope = ttScope.$new(); - tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) { - if (appendToBody) { - $document.find('body').append(tooltip); - } else { - element.after(tooltip); - } - }); - - openedTooltips.add(ttScope, { - close: hide - }); - - prepObservers(); - } - - function removeTooltip() { - cancelShow(); - cancelHide(); - unregisterObservers(); - - if (tooltip) { - tooltip.remove(); - - tooltip = null; - if (adjustmentTimeout) { - $timeout.cancel(adjustmentTimeout); - } - } - - openedTooltips.remove(ttScope); - - if (tooltipLinkedScope) { - tooltipLinkedScope.$destroy(); - tooltipLinkedScope = null; - } - } - - /** - * Set the initial scope values. Once - * the tooltip is created, the observers - * will be added to keep things in sync. - */ - function prepareTooltip() { - ttScope.title = attrs[prefix + 'Title']; - if (contentParse) { - ttScope.content = contentParse(scope); - } else { - ttScope.content = attrs[ttType]; - } - - ttScope.popupClass = attrs[prefix + 'Class']; - ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement; - var placement = $position.parsePlacement(ttScope.placement); - lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0]; - - var delay = parseInt(attrs[prefix + 'PopupDelay'], 10); - var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10); - ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay; - ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay; - } - - function assignIsOpen(isOpen) { - if (isOpenParse && angular.isFunction(isOpenParse.assign)) { - isOpenParse.assign(scope, isOpen); - } - } - - ttScope.contentExp = function() { - return ttScope.content; - }; - - /** - * Observe the relevant attributes. - */ - attrs.$observe('disabled', function(val) { - if (val) { - cancelShow(); - } - - if (val && ttScope.isOpen) { - hide(); - } - }); - - if (isOpenParse) { - scope.$watch(isOpenParse, function(val) { - if (ttScope && !val === ttScope.isOpen) { - toggleTooltipBind(); - } - }); - } - - function prepObservers() { - observers.length = 0; - - if (contentParse) { - observers.push( - scope.$watch(contentParse, function(val) { - ttScope.content = val; - if (!val && ttScope.isOpen) { - hide(); - } - }) - ); - - observers.push( - tooltipLinkedScope.$watch(function() { - if (!repositionScheduled) { - repositionScheduled = true; - tooltipLinkedScope.$$postDigest(function() { - repositionScheduled = false; - if (ttScope && ttScope.isOpen) { - positionTooltip(); - } - }); - } - }) - ); - } else { - observers.push( - attrs.$observe(ttType, function(val) { - ttScope.content = val; - if (!val && ttScope.isOpen) { - hide(); - } else { - positionTooltip(); - } - }) - ); - } - - observers.push( - attrs.$observe(prefix + 'Title', function(val) { - ttScope.title = val; - if (ttScope.isOpen) { - positionTooltip(); - } - }) - ); - - observers.push( - attrs.$observe(prefix + 'Placement', function(val) { - ttScope.placement = val ? val : options.placement; - if (ttScope.isOpen) { - positionTooltip(); - } - }) - ); - } - - function unregisterObservers() { - if (observers.length) { - angular.forEach(observers, function(observer) { - observer(); - }); - observers.length = 0; - } - } - - // hide tooltips/popovers for outsideClick trigger - function bodyHideTooltipBind(e) { - if (!ttScope || !ttScope.isOpen || !tooltip) { - return; - } - // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked - if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) { - hideTooltipBind(); - } - } - - // KeyboardEvent handler to hide the tooltip on Escape key press - function hideOnEscapeKey(e) { - if (e.which === 27) { - hideTooltipBind(); - } - } - - var unregisterTriggers = function() { - triggers.show.forEach(function(trigger) { - if (trigger === 'outsideClick') { - element.off('click', toggleTooltipBind); - } else { - element.off(trigger, showTooltipBind); - element.off(trigger, toggleTooltipBind); - } - element.off('keypress', hideOnEscapeKey); - }); - triggers.hide.forEach(function(trigger) { - if (trigger === 'outsideClick') { - $document.off('click', bodyHideTooltipBind); - } else { - element.off(trigger, hideTooltipBind); - } - }); - }; - - function prepTriggers() { - var showTriggers = [], hideTriggers = []; - var val = scope.$eval(attrs[prefix + 'Trigger']); - unregisterTriggers(); - - if (angular.isObject(val)) { - Object.keys(val).forEach(function(key) { - showTriggers.push(key); - hideTriggers.push(val[key]); - }); - triggers = { - show: showTriggers, - hide: hideTriggers - }; - } else { - triggers = getTriggers(val); - } - - if (triggers.show !== 'none') { - triggers.show.forEach(function(trigger, idx) { - if (trigger === 'outsideClick') { - element.on('click', toggleTooltipBind); - $document.on('click', bodyHideTooltipBind); - } else if (trigger === triggers.hide[idx]) { - element.on(trigger, toggleTooltipBind); - } else if (trigger) { - element.on(trigger, showTooltipBind); - element.on(triggers.hide[idx], hideTooltipBind); - } - element.on('keypress', hideOnEscapeKey); - }); - } - } - - prepTriggers(); - - var animation = scope.$eval(attrs[prefix + 'Animation']); - ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation; - - var appendToBodyVal; - var appendKey = prefix + 'AppendToBody'; - if (appendKey in attrs && attrs[appendKey] === undefined) { - appendToBodyVal = true; - } else { - appendToBodyVal = scope.$eval(attrs[appendKey]); - } - - appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody; - - // Make sure tooltip is destroyed and removed. - scope.$on('$destroy', function onDestroyTooltip() { - unregisterTriggers(); - removeTooltip(); - ttScope = null; - }); - }; - } - }; - }; - }]; -}) - -// This is mostly ngInclude code but with a custom scope -.directive('uibTooltipTemplateTransclude', [ - '$animate', '$sce', '$compile', '$templateRequest', -function ($animate, $sce, $compile, $templateRequest) { - return { - link: function(scope, elem, attrs) { - var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope); - - var changeCounter = 0, - currentScope, - previousElement, - currentElement; - - var cleanupLastIncludeContent = function() { - if (previousElement) { - previousElement.remove(); - previousElement = null; - } - - if (currentScope) { - currentScope.$destroy(); - currentScope = null; - } - - if (currentElement) { - $animate.leave(currentElement).then(function() { - previousElement = null; - }); - previousElement = currentElement; - currentElement = null; - } - }; - - scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) { - var thisChangeId = ++changeCounter; - - if (src) { - //set the 2nd param to true to ignore the template request error so that the inner - //contents and scope can be cleaned up. - $templateRequest(src, true).then(function(response) { - if (thisChangeId !== changeCounter) { return; } - var newScope = origScope.$new(); - var template = response; - - var clone = $compile(template)(newScope, function(clone) { - cleanupLastIncludeContent(); - $animate.enter(clone, elem); - }); - - currentScope = newScope; - currentElement = clone; - - currentScope.$emit('$includeContentLoaded', src); - }, function() { - if (thisChangeId === changeCounter) { - cleanupLastIncludeContent(); - scope.$emit('$includeContentError', src); - } - }); - scope.$emit('$includeContentRequested', src); - } else { - cleanupLastIncludeContent(); - } - }); - - scope.$on('$destroy', cleanupLastIncludeContent); - } - }; -}]) - -/** - * Note that it's intentional that these classes are *not* applied through $animate. - * They must not be animated as they're expected to be present on the tooltip on - * initialization. - */ -.directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) { - return { - restrict: 'A', - link: function(scope, element, attrs) { - // need to set the primary position so the - // arrow has space during position measure. - // tooltip.positionTooltip() - if (scope.placement) { - // // There are no top-left etc... classes - // // in TWBS, so we need the primary position. - var position = $uibPosition.parsePlacement(scope.placement); - element.addClass(position[0]); - } - - if (scope.popupClass) { - element.addClass(scope.popupClass); - } - - if (scope.animation) { - element.addClass(attrs.tooltipAnimationClass); - } - } - }; -}]) - -.directive('uibTooltipPopup', function() { - return { - restrict: 'A', - scope: { content: '@' }, - templateUrl: 'uib/template/tooltip/tooltip-popup.html' - }; -}) - -.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter'); -}]) - -.directive('uibTooltipTemplatePopup', function() { - return { - restrict: 'A', - scope: { contentExp: '&', originScope: '&' }, - templateUrl: 'uib/template/tooltip/tooltip-template-popup.html' - }; -}) - -.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', { - useContentExp: true - }); -}]) - -.directive('uibTooltipHtmlPopup', function() { - return { - restrict: 'A', - scope: { contentExp: '&' }, - templateUrl: 'uib/template/tooltip/tooltip-html-popup.html' - }; -}) - -.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', { - useContentExp: true - }); -}]); - -/** - * The following features are still outstanding: popup delay, animation as a - * function, placement as a function, inside, support for more triggers than - * just mouse enter/leave, and selector delegatation. - */ -angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip']) - -.directive('uibPopoverTemplatePopup', function() { - return { - restrict: 'A', - scope: { uibTitle: '@', contentExp: '&', originScope: '&' }, - templateUrl: 'uib/template/popover/popover-template.html' - }; -}) - -.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibPopoverTemplate', 'popover', 'click', { - useContentExp: true - }); -}]) - -.directive('uibPopoverHtmlPopup', function() { - return { - restrict: 'A', - scope: { contentExp: '&', uibTitle: '@' }, - templateUrl: 'uib/template/popover/popover-html.html' - }; -}) - -.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibPopoverHtml', 'popover', 'click', { - useContentExp: true - }); -}]) - -.directive('uibPopoverPopup', function() { - return { - restrict: 'A', - scope: { uibTitle: '@', content: '@' }, - templateUrl: 'uib/template/popover/popover.html' - }; -}) - -.directive('uibPopover', ['$uibTooltip', function($uibTooltip) { - return $uibTooltip('uibPopover', 'popover', 'click'); -}]); - -angular.module('ui.bootstrap.progressbar', []) - -.constant('uibProgressConfig', { - animate: true, - max: 100 -}) - -.controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) { - var self = this, - animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate; - - this.bars = []; - $scope.max = getMaxOrDefault(); - - this.addBar = function(bar, element, attrs) { - if (!animate) { - element.css({'transition': 'none'}); - } - - this.bars.push(bar); - - bar.max = getMaxOrDefault(); - bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar'; - - bar.$watch('value', function(value) { - bar.recalculatePercentage(); - }); - - bar.recalculatePercentage = function() { - var totalPercentage = self.bars.reduce(function(total, bar) { - bar.percent = +(100 * bar.value / bar.max).toFixed(2); - return total + bar.percent; - }, 0); - - if (totalPercentage > 100) { - bar.percent -= totalPercentage - 100; - } - }; - - bar.$on('$destroy', function() { - element = null; - self.removeBar(bar); - }); - }; - - this.removeBar = function(bar) { - this.bars.splice(this.bars.indexOf(bar), 1); - this.bars.forEach(function (bar) { - bar.recalculatePercentage(); - }); - }; - - //$attrs.$observe('maxParam', function(maxParam) { - $scope.$watch('maxParam', function(maxParam) { - self.bars.forEach(function(bar) { - bar.max = getMaxOrDefault(); - bar.recalculatePercentage(); - }); - }); - - function getMaxOrDefault () { - return angular.isDefined($scope.maxParam) ? $scope.maxParam : progressConfig.max; - } -}]) - -.directive('uibProgress', function() { - return { - replace: true, - transclude: true, - controller: 'UibProgressController', - require: 'uibProgress', - scope: { - maxParam: '=?max' - }, - templateUrl: 'uib/template/progressbar/progress.html' - }; -}) - -.directive('uibBar', function() { - return { - replace: true, - transclude: true, - require: '^uibProgress', - scope: { - value: '=', - type: '@' - }, - templateUrl: 'uib/template/progressbar/bar.html', - link: function(scope, element, attrs, progressCtrl) { - progressCtrl.addBar(scope, element, attrs); - } - }; -}) - -.directive('uibProgressbar', function() { - return { - replace: true, - transclude: true, - controller: 'UibProgressController', - scope: { - value: '=', - maxParam: '=?max', - type: '@' - }, - templateUrl: 'uib/template/progressbar/progressbar.html', - link: function(scope, element, attrs, progressCtrl) { - progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title}); - } - }; -}); - -angular.module('ui.bootstrap.rating', []) - -.constant('uibRatingConfig', { - max: 5, - stateOn: null, - stateOff: null, - enableReset: true, - titles: ['one', 'two', 'three', 'four', 'five'] -}) - -.controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) { - var ngModelCtrl = { $setViewValue: angular.noop }, - self = this; - - this.init = function(ngModelCtrl_) { - ngModelCtrl = ngModelCtrl_; - ngModelCtrl.$render = this.render; - - ngModelCtrl.$formatters.push(function(value) { - if (angular.isNumber(value) && value << 0 !== value) { - value = Math.round(value); - } - - return value; - }); - - this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn; - this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff; - this.enableReset = angular.isDefined($attrs.enableReset) ? - $scope.$parent.$eval($attrs.enableReset) : ratingConfig.enableReset; - var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles; - this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ? - tmpTitles : ratingConfig.titles; - - var ratingStates = angular.isDefined($attrs.ratingStates) ? - $scope.$parent.$eval($attrs.ratingStates) : - new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max); - $scope.range = this.buildTemplateObjects(ratingStates); - }; - - this.buildTemplateObjects = function(states) { - for (var i = 0, n = states.length; i < n; i++) { - states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]); - } - return states; - }; - - this.getTitle = function(index) { - if (index >= this.titles.length) { - return index + 1; - } - - return this.titles[index]; - }; - - $scope.rate = function(value) { - if (!$scope.readonly && value >= 0 && value <= $scope.range.length) { - var newViewValue = self.enableReset && ngModelCtrl.$viewValue === value ? 0 : value; - ngModelCtrl.$setViewValue(newViewValue); - ngModelCtrl.$render(); - } - }; - - $scope.enter = function(value) { - if (!$scope.readonly) { - $scope.value = value; - } - $scope.onHover({value: value}); - }; - - $scope.reset = function() { - $scope.value = ngModelCtrl.$viewValue; - $scope.onLeave(); - }; - - $scope.onKeydown = function(evt) { - if (/(37|38|39|40)/.test(evt.which)) { - evt.preventDefault(); - evt.stopPropagation(); - $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1)); - } - }; - - this.render = function() { - $scope.value = ngModelCtrl.$viewValue; - $scope.title = self.getTitle($scope.value - 1); - }; -}]) - -.directive('uibRating', function() { - return { - require: ['uibRating', 'ngModel'], - restrict: 'A', - scope: { - readonly: '=?readOnly', - onHover: '&', - onLeave: '&' - }, - controller: 'UibRatingController', - templateUrl: 'uib/template/rating/rating.html', - link: function(scope, element, attrs, ctrls) { - var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - ratingCtrl.init(ngModelCtrl); - } - }; -}); - -angular.module('ui.bootstrap.tabs', []) - -.controller('UibTabsetController', ['$scope', function ($scope) { - var ctrl = this, - oldIndex; - ctrl.tabs = []; - - ctrl.select = function(index, evt) { - if (!destroyed) { - var previousIndex = findTabIndex(oldIndex); - var previousSelected = ctrl.tabs[previousIndex]; - if (previousSelected) { - previousSelected.tab.onDeselect({ - $event: evt, - $selectedIndex: index - }); - if (evt && evt.isDefaultPrevented()) { - return; - } - previousSelected.tab.active = false; - } - - var selected = ctrl.tabs[index]; - if (selected) { - selected.tab.onSelect({ - $event: evt - }); - selected.tab.active = true; - ctrl.active = selected.index; - oldIndex = selected.index; - } else if (!selected && angular.isDefined(oldIndex)) { - ctrl.active = null; - oldIndex = null; - } - } - }; - - ctrl.addTab = function addTab(tab) { - ctrl.tabs.push({ - tab: tab, - index: tab.index - }); - ctrl.tabs.sort(function(t1, t2) { - if (t1.index > t2.index) { - return 1; - } - - if (t1.index < t2.index) { - return -1; - } - - return 0; - }); - - if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) { - var newActiveIndex = findTabIndex(tab.index); - ctrl.select(newActiveIndex); - } - }; - - ctrl.removeTab = function removeTab(tab) { - var index; - for (var i = 0; i < ctrl.tabs.length; i++) { - if (ctrl.tabs[i].tab === tab) { - index = i; - break; - } - } - - if (ctrl.tabs[index].index === ctrl.active) { - var newActiveTabIndex = index === ctrl.tabs.length - 1 ? - index - 1 : index + 1 % ctrl.tabs.length; - ctrl.select(newActiveTabIndex); - } - - ctrl.tabs.splice(index, 1); - }; - - $scope.$watch('tabset.active', function(val) { - if (angular.isDefined(val) && val !== oldIndex) { - ctrl.select(findTabIndex(val)); - } - }); - - var destroyed; - $scope.$on('$destroy', function() { - destroyed = true; - }); - - function findTabIndex(index) { - for (var i = 0; i < ctrl.tabs.length; i++) { - if (ctrl.tabs[i].index === index) { - return i; - } - } - } -}]) - -.directive('uibTabset', function() { - return { - transclude: true, - replace: true, - scope: {}, - bindToController: { - active: '=?', - type: '@' - }, - controller: 'UibTabsetController', - controllerAs: 'tabset', - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/tabs/tabset.html'; - }, - link: function(scope, element, attrs) { - scope.vertical = angular.isDefined(attrs.vertical) ? - scope.$parent.$eval(attrs.vertical) : false; - scope.justified = angular.isDefined(attrs.justified) ? - scope.$parent.$eval(attrs.justified) : false; - } - }; -}) - -.directive('uibTab', ['$parse', function($parse) { - return { - require: '^uibTabset', - replace: true, - templateUrl: function(element, attrs) { - return attrs.templateUrl || 'uib/template/tabs/tab.html'; - }, - transclude: true, - scope: { - heading: '@', - index: '=?', - classes: '@?', - onSelect: '&select', //This callback is called in contentHeadingTransclude - //once it inserts the tab's content into the dom - onDeselect: '&deselect' - }, - controller: function() { - //Empty controller so other directives can require being 'under' a tab - }, - controllerAs: 'tab', - link: function(scope, elm, attrs, tabsetCtrl, transclude) { - scope.disabled = false; - if (attrs.disable) { - scope.$parent.$watch($parse(attrs.disable), function(value) { - scope.disabled = !! value; - }); - } - - if (angular.isUndefined(attrs.index)) { - if (tabsetCtrl.tabs && tabsetCtrl.tabs.length) { - scope.index = Math.max.apply(null, tabsetCtrl.tabs.map(function(t) { return t.index; })) + 1; - } else { - scope.index = 0; - } - } - - if (angular.isUndefined(attrs.classes)) { - scope.classes = ''; - } - - scope.select = function(evt) { - if (!scope.disabled) { - var index; - for (var i = 0; i < tabsetCtrl.tabs.length; i++) { - if (tabsetCtrl.tabs[i].tab === scope) { - index = i; - break; - } - } - - tabsetCtrl.select(index, evt); - } - }; - - tabsetCtrl.addTab(scope); - scope.$on('$destroy', function() { - tabsetCtrl.removeTab(scope); - }); - - //We need to transclude later, once the content container is ready. - //when this link happens, we're inside a tab heading. - scope.$transcludeFn = transclude; - } - }; -}]) - -.directive('uibTabHeadingTransclude', function() { - return { - restrict: 'A', - require: '^uibTab', - link: function(scope, elm) { - scope.$watch('headingElement', function updateHeadingElement(heading) { - if (heading) { - elm.html(''); - elm.append(heading); - } - }); - } - }; -}) - -.directive('uibTabContentTransclude', function() { - return { - restrict: 'A', - require: '^uibTabset', - link: function(scope, elm, attrs) { - var tab = scope.$eval(attrs.uibTabContentTransclude).tab; - - //Now our tab is ready to be transcluded: both the tab heading area - //and the tab content area are loaded. Transclude 'em both. - tab.$transcludeFn(tab.$parent, function(contents) { - angular.forEach(contents, function(node) { - if (isTabHeading(node)) { - //Let tabHeadingTransclude know. - tab.headingElement = node; - } else { - elm.append(node); - } - }); - }); - } - }; - - function isTabHeading(node) { - return node.tagName && ( - node.hasAttribute('uib-tab-heading') || - node.hasAttribute('data-uib-tab-heading') || - node.hasAttribute('x-uib-tab-heading') || - node.tagName.toLowerCase() === 'uib-tab-heading' || - node.tagName.toLowerCase() === 'data-uib-tab-heading' || - node.tagName.toLowerCase() === 'x-uib-tab-heading' || - node.tagName.toLowerCase() === 'uib:tab-heading' - ); - } -}); - -angular.module('ui.bootstrap.timepicker', []) - -.constant('uibTimepickerConfig', { - hourStep: 1, - minuteStep: 1, - secondStep: 1, - showMeridian: true, - showSeconds: false, - meridians: null, - readonlyInput: false, - mousewheel: true, - arrowkeys: true, - showSpinners: true, - templateUrl: 'uib/template/timepicker/timepicker.html' -}) - -.controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) { - var hoursModelCtrl, minutesModelCtrl, secondsModelCtrl; - var selected = new Date(), - watchers = [], - ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl - meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS, - padHours = angular.isDefined($attrs.padHours) ? $scope.$parent.$eval($attrs.padHours) : true; - - $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0; - $element.removeAttr('tabindex'); - - this.init = function(ngModelCtrl_, inputs) { - ngModelCtrl = ngModelCtrl_; - ngModelCtrl.$render = this.render; - - ngModelCtrl.$formatters.unshift(function(modelValue) { - return modelValue ? new Date(modelValue) : null; - }); - - var hoursInputEl = inputs.eq(0), - minutesInputEl = inputs.eq(1), - secondsInputEl = inputs.eq(2); - - hoursModelCtrl = hoursInputEl.controller('ngModel'); - minutesModelCtrl = minutesInputEl.controller('ngModel'); - secondsModelCtrl = secondsInputEl.controller('ngModel'); - - var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel; - - if (mousewheel) { - this.setupMousewheelEvents(hoursInputEl, minutesInputEl, secondsInputEl); - } - - var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys; - if (arrowkeys) { - this.setupArrowkeyEvents(hoursInputEl, minutesInputEl, secondsInputEl); - } - - $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput; - this.setupInputEvents(hoursInputEl, minutesInputEl, secondsInputEl); - }; - - var hourStep = timepickerConfig.hourStep; - if ($attrs.hourStep) { - watchers.push($scope.$parent.$watch($parse($attrs.hourStep), function(value) { - hourStep = +value; - })); - } - - var minuteStep = timepickerConfig.minuteStep; - if ($attrs.minuteStep) { - watchers.push($scope.$parent.$watch($parse($attrs.minuteStep), function(value) { - minuteStep = +value; - })); - } - - var min; - watchers.push($scope.$parent.$watch($parse($attrs.min), function(value) { - var dt = new Date(value); - min = isNaN(dt) ? undefined : dt; - })); - - var max; - watchers.push($scope.$parent.$watch($parse($attrs.max), function(value) { - var dt = new Date(value); - max = isNaN(dt) ? undefined : dt; - })); - - var disabled = false; - if ($attrs.ngDisabled) { - watchers.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(value) { - disabled = value; - })); - } - - $scope.noIncrementHours = function() { - var incrementedSelected = addMinutes(selected, hourStep * 60); - return disabled || incrementedSelected > max || - incrementedSelected < selected && incrementedSelected < min; - }; - - $scope.noDecrementHours = function() { - var decrementedSelected = addMinutes(selected, -hourStep * 60); - return disabled || decrementedSelected < min || - decrementedSelected > selected && decrementedSelected > max; - }; - - $scope.noIncrementMinutes = function() { - var incrementedSelected = addMinutes(selected, minuteStep); - return disabled || incrementedSelected > max || - incrementedSelected < selected && incrementedSelected < min; - }; - - $scope.noDecrementMinutes = function() { - var decrementedSelected = addMinutes(selected, -minuteStep); - return disabled || decrementedSelected < min || - decrementedSelected > selected && decrementedSelected > max; - }; - - $scope.noIncrementSeconds = function() { - var incrementedSelected = addSeconds(selected, secondStep); - return disabled || incrementedSelected > max || - incrementedSelected < selected && incrementedSelected < min; - }; - - $scope.noDecrementSeconds = function() { - var decrementedSelected = addSeconds(selected, -secondStep); - return disabled || decrementedSelected < min || - decrementedSelected > selected && decrementedSelected > max; - }; - - $scope.noToggleMeridian = function() { - if (selected.getHours() < 12) { - return disabled || addMinutes(selected, 12 * 60) > max; - } - - return disabled || addMinutes(selected, -12 * 60) < min; - }; - - var secondStep = timepickerConfig.secondStep; - if ($attrs.secondStep) { - watchers.push($scope.$parent.$watch($parse($attrs.secondStep), function(value) { - secondStep = +value; - })); - } - - $scope.showSeconds = timepickerConfig.showSeconds; - if ($attrs.showSeconds) { - watchers.push($scope.$parent.$watch($parse($attrs.showSeconds), function(value) { - $scope.showSeconds = !!value; - })); - } - - // 12H / 24H mode - $scope.showMeridian = timepickerConfig.showMeridian; - if ($attrs.showMeridian) { - watchers.push($scope.$parent.$watch($parse($attrs.showMeridian), function(value) { - $scope.showMeridian = !!value; - - if (ngModelCtrl.$error.time) { - // Evaluate from template - var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate(); - if (angular.isDefined(hours) && angular.isDefined(minutes)) { - selected.setHours(hours); - refresh(); - } - } else { - updateTemplate(); - } - })); - } - - // Get $scope.hours in 24H mode if valid - function getHoursFromTemplate() { - var hours = +$scope.hours; - var valid = $scope.showMeridian ? hours > 0 && hours < 13 : - hours >= 0 && hours < 24; - if (!valid || $scope.hours === '') { - return undefined; - } - - if ($scope.showMeridian) { - if (hours === 12) { - hours = 0; - } - if ($scope.meridian === meridians[1]) { - hours = hours + 12; - } - } - return hours; - } - - function getMinutesFromTemplate() { - var minutes = +$scope.minutes; - var valid = minutes >= 0 && minutes < 60; - if (!valid || $scope.minutes === '') { - return undefined; - } - return minutes; - } - - function getSecondsFromTemplate() { - var seconds = +$scope.seconds; - return seconds >= 0 && seconds < 60 ? seconds : undefined; - } - - function pad(value, noPad) { - if (value === null) { - return ''; - } - - return angular.isDefined(value) && value.toString().length < 2 && !noPad ? - '0' + value : value.toString(); - } - - // Respond on mousewheel spin - this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) { - var isScrollingUp = function(e) { - if (e.originalEvent) { - e = e.originalEvent; - } - //pick correct delta variable depending on event - var delta = e.wheelDelta ? e.wheelDelta : -e.deltaY; - return e.detail || delta > 0; - }; - - hoursInputEl.on('mousewheel wheel', function(e) { - if (!disabled) { - $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours()); - } - e.preventDefault(); - }); - - minutesInputEl.on('mousewheel wheel', function(e) { - if (!disabled) { - $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes()); - } - e.preventDefault(); - }); - - secondsInputEl.on('mousewheel wheel', function(e) { - if (!disabled) { - $scope.$apply(isScrollingUp(e) ? $scope.incrementSeconds() : $scope.decrementSeconds()); - } - e.preventDefault(); - }); - }; - - // Respond on up/down arrowkeys - this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) { - hoursInputEl.on('keydown', function(e) { - if (!disabled) { - if (e.which === 38) { // up - e.preventDefault(); - $scope.incrementHours(); - $scope.$apply(); - } else if (e.which === 40) { // down - e.preventDefault(); - $scope.decrementHours(); - $scope.$apply(); - } - } - }); - - minutesInputEl.on('keydown', function(e) { - if (!disabled) { - if (e.which === 38) { // up - e.preventDefault(); - $scope.incrementMinutes(); - $scope.$apply(); - } else if (e.which === 40) { // down - e.preventDefault(); - $scope.decrementMinutes(); - $scope.$apply(); - } - } - }); - - secondsInputEl.on('keydown', function(e) { - if (!disabled) { - if (e.which === 38) { // up - e.preventDefault(); - $scope.incrementSeconds(); - $scope.$apply(); - } else if (e.which === 40) { // down - e.preventDefault(); - $scope.decrementSeconds(); - $scope.$apply(); - } - } - }); - }; - - this.setupInputEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) { - if ($scope.readonlyInput) { - $scope.updateHours = angular.noop; - $scope.updateMinutes = angular.noop; - $scope.updateSeconds = angular.noop; - return; - } - - var invalidate = function(invalidHours, invalidMinutes, invalidSeconds) { - ngModelCtrl.$setViewValue(null); - ngModelCtrl.$setValidity('time', false); - if (angular.isDefined(invalidHours)) { - $scope.invalidHours = invalidHours; - if (hoursModelCtrl) { - hoursModelCtrl.$setValidity('hours', false); - } - } - - if (angular.isDefined(invalidMinutes)) { - $scope.invalidMinutes = invalidMinutes; - if (minutesModelCtrl) { - minutesModelCtrl.$setValidity('minutes', false); - } - } - - if (angular.isDefined(invalidSeconds)) { - $scope.invalidSeconds = invalidSeconds; - if (secondsModelCtrl) { - secondsModelCtrl.$setValidity('seconds', false); - } - } - }; - - $scope.updateHours = function() { - var hours = getHoursFromTemplate(), - minutes = getMinutesFromTemplate(); - - ngModelCtrl.$setDirty(); - - if (angular.isDefined(hours) && angular.isDefined(minutes)) { - selected.setHours(hours); - selected.setMinutes(minutes); - if (selected < min || selected > max) { - invalidate(true); - } else { - refresh('h'); - } - } else { - invalidate(true); - } - }; - - hoursInputEl.on('blur', function(e) { - ngModelCtrl.$setTouched(); - if (modelIsEmpty()) { - makeValid(); - } else if ($scope.hours === null || $scope.hours === '') { - invalidate(true); - } else if (!$scope.invalidHours && $scope.hours < 10) { - $scope.$apply(function() { - $scope.hours = pad($scope.hours, !padHours); - }); - } - }); - - $scope.updateMinutes = function() { - var minutes = getMinutesFromTemplate(), - hours = getHoursFromTemplate(); - - ngModelCtrl.$setDirty(); - - if (angular.isDefined(minutes) && angular.isDefined(hours)) { - selected.setHours(hours); - selected.setMinutes(minutes); - if (selected < min || selected > max) { - invalidate(undefined, true); - } else { - refresh('m'); - } - } else { - invalidate(undefined, true); - } - }; - - minutesInputEl.on('blur', function(e) { - ngModelCtrl.$setTouched(); - if (modelIsEmpty()) { - makeValid(); - } else if ($scope.minutes === null) { - invalidate(undefined, true); - } else if (!$scope.invalidMinutes && $scope.minutes < 10) { - $scope.$apply(function() { - $scope.minutes = pad($scope.minutes); - }); - } - }); - - $scope.updateSeconds = function() { - var seconds = getSecondsFromTemplate(); - - ngModelCtrl.$setDirty(); - - if (angular.isDefined(seconds)) { - selected.setSeconds(seconds); - refresh('s'); - } else { - invalidate(undefined, undefined, true); - } - }; - - secondsInputEl.on('blur', function(e) { - if (modelIsEmpty()) { - makeValid(); - } else if (!$scope.invalidSeconds && $scope.seconds < 10) { - $scope.$apply( function() { - $scope.seconds = pad($scope.seconds); - }); - } - }); - - }; - - this.render = function() { - var date = ngModelCtrl.$viewValue; - - if (isNaN(date)) { - ngModelCtrl.$setValidity('time', false); - $log.error('Timepicker 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.'); - } else { - if (date) { - selected = date; - } - - if (selected < min || selected > max) { - ngModelCtrl.$setValidity('time', false); - $scope.invalidHours = true; - $scope.invalidMinutes = true; - } else { - makeValid(); - } - updateTemplate(); - } - }; - - // Call internally when we know that model is valid. - function refresh(keyboardChange) { - makeValid(); - ngModelCtrl.$setViewValue(new Date(selected)); - updateTemplate(keyboardChange); - } - - function makeValid() { - if (hoursModelCtrl) { - hoursModelCtrl.$setValidity('hours', true); - } - - if (minutesModelCtrl) { - minutesModelCtrl.$setValidity('minutes', true); - } - - if (secondsModelCtrl) { - secondsModelCtrl.$setValidity('seconds', true); - } - - ngModelCtrl.$setValidity('time', true); - $scope.invalidHours = false; - $scope.invalidMinutes = false; - $scope.invalidSeconds = false; - } - - function updateTemplate(keyboardChange) { - if (!ngModelCtrl.$modelValue) { - $scope.hours = null; - $scope.minutes = null; - $scope.seconds = null; - $scope.meridian = meridians[0]; - } else { - var hours = selected.getHours(), - minutes = selected.getMinutes(), - seconds = selected.getSeconds(); - - if ($scope.showMeridian) { - hours = hours === 0 || hours === 12 ? 12 : hours % 12; // Convert 24 to 12 hour system - } - - $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours); - if (keyboardChange !== 'm') { - $scope.minutes = pad(minutes); - } - $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1]; - - if (keyboardChange !== 's') { - $scope.seconds = pad(seconds); - } - $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1]; - } - } - - function addSecondsToSelected(seconds) { - selected = addSeconds(selected, seconds); - refresh(); - } - - function addMinutes(selected, minutes) { - return addSeconds(selected, minutes*60); - } - - function addSeconds(date, seconds) { - var dt = new Date(date.getTime() + seconds * 1000); - var newDate = new Date(date); - newDate.setHours(dt.getHours(), dt.getMinutes(), dt.getSeconds()); - return newDate; - } - - function modelIsEmpty() { - return ($scope.hours === null || $scope.hours === '') && - ($scope.minutes === null || $scope.minutes === '') && - (!$scope.showSeconds || $scope.showSeconds && ($scope.seconds === null || $scope.seconds === '')); - } - - $scope.showSpinners = angular.isDefined($attrs.showSpinners) ? - $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners; - - $scope.incrementHours = function() { - if (!$scope.noIncrementHours()) { - addSecondsToSelected(hourStep * 60 * 60); - } - }; - - $scope.decrementHours = function() { - if (!$scope.noDecrementHours()) { - addSecondsToSelected(-hourStep * 60 * 60); - } - }; - - $scope.incrementMinutes = function() { - if (!$scope.noIncrementMinutes()) { - addSecondsToSelected(minuteStep * 60); - } - }; - - $scope.decrementMinutes = function() { - if (!$scope.noDecrementMinutes()) { - addSecondsToSelected(-minuteStep * 60); - } - }; - - $scope.incrementSeconds = function() { - if (!$scope.noIncrementSeconds()) { - addSecondsToSelected(secondStep); - } - }; - - $scope.decrementSeconds = function() { - if (!$scope.noDecrementSeconds()) { - addSecondsToSelected(-secondStep); - } - }; - - $scope.toggleMeridian = function() { - var minutes = getMinutesFromTemplate(), - hours = getHoursFromTemplate(); - - if (!$scope.noToggleMeridian()) { - if (angular.isDefined(minutes) && angular.isDefined(hours)) { - addSecondsToSelected(12 * 60 * (selected.getHours() < 12 ? 60 : -60)); - } else { - $scope.meridian = $scope.meridian === meridians[0] ? meridians[1] : meridians[0]; - } - } - }; - - $scope.blur = function() { - ngModelCtrl.$setTouched(); - }; - - $scope.$on('$destroy', function() { - while (watchers.length) { - watchers.shift()(); - } - }); -}]) - -.directive('uibTimepicker', ['uibTimepickerConfig', function(uibTimepickerConfig) { - return { - require: ['uibTimepicker', '?^ngModel'], - restrict: 'A', - controller: 'UibTimepickerController', - controllerAs: 'timepicker', - scope: {}, - templateUrl: function(element, attrs) { - return attrs.templateUrl || uibTimepickerConfig.templateUrl; - }, - link: function(scope, element, attrs, ctrls) { - var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1]; - - if (ngModelCtrl) { - timepickerCtrl.init(ngModelCtrl, element.find('input')); - } - } - }; -}]); - -angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap.position']) - -/** - * A helper service that can parse typeahead's syntax (string provided by users) - * Extracted to a separate service for ease of unit testing - */ - .factory('uibTypeaheadParser', ['$parse', function($parse) { - // 000001111111100000000000002222222200000000000000003333333333333330000000000044444444000 - var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/; - return { - parse: function(input) { - var match = input.match(TYPEAHEAD_REGEXP); - if (!match) { - throw new Error( - 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' + - ' but got "' + input + '".'); - } - - return { - itemName: match[3], - source: $parse(match[4]), - viewMapper: $parse(match[2] || match[1]), - modelMapper: $parse(match[1]) - }; - } - }; - }]) - - .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$$debounce', '$uibPosition', 'uibTypeaheadParser', - function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $$debounce, $position, typeaheadParser) { - var HOT_KEYS = [9, 13, 27, 38, 40]; - var eventDebounceTime = 200; - var modelCtrl, ngModelOptions; - //SUPPORTED ATTRIBUTES (OPTIONS) - - //minimal no of characters that needs to be entered before typeahead kicks-in - var minLength = originalScope.$eval(attrs.typeaheadMinLength); - if (!minLength && minLength !== 0) { - minLength = 1; - } - - originalScope.$watch(attrs.typeaheadMinLength, function (newVal) { - minLength = !newVal && newVal !== 0 ? 1 : newVal; - }); - - //minimal wait time after last character typed before typeahead kicks-in - var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0; - - //should it restrict model values to the ones selected from the popup only? - var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false; - originalScope.$watch(attrs.typeaheadEditable, function (newVal) { - isEditable = newVal !== false; - }); - - //binding to a variable that indicates if matches are being retrieved asynchronously - var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop; - - //a function to determine if an event should cause selection - var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) { - var evt = vals.$event; - return evt.which === 13 || evt.which === 9; - }; - - //a callback executed when a match is selected - var onSelectCallback = $parse(attrs.typeaheadOnSelect); - - //should it select highlighted popup value when losing focus? - var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false; - - //binding to a variable that indicates if there were no results after the query is completed - var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop; - - var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined; - - var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false; - - var appendTo = attrs.typeaheadAppendTo ? - originalScope.$eval(attrs.typeaheadAppendTo) : null; - - var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false; - - //If input matches an item of the list exactly, select it automatically - var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false; - - //binding to a variable that indicates if dropdown is open - var isOpenSetter = $parse(attrs.typeaheadIsOpen).assign || angular.noop; - - var showHint = originalScope.$eval(attrs.typeaheadShowHint) || false; - - //INTERNAL VARIABLES - - //model setter executed upon match selection - var parsedModel = $parse(attrs.ngModel); - var invokeModelSetter = $parse(attrs.ngModel + '($$$p)'); - var $setModelValue = function(scope, newValue) { - if (angular.isFunction(parsedModel(originalScope)) && - ngModelOptions.getOption('getterSetter')) { - return invokeModelSetter(scope, {$$$p: newValue}); - } - - return parsedModel.assign(scope, newValue); - }; - - //expressions used by typeahead - var parserResult = typeaheadParser.parse(attrs.uibTypeahead); - - var hasFocus; - - //Used to avoid bug in iOS webview where iOS keyboard does not fire - //mousedown & mouseup events - //Issue #3699 - var selected; - - //create a child scope for the typeahead directive so we are not polluting original scope - //with typeahead-specific data (matches, query etc.) - var scope = originalScope.$new(); - var offDestroy = originalScope.$on('$destroy', function() { - scope.$destroy(); - }); - scope.$on('$destroy', offDestroy); - - // WAI-ARIA - var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000); - element.attr({ - 'aria-autocomplete': 'list', - 'aria-expanded': false, - 'aria-owns': popupId - }); - - var inputsContainer, hintInputElem; - //add read-only input to show hint - if (showHint) { - inputsContainer = angular.element('
      '); - inputsContainer.css('position', 'relative'); - element.after(inputsContainer); - hintInputElem = element.clone(); - hintInputElem.attr('placeholder', ''); - hintInputElem.attr('tabindex', '-1'); - hintInputElem.val(''); - hintInputElem.css({ - 'position': 'absolute', - 'top': '0px', - 'left': '0px', - 'border-color': 'transparent', - 'box-shadow': 'none', - 'opacity': 1, - 'background': 'none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)', - 'color': '#999' - }); - element.css({ - 'position': 'relative', - 'vertical-align': 'top', - 'background-color': 'transparent' - }); - - if (hintInputElem.attr('id')) { - hintInputElem.removeAttr('id'); // remove duplicate id if present. - } - inputsContainer.append(hintInputElem); - hintInputElem.after(element); - } - - //pop-up element used to display matches - var popUpEl = angular.element('
      '); - popUpEl.attr({ - id: popupId, - matches: 'matches', - active: 'activeIdx', - select: 'select(activeIdx, evt)', - 'move-in-progress': 'moveInProgress', - query: 'query', - position: 'position', - 'assign-is-open': 'assignIsOpen(isOpen)', - debounce: 'debounceUpdate' - }); - //custom item template - if (angular.isDefined(attrs.typeaheadTemplateUrl)) { - popUpEl.attr('template-url', attrs.typeaheadTemplateUrl); - } - - if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) { - popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl); - } - - var resetHint = function() { - if (showHint) { - hintInputElem.val(''); - } - }; - - var resetMatches = function() { - scope.matches = []; - scope.activeIdx = -1; - element.attr('aria-expanded', false); - resetHint(); - }; - - var getMatchId = function(index) { - return popupId + '-option-' + index; - }; - - // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead. - // This attribute is added or removed automatically when the `activeIdx` changes. - scope.$watch('activeIdx', function(index) { - if (index < 0) { - element.removeAttr('aria-activedescendant'); - } else { - element.attr('aria-activedescendant', getMatchId(index)); - } - }); - - var inputIsExactMatch = function(inputValue, index) { - if (scope.matches.length > index && inputValue) { - return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase(); - } - - return false; - }; - - var getMatchesAsync = function(inputValue, evt) { - var locals = {$viewValue: inputValue}; - isLoadingSetter(originalScope, true); - isNoResultsSetter(originalScope, false); - $q.when(parserResult.source(originalScope, locals)).then(function(matches) { - //it might happen that several async queries were in progress if a user were typing fast - //but we are interested only in responses that correspond to the current view value - var onCurrentRequest = inputValue === modelCtrl.$viewValue; - if (onCurrentRequest && hasFocus) { - if (matches && matches.length > 0) { - scope.activeIdx = focusFirst ? 0 : -1; - isNoResultsSetter(originalScope, false); - scope.matches.length = 0; - - //transform labels - for (var i = 0; i < matches.length; i++) { - locals[parserResult.itemName] = matches[i]; - scope.matches.push({ - id: getMatchId(i), - label: parserResult.viewMapper(scope, locals), - model: matches[i] - }); - } - - scope.query = inputValue; - //position pop-up with matches - we need to re-calculate its position each time we are opening a window - //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page - //due to other elements being rendered - recalculatePosition(); - - element.attr('aria-expanded', true); - - //Select the single remaining option if user input matches - if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) { - if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) { - $$debounce(function() { - scope.select(0, evt); - }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']); - } else { - scope.select(0, evt); - } - } - - if (showHint) { - var firstLabel = scope.matches[0].label; - if (angular.isString(inputValue) && - inputValue.length > 0 && - firstLabel.slice(0, inputValue.length).toUpperCase() === inputValue.toUpperCase()) { - hintInputElem.val(inputValue + firstLabel.slice(inputValue.length)); - } else { - hintInputElem.val(''); - } - } - } else { - resetMatches(); - isNoResultsSetter(originalScope, true); - } - } - if (onCurrentRequest) { - isLoadingSetter(originalScope, false); - } - }, function() { - resetMatches(); - isLoadingSetter(originalScope, false); - isNoResultsSetter(originalScope, true); - }); - }; - - // bind events only if appendToBody params exist - performance feature - if (appendToBody) { - angular.element($window).on('resize', fireRecalculating); - $document.find('body').on('scroll', fireRecalculating); - } - - // Declare the debounced function outside recalculating for - // proper debouncing - var debouncedRecalculate = $$debounce(function() { - // if popup is visible - if (scope.matches.length) { - recalculatePosition(); - } - - scope.moveInProgress = false; - }, eventDebounceTime); - - // Default progress type - scope.moveInProgress = false; - - function fireRecalculating() { - if (!scope.moveInProgress) { - scope.moveInProgress = true; - scope.$digest(); - } - - debouncedRecalculate(); - } - - // recalculate actual position and set new values to scope - // after digest loop is popup in right position - function recalculatePosition() { - scope.position = appendToBody ? $position.offset(element) : $position.position(element); - scope.position.top += element.prop('offsetHeight'); - } - - //we need to propagate user's query so we can higlight matches - scope.query = undefined; - - //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later - var timeoutPromise; - - var scheduleSearchWithTimeout = function(inputValue) { - timeoutPromise = $timeout(function() { - getMatchesAsync(inputValue); - }, waitTime); - }; - - var cancelPreviousTimeout = function() { - if (timeoutPromise) { - $timeout.cancel(timeoutPromise); - } - }; - - resetMatches(); - - scope.assignIsOpen = function (isOpen) { - isOpenSetter(originalScope, isOpen); - }; - - scope.select = function(activeIdx, evt) { - //called from within the $digest() cycle - var locals = {}; - var model, item; - - selected = true; - locals[parserResult.itemName] = item = scope.matches[activeIdx].model; - model = parserResult.modelMapper(originalScope, locals); - $setModelValue(originalScope, model); - modelCtrl.$setValidity('editable', true); - modelCtrl.$setValidity('parse', true); - - onSelectCallback(originalScope, { - $item: item, - $model: model, - $label: parserResult.viewMapper(originalScope, locals), - $event: evt - }); - - resetMatches(); - - //return focus to the input element if a match was selected via a mouse click event - // use timeout to avoid $rootScope:inprog error - if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) { - $timeout(function() { element[0].focus(); }, 0, false); - } - }; - - //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27) - element.on('keydown', function(evt) { - //typeahead is open and an "interesting" key was pressed - if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) { - return; - } - - var shouldSelect = isSelectEvent(originalScope, {$event: evt}); - - /** - * if there's nothing selected (i.e. focusFirst) and enter or tab is hit - * or - * shift + tab is pressed to bring focus to the previous element - * then clear the results - */ - if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) { - resetMatches(); - scope.$digest(); - return; - } - - evt.preventDefault(); - var target; - switch (evt.which) { - case 27: // escape - evt.stopPropagation(); - - resetMatches(); - originalScope.$digest(); - break; - case 38: // up arrow - scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1; - scope.$digest(); - target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx]; - target.parentNode.scrollTop = target.offsetTop; - break; - case 40: // down arrow - scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length; - scope.$digest(); - target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx]; - target.parentNode.scrollTop = target.offsetTop; - break; - default: - if (shouldSelect) { - scope.$apply(function() { - if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) { - $$debounce(function() { - scope.select(scope.activeIdx, evt); - }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']); - } else { - scope.select(scope.activeIdx, evt); - } - }); - } - } - }); - - element.on('focus', function (evt) { - hasFocus = true; - if (minLength === 0 && !modelCtrl.$viewValue) { - $timeout(function() { - getMatchesAsync(modelCtrl.$viewValue, evt); - }, 0); - } - }); - - element.on('blur', function(evt) { - if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) { - selected = true; - scope.$apply(function() { - if (angular.isObject(scope.debounceUpdate) && angular.isNumber(scope.debounceUpdate.blur)) { - $$debounce(function() { - scope.select(scope.activeIdx, evt); - }, scope.debounceUpdate.blur); - } else { - scope.select(scope.activeIdx, evt); - } - }); - } - if (!isEditable && modelCtrl.$error.editable) { - modelCtrl.$setViewValue(); - scope.$apply(function() { - // Reset validity as we are clearing - modelCtrl.$setValidity('editable', true); - modelCtrl.$setValidity('parse', true); - }); - element.val(''); - } - hasFocus = false; - selected = false; - }); - - // Keep reference to click handler to unbind it. - var dismissClickHandler = function(evt) { - // Issue #3973 - // Firefox treats right click as a click on document - if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) { - resetMatches(); - if (!$rootScope.$$phase) { - originalScope.$digest(); - } - } - }; - - $document.on('click', dismissClickHandler); - - originalScope.$on('$destroy', function() { - $document.off('click', dismissClickHandler); - if (appendToBody || appendTo) { - $popup.remove(); - } - - if (appendToBody) { - angular.element($window).off('resize', fireRecalculating); - $document.find('body').off('scroll', fireRecalculating); - } - // Prevent jQuery cache memory leak - popUpEl.remove(); - - if (showHint) { - inputsContainer.remove(); - } - }); - - var $popup = $compile(popUpEl)(scope); - - if (appendToBody) { - $document.find('body').append($popup); - } else if (appendTo) { - angular.element(appendTo).eq(0).append($popup); - } else { - element.after($popup); - } - - this.init = function(_modelCtrl) { - modelCtrl = _modelCtrl; - ngModelOptions = extractOptions(modelCtrl); - - scope.debounceUpdate = $parse(ngModelOptions.getOption('debounce'))(originalScope); - - //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM - //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue - modelCtrl.$parsers.unshift(function(inputValue) { - hasFocus = true; - - if (minLength === 0 || inputValue && inputValue.length >= minLength) { - if (waitTime > 0) { - cancelPreviousTimeout(); - scheduleSearchWithTimeout(inputValue); - } else { - getMatchesAsync(inputValue); - } - } else { - isLoadingSetter(originalScope, false); - cancelPreviousTimeout(); - resetMatches(); - } - - if (isEditable) { - return inputValue; - } - - if (!inputValue) { - // Reset in case user had typed something previously. - modelCtrl.$setValidity('editable', true); - return null; - } - - modelCtrl.$setValidity('editable', false); - return undefined; - }); - - modelCtrl.$formatters.push(function(modelValue) { - var candidateViewValue, emptyViewValue; - var locals = {}; - - // The validity may be set to false via $parsers (see above) if - // the model is restricted to selected values. If the model - // is set manually it is considered to be valid. - if (!isEditable) { - modelCtrl.$setValidity('editable', true); - } - - if (inputFormatter) { - locals.$model = modelValue; - return inputFormatter(originalScope, locals); - } - - //it might happen that we don't have enough info to properly render input value - //we need to check for this situation and simply return model value if we can't apply custom formatting - locals[parserResult.itemName] = modelValue; - candidateViewValue = parserResult.viewMapper(originalScope, locals); - locals[parserResult.itemName] = undefined; - emptyViewValue = parserResult.viewMapper(originalScope, locals); - - return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue; - }); - }; - - function extractOptions(ngModelCtrl) { - var ngModelOptions; - - if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing - // guarantee a value - ngModelOptions = ngModelCtrl.$options || {}; - - // mimic 1.6+ api - ngModelOptions.getOption = function (key) { - return ngModelOptions[key]; - }; - } else { // in angular >=1.6 $options is always present - ngModelOptions = ngModelCtrl.$options; - } - - return ngModelOptions; - } - }]) - - .directive('uibTypeahead', function() { - return { - controller: 'UibTypeaheadController', - require: ['ngModel', 'uibTypeahead'], - link: function(originalScope, element, attrs, ctrls) { - ctrls[1].init(ctrls[0]); - } - }; - }) - - .directive('uibTypeaheadPopup', ['$$debounce', function($$debounce) { - return { - scope: { - matches: '=', - query: '=', - active: '=', - position: '&', - moveInProgress: '=', - select: '&', - assignIsOpen: '&', - debounce: '&' - }, - replace: true, - templateUrl: function(element, attrs) { - return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html'; - }, - link: function(scope, element, attrs) { - scope.templateUrl = attrs.templateUrl; - - scope.isOpen = function() { - var isDropdownOpen = scope.matches.length > 0; - scope.assignIsOpen({ isOpen: isDropdownOpen }); - return isDropdownOpen; - }; - - scope.isActive = function(matchIdx) { - return scope.active === matchIdx; - }; - - scope.selectActive = function(matchIdx) { - scope.active = matchIdx; - }; - - scope.selectMatch = function(activeIdx, evt) { - var debounce = scope.debounce(); - if (angular.isNumber(debounce) || angular.isObject(debounce)) { - $$debounce(function() { - scope.select({activeIdx: activeIdx, evt: evt}); - }, angular.isNumber(debounce) ? debounce : debounce['default']); - } else { - scope.select({activeIdx: activeIdx, evt: evt}); - } - }; - } - }; - }]) - - .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) { - return { - scope: { - index: '=', - match: '=', - query: '=' - }, - link: function(scope, element, attrs) { - var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html'; - $templateRequest(tplUrl).then(function(tplContent) { - var tplEl = angular.element(tplContent.trim()); - element.replaceWith(tplEl); - $compile(tplEl)(scope); - }); - } - }; - }]) - - .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) { - var isSanitizePresent; - isSanitizePresent = $injector.has('$sanitize'); - - function escapeRegexp(queryToEscape) { - // Regex: capture the whole query string and replace it with the string that will be used to match - // the results, for example if the capture is "a" the result will be \a - return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); - } - - function containsHtml(matchItem) { - return /<.*>/g.test(matchItem); - } - - return function(matchItem, query) { - if (!isSanitizePresent && containsHtml(matchItem)) { - $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger - } - matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag - if (!isSanitizePresent) { - matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive - } - return matchItem; - }; - }]); -angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend(''); angular.$$uibCarouselCss = true; }); -angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend(''); angular.$$uibDatepickerCss = true; }); -angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend(''); angular.$$uibPositionCss = true; }); -angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend(''); angular.$$uibDatepickerpopupCss = true; }); -angular.module('ui.bootstrap.tooltip').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTooltipCss && angular.element(document).find('head').prepend(''); angular.$$uibTooltipCss = true; }); -angular.module('ui.bootstrap.timepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTimepickerCss && angular.element(document).find('head').prepend(''); angular.$$uibTimepickerCss = true; }); -angular.module('ui.bootstrap.typeahead').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTypeaheadCss && angular.element(document).find('head').prepend(''); angular.$$uibTypeaheadCss = true; }); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap.min.js deleted file mode 100644 index db7fad7d..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular-bootstrap/ui-bootstrap.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * angular-ui-bootstrap - * http://angular-ui.github.io/bootstrap/ - - * Version: 2.5.0 - 2017-01-28 - * License: MIT - */angular.module("ui.bootstrap",["ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","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.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){r=!!("horizontal"in g),r?(s={width:""},t={width:"0"}):(s={height:""},t={height:"0"}),d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(s)}function i(a){return r?{width:a.scrollWidth+"px"}:{height:a.scrollHeight+"px"}}function j(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(n(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:i(f[0])}).start()["finally"](k):a.addClass(f,"in",{css:{overflow:"hidden"},to:i(f[0])}).then(k)},angular.noop)}function k(){f.removeClass("collapsing").addClass("collapse").css(s),o(d)}function l(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(p(d)).then(function(){f.css(i(f[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:t}).start()["finally"](m):a.removeClass(f,"in",{to:t}).then(m)},angular.noop):m()}function m(){f.css(t),f.removeClass("collapsing").addClass("collapse"),q(d)}var n=c(g.expanding),o=c(g.expanded),p=c(g.collapsing),q=c(g.collapsed),r=!1,s={},t={};h(),d.$watch(g.uibCollapse,function(a){a?l():j()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(a,b,c){c.$observe("disabled",function(a){c.$set("tabindex",a?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){b.addClass("panel"),d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){function a(){return"uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"}return{require:"^uibAccordionGroup",link:function(b,c,d,e){b.$watch(function(){return e[d.uibAccordionTransclude]},function(b){if(b){var d=angular.element(c[0].querySelector(a()));d.html(""),d.append(b)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(a,b,c,d,e){a.closeable=!!c.close,b.addClass("alert"),c.$set("role","alert"),a.closeable&&b.addClass("alert-dismissible");var f=angular.isDefined(c.dismissOnTimeout)?d(c.dismissOnTimeout)(a.$parent):null;f&&e(function(){a.close()},parseInt(f,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(a){for(var b=0;b1){p[d].element.data(q,c.direction);var h=o.getCurrentIndex();angular.isNumber(h)&&p[h].element&&p[h].element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",p[d].element,function(b,c){"close"===c&&(a.$currentTransition=null,e.off("addClass",b))})}a.active=c.index,r=c.index,f(d),k()}}function h(a){for(var b=0;b0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=a.active,s=!1;b.addClass("carousel"),o.addSlide=function(b,c){p.push({slide:b,element:c}),p.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===p.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),r=b.index,a.active=b.index,f(r),o.select(p[h(b)]),1===p.length&&a.play())},o.getCurrentIndex=function(){for(var a=0;a0&&r===c?c>=p.length?(r=p.length-1,a.active=r,f(r),o.select(p[p.length-1])):(r=c,a.active=r,f(r),o.select(p[c])):r>c&&(r--,a.active=r),0===p.length&&(r=null,a.active=null)},o.select=a.select=function(b,c){var d=h(b.slide);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b.slide.index===r||a.$currentTransition||g(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===p.length-1&&a.noWrap()},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},b.on("mouseenter",a.pause),b.on("mouseleave",a.play),a.$on("$destroy",function(){s=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j),a.$watch("active",function(a){if(angular.isNumber(a)&&r!==a){for(var b=0;b-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),c[e]="("+d.regex+")",a[e]="$";for(var f=e+1,g=e+d.key.length;g>f;f++)c[f]="",a[f]="$";a=a.join(""),b.push({index:e,key:d.key,apply:d.apply,matcher:d.regex})}}),{regex:new RegExp("^"+c.join("")+"$"),map:d(b,"index")}}function h(a){for(var b,c,d=[],e=0;e=a.length||"'"!==a.charAt(e+1))&&(d.push(i(a,c,e)),c=null);else if(e===a.length)for(;cc?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function l(a){return parseInt(a,10)}function m(a,b){return a&&b?q(a,b):a}function n(a,b){return a&&b?q(a,b,!0):a}function o(a,b){a=a.replace(/:/g,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function p(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function q(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=o(b,d);return p(a,c*(e-d))}var r,s,t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){r=b.id,this.parsers={},this.formatters={},s=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=l(c+d),this.minutes+=l(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}],angular.version.major>=1&&angular.version.minor>4&&s.push({key:"LLLL",regex:b.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.STANDALONEMONTH.indexOf(a)},formatter:function(a){return c(a,"LLLL")}})},this.init(),this.getParser=function(a){var b=f(a);return b&&b.apply||null},this.overrideParser=function(a,b){var c=f(a);c&&angular.isFunction(b)&&(this.parsers={},c.apply=b)}.bind(this),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==r&&this.init(),this.formatters[c]||(this.formatters[c]=h(c));var d=this.formatters[c];return d.reduce(function(b,c){return b+c(a)},"")},this.parse=function(c,d,e){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(t,"\\$&"),b.id!==r&&this.init(),this.parsers[d]||(this.parsers[d]=g(d,"apply"));var f=this.parsers[d],h=f.regex,i=f.map,j=c.match(h),l=!1;if(j&&j.length){var m,n;angular.isDate(e)&&!isNaN(e.getTime())?m={year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}:(e&&a.warn("dateparser:","baseDate is not a valid date"),m={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var o=1,p=j.length;p>o;o++){var q=i[o-1];"Z"===q.matcher&&(l=!0),q.apply&&q.apply.call(m,j[o])}var s=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return k(m.year,m.month,m.date)&&(!angular.isDate(e)||isNaN(e.getTime())||l?(n=new Date(0),s.call(n,m.year,m.month,m.date),u.call(n,m.hours||0,m.minutes||0,m.seconds||0,m.milliseconds||0)):(n=new Date(e),s.call(n,m.year,m.month,m.date),u.call(n,m.hours,m.minutes,m.seconds,m.milliseconds))),n}},this.toTimezone=m,this.fromTimezone=n,this.timezoneToOffset=o,this.addDateMinutes=p,this.convertTimezoneToLocal=q}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}function n(b){var c;if(angular.version.minor<6)c=b.$options||a.datepickerOptions.ngModelOptions||i.ngModelOptions||{},c.getOption=function(a){return c[a]};else{var d=b.$options.getOption("timezone")||(a.datepickerOptions.ngModelOptions?a.datepickerOptions.ngModelOptions.timezone:null)||(i.ngModelOptions?i.ngModelOptions.timezone:null);c=b.$options.createChild(i.ngModelOptions).createChild(a.datepickerOptions.ngModelOptions).createChild(b.$options).createChild({timezone:d})}return c}var o=this,p={$setViewValue:angular.noop},q={},r=[];b.addClass("uib-datepicker"),c.$set("role","application"),a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:i.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":o[b]=angular.isDefined(a.datepickerOptions[b])?e(a.datepickerOptions[b])(a.$parent):i[b];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":o[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:i[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?o.startingDay=a.datepickerOptions.startingDay:angular.isNumber(i.startingDay)?o.startingDay=i.startingDay:o.startingDay=(f.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?o[b]=l.fromTimezone(new Date(a),q.getOption("timezone")):(j&&g.warn("Literal date support has been deprecated, please switch to date object usage"),o[b]=new Date(h(a,"medium"))):o[b]=i[b]?l.fromTimezone(new Date(i[b]),q.getOption("timezone")):null,o.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){o[b]=a[b]=angular.isDefined(c)?c:a.datepickerOptions[b],("minMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)o.modes.indexOf(o[b]))&&(a.datepickerMode=o[b],a.datepickerOptions.datepickerMode=o[b])}):o[b]=a[b]=i[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(c.disabled)||!1,angular.isDefined(c.ngDisabled)&&r.push(a.$parent.$watch(c.ngDisabled,function(b){a.disabled=b,o.refreshView()})),a.isActive=function(b){return 0===o.compare(b.date,o.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){p=b,q=n(p),a.datepickerOptions.initDate?(o.activeDate=l.fromTimezone(a.datepickerOptions.initDate,q.getOption("timezone"))||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(p.$isEmpty(p.$modelValue)||p.$invalid)&&(o.activeDate=l.fromTimezone(a,q.getOption("timezone")),o.refreshView())})):o.activeDate=new Date;var c=p.$modelValue?new Date(p.$modelValue):new Date;this.activeDate=isNaN(c)?l.fromTimezone(new Date,q.getOption("timezone")):l.fromTimezone(c,q.getOption("timezone")),p.$render=function(){o.render()}},this.render=function(){if(p.$viewValue){var a=new Date(p.$viewValue),b=!isNaN(a);b?this.activeDate=l.fromTimezone(a,q.getOption("timezone")):k||g.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=p.$viewValue?new Date(p.$viewValue):null;b=l.fromTimezone(b,q.getOption("timezone")),p.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=p.$viewValue?new Date(p.$viewValue):null;d=l.fromTimezone(d,q.getOption("timezone"));var e=new Date;e=l.fromTimezone(e,q.getOption("timezone"));var f=this.compare(b,e),g={date:b,label:l.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),o.activeDate&&0===this.compare(g.date,o.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===o.minMode){var c=p.$viewValue?l.fromTimezone(new Date(p.$viewValue),q.getOption("timezone")):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=l.toTimezone(c,q.getOption("timezone")),p.$setViewValue(c),p.$render()}else o.activeDate=b,m(o.modes[o.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=o.activeDate.getFullYear()+a*(o.step.years||0),c=o.activeDate.getMonth()+a*(o.step.months||0);o.activeDate.setFullYear(b,c,1),o.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===o.maxMode&&1===b||a.datepickerMode===o.minMode&&-1===b||(m(o.modes[o.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var s=function(){o.element[0].focus()};a.$on("uib:datepicker.focus",s),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),o.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(o.isDisabled(o.activeDate))return;a.select(o.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(o.handleKeyDown(c,b),o.refreshView()):a.toggleMode("up"===c?1:-1)},b.on("keydown",function(b){a.$apply(function(){a.keydown(b)})}),a.$on("$destroy",function(){for(;r.length;)r.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,this.monthColumns),a.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=this.monthColumns;else if("right"===a)c+=1;else if("down"===a)c+=this.monthColumns;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a), -isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('
      ');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},adjustTop:function(a,b,c,d){return-1!==a.indexOf("top")&&c!==d?{top:b.top-d+"px"}:void 0},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,x,a.date);if(isNaN(c))for(var d=0;d
      "),D.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":B}),E=angular.element(D.children()[0]),E.attr("template-url",C),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),E.attr("datepicker-options","datepickerOptions"),K?G.$formatters.push(function(b){return a.date=l.fromTimezone(b,H.getOption("timezone")),b}):(G.$$parserName="date",G.$validators.date=s,G.$parsers.unshift(r),G.$formatters.push(function(b){return G.$isEmpty(b)?(a.date=b,b):(angular.isNumber(b)&&(b=new Date(b)),a.date=l.fromTimezone(b,H.getOption("timezone")),l.filter(a.date,x))})),G.$viewChangeListeners.push(function(){a.date=q(G.$viewValue)}),b.on("keydown",u),I=d(D)(a),D.remove(),z?h.find("body").append(I):b.after(I),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),I.remove(),b.off("keydown",u),h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,H.getOption("timezone")));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=new Date(a.datepickerOptions[b]):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){a.date=c;var d=a.date?l.filter(a.date,x):null;b.val(d),G.$setViewValue(d),y&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):(b=l.fromTimezone(d,H.getOption("timezone")),b.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),A&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;z||j.parsePlacement(d)[2]?(F=F||angular.element(j.scrollParent(b)),F&&F.on("scroll",v)):F=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,b,c){var d=null,e=c.createNew();this.isOnlyOpen=function(a,b){var c=e.get(b);if(c){var d=c.reduce(function(b,c){return c.scope===a?c:b},{});if(d)return 1===c.length}return!1},this.open=function(b,c,g){if(d||a.on("click",f),d&&d!==b&&(d.isOpen=!1),d=b,g){var h=e.get(g);if(h){var i=h.map(function(a){return a.scope});-1===i.indexOf(b)&&e.put(g,{scope:b})}else e.put(g,{scope:b})}},this.close=function(b,c,g){if(d===b&&(a.off("click",f),a.off("keydown",this.keybindFilter),d=null),g){var h=e.get(g);if(h){var i=h.reduce(function(a,c){return c.scope===b?c:a},{});i&&e.remove(g,i)}}};var f=function(a){if(d&&d.isOpen&&!(a&&"disabled"===d.getAutoClose()||a&&3===a.which)){var c=d.getToggleElement();if(!(a&&c&&c[0].contains(a.target))){var e=d.getDropdownElement();a&&"outsideClick"===d.getAutoClose()&&e&&e[0].contains(a.target)||(d.focusToggleElement(),d.isOpen=!1,b.$$phase||d.$apply())}}};this.keybindFilter=function(a){if(d){var b=d.getDropdownElement(),c=d.getToggleElement(),e=b&&b[0].contains(a.target),g=c&&c[0].contains(a.target);27===a.which?(a.stopPropagation(),d.focusToggleElement(),f()):d.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&d.isOpen&&(e||g)&&(a.preventDefault(),a.stopPropagation(),d.focusDropdownEntry(a.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){function l(){b.append(o.dropdownMenu)}var m,n,o=this,p=a.$new(),q=e.appendToOpenClass,r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=i.find("body");b.addClass("dropdown"),this.init=function(){c.isOpen&&(n=d(c.isOpen),s=n.assign,a.$watch(n,function(a){p.isOpen=!!a})),u=angular.isDefined(c.keyboardNav)},this.toggle=function(a){return p.isOpen=arguments.length?!!a:!p.isOpen,angular.isFunction(s)&&s(p,p.isOpen),p.isOpen},this.isOpen=function(){return p.isOpen},p.getToggleElement=function(){return o.toggleElement},p.getAutoClose=function(){return c.autoClose||"always"},p.getElement=function(){return b},p.isKeynavEnabled=function(){return u},p.focusDropdownEntry=function(a){var c=o.dropdownMenu?angular.element(o.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(o.selectedOption)?o.selectedOption=o.selectedOption===c.length-1?o.selectedOption:o.selectedOption+1:o.selectedOption=0;break;case 38:angular.isNumber(o.selectedOption)?o.selectedOption=0===o.selectedOption?0:o.selectedOption-1:o.selectedOption=c.length-1}c[o.selectedOption].focus()},p.getDropdownElement=function(){return o.dropdownMenu},p.focusToggleElement=function(){o.toggleElement&&o.toggleElement[0].focus()},p.$watch("isOpen",function(e,n){var u=null,w=!1;if(angular.isDefined(c.dropdownAppendTo)){var x=d(c.dropdownAppendTo)(p);x&&(u=angular.element(x))}if(angular.isDefined(c.dropdownAppendToBody)){var y=d(c.dropdownAppendToBody)(p);y!==!1&&(w=!0)}if(w&&!u&&(u=v),u&&o.dropdownMenu&&(e?(u.append(o.dropdownMenu),b.on("$destroy",l)):(b.off("$destroy",l),l())),u&&o.dropdownMenu){var z,A,B,C=h.positionElements(b,o.dropdownMenu,"bottom-left",!0),D=0;if(z={top:C.top+"px",display:e?"block":"none"},A=o.dropdownMenu.hasClass("dropdown-menu-right"),A?(z.left="auto",B=h.scrollbarPadding(u),B.heightOverflow&&B.scrollbarWidth&&(D=B.scrollbarWidth),z.right=window.innerWidth-D-(C.left+b.prop("offsetWidth"))+"px"):(z.left=C.left+"px",z.right="auto"),!w){var E=h.offset(u);z.top=C.top-E.top+"px",A?z.right=window.innerWidth-(C.left-E.left+b.prop("offsetWidth"))+"px":z.left=C.left-E.left+"px"}o.dropdownMenu.css(z)}var F=u?u:b,G=u?q:r,H=F.hasClass(G),I=f.isOnlyOpen(a,u);if(H===!e){var J;J=u?I?"removeClass":"addClass":e?"addClass":"removeClass",g[J](F,G).then(function(){angular.isDefined(e)&&e!==n&&t(a,{open:!!e})})}if(e)o.dropdownMenuTemplateUrl?k(o.dropdownMenuTemplateUrl).then(function(a){m=p.$new(),j(a.trim())(m,function(a){var b=a;o.dropdownMenu.replaceWith(b),o.dropdownMenu=b,i.on("keydown",f.keybindFilter)})}):i.on("keydown",f.keybindFilter),p.focusToggleElement(),f.open(p,b,u);else{if(f.close(p,b,u),o.dropdownMenuTemplateUrl){m&&m.$destroy();var K=angular.element('');o.dropdownMenu.replaceWith(K),o.dropdownMenu=K}o.selectedOption=null}angular.isFunction(s)&&s(a,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.on("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c-1&&A>a&&(a=A),a}function m(a,b){var c=x.get(a).value,d=c.appendTo;x.remove(a),B=x.top(),B&&(A=parseInt(B.value.modalDomEl.attr("index"),10)),p(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||w;y.remove(b,a);var e=y.hasKey(b);d.toggleClass(b,e),!e&&v&&v.heightOverflow&&v.scrollbarWidth&&(v.originalRight?d.css({paddingRight:v.originalRight+"px"}):d.css({paddingRight:""}),v=null),n(!0)},c.closedDeferred),o(),b&&b.focus?b.focus():d.focus&&d.focus()}function n(a){var b;x.length()>0&&(b=x.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function o(){if(t&&-1===l()){var a=u;p(t,u,function(){a=null}),t=void 0,u=void 0}}function p(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){d&&d(),b.remove(),e&&e.resolve()}),c.$destroy())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(z.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function q(a){if(a.isDefaultPrevented())return a;var b=x.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){z.dismiss(b.key,"escape key press")}));break;case 9:var c=z.loadFocusElementList(b),d=!1;a.shiftKey?(z.isFocusInFirstItem(a,c)||z.isModalFocused(a,b))&&(d=z.focusLastFocusableElement(c)):z.isFocusInLastItem(a,c)&&(d=z.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function r(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}function s(){Array.prototype.forEach.call(document.querySelectorAll("["+C+"]"),function(a){var b=parseInt(a.getAttribute(C),10),c=b-1;a.setAttribute(C,c),c||(a.removeAttribute(C),a.removeAttribute("aria-hidden"))})}var t,u,v,w="modal-open",x=h.createNew(),y=g.createNew(),z={NOW_CLOSING_EVENT:"modal.stack.now-closing"},A=0,B=null,C="data-bootstrap-modal-aria-hidden-count",D="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",E=/[A-Z]/g;return e.$watch(l,function(a){u&&(u.index=a)}),c.on("keydown",q),e.$on("$destroy",function(){c.off("keydown",q)}),z.open=function(b,f){function g(a){function b(a){var b=a.parent()?a.parent().children():[];return Array.prototype.filter.call(b,function(b){return b!==a[0]})}if(a&&"BODY"!==a[0].tagName)return b(a).forEach(function(a){var b="true"===a.getAttribute("aria-hidden"),c=parseInt(a.getAttribute(C),10);c||(c=b?1:0),a.setAttribute(C,c+1),a.setAttribute("aria-hidden","true")}),g(a.parent())}var h=c[0].activeElement,k=f.openedClass||w;n(!1),B=x.top(),x.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),y.put(k,b);var m=f.appendTo,o=l();o>=0&&!t&&(u=e.$new(!0),u.modalOptions=f,u.index=o,t=angular.element('
      '),t.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),f.backdropClass&&t.addClass(f.backdropClass),f.animation&&t.attr("modal-animation","true"),d(t)(u),a.enter(t,m),i.isScrollable(m)&&(v=i.scrollbarPadding(m),v.heightOverflow&&v.scrollbarWidth&&m.css({paddingRight:v.right+"px"})));var p;f.component?(p=document.createElement(j(f.component.name)),p=angular.element(p),p.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):p=f.content,A=B?parseInt(B.value.modalDomEl.attr("index"),10)+1:0;var q=angular.element('
      ');q.attr({"class":"modal","template-url":f.windowTemplateUrl,"window-top-class":f.windowTopClass,role:"dialog","aria-labelledby":f.ariaLabelledBy,"aria-describedby":f.ariaDescribedBy,size:f.size,index:A,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(p),f.windowClass&&q.addClass(f.windowClass),f.animation&&q.attr("modal-animation","true"),m.addClass(k),f.scope&&(f.scope.$$topModalIndex=A),a.enter(d(q)(f.scope),m),x.top().value.modalDomEl=q,x.top().value.modalOpener=h,g(q)},z.close=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),m(a,c.value.modalOpener),!0):!c},z.dismiss=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),m(a,c.value.modalOpener),!0):!c},z.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},z.getTop=function(){return x.top()},z.modalRendered=function(a){var b=x.get(a);b&&b.value.renderDeferred.resolve()},z.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},z.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},z.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},z.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},z.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},z.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(D);return c?Array.prototype.filter.call(c,function(a){return k(a)}):c}}},z}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return q}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!e.component&&!e.template&&!e.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var q;q=e.component?c.when(g.resolve(e.resolve,{},null,null)):c.all([i(e),g.resolve(e.resolve,{},null,null)]);var r;return r=k=c.all([k]).then(j,j).then(function(a){function c(b,c,d,e){b.$scope=g,b.$scope.$resolve={},d?b.$scope.$uibModalInstance=p:b.$uibModalInstance=p;var f=c?a[1]:a;angular.forEach(f,function(a,c){e&&(b[c]=a),b.$scope.$resolve[c]=a})}var d=e.scope||b,g=d.$new();g.$close=p.close,g.$dismiss=p.dismiss,g.$on("$destroy",function(){g.$$uibDestructionScheduled||g.$dismiss("$uibUnscheduledDestruction")});var i,j,k={scope:g,deferred:l,renderDeferred:o,closedDeferred:n,animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,ariaLabelledBy:e.ariaLabelledBy,ariaDescribedBy:e.ariaDescribedBy,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo},q={},r={};e.component?(c(q,!1,!0,!1),q.name=e.component,k.component=q):e.controller&&(c(r,!0,!1,!0),j=f(e.controller,r,!0,e.controllerAs),e.controllerAs&&e.bindToController&&(i=j.instance,i.$close=g.$close,i.$dismiss=g.$dismiss,angular.extend(i,{$resolve:r.$scope.$resolve},d)),i=j(),angular.isFunction(i.$onInit)&&i.$onInit()),e.component||(k.content=a[0]),h.open(p,k),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===r&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){ -a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},link:function(b,c,d,e){c.addClass("pager");var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,b.$set("role","menu"),d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},link:function(a,c,d,e){c.addClass("pagination");var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),b=null)}}var o=m.createNew();return h.on("keyup",n),k.$on("$destroy",function(){h.off("keyup",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
      ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){P.isOpen?q():m()}function m(){O&&!a.$eval(d[k+"Enable"])||(u(),x(),P.popupDelay?H||(H=g(r,P.popupDelay,!1)):r())}function q(){s(),P.popupCloseDelay?I||(I=g(t,P.popupCloseDelay,!1)):t()}function r(){return s(),u(),P.content?(v(),void P.$evalAsync(function(){P.isOpen=!0,y(!0),U()})):angular.noop}function s(){H&&(g.cancel(H),H=null),J&&(g.cancel(J),J=null)}function t(){P&&P.$evalAsync(function(){P&&(P.isOpen=!1,y(!1),P.animation?G||(G=g(w,150,!1)):w())})}function u(){I&&(g.cancel(I),I=null),G&&(g.cancel(G),G=null)}function v(){E||(F=P.$new(),E=c(F,function(a){M?h.find("body").append(a):b.after(a)}),o.add(P,{close:t}),z())}function w(){s(),u(),A(),E&&(E.remove(),E=null,K&&g.cancel(K)),o.remove(P),F&&(F.$destroy(),F=null)}function x(){P.title=d[k+"Title"],S?P.content=S(a):P.content=d[e],P.popupClass=d[k+"Class"],P.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(P.placement);L=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);P.popupDelay=isNaN(c)?n.popupDelay:c,P.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){R&&angular.isFunction(R.assign)&&R.assign(a,b)}function z(){T.length=0,S?(T.push(a.$watch(S,function(a){P.content=a,!a&&P.isOpen&&t()})),T.push(F.$watch(function(){Q||(Q=!0,F.$$postDigest(function(){Q=!1,P&&P.isOpen&&U()}))}))):T.push(d.$observe(e,function(a){P.content=a,!a&&P.isOpen?t():U()})),T.push(d.$observe(k+"Title",function(a){P.title=a,P.isOpen&&U()})),T.push(d.$observe(k+"Placement",function(a){P.placement=a?a:n.placement,P.isOpen&&U()}))}function A(){T.length&&(angular.forEach(T,function(a){a()}),T.length=0)}function B(a){P&&P.isOpen&&E&&(b[0].contains(a.target)||E[0].contains(a.target)||q())}function C(a){27===a.which&&q()}function D(){var c=[],e=[],f=a.$eval(d[k+"Trigger"]);V(),angular.isObject(f)?(Object.keys(f).forEach(function(a){c.push(a),e.push(f[a])}),N={show:c,hide:e}):N=p(f),"none"!==N.show&&N.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===N.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(N.hide[c],q)),b.on("keypress",C)})}var E,F,G,H,I,J,K,L,M=angular.isDefined(n.appendToBody)?n.appendToBody:!1,N=p(void 0),O=angular.isDefined(d[k+"Enable"]),P=a.$new(!0),Q=!1,R=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,S=n.useContentExp?l(d[e]):!1,T=[],U=function(){E&&E.html()&&(J||(J=g(function(){var a=i.positionElements(b,E,P.placement,M),c=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),d=M?i.offset(b):i.position(b);E.css({top:a.top+"px",left:a.left+"px"});var e=a.placement.split("-");E.hasClass(e[0])||(E.removeClass(L.split("-")[0]),E.addClass(e[0])),E.hasClass(n.placementClassPrefix+a.placement)||(E.removeClass(n.placementClassPrefix+L),E.addClass(n.placementClassPrefix+a.placement)),K=g(function(){var a=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),b=i.adjustTop(e,d,c,a);b&&E.css(b),K=null},0,!1),E.hasClass("uib-position-measure")?(i.positionArrow(E,a.placement),E.removeClass("uib-position-measure")):L!==a.placement&&i.positionArrow(E,a.placement),L=a.placement,J=null},0,!1)))};P.origScope=a,P.isOpen=!1,P.contentExp=function(){return P.content},d.$observe("disabled",function(a){a&&s(),a&&P.isOpen&&t()}),R&&a.$watch(R,function(a){P&&!a===P.isOpen&&j()});var V=function(){N.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j)),b.off("keypress",C)}),N.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};D();var W=a.$eval(d[k+"Animation"]);P.animation=angular.isDefined(W)?!!W:n.animation;var X,Y=k+"AppendToBody";X=Y in d&&void 0===d[Y]?!0:a.$eval(d[Y]),M=angular.isDefined(X)?X:M,a.$on("$destroy",function(){V(),w(),P=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;bb.index?1:a.index0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===y[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),x.$setViewValue(new Date(v)),n(a)}function m(){s&&s.$setValidity("hours",!0),t&&t.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),x.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(x.$modelValue){var c=v.getHours(),d=v.getMinutes(),e=v.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!z),"m"!==b&&(a.minutes=k(d)),a.meridian=v.getHours()<12?y[0]:y[1],"s"!==b&&(a.seconds=k(e)),a.meridian=v.getHours()<12?y[0]:y[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=y[0]}function o(a){v=q(v,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s,t,u,v=new Date,w=[],x={$setViewValue:angular.noop},y=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,z=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){x=b,x.$render=this.render,x.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2);s=e.controller("ngModel"),t=f.controller("ngModel"),u=h.controller("ngModel");var i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var A=g.hourStep;c.hourStep&&w.push(a.$parent.$watch(d(c.hourStep),function(a){A=+a}));var B=g.minuteStep;c.minuteStep&&w.push(a.$parent.$watch(d(c.minuteStep),function(a){B=+a}));var C;w.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);C=isNaN(b)?void 0:b}));var D;w.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);D=isNaN(b)?void 0:b}));var E=!1;c.ngDisabled&&w.push(a.$parent.$watch(d(c.ngDisabled),function(a){E=a})),a.noIncrementHours=function(){var a=p(v,60*A);return E||a>D||v>a&&C>a},a.noDecrementHours=function(){var a=p(v,60*-A);return E||C>a||a>v&&a>D},a.noIncrementMinutes=function(){var a=p(v,B);return E||a>D||v>a&&C>a},a.noDecrementMinutes=function(){var a=p(v,-B);return E||C>a||a>v&&a>D},a.noIncrementSeconds=function(){var a=q(v,F);return E||a>D||v>a&&C>a},a.noDecrementSeconds=function(){var a=q(v,-F);return E||C>a||a>v&&a>D},a.noToggleMeridian=function(){return v.getHours()<12?E||p(v,720)>D:E||p(v,-720)0};b.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){x.$setViewValue(null),x.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b,s&&s.$setValidity("hours",!1)),angular.isDefined(c)&&(a.invalidMinutes=c,t&&t.$setValidity("minutes",!1)),angular.isDefined(d)&&(a.invalidSeconds=d,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var a=h(),b=i();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(a),v.setMinutes(b),C>v||v>D?e(!0):l("h")):e(!0)},b.on("blur",function(b){x.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!z)})}),a.updateMinutes=function(){var a=i(),b=h();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(b),v.setMinutes(a),C>v||v>D?e(void 0,!0):l("m")):e(void 0,!0)},c.on("blur",function(b){x.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();x.$setDirty(),angular.isDefined(a)?(v.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.on("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=x.$viewValue;isNaN(b)?(x.$setValidity("time",!1),e.error('Timepicker 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.')):(b&&(v=b),C>v||v>D?(x.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*A*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-A*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*B)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-B)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(F)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-F)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(v.getHours()<12?60:-60)):a.meridian=a.meridian===y[0]?y[1]:y[0])},a.blur=function(){x.$setTouched()},a.$on("$destroy",function(){for(;w.length;)w.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){P.moveInProgress||(P.moveInProgress=!0,P.$digest()),$()}function o(){P.position=F?l.offset(b):l.position(b),P.position.top+=b.prop("offsetHeight")}function p(a){var b;return angular.version.minor<6?(b=a.$options||{},b.getOption=function(a){return b[a]}):b=a.$options,b}var q,r,s=[9,13,27,38,40],t=200,u=a.$eval(c.typeaheadMinLength);u||0===u||(u=1),a.$watch(c.typeaheadMinLength,function(a){u=a||0===a?a:1});var v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){w=a!==!1});var x,y,z=e(c.typeaheadLoading).assign||angular.noop,A=c.typeaheadShouldSelect?e(c.typeaheadShouldSelect):function(a,b){var c=b.$event;return 13===c.which||9===c.which},B=e(c.typeaheadOnSelect),C=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,D=e(c.typeaheadNoResults).assign||angular.noop,E=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,F=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,G=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,H=a.$eval(c.typeaheadFocusFirst)!==!1,I=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,J=e(c.typeaheadIsOpen).assign||angular.noop,K=a.$eval(c.typeaheadShowHint)||!1,L=e(c.ngModel),M=e(c.ngModel+"($$$p)"),N=function(b,c){return angular.isFunction(L(a))&&r.getOption("getterSetter")?M(b,{$$$p:c}):L.assign(b,c)},O=m.parse(c.uibTypeahead),P=a.$new(),Q=a.$on("$destroy",function(){P.$destroy()});P.$on("$destroy",Q);var R="typeahead-"+P.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":R});var S,T;K&&(S=angular.element("
      "),S.css("position","relative"),b.after(S),T=b.clone(),T.attr("placeholder",""),T.attr("tabindex","-1"),T.val(""),T.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),T.attr("id")&&T.removeAttr("id"),S.append(T),T.after(b));var U=angular.element("
      ");U.attr({id:R,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&U.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&U.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var V=function(){K&&T.val("")},W=function(){P.matches=[],P.activeIdx=-1,b.attr("aria-expanded",!1),V()},X=function(a){return R+"-option-"+a};P.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",X(a))});var Y=function(a,b){return P.matches.length>b&&a?a.toUpperCase()===P.matches[b].label.toUpperCase():!1},Z=function(c,d){var e={$viewValue:c};z(a,!0),D(a,!1),f.when(O.source(a,e)).then(function(f){var g=c===q.$viewValue;if(g&&x)if(f&&f.length>0){P.activeIdx=H?0:-1,D(a,!1),P.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?T.val(c+i.slice(c.length)):T.val("")}}else W(),D(a,!0);g&&z(a,!1)},function(){W(),z(a,!1),D(a,!0)})};F&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var $=k(function(){P.matches.length&&o(),P.moveInProgress=!1},t);P.moveInProgress=!1,P.query=void 0;var _,aa=function(a){_=g(function(){Z(a)},v)},ba=function(){_&&g.cancel(_)};W(),P.assignIsOpen=function(b){J(a,b)},P.select=function(d,e){var f,h,i={};y=!0,i[O.itemName]=h=P.matches[d].model,f=O.modelMapper(a,i),N(a,f),q.$setValidity("editable",!0),q.$setValidity("parse",!0),B(a,{$item:h,$model:f,$label:O.viewMapper(a,i),$event:e}),W(),P.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==P.matches.length&&-1!==s.indexOf(b.which)){var c=A(a,{$event:b});if(-1===P.activeIdx&&c||9===b.which&&b.shiftKey)return W(),void P.$digest();b.preventDefault();var d;switch(b.which){case 27:b.stopPropagation(),W(),a.$digest();break;case 38:P.activeIdx=(P.activeIdx>0?P.activeIdx:P.matches.length)-1,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;case 40:P.activeIdx=(P.activeIdx+1)%P.matches.length,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;default:c&&P.$apply(function(){angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(P.activeIdx,b)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(P.activeIdx,b)})}}}),b.on("focus",function(a){x=!0,0!==u||q.$viewValue||g(function(){Z(q.$viewValue,a)},0)}),b.on("blur",function(a){C&&P.matches.length&&-1!==P.activeIdx&&!y&&(y=!0,P.$apply(function(){angular.isObject(P.debounceUpdate)&&angular.isNumber(P.debounceUpdate.blur)?k(function(){P.select(P.activeIdx,a)},P.debounceUpdate.blur):P.select(P.activeIdx,a)})),!w&&q.$error.editable&&(q.$setViewValue(),P.$apply(function(){q.$setValidity("editable",!0),q.$setValidity("parse",!0)}),b.val("")),x=!1,y=!1});var ca=function(c){b[0]!==c.target&&3!==c.which&&0!==P.matches.length&&(W(),j.$$phase||a.$digest())};h.on("click",ca),a.$on("$destroy",function(){h.off("click",ca),(F||G)&&da.remove(),F&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),U.remove(),K&&S.remove()});var da=d(U)(P);F?h.find("body").append(da):G?angular.element(G).eq(0).append(da):b.after(da), -this.init=function(b){q=b,r=p(q),P.debounceUpdate=e(r.getOption("debounce"))(a),q.$parsers.unshift(function(b){return x=!0,0===u||b&&b.length>=u?v>0?(ba(),aa(b)):Z(b):(z(a,!1),ba(),W()),w?b:b?void q.$setValidity("editable",!1):(q.$setValidity("editable",!0),null)}),q.$formatters.push(function(b){var c,d,e={};return w||q.$setValidity("editable",!0),E?(e.$model=b,E(a,e)):(e[O.itemName]=b,c=O.viewMapper(a,e),e[O.itemName]=void 0,d=O.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(a,b,c,d){d[1].init(d[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend(''),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend(''),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend(''),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend(''),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend(''),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend(''),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/.bower.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/.bower.json deleted file mode 100644 index 96dae810..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/.bower.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "angular", - "version": "1.6.9", - "license": "MIT", - "main": "./angular.js", - "ignore": [], - "dependencies": {}, - "homepage": "https://github.com/angular/bower-angular", - "_release": "1.6.9", - "_resolution": { - "type": "version", - "tag": "v1.6.9", - "commit": "2d507370407cecd2aa5c339ba3140966bce6006b" - }, - "_source": "https://github.com/angular/bower-angular.git", - "_target": "v1.6.9", - "_originalSource": "angular" -} \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/LICENSE.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/LICENSE.md deleted file mode 100644 index 2c395eef..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Angular - -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. diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/README.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/README.md deleted file mode 100644 index d1bc0edd..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# packaged angular - -This repo is for distribution on `npm` and `bower`. The source for this module is in the -[main AngularJS repo](https://github.com/angular/angular.js). -Please file issues and pull requests against that repo. - -## Install - -You can install this package either with `npm` or with `bower`. - -### npm - -```shell -npm install angular -``` - -Then add a ` -``` - -Or `require('angular')` from your code. - -### bower - -```shell -bower install angular -``` - -Then add a ` -``` - -## Documentation - -Documentation is available on the -[AngularJS docs site](http://docs.angularjs.org/). - -## License - -The MIT License - -Copyright (c) 2010-2015 Google, Inc. http://angularjs.org - -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. diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular-csp.css b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular-csp.css deleted file mode 100644 index f3cd926c..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular-csp.css +++ /dev/null @@ -1,21 +0,0 @@ -/* Include this file in your html if you are using the CSP mode. */ - -@charset "UTF-8"; - -[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], -.ng-cloak, .x-ng-cloak, -.ng-hide:not(.ng-hide-animate) { - display: none !important; -} - -ng\:form { - display: block; -} - -.ng-animate-shim { - visibility:hidden; -} - -.ng-anchor { - position:absolute; -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.js deleted file mode 100644 index b9d847e5..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.js +++ /dev/null @@ -1,34359 +0,0 @@ -/** - * @license AngularJS v1.6.9 - * (c) 2010-2018 Google, Inc. http://angularjs.org - * License: MIT - */ -(function(window) {'use strict'; - -/* exported - minErrConfig, - errorHandlingConfig, - isValidObjectMaxDepth -*/ - -var minErrConfig = { - objectMaxDepth: 5 -}; - -/** - * @ngdoc function - * @name angular.errorHandlingConfig - * @module ng - * @kind function - * - * @description - * Configure several aspects of error handling in AngularJS if used as a setter or return the - * current configuration if used as a getter. The following options are supported: - * - * - **objectMaxDepth**: The maximum depth to which objects are traversed when stringified for error messages. - * - * Omitted or undefined options will leave the corresponding configuration values unchanged. - * - * @param {Object=} config - The configuration object. May only contain the options that need to be - * updated. Supported keys: - * - * * `objectMaxDepth` **{Number}** - The max depth for stringifying objects. Setting to a - * non-positive or non-numeric value, removes the max depth limit. - * Default: 5 - */ -function errorHandlingConfig(config) { - if (isObject(config)) { - if (isDefined(config.objectMaxDepth)) { - minErrConfig.objectMaxDepth = isValidObjectMaxDepth(config.objectMaxDepth) ? config.objectMaxDepth : NaN; - } - } else { - return minErrConfig; - } -} - -/** - * @private - * @param {Number} maxDepth - * @return {boolean} - */ -function isValidObjectMaxDepth(maxDepth) { - return isNumber(maxDepth) && maxDepth > 0; -} - -/** - * @description - * - * This object provides a utility for producing rich Error messages within - * AngularJS. It can be called as follows: - * - * var exampleMinErr = minErr('example'); - * throw exampleMinErr('one', 'This {0} is {1}', foo, bar); - * - * The above creates an instance of minErr in the example namespace. The - * resulting error will have a namespaced error code of example.one. The - * resulting error will replace {0} with the value of foo, and {1} with the - * value of bar. The object is not restricted in the number of arguments it can - * take. - * - * If fewer arguments are specified than necessary for interpolation, the extra - * interpolation markers will be preserved in the final string. - * - * Since data will be parsed statically during a build step, some restrictions - * are applied with respect to how minErr instances are created and called. - * Instances should have names of the form namespaceMinErr for a minErr created - * using minErr('namespace') . Error codes, namespaces and template strings - * should all be static strings, not variables or general expressions. - * - * @param {string} module The namespace to use for the new minErr instance. - * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning - * error from returned function, for cases when a particular type of error is useful. - * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance - */ - -function minErr(module, ErrorConstructor) { - ErrorConstructor = ErrorConstructor || Error; - return function() { - var code = arguments[0], - template = arguments[1], - message = '[' + (module ? module + ':' : '') + code + '] ', - templateArgs = sliceArgs(arguments, 2).map(function(arg) { - return toDebugString(arg, minErrConfig.objectMaxDepth); - }), - paramPrefix, i; - - message += template.replace(/\{\d+\}/g, function(match) { - var index = +match.slice(1, -1); - - if (index < templateArgs.length) { - return templateArgs[index]; - } - - return match; - }); - - message += '\nhttp://errors.angularjs.org/1.6.9/' + - (module ? module + '/' : '') + code; - - for (i = 0, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { - message += paramPrefix + 'p' + i + '=' + encodeURIComponent(templateArgs[i]); - } - - return new ErrorConstructor(message); - }; -} - -/* We need to tell ESLint what variables are being exported */ -/* exported - angular, - msie, - jqLite, - jQuery, - slice, - splice, - push, - toString, - minErrConfig, - errorHandlingConfig, - isValidObjectMaxDepth, - ngMinErr, - angularModule, - uid, - REGEX_STRING_REGEXP, - VALIDITY_STATE_PROPERTY, - - lowercase, - uppercase, - manualLowercase, - manualUppercase, - nodeName_, - isArrayLike, - forEach, - forEachSorted, - reverseParams, - nextUid, - setHashKey, - extend, - toInt, - inherit, - merge, - noop, - identity, - valueFn, - isUndefined, - isDefined, - isObject, - isBlankObject, - isString, - isNumber, - isNumberNaN, - isDate, - isError, - isArray, - isFunction, - isRegExp, - isWindow, - isScope, - isFile, - isFormData, - isBlob, - isBoolean, - isPromiseLike, - trim, - escapeForRegexp, - isElement, - makeMap, - includes, - arrayRemove, - copy, - simpleCompare, - equals, - csp, - jq, - concat, - sliceArgs, - bind, - toJsonReplacer, - toJson, - fromJson, - convertTimezoneToLocal, - timezoneToOffset, - startingTag, - tryDecodeURIComponent, - parseKeyValue, - toKeyValue, - encodeUriSegment, - encodeUriQuery, - angularInit, - bootstrap, - getTestability, - snake_case, - bindJQuery, - assertArg, - assertArgFn, - assertNotHasOwnProperty, - getter, - getBlockNodes, - hasOwnProperty, - createMap, - stringify, - - NODE_TYPE_ELEMENT, - NODE_TYPE_ATTRIBUTE, - NODE_TYPE_TEXT, - NODE_TYPE_COMMENT, - NODE_TYPE_DOCUMENT, - NODE_TYPE_DOCUMENT_FRAGMENT -*/ - -//////////////////////////////////// - -/** - * @ngdoc module - * @name ng - * @module ng - * @installation - * @description - * - * The ng module is loaded by default when an AngularJS application is started. The module itself - * contains the essential components for an AngularJS application to function. The table below - * lists a high level breakdown of each of the services/factories, filters, directives and testing - * components available within this core module. - * - */ - -var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/; - -// The name of a form control's ValidityState property. -// This is used so that it's possible for internal tests to create mock ValidityStates. -var VALIDITY_STATE_PROPERTY = 'validity'; - - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * @ngdoc function - * @name angular.lowercase - * @module ng - * @kind function - * - * @deprecated - * sinceVersion="1.5.0" - * removeVersion="1.7.0" - * Use [String.prototype.toLowerCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) instead. - * - * @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 - * @module ng - * @kind function - * - * @deprecated - * sinceVersion="1.5.0" - * removeVersion="1.7.0" - * Use [String.prototype.toUpperCase](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) instead. - * - * @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) { - /* eslint-disable no-bitwise */ - return isString(s) - ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);}) - : s; - /* eslint-enable */ -}; -var manualUppercase = function(s) { - /* eslint-disable no-bitwise */ - return isString(s) - ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);}) - : s; - /* eslint-enable */ -}; - - -// 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. See https://github.com/angular/angular.js/issues/11387 -if ('i' !== 'I'.toLowerCase()) { - lowercase = manualLowercase; - uppercase = manualUppercase; -} - - -var - msie, // holds major version number for IE, or NaN if UA is not IE. - jqLite, // delay binding since jQuery could be loaded after us. - jQuery, // delay binding - slice = [].slice, - splice = [].splice, - push = [].push, - toString = Object.prototype.toString, - getPrototypeOf = Object.getPrototypeOf, - ngMinErr = minErr('ng'), - - /** @name angular */ - angular = window.angular || (window.angular = {}), - angularModule, - uid = 0; - -// Support: IE 9-11 only -/** - * documentMode is an IE-only property - * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx - */ -msie = window.document.documentMode; - - -/** - * @private - * @param {*} obj - * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, - * String ...) - */ -function isArrayLike(obj) { - - // `null`, `undefined` and `window` are not array-like - if (obj == null || isWindow(obj)) return false; - - // arrays, strings and jQuery/jqLite objects are array like - // * jqLite is either the jQuery or jqLite constructor function - // * we have to check the existence of jqLite first as this method is called - // via the forEach method when constructing the jqLite object in the first place - if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true; - - // Support: iOS 8.2 (not reproducible in simulator) - // "length" in obj used to prevent JIT error (gh-11508) - var length = 'length' in Object(obj) && obj.length; - - // NodeList objects (with `item` method) and - // other objects with suitable length characteristics are array-like - return isNumber(length) && - (length >= 0 && ((length - 1) in obj || obj instanceof Array) || typeof obj.item === 'function'); - -} - -/** - * @ngdoc function - * @name angular.forEach - * @module ng - * @kind 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, obj)`, where `value` - * is the value of an object property or an array element, `key` is the object property key or - * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional. - * - * It is worth noting that `.forEach` does not iterate over inherited properties because it filters - * using the `hasOwnProperty` method. - * - * Unlike ES262's - * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18), - * providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just - * return the value provided. - * - ```js - 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']); - ``` - * - * @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`. - */ - -function forEach(obj, iterator, context) { - var key, length; - 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, obj); - } - } - } else if (isArray(obj) || isArrayLike(obj)) { - var isPrimitive = typeof obj !== 'object'; - for (key = 0, length = obj.length; key < length; key++) { - if (isPrimitive || key in obj) { - iterator.call(context, obj[key], key, obj); - } - } - } else if (obj.forEach && obj.forEach !== forEach) { - obj.forEach(iterator, context, obj); - } else if (isBlankObject(obj)) { - // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty - for (key in obj) { - iterator.call(context, obj[key], key, obj); - } - } else if (typeof obj.hasOwnProperty === 'function') { - // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed - for (key in obj) { - if (obj.hasOwnProperty(key)) { - iterator.call(context, obj[key], key, obj); - } - } - } else { - // Slow path for objects which do not have a method `hasOwnProperty` - for (key in obj) { - if (hasOwnProperty.call(obj, key)) { - iterator.call(context, obj[key], key, obj); - } - } - } - } - return obj; -} - -function forEachSorted(obj, iterator, context) { - var keys = Object.keys(obj).sort(); - 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. - * - * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before - * we hit number precision issues in JavaScript. - * - * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M - * - * @returns {number} an unique alpha-numeric string - */ -function nextUid() { - return ++uid; -} - - -/** - * Set or clear the hashkey for an object. - * @param obj object - * @param h the hashkey (!truthy to delete the hashkey) - */ -function setHashKey(obj, h) { - if (h) { - obj.$$hashKey = h; - } else { - delete obj.$$hashKey; - } -} - - -function baseExtend(dst, objs, deep) { - var h = dst.$$hashKey; - - for (var i = 0, ii = objs.length; i < ii; ++i) { - var obj = objs[i]; - if (!isObject(obj) && !isFunction(obj)) continue; - var keys = Object.keys(obj); - for (var j = 0, jj = keys.length; j < jj; j++) { - var key = keys[j]; - var src = obj[key]; - - if (deep && isObject(src)) { - if (isDate(src)) { - dst[key] = new Date(src.valueOf()); - } else if (isRegExp(src)) { - dst[key] = new RegExp(src); - } else if (src.nodeName) { - dst[key] = src.cloneNode(true); - } else if (isElement(src)) { - dst[key] = src.clone(); - } else { - if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {}; - baseExtend(dst[key], [src], true); - } - } else { - dst[key] = src; - } - } - } - - setHashKey(dst, h); - return dst; -} - -/** - * @ngdoc function - * @name angular.extend - * @module ng - * @kind function - * - * @description - * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s) - * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so - * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`. - * - * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use - * {@link angular.merge} for this. - * - * @param {Object} dst Destination object. - * @param {...Object} src Source object(s). - * @returns {Object} Reference to `dst`. - */ -function extend(dst) { - return baseExtend(dst, slice.call(arguments, 1), false); -} - - -/** -* @ngdoc function -* @name angular.merge -* @module ng -* @kind function -* -* @description -* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s) -* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so -* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`. -* -* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source -* objects, performing a deep copy. -* -* @deprecated -* sinceVersion="1.6.5" -* This function is deprecated, but will not be removed in the 1.x lifecycle. -* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not -* supported by this function. We suggest -* using [lodash's merge()](https://lodash.com/docs/4.17.4#merge) instead. -* -* @knownIssue -* This is a list of (known) object types that are not handled correctly by this function: -* - [`Blob`](https://developer.mozilla.org/docs/Web/API/Blob) -* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) -* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient) -* - AngularJS {@link $rootScope.Scope scopes}; -* -* @param {Object} dst Destination object. -* @param {...Object} src Source object(s). -* @returns {Object} Reference to `dst`. -*/ -function merge(dst) { - return baseExtend(dst, slice.call(arguments, 1), true); -} - - - -function toInt(str) { - return parseInt(str, 10); -} - -var isNumberNaN = Number.isNaN || function isNumberNaN(num) { - // eslint-disable-next-line no-self-compare - return num !== num; -}; - - -function inherit(parent, extra) { - return extend(Object.create(parent), extra); -} - -/** - * @ngdoc function - * @name angular.noop - * @module ng - * @kind function - * - * @description - * A function that performs no operations. This function can be useful when writing code in the - * functional style. - ```js - function foo(callback) { - var result = calculateResult(); - (callback || angular.noop)(result); - } - ``` - */ -function noop() {} -noop.$inject = []; - - -/** - * @ngdoc function - * @name angular.identity - * @module ng - * @kind function - * - * @description - * A function that returns its first argument. This function is useful when writing code in the - * functional style. - * - ```js - function transformer(transformationFn, value) { - return (transformationFn || angular.identity)(value); - }; - - // E.g. - function getResult(fn, input) { - return (fn || angular.identity)(input); - }; - - getResult(function(n) { return n * 2; }, 21); // returns 42 - getResult(null, 21); // returns 21 - getResult(undefined, 21); // returns 21 - ``` - * - * @param {*} value to be returned. - * @returns {*} the value passed in. - */ -function identity($) {return $;} -identity.$inject = []; - - -function valueFn(value) {return function valueRef() {return value;};} - -function hasCustomToString(obj) { - return isFunction(obj.toString) && obj.toString !== toString; -} - - -/** - * @ngdoc function - * @name angular.isUndefined - * @module ng - * @kind 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 - * @module ng - * @kind 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 - * @module ng - * @kind function - * - * @description - * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not - * considered to be objects. Note that JavaScript arrays are objects. - * - * @param {*} value Reference to check. - * @returns {boolean} True if `value` is an `Object` but not `null`. - */ -function isObject(value) { - // http://jsperf.com/isobject4 - return value !== null && typeof value === 'object'; -} - - -/** - * Determine if a value is an object with a null prototype - * - * @returns {boolean} True if `value` is an `Object` with a null prototype - */ -function isBlankObject(value) { - return value !== null && typeof value === 'object' && !getPrototypeOf(value); -} - - -/** - * @ngdoc function - * @name angular.isString - * @module ng - * @kind 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 - * @module ng - * @kind function - * - * @description - * Determines if a reference is a `Number`. - * - * This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`. - * - * If you wish to exclude these then you can use the native - * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite) - * method. - * - * @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 - * @module ng - * @kind 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.call(value) === '[object Date]'; -} - - -/** - * @ngdoc function - * @name angular.isArray - * @module ng - * @kind function - * - * @description - * Determines if a reference is an `Array`. Alias of Array.isArray. - * - * @param {*} value Reference to check. - * @returns {boolean} True if `value` is an `Array`. - */ -var isArray = Array.isArray; - -/** - * @description - * Determines if a reference is an `Error`. - * Loosely based on https://www.npmjs.com/package/iserror - * - * @param {*} value Reference to check. - * @returns {boolean} True if `value` is an `Error`. - */ -function isError(value) { - var tag = toString.call(value); - switch (tag) { - case '[object Error]': return true; - case '[object Exception]': return true; - case '[object DOMException]': return true; - default: return value instanceof Error; - } -} - -/** - * @ngdoc function - * @name angular.isFunction - * @module ng - * @kind 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';} - - -/** - * Determines if a value is a regular expression object. - * - * @private - * @param {*} value Reference to check. - * @returns {boolean} True if `value` is a `RegExp`. - */ -function isRegExp(value) { - return toString.call(value) === '[object RegExp]'; -} - - -/** - * 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.window === obj; -} - - -function isScope(obj) { - return obj && obj.$evalAsync && obj.$watch; -} - - -function isFile(obj) { - return toString.call(obj) === '[object File]'; -} - - -function isFormData(obj) { - return toString.call(obj) === '[object FormData]'; -} - - -function isBlob(obj) { - return toString.call(obj) === '[object Blob]'; -} - - -function isBoolean(value) { - return typeof value === 'boolean'; -} - - -function isPromiseLike(obj) { - return obj && isFunction(obj.then); -} - - -var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/; -function isTypedArray(value) { - return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value)); -} - -function isArrayBuffer(obj) { - return toString.call(obj) === '[object ArrayBuffer]'; -} - - -var trim = function(value) { - return isString(value) ? value.trim() : value; -}; - -// Copied from: -// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021 -// Prereq: s is a string. -var escapeForRegexp = function(s) { - return s - .replace(/([-()[\]{}+?*.$^|,:#= 0) { - array.splice(index, 1); - } - return index; -} - -/** - * @ngdoc function - * @name angular.copy - * @module ng - * @kind 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 arrays) 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 (inc. `null` and `undefined`), `source` is returned. - * * If `source` is identical to `destination` an exception will be thrown. - * - *
      - *
      - * Only enumerable properties are taken into account. Non-enumerable properties (both on `source` - * and on `destination`) will be ignored. - *
      - * - * @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. - * - * @example - - -
      -
      -
      -
      - Gender: -
      - - -
      -
      form = {{user | json}}
      -
      leader = {{leader | json}}
      -
      -
      - - // Module: copyExample - angular. - module('copyExample', []). - controller('ExampleController', ['$scope', function($scope) { - $scope.leader = {}; - - $scope.reset = function() { - // Example with 1 argument - $scope.user = angular.copy($scope.leader); - }; - - $scope.update = function(user) { - // Example with 2 arguments - angular.copy(user, $scope.leader); - }; - - $scope.reset(); - }]); - -
      - */ -function copy(source, destination, maxDepth) { - var stackSource = []; - var stackDest = []; - maxDepth = isValidObjectMaxDepth(maxDepth) ? maxDepth : NaN; - - if (destination) { - if (isTypedArray(destination) || isArrayBuffer(destination)) { - throw ngMinErr('cpta', 'Can\'t copy! TypedArray destination cannot be mutated.'); - } - if (source === destination) { - throw ngMinErr('cpi', 'Can\'t copy! Source and destination are identical.'); - } - - // Empty the destination object - if (isArray(destination)) { - destination.length = 0; - } else { - forEach(destination, function(value, key) { - if (key !== '$$hashKey') { - delete destination[key]; - } - }); - } - - stackSource.push(source); - stackDest.push(destination); - return copyRecurse(source, destination, maxDepth); - } - - return copyElement(source, maxDepth); - - function copyRecurse(source, destination, maxDepth) { - maxDepth--; - if (maxDepth < 0) { - return '...'; - } - var h = destination.$$hashKey; - var key; - if (isArray(source)) { - for (var i = 0, ii = source.length; i < ii; i++) { - destination.push(copyElement(source[i], maxDepth)); - } - } else if (isBlankObject(source)) { - // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty - for (key in source) { - destination[key] = copyElement(source[key], maxDepth); - } - } else if (source && typeof source.hasOwnProperty === 'function') { - // Slow path, which must rely on hasOwnProperty - for (key in source) { - if (source.hasOwnProperty(key)) { - destination[key] = copyElement(source[key], maxDepth); - } - } - } else { - // Slowest path --- hasOwnProperty can't be called as a method - for (key in source) { - if (hasOwnProperty.call(source, key)) { - destination[key] = copyElement(source[key], maxDepth); - } - } - } - setHashKey(destination, h); - return destination; - } - - function copyElement(source, maxDepth) { - // Simple values - if (!isObject(source)) { - return source; - } - - // Already copied values - var index = stackSource.indexOf(source); - if (index !== -1) { - return stackDest[index]; - } - - if (isWindow(source) || isScope(source)) { - throw ngMinErr('cpws', - 'Can\'t copy! Making copies of Window or Scope instances is not supported.'); - } - - var needsRecurse = false; - var destination = copyType(source); - - if (destination === undefined) { - destination = isArray(source) ? [] : Object.create(getPrototypeOf(source)); - needsRecurse = true; - } - - stackSource.push(source); - stackDest.push(destination); - - return needsRecurse - ? copyRecurse(source, destination, maxDepth) - : destination; - } - - function copyType(source) { - switch (toString.call(source)) { - case '[object Int8Array]': - case '[object Int16Array]': - case '[object Int32Array]': - case '[object Float32Array]': - case '[object Float64Array]': - case '[object Uint8Array]': - case '[object Uint8ClampedArray]': - case '[object Uint16Array]': - case '[object Uint32Array]': - return new source.constructor(copyElement(source.buffer), source.byteOffset, source.length); - - case '[object ArrayBuffer]': - // Support: IE10 - if (!source.slice) { - // If we're in this case we know the environment supports ArrayBuffer - /* eslint-disable no-undef */ - var copied = new ArrayBuffer(source.byteLength); - new Uint8Array(copied).set(new Uint8Array(source)); - /* eslint-enable */ - return copied; - } - return source.slice(0); - - case '[object Boolean]': - case '[object Number]': - case '[object String]': - case '[object Date]': - return new source.constructor(source.valueOf()); - - case '[object RegExp]': - var re = new RegExp(source.source, source.toString().match(/[^/]*$/)[0]); - re.lastIndex = source.lastIndex; - return re; - - case '[object Blob]': - return new source.constructor([source], {type: source.type}); - } - - if (isFunction(source.cloneNode)) { - return source.cloneNode(true); - } - } -} - - -// eslint-disable-next-line no-self-compare -function simpleCompare(a, b) { return a === b || (a !== a && b !== b); } - - -/** - * @ngdoc function - * @name angular.equals - * @module ng - * @kind function - * - * @description - * Determines if two objects or two values are equivalent. Supports value types, regular - * expressions, 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 are equal by - * comparing them with `angular.equals`. - * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal) - * * Both values represent the same regular expression (In JavaScript, - * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual - * representation matches). - * - * During a property comparison, properties of `function` type and properties with names - * that begin with `$` are ignored. - * - * Scope and DOMWindow objects are being compared only by identify (`===`). - * - * @param {*} o1 Object or value to compare. - * @param {*} o2 Object or value to compare. - * @returns {boolean} True if arguments are equal. - * - * @example - - -
      -
      -

      User 1

      - Name: - Age: - -

      User 2

      - Name: - Age: - -
      -
      - -
      - User 1:
      {{user1 | json}}
      - User 2:
      {{user2 | json}}
      - Equal:
      {{result}}
      -
      -
      -
      - - angular.module('equalsExample', []).controller('ExampleController', ['$scope', function($scope) { - $scope.user1 = {}; - $scope.user2 = {}; - $scope.compare = function() { - $scope.result = angular.equals($scope.user1, $scope.user2); - }; - }]); - -
      - */ -function equals(o1, o2) { - if (o1 === o2) return true; - if (o1 === null || o2 === null) return false; - // eslint-disable-next-line no-self-compare - if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN - var t1 = typeof o1, t2 = typeof o2, length, key, keySet; - if (t1 === t2 && t1 === 'object') { - if (isArray(o1)) { - if (!isArray(o2)) return false; - 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)) { - if (!isDate(o2)) return false; - return simpleCompare(o1.getTime(), o2.getTime()); - } else if (isRegExp(o1)) { - if (!isRegExp(o2)) return false; - return o1.toString() === o2.toString(); - } else { - if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || - isArray(o2) || isDate(o2) || isRegExp(o2)) return false; - keySet = createMap(); - 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 (!(key in keySet) && - key.charAt(0) !== '$' && - isDefined(o2[key]) && - !isFunction(o2[key])) return false; - } - return true; - } - } - return false; -} - -var csp = function() { - if (!isDefined(csp.rules)) { - - - var ngCspElement = (window.document.querySelector('[ng-csp]') || - window.document.querySelector('[data-ng-csp]')); - - if (ngCspElement) { - var ngCspAttribute = ngCspElement.getAttribute('ng-csp') || - ngCspElement.getAttribute('data-ng-csp'); - csp.rules = { - noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1), - noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1) - }; - } else { - csp.rules = { - noUnsafeEval: noUnsafeEval(), - noInlineStyle: false - }; - } - } - - return csp.rules; - - function noUnsafeEval() { - try { - // eslint-disable-next-line no-new, no-new-func - new Function(''); - return false; - } catch (e) { - return true; - } - } -}; - -/** - * @ngdoc directive - * @module ng - * @name ngJq - * - * @element ANY - * @param {string=} ngJq the name of the library available under `window` - * to be used for angular.element - * @description - * Use this directive to force the angular.element library. This should be - * used to force either jqLite by leaving ng-jq blank or setting the name of - * the jquery variable under window (eg. jQuery). - * - * Since AngularJS looks for this directive when it is loaded (doesn't wait for the - * DOMContentLoaded event), it must be placed on an element that comes before the script - * which loads angular. Also, only the first instance of `ng-jq` will be used and all - * others ignored. - * - * @example - * This example shows how to force jqLite using the `ngJq` directive to the `html` tag. - ```html - - - ... - ... - - ``` - * @example - * This example shows how to use a jQuery based library of a different name. - * The library name must be available at the top most 'window'. - ```html - - - ... - ... - - ``` - */ -var jq = function() { - if (isDefined(jq.name_)) return jq.name_; - var el; - var i, ii = ngAttrPrefixes.length, prefix, name; - for (i = 0; i < ii; ++i) { - prefix = ngAttrPrefixes[i]; - el = window.document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]'); - if (el) { - name = el.getAttribute(prefix + 'jq'); - break; - } - } - - return (jq.name_ = name); -}; - -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 - * @module ng - * @kind 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 prebound to the function. This feature is also - * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as - * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application). - * - * @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, concat(curryArgs, 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 (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') { - val = undefined; - } else if (isWindow(value)) { - val = '$WINDOW'; - } else if (value && window.document === value) { - val = '$DOCUMENT'; - } else if (isScope(value)) { - val = '$SCOPE'; - } - - return val; -} - - -/** - * @ngdoc function - * @name angular.toJson - * @module ng - * @kind function - * - * @description - * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be - * stripped since AngularJS uses this notation internally. - * - * @param {Object|Array|Date|string|number|boolean} obj Input to be serialized into JSON. - * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace. - * If set to an integer, the JSON output will contain that many spaces per indentation. - * @returns {string|undefined} JSON-ified string representing `obj`. - * @knownIssue - * - * The Safari browser throws a `RangeError` instead of returning `null` when it tries to stringify a `Date` - * object with an invalid date value. The only reliable way to prevent this is to monkeypatch the - * `Date.prototype.toJSON` method as follows: - * - * ``` - * var _DatetoJSON = Date.prototype.toJSON; - * Date.prototype.toJSON = function() { - * try { - * return _DatetoJSON.call(this); - * } catch(e) { - * if (e instanceof RangeError) { - * return null; - * } - * throw e; - * } - * }; - * ``` - * - * See https://github.com/angular/angular.js/pull/14221 for more information. - */ -function toJson(obj, pretty) { - if (isUndefined(obj)) return undefined; - if (!isNumber(pretty)) { - pretty = pretty ? 2 : null; - } - return JSON.stringify(obj, toJsonReplacer, pretty); -} - - -/** - * @ngdoc function - * @name angular.fromJson - * @module ng - * @kind function - * - * @description - * Deserializes a JSON string. - * - * @param {string} json JSON string to deserialize. - * @returns {Object|Array|string|number} Deserialized JSON string. - */ -function fromJson(json) { - return isString(json) - ? JSON.parse(json) - : json; -} - - -var ALL_COLONS = /:/g; -function timezoneToOffset(timezone, fallback) { - // Support: IE 9-11 only, Edge 13-15+ - // IE/Edge do not "understand" colon (`:`) in timezone - timezone = timezone.replace(ALL_COLONS, ''); - var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; - return isNumberNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; -} - - -function addDateMinutes(date, minutes) { - date = new Date(date.getTime()); - date.setMinutes(date.getMinutes() + minutes); - return date; -} - - -function convertTimezoneToLocal(date, timezone, reverse) { - reverse = reverse ? -1 : 1; - var dateTimezoneOffset = date.getTimezoneOffset(); - var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); - return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset)); -} - - -/** - * @returns {string} Returns the string representation of the element. - */ -function startingTag(element) { - element = jqLite(element).clone().empty(); - var elemHtml = jqLite('
      ').append(element).html(); - try { - return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) : - elemHtml. - match(/^(<[^>]+>)/)[1]. - replace(/^<([\w-]+)/, function(match, nodeName) {return '<' + lowercase(nodeName);}); - } catch (e) { - return lowercase(elemHtml); - } - -} - - -///////////////////////////////////////////////// - -/** - * Tries to decode the URI component without throwing an exception. - * - * @private - * @param str value potential URI component to check. - * @returns {boolean} True if `value` can be decoded - * with the decodeURIComponent function. - */ -function tryDecodeURIComponent(value) { - try { - return decodeURIComponent(value); - } catch (e) { - // Ignore any invalid uri component. - } -} - - -/** - * Parses an escaped url query string into key-value pairs. - * @returns {Object.} - */ -function parseKeyValue(/**string*/keyValue) { - var obj = {}; - forEach((keyValue || '').split('&'), function(keyValue) { - var splitPoint, key, val; - if (keyValue) { - key = keyValue = keyValue.replace(/\+/g,'%20'); - splitPoint = keyValue.indexOf('='); - if (splitPoint !== -1) { - key = keyValue.substring(0, splitPoint); - val = keyValue.substring(splitPoint + 1); - } - key = tryDecodeURIComponent(key); - if (isDefined(key)) { - val = isDefined(val) ? tryDecodeURIComponent(val) : true; - if (!hasOwnProperty.call(obj, key)) { - obj[key] = val; - } else if (isArray(obj[key])) { - obj[key].push(val); - } else { - obj[key] = [obj[key],val]; - } - } - } - }); - return obj; -} - -function toKeyValue(obj) { - var parts = []; - forEach(obj, function(value, key) { - if (isArray(value)) { - forEach(value, function(arrayValue) { - parts.push(encodeUriQuery(key, true) + - (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true))); - }); - } else { - parts.push(encodeUriQuery(key, true) + - (value === true ? '' : '=' + encodeUriQuery(value, true))); - } - }); - return parts.length ? parts.join('&') : ''; -} - - -/** - * 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 because encodeURIComponent is too aggressive 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(/%3B/gi, ';'). - replace(/%20/g, (pctEncodeSpaces ? '%20' : '+')); -} - -var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-']; - -function getNgAttribute(element, ngAttr) { - var attr, i, ii = ngAttrPrefixes.length; - for (i = 0; i < ii; ++i) { - attr = ngAttrPrefixes[i] + ngAttr; - if (isString(attr = element.getAttribute(attr))) { - return attr; - } - } - return null; -} - -function allowAutoBootstrap(document) { - var script = document.currentScript; - - if (!script) { - // Support: IE 9-11 only - // IE does not have `document.currentScript` - return true; - } - - // If the `currentScript` property has been clobbered just return false, since this indicates a probable attack - if (!(script instanceof window.HTMLScriptElement || script instanceof window.SVGScriptElement)) { - return false; - } - - var attributes = script.attributes; - var srcs = [attributes.getNamedItem('src'), attributes.getNamedItem('href'), attributes.getNamedItem('xlink:href')]; - - return srcs.every(function(src) { - if (!src) { - return true; - } - if (!src.value) { - return false; - } - - var link = document.createElement('a'); - link.href = src.value; - - if (document.location.origin === link.origin) { - // Same-origin resources are always allowed, even for non-whitelisted schemes. - return true; - } - // Disabled bootstrapping unless angular.js was loaded from a known scheme used on the web. - // This is to prevent angular.js bundled with browser extensions from being used to bypass the - // content security policy in web pages and other browser extensions. - switch (link.protocol) { - case 'http:': - case 'https:': - case 'ftp:': - case 'blob:': - case 'file:': - case 'data:': - return true; - default: - return false; - } - }); -} - -// Cached as it has to run during loading so that document.currentScript is available. -var isAutoBootstrapAllowed = allowAutoBootstrap(window.document); - -/** - * @ngdoc directive - * @name ngApp - * @module ng - * - * @element ANY - * @param {angular.Module} ngApp an optional application - * {@link angular.module module} name to load. - * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be - * created in "strict-di" mode. This means that the application will fail to invoke functions which - * do not use explicit function annotation (and are thus unsuitable for minification), as described - * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in - * tracking down the root of these bugs. - * - * @description - * - * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive - * designates the **root element** of the application and is typically placed near the root element - * of the page - e.g. on the `` or `` tags. - * - * There are a few things to keep in mind when using `ngApp`: - * - only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp` - * found in the document will be used to define the root element to auto-bootstrap as an - * application. To run multiple applications in an HTML document you must manually bootstrap them using - * {@link angular.bootstrap} instead. - * - AngularJS applications cannot be nested within each other. - * - Do not use a directive that uses {@link ng.$compile#transclusion transclusion} on the same element as `ngApp`. - * This includes directives such as {@link ng.ngIf `ngIf`}, {@link ng.ngInclude `ngInclude`} and - * {@link ngRoute.ngView `ngView`}. - * Doing this misplaces the app {@link ng.$rootElement `$rootElement`} and the app's {@link auto.$injector injector}, - * causing animations to stop working and making the injector inaccessible from outside the app. - * - * You can specify an **AngularJS module** to be used as the root module for the application. This - * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It - * should contain the application code needed or have dependencies on other modules that will - * contain the code. See {@link angular.module} for more information. - * - * In the example below if the `ngApp` directive were not placed on the `html` element then the - * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}` - * would not be resolved to `3`. - * - * @example - * - * ### Simple Usage - * - * `ngApp` is the easiest, and most common way to bootstrap an application. - * - - -
      - I can add: {{a}} + {{b}} = {{ a+b }} -
      -
      - - angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) { - $scope.a = 1; - $scope.b = 2; - }); - -
      - * - * @example - * - * ### With `ngStrictDi` - * - * Using `ngStrictDi`, you would see something like this: - * - - -
      -
      - I can add: {{a}} + {{b}} = {{ a+b }} - -

      This renders because the controller does not fail to - instantiate, by using explicit annotation style (see - script.js for details) -

      -
      - -
      - Name:
      - Hello, {{name}}! - -

      This renders because the controller does not fail to - instantiate, by using explicit annotation style - (see script.js for details) -

      -
      - -
      - I can add: {{a}} + {{b}} = {{ a+b }} - -

      The controller could not be instantiated, due to relying - on automatic function annotations (which are disabled in - strict mode). As such, the content of this section is not - interpolated, and there should be an error in your web console. -

      -
      -
      -
      - - angular.module('ngAppStrictDemo', []) - // BadController will fail to instantiate, due to relying on automatic function annotation, - // rather than an explicit annotation - .controller('BadController', function($scope) { - $scope.a = 1; - $scope.b = 2; - }) - // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated, - // due to using explicit annotations using the array style and $inject property, respectively. - .controller('GoodController1', ['$scope', function($scope) { - $scope.a = 1; - $scope.b = 2; - }]) - .controller('GoodController2', GoodController2); - function GoodController2($scope) { - $scope.name = 'World'; - } - GoodController2.$inject = ['$scope']; - - - div[ng-controller] { - margin-bottom: 1em; - -webkit-border-radius: 4px; - border-radius: 4px; - border: 1px solid; - padding: .5em; - } - div[ng-controller^=Good] { - border-color: #d6e9c6; - background-color: #dff0d8; - color: #3c763d; - } - div[ng-controller^=Bad] { - border-color: #ebccd1; - background-color: #f2dede; - color: #a94442; - margin-bottom: 0; - } - -
      - */ -function angularInit(element, bootstrap) { - var appElement, - module, - config = {}; - - // The element `element` has priority over any other element. - forEach(ngAttrPrefixes, function(prefix) { - var name = prefix + 'app'; - - if (!appElement && element.hasAttribute && element.hasAttribute(name)) { - appElement = element; - module = element.getAttribute(name); - } - }); - forEach(ngAttrPrefixes, function(prefix) { - var name = prefix + 'app'; - var candidate; - - if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\:') + ']'))) { - appElement = candidate; - module = candidate.getAttribute(name); - } - }); - if (appElement) { - if (!isAutoBootstrapAllowed) { - window.console.error('AngularJS: disabling automatic bootstrap. - * - * - * - * ``` - * - * @param {DOMElement} element DOM element which is the root of AngularJS application. - * @param {Array=} modules an array of modules to load into the application. - * Each item in the array should be the name of a predefined module or a (DI annotated) - * function that will be invoked by the injector as a `config` block. - * See: {@link angular.module modules} - * @param {Object=} config an object for defining configuration options for the application. The - * following keys are supported: - * - * * `strictDi` - disable automatic function annotation for the application. This is meant to - * assist in finding bugs which break minified code. Defaults to `false`. - * - * @returns {auto.$injector} Returns the newly created injector for this app. - */ -function bootstrap(element, modules, config) { - if (!isObject(config)) config = {}; - var defaultConfig = { - strictDi: false - }; - config = extend(defaultConfig, config); - var doBootstrap = function() { - element = jqLite(element); - - if (element.injector()) { - var tag = (element[0] === window.document) ? 'document' : startingTag(element); - // Encode angle brackets to prevent input from being sanitized to empty string #8683. - throw ngMinErr( - 'btstrpd', - 'App already bootstrapped with this element \'{0}\'', - tag.replace(//,'>')); - } - - modules = modules || []; - modules.unshift(['$provide', function($provide) { - $provide.value('$rootElement', element); - }]); - - if (config.debugInfoEnabled) { - // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`. - modules.push(['$compileProvider', function($compileProvider) { - $compileProvider.debugInfoEnabled(true); - }]); - } - - modules.unshift('ng'); - var injector = createInjector(modules, config.strictDi); - injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', - function bootstrapApply(scope, element, compile, injector) { - scope.$apply(function() { - element.data('$injector', injector); - compile(element)(scope); - }); - }] - ); - return injector; - }; - - var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/; - var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/; - - if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) { - config.debugInfoEnabled = true; - window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, ''); - } - - if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) { - return doBootstrap(); - } - - window.name = window.name.replace(NG_DEFER_BOOTSTRAP, ''); - angular.resumeBootstrap = function(extraModules) { - forEach(extraModules, function(module) { - modules.push(module); - }); - return doBootstrap(); - }; - - if (isFunction(angular.resumeDeferredBootstrap)) { - angular.resumeDeferredBootstrap(); - } -} - -/** - * @ngdoc function - * @name angular.reloadWithDebugInfo - * @module ng - * @description - * Use this function to reload the current application with debug information turned on. - * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`. - * - * See {@link ng.$compileProvider#debugInfoEnabled} for more. - */ -function reloadWithDebugInfo() { - window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name; - window.location.reload(); -} - -/** - * @name angular.getTestability - * @module ng - * @description - * Get the testability service for the instance of AngularJS on the given - * element. - * @param {DOMElement} element DOM element which is the root of AngularJS application. - */ -function getTestability(rootElement) { - var injector = angular.element(rootElement).injector(); - if (!injector) { - throw ngMinErr('test', - 'no injector found for element argument to getTestability'); - } - return injector.get('$$testability'); -} - -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(); - }); -} - -var bindJQueryFired = false; -function bindJQuery() { - var originalCleanData; - - if (bindJQueryFired) { - return; - } - - // bind to jQuery if present; - var jqName = jq(); - jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present) - !jqName ? undefined : // use jqLite - window[jqName]; // use jQuery specified by `ngJq` - - // Use jQuery if it exists with proper functionality, otherwise default to us. - // AngularJS 1.2+ requires jQuery 1.7+ for on()/off() support. - // AngularJS 1.3+ technically requires at least jQuery 2.1+ but it may work with older - // versions. It will not work for sure with jQuery <1.7, though. - if (jQuery && jQuery.fn.on) { - jqLite = jQuery; - extend(jQuery.fn, { - scope: JQLitePrototype.scope, - isolateScope: JQLitePrototype.isolateScope, - controller: /** @type {?} */ (JQLitePrototype).controller, - injector: JQLitePrototype.injector, - inheritedData: JQLitePrototype.inheritedData - }); - - // All nodes removed from the DOM via various jQuery APIs like .remove() - // are passed through jQuery.cleanData. Monkey-patch this method to fire - // the $destroy event on all removed nodes. - originalCleanData = jQuery.cleanData; - jQuery.cleanData = function(elems) { - var events; - for (var i = 0, elem; (elem = elems[i]) != null; i++) { - events = jQuery._data(elem, 'events'); - if (events && events.$destroy) { - jQuery(elem).triggerHandler('$destroy'); - } - } - originalCleanData(elems); - }; - } else { - jqLite = JQLite; - } - - angular.element = jqLite; - - // Prevent double-proxying. - bindJQueryFired = true; -} - -/** - * throw error if the argument is falsy. - */ -function assertArg(arg, name, reason) { - if (!arg) { - throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (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; -} - -/** - * throw error if the name given is hasOwnProperty - * @param {String} name the name to test - * @param {String} context the context in which the name is used, such as module or directive - */ -function assertNotHasOwnProperty(name, context) { - if (name === 'hasOwnProperty') { - throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); - } -} - -/** - * Return the value accessible from the object by path. Any undefined traversals are ignored - * @param {Object} obj starting object - * @param {String} path path to traverse - * @param {boolean} [bindFnToScope=true] - * @returns {Object} value as accessible by path - */ -//TODO(misko): this function needs to be removed -function getter(obj, path, bindFnToScope) { - if (!path) return obj; - var keys = path.split('.'); - var key; - var lastInstance = obj; - var len = keys.length; - - for (var i = 0; i < len; i++) { - key = keys[i]; - if (obj) { - obj = (lastInstance = obj)[key]; - } - } - if (!bindFnToScope && isFunction(obj)) { - return bind(lastInstance, obj); - } - return obj; -} - -/** - * Return the DOM siblings between the first and last node in the given array. - * @param {Array} array like object - * @returns {Array} the inputted object or a jqLite collection containing the nodes - */ -function getBlockNodes(nodes) { - // TODO(perf): update `nodes` instead of creating a new object? - var node = nodes[0]; - var endNode = nodes[nodes.length - 1]; - var blockNodes; - - for (var i = 1; node !== endNode && (node = node.nextSibling); i++) { - if (blockNodes || nodes[i] !== node) { - if (!blockNodes) { - blockNodes = jqLite(slice.call(nodes, 0, i)); - } - blockNodes.push(node); - } - } - - return blockNodes || nodes; -} - - -/** - * Creates a new object without a prototype. This object is useful for lookup without having to - * guard against prototypically inherited properties via hasOwnProperty. - * - * Related micro-benchmarks: - * - http://jsperf.com/object-create2 - * - http://jsperf.com/proto-map-lookup/2 - * - http://jsperf.com/for-in-vs-object-keys2 - * - * @returns {Object} - */ -function createMap() { - return Object.create(null); -} - -function stringify(value) { - if (value == null) { // null || undefined - return ''; - } - switch (typeof value) { - case 'string': - break; - case 'number': - value = '' + value; - break; - default: - if (hasCustomToString(value) && !isArray(value) && !isDate(value)) { - value = value.toString(); - } else { - value = toJson(value); - } - } - - return value; -} - -var NODE_TYPE_ELEMENT = 1; -var NODE_TYPE_ATTRIBUTE = 2; -var NODE_TYPE_TEXT = 3; -var NODE_TYPE_COMMENT = 8; -var NODE_TYPE_DOCUMENT = 9; -var NODE_TYPE_DOCUMENT_FRAGMENT = 11; - -/** - * @ngdoc type - * @name angular.Module - * @module ng - * @description - * - * Interface for configuring AngularJS {@link angular.module modules}. - */ - -function setupModuleLoader(window) { - - var $injectorMinErr = minErr('$injector'); - var ngMinErr = minErr('ng'); - - function ensure(obj, name, factory) { - return obj[name] || (obj[name] = factory()); - } - - var angular = ensure(window, 'angular', Object); - - // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap - angular.$$minErr = angular.$$minErr || minErr; - - return ensure(angular, 'module', function() { - /** @type {Object.} */ - var modules = {}; - - /** - * @ngdoc function - * @name angular.module - * @module ng - * @description - * - * The `angular.module` is a global place for creating, registering and retrieving AngularJS - * modules. - * All modules (AngularJS core or 3rd party) that should be available to an application must be - * registered using this mechanism. - * - * Passing one argument retrieves an existing {@link angular.Module}, - * whereas passing more than one argument creates a new {@link angular.Module} - * - * - * # Module - * - * A module is a collection of services, directives, controllers, filters, and configuration information. - * `angular.module` is used to configure the {@link auto.$injector $injector}. - * - * ```js - * // 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(['$locationProvider', function($locationProvider) { - * // Configure existing providers - * $locationProvider.hashPrefix('!'); - * }]); - * ``` - * - * Then you can create an injector and load your modules like this: - * - * ```js - * var injector = angular.injector(['ng', 'myModule']) - * ``` - * - * 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.=} requires If specified then new module is being created. If - * unspecified then 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 {angular.Module} new module with the {@link angular.Module} api. - */ - return function module(name, requires, configFn) { - - var info = {}; - - var assertNotHasOwnProperty = function(name, context) { - if (name === 'hasOwnProperty') { - throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context); - } - }; - - assertNotHasOwnProperty(name, 'module'); - if (requires && modules.hasOwnProperty(name)) { - modules[name] = null; - } - return ensure(modules, name, function() { - if (!requires) { - throw $injectorMinErr('nomod', 'Module \'{0}\' is not available! You either misspelled ' + - 'the module name or forgot to load it. If registering a module ensure that you ' + - 'specify the dependencies as the second argument.', name); - } - - /** @type {!Array.>} */ - var invokeQueue = []; - - /** @type {!Array.} */ - var configBlocks = []; - - /** @type {!Array.} */ - var runBlocks = []; - - var config = invokeLater('$injector', 'invoke', 'push', configBlocks); - - /** @type {angular.Module} */ - var moduleInstance = { - // Private state - _invokeQueue: invokeQueue, - _configBlocks: configBlocks, - _runBlocks: runBlocks, - - /** - * @ngdoc method - * @name angular.Module#info - * @module ng - * - * @param {Object=} info Information about the module - * @returns {Object|Module} The current info object for this module if called as a getter, - * or `this` if called as a setter. - * - * @description - * Read and write custom information about this module. - * For example you could put the version of the module in here. - * - * ```js - * angular.module('myModule', []).info({ version: '1.0.0' }); - * ``` - * - * The version could then be read back out by accessing the module elsewhere: - * - * ``` - * var version = angular.module('myModule').info().version; - * ``` - * - * You can also retrieve this information during runtime via the - * {@link $injector#modules `$injector.modules`} property: - * - * ```js - * var version = $injector.modules['myModule'].info().version; - * ``` - */ - info: function(value) { - if (isDefined(value)) { - if (!isObject(value)) throw ngMinErr('aobj', 'Argument \'{0}\' must be an object', 'value'); - info = value; - return this; - } - return info; - }, - - /** - * @ngdoc property - * @name angular.Module#requires - * @module ng - * - * @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 - * @module ng - * - * @description - * Name of the module. - */ - name: name, - - - /** - * @ngdoc method - * @name angular.Module#provider - * @module ng - * @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: invokeLaterAndSetModuleName('$provide', 'provider'), - - /** - * @ngdoc method - * @name angular.Module#factory - * @module ng - * @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: invokeLaterAndSetModuleName('$provide', 'factory'), - - /** - * @ngdoc method - * @name angular.Module#service - * @module ng - * @param {string} name service name - * @param {Function} constructor A constructor function that will be instantiated. - * @description - * See {@link auto.$provide#service $provide.service()}. - */ - service: invokeLaterAndSetModuleName('$provide', 'service'), - - /** - * @ngdoc method - * @name angular.Module#value - * @module ng - * @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 - * @module ng - * @param {string} name constant name - * @param {*} object Constant value. - * @description - * Because the constants 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#decorator - * @module ng - * @param {string} name The name of the service to decorate. - * @param {Function} decorFn This function will be invoked when the service needs to be - * instantiated and should return the decorated service instance. - * @description - * See {@link auto.$provide#decorator $provide.decorator()}. - */ - decorator: invokeLaterAndSetModuleName('$provide', 'decorator', configBlocks), - - /** - * @ngdoc method - * @name angular.Module#animation - * @module ng - * @param {string} name animation name - * @param {Function} animationFactory Factory function for creating new instance of an - * animation. - * @description - * - * **NOTE**: animations take effect only if the **ngAnimate** module is loaded. - * - * - * Defines an animation hook that can be later used with - * {@link $animate $animate} service and directives that use this service. - * - * ```js - * module.animation('.animation-name', function($inject1, $inject2) { - * return { - * eventName : function(element, done) { - * //code to run the animation - * //once complete, then run done() - * return function cancellationFunction(element) { - * //code to cancel the animation - * } - * } - * } - * }) - * ``` - * - * See {@link ng.$animateProvider#register $animateProvider.register()} and - * {@link ngAnimate ngAnimate module} for more information. - */ - animation: invokeLaterAndSetModuleName('$animateProvider', 'register'), - - /** - * @ngdoc method - * @name angular.Module#filter - * @module ng - * @param {string} name Filter name - this must be a valid AngularJS expression identifier - * @param {Function} filterFactory Factory function for creating new instance of filter. - * @description - * See {@link ng.$filterProvider#register $filterProvider.register()}. - * - *
      - * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`. - * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace - * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores - * (`myapp_subsection_filterx`). - *
      - */ - filter: invokeLaterAndSetModuleName('$filterProvider', 'register'), - - /** - * @ngdoc method - * @name angular.Module#controller - * @module ng - * @param {string|Object} name Controller name, or an object map of controllers where the - * keys are the names and the values are the constructors. - * @param {Function} constructor Controller constructor function. - * @description - * See {@link ng.$controllerProvider#register $controllerProvider.register()}. - */ - controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'), - - /** - * @ngdoc method - * @name angular.Module#directive - * @module ng - * @param {string|Object} name Directive name, or an object map of directives where the - * keys are the names and the values are the factories. - * @param {Function} directiveFactory Factory function for creating new instance of - * directives. - * @description - * See {@link ng.$compileProvider#directive $compileProvider.directive()}. - */ - directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'), - - /** - * @ngdoc method - * @name angular.Module#component - * @module ng - * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp) - * @param {Object} options Component definition object (a simplified - * {@link ng.$compile#directive-definition-object directive definition object}) - * - * @description - * See {@link ng.$compileProvider#component $compileProvider.component()}. - */ - component: invokeLaterAndSetModuleName('$compileProvider', 'component'), - - /** - * @ngdoc method - * @name angular.Module#config - * @module ng - * @param {Function} configFn Execute this function on module load. Useful for service - * configuration. - * @description - * Use this method to configure services by injecting their - * {@link angular.Module#provider `providers`}, e.g. for adding routes to the - * {@link ngRoute.$routeProvider $routeProvider}. - * - * Note that you can only inject {@link angular.Module#provider `providers`} and - * {@link angular.Module#constant `constants`} into this function. - * - * For more about how to configure services, see - * {@link providers#provider-recipe Provider Recipe}. - */ - config: config, - - /** - * @ngdoc method - * @name angular.Module#run - * @module ng - * @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, queue) { - if (!queue) queue = invokeQueue; - return function() { - queue[insertMethod || 'push']([provider, method, arguments]); - return moduleInstance; - }; - } - - /** - * @param {string} provider - * @param {string} method - * @returns {angular.Module} - */ - function invokeLaterAndSetModuleName(provider, method, queue) { - if (!queue) queue = invokeQueue; - return function(recipeName, factoryFunction) { - if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name; - queue.push([provider, method, arguments]); - return moduleInstance; - }; - } - }); - }; - }); - -} - -/* global shallowCopy: true */ - -/** - * Creates a shallow copy of an object, an array or a primitive. - * - * Assumes that there are no proto properties for objects. - */ -function shallowCopy(src, dst) { - if (isArray(src)) { - dst = dst || []; - - for (var i = 0, ii = src.length; i < ii; i++) { - dst[i] = src[i]; - } - } else if (isObject(src)) { - dst = dst || {}; - - for (var key in src) { - if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) { - dst[key] = src[key]; - } - } - } - - return dst || src; -} - -/* exported toDebugString */ - -function serializeObject(obj, maxDepth) { - var seen = []; - - // There is no direct way to stringify object until reaching a specific depth - // and a very deep object can cause a performance issue, so we copy the object - // based on this specific depth and then stringify it. - if (isValidObjectMaxDepth(maxDepth)) { - // This file is also included in `angular-loader`, so `copy()` might not always be available in - // the closure. Therefore, it is lazily retrieved as `angular.copy()` when needed. - obj = angular.copy(obj, null, maxDepth); - } - return JSON.stringify(obj, function(key, val) { - val = toJsonReplacer(key, val); - if (isObject(val)) { - - if (seen.indexOf(val) >= 0) return '...'; - - seen.push(val); - } - return val; - }); -} - -function toDebugString(obj, maxDepth) { - if (typeof obj === 'function') { - return obj.toString().replace(/ \{[\s\S]*$/, ''); - } else if (isUndefined(obj)) { - return 'undefined'; - } else if (typeof obj !== 'string') { - return serializeObject(obj, maxDepth); - } - return obj; -} - -/* global angularModule: true, - version: true, - - $CompileProvider, - - htmlAnchorDirective, - inputDirective, - inputDirective, - formDirective, - scriptDirective, - selectDirective, - optionDirective, - ngBindDirective, - ngBindHtmlDirective, - ngBindTemplateDirective, - ngClassDirective, - ngClassEvenDirective, - ngClassOddDirective, - ngCloakDirective, - ngControllerDirective, - ngFormDirective, - ngHideDirective, - ngIfDirective, - ngIncludeDirective, - ngIncludeFillContentDirective, - ngInitDirective, - ngNonBindableDirective, - ngPluralizeDirective, - ngRepeatDirective, - ngShowDirective, - ngStyleDirective, - ngSwitchDirective, - ngSwitchWhenDirective, - ngSwitchDefaultDirective, - ngOptionsDirective, - ngTranscludeDirective, - ngModelDirective, - ngListDirective, - ngChangeDirective, - patternDirective, - patternDirective, - requiredDirective, - requiredDirective, - minlengthDirective, - minlengthDirective, - maxlengthDirective, - maxlengthDirective, - ngValueDirective, - ngModelOptionsDirective, - ngAttributeAliasDirectives, - ngEventDirectives, - - $AnchorScrollProvider, - $AnimateProvider, - $CoreAnimateCssProvider, - $$CoreAnimateJsProvider, - $$CoreAnimateQueueProvider, - $$AnimateRunnerFactoryProvider, - $$AnimateAsyncRunFactoryProvider, - $BrowserProvider, - $CacheFactoryProvider, - $ControllerProvider, - $DateProvider, - $DocumentProvider, - $$IsDocumentHiddenProvider, - $ExceptionHandlerProvider, - $FilterProvider, - $$ForceReflowProvider, - $InterpolateProvider, - $IntervalProvider, - $HttpProvider, - $HttpParamSerializerProvider, - $HttpParamSerializerJQLikeProvider, - $HttpBackendProvider, - $xhrFactoryProvider, - $jsonpCallbacksProvider, - $LocationProvider, - $LogProvider, - $$MapProvider, - $ParseProvider, - $RootScopeProvider, - $QProvider, - $$QProvider, - $$SanitizeUriProvider, - $SceProvider, - $SceDelegateProvider, - $SnifferProvider, - $TemplateCacheProvider, - $TemplateRequestProvider, - $$TestabilityProvider, - $TimeoutProvider, - $$RAFProvider, - $WindowProvider, - $$jqLiteProvider, - $$CookieReaderProvider -*/ - - -/** - * @ngdoc object - * @name angular.version - * @module ng - * @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 = { - // These placeholder strings will be replaced by grunt's `build` task. - // They need to be double- or single-quoted. - full: '1.6.9', - major: 1, - minor: 6, - dot: 9, - codeName: 'fiery-basilisk' -}; - - -function publishExternalAPI(angular) { - extend(angular, { - 'errorHandlingConfig': errorHandlingConfig, - 'bootstrap': bootstrap, - 'copy': copy, - 'extend': extend, - 'merge': merge, - '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}, - 'getTestability': getTestability, - 'reloadWithDebugInfo': reloadWithDebugInfo, - '$$minErr': minErr, - '$$csp': csp, - '$$encodeUriSegment': encodeUriSegment, - '$$encodeUriQuery': encodeUriQuery, - '$$stringify': stringify - }); - - angularModule = setupModuleLoader(window); - - angularModule('ng', ['ngLocale'], ['$provide', - function ngModule($provide) { - // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it. - $provide.provider({ - $$sanitizeUri: $$SanitizeUriProvider - }); - $provide.provider('$compile', $CompileProvider). - directive({ - a: htmlAnchorDirective, - input: inputDirective, - textarea: inputDirective, - form: formDirective, - script: scriptDirective, - select: selectDirective, - option: optionDirective, - ngBind: ngBindDirective, - ngBindHtml: ngBindHtmlDirective, - ngBindTemplate: ngBindTemplateDirective, - ngClass: ngClassDirective, - ngClassEven: ngClassEvenDirective, - ngClassOdd: ngClassOddDirective, - ngCloak: ngCloakDirective, - ngController: ngControllerDirective, - ngForm: ngFormDirective, - ngHide: ngHideDirective, - ngIf: ngIfDirective, - ngInclude: ngIncludeDirective, - ngInit: ngInitDirective, - ngNonBindable: ngNonBindableDirective, - ngPluralize: ngPluralizeDirective, - ngRepeat: ngRepeatDirective, - ngShow: ngShowDirective, - ngStyle: ngStyleDirective, - ngSwitch: ngSwitchDirective, - ngSwitchWhen: ngSwitchWhenDirective, - ngSwitchDefault: ngSwitchDefaultDirective, - ngOptions: ngOptionsDirective, - ngTransclude: ngTranscludeDirective, - ngModel: ngModelDirective, - ngList: ngListDirective, - ngChange: ngChangeDirective, - pattern: patternDirective, - ngPattern: patternDirective, - required: requiredDirective, - ngRequired: requiredDirective, - minlength: minlengthDirective, - ngMinlength: minlengthDirective, - maxlength: maxlengthDirective, - ngMaxlength: maxlengthDirective, - ngValue: ngValueDirective, - ngModelOptions: ngModelOptionsDirective - }). - directive({ - ngInclude: ngIncludeFillContentDirective - }). - directive(ngAttributeAliasDirectives). - directive(ngEventDirectives); - $provide.provider({ - $anchorScroll: $AnchorScrollProvider, - $animate: $AnimateProvider, - $animateCss: $CoreAnimateCssProvider, - $$animateJs: $$CoreAnimateJsProvider, - $$animateQueue: $$CoreAnimateQueueProvider, - $$AnimateRunner: $$AnimateRunnerFactoryProvider, - $$animateAsyncRun: $$AnimateAsyncRunFactoryProvider, - $browser: $BrowserProvider, - $cacheFactory: $CacheFactoryProvider, - $controller: $ControllerProvider, - $document: $DocumentProvider, - $$isDocumentHidden: $$IsDocumentHiddenProvider, - $exceptionHandler: $ExceptionHandlerProvider, - $filter: $FilterProvider, - $$forceReflow: $$ForceReflowProvider, - $interpolate: $InterpolateProvider, - $interval: $IntervalProvider, - $http: $HttpProvider, - $httpParamSerializer: $HttpParamSerializerProvider, - $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider, - $httpBackend: $HttpBackendProvider, - $xhrFactory: $xhrFactoryProvider, - $jsonpCallbacks: $jsonpCallbacksProvider, - $location: $LocationProvider, - $log: $LogProvider, - $parse: $ParseProvider, - $rootScope: $RootScopeProvider, - $q: $QProvider, - $$q: $$QProvider, - $sce: $SceProvider, - $sceDelegate: $SceDelegateProvider, - $sniffer: $SnifferProvider, - $templateCache: $TemplateCacheProvider, - $templateRequest: $TemplateRequestProvider, - $$testability: $$TestabilityProvider, - $timeout: $TimeoutProvider, - $window: $WindowProvider, - $$rAF: $$RAFProvider, - $$jqLite: $$jqLiteProvider, - $$Map: $$MapProvider, - $$cookieReader: $$CookieReaderProvider - }); - } - ]) - .info({ angularVersion: '1.6.9' }); -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Any commits to this file should be reviewed with security in mind. * - * Changes to this file can potentially create security vulnerabilities. * - * An approval from 2 Core members with history of modifying * - * this file is required. * - * * - * Does the change somehow allow for arbitrary javascript to be executed? * - * Or allows for someone to change the prototype of built-in objects? * - * Or gives undesired access to variables likes document or window? * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* global - JQLitePrototype: true, - BOOLEAN_ATTR: true, - ALIASED_ATTR: true -*/ - -////////////////////////////////// -//JQLite -////////////////////////////////// - -/** - * @ngdoc function - * @name angular.element - * @module ng - * @kind function - * - * @description - * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element. - * - * If jQuery is available, `angular.element` is an alias for the - * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element` - * delegates to AngularJS's built-in subset of jQuery, called "jQuery lite" or **jqLite**. - * - * jqLite is a tiny, API-compatible subset of jQuery that allows - * AngularJS to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most - * commonly needed functionality with the goal of having a very small footprint. - * - * To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the - * {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a - * specific version of jQuery if multiple versions exist on the page. - * - *
      **Note:** All element references in AngularJS are always wrapped with jQuery or - * jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.
      - * - *
      **Note:** Keep in mind that this function will not find elements - * by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)` - * or `$document.find()`, or use the standard DOM APIs, e.g. `document.querySelectorAll()`.
      - * - * ## AngularJS's jqLite - * jqLite provides only the following jQuery methods: - * - * - [`addClass()`](http://api.jquery.com/addClass/) - Does not support a function as first argument - * - [`after()`](http://api.jquery.com/after/) - * - [`append()`](http://api.jquery.com/append/) - * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters - * - [`bind()`](http://api.jquery.com/bind/) (_deprecated_, use [`on()`](http://api.jquery.com/on/)) - Does not support namespaces, selectors or eventData - * - [`children()`](http://api.jquery.com/children/) - Does not support selectors - * - [`clone()`](http://api.jquery.com/clone/) - * - [`contents()`](http://api.jquery.com/contents/) - * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. - * As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing. - * - [`data()`](http://api.jquery.com/data/) - * - [`detach()`](http://api.jquery.com/detach/) - * - [`empty()`](http://api.jquery.com/empty/) - * - [`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/) - Does not support selectors - * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData - * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter - * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors - * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors - * - [`prepend()`](http://api.jquery.com/prepend/) - * - [`prop()`](http://api.jquery.com/prop/) - * - [`ready()`](http://api.jquery.com/ready/) (_deprecated_, use `angular.element(callback)` instead of `angular.element(document).ready(callback)`) - * - [`remove()`](http://api.jquery.com/remove/) - * - [`removeAttr()`](http://api.jquery.com/removeAttr/) - Does not support multiple attributes - * - [`removeClass()`](http://api.jquery.com/removeClass/) - Does not support a function as first argument - * - [`removeData()`](http://api.jquery.com/removeData/) - * - [`replaceWith()`](http://api.jquery.com/replaceWith/) - * - [`text()`](http://api.jquery.com/text/) - * - [`toggleClass()`](http://api.jquery.com/toggleClass/) - Does not support a function as first argument - * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers - * - [`unbind()`](http://api.jquery.com/unbind/) (_deprecated_, use [`off()`](http://api.jquery.com/off/)) - Does not support namespaces or event object as parameter - * - [`val()`](http://api.jquery.com/val/) - * - [`wrap()`](http://api.jquery.com/wrap/) - * - * ## jQuery/jqLite Extras - * AngularJS also provides the following additional methods and events to both jQuery and jqLite: - * - * ### Events - * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event - * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM - * element before it is removed. - * - * ### Methods - * - `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 ng.$rootScope.Scope scope} of the current - * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to - * be enabled. - * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the - * current element. This getter should be used only on elements that contain a directive which starts a new isolate - * scope. Calling `scope()` on this element always returns the original non-isolate scope. - * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled. - * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top - * parent element is reached. - * - * @knownIssue You cannot spy on `angular.element` if you are using Jasmine version 1.x. See - * https://github.com/angular/angular.js/issues/14251 for more information. - * - * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery. - * @returns {Object} jQuery object. - */ - -JQLite.expando = 'ng339'; - -var jqCache = JQLite.cache = {}, - jqId = 1; - -/* - * !!! This is an undocumented "private" function !!! - */ -JQLite._data = function(node) { - //jQuery always returns an object on cache miss - return this.cache[node[this.expando]] || {}; -}; - -function jqNextId() { return ++jqId; } - - -var DASH_LOWERCASE_REGEXP = /-([a-z])/g; -var MS_HACK_REGEXP = /^-ms-/; -var MOUSE_EVENT_MAP = { mouseleave: 'mouseout', mouseenter: 'mouseover' }; -var jqLiteMinErr = minErr('jqLite'); - -/** - * Converts kebab-case to camelCase. - * There is also a special case for the ms prefix starting with a lowercase letter. - * @param name Name to normalize - */ -function cssKebabToCamel(name) { - return kebabToCamel(name.replace(MS_HACK_REGEXP, 'ms-')); -} - -function fnCamelCaseReplace(all, letter) { - return letter.toUpperCase(); -} - -/** - * Converts kebab-case to camelCase. - * @param name Name to normalize - */ -function kebabToCamel(name) { - return name - .replace(DASH_LOWERCASE_REGEXP, fnCamelCaseReplace); -} - -var SINGLE_TAG_REGEXP = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/; -var HTML_REGEXP = /<|&#?\w+;/; -var TAG_NAME_REGEXP = /<([\w:-]+)/; -var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi; - -var wrapMap = { - 'option': [1, ''], - - 'thead': [1, '', '
      '], - 'col': [2, '', '
      '], - 'tr': [2, '', '
      '], - 'td': [3, '', '
      '], - '_default': [0, '', ''] -}; - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function jqLiteIsTextNode(html) { - return !HTML_REGEXP.test(html); -} - -function jqLiteAcceptsData(node) { - // The window object can accept data but has no nodeType - // Otherwise we are only interested in elements (1) and documents (9) - var nodeType = node.nodeType; - return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT; -} - -function jqLiteHasData(node) { - for (var key in jqCache[node.ng339]) { - return true; - } - return false; -} - -function jqLiteBuildFragment(html, context) { - var tmp, tag, wrap, - fragment = context.createDocumentFragment(), - nodes = [], i; - - if (jqLiteIsTextNode(html)) { - // Convert non-html into a text node - nodes.push(context.createTextNode(html)); - } else { - // Convert html into DOM nodes - tmp = fragment.appendChild(context.createElement('div')); - tag = (TAG_NAME_REGEXP.exec(html) || ['', ''])[1].toLowerCase(); - wrap = wrapMap[tag] || wrapMap._default; - tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, '<$1>') + wrap[2]; - - // Descend through wrappers to the right content - i = wrap[0]; - while (i--) { - tmp = tmp.lastChild; - } - - nodes = concat(nodes, tmp.childNodes); - - tmp = fragment.firstChild; - tmp.textContent = ''; - } - - // Remove wrapper from fragment - fragment.textContent = ''; - fragment.innerHTML = ''; // Clear inner HTML - forEach(nodes, function(node) { - fragment.appendChild(node); - }); - - return fragment; -} - -function jqLiteParseHTML(html, context) { - context = context || window.document; - var parsed; - - if ((parsed = SINGLE_TAG_REGEXP.exec(html))) { - return [context.createElement(parsed[1])]; - } - - if ((parsed = jqLiteBuildFragment(html, context))) { - return parsed.childNodes; - } - - return []; -} - -function jqLiteWrapNode(node, wrapper) { - var parent = node.parentNode; - - if (parent) { - parent.replaceChild(wrapper, node); - } - - wrapper.appendChild(node); -} - - -// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259. -var jqLiteContains = window.Node.prototype.contains || /** @this */ function(arg) { - // eslint-disable-next-line no-bitwise - return !!(this.compareDocumentPosition(arg) & 16); -}; - -///////////////////////////////////////////// -function JQLite(element) { - if (element instanceof JQLite) { - return element; - } - - var argIsString; - - if (isString(element)) { - element = trim(element); - argIsString = true; - } - if (!(this instanceof JQLite)) { - if (argIsString && element.charAt(0) !== '<') { - throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); - } - return new JQLite(element); - } - - if (argIsString) { - jqLiteAddNodes(this, jqLiteParseHTML(element)); - } else if (isFunction(element)) { - jqLiteReady(element); - } else { - jqLiteAddNodes(this, element); - } -} - -function jqLiteClone(element) { - return element.cloneNode(true); -} - -function jqLiteDealoc(element, onlyDescendants) { - if (!onlyDescendants && jqLiteAcceptsData(element)) jqLite.cleanData([element]); - - if (element.querySelectorAll) { - jqLite.cleanData(element.querySelectorAll('*')); - } -} - -function jqLiteOff(element, type, fn, unsupported) { - if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument'); - - var expandoStore = jqLiteExpandoStore(element); - var events = expandoStore && expandoStore.events; - var handle = expandoStore && expandoStore.handle; - - if (!handle) return; //no listeners registered - - if (!type) { - for (type in events) { - if (type !== '$destroy') { - element.removeEventListener(type, handle); - } - delete events[type]; - } - } else { - - var removeHandler = function(type) { - var listenerFns = events[type]; - if (isDefined(fn)) { - arrayRemove(listenerFns || [], fn); - } - if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) { - element.removeEventListener(type, handle); - delete events[type]; - } - }; - - forEach(type.split(' '), function(type) { - removeHandler(type); - if (MOUSE_EVENT_MAP[type]) { - removeHandler(MOUSE_EVENT_MAP[type]); - } - }); - } -} - -function jqLiteRemoveData(element, name) { - var expandoId = element.ng339; - var expandoStore = expandoId && jqCache[expandoId]; - - if (expandoStore) { - if (name) { - delete expandoStore.data[name]; - return; - } - - if (expandoStore.handle) { - if (expandoStore.events.$destroy) { - expandoStore.handle({}, '$destroy'); - } - jqLiteOff(element); - } - delete jqCache[expandoId]; - element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it - } -} - - -function jqLiteExpandoStore(element, createIfNecessary) { - var expandoId = element.ng339, - expandoStore = expandoId && jqCache[expandoId]; - - if (createIfNecessary && !expandoStore) { - element.ng339 = expandoId = jqNextId(); - expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined}; - } - - return expandoStore; -} - - -function jqLiteData(element, key, value) { - if (jqLiteAcceptsData(element)) { - var prop; - - var isSimpleSetter = isDefined(value); - var isSimpleGetter = !isSimpleSetter && key && !isObject(key); - var massGetter = !key; - var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter); - var data = expandoStore && expandoStore.data; - - if (isSimpleSetter) { // data('key', value) - data[kebabToCamel(key)] = value; - } else { - if (massGetter) { // data() - return data; - } else { - if (isSimpleGetter) { // data('key') - // don't force creation of expandoStore if it doesn't exist yet - return data && data[kebabToCamel(key)]; - } else { // mass-setter: data({key1: val1, key2: val2}) - for (prop in key) { - data[kebabToCamel(prop)] = key[prop]; - } - } - } - } - } -} - -function jqLiteHasClass(element, selector) { - if (!element.getAttribute) return false; - return ((' ' + (element.getAttribute('class') || '') + ' ').replace(/[\n\t]/g, ' '). - indexOf(' ' + selector + ' ') > -1); -} - -function jqLiteRemoveClass(element, cssClasses) { - if (cssClasses && element.setAttribute) { - var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ') - .replace(/[\n\t]/g, ' '); - var newClasses = existingClasses; - - forEach(cssClasses.split(' '), function(cssClass) { - cssClass = trim(cssClass); - newClasses = newClasses.replace(' ' + cssClass + ' ', ' '); - }); - - if (newClasses !== existingClasses) { - element.setAttribute('class', trim(newClasses)); - } - } -} - -function jqLiteAddClass(element, cssClasses) { - if (cssClasses && element.setAttribute) { - var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ') - .replace(/[\n\t]/g, ' '); - var newClasses = existingClasses; - - forEach(cssClasses.split(' '), function(cssClass) { - cssClass = trim(cssClass); - if (newClasses.indexOf(' ' + cssClass + ' ') === -1) { - newClasses += cssClass + ' '; - } - }); - - if (newClasses !== existingClasses) { - element.setAttribute('class', trim(newClasses)); - } - } -} - - -function jqLiteAddNodes(root, elements) { - // THIS CODE IS VERY HOT. Don't make changes without benchmarking. - - if (elements) { - - // if a Node (the most common case) - if (elements.nodeType) { - root[root.length++] = elements; - } else { - var length = elements.length; - - // if an Array or NodeList and not a Window - if (typeof length === 'number' && elements.window !== elements) { - if (length) { - for (var i = 0; i < length; i++) { - root[root.length++] = elements[i]; - } - } - } else { - root[root.length++] = elements; - } - } - } -} - - -function jqLiteController(element, name) { - return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller'); -} - -function jqLiteInheritedData(element, name, value) { - // if element is the document object work with the html element instead - // this makes $(document).scope() possible - if (element.nodeType === NODE_TYPE_DOCUMENT) { - element = element.documentElement; - } - var names = isArray(name) ? name : [name]; - - while (element) { - for (var i = 0, ii = names.length; i < ii; i++) { - if (isDefined(value = jqLite.data(element, names[i]))) return value; - } - - // If dealing with a document fragment node with a host element, and no parent, use the host - // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM - // to lookup parent controllers. - element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host); - } -} - -function jqLiteEmpty(element) { - jqLiteDealoc(element, true); - while (element.firstChild) { - element.removeChild(element.firstChild); - } -} - -function jqLiteRemove(element, keepData) { - if (!keepData) jqLiteDealoc(element); - var parent = element.parentNode; - if (parent) parent.removeChild(element); -} - - -function jqLiteDocumentLoaded(action, win) { - win = win || window; - if (win.document.readyState === 'complete') { - // Force the action to be run async for consistent behavior - // from the action's point of view - // i.e. it will definitely not be in a $apply - win.setTimeout(action); - } else { - // No need to unbind this handler as load is only ever called once - jqLite(win).on('load', action); - } -} - -function jqLiteReady(fn) { - function trigger() { - window.document.removeEventListener('DOMContentLoaded', trigger); - window.removeEventListener('load', trigger); - fn(); - } - - // check if document is already loaded - if (window.document.readyState === 'complete') { - window.setTimeout(fn); - } else { - // We can not use jqLite since we are not done loading and jQuery could be loaded later. - - // Works for modern browsers and IE9 - window.document.addEventListener('DOMContentLoaded', trigger); - - // Fallback to window.onload for others - window.addEventListener('load', trigger); - } -} - -////////////////////////////////////////// -// Functions which are declared directly. -////////////////////////////////////////// -var JQLitePrototype = JQLite.prototype = { - ready: jqLiteReady, - 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,open'.split(','), function(value) { - BOOLEAN_ATTR[lowercase(value)] = value; -}); -var BOOLEAN_ELEMENTS = {}; -forEach('input,select,option,textarea,button,form,details'.split(','), function(value) { - BOOLEAN_ELEMENTS[value] = true; -}); -var ALIASED_ATTR = { - 'ngMinlength': 'minlength', - 'ngMaxlength': 'maxlength', - 'ngMin': 'min', - 'ngMax': 'max', - 'ngPattern': 'pattern', - 'ngStep': 'step' -}; - -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[nodeName_(element)] && booleanAttr; -} - -function getAliasedAttrName(name) { - return ALIASED_ATTR[name]; -} - -forEach({ - data: jqLiteData, - removeData: jqLiteRemoveData, - hasData: jqLiteHasData, - cleanData: function jqLiteCleanData(nodes) { - for (var i = 0, ii = nodes.length; i < ii; i++) { - jqLiteRemoveData(nodes[i]); - } - } -}, function(fn, name) { - JQLite[name] = fn; -}); - -forEach({ - data: jqLiteData, - inheritedData: jqLiteInheritedData, - - scope: function(element) { - // Can't use jqLiteData here directly so we stay compatible with jQuery! - return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']); - }, - - isolateScope: function(element) { - // Can't use jqLiteData here directly so we stay compatible with jQuery! - return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate'); - }, - - controller: jqLiteController, - - injector: function(element) { - return jqLiteInheritedData(element, '$injector'); - }, - - removeAttr: function(element, name) { - element.removeAttribute(name); - }, - - hasClass: jqLiteHasClass, - - css: function(element, name, value) { - name = cssKebabToCamel(name); - - if (isDefined(value)) { - element.style[name] = value; - } else { - return element.style[name]; - } - }, - - attr: function(element, name, value) { - var ret; - var nodeType = element.nodeType; - if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT || - !element.getAttribute) { - return; - } - - var lowercasedName = lowercase(name); - var isBooleanAttr = BOOLEAN_ATTR[lowercasedName]; - - if (isDefined(value)) { - // setter - - if (value === null || (value === false && isBooleanAttr)) { - element.removeAttribute(name); - } else { - element.setAttribute(name, isBooleanAttr ? lowercasedName : value); - } - } else { - // getter - - ret = element.getAttribute(name); - - if (isBooleanAttr && ret !== null) { - ret = lowercasedName; - } - // 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: (function() { - getText.$dv = ''; - return getText; - - function getText(element, value) { - if (isUndefined(value)) { - var nodeType = element.nodeType; - return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : ''; - } - element.textContent = value; - } - })(), - - val: function(element, value) { - if (isUndefined(value)) { - if (element.multiple && nodeName_(element) === 'select') { - var result = []; - forEach(element.options, function(option) { - if (option.selected) { - result.push(option.value || option.text); - } - }); - return result; - } - return element.value; - } - element.value = value; - }, - - html: function(element, value) { - if (isUndefined(value)) { - return element.innerHTML; - } - jqLiteDealoc(element, true); - element.innerHTML = value; - }, - - empty: jqLiteEmpty -}, function(fn, name) { - /** - * Properties: writes return selection, reads return first value - */ - JQLite.prototype[name] = function(arg1, arg2) { - var i, key; - var nodeCount = this.length; - - // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it - // in a way that survives minification. - // jqLiteEmpty takes no arguments but is a setter. - if (fn !== jqLiteEmpty && - (isUndefined((fn.length === 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) { - if (isObject(arg1)) { - - // we are a write, but the object properties are the key/values - for (i = 0; i < nodeCount; 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. - // TODO: do we still need this? - var value = fn.$dv; - // Only if we have $dv do we iterate over all, otherwise it is just the first element. - var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount; - for (var j = 0; j < jj; j++) { - var nodeValue = fn(this[j], arg1, arg2); - value = value ? value + nodeValue : nodeValue; - } - return value; - } - } else { - // we are a write, so apply to all children - for (i = 0; i < nodeCount; i++) { - fn(this[i], arg1, arg2); - } - // return self for chaining - return this; - } - }; -}); - -function createEventHandler(element, events) { - var eventHandler = function(event, type) { - // jQuery specific api - event.isDefaultPrevented = function() { - return event.defaultPrevented; - }; - - var eventFns = events[type || event.type]; - var eventFnsLength = eventFns ? eventFns.length : 0; - - if (!eventFnsLength) return; - - if (isUndefined(event.immediatePropagationStopped)) { - var originalStopImmediatePropagation = event.stopImmediatePropagation; - event.stopImmediatePropagation = function() { - event.immediatePropagationStopped = true; - - if (event.stopPropagation) { - event.stopPropagation(); - } - - if (originalStopImmediatePropagation) { - originalStopImmediatePropagation.call(event); - } - }; - } - - event.isImmediatePropagationStopped = function() { - return event.immediatePropagationStopped === true; - }; - - // Some events have special handlers that wrap the real handler - var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper; - - // Copy event handlers in case event handlers array is modified during execution. - if ((eventFnsLength > 1)) { - eventFns = shallowCopy(eventFns); - } - - for (var i = 0; i < eventFnsLength; i++) { - if (!event.isImmediatePropagationStopped()) { - handlerWrapper(element, event, eventFns[i]); - } - } - }; - - // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all - // events on `element` - eventHandler.elem = element; - return eventHandler; -} - -function defaultHandlerWrapper(element, event, handler) { - handler.call(element, event); -} - -function specialMouseHandlerWrapper(target, event, handler) { - // Refer to jQuery's implementation of mouseenter & mouseleave - // Read about mouseenter and mouseleave: - // http://www.quirksmode.org/js/events_mouse.html#link8 - var related = event.relatedTarget; - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if (!related || (related !== target && !jqLiteContains.call(target, related))) { - handler.call(target, event); - } -} - -////////////////////////////////////////// -// Functions iterating traversal. -// These functions chain results into a single -// selector. -////////////////////////////////////////// -forEach({ - removeData: jqLiteRemoveData, - - on: function jqLiteOn(element, type, fn, unsupported) { - if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters'); - - // Do not add event handlers to non-elements because they will not be cleaned up. - if (!jqLiteAcceptsData(element)) { - return; - } - - var expandoStore = jqLiteExpandoStore(element, true); - var events = expandoStore.events; - var handle = expandoStore.handle; - - if (!handle) { - handle = expandoStore.handle = createEventHandler(element, events); - } - - // http://jsperf.com/string-indexof-vs-split - var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type]; - var i = types.length; - - var addHandler = function(type, specialHandlerWrapper, noEventListener) { - var eventFns = events[type]; - - if (!eventFns) { - eventFns = events[type] = []; - eventFns.specialHandlerWrapper = specialHandlerWrapper; - if (type !== '$destroy' && !noEventListener) { - element.addEventListener(type, handle); - } - } - - eventFns.push(fn); - }; - - while (i--) { - type = types[i]; - if (MOUSE_EVENT_MAP[type]) { - addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper); - addHandler(type, undefined, true); - } else { - addHandler(type); - } - } - }, - - off: jqLiteOff, - - one: function(element, type, fn) { - element = jqLite(element); - - //add the listener twice so that when it is called - //you can remove the original function and still be - //able to call element.off(ev, fn) normally - element.on(type, function onFn() { - element.off(type, fn); - element.off(type, onFn); - }); - element.on(type, fn); - }, - - 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 === NODE_TYPE_ELEMENT) { - children.push(element); - } - }); - return children; - }, - - contents: function(element) { - return element.contentDocument || element.childNodes || []; - }, - - append: function(element, node) { - var nodeType = element.nodeType; - if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return; - - node = new JQLite(node); - - for (var i = 0, ii = node.length; i < ii; i++) { - var child = node[i]; - element.appendChild(child); - } - }, - - prepend: function(element, node) { - if (element.nodeType === NODE_TYPE_ELEMENT) { - var index = element.firstChild; - forEach(new JQLite(node), function(child) { - element.insertBefore(child, index); - }); - } - }, - - wrap: function(element, wrapNode) { - jqLiteWrapNode(element, jqLite(wrapNode).eq(0).clone()[0]); - }, - - remove: jqLiteRemove, - - detach: function(element) { - jqLiteRemove(element, true); - }, - - after: function(element, newElement) { - var index = element, parent = element.parentNode; - - if (parent) { - newElement = new JQLite(newElement); - - for (var i = 0, ii = newElement.length; i < ii; i++) { - var node = newElement[i]; - parent.insertBefore(node, index.nextSibling); - index = node; - } - } - }, - - addClass: jqLiteAddClass, - removeClass: jqLiteRemoveClass, - - toggleClass: function(element, selector, condition) { - if (selector) { - forEach(selector.split(' '), function(className) { - var classCondition = condition; - if (isUndefined(classCondition)) { - classCondition = !jqLiteHasClass(element, className); - } - (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className); - }); - } - }, - - parent: function(element) { - var parent = element.parentNode; - return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null; - }, - - next: function(element) { - return element.nextElementSibling; - }, - - find: function(element, selector) { - if (element.getElementsByTagName) { - return element.getElementsByTagName(selector); - } else { - return []; - } - }, - - clone: jqLiteClone, - - triggerHandler: function(element, event, extraParameters) { - - var dummyEvent, eventFnsCopy, handlerArgs; - var eventName = event.type || event; - var expandoStore = jqLiteExpandoStore(element); - var events = expandoStore && expandoStore.events; - var eventFns = events && events[eventName]; - - if (eventFns) { - // Create a dummy event to pass to the handlers - dummyEvent = { - preventDefault: function() { this.defaultPrevented = true; }, - isDefaultPrevented: function() { return this.defaultPrevented === true; }, - stopImmediatePropagation: function() { this.immediatePropagationStopped = true; }, - isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; }, - stopPropagation: noop, - type: eventName, - target: element - }; - - // If a custom event was provided then extend our dummy event with it - if (event.type) { - dummyEvent = extend(dummyEvent, event); - } - - // Copy event handlers in case event handlers array is modified during execution. - eventFnsCopy = shallowCopy(eventFns); - handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent]; - - forEach(eventFnsCopy, function(fn) { - if (!dummyEvent.isImmediatePropagationStopped()) { - fn.apply(element, handlerArgs); - } - }); - } - } -}, function(fn, name) { - /** - * chaining functions - */ - JQLite.prototype[name] = function(arg1, arg2, arg3) { - var value; - - for (var i = 0, ii = this.length; i < ii; i++) { - if (isUndefined(value)) { - value = fn(this[i], arg1, arg2, arg3); - if (isDefined(value)) { - // any function which returns a value needs to be wrapped - value = jqLite(value); - } - } else { - jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3)); - } - } - return isDefined(value) ? value : this; - }; -}); - -// bind legacy bind/unbind to on/off -JQLite.prototype.bind = JQLite.prototype.on; -JQLite.prototype.unbind = JQLite.prototype.off; - - -// Provider for private $$jqLite service -/** @this */ -function $$jqLiteProvider() { - this.$get = function $$jqLite() { - return extend(JQLite, { - hasClass: function(node, classes) { - if (node.attr) node = node[0]; - return jqLiteHasClass(node, classes); - }, - addClass: function(node, classes) { - if (node.attr) node = node[0]; - return jqLiteAddClass(node, classes); - }, - removeClass: function(node, classes) { - if (node.attr) node = node[0]; - return jqLiteRemoveClass(node, classes); - } - }); - }; -} - -/** - * 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, nextUidFn) { - var key = obj && obj.$$hashKey; - - if (key) { - if (typeof key === 'function') { - key = obj.$$hashKey(); - } - return key; - } - - var objType = typeof obj; - if (objType === 'function' || (objType === 'object' && obj !== null)) { - key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)(); - } else { - key = objType + ':' + obj; - } - - return key; -} - -// A minimal ES2015 Map implementation. -// Should be bug/feature equivalent to the native implementations of supported browsers -// (for the features required in Angular). -// See https://kangax.github.io/compat-table/es6/#test-Map -var nanKey = Object.create(null); -function NgMapShim() { - this._keys = []; - this._values = []; - this._lastKey = NaN; - this._lastIndex = -1; -} -NgMapShim.prototype = { - _idx: function(key) { - if (key === this._lastKey) { - return this._lastIndex; - } - this._lastKey = key; - this._lastIndex = this._keys.indexOf(key); - return this._lastIndex; - }, - _transformKey: function(key) { - return isNumberNaN(key) ? nanKey : key; - }, - get: function(key) { - key = this._transformKey(key); - var idx = this._idx(key); - if (idx !== -1) { - return this._values[idx]; - } - }, - set: function(key, value) { - key = this._transformKey(key); - var idx = this._idx(key); - if (idx === -1) { - idx = this._lastIndex = this._keys.length; - } - this._keys[idx] = key; - this._values[idx] = value; - - // Support: IE11 - // Do not `return this` to simulate the partial IE11 implementation - }, - delete: function(key) { - key = this._transformKey(key); - var idx = this._idx(key); - if (idx === -1) { - return false; - } - this._keys.splice(idx, 1); - this._values.splice(idx, 1); - this._lastKey = NaN; - this._lastIndex = -1; - return true; - } -}; - -// For now, always use `NgMapShim`, even if `window.Map` is available. Some native implementations -// are still buggy (often in subtle ways) and can cause hard-to-debug failures. When native `Map` -// implementations get more stable, we can reconsider switching to `window.Map` (when available). -var NgMap = NgMapShim; - -var $$MapProvider = [/** @this */function() { - this.$get = [function() { - return NgMap; - }]; -}]; - -/** - * @ngdoc function - * @module ng - * @name angular.injector - * @kind function - * - * @description - * Creates an injector object that can be used for retrieving services as well as for - * dependency injection (see {@link guide/di dependency injection}). - * - * @param {Array.} modules A list of module functions or their aliases. See - * {@link angular.module}. The `ng` module must be explicitly added. - * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which - * disallows argument name annotation inference. - * @returns {injector} Injector object. See {@link auto.$injector $injector}. - * - * @example - * Typical usage - * ```js - * // 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(); - * }); - * ``` - * - * Sometimes you want to get access to the injector of a currently running AngularJS app - * from outside AngularJS. Perhaps, you want to inject and compile some markup after the - * application has been bootstrapped. You can do this using the extra `injector()` added - * to JQuery/jqLite elements. See {@link angular.element}. - * - * *This is fairly rare but could be the case if a third party library is injecting the - * markup.* - * - * In the following example a new block of HTML containing a `ng-controller` - * directive is added to the end of the document body by JQuery. We then compile and link - * it into the current AngularJS scope. - * - * ```js - * var $div = $('
      {{content.label}}
      '); - * $(document.body).append($div); - * - * angular.element(document).injector().invoke(function($compile) { - * var scope = angular.element($div).scope(); - * $compile($div)(scope); - * }); - * ``` - */ - - -/** - * @ngdoc module - * @name auto - * @installation - * @description - * - * Implicit module which gets automatically added to each {@link auto.$injector $injector}. - */ - -var ARROW_ARG = /^([^(]+?)=>/; -var FN_ARGS = /^[^(]*\(\s*([^)]*)\)/m; -var FN_ARG_SPLIT = /,/; -var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/; -var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; -var $injectorMinErr = minErr('$injector'); - -function stringifyFn(fn) { - return Function.prototype.toString.call(fn); -} - -function extractArgs(fn) { - var fnText = stringifyFn(fn).replace(STRIP_COMMENTS, ''), - args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS); - return args; -} - -function anonFn(fn) { - // For anonymous functions, showing at the very least the function signature can help in - // debugging. - var args = extractArgs(fn); - if (args) { - return 'function(' + (args[1] || '').replace(/[\s\r\n]+/, ' ') + ')'; - } - return 'fn'; -} - -function annotate(fn, strictDi, name) { - var $inject, - argDecl, - last; - - if (typeof fn === 'function') { - if (!($inject = fn.$inject)) { - $inject = []; - if (fn.length) { - if (strictDi) { - if (!isString(name) || !name) { - name = fn.name || anonFn(fn); - } - throw $injectorMinErr('strictdi', - '{0} is not using explicit annotation and cannot be invoked in strict mode', name); - } - argDecl = extractArgs(fn); - 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 service - * @name $injector - * - * @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: - * - * ```js - * var $injector = angular.injector(); - * expect($injector.get('$injector')).toBe($injector); - * expect($injector.invoke(function($injector) { - * return $injector; - * })).toBe($injector); - * ``` - * - * ## Injection Function Annotation - * - * JavaScript does not have annotations, and annotations are needed for dependency injection. The - * following are all valid ways of annotating function with injection arguments and are equivalent. - * - * ```js - * // inferred (only works if code not minified/obfuscated) - * $injector.invoke(function(serviceA){}); - * - * // annotated - * function explicit(serviceA) {}; - * explicit.$inject = ['serviceA']; - * $injector.invoke(explicit); - * - * // inline - * $injector.invoke(['serviceA', function(serviceA){}]); - * ``` - * - * ### 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. This method of discovering - * annotations is disallowed when the injector is in strict mode. - * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the - * argument names. - * - * ### `$inject` Annotation - * By adding an `$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 property - * @name $injector#modules - * @type {Object} - * @description - * A hash containing all the modules that have been loaded into the - * $injector. - * - * You can use this property to find out information about a module via the - * {@link angular.Module#info `myModule.info(...)`} method. - * - * For example: - * - * ``` - * var info = $injector.modules['ngAnimate'].info(); - * ``` - * - * **Do not use this property to attempt to modify the modules after the application - * has been bootstrapped.** - */ - - -/** - * @ngdoc method - * @name $injector#get - * - * @description - * Return an instance of the service. - * - * @param {string} name The name of the instance to retrieve. - * @param {string=} caller An optional string to provide the origin of the function call for error messages. - * @return {*} The instance. - */ - -/** - * @ngdoc method - * @name $injector#invoke - * - * @description - * Invoke the method and supply the method arguments from the `$injector`. - * - * @param {Function|Array.} fn The injectable function to invoke. Function parameters are - * injected according to the {@link guide/di $inject Annotation} rules. - * @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 $injector#has - * - * @description - * Allows the user to query if the particular service exists. - * - * @param {string} name Name of the service to query. - * @returns {boolean} `true` if injector has given service. - */ - -/** - * @ngdoc method - * @name $injector#instantiate - * @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 $injector#annotate - * - * @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. - * ```js - * // Given - * function MyController($scope, $route) { - * // ... - * } - * - * // Then - * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']); - * ``` - * - * You can disallow this method by using strict injection mode. - * - * This method does not work with code minification / 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. - * ```js - * // Given - * var MyController = function(obfuscatedScope, obfuscatedRoute) { - * // ... - * } - * // Define function dependencies - * MyController['$inject'] = ['$scope', '$route']; - * - * // Then - * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']); - * ``` - * - * #### 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: - * - * ```js - * // 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(tmpFn); - * - * // 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']); - * ``` - * - * @param {Function|Array.} fn Function for which dependent service names need to - * be retrieved as described above. - * - * @param {boolean=} [strictDi=false] Disallow argument name annotation inference. - * - * @returns {Array.} The names of the services which the function requires. - */ -/** - * @ngdoc method - * @name $injector#loadNewModules - * - * @description - * - * **This is a dangerous API, which you use at your own risk!** - * - * Add the specified modules to the current injector. - * - * This method will add each of the injectables to the injector and execute all of the config and run - * blocks for each module passed to the method. - * - * If a module has already been loaded into the injector then it will not be loaded again. - * - * * The application developer is responsible for loading the code containing the modules; and for - * ensuring that lazy scripts are not downloaded and executed more often that desired. - * * Previously compiled HTML will not be affected by newly loaded directives, filters and components. - * * Modules cannot be unloaded. - * - * You can use {@link $injector#modules `$injector.modules`} to check whether a module has been loaded - * into the injector, which may indicate whether the script has been executed already. - * - * @example - * Here is an example of loading a bundle of modules, with a utility method called `getScript`: - * - * ```javascript - * app.factory('loadModule', function($injector) { - * return function loadModule(moduleName, bundleUrl) { - * return getScript(bundleUrl).then(function() { $injector.loadNewModules([moduleName]); }); - * }; - * }) - * ``` - * - * @param {Array=} mods an array of modules to load into the application. - * Each item in the array should be the name of a predefined module or a (DI annotated) - * function that will be invoked by the injector as a `config` block. - * See: {@link angular.module modules} - */ - - -/** - * @ngdoc service - * @name $provide - * - * @description - * - * The {@link auto.$provide $provide} service has a number of methods for registering components - * with the {@link auto.$injector $injector}. Many of these functions are also exposed on - * {@link angular.Module}. - * - * An AngularJS **service** is a singleton object created by a **service factory**. These **service - * factories** are functions which, in turn, are created by a **service provider**. - * The **service providers** are constructor functions. When instantiated they must contain a - * property called `$get`, which holds the **service factory** function. - * - * When you request a service, the {@link auto.$injector $injector} is responsible for finding the - * correct **service provider**, instantiating it and then calling its `$get` **service factory** - * function to get the instance of the **service**. - * - * Often services have no configuration options and there is no need to add methods to the service - * provider. The provider will be no more than a constructor function with a `$get` property. For - * these cases the {@link auto.$provide $provide} service has additional helper methods to register - * services without specifying a provider. - * - * * {@link auto.$provide#provider provider(name, provider)} - registers a **service provider** with the - * {@link auto.$injector $injector} - * * {@link auto.$provide#constant constant(name, obj)} - registers a value/object that can be accessed by - * providers and services. - * * {@link auto.$provide#value value(name, obj)} - registers a value/object that can only be accessed by - * services, not providers. - * * {@link auto.$provide#factory factory(name, fn)} - registers a service **factory function** - * that will be wrapped in a **service provider** object, whose `$get` property will contain the - * given factory function. - * * {@link auto.$provide#service service(name, Fn)} - registers a **constructor function** - * that will be wrapped in a **service provider** object, whose `$get` property will instantiate - * a new object using the given constructor function. - * * {@link auto.$provide#decorator decorator(name, decorFn)} - registers a **decorator function** that - * will be able to modify or replace the implementation of another service. - * - * See the individual methods for more information and examples. - */ - -/** - * @ngdoc method - * @name $provide#provider - * @description - * - * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions - * are constructor functions, whose instances are responsible for "providing" a factory for a - * service. - * - * Service provider names start with the name of the service they provide followed by `Provider`. - * For example, the {@link ng.$log $log} service has a provider called - * {@link ng.$logProvider $logProvider}. - * - * Service provider objects can have additional methods which allow configuration of the provider - * and its service. Importantly, you can configure what kind of service is created by the `$get` - * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a - * method {@link ng.$logProvider#debugEnabled debugEnabled} - * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the - * console or not. - * - * It is possible to inject other providers into the provider function, - * but the injected provider must have been defined before the one that requires it. - * - * @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 - - * @example - * - * The following example shows how to create a simple event tracking service and register it using - * {@link auto.$provide#provider $provide.provider()}. - * - * ```js - * // Define the eventTracker provider - * function EventTrackerProvider() { - * var trackingUrl = '/track'; - * - * // A provider method for configuring where the tracked events should been saved - * this.setTrackingUrl = function(url) { - * trackingUrl = url; - * }; - * - * // The service factory function - * this.$get = ['$http', function($http) { - * var trackedEvents = {}; - * return { - * // Call this to track an event - * event: function(event) { - * var count = trackedEvents[event] || 0; - * count += 1; - * trackedEvents[event] = count; - * return count; - * }, - * // Call this to save the tracked events to the trackingUrl - * save: function() { - * $http.post(trackingUrl, trackedEvents); - * } - * }; - * }]; - * } - * - * describe('eventTracker', function() { - * var postSpy; - * - * beforeEach(module(function($provide) { - * // Register the eventTracker provider - * $provide.provider('eventTracker', EventTrackerProvider); - * })); - * - * beforeEach(module(function(eventTrackerProvider) { - * // Configure eventTracker provider - * eventTrackerProvider.setTrackingUrl('/custom-track'); - * })); - * - * it('tracks events', inject(function(eventTracker) { - * expect(eventTracker.event('login')).toEqual(1); - * expect(eventTracker.event('login')).toEqual(2); - * })); - * - * it('saves to the tracking url', inject(function(eventTracker, $http) { - * postSpy = spyOn($http, 'post'); - * eventTracker.event('login'); - * eventTracker.save(); - * expect(postSpy).toHaveBeenCalled(); - * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track'); - * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track'); - * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 }); - * })); - * }); - * ``` - */ - -/** - * @ngdoc method - * @name $provide#factory - * @description - * - * Register a **service factory**, which will be called to return the service instance. - * This is short for registering a service where its provider consists of only a `$get` property, - * which is the given service factory function. - * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to - * configure your service in a provider. - * - * @param {string} name The name of the instance. - * @param {Function|Array.} $getFn The injectable $getFn for the instance creation. - * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`. - * @returns {Object} registered provider instance - * - * @example - * Here is an example of registering a service - * ```js - * $provide.factory('ping', ['$http', function($http) { - * return function ping() { - * return $http.send('/ping'); - * }; - * }]); - * ``` - * You would then inject and use this service like this: - * ```js - * someModule.controller('Ctrl', ['ping', function(ping) { - * ping(); - * }]); - * ``` - */ - - -/** - * @ngdoc method - * @name $provide#service - * @description - * - * Register a **service constructor**, which will be invoked with `new` to create the service - * instance. - * This is short for registering a service where its provider's `$get` property is a factory - * function that returns an instance instantiated by the injector from the service constructor - * function. - * - * Internally it looks a bit like this: - * - * ``` - * { - * $get: function() { - * return $injector.instantiate(constructor); - * } - * } - * ``` - * - * - * You should use {@link auto.$provide#service $provide.service(class)} if you define your service - * as a type/class. - * - * @param {string} name The name of the instance. - * @param {Function|Array.} constructor An injectable class (constructor function) - * that will be instantiated. - * @returns {Object} registered provider instance - * - * @example - * Here is an example of registering a service using - * {@link auto.$provide#service $provide.service(class)}. - * ```js - * var Ping = function($http) { - * this.$http = $http; - * }; - * - * Ping.$inject = ['$http']; - * - * Ping.prototype.send = function() { - * return this.$http.get('/ping'); - * }; - * $provide.service('ping', Ping); - * ``` - * You would then inject and use this service like this: - * ```js - * someModule.controller('Ctrl', ['ping', function(ping) { - * ping.send(); - * }]); - * ``` - */ - - -/** - * @ngdoc method - * @name $provide#value - * @description - * - * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a - * number, an array, an object or a function. This is short for registering a service where its - * provider's `$get` property is a factory function that takes no arguments and returns the **value - * service**. That also means it is not possible to inject other services into a value service. - * - * Value services are similar to constant services, except that they cannot be injected into a - * module configuration function (see {@link angular.Module#config}) but they can be overridden by - * an AngularJS {@link auto.$provide#decorator decorator}. - * - * @param {string} name The name of the instance. - * @param {*} value The value. - * @returns {Object} registered provider instance - * - * @example - * Here are some examples of creating value services. - * ```js - * $provide.value('ADMIN_USER', 'admin'); - * - * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 }); - * - * $provide.value('halfOf', function(value) { - * return value / 2; - * }); - * ``` - */ - - -/** - * @ngdoc method - * @name $provide#constant - * @description - * - * Register a **constant service** with the {@link auto.$injector $injector}, such as a string, - * a number, an array, an object or a function. Like the {@link auto.$provide#value value}, it is not - * possible to inject other services into a constant. - * - * But unlike {@link auto.$provide#value value}, a constant can be - * injected into a module configuration function (see {@link angular.Module#config}) and it cannot - * be overridden by an AngularJS {@link auto.$provide#decorator decorator}. - * - * @param {string} name The name of the constant. - * @param {*} value The constant value. - * @returns {Object} registered instance - * - * @example - * Here a some examples of creating constants: - * ```js - * $provide.constant('SHARD_HEIGHT', 306); - * - * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']); - * - * $provide.constant('double', function(value) { - * return value * 2; - * }); - * ``` - */ - - -/** - * @ngdoc method - * @name $provide#decorator - * @description - * - * Register a **decorator function** with the {@link auto.$injector $injector}. A decorator function - * intercepts the creation of a service, allowing it to override or modify the behavior of the - * service. The return value of the decorator function may be the original service, or a new service - * that replaces (or wraps and delegates to) the original service. - * - * You can find out more about using decorators in the {@link guide/decorators} guide. - * - * @param {string} name The name of the service to decorate. - * @param {Function|Array.} decorator This function will be invoked when the service needs to be - * provided and should return the decorated service instance. 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 replaced, monkey patched, configured, - * decorated or delegated to. - * - * @example - * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting - * calls to {@link ng.$log#error $log.warn()}. - * ```js - * $provide.decorator('$log', ['$delegate', function($delegate) { - * $delegate.warn = $delegate.error; - * return $delegate; - * }]); - * ``` - */ - - -function createInjector(modulesToLoad, strictDi) { - strictDi = (strictDi === true); - var INSTANTIATING = {}, - providerSuffix = 'Provider', - path = [], - loadedModules = new NgMap(), - providerCache = { - $provide: { - provider: supportObject(provider), - factory: supportObject(factory), - service: supportObject(service), - value: supportObject(value), - constant: supportObject(constant), - decorator: decorator - } - }, - providerInjector = (providerCache.$injector = - createInternalInjector(providerCache, function(serviceName, caller) { - if (angular.isString(caller)) { - path.push(caller); - } - throw $injectorMinErr('unpr', 'Unknown provider: {0}', path.join(' <- ')); - })), - instanceCache = {}, - protoInstanceInjector = - createInternalInjector(instanceCache, function(serviceName, caller) { - var provider = providerInjector.get(serviceName + providerSuffix, caller); - return instanceInjector.invoke( - provider.$get, provider, undefined, serviceName); - }), - instanceInjector = protoInstanceInjector; - - providerCache['$injector' + providerSuffix] = { $get: valueFn(protoInstanceInjector) }; - instanceInjector.modules = providerInjector.modules = createMap(); - var runBlocks = loadModules(modulesToLoad); - instanceInjector = protoInstanceInjector.get('$injector'); - instanceInjector.strictDi = strictDi; - forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); }); - - instanceInjector.loadNewModules = function(mods) { - forEach(loadModules(mods), function(fn) { if (fn) instanceInjector.invoke(fn); }); - }; - - - 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_) { - assertNotHasOwnProperty(name, 'service'); - if (isFunction(provider_) || isArray(provider_)) { - provider_ = providerInjector.instantiate(provider_); - } - if (!provider_.$get) { - throw $injectorMinErr('pget', 'Provider \'{0}\' must define $get factory method.', name); - } - return (providerCache[name + providerSuffix] = provider_); - } - - function enforceReturnValue(name, factory) { - return /** @this */ function enforcedReturnValue() { - var result = instanceInjector.invoke(factory, this); - if (isUndefined(result)) { - throw $injectorMinErr('undef', 'Provider \'{0}\' must return a value from $get factory method.', name); - } - return result; - }; - } - - function factory(name, factoryFn, enforce) { - return provider(name, { - $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn - }); - } - - function service(name, constructor) { - return factory(name, ['$injector', function($injector) { - return $injector.instantiate(constructor); - }]); - } - - function value(name, val) { return factory(name, valueFn(val), false); } - - function constant(name, value) { - assertNotHasOwnProperty(name, 'constant'); - 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) { - assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array'); - var runBlocks = [], moduleFn; - forEach(modulesToLoad, function(module) { - if (loadedModules.get(module)) return; - loadedModules.set(module, true); - - function runInvokeQueue(queue) { - var i, ii; - for (i = 0, ii = queue.length; i < ii; i++) { - var invokeArgs = queue[i], - provider = providerInjector.get(invokeArgs[0]); - - provider[invokeArgs[1]].apply(provider, invokeArgs[2]); - } - } - - try { - if (isString(module)) { - moduleFn = angularModule(module); - instanceInjector.modules[module] = moduleFn; - runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks); - runInvokeQueue(moduleFn._invokeQueue); - runInvokeQueue(moduleFn._configBlocks); - } else if (isFunction(module)) { - runBlocks.push(providerInjector.invoke(module)); - } else if (isArray(module)) { - runBlocks.push(providerInjector.invoke(module)); - } else { - assertArgFn(module, 'module'); - } - } catch (e) { - if (isArray(module)) { - module = module[module.length - 1]; - } - if (e.message && e.stack && e.stack.indexOf(e.message) === -1) { - // Safari & FF's stack traces don't contain error.message content - // unlike those of Chrome and IE - // So if stack doesn't contain message, we create a new string that contains both. - // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here. - // eslint-disable-next-line no-ex-assign - e = e.message + '\n' + e.stack; - } - throw $injectorMinErr('modulerr', 'Failed to instantiate module {0} due to:\n{1}', - module, e.stack || e.message || e); - } - }); - return runBlocks; - } - - //////////////////////////////////// - // internal Injector - //////////////////////////////////// - - function createInternalInjector(cache, factory) { - - function getService(serviceName, caller) { - if (cache.hasOwnProperty(serviceName)) { - if (cache[serviceName] === INSTANTIATING) { - throw $injectorMinErr('cdep', 'Circular dependency found: {0}', - serviceName + ' <- ' + path.join(' <- ')); - } - return cache[serviceName]; - } else { - try { - path.unshift(serviceName); - cache[serviceName] = INSTANTIATING; - cache[serviceName] = factory(serviceName, caller); - return cache[serviceName]; - } catch (err) { - if (cache[serviceName] === INSTANTIATING) { - delete cache[serviceName]; - } - throw err; - } finally { - path.shift(); - } - } - } - - - function injectionArgs(fn, locals, serviceName) { - var args = [], - $inject = createInjector.$$annotate(fn, strictDi, serviceName); - - for (var i = 0, length = $inject.length; i < length; i++) { - var key = $inject[i]; - if (typeof key !== 'string') { - throw $injectorMinErr('itkn', - 'Incorrect injection token! Expected service name as string, got {0}', key); - } - args.push(locals && locals.hasOwnProperty(key) ? locals[key] : - getService(key, serviceName)); - } - return args; - } - - function isClass(func) { - // Support: IE 9-11 only - // IE 9-11 do not support classes and IE9 leaks with the code below. - if (msie || typeof func !== 'function') { - return false; - } - var result = func.$$ngIsClass; - if (!isBoolean(result)) { - // Support: Edge 12-13 only - // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/ - result = func.$$ngIsClass = /^(?:class\b|constructor\()/.test(stringifyFn(func)); - } - return result; - } - - function invoke(fn, self, locals, serviceName) { - if (typeof locals === 'string') { - serviceName = locals; - locals = null; - } - - var args = injectionArgs(fn, locals, serviceName); - if (isArray(fn)) { - fn = fn[fn.length - 1]; - } - - if (!isClass(fn)) { - // http://jsperf.com/angularjs-invoke-apply-vs-switch - // #5388 - return fn.apply(self, args); - } else { - args.unshift(null); - return new (Function.prototype.bind.apply(fn, args))(); - } - } - - - function instantiate(Type, locals, serviceName) { - // Check if Type is annotated and use just the given function at n-1 as parameter - // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]); - var ctor = (isArray(Type) ? Type[Type.length - 1] : Type); - var args = injectionArgs(Type, locals, serviceName); - // Empty object at position 0 is ignored for invocation with `new`, but required. - args.unshift(null); - return new (Function.prototype.bind.apply(ctor, args))(); - } - - - return { - invoke: invoke, - instantiate: instantiate, - get: getService, - annotate: createInjector.$$annotate, - has: function(name) { - return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name); - } - }; - } -} - -createInjector.$$annotate = annotate; - -/** - * @ngdoc provider - * @name $anchorScrollProvider - * @this - * - * @description - * Use `$anchorScrollProvider` to disable automatic scrolling whenever - * {@link ng.$location#hash $location.hash()} changes. - */ -function $AnchorScrollProvider() { - - var autoScrollingEnabled = true; - - /** - * @ngdoc method - * @name $anchorScrollProvider#disableAutoScrolling - * - * @description - * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to - * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.
      - * Use this method to disable automatic scrolling. - * - * If automatic scrolling is disabled, one must explicitly call - * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the - * current hash. - */ - this.disableAutoScrolling = function() { - autoScrollingEnabled = false; - }; - - /** - * @ngdoc service - * @name $anchorScroll - * @kind function - * @requires $window - * @requires $location - * @requires $rootScope - * - * @description - * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the - * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified - * in the - * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#an-indicated-part-of-the-document). - * - * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to - * match any anchor whenever it changes. This can be disabled by calling - * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}. - * - * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a - * vertical scroll-offset (either fixed or dynamic). - * - * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of - * {@link ng.$location#hash $location.hash()} will be used. - * - * @property {(number|function|jqLite)} yOffset - * If set, specifies a vertical scroll-offset. This is often useful when there are fixed - * positioned elements at the top of the page, such as navbars, headers etc. - * - * `yOffset` can be specified in various ways: - * - **number**: A fixed number of pixels to be used as offset.

      - * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return - * a number representing the offset (in pixels).

      - * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from - * the top of the page to the element's bottom will be used as offset.
      - * **Note**: The element will be taken into account only as long as its `position` is set to - * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust - * their height and/or positioning according to the viewport's size. - * - *
      - *
      - * In order for `yOffset` to work properly, scrolling should take place on the document's root and - * not some child element. - *
      - * - * @example - - -
      - Go to bottom - You're at the bottom! -
      -
      - - angular.module('anchorScrollExample', []) - .controller('ScrollController', ['$scope', '$location', '$anchorScroll', - function($scope, $location, $anchorScroll) { - $scope.gotoBottom = function() { - // set the location.hash to the id of - // the element you wish to scroll to. - $location.hash('bottom'); - - // call $anchorScroll() - $anchorScroll(); - }; - }]); - - - #scrollArea { - height: 280px; - overflow: auto; - } - - #bottom { - display: block; - margin-top: 2000px; - } - -
      - * - *
      - * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value). - * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details. - * - * @example - - - -
      - Anchor {{x}} of 5 -
      -
      - - angular.module('anchorScrollOffsetExample', []) - .run(['$anchorScroll', function($anchorScroll) { - $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels - }]) - .controller('headerCtrl', ['$anchorScroll', '$location', '$scope', - function($anchorScroll, $location, $scope) { - $scope.gotoAnchor = function(x) { - var newHash = 'anchor' + x; - if ($location.hash() !== newHash) { - // set the $location.hash to `newHash` and - // $anchorScroll will automatically scroll to it - $location.hash('anchor' + x); - } else { - // call $anchorScroll() explicitly, - // since $location.hash hasn't changed - $anchorScroll(); - } - }; - } - ]); - - - body { - padding-top: 50px; - } - - .anchor { - border: 2px dashed DarkOrchid; - padding: 10px 10px 200px 10px; - } - - .fixed-header { - background-color: rgba(0, 0, 0, 0.2); - height: 50px; - position: fixed; - top: 0; left: 0; right: 0; - } - - .fixed-header > a { - display: inline-block; - margin: 5px 15px; - } - -
      - */ - this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) { - var document = $window.document; - - // Helper function to get first anchor from a NodeList - // (using `Array#some()` instead of `angular#forEach()` since it's more performant - // and working in all supported browsers.) - function getFirstAnchor(list) { - var result = null; - Array.prototype.some.call(list, function(element) { - if (nodeName_(element) === 'a') { - result = element; - return true; - } - }); - return result; - } - - function getYOffset() { - - var offset = scroll.yOffset; - - if (isFunction(offset)) { - offset = offset(); - } else if (isElement(offset)) { - var elem = offset[0]; - var style = $window.getComputedStyle(elem); - if (style.position !== 'fixed') { - offset = 0; - } else { - offset = elem.getBoundingClientRect().bottom; - } - } else if (!isNumber(offset)) { - offset = 0; - } - - return offset; - } - - function scrollTo(elem) { - if (elem) { - elem.scrollIntoView(); - - var offset = getYOffset(); - - if (offset) { - // `offset` is the number of pixels we should scroll UP in order to align `elem` properly. - // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the - // top of the viewport. - // - // IF the number of pixels from the top of `elem` to the end of the page's content is less - // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some - // way down the page. - // - // This is often the case for elements near the bottom of the page. - // - // In such cases we do not need to scroll the whole `offset` up, just the difference between - // the top of the element and the offset, which is enough to align the top of `elem` at the - // desired position. - var elemTop = elem.getBoundingClientRect().top; - $window.scrollBy(0, elemTop - offset); - } - } else { - $window.scrollTo(0, 0); - } - } - - function scroll(hash) { - // Allow numeric hashes - hash = isString(hash) ? hash : isNumber(hash) ? hash.toString() : $location.hash(); - var elm; - - // empty hash, scroll to the top of the page - if (!hash) scrollTo(null); - - // element with given id - else if ((elm = document.getElementById(hash))) scrollTo(elm); - - // first anchor with given name :-D - else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm); - - // no element and hash === 'top', scroll to the top of the page - else if (hash === 'top') scrollTo(null); - } - - // does not scroll when user clicks on anchor link that is currently on - // (no url change, no $location.hash() change), browser native does scroll - if (autoScrollingEnabled) { - $rootScope.$watch(function autoScrollWatch() {return $location.hash();}, - function autoScrollWatchAction(newVal, oldVal) { - // skip the initial scroll if $location.hash is empty - if (newVal === oldVal && newVal === '') return; - - jqLiteDocumentLoaded(function() { - $rootScope.$evalAsync(scroll); - }); - }); - } - - return scroll; - }]; -} - -var $animateMinErr = minErr('$animate'); -var ELEMENT_NODE = 1; -var NG_ANIMATE_CLASSNAME = 'ng-animate'; - -function mergeClasses(a,b) { - if (!a && !b) return ''; - if (!a) return b; - if (!b) return a; - if (isArray(a)) a = a.join(' '); - if (isArray(b)) b = b.join(' '); - return a + ' ' + b; -} - -function extractElementNode(element) { - for (var i = 0; i < element.length; i++) { - var elm = element[i]; - if (elm.nodeType === ELEMENT_NODE) { - return elm; - } - } -} - -function splitClasses(classes) { - if (isString(classes)) { - classes = classes.split(' '); - } - - // Use createMap() to prevent class assumptions involving property names in - // Object.prototype - var obj = createMap(); - forEach(classes, function(klass) { - // sometimes the split leaves empty string values - // incase extra spaces were applied to the options - if (klass.length) { - obj[klass] = true; - } - }); - return obj; -} - -// if any other type of options value besides an Object value is -// passed into the $animate.method() animation then this helper code -// will be run which will ignore it. While this patch is not the -// greatest solution to this, a lot of existing plugins depend on -// $animate to either call the callback (< 1.2) or return a promise -// that can be changed. This helper function ensures that the options -// are wiped clean incase a callback function is provided. -function prepareAnimateOptions(options) { - return isObject(options) - ? options - : {}; -} - -var $$CoreAnimateJsProvider = /** @this */ function() { - this.$get = noop; -}; - -// this is prefixed with Core since it conflicts with -// the animateQueueProvider defined in ngAnimate/animateQueue.js -var $$CoreAnimateQueueProvider = /** @this */ function() { - var postDigestQueue = new NgMap(); - var postDigestElements = []; - - this.$get = ['$$AnimateRunner', '$rootScope', - function($$AnimateRunner, $rootScope) { - return { - enabled: noop, - on: noop, - off: noop, - pin: noop, - - push: function(element, event, options, domOperation) { - if (domOperation) { - domOperation(); - } - - options = options || {}; - if (options.from) { - element.css(options.from); - } - if (options.to) { - element.css(options.to); - } - - if (options.addClass || options.removeClass) { - addRemoveClassesPostDigest(element, options.addClass, options.removeClass); - } - - var runner = new $$AnimateRunner(); - - // since there are no animations to run the runner needs to be - // notified that the animation call is complete. - runner.complete(); - return runner; - } - }; - - - function updateData(data, classes, value) { - var changed = false; - if (classes) { - classes = isString(classes) ? classes.split(' ') : - isArray(classes) ? classes : []; - forEach(classes, function(className) { - if (className) { - changed = true; - data[className] = value; - } - }); - } - return changed; - } - - function handleCSSClassChanges() { - forEach(postDigestElements, function(element) { - var data = postDigestQueue.get(element); - if (data) { - var existing = splitClasses(element.attr('class')); - var toAdd = ''; - var toRemove = ''; - forEach(data, function(status, className) { - var hasClass = !!existing[className]; - if (status !== hasClass) { - if (status) { - toAdd += (toAdd.length ? ' ' : '') + className; - } else { - toRemove += (toRemove.length ? ' ' : '') + className; - } - } - }); - - forEach(element, function(elm) { - if (toAdd) { - jqLiteAddClass(elm, toAdd); - } - if (toRemove) { - jqLiteRemoveClass(elm, toRemove); - } - }); - postDigestQueue.delete(element); - } - }); - postDigestElements.length = 0; - } - - - function addRemoveClassesPostDigest(element, add, remove) { - var data = postDigestQueue.get(element) || {}; - - var classesAdded = updateData(data, add, true); - var classesRemoved = updateData(data, remove, false); - - if (classesAdded || classesRemoved) { - - postDigestQueue.set(element, data); - postDigestElements.push(element); - - if (postDigestElements.length === 1) { - $rootScope.$$postDigest(handleCSSClassChanges); - } - } - } - }]; -}; - -/** - * @ngdoc provider - * @name $animateProvider - * - * @description - * Default implementation of $animate that doesn't perform any animations, instead just - * synchronously performs DOM updates and resolves the returned runner promise. - * - * In order to enable animations the `ngAnimate` module has to be loaded. - * - * To see the functional implementation check out `src/ngAnimate/animate.js`. - */ -var $AnimateProvider = ['$provide', /** @this */ function($provide) { - var provider = this; - var classNameFilter = null; - var customFilter = null; - - this.$$registeredAnimations = Object.create(null); - - /** - * @ngdoc method - * @name $animateProvider#register - * - * @description - * Registers a new injectable animation factory function. The factory function produces the - * animation object which contains callback functions for each event that is expected to be - * animated. - * - * * `eventFn`: `function(element, ... , doneFunction, options)` - * The element to animate, the `doneFunction` and the options fed into the animation. Depending - * on the type of animation additional arguments will be injected into the animation function. The - * list below explains the function signatures for the different animation methods: - * - * - setClass: function(element, addedClasses, removedClasses, doneFunction, options) - * - addClass: function(element, addedClasses, doneFunction, options) - * - removeClass: function(element, removedClasses, doneFunction, options) - * - enter, leave, move: function(element, doneFunction, options) - * - animate: function(element, fromStyles, toStyles, doneFunction, options) - * - * Make sure to trigger the `doneFunction` once the animation is fully complete. - * - * ```js - * return { - * //enter, leave, move signature - * eventFn : function(element, done, options) { - * //code to run the animation - * //once complete, then run done() - * return function endFunction(wasCancelled) { - * //code to cancel the animation - * } - * } - * } - * ``` - * - * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to). - * @param {Function} factory The factory function that will be executed to return the animation - * object. - */ - this.register = function(name, factory) { - if (name && name.charAt(0) !== '.') { - throw $animateMinErr('notcsel', 'Expecting class selector starting with \'.\' got \'{0}\'.', name); - } - - var key = name + '-animation'; - provider.$$registeredAnimations[name.substr(1)] = key; - $provide.factory(key, factory); - }; - - /** - * @ngdoc method - * @name $animateProvider#customFilter - * - * @description - * Sets and/or returns the custom filter function that is used to "filter" animations, i.e. - * determine if an animation is allowed or not. When no filter is specified (the default), no - * animation will be blocked. Setting the `customFilter` value will only allow animations for - * which the filter function's return value is truthy. - * - * This allows to easily create arbitrarily complex rules for filtering animations, such as - * allowing specific events only, or enabling animations on specific subtrees of the DOM, etc. - * Filtering animations can also boost performance for low-powered devices, as well as - * applications containing a lot of structural operations. - * - *
      - * **Best Practice:** - * Keep the filtering function as lean as possible, because it will be called for each DOM - * action (e.g. insertion, removal, class change) performed by "animation-aware" directives. - * See {@link guide/animations#which-directives-support-animations- here} for a list of built-in - * directives that support animations. - * Performing computationally expensive or time-consuming operations on each call of the - * filtering function can make your animations sluggish. - *
      - * - * **Note:** If present, `customFilter` will be checked before - * {@link $animateProvider#classNameFilter classNameFilter}. - * - * @param {Function=} filterFn - The filter function which will be used to filter all animations. - * If a falsy value is returned, no animation will be performed. The function will be called - * with the following arguments: - * - **node** `{DOMElement}` - The DOM element to be animated. - * - **event** `{String}` - The name of the animation event (e.g. `enter`, `leave`, `addClass` - * etc). - * - **options** `{Object}` - A collection of options/styles used for the animation. - * @return {Function} The current filter function or `null` if there is none set. - */ - this.customFilter = function(filterFn) { - if (arguments.length === 1) { - customFilter = isFunction(filterFn) ? filterFn : null; - } - - return customFilter; - }; - - /** - * @ngdoc method - * @name $animateProvider#classNameFilter - * - * @description - * Sets and/or returns the CSS class regular expression that is checked when performing - * an animation. Upon bootstrap the classNameFilter value is not set at all and will - * therefore enable $animate to attempt to perform an animation on any element that is triggered. - * When setting the `classNameFilter` value, animations will only be performed on elements - * that successfully match the filter expression. This in turn can boost performance - * for low-powered devices as well as applications containing a lot of structural operations. - * - * **Note:** If present, `classNameFilter` will be checked after - * {@link $animateProvider#customFilter customFilter}. If `customFilter` is present and returns - * false, `classNameFilter` will not be checked. - * - * @param {RegExp=} expression The className expression which will be checked against all animations - * @return {RegExp} The current CSS className expression value. If null then there is no expression value - */ - this.classNameFilter = function(expression) { - if (arguments.length === 1) { - classNameFilter = (expression instanceof RegExp) ? expression : null; - if (classNameFilter) { - var reservedRegex = new RegExp('[(\\s|\\/)]' + NG_ANIMATE_CLASSNAME + '[(\\s|\\/)]'); - if (reservedRegex.test(classNameFilter.toString())) { - classNameFilter = null; - throw $animateMinErr('nongcls', '$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', NG_ANIMATE_CLASSNAME); - } - } - } - return classNameFilter; - }; - - this.$get = ['$$animateQueue', function($$animateQueue) { - function domInsert(element, parentElement, afterElement) { - // if for some reason the previous element was removed - // from the dom sometime before this code runs then let's - // just stick to using the parent element as the anchor - if (afterElement) { - var afterNode = extractElementNode(afterElement); - if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) { - afterElement = null; - } - } - if (afterElement) { - afterElement.after(element); - } else { - parentElement.prepend(element); - } - } - - /** - * @ngdoc service - * @name $animate - * @description The $animate service exposes a series of DOM utility methods that provide support - * for animation hooks. The default behavior is the application of DOM operations, however, - * when an animation is detected (and animations are enabled), $animate will do the heavy lifting - * to ensure that animation runs with the triggered DOM operation. - * - * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't - * included and only when it is active then the animation hooks that `$animate` triggers will be - * functional. Once active then all structural `ng-` directives will trigger animations as they perform - * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`, - * `ngShow`, `ngHide` and `ngMessages` also provide support for animations. - * - * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives. - * - * To learn more about enabling animation support, click here to visit the - * {@link ngAnimate ngAnimate module page}. - */ - return { - // we don't call it directly since non-existant arguments may - // be interpreted as null within the sub enabled function - - /** - * - * @ngdoc method - * @name $animate#on - * @kind function - * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) - * has fired on the given element or among any of its children. Once the listener is fired, the provided callback - * is fired with the following params: - * - * ```js - * $animate.on('enter', container, - * function callback(element, phase) { - * // cool we detected an enter animation within the container - * } - * ); - * ``` - * - * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...) - * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself - * as well as among its children - * @param {Function} callback the callback function that will be fired when the listener is triggered - * - * The arguments present in the callback function are: - * * `element` - The captured DOM element that the animation was fired on. - * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends). - */ - on: $$animateQueue.on, - - /** - * - * @ngdoc method - * @name $animate#off - * @kind function - * @description Deregisters an event listener based on the event which has been associated with the provided element. This method - * can be used in three different ways depending on the arguments: - * - * ```js - * // remove all the animation event listeners listening for `enter` - * $animate.off('enter'); - * - * // remove listeners for all animation events from the container element - * $animate.off(container); - * - * // remove all the animation event listeners listening for `enter` on the given element and its children - * $animate.off('enter', container); - * - * // remove the event listener function provided by `callback` that is set - * // to listen for `enter` on the given `container` as well as its children - * $animate.off('enter', container, callback); - * ``` - * - * @param {string|DOMElement} event|container the animation event (e.g. enter, leave, move, - * addClass, removeClass, etc...), or the container element. If it is the element, all other - * arguments are ignored. - * @param {DOMElement=} container the container element the event listener was placed on - * @param {Function=} callback the callback function that was registered as the listener - */ - off: $$animateQueue.off, - - /** - * @ngdoc method - * @name $animate#pin - * @kind function - * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists - * outside of the DOM structure of the AngularJS application. By doing so, any animation triggered via `$animate` can be issued on the - * element despite being outside the realm of the application or within another application. Say for example if the application - * was bootstrapped on an element that is somewhere inside of the `` tag, but we wanted to allow for an element to be situated - * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind - * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association. - * - * Note that this feature is only active when the `ngAnimate` module is used. - * - * @param {DOMElement} element the external element that will be pinned - * @param {DOMElement} parentElement the host parent element that will be associated with the external element - */ - pin: $$animateQueue.pin, - - /** - * - * @ngdoc method - * @name $animate#enabled - * @kind function - * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This - * function can be called in four ways: - * - * ```js - * // returns true or false - * $animate.enabled(); - * - * // changes the enabled state for all animations - * $animate.enabled(false); - * $animate.enabled(true); - * - * // returns true or false if animations are enabled for an element - * $animate.enabled(element); - * - * // changes the enabled state for an element and its children - * $animate.enabled(element, true); - * $animate.enabled(element, false); - * ``` - * - * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state - * @param {boolean=} enabled whether or not the animations will be enabled for the element - * - * @return {boolean} whether or not animations are enabled - */ - enabled: $$animateQueue.enabled, - - /** - * @ngdoc method - * @name $animate#cancel - * @kind function - * @description Cancels the provided animation. - * - * @param {Promise} animationPromise The animation promise that is returned when an animation is started. - */ - cancel: function(runner) { - if (runner.end) { - runner.end(); - } - }, - - /** - * - * @ngdoc method - * @name $animate#enter - * @kind function - * @description Inserts the element into the DOM either after the `after` element (if provided) or - * as the first child within the `parent` element and then triggers an animation. - * A promise is returned that will be resolved during the next digest once the animation - * has completed. - * - * @param {DOMElement} element the element which will be inserted into the DOM - * @param {DOMElement} parent the parent element which will append the element as - * a child (so long as the after element is not present) - * @param {DOMElement=} after the sibling element after which the element will be appended - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - enter: function(element, parent, after, options) { - parent = parent && jqLite(parent); - after = after && jqLite(after); - parent = parent || after.parent(); - domInsert(element, parent, after); - return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options)); - }, - - /** - * - * @ngdoc method - * @name $animate#move - * @kind function - * @description Inserts (moves) the element into its new position in the DOM either after - * the `after` element (if provided) or as the first child within the `parent` element - * and then triggers an animation. A promise is returned that will be resolved - * during the next digest once the animation has completed. - * - * @param {DOMElement} element the element which will be moved into the new DOM position - * @param {DOMElement} parent the parent element which will append the element as - * a child (so long as the after element is not present) - * @param {DOMElement=} after the sibling element after which the element will be appended - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - move: function(element, parent, after, options) { - parent = parent && jqLite(parent); - after = after && jqLite(after); - parent = parent || after.parent(); - domInsert(element, parent, after); - return $$animateQueue.push(element, 'move', prepareAnimateOptions(options)); - }, - - /** - * @ngdoc method - * @name $animate#leave - * @kind function - * @description Triggers an animation and then removes the element from the DOM. - * When the function is called a promise is returned that will be resolved during the next - * digest once the animation has completed. - * - * @param {DOMElement} element the element which will be removed from the DOM - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - leave: function(element, options) { - return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() { - element.remove(); - }); - }, - - /** - * @ngdoc method - * @name $animate#addClass - * @kind function - * - * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon - * execution, the addClass operation will only be handled after the next digest and it will not trigger an - * animation if element already contains the CSS class or if the class is removed at a later step. - * Note that class-based animations are treated differently compared to structural animations - * (like enter, move and leave) since the CSS classes may be added/removed at different points - * depending if CSS or JavaScript animations are used. - * - * @param {DOMElement} element the element which the CSS classes will be applied to - * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces) - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - addClass: function(element, className, options) { - options = prepareAnimateOptions(options); - options.addClass = mergeClasses(options.addclass, className); - return $$animateQueue.push(element, 'addClass', options); - }, - - /** - * @ngdoc method - * @name $animate#removeClass - * @kind function - * - * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon - * execution, the removeClass operation will only be handled after the next digest and it will not trigger an - * animation if element does not contain the CSS class or if the class is added at a later step. - * Note that class-based animations are treated differently compared to structural animations - * (like enter, move and leave) since the CSS classes may be added/removed at different points - * depending if CSS or JavaScript animations are used. - * - * @param {DOMElement} element the element which the CSS classes will be applied to - * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces) - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - removeClass: function(element, className, options) { - options = prepareAnimateOptions(options); - options.removeClass = mergeClasses(options.removeClass, className); - return $$animateQueue.push(element, 'removeClass', options); - }, - - /** - * @ngdoc method - * @name $animate#setClass - * @kind function - * - * @description Performs both the addition and removal of a CSS classes on an element and (during the process) - * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and - * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has - * passed. Note that class-based animations are treated differently compared to structural animations - * (like enter, move and leave) since the CSS classes may be added/removed at different points - * depending if CSS or JavaScript animations are used. - * - * @param {DOMElement} element the element which the CSS classes will be applied to - * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces) - * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces) - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - setClass: function(element, add, remove, options) { - options = prepareAnimateOptions(options); - options.addClass = mergeClasses(options.addClass, add); - options.removeClass = mergeClasses(options.removeClass, remove); - return $$animateQueue.push(element, 'setClass', options); - }, - - /** - * @ngdoc method - * @name $animate#animate - * @kind function - * - * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element. - * If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take - * on the provided styles. For example, if a transition animation is set for the given className, then the provided `from` and - * `to` styles will be applied alongside the given transition. If the CSS style provided in `from` does not have a corresponding - * style in `to`, the style in `from` is applied immediately, and no animation is run. - * If a JavaScript animation is detected then the provided styles will be given in as function parameters into the `animate` - * method (or as part of the `options` parameter): - * - * ```js - * ngModule.animation('.my-inline-animation', function() { - * return { - * animate : function(element, from, to, done, options) { - * //animation - * done(); - * } - * } - * }); - * ``` - * - * @param {DOMElement} element the element which the CSS styles will be applied to - * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation. - * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation. - * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If - * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element. - * (Note that if no animation is detected then this value will not be applied to the element.) - * @param {object=} options an optional collection of options/styles that will be applied to the element. - * The object can have the following properties: - * - * - **addClass** - `{string}` - space-separated CSS classes to add to element - * - **from** - `{Object}` - CSS properties & values at the beginning of animation. Must have matching `to` - * - **removeClass** - `{string}` - space-separated CSS classes to remove from element - * - **to** - `{Object}` - CSS properties & values at end of animation. Must have matching `from` - * - * @return {Promise} the animation callback promise - */ - animate: function(element, from, to, className, options) { - options = prepareAnimateOptions(options); - options.from = options.from ? extend(options.from, from) : from; - options.to = options.to ? extend(options.to, to) : to; - - className = className || 'ng-inline-animate'; - options.tempClasses = mergeClasses(options.tempClasses, className); - return $$animateQueue.push(element, 'animate', options); - } - }; - }]; -}]; - -var $$AnimateAsyncRunFactoryProvider = /** @this */ function() { - this.$get = ['$$rAF', function($$rAF) { - var waitQueue = []; - - function waitForTick(fn) { - waitQueue.push(fn); - if (waitQueue.length > 1) return; - $$rAF(function() { - for (var i = 0; i < waitQueue.length; i++) { - waitQueue[i](); - } - waitQueue = []; - }); - } - - return function() { - var passed = false; - waitForTick(function() { - passed = true; - }); - return function(callback) { - if (passed) { - callback(); - } else { - waitForTick(callback); - } - }; - }; - }]; -}; - -var $$AnimateRunnerFactoryProvider = /** @this */ function() { - this.$get = ['$q', '$sniffer', '$$animateAsyncRun', '$$isDocumentHidden', '$timeout', - function($q, $sniffer, $$animateAsyncRun, $$isDocumentHidden, $timeout) { - - var INITIAL_STATE = 0; - var DONE_PENDING_STATE = 1; - var DONE_COMPLETE_STATE = 2; - - AnimateRunner.chain = function(chain, callback) { - var index = 0; - - next(); - function next() { - if (index === chain.length) { - callback(true); - return; - } - - chain[index](function(response) { - if (response === false) { - callback(false); - return; - } - index++; - next(); - }); - } - }; - - AnimateRunner.all = function(runners, callback) { - var count = 0; - var status = true; - forEach(runners, function(runner) { - runner.done(onProgress); - }); - - function onProgress(response) { - status = status && response; - if (++count === runners.length) { - callback(status); - } - } - }; - - function AnimateRunner(host) { - this.setHost(host); - - var rafTick = $$animateAsyncRun(); - var timeoutTick = function(fn) { - $timeout(fn, 0, false); - }; - - this._doneCallbacks = []; - this._tick = function(fn) { - if ($$isDocumentHidden()) { - timeoutTick(fn); - } else { - rafTick(fn); - } - }; - this._state = 0; - } - - AnimateRunner.prototype = { - setHost: function(host) { - this.host = host || {}; - }, - - done: function(fn) { - if (this._state === DONE_COMPLETE_STATE) { - fn(); - } else { - this._doneCallbacks.push(fn); - } - }, - - progress: noop, - - getPromise: function() { - if (!this.promise) { - var self = this; - this.promise = $q(function(resolve, reject) { - self.done(function(status) { - if (status === false) { - reject(); - } else { - resolve(); - } - }); - }); - } - return this.promise; - }, - - then: function(resolveHandler, rejectHandler) { - return this.getPromise().then(resolveHandler, rejectHandler); - }, - - 'catch': function(handler) { - return this.getPromise()['catch'](handler); - }, - - 'finally': function(handler) { - return this.getPromise()['finally'](handler); - }, - - pause: function() { - if (this.host.pause) { - this.host.pause(); - } - }, - - resume: function() { - if (this.host.resume) { - this.host.resume(); - } - }, - - end: function() { - if (this.host.end) { - this.host.end(); - } - this._resolve(true); - }, - - cancel: function() { - if (this.host.cancel) { - this.host.cancel(); - } - this._resolve(false); - }, - - complete: function(response) { - var self = this; - if (self._state === INITIAL_STATE) { - self._state = DONE_PENDING_STATE; - self._tick(function() { - self._resolve(response); - }); - } - }, - - _resolve: function(response) { - if (this._state !== DONE_COMPLETE_STATE) { - forEach(this._doneCallbacks, function(fn) { - fn(response); - }); - this._doneCallbacks.length = 0; - this._state = DONE_COMPLETE_STATE; - } - } - }; - - return AnimateRunner; - }]; -}; - -/* exported $CoreAnimateCssProvider */ - -/** - * @ngdoc service - * @name $animateCss - * @kind object - * @this - * - * @description - * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included, - * then the `$animateCss` service will actually perform animations. - * - * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}. - */ -var $CoreAnimateCssProvider = function() { - this.$get = ['$$rAF', '$q', '$$AnimateRunner', function($$rAF, $q, $$AnimateRunner) { - - return function(element, initialOptions) { - // all of the animation functions should create - // a copy of the options data, however, if a - // parent service has already created a copy then - // we should stick to using that - var options = initialOptions || {}; - if (!options.$$prepared) { - options = copy(options); - } - - // there is no point in applying the styles since - // there is no animation that goes on at all in - // this version of $animateCss. - if (options.cleanupStyles) { - options.from = options.to = null; - } - - if (options.from) { - element.css(options.from); - options.from = null; - } - - var closed, runner = new $$AnimateRunner(); - return { - start: run, - end: run - }; - - function run() { - $$rAF(function() { - applyAnimationContents(); - if (!closed) { - runner.complete(); - } - closed = true; - }); - return runner; - } - - function applyAnimationContents() { - if (options.addClass) { - element.addClass(options.addClass); - options.addClass = null; - } - if (options.removeClass) { - element.removeClass(options.removeClass); - options.removeClass = null; - } - if (options.to) { - element.css(options.to); - options.to = null; - } - } - }; - }]; -}; - -/* global stripHash: true */ - -/** - * ! This is a private undocumented service ! - * - * @name $browser - * @requires $log - * @description - * This object has two goals: - * - * - hide all the global state in the browser caused by the window object - * - abstract away all the browser specific features and inconsistencies - * - * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser` - * service, which can be used for convenient testing of the application without the interaction with - * the real browser apis. - */ -/** - * @param {object} window The global window object. - * @param {object} document jQuery wrapped document. - * @param {object} $log window.console or an object with the same interface. - * @param {object} $sniffer $sniffer service - */ -function Browser(window, document, $log, $sniffer) { - var self = this, - location = window.location, - history = window.history, - setTimeout = window.setTimeout, - clearTimeout = window.clearTimeout, - pendingDeferIds = {}; - - self.isMock = false; - - var outstandingRequestCount = 0; - var outstandingRequestCallbacks = []; - - // TODO(vojta): remove this temporary api - self.$$completeOutstandingRequest = completeOutstandingRequest; - self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; }; - - /** - * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` - * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed. - */ - function completeOutstandingRequest(fn) { - try { - fn.apply(null, sliceArgs(arguments, 1)); - } finally { - outstandingRequestCount--; - if (outstandingRequestCount === 0) { - while (outstandingRequestCallbacks.length) { - try { - outstandingRequestCallbacks.pop()(); - } catch (e) { - $log.error(e); - } - } - } - } - } - - function getHash(url) { - var index = url.indexOf('#'); - return index === -1 ? '' : url.substr(index); - } - - /** - * @private - * TODO(vojta): prefix this method with $$ ? - * @param {function()} callback Function that will be called when no outstanding request - */ - self.notifyWhenNoOutstandingRequests = function(callback) { - if (outstandingRequestCount === 0) { - callback(); - } else { - outstandingRequestCallbacks.push(callback); - } - }; - - ////////////////////////////////////////////////////////////// - // URL API - ////////////////////////////////////////////////////////////// - - var cachedState, lastHistoryState, - lastBrowserUrl = location.href, - baseElement = document.find('base'), - pendingLocation = null, - getCurrentState = !$sniffer.history ? noop : function getCurrentState() { - try { - return history.state; - } catch (e) { - // MSIE can reportedly throw when there is no state (UNCONFIRMED). - } - }; - - cacheState(); - - /** - * @name $browser#url - * - * @description - * GETTER: - * Without any argument, this method just returns current value of location.href. - * - * SETTER: - * With at least one argument, this method sets url to new value. - * If html5 history api supported, pushState/replaceState is used, otherwise - * location.href/location.replace is used. - * Returns its own instance to allow chaining - * - * NOTE: this api is intended for use only by the $location service. Please use the - * {@link ng.$location $location service} to change url. - * - * @param {string} url New url (when used as setter) - * @param {boolean=} replace Should new url replace current history record? - * @param {object=} state object to use with pushState/replaceState - */ - self.url = function(url, replace, state) { - // In modern browsers `history.state` is `null` by default; treating it separately - // from `undefined` would cause `$browser.url('/foo')` to change `history.state` - // to undefined via `pushState`. Instead, let's change `undefined` to `null` here. - if (isUndefined(state)) { - state = null; - } - - // Android Browser BFCache causes location, history reference to become stale. - if (location !== window.location) location = window.location; - if (history !== window.history) history = window.history; - - // setter - if (url) { - var sameState = lastHistoryState === state; - - // Don't change anything if previous and current URLs and states match. This also prevents - // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode. - // See https://github.com/angular/angular.js/commit/ffb2701 - if (lastBrowserUrl === url && (!$sniffer.history || sameState)) { - return self; - } - var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url); - lastBrowserUrl = url; - lastHistoryState = state; - // Don't use history API if only the hash changed - // due to a bug in IE10/IE11 which leads - // to not firing a `hashchange` nor `popstate` event - // in some cases (see #9143). - if ($sniffer.history && (!sameBase || !sameState)) { - history[replace ? 'replaceState' : 'pushState'](state, '', url); - cacheState(); - } else { - if (!sameBase) { - pendingLocation = url; - } - if (replace) { - location.replace(url); - } else if (!sameBase) { - location.href = url; - } else { - location.hash = getHash(url); - } - if (location.href !== url) { - pendingLocation = url; - } - } - if (pendingLocation) { - pendingLocation = url; - } - return self; - // getter - } else { - // - pendingLocation is needed as browsers don't allow to read out - // the new location.href if a reload happened or if there is a bug like in iOS 9 (see - // https://openradar.appspot.com/22186109). - // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172 - return pendingLocation || location.href.replace(/%27/g,'\''); - } - }; - - /** - * @name $browser#state - * - * @description - * This method is a getter. - * - * Return history.state or null if history.state is undefined. - * - * @returns {object} state - */ - self.state = function() { - return cachedState; - }; - - var urlChangeListeners = [], - urlChangeInit = false; - - function cacheStateAndFireUrlChange() { - pendingLocation = null; - fireStateOrUrlChange(); - } - - // This variable should be used *only* inside the cacheState function. - var lastCachedState = null; - function cacheState() { - // This should be the only place in $browser where `history.state` is read. - cachedState = getCurrentState(); - cachedState = isUndefined(cachedState) ? null : cachedState; - - // Prevent callbacks fo fire twice if both hashchange & popstate were fired. - if (equals(cachedState, lastCachedState)) { - cachedState = lastCachedState; - } - - lastCachedState = cachedState; - lastHistoryState = cachedState; - } - - function fireStateOrUrlChange() { - var prevLastHistoryState = lastHistoryState; - cacheState(); - - if (lastBrowserUrl === self.url() && prevLastHistoryState === cachedState) { - return; - } - - lastBrowserUrl = self.url(); - lastHistoryState = cachedState; - forEach(urlChangeListeners, function(listener) { - listener(self.url(), cachedState); - }); - } - - /** - * @name $browser#onUrlChange - * - * @description - * Register callback function that will be called, when url changes. - * - * It's only called when the url is changed from outside of AngularJS: - * - user types different url into address bar - * - user clicks on history (forward/back) button - * - user clicks on a link - * - * It's not called when url is changed by $browser.url() method - * - * The listener gets called with new url as parameter. - * - * NOTE: this api is intended for use only by the $location service. Please use the - * {@link ng.$location $location service} to monitor url changes in AngularJS apps. - * - * @param {function(string)} listener Listener function to be called when url changes. - * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous. - */ - self.onUrlChange = function(callback) { - // TODO(vojta): refactor to use node's syntax for events - if (!urlChangeInit) { - // We listen on both (hashchange/popstate) when available, as some browsers don't - // fire popstate when user changes the address bar and don't fire hashchange when url - // changed by push/replaceState - - // html5 history api - popstate event - if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange); - // hashchange event - jqLite(window).on('hashchange', cacheStateAndFireUrlChange); - - urlChangeInit = true; - } - - urlChangeListeners.push(callback); - return callback; - }; - - /** - * @private - * Remove popstate and hashchange handler from window. - * - * NOTE: this api is intended for use only by $rootScope. - */ - self.$$applicationDestroyed = function() { - jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange); - }; - - /** - * Checks whether the url has changed outside of AngularJS. - * Needs to be exported to be able to check for changes that have been done in sync, - * as hashchange/popstate events fire in async. - */ - self.$$checkUrlChange = fireStateOrUrlChange; - - ////////////////////////////////////////////////////////////// - // Misc API - ////////////////////////////////////////////////////////////// - - /** - * @name $browser#baseHref - * - * @description - * Returns current - * (always relative - without domain) - * - * @returns {string} The current base href - */ - self.baseHref = function() { - var href = baseElement.attr('href'); - return href ? href.replace(/^(https?:)?\/\/[^/]*/, '') : ''; - }; - - /** - * @name $browser#defer - * @param {function()} fn A function, who's execution should be deferred. - * @param {number=} [delay=0] of milliseconds to defer the function execution. - * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`. - * - * @description - * Executes a fn asynchronously via `setTimeout(fn, delay)`. - * - * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using - * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed - * via `$browser.defer.flush()`. - * - */ - self.defer = function(fn, delay) { - var timeoutId; - outstandingRequestCount++; - timeoutId = setTimeout(function() { - delete pendingDeferIds[timeoutId]; - completeOutstandingRequest(fn); - }, delay || 0); - pendingDeferIds[timeoutId] = true; - return timeoutId; - }; - - - /** - * @name $browser#defer.cancel - * - * @description - * Cancels a deferred task identified with `deferId`. - * - * @param {*} deferId Token returned by the `$browser.defer` function. - * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully - * canceled. - */ - self.defer.cancel = function(deferId) { - if (pendingDeferIds[deferId]) { - delete pendingDeferIds[deferId]; - clearTimeout(deferId); - completeOutstandingRequest(noop); - return true; - } - return false; - }; - -} - -/** @this */ -function $BrowserProvider() { - this.$get = ['$window', '$log', '$sniffer', '$document', - function($window, $log, $sniffer, $document) { - return new Browser($window, $document, $log, $sniffer); - }]; -} - -/** - * @ngdoc service - * @name $cacheFactory - * @this - * - * @description - * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to - * them. - * - * ```js - * - * var cache = $cacheFactory('cacheId'); - * expect($cacheFactory.get('cacheId')).toBe(cache); - * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined(); - * - * cache.put("key", "value"); - * cache.put("another key", "another value"); - * - * // We've specified no options on creation - * expect(cache.info()).toEqual({id: 'cacheId', size: 2}); - * - * ``` - * - * - * @param {string} cacheId Name or id of the newly created cache. - * @param {object=} options Options object that specifies the cache behavior. Properties: - * - * - `{number=}` `capacity` — turns the cache into LRU cache. - * - * @returns {object} Newly created cache object with the following set of methods: - * - * - `{object}` `info()` — Returns id, size, and options of cache. - * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns - * it. - * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss. - * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache. - * - `{void}` `removeAll()` — Removes all cached values. - * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory. - * - * @example - - -
      - - - - -

      Cached Values

      -
      - - : - -
      - -

      Cache Info

      -
      - - : - -
      -
      -
      - - angular.module('cacheExampleApp', []). - controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) { - $scope.keys = []; - $scope.cache = $cacheFactory('cacheId'); - $scope.put = function(key, value) { - if (angular.isUndefined($scope.cache.get(key))) { - $scope.keys.push(key); - } - $scope.cache.put(key, angular.isUndefined(value) ? null : value); - }; - }]); - - - p { - margin: 10px 0 3px; - } - -
      - */ -function $CacheFactoryProvider() { - - this.$get = function() { - var caches = {}; - - function cacheFactory(cacheId, options) { - if (cacheId in caches) { - throw minErr('$cacheFactory')('iid', 'CacheId \'{0}\' is already taken!', cacheId); - } - - var size = 0, - stats = extend({}, options, {id: cacheId}), - data = createMap(), - capacity = (options && options.capacity) || Number.MAX_VALUE, - lruHash = createMap(), - freshEnd = null, - staleEnd = null; - - /** - * @ngdoc type - * @name $cacheFactory.Cache - * - * @description - * A cache object used to store and retrieve data, primarily used by - * {@link $templateRequest $templateRequest} and the {@link ng.directive:script script} - * directive to cache templates and other data. - * - * ```js - * angular.module('superCache') - * .factory('superCache', ['$cacheFactory', function($cacheFactory) { - * return $cacheFactory('super-cache'); - * }]); - * ``` - * - * Example test: - * - * ```js - * it('should behave like a cache', inject(function(superCache) { - * superCache.put('key', 'value'); - * superCache.put('another key', 'another value'); - * - * expect(superCache.info()).toEqual({ - * id: 'super-cache', - * size: 2 - * }); - * - * superCache.remove('another key'); - * expect(superCache.get('another key')).toBeUndefined(); - * - * superCache.removeAll(); - * expect(superCache.info()).toEqual({ - * id: 'super-cache', - * size: 0 - * }); - * })); - * ``` - */ - return (caches[cacheId] = { - - /** - * @ngdoc method - * @name $cacheFactory.Cache#put - * @kind function - * - * @description - * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be - * retrieved later, and incrementing the size of the cache if the key was not already - * present in the cache. If behaving like an LRU cache, it will also remove stale - * entries from the set. - * - * It will not insert undefined values into the cache. - * - * @param {string} key the key under which the cached data is stored. - * @param {*} value the value to store alongside the key. If it is undefined, the key - * will not be stored. - * @returns {*} the value stored. - */ - put: function(key, value) { - if (isUndefined(value)) return; - if (capacity < Number.MAX_VALUE) { - var lruEntry = lruHash[key] || (lruHash[key] = {key: key}); - - refresh(lruEntry); - } - - if (!(key in data)) size++; - data[key] = value; - - if (size > capacity) { - this.remove(staleEnd.key); - } - - return value; - }, - - /** - * @ngdoc method - * @name $cacheFactory.Cache#get - * @kind function - * - * @description - * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object. - * - * @param {string} key the key of the data to be retrieved - * @returns {*} the value stored. - */ - get: function(key) { - if (capacity < Number.MAX_VALUE) { - var lruEntry = lruHash[key]; - - if (!lruEntry) return; - - refresh(lruEntry); - } - - return data[key]; - }, - - - /** - * @ngdoc method - * @name $cacheFactory.Cache#remove - * @kind function - * - * @description - * Removes an entry from the {@link $cacheFactory.Cache Cache} object. - * - * @param {string} key the key of the entry to be removed - */ - remove: function(key) { - if (capacity < Number.MAX_VALUE) { - var lruEntry = lruHash[key]; - - if (!lruEntry) return; - - if (lruEntry === freshEnd) freshEnd = lruEntry.p; - if (lruEntry === staleEnd) staleEnd = lruEntry.n; - link(lruEntry.n,lruEntry.p); - - delete lruHash[key]; - } - - if (!(key in data)) return; - - delete data[key]; - size--; - }, - - - /** - * @ngdoc method - * @name $cacheFactory.Cache#removeAll - * @kind function - * - * @description - * Clears the cache object of any entries. - */ - removeAll: function() { - data = createMap(); - size = 0; - lruHash = createMap(); - freshEnd = staleEnd = null; - }, - - - /** - * @ngdoc method - * @name $cacheFactory.Cache#destroy - * @kind function - * - * @description - * Destroys the {@link $cacheFactory.Cache Cache} object entirely, - * removing it from the {@link $cacheFactory $cacheFactory} set. - */ - destroy: function() { - data = null; - stats = null; - lruHash = null; - delete caches[cacheId]; - }, - - - /** - * @ngdoc method - * @name $cacheFactory.Cache#info - * @kind function - * - * @description - * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}. - * - * @returns {object} an object with the following properties: - *
        - *
      • **id**: the id of the cache instance
      • - *
      • **size**: the number of entries kept in the cache instance
      • - *
      • **...**: any additional properties from the options object when creating the - * cache.
      • - *
      - */ - info: function() { - return extend({}, stats, {size: size}); - } - }); - - - /** - * makes the `entry` the freshEnd of the LRU linked list - */ - function refresh(entry) { - if (entry !== freshEnd) { - if (!staleEnd) { - staleEnd = entry; - } else if (staleEnd === entry) { - staleEnd = entry.n; - } - - link(entry.n, entry.p); - link(entry, freshEnd); - freshEnd = entry; - freshEnd.n = null; - } - } - - - /** - * bidirectionally links two entries of the LRU linked list - */ - function link(nextEntry, prevEntry) { - if (nextEntry !== prevEntry) { - if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify - if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify - } - } - } - - - /** - * @ngdoc method - * @name $cacheFactory#info - * - * @description - * Get information about all the caches that have been created - * - * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info` - */ - cacheFactory.info = function() { - var info = {}; - forEach(caches, function(cache, cacheId) { - info[cacheId] = cache.info(); - }); - return info; - }; - - - /** - * @ngdoc method - * @name $cacheFactory#get - * - * @description - * Get access to a cache object by the `cacheId` used when it was created. - * - * @param {string} cacheId Name or id of a cache to access. - * @returns {object} Cache object identified by the cacheId or undefined if no such cache. - */ - cacheFactory.get = function(cacheId) { - return caches[cacheId]; - }; - - - return cacheFactory; - }; -} - -/** - * @ngdoc service - * @name $templateCache - * @this - * - * @description - * `$templateCache` is a {@link $cacheFactory.Cache Cache object} created by the - * {@link ng.$cacheFactory $cacheFactory}. - * - * The first time a template is used, it is loaded in the template cache for quick retrieval. You - * can load templates directly into the cache in a `script` tag, by using {@link $templateRequest}, - * or by consuming the `$templateCache` service directly. - * - * Adding via the `script` tag: - * - * ```html - * - * ``` - * - * **Note:** the `script` tag containing the template does not need to be included in the `head` of - * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (e.g. - * element with {@link ngApp} attribute), otherwise the template will be ignored. - * - * Adding via the `$templateCache` service: - * - * ```js - * var myApp = angular.module('myApp', []); - * myApp.run(function($templateCache) { - * $templateCache.put('templateId.html', 'This is the content of the template'); - * }); - * ``` - * - * To retrieve the template later, simply use it in your component: - * ```js - * myApp.component('myComponent', { - * templateUrl: 'templateId.html' - * }); - * ``` - * - * or get it via the `$templateCache` service: - * ```js - * $templateCache.get('templateId.html') - * ``` - * - */ -function $TemplateCacheProvider() { - this.$get = ['$cacheFactory', function($cacheFactory) { - return $cacheFactory('templates'); - }]; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Any commits to this file should be reviewed with security in mind. * - * Changes to this file can potentially create security vulnerabilities. * - * An approval from 2 Core members with history of modifying * - * this file is required. * - * * - * Does the change somehow allow for arbitrary javascript to be executed? * - * Or allows for someone to change the prototype of built-in objects? * - * Or gives undesired access to variables like document or window? * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE! - * - * DOM-related variables: - * - * - "node" - DOM Node - * - "element" - DOM Element or Node - * - "$node" or "$element" - jqLite-wrapped node or element - * - * - * Compiler related stuff: - * - * - "linkFn" - linking fn of a single directive - * - "nodeLinkFn" - function that aggregates all linking fns for a particular node - * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node - * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList) - */ - - -/** - * @ngdoc service - * @name $compile - * @kind function - * - * @description - * Compiles an HTML string or DOM into a template and produces a template function, which - * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together. - * - * The compilation is a process of walking the DOM tree and matching DOM elements to - * {@link ng.$compileProvider#directive directives}. - * - *
      - * **Note:** This document is an in-depth reference of all directive options. - * For a gentle introduction to directives with examples of common use cases, - * see the {@link guide/directive directive guide}. - *
      - * - * ## Comprehensive Directive API - * - * There are many different options for a directive. - * - * The difference resides in the return value of the factory function. - * You can either return a {@link $compile#directive-definition-object Directive Definition Object (see below)} - * that defines the directive properties, or just the `postLink` function (all other properties will have - * the default values). - * - *
      - * **Best Practice:** It's recommended to use the "directive definition object" form. - *
      - * - * Here's an example directive declared with a Directive Definition Object: - * - * ```js - * var myModule = angular.module(...); - * - * myModule.directive('directiveName', function factory(injectables) { - * var directiveDefinitionObject = { - * {@link $compile#-priority- priority}: 0, - * {@link $compile#-template- template}: '
      ', // or // function(tElement, tAttrs) { ... }, - * // or - * // {@link $compile#-templateurl- templateUrl}: 'directive.html', // or // function(tElement, tAttrs) { ... }, - * {@link $compile#-transclude- transclude}: false, - * {@link $compile#-restrict- restrict}: 'A', - * {@link $compile#-templatenamespace- templateNamespace}: 'html', - * {@link $compile#-scope- scope}: false, - * {@link $compile#-controller- controller}: function($scope, $element, $attrs, $transclude, otherInjectables) { ... }, - * {@link $compile#-controlleras- controllerAs}: 'stringIdentifier', - * {@link $compile#-bindtocontroller- bindToController}: false, - * {@link $compile#-require- require}: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'], - * {@link $compile#-multielement- multiElement}: false, - * {@link $compile#-compile- compile}: function compile(tElement, tAttrs, transclude) { - * return { - * {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... }, - * {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... } - * } - * // or - * // return function postLink( ... ) { ... } - * }, - * // or - * // {@link $compile#-link- link}: { - * // {@link $compile#pre-linking-function pre}: function preLink(scope, iElement, iAttrs, controller) { ... }, - * // {@link $compile#post-linking-function post}: function postLink(scope, iElement, iAttrs, controller) { ... } - * // } - * // or - * // {@link $compile#-link- link}: function postLink( ... ) { ... } - * }; - * return directiveDefinitionObject; - * }); - * ``` - * - *
      - * **Note:** Any unspecified options will use the default value. You can see the default values below. - *
      - * - * Therefore the above can be simplified as: - * - * ```js - * var myModule = angular.module(...); - * - * myModule.directive('directiveName', function factory(injectables) { - * var directiveDefinitionObject = { - * link: function postLink(scope, iElement, iAttrs) { ... } - * }; - * return directiveDefinitionObject; - * // or - * // return function postLink(scope, iElement, iAttrs) { ... } - * }); - * ``` - * - * ### Life-cycle hooks - * Directive controllers can provide the following methods that are called by AngularJS at points in the life-cycle of the - * directive: - * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and - * had their bindings initialized (and before the pre & post linking functions for the directives on - * this element). This is a good place to put initialization code for your controller. - * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The - * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an - * object of the form `{ currentValue, previousValue, isFirstChange() }`. Use this hook to trigger updates within a - * component such as cloning the bound value to prevent accidental mutation of the outer value. Note that this will - * also be called when your bindings are initialized. - * * `$doCheck()` - Called on each turn of the digest cycle. Provides an opportunity to detect and act on - * changes. Any actions that you wish to take in response to the changes that you detect must be - * invoked from this hook; implementing this has no effect on when `$onChanges` is called. For example, this hook - * could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not - * be detected by AngularJS's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; - * if detecting changes, you must store the previous value(s) for comparison to the current values. - * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing - * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in - * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent - * components will have their `$onDestroy()` hook called before child components. - * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link - * function this hook can be used to set up DOM event handlers and do direct DOM manipulation. - * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since - * they are waiting for their template to load asynchronously and their own compilation and linking has been - * suspended until that occurs. - * - * #### Comparison with life-cycle hooks in the new Angular - * The new Angular also uses life-cycle hooks for its components. While the AngularJS life-cycle hooks are similar there are - * some differences that you should be aware of, especially when it comes to moving your code from AngularJS to Angular: - * - * * AngularJS hooks are prefixed with `$`, such as `$onInit`. Angular hooks are prefixed with `ng`, such as `ngOnInit`. - * * AngularJS hooks can be defined on the controller prototype or added to the controller inside its constructor. - * In Angular you can only define hooks on the prototype of the Component class. - * * Due to the differences in change-detection, you may get many more calls to `$doCheck` in AngularJS than you would to - * `ngDoCheck` in Angular. - * * Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be - * propagated throughout the application. - * Angular does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an - * error or do nothing depending upon the state of `enableProdMode()`. - * - * #### Life-cycle hook examples - * - * This example shows how you can check for mutations to a Date object even though the identity of the object - * has not changed. - * - * - * - * angular.module('do-check-module', []) - * .component('app', { - * template: - * 'Month: ' + - * 'Date: {{ $ctrl.date }}' + - * '', - * controller: function() { - * this.date = new Date(); - * this.month = this.date.getMonth(); - * this.updateDate = function() { - * this.date.setMonth(this.month); - * }; - * } - * }) - * .component('test', { - * bindings: { date: '<' }, - * template: - * '
      {{ $ctrl.log | json }}
      ', - * controller: function() { - * var previousValue; - * this.log = []; - * this.$doCheck = function() { - * var currentValue = this.date && this.date.valueOf(); - * if (previousValue !== currentValue) { - * this.log.push('doCheck: date mutated: ' + this.date); - * previousValue = currentValue; - * } - * }; - * } - * }); - *
      - * - * - * - *
      - * - * This example show how you might use `$doCheck` to trigger changes in your component's inputs even if the - * actual identity of the component doesn't change. (Be aware that cloning and deep equality checks on large - * arrays or objects can have a negative impact on your application performance) - * - * - * - *
      - * - * - *
      {{ items }}
      - * - *
      - *
      - * - * angular.module('do-check-module', []) - * .component('test', { - * bindings: { items: '<' }, - * template: - * '
      {{ $ctrl.log | json }}
      ', - * controller: function() { - * this.log = []; - * - * this.$doCheck = function() { - * if (this.items_ref !== this.items) { - * this.log.push('doCheck: items changed'); - * this.items_ref = this.items; - * } - * if (!angular.equals(this.items_clone, this.items)) { - * this.log.push('doCheck: items mutated'); - * this.items_clone = angular.copy(this.items); - * } - * }; - * } - * }); - *
      - *
      - * - * - * ### Directive Definition Object - * - * The directive definition object provides instructions to the {@link ng.$compile - * compiler}. The attributes are: - * - * #### `multiElement` - * When this property is set to true (default is `false`), the HTML compiler will collect DOM nodes between - * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them - * together as the directive elements. It is recommended that this feature be used on directives - * which are not strictly behavioral (such as {@link ngClick}), and which - * do not manipulate or replace child nodes (such as {@link ngInclude}). - * - * #### `priority` - * When there are multiple directives defined on a single DOM element, sometimes it - * is necessary to specify the order in which the directives are applied. The `priority` is used - * to sort the directives before their `compile` functions get called. Priority is defined as a - * number. Directives with greater numerical `priority` are compiled first. Pre-link functions - * are also run in priority order, but post-link functions are run in reverse order. The order - * of directives with the same priority is undefined. The default priority is `0`. - * - * #### `terminal` - * If set to true then the current `priority` will be the last set of directives - * which will execute (any directives at the current priority will still execute - * as the order of execution on same `priority` is undefined). Note that expressions - * and other directives used in the directive's template will also be excluded from execution. - * - * #### `scope` - * The scope property can be `false`, `true`, or an object: - * - * * **`false` (default):** No scope will be created for the directive. The directive will use its - * parent's scope. - * - * * **`true`:** A new child scope that prototypically inherits from its parent will be created for - * the directive's element. If multiple directives on the same element request a new scope, - * only one new scope is created. - * - * * **`{...}` (an object hash):** A new "isolate" scope is created for the directive's template. - * The 'isolate' scope differs from normal scope in that it does not prototypically - * inherit from its parent scope. This is useful when creating reusable components, which should not - * accidentally read or modify data in the parent scope. Note that an isolate scope - * directive without a `template` or `templateUrl` will not apply the isolate scope - * to its children elements. - * - * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the - * directive's element. These local properties are useful for aliasing values for templates. The keys in - * the object hash map to the name of the property on the isolate scope; the values define how the property - * is bound to the parent scope, via matching attributes on the directive's element: - * - * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is - * always a string since DOM attributes are strings. If no `attr` name is specified then the - * attribute name is assumed to be the same as the local name. Given `` and the isolate scope definition `scope: { localName:'@myAttr' }`, - * the directive's scope property `localName` will reflect the interpolated value of `hello - * {{name}}`. As the `name` attribute changes so will the `localName` property on the directive's - * scope. The `name` is read from the parent scope (not the directive's scope). - * - * * `=` or `=attr` - set up a bidirectional binding between a local scope property and an expression - * passed via the attribute `attr`. The expression is evaluated in the context of the parent scope. - * If no `attr` name is specified then the attribute name is assumed to be the same as the local - * name. Given `` and the isolate scope definition `scope: { - * localModel: '=myAttr' }`, the property `localModel` on the directive's scope will reflect the - * value of `parentModel` on the parent scope. Changes to `parentModel` will be reflected in - * `localModel` and vice versa. Optional attributes should be marked as such with a question mark: - * `=?` or `=?attr`. If the binding expression is non-assignable, or if the attribute isn't - * optional and doesn't exist, an exception ({@link error/$compile/nonassign `$compile:nonassign`}) - * will be thrown upon discovering changes to the local value, since it will be impossible to sync - * them back to the parent scope. By default, the {@link ng.$rootScope.Scope#$watch `$watch`} - * method is used for tracking changes, and the equality check is based on object identity. - * However, if an object literal or an array literal is passed as the binding expression, the - * equality check is done by value (using the {@link angular.equals} function). It's also possible - * to watch the evaluated value shallowly with {@link ng.$rootScope.Scope#$watchCollection - * `$watchCollection`}: use `=*` or `=*attr` (`=*?` or `=*?attr` if the attribute is optional). - * - * * `<` or `` and directive definition of - * `scope: { localModel:'` and the isolate scope definition `scope: { - * localFn:'&myAttr' }`, the isolate scope property `localFn` will point to a function wrapper for - * the `count = count + value` expression. Often it's desirable to pass data from the isolated scope - * via an expression to the parent scope. This can be done by passing a map of local variable names - * and values into the expression wrapper fn. For example, if the expression is `increment(amount)` - * then we can specify the amount value by calling the `localFn` as `localFn({amount: 22})`. - * - * In general it's possible to apply more than one directive to one element, but there might be limitations - * depending on the type of scope required by the directives. The following points will help explain these limitations. - * For simplicity only two directives are taken into account, but it is also applicable for several directives: - * - * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope - * * **child scope** + **no scope** => Both directives will share one single child scope - * * **child scope** + **child scope** => Both directives will share one single child scope - * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use - * its parent's scope - * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot - * be applied to the same element. - * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives - * cannot be applied to the same element. - * - * - * #### `bindToController` - * This property is used to bind scope properties directly to the controller. It can be either - * `true` or an object hash with the same format as the `scope` property. - * - * When an isolate scope is used for a directive (see above), `bindToController: true` will - * allow a component to have its properties bound to the controller, rather than to scope. - * - * After the controller is instantiated, the initial values of the isolate scope bindings will be bound to the controller - * properties. You can access these bindings once they have been initialized by providing a controller method called - * `$onInit`, which is called after all the controllers on an element have been constructed and had their bindings - * initialized. - * - *
      - * **Deprecation warning:** if `$compileProcvider.preAssignBindingsEnabled(true)` was called, bindings for non-ES6 class - * controllers are bound to `this` before the controller constructor is called but this use is now deprecated. Please - * place initialization code that relies upon bindings inside a `$onInit` method on the controller, instead. - *
      - * - * It is also possible to set `bindToController` to an object hash with the same format as the `scope` property. - * This will set up the scope bindings to the controller directly. Note that `scope` can still be used - * to define which kind of scope is created. By default, no scope is created. Use `scope: {}` to create an isolate - * scope (useful for component directives). - * - * If both `bindToController` and `scope` are defined and have object hashes, `bindToController` overrides `scope`. - * - * - * #### `controller` - * Controller constructor function. The controller is instantiated before the - * pre-linking phase and can be accessed by other directives (see - * `require` attribute). This allows the directives to communicate with each other and augment - * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals: - * - * * `$scope` - Current scope associated with the element - * * `$element` - Current element - * * `$attrs` - Current attributes object for the element - * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope: - * `function([scope], cloneLinkingFn, futureParentElement, slotName)`: - * * `scope`: (optional) override the scope. - * * `cloneLinkingFn`: (optional) argument to create clones of the original transcluded content. - * * `futureParentElement` (optional): - * * defines the parent to which the `cloneLinkingFn` will add the cloned elements. - * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`. - * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements) - * and when the `cloneLinkingFn` is passed, - * as those elements need to created and cloned in a special way when they are defined outside their - * usual containers (e.g. like ``). - * * See also the `directive.templateNamespace` property. - * * `slotName`: (optional) the name of the slot to transclude. If falsy (e.g. `null`, `undefined` or `''`) - * then the default transclusion is provided. - * The `$transclude` function also has a method on it, `$transclude.isSlotFilled(slotName)`, which returns - * `true` if the specified slot contains content (i.e. one or more DOM nodes). - * - * #### `require` - * Require another directive and inject its controller as the fourth argument to the linking function. The - * `require` property can be a string, an array or an object: - * * a **string** containing the name of the directive to pass to the linking function - * * an **array** containing the names of directives to pass to the linking function. The argument passed to the - * linking function will be an array of controllers in the same order as the names in the `require` property - * * an **object** whose property values are the names of the directives to pass to the linking function. The argument - * passed to the linking function will also be an object with matching keys, whose values will hold the corresponding - * controllers. - * - * If the `require` property is an object and `bindToController` is truthy, then the required controllers are - * bound to the controller using the keys of the `require` property. This binding occurs after all the controllers - * have been constructed but before `$onInit` is called. - * If the name of the required controller is the same as the local name (the key), the name can be - * omitted. For example, `{parentDir: '^^'}` is equivalent to `{parentDir: '^^parentDir'}`. - * See the {@link $compileProvider#component} helper for an example of how this can be used. - * If no such required directive(s) can be found, or if the directive does not have a controller, then an error is - * raised (unless no link function is specified and the required controllers are not being bound to the directive - * controller, in which case error checking is skipped). The name can be prefixed with: - * - * * (no prefix) - Locate the required controller on the current element. Throw an error if not found. - * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found. - * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found. - * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found. - * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass - * `null` to the `link` fn if not found. - * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass - * `null` to the `link` fn if not found. - * - * - * #### `controllerAs` - * Identifier name for a reference to the controller in the directive's scope. - * This allows the controller to be referenced from the directive template. This is especially - * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible - * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the - * `controllerAs` reference might overwrite a property that already exists on the parent scope. - * - * - * #### `restrict` - * String of subset of `EACM` which restricts the directive to a specific directive - * declaration style. If omitted, the defaults (elements and attributes) are used. - * - * * `E` - Element name (default): `` - * * `A` - Attribute (default): `
      ` - * * `C` - Class: `
      ` - * * `M` - Comment: `` - * - * - * #### `templateNamespace` - * String representing the document type used by the markup in the template. - * AngularJS needs this information as those elements need to be created and cloned - * in a special way when they are defined outside their usual containers like `` and ``. - * - * * `html` - All root nodes in the template are HTML. Root nodes may also be - * top-level elements such as `` or ``. - * * `svg` - The root nodes in the template are SVG elements (excluding ``). - * * `math` - The root nodes in the template are MathML elements (excluding ``). - * - * If no `templateNamespace` is specified, then the namespace is considered to be `html`. - * - * #### `template` - * HTML markup that may: - * * Replace the contents of the directive's element (default). - * * Replace the directive's element itself (if `replace` is true - DEPRECATED). - * * Wrap the contents of the directive's element (if `transclude` is true). - * - * Value may be: - * - * * A string. For example `
      {{delete_str}}
      `. - * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile` - * function api below) and returns a string value. - * - * - * #### `templateUrl` - * This is similar to `template` but the template is loaded from the specified URL, asynchronously. - * - * Because template loading is asynchronous the compiler will suspend compilation of directives on that element - * for later when the template has been resolved. In the meantime it will continue to compile and link - * sibling and parent elements as though this element had not contained any directives. - * - * The compiler does not suspend the entire compilation to wait for templates to be loaded because this - * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the - * case when only one deeply nested directive has `templateUrl`. - * - * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache} - * - * You can specify `templateUrl` as a string representing the URL or as a function which takes two - * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns - * a string value representing the url. In either case, the template URL is passed through {@link - * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}. - * - * - * #### `replace` (*DEPRECATED*) - * - * `replace` will be removed in next major release - i.e. v2.0). - * - * Specifies what the template should replace. Defaults to `false`. - * - * * `true` - the template will replace the directive's element. - * * `false` - the template will replace the contents of the directive's element. - * - * The replacement process migrates all of the attributes / classes from the old element to the new - * one. See the {@link guide/directive#template-expanding-directive - * Directives Guide} for an example. - * - * There are very few scenarios where element replacement is required for the application function, - * the main one being reusable custom components that are used within SVG contexts - * (because SVG doesn't work with custom elements in the DOM tree). - * - * #### `transclude` - * Extract the contents of the element where the directive appears and make it available to the directive. - * The contents are compiled and provided to the directive as a **transclusion function**. See the - * {@link $compile#transclusion Transclusion} section below. - * - * - * #### `compile` - * - * ```js - * function compile(tElement, tAttrs, transclude) { ... } - * ``` - * - * The compile function deals with transforming the template DOM. Since most directives do not do - * template transformation, it is not used often. The compile function takes the following arguments: - * - * * `tElement` - template element - The element where the directive has been declared. It is - * safe to do template transformation on the element and child elements only. - * - * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared - * between all directive compile functions. - * - * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)` - * - *
      - * **Note:** The template instance and the link instance may be different objects if the template has - * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that - * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration - * should be done in a linking function rather than in a compile function. - *
      - - *
      - * **Note:** The compile function cannot handle directives that recursively use themselves in their - * own templates or compile functions. Compiling these directives results in an infinite loop and - * stack overflow errors. - * - * This can be avoided by manually using $compile in the postLink function to imperatively compile - * a directive's template instead of relying on automatic template compilation via `template` or - * `templateUrl` declaration or manual compilation inside the compile function. - *
      - * - *
      - * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it - * e.g. does not know about the right outer scope. Please use the transclude function that is passed - * to the link function instead. - *
      - - * A compile function can have a return value which can be either a function or an object. - * - * * returning a (post-link) function - is equivalent to registering the linking function via the - * `link` property of the config object when the compile function is empty. - * - * * returning an object with function(s) registered via `pre` and `post` properties - allows you to - * control when a linking function should be called during the linking phase. See info about - * pre-linking and post-linking functions below. - * - * - * #### `link` - * This property is used only if the `compile` property is not defined. - * - * ```js - * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... } - * ``` - * - * The link function is responsible for registering DOM listeners as well as updating the DOM. It is - * executed after the template has been cloned. This is where most of the directive logic will be - * put. - * - * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the - * directive for registering {@link ng.$rootScope.Scope#$watch watches}. - * - * * `iElement` - instance element - The element where the directive is to be used. It is safe to - * manipulate the children of the element only in `postLink` function since the children have - * already been linked. - * - * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared - * between all directive linking functions. - * - * * `controller` - the directive's required controller instance(s) - Instances are shared - * among all directives, which allows the directives to use the controllers as a communication - * channel. The exact value depends on the directive's `require` property: - * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one - * * `string`: the controller instance - * * `array`: array of controller instances - * - * If a required controller cannot be found, and it is optional, the instance is `null`, - * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown. - * - * Note that you can also require the directive's own controller - it will be made available like - * any other controller. - * - * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope. - * This is the same as the `$transclude` parameter of directive controllers, - * see {@link ng.$compile#-controller- the controller section for details}. - * `function([scope], cloneLinkingFn, futureParentElement)`. - * - * #### Pre-linking function - * - * Executed before the child elements are linked. Not safe to do DOM transformation since the - * compiler linking function will fail to locate the correct elements for linking. - * - * #### Post-linking function - * - * Executed after the child elements are linked. - * - * Note that child elements that contain `templateUrl` directives will not have been compiled - * and linked since they are waiting for their template to load asynchronously and their own - * compilation and linking has been suspended until that occurs. - * - * It is safe to do DOM transformation in the post-linking function on elements that are not waiting - * for their async templates to be resolved. - * - * - * ### Transclusion - * - * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and - * copying them to another part of the DOM, while maintaining their connection to the original AngularJS - * scope from where they were taken. - * - * Transclusion is used (often with {@link ngTransclude}) to insert the - * original contents of a directive's element into a specified place in the template of the directive. - * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded - * content has access to the properties on the scope from which it was taken, even if the directive - * has isolated scope. - * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}. - * - * This makes it possible for the widget to have private state for its template, while the transcluded - * content has access to its originating scope. - * - *
      - * **Note:** When testing an element transclude directive you must not place the directive at the root of the - * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives - * Testing Transclusion Directives}. - *
      - * - * There are three kinds of transclusion depending upon whether you want to transclude just the contents of the - * directive's element, the entire element or multiple parts of the element contents: - * - * * `true` - transclude the content (i.e. the child nodes) of the directive's element. - * * `'element'` - transclude the whole of the directive's element including any directives on this - * element that defined at a lower priority than this directive. When used, the `template` - * property is ignored. - * * **`{...}` (an object hash):** - map elements of the content onto transclusion "slots" in the template. - * - * **Mult-slot transclusion** is declared by providing an object for the `transclude` property. - * - * This object is a map where the keys are the name of the slot to fill and the value is an element selector - * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`) - * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc). - * - * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} - * - * If the element selector is prefixed with a `?` then that slot is optional. - * - * For example, the transclude object `{ slotA: '?myCustomElement' }` maps `` elements to - * the `slotA` slot, which can be accessed via the `$transclude` function or via the {@link ngTransclude} directive. - * - * Slots that are not marked as optional (`?`) will trigger a compile time error if there are no matching elements - * in the transclude content. If you wish to know if an optional slot was filled with content, then you can call - * `$transclude.isSlotFilled(slotName)` on the transclude function passed to the directive's link function and - * injectable into the directive's controller. - * - * - * #### Transclusion Functions - * - * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion - * function** to the directive's `link` function and `controller`. This transclusion function is a special - * **linking function** that will return the compiled contents linked to a new transclusion scope. - * - *
      - * If you are just using {@link ngTransclude} then you don't need to worry about this function, since - * ngTransclude will deal with it for us. - *
      - * - * If you want to manually control the insertion and removal of the transcluded content in your directive - * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery - * object that contains the compiled DOM, which is linked to the correct transclusion scope. - * - * When you call a transclusion function you can pass in a **clone attach function**. This function accepts - * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded - * content and the `scope` is the newly created transclusion scope, which the clone will be linked to. - * - *
      - * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a transclude function - * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope. - *
      - * - * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone - * attach function**: - * - * ```js - * var transcludedContent, transclusionScope; - * - * $transclude(function(clone, scope) { - * element.append(clone); - * transcludedContent = clone; - * transclusionScope = scope; - * }); - * ``` - * - * Later, if you want to remove the transcluded content from your DOM then you should also destroy the - * associated transclusion scope: - * - * ```js - * transcludedContent.remove(); - * transclusionScope.$destroy(); - * ``` - * - *
      - * **Best Practice**: if you intend to add and remove transcluded content manually in your directive - * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it), - * then you are also responsible for calling `$destroy` on the transclusion scope. - *
      - * - * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat} - * automatically destroy their transcluded clones as necessary so you do not need to worry about this if - * you are simply using {@link ngTransclude} to inject the transclusion into your directive. - * - * - * #### Transclusion Scopes - * - * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion - * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed - * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it - * was taken. - * - * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look - * like this: - * - * ```html - *
      - *
      - *
      - *
      - *
      - *
      - * ``` - * - * The `$parent` scope hierarchy will look like this: - * - ``` - - $rootScope - - isolate - - transclusion - ``` - * - * but the scopes will inherit prototypically from different scopes to their `$parent`. - * - ``` - - $rootScope - - transclusion - - isolate - ``` - * - * - * ### Attributes - * - * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the - * `link()` or `compile()` functions. It has a variety of uses. - * - * * *Accessing normalized attribute names:* Directives like 'ngBind' can be expressed in many ways: - * 'ng:bind', `data-ng-bind`, or 'x-ng-bind'. The attributes object allows for normalized access - * to the attributes. - * - * * *Directive inter-communication:* All directives share the same instance of the attributes - * object which allows the directives to use the attributes object as inter directive - * communication. - * - * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object - * allowing other directives to read the interpolated value. - * - * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes - * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also - * the only way to easily get the actual value because during the linking phase the interpolation - * hasn't been evaluated yet and so the value is at this time set to `undefined`. - * - * ```js - * function linkingFn(scope, elm, attrs, ctrl) { - * // get the attribute value - * console.log(attrs.ngModel); - * - * // change the attribute - * attrs.$set('ngModel', 'new value'); - * - * // observe changes to interpolated attribute - * attrs.$observe('ngModel', function(value) { - * console.log('ngModel has changed value to ' + value); - * }); - * } - * ``` - * - * ## Example - * - *
      - * **Note**: Typically directives are registered with `module.directive`. The example below is - * to illustrate how `$compile` works. - *
      - * - - - -
      -
      -
      -
      -
      -
      - - it('should auto compile', function() { - var textarea = $('textarea'); - var output = $('div[compile]'); - // The initial state reads 'Hello AngularJS'. - expect(output.getText()).toBe('Hello AngularJS'); - textarea.clear(); - textarea.sendKeys('{{name}}!'); - expect(output.getText()).toBe('AngularJS!'); - }); - -
      - - * - * - * @param {string|DOMElement} element Element or HTML string to compile into a template function. - * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED. - * - *
      - * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it - * e.g. will not use the right outer scope. Please pass the transclude function as a - * `parentBoundTranscludeFn` to the link function instead. - *
      - * - * @param {number} maxPriority only apply directives lower than given priority (Only effects the - * root element(s), not their children) - * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template - * (a DOM element/tree) to a scope. Where: - * - * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to. - * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the - * `template` and call the `cloneAttachFn` function allowing the caller to attach the - * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is - * called as:
      `cloneAttachFn(clonedElement, scope)` where: - * - * * `clonedElement` - is a clone of the original `element` passed into the compiler. - * * `scope` - is the current scope with which the linking function is working with. - * - * * `options` - An optional object hash with linking options. If `options` is provided, then the following - * keys may be used to control linking behavior: - * - * * `parentBoundTranscludeFn` - the transclude function made available to - * directives; if given, it will be passed through to the link functions of - * directives found in `element` during compilation. - * * `transcludeControllers` - an object hash with keys that map controller names - * to a hash with the key `instance`, which maps to the controller instance; - * if given, it will make the controllers available to directives on the compileNode: - * ``` - * { - * parent: { - * instance: parentControllerInstance - * } - * } - * ``` - * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add - * the cloned elements; only needed for transcludes that are allowed to contain non html - * elements (e.g. SVG elements). See also the directive.controller property. - * - * Calling the linking function returns the element of the template. It is either the original - * element passed in, or the clone of the element if the `cloneAttachFn` is provided. - * - * After linking the view is not updated until after a call to $digest which typically is done by - * AngularJS automatically. - * - * If you need access to the bound view, there are two ways to do it: - * - * - If you are not asking the linking function to clone the template, create the DOM element(s) - * before you send them to the compiler and keep this reference around. - * ```js - * var element = $compile('

      {{total}}

      ')(scope); - * ``` - * - * - if on the other hand, you need the element to be cloned, the view reference from the original - * example would not point to the clone, but rather to the original template that was cloned. In - * this case, you can access the clone via the cloneAttachFn: - * ```js - * var templateElement = angular.element('

      {{total}}

      '), - * scope = ....; - * - * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) { - * //attach the clone to DOM document at the right place - * }); - * - * //now we have reference to the cloned DOM via `clonedElement` - * ``` - * - * - * For information on how the compiler works, see the - * {@link guide/compiler AngularJS HTML Compiler} section of the Developer Guide. - * - * @knownIssue - * - * ### Double Compilation - * - Double compilation occurs when an already compiled part of the DOM gets - compiled again. This is an undesired effect and can lead to misbehaving directives, performance issues, - and memory leaks. Refer to the Compiler Guide {@link guide/compiler#double-compilation-and-how-to-avoid-it - section on double compilation} for an in-depth explanation and ways to avoid it. - * - */ - -var $compileMinErr = minErr('$compile'); - -function UNINITIALIZED_VALUE() {} -var _UNINITIALIZED_VALUE = new UNINITIALIZED_VALUE(); - -/** - * @ngdoc provider - * @name $compileProvider - * - * @description - */ -$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider']; -/** @this */ -function $CompileProvider($provide, $$sanitizeUriProvider) { - var hasDirectives = {}, - Suffix = 'Directive', - COMMENT_DIRECTIVE_REGEXP = /^\s*directive:\s*([\w-]+)\s+(.*)$/, - CLASS_DIRECTIVE_REGEXP = /(([\w-]+)(?::([^;]+))?;?)/, - ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'), - REQUIRE_PREFIX_REGEXP = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/; - - // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes - // The assumption is that future DOM event attribute names will begin with - // 'on' and be composed of only English letters. - var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/; - var bindingCache = createMap(); - - function parseIsolateBindings(scope, directiveName, isController) { - var LOCAL_REGEXP = /^\s*([@&<]|=(\*?))(\??)\s*([\w$]*)\s*$/; - - var bindings = createMap(); - - forEach(scope, function(definition, scopeName) { - if (definition in bindingCache) { - bindings[scopeName] = bindingCache[definition]; - return; - } - var match = definition.match(LOCAL_REGEXP); - - if (!match) { - throw $compileMinErr('iscp', - 'Invalid {3} for directive \'{0}\'.' + - ' Definition: {... {1}: \'{2}\' ...}', - directiveName, scopeName, definition, - (isController ? 'controller bindings definition' : - 'isolate scope definition')); - } - - bindings[scopeName] = { - mode: match[1][0], - collection: match[2] === '*', - optional: match[3] === '?', - attrName: match[4] || scopeName - }; - if (match[4]) { - bindingCache[definition] = bindings[scopeName]; - } - }); - - return bindings; - } - - function parseDirectiveBindings(directive, directiveName) { - var bindings = { - isolateScope: null, - bindToController: null - }; - if (isObject(directive.scope)) { - if (directive.bindToController === true) { - bindings.bindToController = parseIsolateBindings(directive.scope, - directiveName, true); - bindings.isolateScope = {}; - } else { - bindings.isolateScope = parseIsolateBindings(directive.scope, - directiveName, false); - } - } - if (isObject(directive.bindToController)) { - bindings.bindToController = - parseIsolateBindings(directive.bindToController, directiveName, true); - } - if (bindings.bindToController && !directive.controller) { - // There is no controller - throw $compileMinErr('noctrl', - 'Cannot bind to controller without directive \'{0}\'s controller.', - directiveName); - } - return bindings; - } - - function assertValidDirectiveName(name) { - var letter = name.charAt(0); - if (!letter || letter !== lowercase(letter)) { - throw $compileMinErr('baddir', 'Directive/Component name \'{0}\' is invalid. The first character must be a lowercase letter', name); - } - if (name !== name.trim()) { - throw $compileMinErr('baddir', - 'Directive/Component name \'{0}\' is invalid. The name should not contain leading or trailing whitespaces', - name); - } - } - - function getDirectiveRequire(directive) { - var require = directive.require || (directive.controller && directive.name); - - if (!isArray(require) && isObject(require)) { - forEach(require, function(value, key) { - var match = value.match(REQUIRE_PREFIX_REGEXP); - var name = value.substring(match[0].length); - if (!name) require[key] = match[0] + key; - }); - } - - return require; - } - - function getDirectiveRestrict(restrict, name) { - if (restrict && !(isString(restrict) && /[EACM]/.test(restrict))) { - throw $compileMinErr('badrestrict', - 'Restrict property \'{0}\' of directive \'{1}\' is invalid', - restrict, - name); - } - - return restrict || 'EA'; - } - - /** - * @ngdoc method - * @name $compileProvider#directive - * @kind function - * - * @description - * Register a new directive with the compiler. - * - * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which - * will match as ng-bind), or an object map of directives where the keys are the - * names and the values are the factories. - * @param {Function|Array} directiveFactory An injectable directive factory function. See the - * {@link guide/directive directive guide} and the {@link $compile compile API} for more info. - * @returns {ng.$compileProvider} Self for chaining. - */ - this.directive = function registerDirective(name, directiveFactory) { - assertArg(name, 'name'); - assertNotHasOwnProperty(name, 'directive'); - if (isString(name)) { - assertValidDirectiveName(name); - assertArg(directiveFactory, 'directiveFactory'); - if (!hasDirectives.hasOwnProperty(name)) { - hasDirectives[name] = []; - $provide.factory(name + Suffix, ['$injector', '$exceptionHandler', - function($injector, $exceptionHandler) { - var directives = []; - forEach(hasDirectives[name], function(directiveFactory, index) { - try { - var directive = $injector.invoke(directiveFactory); - if (isFunction(directive)) { - directive = { compile: valueFn(directive) }; - } else if (!directive.compile && directive.link) { - directive.compile = valueFn(directive.link); - } - directive.priority = directive.priority || 0; - directive.index = index; - directive.name = directive.name || name; - directive.require = getDirectiveRequire(directive); - directive.restrict = getDirectiveRestrict(directive.restrict, name); - directive.$$moduleName = directiveFactory.$$moduleName; - directives.push(directive); - } catch (e) { - $exceptionHandler(e); - } - }); - return directives; - }]); - } - hasDirectives[name].push(directiveFactory); - } else { - forEach(name, reverseParams(registerDirective)); - } - return this; - }; - - /** - * @ngdoc method - * @name $compileProvider#component - * @module ng - * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match ``), - * or an object map of components where the keys are the names and the values are the component definition objects. - * @param {Object} options Component definition object (a simplified - * {@link ng.$compile#directive-definition-object directive definition object}), - * with the following properties (all optional): - * - * - `controller` – `{(string|function()=}` – controller constructor function that should be - * associated with newly created scope or the name of a {@link ng.$compile#-controller- - * registered controller} if passed as a string. An empty `noop` function by default. - * - `controllerAs` – `{string=}` – identifier name for to reference the controller in the component's scope. - * If present, the controller will be published to scope under the `controllerAs` name. - * If not present, this will default to be `$ctrl`. - * - `template` – `{string=|function()=}` – html template as a string or a function that - * returns an html template as a string which should be used as the contents of this component. - * Empty string by default. - * - * If `template` is a function, then it is {@link auto.$injector#invoke injected} with - * the following locals: - * - * - `$element` - Current element - * - `$attrs` - Current attributes object for the element - * - * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html - * template that should be used as the contents of this component. - * - * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with - * the following locals: - * - * - `$element` - Current element - * - `$attrs` - Current attributes object for the element - * - * - `bindings` – `{object=}` – defines bindings between DOM attributes and component properties. - * Component properties are always bound to the component controller and not to the scope. - * See {@link ng.$compile#-bindtocontroller- `bindToController`}. - * - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled. - * Disabled by default. - * - `require` - `{Object=}` - requires the controllers of other directives and binds them to - * this component's controller. The object keys specify the property names under which the required - * controllers (object values) will be bound. See {@link ng.$compile#-require- `require`}. - * - `$...` – additional properties to attach to the directive factory function and the controller - * constructor function. (This is used by the component router to annotate) - * - * @returns {ng.$compileProvider} the compile provider itself, for chaining of function calls. - * @description - * Register a **component definition** with the compiler. This is a shorthand for registering a special - * type of directive, which represents a self-contained UI component in your application. Such components - * are always isolated (i.e. `scope: {}`) and are always restricted to elements (i.e. `restrict: 'E'`). - * - * Component definitions are very simple and do not require as much configuration as defining general - * directives. Component definitions usually consist only of a template and a controller backing it. - * - * In order to make the definition easier, components enforce best practices like use of `controllerAs`, - * `bindToController`. They always have **isolate scope** and are restricted to elements. - * - * Here are a few examples of how you would usually define components: - * - * ```js - * var myMod = angular.module(...); - * myMod.component('myComp', { - * template: '
      My name is {{$ctrl.name}}
      ', - * controller: function() { - * this.name = 'shahar'; - * } - * }); - * - * myMod.component('myComp', { - * template: '
      My name is {{$ctrl.name}}
      ', - * bindings: {name: '@'} - * }); - * - * myMod.component('myComp', { - * templateUrl: 'views/my-comp.html', - * controller: 'MyCtrl', - * controllerAs: 'ctrl', - * bindings: {name: '@'} - * }); - * - * ``` - * For more examples, and an in-depth guide, see the {@link guide/component component guide}. - * - *
      - * See also {@link ng.$compileProvider#directive $compileProvider.directive()}. - */ - this.component = function registerComponent(name, options) { - if (!isString(name)) { - forEach(name, reverseParams(bind(this, registerComponent))); - return this; - } - - var controller = options.controller || function() {}; - - function factory($injector) { - function makeInjectable(fn) { - if (isFunction(fn) || isArray(fn)) { - return /** @this */ function(tElement, tAttrs) { - return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs}); - }; - } else { - return fn; - } - } - - var template = (!options.template && !options.templateUrl ? '' : options.template); - var ddo = { - controller: controller, - controllerAs: identifierForController(options.controller) || options.controllerAs || '$ctrl', - template: makeInjectable(template), - templateUrl: makeInjectable(options.templateUrl), - transclude: options.transclude, - scope: {}, - bindToController: options.bindings || {}, - restrict: 'E', - require: options.require - }; - - // Copy annotations (starting with $) over to the DDO - forEach(options, function(val, key) { - if (key.charAt(0) === '$') ddo[key] = val; - }); - - return ddo; - } - - // TODO(pete) remove the following `forEach` before we release 1.6.0 - // The component-router@0.2.0 looks for the annotations on the controller constructor - // Nothing in AngularJS looks for annotations on the factory function but we can't remove - // it from 1.5.x yet. - - // Copy any annotation properties (starting with $) over to the factory and controller constructor functions - // These could be used by libraries such as the new component router - forEach(options, function(val, key) { - if (key.charAt(0) === '$') { - factory[key] = val; - // Don't try to copy over annotations to named controller - if (isFunction(controller)) controller[key] = val; - } - }); - - factory.$inject = ['$injector']; - - return this.directive(name, factory); - }; - - - /** - * @ngdoc method - * @name $compileProvider#aHrefSanitizationWhitelist - * @kind function - * - * @description - * Retrieves or overrides the default regular expression that is used for whitelisting of safe - * urls during a[href] sanitization. - * - * The sanitization is a security measure aimed at preventing XSS attacks via html links. - * - * Any url about to be assigned to a[href] via data-binding is first normalized and turned into - * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` - * regular expression. If a match is found, the original url is written into the dom. Otherwise, - * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. - * - * @param {RegExp=} regexp New regexp to whitelist urls with. - * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for - * chaining otherwise. - */ - this.aHrefSanitizationWhitelist = function(regexp) { - if (isDefined(regexp)) { - $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp); - return this; - } else { - return $$sanitizeUriProvider.aHrefSanitizationWhitelist(); - } - }; - - - /** - * @ngdoc method - * @name $compileProvider#imgSrcSanitizationWhitelist - * @kind function - * - * @description - * Retrieves or overrides the default regular expression that is used for whitelisting of safe - * urls during img[src] sanitization. - * - * The sanitization is a security measure aimed at prevent XSS attacks via html links. - * - * Any url about to be assigned to img[src] via data-binding is first normalized and turned into - * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` - * regular expression. If a match is found, the original url is written into the dom. Otherwise, - * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. - * - * @param {RegExp=} regexp New regexp to whitelist urls with. - * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for - * chaining otherwise. - */ - this.imgSrcSanitizationWhitelist = function(regexp) { - if (isDefined(regexp)) { - $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp); - return this; - } else { - return $$sanitizeUriProvider.imgSrcSanitizationWhitelist(); - } - }; - - /** - * @ngdoc method - * @name $compileProvider#debugInfoEnabled - * - * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the - * current debugInfoEnabled state - * @returns {*} current value if used as getter or itself (chaining) if used as setter - * - * @kind function - * - * @description - * Call this method to enable/disable various debug runtime information in the compiler such as adding - * binding information and a reference to the current scope on to DOM elements. - * If enabled, the compiler will add the following to DOM elements that have been bound to the scope - * * `ng-binding` CSS class - * * `ng-scope` and `ng-isolated-scope` CSS classes - * * `$binding` data property containing an array of the binding expressions - * * Data properties used by the {@link angular.element#methods `scope()`/`isolateScope()` methods} to return - * the element's scope. - * * Placeholder comments will contain information about what directive and binding caused the placeholder. - * E.g. ``. - * - * You may want to disable this in production for a significant performance boost. See - * {@link guide/production#disabling-debug-data Disabling Debug Data} for more. - * - * The default value is true. - */ - var debugInfoEnabled = true; - this.debugInfoEnabled = function(enabled) { - if (isDefined(enabled)) { - debugInfoEnabled = enabled; - return this; - } - return debugInfoEnabled; - }; - - /** - * @ngdoc method - * @name $compileProvider#preAssignBindingsEnabled - * - * @param {boolean=} enabled update the preAssignBindingsEnabled state if provided, otherwise just return the - * current preAssignBindingsEnabled state - * @returns {*} current value if used as getter or itself (chaining) if used as setter - * - * @kind function - * - * @description - * Call this method to enable/disable whether directive controllers are assigned bindings before - * calling the controller's constructor. - * If enabled (true), the compiler assigns the value of each of the bindings to the - * properties of the controller object before the constructor of this object is called. - * - * If disabled (false), the compiler calls the constructor first before assigning bindings. - * - * The default value is false. - * - * @deprecated - * sinceVersion="1.6.0" - * removeVersion="1.7.0" - * - * This method and the option to assign the bindings before calling the controller's constructor - * will be removed in v1.7.0. - */ - var preAssignBindingsEnabled = false; - this.preAssignBindingsEnabled = function(enabled) { - if (isDefined(enabled)) { - preAssignBindingsEnabled = enabled; - return this; - } - return preAssignBindingsEnabled; - }; - - /** - * @ngdoc method - * @name $compileProvider#strictComponentBindingsEnabled - * - * @param {boolean=} enabled update the strictComponentBindingsEnabled state if provided, otherwise just return the - * current strictComponentBindingsEnabled state - * @returns {*} current value if used as getter or itself (chaining) if used as setter - * - * @kind function - * - * @description - * Call this method to enable/disable strict component bindings check. If enabled, the compiler will enforce that - * for all bindings of a component that are not set as optional with `?`, an attribute needs to be provided - * on the component's HTML tag. - * - * The default value is false. - */ - var strictComponentBindingsEnabled = false; - this.strictComponentBindingsEnabled = function(enabled) { - if (isDefined(enabled)) { - strictComponentBindingsEnabled = enabled; - return this; - } - return strictComponentBindingsEnabled; - }; - - var TTL = 10; - /** - * @ngdoc method - * @name $compileProvider#onChangesTtl - * @description - * - * Sets the number of times `$onChanges` hooks can trigger new changes before giving up and - * assuming that the model is unstable. - * - * The current default is 10 iterations. - * - * In complex applications it's possible that dependencies between `$onChanges` hooks and bindings will result - * in several iterations of calls to these hooks. However if an application needs more than the default 10 - * iterations to stabilize then you should investigate what is causing the model to continuously change during - * the `$onChanges` hook execution. - * - * Increasing the TTL could have performance implications, so you should not change it without proper justification. - * - * @param {number} limit The number of `$onChanges` hook iterations. - * @returns {number|object} the current limit (or `this` if called as a setter for chaining) - */ - this.onChangesTtl = function(value) { - if (arguments.length) { - TTL = value; - return this; - } - return TTL; - }; - - var commentDirectivesEnabledConfig = true; - /** - * @ngdoc method - * @name $compileProvider#commentDirectivesEnabled - * @description - * - * It indicates to the compiler - * whether or not directives on comments should be compiled. - * Defaults to `true`. - * - * Calling this function with false disables the compilation of directives - * on comments for the whole application. - * This results in a compilation performance gain, - * as the compiler doesn't have to check comments when looking for directives. - * This should however only be used if you are sure that no comment directives are used in - * the application (including any 3rd party directives). - * - * @param {boolean} enabled `false` if the compiler may ignore directives on comments - * @returns {boolean|object} the current value (or `this` if called as a setter for chaining) - */ - this.commentDirectivesEnabled = function(value) { - if (arguments.length) { - commentDirectivesEnabledConfig = value; - return this; - } - return commentDirectivesEnabledConfig; - }; - - - var cssClassDirectivesEnabledConfig = true; - /** - * @ngdoc method - * @name $compileProvider#cssClassDirectivesEnabled - * @description - * - * It indicates to the compiler - * whether or not directives on element classes should be compiled. - * Defaults to `true`. - * - * Calling this function with false disables the compilation of directives - * on element classes for the whole application. - * This results in a compilation performance gain, - * as the compiler doesn't have to check element classes when looking for directives. - * This should however only be used if you are sure that no class directives are used in - * the application (including any 3rd party directives). - * - * @param {boolean} enabled `false` if the compiler may ignore directives on element classes - * @returns {boolean|object} the current value (or `this` if called as a setter for chaining) - */ - this.cssClassDirectivesEnabled = function(value) { - if (arguments.length) { - cssClassDirectivesEnabledConfig = value; - return this; - } - return cssClassDirectivesEnabledConfig; - }; - - this.$get = [ - '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse', - '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri', - function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse, - $controller, $rootScope, $sce, $animate, $$sanitizeUri) { - - var SIMPLE_ATTR_NAME = /^\w/; - var specialAttrHolder = window.document.createElement('div'); - - - var commentDirectivesEnabled = commentDirectivesEnabledConfig; - var cssClassDirectivesEnabled = cssClassDirectivesEnabledConfig; - - - var onChangesTtl = TTL; - // The onChanges hooks should all be run together in a single digest - // When changes occur, the call to trigger their hooks will be added to this queue - var onChangesQueue; - - // This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest - function flushOnChangesQueue() { - try { - if (!(--onChangesTtl)) { - // We have hit the TTL limit so reset everything - onChangesQueue = undefined; - throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\n', TTL); - } - // We must run this hook in an apply since the $$postDigest runs outside apply - $rootScope.$apply(function() { - var errors = []; - for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) { - try { - onChangesQueue[i](); - } catch (e) { - errors.push(e); - } - } - // Reset the queue to trigger a new schedule next time there is a change - onChangesQueue = undefined; - if (errors.length) { - throw errors; - } - }); - } finally { - onChangesTtl++; - } - } - - - function Attributes(element, attributesToCopy) { - if (attributesToCopy) { - var keys = Object.keys(attributesToCopy); - var i, l, key; - - for (i = 0, l = keys.length; i < l; i++) { - key = keys[i]; - this[key] = attributesToCopy[key]; - } - } else { - this.$attr = {}; - } - - this.$$element = element; - } - - Attributes.prototype = { - /** - * @ngdoc method - * @name $compile.directive.Attributes#$normalize - * @kind function - * - * @description - * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or - * `data-`) to its normalized, camelCase form. - * - * Also there is special case for Moz prefix starting with upper case letter. - * - * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} - * - * @param {string} name Name to normalize - */ - $normalize: directiveNormalize, - - - /** - * @ngdoc method - * @name $compile.directive.Attributes#$addClass - * @kind function - * - * @description - * Adds the CSS class value specified by the classVal parameter to the element. If animations - * are enabled then an animation will be triggered for the class addition. - * - * @param {string} classVal The className value that will be added to the element - */ - $addClass: function(classVal) { - if (classVal && classVal.length > 0) { - $animate.addClass(this.$$element, classVal); - } - }, - - /** - * @ngdoc method - * @name $compile.directive.Attributes#$removeClass - * @kind function - * - * @description - * Removes the CSS class value specified by the classVal parameter from the element. If - * animations are enabled then an animation will be triggered for the class removal. - * - * @param {string} classVal The className value that will be removed from the element - */ - $removeClass: function(classVal) { - if (classVal && classVal.length > 0) { - $animate.removeClass(this.$$element, classVal); - } - }, - - /** - * @ngdoc method - * @name $compile.directive.Attributes#$updateClass - * @kind function - * - * @description - * Adds and removes the appropriate CSS class values to the element based on the difference - * between the new and old CSS class values (specified as newClasses and oldClasses). - * - * @param {string} newClasses The current CSS className value - * @param {string} oldClasses The former CSS className value - */ - $updateClass: function(newClasses, oldClasses) { - var toAdd = tokenDifference(newClasses, oldClasses); - if (toAdd && toAdd.length) { - $animate.addClass(this.$$element, toAdd); - } - - var toRemove = tokenDifference(oldClasses, newClasses); - if (toRemove && toRemove.length) { - $animate.removeClass(this.$$element, toRemove); - } - }, - - /** - * Set a normalized attribute on the element in a way such that all directives - * can share the attribute. This function properly handles boolean attributes. - * @param {string} key Normalized key. (ie ngAttribute) - * @param {string|boolean} value The value to set. If `null` attribute will be deleted. - * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute. - * Defaults to true. - * @param {string=} attrName Optional none normalized name. Defaults to key. - */ - $set: function(key, value, writeAttr, attrName) { - // TODO: decide whether or not to throw an error if "class" - //is set through this function since it may cause $updateClass to - //become unstable. - - var node = this.$$element[0], - booleanKey = getBooleanAttrName(node, key), - aliasedKey = getAliasedAttrName(key), - observer = key, - nodeName; - - if (booleanKey) { - this.$$element.prop(key, value); - attrName = booleanKey; - } else if (aliasedKey) { - this[aliasedKey] = value; - observer = aliasedKey; - } - - this[key] = value; - - // translate normalized key to actual key - if (attrName) { - this.$attr[key] = attrName; - } else { - attrName = this.$attr[key]; - if (!attrName) { - this.$attr[key] = attrName = snake_case(key, '-'); - } - } - - nodeName = nodeName_(this.$$element); - - if ((nodeName === 'a' && (key === 'href' || key === 'xlinkHref')) || - (nodeName === 'img' && key === 'src')) { - // sanitize a[href] and img[src] values - this[key] = value = $$sanitizeUri(value, key === 'src'); - } else if (nodeName === 'img' && key === 'srcset' && isDefined(value)) { - // sanitize img[srcset] values - var result = ''; - - // first check if there are spaces because it's not the same pattern - var trimmedSrcset = trim(value); - // ( 999x ,| 999w ,| ,|, ) - var srcPattern = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/; - var pattern = /\s/.test(trimmedSrcset) ? srcPattern : /(,)/; - - // split srcset into tuple of uri and descriptor except for the last item - var rawUris = trimmedSrcset.split(pattern); - - // for each tuples - var nbrUrisWith2parts = Math.floor(rawUris.length / 2); - for (var i = 0; i < nbrUrisWith2parts; i++) { - var innerIdx = i * 2; - // sanitize the uri - result += $$sanitizeUri(trim(rawUris[innerIdx]), true); - // add the descriptor - result += (' ' + trim(rawUris[innerIdx + 1])); - } - - // split the last item into uri and descriptor - var lastTuple = trim(rawUris[i * 2]).split(/\s/); - - // sanitize the last uri - result += $$sanitizeUri(trim(lastTuple[0]), true); - - // and add the last descriptor if any - if (lastTuple.length === 2) { - result += (' ' + trim(lastTuple[1])); - } - this[key] = value = result; - } - - if (writeAttr !== false) { - if (value === null || isUndefined(value)) { - this.$$element.removeAttr(attrName); - } else { - if (SIMPLE_ATTR_NAME.test(attrName)) { - this.$$element.attr(attrName, value); - } else { - setSpecialAttr(this.$$element[0], attrName, value); - } - } - } - - // fire observers - var $$observers = this.$$observers; - if ($$observers) { - forEach($$observers[observer], function(fn) { - try { - fn(value); - } catch (e) { - $exceptionHandler(e); - } - }); - } - }, - - - /** - * @ngdoc method - * @name $compile.directive.Attributes#$observe - * @kind function - * - * @description - * Observes an interpolated attribute. - * - * The observer function will be invoked once during the next `$digest` following - * compilation. The observer is then invoked whenever the interpolated value - * changes. - * - * @param {string} key Normalized key. (ie ngAttribute) . - * @param {function(interpolatedValue)} fn Function that will be called whenever - the interpolated value of the attribute changes. - * See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation - * guide} for more info. - * @returns {function()} Returns a deregistration function for this observer. - */ - $observe: function(key, fn) { - var attrs = this, - $$observers = (attrs.$$observers || (attrs.$$observers = createMap())), - listeners = ($$observers[key] || ($$observers[key] = [])); - - listeners.push(fn); - $rootScope.$evalAsync(function() { - if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) { - // no one registered attribute interpolation function, so lets call it manually - fn(attrs[key]); - } - }); - - return function() { - arrayRemove(listeners, fn); - }; - } - }; - - function setSpecialAttr(element, attrName, value) { - // Attributes names that do not start with letters (such as `(click)`) cannot be set using `setAttribute` - // so we have to jump through some hoops to get such an attribute - // https://github.com/angular/angular.js/pull/13318 - specialAttrHolder.innerHTML = ''; - var attributes = specialAttrHolder.firstChild.attributes; - var attribute = attributes[0]; - // We have to remove the attribute from its container element before we can add it to the destination element - attributes.removeNamedItem(attribute.name); - attribute.value = value; - element.attributes.setNamedItem(attribute); - } - - function safeAddClass($element, className) { - try { - $element.addClass(className); - } catch (e) { - // ignore, since it means that we are trying to set class on - // SVG element, where class name is read-only. - } - } - - - var startSymbol = $interpolate.startSymbol(), - endSymbol = $interpolate.endSymbol(), - denormalizeTemplate = (startSymbol === '{{' && endSymbol === '}}') - ? identity - : function denormalizeTemplate(template) { - return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol); - }, - NG_ATTR_BINDING = /^ngAttr[A-Z]/; - var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/; - - compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) { - var bindings = $element.data('$binding') || []; - - if (isArray(binding)) { - bindings = bindings.concat(binding); - } else { - bindings.push(binding); - } - - $element.data('$binding', bindings); - } : noop; - - compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) { - safeAddClass($element, 'ng-binding'); - } : noop; - - compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) { - var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope'; - $element.data(dataName, scope); - } : noop; - - compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) { - safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope'); - } : noop; - - compile.$$createComment = function(directiveName, comment) { - var content = ''; - if (debugInfoEnabled) { - content = ' ' + (directiveName || '') + ': '; - if (comment) content += comment + ' '; - } - return window.document.createComment(content); - }; - - return compile; - - //================================ - - function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, - previousCompileContext) { - if (!($compileNodes instanceof jqLite)) { - // jquery always rewraps, whereas we need to preserve the original selector so that we can - // modify it. - $compileNodes = jqLite($compileNodes); - } - var compositeLinkFn = - compileNodes($compileNodes, transcludeFn, $compileNodes, - maxPriority, ignoreDirective, previousCompileContext); - compile.$$addScopeClass($compileNodes); - var namespace = null; - return function publicLinkFn(scope, cloneConnectFn, options) { - if (!$compileNodes) { - throw $compileMinErr('multilink', 'This element has already been linked.'); - } - assertArg(scope, 'scope'); - - if (previousCompileContext && previousCompileContext.needsNewScope) { - // A parent directive did a replace and a directive on this element asked - // for transclusion, which caused us to lose a layer of element on which - // we could hold the new transclusion scope, so we will create it manually - // here. - scope = scope.$parent.$new(); - } - - options = options || {}; - var parentBoundTranscludeFn = options.parentBoundTranscludeFn, - transcludeControllers = options.transcludeControllers, - futureParentElement = options.futureParentElement; - - // When `parentBoundTranscludeFn` is passed, it is a - // `controllersBoundTransclude` function (it was previously passed - // as `transclude` to directive.link) so we must unwrap it to get - // its `boundTranscludeFn` - if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) { - parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude; - } - - if (!namespace) { - namespace = detectNamespaceForChildElements(futureParentElement); - } - var $linkNode; - if (namespace !== 'html') { - // When using a directive with replace:true and templateUrl the $compileNodes - // (or a child element inside of them) - // might change, so we need to recreate the namespace adapted compileNodes - // for call to the link function. - // Note: This will already clone the nodes... - $linkNode = jqLite( - wrapTemplate(namespace, jqLite('
      ').append($compileNodes).html()) - ); - } else if (cloneConnectFn) { - // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart - // and sometimes changes the structure of the DOM. - $linkNode = JQLitePrototype.clone.call($compileNodes); - } else { - $linkNode = $compileNodes; - } - - if (transcludeControllers) { - for (var controllerName in transcludeControllers) { - $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance); - } - } - - compile.$$addScopeInfo($linkNode, scope); - - if (cloneConnectFn) cloneConnectFn($linkNode, scope); - if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn); - - if (!cloneConnectFn) { - $compileNodes = compositeLinkFn = null; - } - return $linkNode; - }; - } - - function detectNamespaceForChildElements(parentElement) { - // TODO: Make this detect MathML as well... - var node = parentElement && parentElement[0]; - if (!node) { - return 'html'; - } else { - return nodeName_(node) !== 'foreignobject' && toString.call(node).match(/SVG/) ? 'svg' : 'html'; - } - } - - /** - * Compile function matches each node in nodeList against the directives. Once all directives - * for a particular node are collected their compile functions are executed. The compile - * functions return values - the linking functions - are combined into a composite linking - * function, which is the a linking function for the node. - * - * @param {NodeList} nodeList an array of nodes or NodeList to compile - * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the - * scope argument is auto-generated to the new child of the transcluded parent scope. - * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then - * the rootElement must be set the jqLite collection of the compile root. This is - * needed so that the jqLite collection items can be replaced with widgets. - * @param {number=} maxPriority Max directive priority. - * @returns {Function} A composite linking function of all of the matched directives or null. - */ - function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective, - previousCompileContext) { - var linkFns = [], - // `nodeList` can be either an element's `.childNodes` (live NodeList) - // or a jqLite/jQuery collection or an array - notLiveList = isArray(nodeList) || (nodeList instanceof jqLite), - attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound; - - - for (var i = 0; i < nodeList.length; i++) { - attrs = new Attributes(); - - // Support: IE 11 only - // Workaround for #11781 and #14924 - if (msie === 11) { - mergeConsecutiveTextNodes(nodeList, i, notLiveList); - } - - // We must always refer to `nodeList[i]` hereafter, - // since the nodes can be replaced underneath us. - directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined, - ignoreDirective); - - nodeLinkFn = (directives.length) - ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement, - null, [], [], previousCompileContext) - : null; - - if (nodeLinkFn && nodeLinkFn.scope) { - compile.$$addScopeClass(attrs.$$element); - } - - childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || - !(childNodes = nodeList[i].childNodes) || - !childNodes.length) - ? null - : compileNodes(childNodes, - nodeLinkFn ? ( - (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement) - && nodeLinkFn.transclude) : transcludeFn); - - if (nodeLinkFn || childLinkFn) { - linkFns.push(i, nodeLinkFn, childLinkFn); - linkFnFound = true; - nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn; - } - - //use the previous context only for the first element in the virtual group - previousCompileContext = null; - } - - // return a linking function if we have found anything, null otherwise - return linkFnFound ? compositeLinkFn : null; - - function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) { - var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn; - var stableNodeList; - - - if (nodeLinkFnFound) { - // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our - // offsets don't get screwed up - var nodeListLength = nodeList.length; - stableNodeList = new Array(nodeListLength); - - // create a sparse array by only copying the elements which have a linkFn - for (i = 0; i < linkFns.length; i += 3) { - idx = linkFns[i]; - stableNodeList[idx] = nodeList[idx]; - } - } else { - stableNodeList = nodeList; - } - - for (i = 0, ii = linkFns.length; i < ii;) { - node = stableNodeList[linkFns[i++]]; - nodeLinkFn = linkFns[i++]; - childLinkFn = linkFns[i++]; - - if (nodeLinkFn) { - if (nodeLinkFn.scope) { - childScope = scope.$new(); - compile.$$addScopeInfo(jqLite(node), childScope); - } else { - childScope = scope; - } - - if (nodeLinkFn.transcludeOnThisElement) { - childBoundTranscludeFn = createBoundTranscludeFn( - scope, nodeLinkFn.transclude, parentBoundTranscludeFn); - - } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) { - childBoundTranscludeFn = parentBoundTranscludeFn; - - } else if (!parentBoundTranscludeFn && transcludeFn) { - childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn); - - } else { - childBoundTranscludeFn = null; - } - - nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn); - - } else if (childLinkFn) { - childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn); - } - } - } - } - - function mergeConsecutiveTextNodes(nodeList, idx, notLiveList) { - var node = nodeList[idx]; - var parent = node.parentNode; - var sibling; - - if (node.nodeType !== NODE_TYPE_TEXT) { - return; - } - - while (true) { - sibling = parent ? node.nextSibling : nodeList[idx + 1]; - if (!sibling || sibling.nodeType !== NODE_TYPE_TEXT) { - break; - } - - node.nodeValue = node.nodeValue + sibling.nodeValue; - - if (sibling.parentNode) { - sibling.parentNode.removeChild(sibling); - } - if (notLiveList && sibling === nodeList[idx + 1]) { - nodeList.splice(idx + 1, 1); - } - } - } - - function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) { - function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) { - - if (!transcludedScope) { - transcludedScope = scope.$new(false, containingScope); - transcludedScope.$$transcluded = true; - } - - return transcludeFn(transcludedScope, cloneFn, { - parentBoundTranscludeFn: previousBoundTranscludeFn, - transcludeControllers: controllers, - futureParentElement: futureParentElement - }); - } - - // We need to attach the transclusion slots onto the `boundTranscludeFn` - // so that they are available inside the `controllersBoundTransclude` function - var boundSlots = boundTranscludeFn.$$slots = createMap(); - for (var slotName in transcludeFn.$$slots) { - if (transcludeFn.$$slots[slotName]) { - boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn); - } else { - boundSlots[slotName] = null; - } - } - - return boundTranscludeFn; - } - - /** - * Looks for directives on the given node and adds them to the directive collection which is - * sorted. - * - * @param node Node to search. - * @param directives An array to which the directives are added to. This array is sorted before - * the function returns. - * @param attrs The shared attrs object which is used to populate the normalized attributes. - * @param {number=} maxPriority Max directive priority. - */ - function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) { - var nodeType = node.nodeType, - attrsMap = attrs.$attr, - match, - nodeName, - className; - - switch (nodeType) { - case NODE_TYPE_ELEMENT: /* Element */ - - nodeName = nodeName_(node); - - // use the node name: - addDirective(directives, - directiveNormalize(nodeName), 'E', maxPriority, ignoreDirective); - - // iterate over the attributes - for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes, - j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) { - var attrStartName = false; - var attrEndName = false; - - attr = nAttrs[j]; - name = attr.name; - value = attr.value; - - // support ngAttr attribute binding - ngAttrName = directiveNormalize(name); - isNgAttr = NG_ATTR_BINDING.test(ngAttrName); - if (isNgAttr) { - name = name.replace(PREFIX_REGEXP, '') - .substr(8).replace(/_(.)/g, function(match, letter) { - return letter.toUpperCase(); - }); - } - - var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE); - if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) { - attrStartName = name; - attrEndName = name.substr(0, name.length - 5) + 'end'; - name = name.substr(0, name.length - 6); - } - - nName = directiveNormalize(name.toLowerCase()); - attrsMap[nName] = name; - if (isNgAttr || !attrs.hasOwnProperty(nName)) { - attrs[nName] = value; - if (getBooleanAttrName(node, nName)) { - attrs[nName] = true; // presence means true - } - } - addAttrInterpolateDirective(node, directives, value, nName, isNgAttr); - addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName, - attrEndName); - } - - if (nodeName === 'input' && node.getAttribute('type') === 'hidden') { - // Hidden input elements can have strange behaviour when navigating back to the page - // This tells the browser not to try to cache and reinstate previous values - node.setAttribute('autocomplete', 'off'); - } - - // use class as directive - if (!cssClassDirectivesEnabled) break; - className = node.className; - if (isObject(className)) { - // Maybe SVGAnimatedString - className = className.animVal; - } - if (isString(className) && className !== '') { - while ((match = CLASS_DIRECTIVE_REGEXP.exec(className))) { - nName = directiveNormalize(match[2]); - if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) { - attrs[nName] = trim(match[3]); - } - className = className.substr(match.index + match[0].length); - } - } - break; - case NODE_TYPE_TEXT: /* Text Node */ - addTextInterpolateDirective(directives, node.nodeValue); - break; - case NODE_TYPE_COMMENT: /* Comment */ - if (!commentDirectivesEnabled) break; - collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective); - break; - } - - directives.sort(byPriority); - return directives; - } - - function collectCommentDirectives(node, directives, attrs, maxPriority, ignoreDirective) { - // function created because of performance, try/catch disables - // the optimization of the whole function #14848 - try { - var match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue); - if (match) { - var nName = directiveNormalize(match[1]); - if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) { - attrs[nName] = trim(match[2]); - } - } - } catch (e) { - // turns out that under some circumstances IE9 throws errors when one attempts to read - // comment's node value. - // Just ignore it and continue. (Can't seem to reproduce in test case.) - } - } - - /** - * Given a node with a directive-start it collects all of the siblings until it finds - * directive-end. - * @param node - * @param attrStart - * @param attrEnd - * @returns {*} - */ - function groupScan(node, attrStart, attrEnd) { - var nodes = []; - var depth = 0; - if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { - do { - if (!node) { - throw $compileMinErr('uterdir', - 'Unterminated attribute, found \'{0}\' but no matching \'{1}\' found.', - attrStart, attrEnd); - } - if (node.nodeType === NODE_TYPE_ELEMENT) { - if (node.hasAttribute(attrStart)) depth++; - if (node.hasAttribute(attrEnd)) depth--; - } - nodes.push(node); - node = node.nextSibling; - } while (depth > 0); - } else { - nodes.push(node); - } - - return jqLite(nodes); - } - - /** - * Wrapper for linking function which converts normal linking function into a grouped - * linking function. - * @param linkFn - * @param attrStart - * @param attrEnd - * @returns {Function} - */ - function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) { - return function groupedElementsLink(scope, element, attrs, controllers, transcludeFn) { - element = groupScan(element[0], attrStart, attrEnd); - return linkFn(scope, element, attrs, controllers, transcludeFn); - }; - } - - /** - * A function generator that is used to support both eager and lazy compilation - * linking function. - * @param eager - * @param $compileNodes - * @param transcludeFn - * @param maxPriority - * @param ignoreDirective - * @param previousCompileContext - * @returns {Function} - */ - function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) { - var compiled; - - if (eager) { - return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); - } - return /** @this */ function lazyCompilation() { - if (!compiled) { - compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); - - // Null out all of these references in order to make them eligible for garbage collection - // since this is a potentially long lived closure - $compileNodes = transcludeFn = previousCompileContext = null; - } - return compiled.apply(this, arguments); - }; - } - - /** - * Once the directives have been collected, their compile functions are executed. This method - * is responsible for inlining directive templates as well as terminating the application - * of the directives if the terminal directive has been reached. - * - * @param {Array} directives Array of collected directives to execute their compile function. - * this needs to be pre-sorted by priority order. - * @param {Node} compileNode The raw DOM node to apply the compile functions to - * @param {Object} templateAttrs The shared attribute function - * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the - * scope argument is auto-generated to the new - * child of the transcluded parent scope. - * @param {JQLite} jqCollection If we are working on the root of the compile tree then this - * argument has the root jqLite array so that we can replace nodes - * on it. - * @param {Object=} originalReplaceDirective An optional directive that will be ignored when - * compiling the transclusion. - * @param {Array.} preLinkFns - * @param {Array.} postLinkFns - * @param {Object} previousCompileContext Context used for previous compilation of the current - * node - * @returns {Function} linkFn - */ - function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, - jqCollection, originalReplaceDirective, preLinkFns, postLinkFns, - previousCompileContext) { - previousCompileContext = previousCompileContext || {}; - - var terminalPriority = -Number.MAX_VALUE, - newScopeDirective = previousCompileContext.newScopeDirective, - controllerDirectives = previousCompileContext.controllerDirectives, - newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective, - templateDirective = previousCompileContext.templateDirective, - nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective, - hasTranscludeDirective = false, - hasTemplate = false, - hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective, - $compileNode = templateAttrs.$$element = jqLite(compileNode), - directive, - directiveName, - $template, - replaceDirective = originalReplaceDirective, - childTranscludeFn = transcludeFn, - linkFn, - didScanForMultipleTransclusion = false, - mightHaveMultipleTransclusionError = false, - directiveValue; - - // executes all directives on the current element - for (var i = 0, ii = directives.length; i < ii; i++) { - directive = directives[i]; - var attrStart = directive.$$start; - var attrEnd = directive.$$end; - - // collect multiblock sections - if (attrStart) { - $compileNode = groupScan(compileNode, attrStart, attrEnd); - } - $template = undefined; - - if (terminalPriority > directive.priority) { - break; // prevent further processing of directives - } - - directiveValue = directive.scope; - - if (directiveValue) { - - // skip the check for directives with async templates, we'll check the derived sync - // directive when the template arrives - if (!directive.templateUrl) { - if (isObject(directiveValue)) { - // This directive is trying to add an isolated scope. - // Check that there is no scope of any kind already - assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective, - directive, $compileNode); - newIsolateScopeDirective = directive; - } else { - // This directive is trying to add a child scope. - // Check that there is no isolated scope already - assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive, - $compileNode); - } - } - - newScopeDirective = newScopeDirective || directive; - } - - directiveName = directive.name; - - // If we encounter a condition that can result in transclusion on the directive, - // then scan ahead in the remaining directives for others that may cause a multiple - // transclusion error to be thrown during the compilation process. If a matching directive - // is found, then we know that when we encounter a transcluded directive, we need to eagerly - // compile the `transclude` function rather than doing it lazily in order to throw - // exceptions at the correct time - if (!didScanForMultipleTransclusion && ((directive.replace && (directive.templateUrl || directive.template)) - || (directive.transclude && !directive.$$tlb))) { - var candidateDirective; - - for (var scanningIndex = i + 1; (candidateDirective = directives[scanningIndex++]);) { - if ((candidateDirective.transclude && !candidateDirective.$$tlb) - || (candidateDirective.replace && (candidateDirective.templateUrl || candidateDirective.template))) { - mightHaveMultipleTransclusionError = true; - break; - } - } - - didScanForMultipleTransclusion = true; - } - - if (!directive.templateUrl && directive.controller) { - controllerDirectives = controllerDirectives || createMap(); - assertNoDuplicate('\'' + directiveName + '\' controller', - controllerDirectives[directiveName], directive, $compileNode); - controllerDirectives[directiveName] = directive; - } - - directiveValue = directive.transclude; - - if (directiveValue) { - hasTranscludeDirective = true; - - // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion. - // This option should only be used by directives that know how to safely handle element transclusion, - // where the transcluded nodes are added or replaced after linking. - if (!directive.$$tlb) { - assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode); - nonTlbTranscludeDirective = directive; - } - - if (directiveValue === 'element') { - hasElementTranscludeDirective = true; - terminalPriority = directive.priority; - $template = $compileNode; - $compileNode = templateAttrs.$$element = - jqLite(compile.$$createComment(directiveName, templateAttrs[directiveName])); - compileNode = $compileNode[0]; - replaceWith(jqCollection, sliceArgs($template), compileNode); - - // Support: Chrome < 50 - // https://github.com/angular/angular.js/issues/14041 - - // In the versions of V8 prior to Chrome 50, the document fragment that is created - // in the `replaceWith` function is improperly garbage collected despite still - // being referenced by the `parentNode` property of all of the child nodes. By adding - // a reference to the fragment via a different property, we can avoid that incorrect - // behavior. - // TODO: remove this line after Chrome 50 has been released - $template[0].$$parentNode = $template[0].parentNode; - - childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority, - replaceDirective && replaceDirective.name, { - // Don't pass in: - // - controllerDirectives - otherwise we'll create duplicates controllers - // - newIsolateScopeDirective or templateDirective - combining templates with - // element transclusion doesn't make sense. - // - // We need only nonTlbTranscludeDirective so that we prevent putting transclusion - // on the same element more than once. - nonTlbTranscludeDirective: nonTlbTranscludeDirective - }); - } else { - - var slots = createMap(); - - if (!isObject(directiveValue)) { - $template = jqLite(jqLiteClone(compileNode)).contents(); - } else { - - // We have transclusion slots, - // collect them up, compile them and store their transclusion functions - $template = []; - - var slotMap = createMap(); - var filledSlots = createMap(); - - // Parse the element selectors - forEach(directiveValue, function(elementSelector, slotName) { - // If an element selector starts with a ? then it is optional - var optional = (elementSelector.charAt(0) === '?'); - elementSelector = optional ? elementSelector.substring(1) : elementSelector; - - slotMap[elementSelector] = slotName; - - // We explicitly assign `null` since this implies that a slot was defined but not filled. - // Later when calling boundTransclusion functions with a slot name we only error if the - // slot is `undefined` - slots[slotName] = null; - - // filledSlots contains `true` for all slots that are either optional or have been - // filled. This is used to check that we have not missed any required slots - filledSlots[slotName] = optional; - }); - - // Add the matching elements into their slot - forEach($compileNode.contents(), function(node) { - var slotName = slotMap[directiveNormalize(nodeName_(node))]; - if (slotName) { - filledSlots[slotName] = true; - slots[slotName] = slots[slotName] || []; - slots[slotName].push(node); - } else { - $template.push(node); - } - }); - - // Check for required slots that were not filled - forEach(filledSlots, function(filled, slotName) { - if (!filled) { - throw $compileMinErr('reqslot', 'Required transclusion slot `{0}` was not filled.', slotName); - } - }); - - for (var slotName in slots) { - if (slots[slotName]) { - // Only define a transclusion function if the slot was filled - slots[slotName] = compilationGenerator(mightHaveMultipleTransclusionError, slots[slotName], transcludeFn); - } - } - } - - $compileNode.empty(); // clear contents - childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, undefined, - undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope}); - childTranscludeFn.$$slots = slots; - } - } - - if (directive.template) { - hasTemplate = true; - assertNoDuplicate('template', templateDirective, directive, $compileNode); - templateDirective = directive; - - directiveValue = (isFunction(directive.template)) - ? directive.template($compileNode, templateAttrs) - : directive.template; - - directiveValue = denormalizeTemplate(directiveValue); - - if (directive.replace) { - replaceDirective = directive; - if (jqLiteIsTextNode(directiveValue)) { - $template = []; - } else { - $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue))); - } - compileNode = $template[0]; - - if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) { - throw $compileMinErr('tplrt', - 'Template for directive \'{0}\' must have exactly one root element. {1}', - directiveName, ''); - } - - replaceWith(jqCollection, $compileNode, compileNode); - - var newTemplateAttrs = {$attr: {}}; - - // combine directives from the original node and from the template: - // - take the array of directives for this element - // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed) - // - collect directives from the template and sort them by priority - // - combine directives as: processed + template + unprocessed - var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs); - var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1)); - - if (newIsolateScopeDirective || newScopeDirective) { - // The original directive caused the current element to be replaced but this element - // also needs to have a new scope, so we need to tell the template directives - // that they would need to get their scope from further up, if they require transclusion - markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective); - } - directives = directives.concat(templateDirectives).concat(unprocessedDirectives); - mergeTemplateAttributes(templateAttrs, newTemplateAttrs); - - ii = directives.length; - } else { - $compileNode.html(directiveValue); - } - } - - if (directive.templateUrl) { - hasTemplate = true; - assertNoDuplicate('template', templateDirective, directive, $compileNode); - templateDirective = directive; - - if (directive.replace) { - replaceDirective = directive; - } - - // eslint-disable-next-line no-func-assign - nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode, - templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, { - controllerDirectives: controllerDirectives, - newScopeDirective: (newScopeDirective !== directive) && newScopeDirective, - newIsolateScopeDirective: newIsolateScopeDirective, - templateDirective: templateDirective, - nonTlbTranscludeDirective: nonTlbTranscludeDirective - }); - ii = directives.length; - } else if (directive.compile) { - try { - linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn); - var context = directive.$$originalDirective || directive; - if (isFunction(linkFn)) { - addLinkFns(null, bind(context, linkFn), attrStart, attrEnd); - } else if (linkFn) { - addLinkFns(bind(context, linkFn.pre), bind(context, linkFn.post), attrStart, attrEnd); - } - } catch (e) { - $exceptionHandler(e, startingTag($compileNode)); - } - } - - if (directive.terminal) { - nodeLinkFn.terminal = true; - terminalPriority = Math.max(terminalPriority, directive.priority); - } - - } - - nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true; - nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective; - nodeLinkFn.templateOnThisElement = hasTemplate; - nodeLinkFn.transclude = childTranscludeFn; - - previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective; - - // might be normal or delayed nodeLinkFn depending on if templateUrl is present - return nodeLinkFn; - - //////////////////// - - function addLinkFns(pre, post, attrStart, attrEnd) { - if (pre) { - if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd); - pre.require = directive.require; - pre.directiveName = directiveName; - if (newIsolateScopeDirective === directive || directive.$$isolateScope) { - pre = cloneAndAnnotateFn(pre, {isolateScope: true}); - } - preLinkFns.push(pre); - } - if (post) { - if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd); - post.require = directive.require; - post.directiveName = directiveName; - if (newIsolateScopeDirective === directive || directive.$$isolateScope) { - post = cloneAndAnnotateFn(post, {isolateScope: true}); - } - postLinkFns.push(post); - } - } - - function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) { - var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element, - attrs, scopeBindingInfo; - - if (compileNode === linkNode) { - attrs = templateAttrs; - $element = templateAttrs.$$element; - } else { - $element = jqLite(linkNode); - attrs = new Attributes($element, templateAttrs); - } - - controllerScope = scope; - if (newIsolateScopeDirective) { - isolateScope = scope.$new(true); - } else if (newScopeDirective) { - controllerScope = scope.$parent; - } - - if (boundTranscludeFn) { - // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn` - // is later passed as `parentBoundTranscludeFn` to `publicLinkFn` - transcludeFn = controllersBoundTransclude; - transcludeFn.$$boundTransclude = boundTranscludeFn; - // expose the slots on the `$transclude` function - transcludeFn.isSlotFilled = function(slotName) { - return !!boundTranscludeFn.$$slots[slotName]; - }; - } - - if (controllerDirectives) { - elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective); - } - - if (newIsolateScopeDirective) { - // Initialize isolate scope bindings for new isolate scope directive. - compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective || - templateDirective === newIsolateScopeDirective.$$originalDirective))); - compile.$$addScopeClass($element, true); - isolateScope.$$isolateBindings = - newIsolateScopeDirective.$$isolateBindings; - scopeBindingInfo = initializeDirectiveBindings(scope, attrs, isolateScope, - isolateScope.$$isolateBindings, - newIsolateScopeDirective); - if (scopeBindingInfo.removeWatches) { - isolateScope.$on('$destroy', scopeBindingInfo.removeWatches); - } - } - - // Initialize bindToController bindings - for (var name in elementControllers) { - var controllerDirective = controllerDirectives[name]; - var controller = elementControllers[name]; - var bindings = controllerDirective.$$bindings.bindToController; - - if (preAssignBindingsEnabled) { - if (bindings) { - controller.bindingInfo = - initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective); - } else { - controller.bindingInfo = {}; - } - - var controllerResult = controller(); - if (controllerResult !== controller.instance) { - // If the controller constructor has a return value, overwrite the instance - // from setupControllers - controller.instance = controllerResult; - $element.data('$' + controllerDirective.name + 'Controller', controllerResult); - if (controller.bindingInfo.removeWatches) { - controller.bindingInfo.removeWatches(); - } - controller.bindingInfo = - initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective); - } - } else { - controller.instance = controller(); - $element.data('$' + controllerDirective.name + 'Controller', controller.instance); - controller.bindingInfo = - initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective); - } - } - - // Bind the required controllers to the controller, if `require` is an object and `bindToController` is truthy - forEach(controllerDirectives, function(controllerDirective, name) { - var require = controllerDirective.require; - if (controllerDirective.bindToController && !isArray(require) && isObject(require)) { - extend(elementControllers[name].instance, getControllers(name, require, $element, elementControllers)); - } - }); - - // Handle the init and destroy lifecycle hooks on all controllers that have them - forEach(elementControllers, function(controller) { - var controllerInstance = controller.instance; - if (isFunction(controllerInstance.$onChanges)) { - try { - controllerInstance.$onChanges(controller.bindingInfo.initialChanges); - } catch (e) { - $exceptionHandler(e); - } - } - if (isFunction(controllerInstance.$onInit)) { - try { - controllerInstance.$onInit(); - } catch (e) { - $exceptionHandler(e); - } - } - if (isFunction(controllerInstance.$doCheck)) { - controllerScope.$watch(function() { controllerInstance.$doCheck(); }); - controllerInstance.$doCheck(); - } - if (isFunction(controllerInstance.$onDestroy)) { - controllerScope.$on('$destroy', function callOnDestroyHook() { - controllerInstance.$onDestroy(); - }); - } - }); - - // PRELINKING - for (i = 0, ii = preLinkFns.length; i < ii; i++) { - linkFn = preLinkFns[i]; - invokeLinkFn(linkFn, - linkFn.isolateScope ? isolateScope : scope, - $element, - attrs, - linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), - transcludeFn - ); - } - - // RECURSION - // We only pass the isolate scope, if the isolate directive has a template, - // otherwise the child elements do not belong to the isolate directive. - var scopeToChild = scope; - if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) { - scopeToChild = isolateScope; - } - if (childLinkFn) { - childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn); - } - - // POSTLINKING - for (i = postLinkFns.length - 1; i >= 0; i--) { - linkFn = postLinkFns[i]; - invokeLinkFn(linkFn, - linkFn.isolateScope ? isolateScope : scope, - $element, - attrs, - linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), - transcludeFn - ); - } - - // Trigger $postLink lifecycle hooks - forEach(elementControllers, function(controller) { - var controllerInstance = controller.instance; - if (isFunction(controllerInstance.$postLink)) { - controllerInstance.$postLink(); - } - }); - - // This is the function that is injected as `$transclude`. - // Note: all arguments are optional! - function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { - var transcludeControllers; - // No scope passed in: - if (!isScope(scope)) { - slotName = futureParentElement; - futureParentElement = cloneAttachFn; - cloneAttachFn = scope; - scope = undefined; - } - - if (hasElementTranscludeDirective) { - transcludeControllers = elementControllers; - } - if (!futureParentElement) { - futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element; - } - if (slotName) { - // slotTranscludeFn can be one of three things: - // * a transclude function - a filled slot - // * `null` - an optional slot that was not filled - // * `undefined` - a slot that was not declared (i.e. invalid) - var slotTranscludeFn = boundTranscludeFn.$$slots[slotName]; - if (slotTranscludeFn) { - return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); - } else if (isUndefined(slotTranscludeFn)) { - throw $compileMinErr('noslot', - 'No parent directive that requires a transclusion with slot name "{0}". ' + - 'Element: {1}', - slotName, startingTag($element)); - } - } else { - return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); - } - } - } - } - - function getControllers(directiveName, require, $element, elementControllers) { - var value; - - if (isString(require)) { - var match = require.match(REQUIRE_PREFIX_REGEXP); - var name = require.substring(match[0].length); - var inheritType = match[1] || match[3]; - var optional = match[2] === '?'; - - //If only parents then start at the parent element - if (inheritType === '^^') { - $element = $element.parent(); - //Otherwise attempt getting the controller from elementControllers in case - //the element is transcluded (and has no data) and to avoid .data if possible - } else { - value = elementControllers && elementControllers[name]; - value = value && value.instance; - } - - if (!value) { - var dataName = '$' + name + 'Controller'; - value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName); - } - - if (!value && !optional) { - throw $compileMinErr('ctreq', - 'Controller \'{0}\', required by directive \'{1}\', can\'t be found!', - name, directiveName); - } - } else if (isArray(require)) { - value = []; - for (var i = 0, ii = require.length; i < ii; i++) { - value[i] = getControllers(directiveName, require[i], $element, elementControllers); - } - } else if (isObject(require)) { - value = {}; - forEach(require, function(controller, property) { - value[property] = getControllers(directiveName, controller, $element, elementControllers); - }); - } - - return value || null; - } - - function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective) { - var elementControllers = createMap(); - for (var controllerKey in controllerDirectives) { - var directive = controllerDirectives[controllerKey]; - var locals = { - $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope, - $element: $element, - $attrs: attrs, - $transclude: transcludeFn - }; - - var controller = directive.controller; - if (controller === '@') { - controller = attrs[directive.name]; - } - - var controllerInstance = $controller(controller, locals, true, directive.controllerAs); - - // For directives with element transclusion the element is a comment. - // In this case .data will not attach any data. - // Instead, we save the controllers for the element in a local hash and attach to .data - // later, once we have the actual element. - elementControllers[directive.name] = controllerInstance; - $element.data('$' + directive.name + 'Controller', controllerInstance.instance); - } - return elementControllers; - } - - // Depending upon the context in which a directive finds itself it might need to have a new isolated - // or child scope created. For instance: - // * if the directive has been pulled into a template because another directive with a higher priority - // asked for element transclusion - // * if the directive itself asks for transclusion but it is at the root of a template and the original - // element was replaced. See https://github.com/angular/angular.js/issues/12936 - function markDirectiveScope(directives, isolateScope, newScope) { - for (var j = 0, jj = directives.length; j < jj; j++) { - directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope}); - } - } - - /** - * looks up the directive and decorates it with exception handling and proper parameters. We - * call this the boundDirective. - * - * @param {string} name name of the directive to look up. - * @param {string} location The directive must be found in specific format. - * String containing any of theses characters: - * - * * `E`: element name - * * `A': attribute - * * `C`: class - * * `M`: comment - * @returns {boolean} true if directive was added. - */ - function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName, - endAttrName) { - if (name === ignoreDirective) return null; - var match = null; - if (hasDirectives.hasOwnProperty(name)) { - for (var directive, directives = $injector.get(name + Suffix), - i = 0, ii = directives.length; i < ii; i++) { - directive = directives[i]; - if ((isUndefined(maxPriority) || maxPriority > directive.priority) && - directive.restrict.indexOf(location) !== -1) { - if (startAttrName) { - directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName}); - } - if (!directive.$$bindings) { - var bindings = directive.$$bindings = - parseDirectiveBindings(directive, directive.name); - if (isObject(bindings.isolateScope)) { - directive.$$isolateBindings = bindings.isolateScope; - } - } - tDirectives.push(directive); - match = directive; - } - } - } - return match; - } - - - /** - * looks up the directive and returns true if it is a multi-element directive, - * and therefore requires DOM nodes between -start and -end markers to be grouped - * together. - * - * @param {string} name name of the directive to look up. - * @returns true if directive was registered as multi-element. - */ - function directiveIsMultiElement(name) { - if (hasDirectives.hasOwnProperty(name)) { - for (var directive, directives = $injector.get(name + Suffix), - i = 0, ii = directives.length; i < ii; i++) { - directive = directives[i]; - if (directive.multiElement) { - return true; - } - } - } - return false; - } - - /** - * When the element is replaced with HTML template then the new attributes - * on the template need to be merged with the existing attributes in the DOM. - * The desired effect is to have both of the attributes present. - * - * @param {object} dst destination attributes (original DOM) - * @param {object} src source attributes (from the directive template) - */ - function mergeTemplateAttributes(dst, src) { - var srcAttr = src.$attr, - dstAttr = dst.$attr; - - // reapply the old attributes to the new element - forEach(dst, function(value, key) { - if (key.charAt(0) !== '$') { - if (src[key] && src[key] !== value) { - if (value.length) { - value += (key === 'style' ? ';' : ' ') + src[key]; - } else { - value = src[key]; - } - } - dst.$set(key, value, true, srcAttr[key]); - } - }); - - // copy the new attributes on the old attrs object - forEach(src, function(value, key) { - // Check if we already set this attribute in the loop above. - // `dst` will never contain hasOwnProperty as DOM parser won't let it. - // You will get an "InvalidCharacterError: DOM Exception 5" error if you - // have an attribute like "has-own-property" or "data-has-own-property", etc. - if (!dst.hasOwnProperty(key) && key.charAt(0) !== '$') { - dst[key] = value; - - if (key !== 'class' && key !== 'style') { - dstAttr[key] = srcAttr[key]; - } - } - }); - } - - - function compileTemplateUrl(directives, $compileNode, tAttrs, - $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) { - var linkQueue = [], - afterTemplateNodeLinkFn, - afterTemplateChildLinkFn, - beforeTemplateCompileNode = $compileNode[0], - origAsyncDirective = directives.shift(), - derivedSyncDirective = inherit(origAsyncDirective, { - templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective - }), - templateUrl = (isFunction(origAsyncDirective.templateUrl)) - ? origAsyncDirective.templateUrl($compileNode, tAttrs) - : origAsyncDirective.templateUrl, - templateNamespace = origAsyncDirective.templateNamespace; - - $compileNode.empty(); - - $templateRequest(templateUrl) - .then(function(content) { - var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn; - - content = denormalizeTemplate(content); - - if (origAsyncDirective.replace) { - if (jqLiteIsTextNode(content)) { - $template = []; - } else { - $template = removeComments(wrapTemplate(templateNamespace, trim(content))); - } - compileNode = $template[0]; - - if ($template.length !== 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) { - throw $compileMinErr('tplrt', - 'Template for directive \'{0}\' must have exactly one root element. {1}', - origAsyncDirective.name, templateUrl); - } - - tempTemplateAttrs = {$attr: {}}; - replaceWith($rootElement, $compileNode, compileNode); - var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs); - - if (isObject(origAsyncDirective.scope)) { - // the original directive that caused the template to be loaded async required - // an isolate scope - markDirectiveScope(templateDirectives, true); - } - directives = templateDirectives.concat(directives); - mergeTemplateAttributes(tAttrs, tempTemplateAttrs); - } else { - compileNode = beforeTemplateCompileNode; - $compileNode.html(content); - } - - directives.unshift(derivedSyncDirective); - - afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs, - childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns, - previousCompileContext); - forEach($rootElement, function(node, i) { - if (node === compileNode) { - $rootElement[i] = $compileNode[0]; - } - }); - afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn); - - while (linkQueue.length) { - var scope = linkQueue.shift(), - beforeTemplateLinkNode = linkQueue.shift(), - linkRootElement = linkQueue.shift(), - boundTranscludeFn = linkQueue.shift(), - linkNode = $compileNode[0]; - - if (scope.$$destroyed) continue; - - if (beforeTemplateLinkNode !== beforeTemplateCompileNode) { - var oldClasses = beforeTemplateLinkNode.className; - - if (!(previousCompileContext.hasElementTranscludeDirective && - origAsyncDirective.replace)) { - // it was cloned therefore we have to clone as well. - linkNode = jqLiteClone(compileNode); - } - replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode); - - // Copy in CSS classes from original node - safeAddClass(jqLite(linkNode), oldClasses); - } - if (afterTemplateNodeLinkFn.transcludeOnThisElement) { - childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn); - } else { - childBoundTranscludeFn = boundTranscludeFn; - } - afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement, - childBoundTranscludeFn); - } - linkQueue = null; - }).catch(function(error) { - if (isError(error)) { - $exceptionHandler(error); - } - }); - - return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) { - var childBoundTranscludeFn = boundTranscludeFn; - if (scope.$$destroyed) return; - if (linkQueue) { - linkQueue.push(scope, - node, - rootElement, - childBoundTranscludeFn); - } else { - if (afterTemplateNodeLinkFn.transcludeOnThisElement) { - childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn); - } - afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn); - } - }; - } - - - /** - * Sorting function for bound directives. - */ - function byPriority(a, b) { - var diff = b.priority - a.priority; - if (diff !== 0) return diff; - if (a.name !== b.name) return (a.name < b.name) ? -1 : 1; - return a.index - b.index; - } - - function assertNoDuplicate(what, previousDirective, directive, element) { - - function wrapModuleNameIfDefined(moduleName) { - return moduleName ? - (' (module: ' + moduleName + ')') : - ''; - } - - if (previousDirective) { - throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}', - previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName), - directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element)); - } - } - - - function addTextInterpolateDirective(directives, text) { - var interpolateFn = $interpolate(text, true); - if (interpolateFn) { - directives.push({ - priority: 0, - compile: function textInterpolateCompileFn(templateNode) { - var templateNodeParent = templateNode.parent(), - hasCompileParent = !!templateNodeParent.length; - - // When transcluding a template that has bindings in the root - // we don't have a parent and thus need to add the class during linking fn. - if (hasCompileParent) compile.$$addBindingClass(templateNodeParent); - - return function textInterpolateLinkFn(scope, node) { - var parent = node.parent(); - if (!hasCompileParent) compile.$$addBindingClass(parent); - compile.$$addBindingInfo(parent, interpolateFn.expressions); - scope.$watch(interpolateFn, function interpolateFnWatchAction(value) { - node[0].nodeValue = value; - }); - }; - } - }); - } - } - - - function wrapTemplate(type, template) { - type = lowercase(type || 'html'); - switch (type) { - case 'svg': - case 'math': - var wrapper = window.document.createElement('div'); - wrapper.innerHTML = '<' + type + '>' + template + ''; - return wrapper.childNodes[0].childNodes; - default: - return template; - } - } - - - function getTrustedContext(node, attrNormalizedName) { - if (attrNormalizedName === 'srcdoc') { - return $sce.HTML; - } - var tag = nodeName_(node); - // All tags with src attributes require a RESOURCE_URL value, except for - // img and various html5 media tags. - if (attrNormalizedName === 'src' || attrNormalizedName === 'ngSrc') { - if (['img', 'video', 'audio', 'source', 'track'].indexOf(tag) === -1) { - return $sce.RESOURCE_URL; - } - // maction[xlink:href] can source SVG. It's not limited to . - } else if (attrNormalizedName === 'xlinkHref' || - (tag === 'form' && attrNormalizedName === 'action') || - // links can be stylesheets or imports, which can run script in the current origin - (tag === 'link' && attrNormalizedName === 'href') - ) { - return $sce.RESOURCE_URL; - } - } - - - function addAttrInterpolateDirective(node, directives, value, name, isNgAttr) { - var trustedContext = getTrustedContext(node, name); - var mustHaveExpression = !isNgAttr; - var allOrNothing = ALL_OR_NOTHING_ATTRS[name] || isNgAttr; - - var interpolateFn = $interpolate(value, mustHaveExpression, trustedContext, allOrNothing); - - // no interpolation found -> ignore - if (!interpolateFn) return; - - if (name === 'multiple' && nodeName_(node) === 'select') { - throw $compileMinErr('selmulti', - 'Binding to the \'multiple\' attribute is not supported. Element: {0}', - startingTag(node)); - } - - if (EVENT_HANDLER_ATTR_REGEXP.test(name)) { - throw $compileMinErr('nodomevents', - 'Interpolations for HTML DOM event attributes are disallowed. Please use the ' + - 'ng- versions (such as ng-click instead of onclick) instead.'); - } - - directives.push({ - priority: 100, - compile: function() { - return { - pre: function attrInterpolatePreLinkFn(scope, element, attr) { - var $$observers = (attr.$$observers || (attr.$$observers = createMap())); - - // If the attribute has changed since last $interpolate()ed - var newValue = attr[name]; - if (newValue !== value) { - // we need to interpolate again since the attribute value has been updated - // (e.g. by another directive's compile function) - // ensure unset/empty values make interpolateFn falsy - interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing); - value = newValue; - } - - // if attribute was updated so that there is no interpolation going on we don't want to - // register any observers - if (!interpolateFn) return; - - // initialize attr object so that it's ready in case we need the value for isolate - // scope initialization, otherwise the value would not be available from isolate - // directive's linking fn during linking phase - attr[name] = interpolateFn(scope); - - ($$observers[name] || ($$observers[name] = [])).$$inter = true; - (attr.$$observers && attr.$$observers[name].$$scope || scope). - $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) { - //special case for class attribute addition + removal - //so that class changes can tap into the animation - //hooks provided by the $animate service. Be sure to - //skip animations when the first digest occurs (when - //both the new and the old values are the same) since - //the CSS classes are the non-interpolated values - if (name === 'class' && newValue !== oldValue) { - attr.$updateClass(newValue, oldValue); - } else { - attr.$set(name, newValue); - } - }); - } - }; - } - }); - } - - - /** - * This is a special jqLite.replaceWith, which can replace items which - * have no parents, provided that the containing jqLite collection is provided. - * - * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes - * in the root of the tree. - * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep - * the shell, but replace its DOM node reference. - * @param {Node} newNode The new DOM node. - */ - function replaceWith($rootElement, elementsToRemove, newNode) { - var firstElementToRemove = elementsToRemove[0], - removeCount = elementsToRemove.length, - parent = firstElementToRemove.parentNode, - i, ii; - - if ($rootElement) { - for (i = 0, ii = $rootElement.length; i < ii; i++) { - if ($rootElement[i] === firstElementToRemove) { - $rootElement[i++] = newNode; - for (var j = i, j2 = j + removeCount - 1, - jj = $rootElement.length; - j < jj; j++, j2++) { - if (j2 < jj) { - $rootElement[j] = $rootElement[j2]; - } else { - delete $rootElement[j]; - } - } - $rootElement.length -= removeCount - 1; - - // If the replaced element is also the jQuery .context then replace it - // .context is a deprecated jQuery api, so we should set it only when jQuery set it - // http://api.jquery.com/context/ - if ($rootElement.context === firstElementToRemove) { - $rootElement.context = newNode; - } - break; - } - } - } - - if (parent) { - parent.replaceChild(newNode, firstElementToRemove); - } - - // Append all the `elementsToRemove` to a fragment. This will... - // - remove them from the DOM - // - allow them to still be traversed with .nextSibling - // - allow a single fragment.qSA to fetch all elements being removed - var fragment = window.document.createDocumentFragment(); - for (i = 0; i < removeCount; i++) { - fragment.appendChild(elementsToRemove[i]); - } - - if (jqLite.hasData(firstElementToRemove)) { - // Copy over user data (that includes AngularJS's $scope etc.). Don't copy private - // data here because there's no public interface in jQuery to do that and copying over - // event listeners (which is the main use of private data) wouldn't work anyway. - jqLite.data(newNode, jqLite.data(firstElementToRemove)); - - // Remove $destroy event listeners from `firstElementToRemove` - jqLite(firstElementToRemove).off('$destroy'); - } - - // Cleanup any data/listeners on the elements and children. - // This includes invoking the $destroy event on any elements with listeners. - jqLite.cleanData(fragment.querySelectorAll('*')); - - // Update the jqLite collection to only contain the `newNode` - for (i = 1; i < removeCount; i++) { - delete elementsToRemove[i]; - } - elementsToRemove[0] = newNode; - elementsToRemove.length = 1; - } - - - function cloneAndAnnotateFn(fn, annotation) { - return extend(function() { return fn.apply(null, arguments); }, fn, annotation); - } - - - function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) { - try { - linkFn(scope, $element, attrs, controllers, transcludeFn); - } catch (e) { - $exceptionHandler(e, startingTag($element)); - } - } - - function strictBindingsCheck(attrName, directiveName) { - if (strictComponentBindingsEnabled) { - throw $compileMinErr('missingattr', - 'Attribute \'{0}\' of \'{1}\' is non-optional and must be set!', - attrName, directiveName); - } - } - - // Set up $watches for isolate scope and controller bindings. - function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) { - var removeWatchCollection = []; - var initialChanges = {}; - var changes; - - forEach(bindings, function initializeBinding(definition, scopeName) { - var attrName = definition.attrName, - optional = definition.optional, - mode = definition.mode, // @, =, <, or & - lastValue, - parentGet, parentSet, compare, removeWatch; - - switch (mode) { - - case '@': - if (!optional && !hasOwnProperty.call(attrs, attrName)) { - strictBindingsCheck(attrName, directive.name); - destination[scopeName] = attrs[attrName] = undefined; - - } - removeWatch = attrs.$observe(attrName, function(value) { - if (isString(value) || isBoolean(value)) { - var oldValue = destination[scopeName]; - recordChanges(scopeName, value, oldValue); - destination[scopeName] = value; - } - }); - attrs.$$observers[attrName].$$scope = scope; - lastValue = attrs[attrName]; - if (isString(lastValue)) { - // If the attribute has been provided then we trigger an interpolation to ensure - // the value is there for use in the link fn - destination[scopeName] = $interpolate(lastValue)(scope); - } else if (isBoolean(lastValue)) { - // If the attributes is one of the BOOLEAN_ATTR then AngularJS will have converted - // the value to boolean rather than a string, so we special case this situation - destination[scopeName] = lastValue; - } - initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]); - removeWatchCollection.push(removeWatch); - break; - - case '=': - if (!hasOwnProperty.call(attrs, attrName)) { - if (optional) break; - strictBindingsCheck(attrName, directive.name); - attrs[attrName] = undefined; - } - if (optional && !attrs[attrName]) break; - - parentGet = $parse(attrs[attrName]); - if (parentGet.literal) { - compare = equals; - } else { - compare = simpleCompare; - } - parentSet = parentGet.assign || function() { - // reset the change, or we will throw this exception on every $digest - lastValue = destination[scopeName] = parentGet(scope); - throw $compileMinErr('nonassign', - 'Expression \'{0}\' in attribute \'{1}\' used with directive \'{2}\' is non-assignable!', - attrs[attrName], attrName, directive.name); - }; - lastValue = destination[scopeName] = parentGet(scope); - var parentValueWatch = function parentValueWatch(parentValue) { - if (!compare(parentValue, destination[scopeName])) { - // we are out of sync and need to copy - if (!compare(parentValue, lastValue)) { - // parent changed and it has precedence - destination[scopeName] = parentValue; - } else { - // if the parent can be assigned then do so - parentSet(scope, parentValue = destination[scopeName]); - } - } - lastValue = parentValue; - return lastValue; - }; - parentValueWatch.$stateful = true; - if (definition.collection) { - removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch); - } else { - removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal); - } - removeWatchCollection.push(removeWatch); - break; - - case '<': - if (!hasOwnProperty.call(attrs, attrName)) { - if (optional) break; - strictBindingsCheck(attrName, directive.name); - attrs[attrName] = undefined; - } - if (optional && !attrs[attrName]) break; - - parentGet = $parse(attrs[attrName]); - var deepWatch = parentGet.literal; - - var initialValue = destination[scopeName] = parentGet(scope); - initialChanges[scopeName] = new SimpleChange(_UNINITIALIZED_VALUE, destination[scopeName]); - - removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newValue, oldValue) { - if (oldValue === newValue) { - if (oldValue === initialValue || (deepWatch && equals(oldValue, initialValue))) { - return; - } - oldValue = initialValue; - } - recordChanges(scopeName, newValue, oldValue); - destination[scopeName] = newValue; - }, deepWatch); - - removeWatchCollection.push(removeWatch); - break; - - case '&': - if (!optional && !hasOwnProperty.call(attrs, attrName)) { - strictBindingsCheck(attrName, directive.name); - } - // Don't assign Object.prototype method to scope - parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop; - - // Don't assign noop to destination if expression is not valid - if (parentGet === noop && optional) break; - - destination[scopeName] = function(locals) { - return parentGet(scope, locals); - }; - break; - } - }); - - function recordChanges(key, currentValue, previousValue) { - if (isFunction(destination.$onChanges) && !simpleCompare(currentValue, previousValue)) { - // If we have not already scheduled the top level onChangesQueue handler then do so now - if (!onChangesQueue) { - scope.$$postDigest(flushOnChangesQueue); - onChangesQueue = []; - } - // If we have not already queued a trigger of onChanges for this controller then do so now - if (!changes) { - changes = {}; - onChangesQueue.push(triggerOnChangesHook); - } - // If the has been a change on this property already then we need to reuse the previous value - if (changes[key]) { - previousValue = changes[key].previousValue; - } - // Store this change - changes[key] = new SimpleChange(previousValue, currentValue); - } - } - - function triggerOnChangesHook() { - destination.$onChanges(changes); - // Now clear the changes so that we schedule onChanges when more changes arrive - changes = undefined; - } - - return { - initialChanges: initialChanges, - removeWatches: removeWatchCollection.length && function removeWatches() { - for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) { - removeWatchCollection[i](); - } - } - }; - } - }]; -} - -function SimpleChange(previous, current) { - this.previousValue = previous; - this.currentValue = current; -} -SimpleChange.prototype.isFirstChange = function() { return this.previousValue === _UNINITIALIZED_VALUE; }; - - -var PREFIX_REGEXP = /^((?:x|data)[:\-_])/i; -var SPECIAL_CHARS_REGEXP = /[:\-_]+(.)/g; - -/** - * Converts all accepted directives format into proper directive name. - * @param name Name to normalize - */ -function directiveNormalize(name) { - return name - .replace(PREFIX_REGEXP, '') - .replace(SPECIAL_CHARS_REGEXP, function(_, letter, offset) { - return offset ? letter.toUpperCase() : letter; - }); -} - -/** - * @ngdoc type - * @name $compile.directive.Attributes - * - * @description - * A shared object between directive compile / linking functions which contains normalized DOM - * element attributes. The values reflect current binding state `{{ }}`. The normalization is - * needed since all of these are treated as equivalent in AngularJS: - * - * ``` - * - * ``` - */ - -/** - * @ngdoc property - * @name $compile.directive.Attributes#$attr - * - * @description - * A map of DOM element attribute names to the normalized name. This is - * needed to do reverse lookup from normalized name back to actual name. - */ - - -/** - * @ngdoc method - * @name $compile.directive.Attributes#$set - * @kind function - * - * @description - * Set DOM element attribute value. - * - * - * @param {string} name Normalized element attribute name of the property to modify. The name is - * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr} - * property to the original name. - * @param {string} value Value to set the attribute to. The value can be an interpolated string. - */ - - - -/** - * Closure compiler type information - */ - -function nodesetLinkingFn( - /* angular.Scope */ scope, - /* NodeList */ nodeList, - /* Element */ rootElement, - /* function(Function) */ boundTranscludeFn -) {} - -function directiveLinkingFn( - /* nodesetLinkingFn */ nodesetLinkingFn, - /* angular.Scope */ scope, - /* Node */ node, - /* Element */ rootElement, - /* function(Function) */ boundTranscludeFn -) {} - -function tokenDifference(str1, str2) { - var values = '', - tokens1 = str1.split(/\s+/), - tokens2 = str2.split(/\s+/); - - outer: - for (var i = 0; i < tokens1.length; i++) { - var token = tokens1[i]; - for (var j = 0; j < tokens2.length; j++) { - if (token === tokens2[j]) continue outer; - } - values += (values.length > 0 ? ' ' : '') + token; - } - return values; -} - -function removeComments(jqNodes) { - jqNodes = jqLite(jqNodes); - var i = jqNodes.length; - - if (i <= 1) { - return jqNodes; - } - - while (i--) { - var node = jqNodes[i]; - if (node.nodeType === NODE_TYPE_COMMENT || - (node.nodeType === NODE_TYPE_TEXT && node.nodeValue.trim() === '')) { - splice.call(jqNodes, i, 1); - } - } - return jqNodes; -} - -var $controllerMinErr = minErr('$controller'); - - -var CNTRL_REG = /^(\S+)(\s+as\s+([\w$]+))?$/; -function identifierForController(controller, ident) { - if (ident && isString(ident)) return ident; - if (isString(controller)) { - var match = CNTRL_REG.exec(controller); - if (match) return match[3]; - } -} - - -/** - * @ngdoc provider - * @name $controllerProvider - * @this - * - * @description - * The {@link ng.$controller $controller service} is used by AngularJS to create new - * controllers. - * - * This provider allows controller registration via the - * {@link ng.$controllerProvider#register register} method. - */ -function $ControllerProvider() { - var controllers = {}, - globals = false; - - /** - * @ngdoc method - * @name $controllerProvider#has - * @param {string} name Controller name to check. - */ - this.has = function(name) { - return controllers.hasOwnProperty(name); - }; - - /** - * @ngdoc method - * @name $controllerProvider#register - * @param {string|Object} name Controller name, or an object map of controllers where the keys are - * the names and the values are the constructors. - * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI - * annotations in the array notation). - */ - this.register = function(name, constructor) { - assertNotHasOwnProperty(name, 'controller'); - if (isObject(name)) { - extend(controllers, name); - } else { - controllers[name] = constructor; - } - }; - - /** - * @ngdoc method - * @name $controllerProvider#allowGlobals - * @description If called, allows `$controller` to find controller constructors on `window` - * - * @deprecated - * sinceVersion="v1.3.0" - * removeVersion="v1.7.0" - * This method of finding controllers has been deprecated. - */ - this.allowGlobals = function() { - globals = true; - }; - - - this.$get = ['$injector', '$window', function($injector, $window) { - - /** - * @ngdoc service - * @name $controller - * @requires $injector - * - * @param {Function|string} constructor If called with a function then it's considered to be the - * controller constructor function. Otherwise it's considered to be a string which is used - * to retrieve the controller constructor using the following steps: - * - * * check if a controller with given name is registered via `$controllerProvider` - * * check if evaluating the string on the current scope returns a constructor - * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global - * `window` object (deprecated, not recommended) - * - * The string can use the `controller as property` syntax, where the controller instance is published - * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this - * to work correctly. - * - * @param {Object} locals Injection locals for Controller. - * @return {Object} Instance of given controller. - * - * @description - * `$controller` service is responsible for instantiating controllers. - * - * It's just a simple call to {@link auto.$injector $injector}, but extracted into - * a service, so that one can override this service with [BC version](https://gist.github.com/1649788). - */ - return function $controller(expression, locals, later, ident) { - // PRIVATE API: - // param `later` --- indicates that the controller's constructor is invoked at a later time. - // If true, $controller will allocate the object with the correct - // prototype chain, but will not invoke the controller until a returned - // callback is invoked. - // param `ident` --- An optional label which overrides the label parsed from the controller - // expression, if any. - var instance, match, constructor, identifier; - later = later === true; - if (ident && isString(ident)) { - identifier = ident; - } - - if (isString(expression)) { - match = expression.match(CNTRL_REG); - if (!match) { - throw $controllerMinErr('ctrlfmt', - 'Badly formed controller string \'{0}\'. ' + - 'Must match `__name__ as __id__` or `__name__`.', expression); - } - constructor = match[1]; - identifier = identifier || match[3]; - expression = controllers.hasOwnProperty(constructor) - ? controllers[constructor] - : getter(locals.$scope, constructor, true) || - (globals ? getter($window, constructor, true) : undefined); - - if (!expression) { - throw $controllerMinErr('ctrlreg', - 'The controller with the name \'{0}\' is not registered.', constructor); - } - - assertArgFn(expression, constructor, true); - } - - if (later) { - // Instantiate controller later: - // This machinery is used to create an instance of the object before calling the - // controller's constructor itself. - // - // This allows properties to be added to the controller before the constructor is - // invoked. Primarily, this is used for isolate scope bindings in $compile. - // - // This feature is not intended for use by applications, and is thus not documented - // publicly. - // Object creation: http://jsperf.com/create-constructor/2 - var controllerPrototype = (isArray(expression) ? - expression[expression.length - 1] : expression).prototype; - instance = Object.create(controllerPrototype || null); - - if (identifier) { - addIdentifier(locals, identifier, instance, constructor || expression.name); - } - - return extend(function $controllerInit() { - var result = $injector.invoke(expression, instance, locals, constructor); - if (result !== instance && (isObject(result) || isFunction(result))) { - instance = result; - if (identifier) { - // If result changed, re-assign controllerAs value to scope. - addIdentifier(locals, identifier, instance, constructor || expression.name); - } - } - return instance; - }, { - instance: instance, - identifier: identifier - }); - } - - instance = $injector.instantiate(expression, locals, constructor); - - if (identifier) { - addIdentifier(locals, identifier, instance, constructor || expression.name); - } - - return instance; - }; - - function addIdentifier(locals, identifier, instance, name) { - if (!(locals && isObject(locals.$scope))) { - throw minErr('$controller')('noscp', - 'Cannot export controller \'{0}\' as \'{1}\'! No $scope object provided via `locals`.', - name, identifier); - } - - locals.$scope[identifier] = instance; - } - }]; -} - -/** - * @ngdoc service - * @name $document - * @requires $window - * @this - * - * @description - * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object. - * - * @example - - -
      -

      $document title:

      -

      window.document title:

      -
      -
      - - angular.module('documentExample', []) - .controller('ExampleController', ['$scope', '$document', function($scope, $document) { - $scope.title = $document[0].title; - $scope.windowTitle = angular.element(window.document)[0].title; - }]); - -
      - */ -function $DocumentProvider() { - this.$get = ['$window', function(window) { - return jqLite(window.document); - }]; -} - - -/** - * @private - * @this - * Listens for document visibility change and makes the current status accessible. - */ -function $$IsDocumentHiddenProvider() { - this.$get = ['$document', '$rootScope', function($document, $rootScope) { - var doc = $document[0]; - var hidden = doc && doc.hidden; - - $document.on('visibilitychange', changeListener); - - $rootScope.$on('$destroy', function() { - $document.off('visibilitychange', changeListener); - }); - - function changeListener() { - hidden = doc.hidden; - } - - return function() { - return hidden; - }; - }]; -} - -/** - * @ngdoc service - * @name $exceptionHandler - * @requires ng.$log - * @this - * - * @description - * Any uncaught exception in AngularJS expressions is delegated to this service. - * The default implementation simply delegates to `$log.error` which logs it into - * the browser console. - * - * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by - * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing. - * - * ## Example: - * - * The example below will overwrite the default `$exceptionHandler` in order to (a) log uncaught - * errors to the backend for later inspection by the developers and (b) to use `$log.warn()` instead - * of `$log.error()`. - * - * ```js - * angular. - * module('exceptionOverwrite', []). - * factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) { - * return function myExceptionHandler(exception, cause) { - * logErrorsToBackend(exception, cause); - * $log.warn(exception, cause); - * }; - * }]); - * ``` - * - *
      - * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind` - * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler} - * (unless executed during a digest). - * - * If you wish, you can manually delegate exceptions, e.g. - * `try { ... } catch(e) { $exceptionHandler(e); }` - * - * @param {Error} exception Exception associated with the error. - * @param {string=} cause Optional information about the context in which - * the error was thrown. - * - */ -function $ExceptionHandlerProvider() { - this.$get = ['$log', function($log) { - return function(exception, cause) { - $log.error.apply($log, arguments); - }; - }]; -} - -var $$ForceReflowProvider = /** @this */ function() { - this.$get = ['$document', function($document) { - return function(domNode) { - //the line below will force the browser to perform a repaint so - //that all the animated elements within the animation frame will - //be properly updated and drawn on screen. This is required to - //ensure that the preparation animation is properly flushed so that - //the active state picks up from there. DO NOT REMOVE THIS LINE. - //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH - //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND - //WILL TAKE YEARS AWAY FROM YOUR LIFE. - if (domNode) { - if (!domNode.nodeType && domNode instanceof jqLite) { - domNode = domNode[0]; - } - } else { - domNode = $document[0].body; - } - return domNode.offsetWidth + 1; - }; - }]; -}; - -var APPLICATION_JSON = 'application/json'; -var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'}; -var JSON_START = /^\[|^\{(?!\{)/; -var JSON_ENDS = { - '[': /]$/, - '{': /}$/ -}; -var JSON_PROTECTION_PREFIX = /^\)]\}',?\n/; -var $httpMinErr = minErr('$http'); - -function serializeValue(v) { - if (isObject(v)) { - return isDate(v) ? v.toISOString() : toJson(v); - } - return v; -} - - -/** @this */ -function $HttpParamSerializerProvider() { - /** - * @ngdoc service - * @name $httpParamSerializer - * @description - * - * Default {@link $http `$http`} params serializer that converts objects to strings - * according to the following rules: - * - * * `{'foo': 'bar'}` results in `foo=bar` - * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object) - * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element) - * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D` (stringified and encoded representation of an object) - * - * Note that serializer will sort the request parameters alphabetically. - * */ - - this.$get = function() { - return function ngParamSerializer(params) { - if (!params) return ''; - var parts = []; - forEachSorted(params, function(value, key) { - if (value === null || isUndefined(value) || isFunction(value)) return; - if (isArray(value)) { - forEach(value, function(v) { - parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v))); - }); - } else { - parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value))); - } - }); - - return parts.join('&'); - }; - }; -} - -/** @this */ -function $HttpParamSerializerJQLikeProvider() { - /** - * @ngdoc service - * @name $httpParamSerializerJQLike - * - * @description - * - * Alternative {@link $http `$http`} params serializer that follows - * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic. - * The serializer will also sort the params alphabetically. - * - * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property: - * - * ```js - * $http({ - * url: myUrl, - * method: 'GET', - * params: myParams, - * paramSerializer: '$httpParamSerializerJQLike' - * }); - * ``` - * - * It is also possible to set it as the default `paramSerializer` in the - * {@link $httpProvider#defaults `$httpProvider`}. - * - * Additionally, you can inject the serializer and use it explicitly, for example to serialize - * form data for submission: - * - * ```js - * .controller(function($http, $httpParamSerializerJQLike) { - * //... - * - * $http({ - * url: myUrl, - * method: 'POST', - * data: $httpParamSerializerJQLike(myData), - * headers: { - * 'Content-Type': 'application/x-www-form-urlencoded' - * } - * }); - * - * }); - * ``` - * - * */ - this.$get = function() { - return function jQueryLikeParamSerializer(params) { - if (!params) return ''; - var parts = []; - serialize(params, '', true); - return parts.join('&'); - - function serialize(toSerialize, prefix, topLevel) { - if (toSerialize === null || isUndefined(toSerialize)) return; - if (isArray(toSerialize)) { - forEach(toSerialize, function(value, index) { - serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']'); - }); - } else if (isObject(toSerialize) && !isDate(toSerialize)) { - forEachSorted(toSerialize, function(value, key) { - serialize(value, prefix + - (topLevel ? '' : '[') + - key + - (topLevel ? '' : ']')); - }); - } else { - parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize))); - } - } - }; - }; -} - -function defaultHttpResponseTransform(data, headers) { - if (isString(data)) { - // Strip json vulnerability protection prefix and trim whitespace - var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim(); - - if (tempData) { - var contentType = headers('Content-Type'); - var hasJsonContentType = contentType && (contentType.indexOf(APPLICATION_JSON) === 0); - - if (hasJsonContentType || isJsonLike(tempData)) { - try { - data = fromJson(tempData); - } catch (e) { - if (!hasJsonContentType) { - return data; - } - throw $httpMinErr('baddata', 'Data must be a valid JSON object. Received: "{0}". ' + - 'Parse error: "{1}"', data, e); - } - } - } - } - - return data; -} - -function isJsonLike(str) { - var jsonStart = str.match(JSON_START); - return jsonStart && JSON_ENDS[jsonStart[0]].test(str); -} - -/** - * Parse headers into key value object - * - * @param {string} headers Raw headers as a string - * @returns {Object} Parsed headers as key value object - */ -function parseHeaders(headers) { - var parsed = createMap(), i; - - function fillInParsed(key, val) { - if (key) { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - - if (isString(headers)) { - forEach(headers.split('\n'), function(line) { - i = line.indexOf(':'); - fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1))); - }); - } else if (isObject(headers)) { - forEach(headers, function(headerVal, headerKey) { - fillInParsed(lowercase(headerKey), trim(headerVal)); - }); - } - - return parsed; -} - - -/** - * Returns a function that provides access to parsed headers. - * - * Headers are lazy parsed when first requested. - * @see parseHeaders - * - * @param {(string|Object)} headers Headers to provide access to. - * @returns {function(string=)} Returns a getter function which if called with: - * - * - if called with an argument returns a single header value or null - * - if called with no arguments returns an object containing all headers. - */ -function headersGetter(headers) { - var headersObj; - - return function(name) { - if (!headersObj) headersObj = parseHeaders(headers); - - if (name) { - var value = headersObj[lowercase(name)]; - if (value === undefined) { - value = null; - } - return value; - } - - return headersObj; - }; -} - - -/** - * Chain all given functions - * - * This function is used for both request and response transforming - * - * @param {*} data Data to transform. - * @param {function(string=)} headers HTTP headers getter fn. - * @param {number} status HTTP status code of the response. - * @param {(Function|Array.)} fns Function or an array of functions. - * @returns {*} Transformed data. - */ -function transformData(data, headers, status, fns) { - if (isFunction(fns)) { - return fns(data, headers, status); - } - - forEach(fns, function(fn) { - data = fn(data, headers, status); - }); - - return data; -} - - -function isSuccess(status) { - return 200 <= status && status < 300; -} - - -/** - * @ngdoc provider - * @name $httpProvider - * @this - * - * @description - * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service. - * */ -function $HttpProvider() { - /** - * @ngdoc property - * @name $httpProvider#defaults - * @description - * - * Object containing default values for all {@link ng.$http $http} requests. - * - * - **`defaults.cache`** - {boolean|Object} - A boolean value or object created with - * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of HTTP responses - * by default. See {@link $http#caching $http Caching} for more information. - * - * - **`defaults.headers`** - {Object} - Default headers for all $http requests. - * Refer to {@link ng.$http#setting-http-headers $http} for documentation on - * setting default headers. - * - **`defaults.headers.common`** - * - **`defaults.headers.post`** - * - **`defaults.headers.put`** - * - **`defaults.headers.patch`** - * - * - **`defaults.jsonpCallbackParam`** - `{string}` - the name of the query parameter that passes the name of the - * callback in a JSONP request. The value of this parameter will be replaced with the expression generated by the - * {@link $jsonpCallbacks} service. Defaults to `'callback'`. - * - * - **`defaults.paramSerializer`** - `{string|function(Object):string}` - A function - * used to the prepare string representation of request parameters (specified as an object). - * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}. - * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}. - * - * - **`defaults.transformRequest`** - - * `{Array|function(data, headersGetter)}` - - * An array of functions (or a single function) which are applied to the request data. - * By default, this is an array with one request transformation function: - * - * - If the `data` property of the request configuration object contains an object, serialize it - * into JSON format. - * - * - **`defaults.transformResponse`** - - * `{Array|function(data, headersGetter, status)}` - - * An array of functions (or a single function) which are applied to the response data. By default, - * this is an array which applies one response transformation function that does two things: - * - * - If XSRF prefix is detected, strip it - * (see {@link ng.$http#security-considerations Security Considerations in the $http docs}). - * - If the `Content-Type` is `application/json` or the response looks like JSON, - * deserialize it using a JSON parser. - * - * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token. - * Defaults value is `'XSRF-TOKEN'`. - * - * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the - * XSRF token. Defaults value is `'X-XSRF-TOKEN'`. - * - **/ - var defaults = this.defaults = { - // transform incoming response data - transformResponse: [defaultHttpResponseTransform], - - // transform outgoing request data - transformRequest: [function(d) { - return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d; - }], - - // default headers - headers: { - common: { - 'Accept': 'application/json, text/plain, */*' - }, - post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON), - put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON), - patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON) - }, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - paramSerializer: '$httpParamSerializer', - - jsonpCallbackParam: 'callback' - }; - - var useApplyAsync = false; - /** - * @ngdoc method - * @name $httpProvider#useApplyAsync - * @description - * - * Configure $http service to combine processing of multiple http responses received at around - * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in - * significant performance improvement for bigger applications that make many HTTP requests - * concurrently (common during application bootstrap). - * - * Defaults to false. If no value is specified, returns the current configured value. - * - * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred - * "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window - * to load and share the same digest cycle. - * - * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining. - * otherwise, returns the current configured value. - **/ - this.useApplyAsync = function(value) { - if (isDefined(value)) { - useApplyAsync = !!value; - return this; - } - return useApplyAsync; - }; - - /** - * @ngdoc property - * @name $httpProvider#interceptors - * @description - * - * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http} - * pre-processing of request or postprocessing of responses. - * - * These service factories are ordered by request, i.e. they are applied in the same order as the - * array, on request, but reverse order, on response. - * - * {@link ng.$http#interceptors Interceptors detailed info} - **/ - var interceptorFactories = this.interceptors = []; - - this.$get = ['$browser', '$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector', '$sce', - function($browser, $httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector, $sce) { - - var defaultCache = $cacheFactory('$http'); - - /** - * Make sure that default param serializer is exposed as a function - */ - defaults.paramSerializer = isString(defaults.paramSerializer) ? - $injector.get(defaults.paramSerializer) : defaults.paramSerializer; - - /** - * Interceptors stored in reverse order. Inner interceptors before outer interceptors. - * The reversal is needed so that we can build up the interception chain around the - * server request. - */ - var reversedInterceptors = []; - - forEach(interceptorFactories, function(interceptorFactory) { - reversedInterceptors.unshift(isString(interceptorFactory) - ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory)); - }); - - /** - * @ngdoc service - * @kind function - * @name $http - * @requires ng.$httpBackend - * @requires $cacheFactory - * @requires $rootScope - * @requires $q - * @requires $injector - * - * @description - * The `$http` service is a core AngularJS service that facilitates communication with the remote - * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest) - * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP). - * - * For unit testing applications that use `$http` service, see - * {@link ngMock.$httpBackend $httpBackend mock}. - * - * For a higher level of abstraction, please check out the {@link ngResource.$resource - * $resource} service. - * - * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by - * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage - * it is important to familiarize yourself with these APIs and the guarantees they provide. - * - * - * ## General usage - * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} — - * that is used to generate an HTTP request and returns a {@link ng.$q promise}. - * - * ```js - * // Simple GET request example: - * $http({ - * method: 'GET', - * url: '/someUrl' - * }).then(function successCallback(response) { - * // this callback will be called asynchronously - * // when the response is available - * }, function errorCallback(response) { - * // called asynchronously if an error occurs - * // or server returns response with an error status. - * }); - * ``` - * - * The response object has these properties: - * - * - **data** – `{string|Object}` – The response body transformed with the transform - * functions. - * - **status** – `{number}` – HTTP status code of the response. - * - **headers** – `{function([headerName])}` – Header getter function. - * - **config** – `{Object}` – The configuration object that was used to generate the request. - * - **statusText** – `{string}` – HTTP status text of the response. - * - **xhrStatus** – `{string}` – Status of the XMLHttpRequest (`complete`, `error`, `timeout` or `abort`). - * - * A response status code between 200 and 299 is considered a success status and will result in - * the success callback being called. Any response status code outside of that range is - * considered an error status and will result in the error callback being called. - * Also, status codes less than -1 are normalized to zero. -1 usually means the request was - * aborted, e.g. using a `config.timeout`. - * Note that if the response is a redirect, XMLHttpRequest will transparently follow it, meaning - * that the outcome (success or error) will be determined by the final response status code. - * - * - * ## Shortcut methods - * - * Shortcut methods are also available. All shortcut methods require passing in the URL, and - * request data must be passed in for POST/PUT requests. An optional config can be passed as the - * last argument. - * - * ```js - * $http.get('/someUrl', config).then(successCallback, errorCallback); - * $http.post('/someUrl', data, config).then(successCallback, errorCallback); - * ``` - * - * Complete list of shortcut methods: - * - * - {@link ng.$http#get $http.get} - * - {@link ng.$http#head $http.head} - * - {@link ng.$http#post $http.post} - * - {@link ng.$http#put $http.put} - * - {@link ng.$http#delete $http.delete} - * - {@link ng.$http#jsonp $http.jsonp} - * - {@link ng.$http#patch $http.patch} - * - * - * ## Writing Unit Tests that use $http - * When unit testing (using {@link ngMock ngMock}), it is necessary to call - * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending - * request using trained responses. - * - * ``` - * $httpBackend.expectGET(...); - * $http.get(...); - * $httpBackend.flush(); - * ``` - * - * ## Setting HTTP Headers - * - * The $http service will automatically add certain HTTP headers to all requests. These defaults - * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration - * object, which currently contains this default configuration: - * - * - `$httpProvider.defaults.headers.common` (headers that are common for all requests): - * - Accept: application/json, text/plain, \*/\* - * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests) - * - `Content-Type: application/json` - * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests) - * - `Content-Type: application/json` - * - * To add or overwrite these defaults, simply add or remove a property from these configuration - * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object - * with the lowercased HTTP method name as the key, e.g. - * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`. - * - * The defaults can also be set at runtime via the `$http.defaults` object in the same - * fashion. For example: - * - * ``` - * module.run(function($http) { - * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'; - * }); - * ``` - * - * In addition, you can supply a `headers` property in the config object passed when - * calling `$http(config)`, which overrides the defaults without changing them globally. - * - * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis, - * Use the `headers` property, setting the desired header to `undefined`. For example: - * - * ```js - * var req = { - * method: 'POST', - * url: 'http://example.com', - * headers: { - * 'Content-Type': undefined - * }, - * data: { test: 'test' } - * } - * - * $http(req).then(function(){...}, function(){...}); - * ``` - * - * ## Transforming Requests and Responses - * - * Both requests and responses can be transformed using transformation functions: `transformRequest` - * and `transformResponse`. These properties can be a single function that returns - * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions, - * which allows you to `push` or `unshift` a new transformation function into the transformation chain. - * - *
      - * **Note:** AngularJS does not make a copy of the `data` parameter before it is passed into the `transformRequest` pipeline. - * That means changes to the properties of `data` are not local to the transform function (since Javascript passes objects by reference). - * For example, when calling `$http.get(url, $scope.myObject)`, modifications to the object's properties in a transformRequest - * function will be reflected on the scope and in any templates where the object is data-bound. - * To prevent this, transform functions should have no side-effects. - * If you need to modify properties, it is recommended to make a copy of the data, or create new object to return. - *
      - * - * ### Default Transformations - * - * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and - * `defaults.transformResponse` properties. If a request does not provide its own transformations - * then these will be applied. - * - * You can augment or replace the default transformations by modifying these properties by adding to or - * replacing the array. - * - * AngularJS provides the following default transformations: - * - * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`) is - * an array with one function that does the following: - * - * - If the `data` property of the request configuration object contains an object, serialize it - * into JSON format. - * - * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`) is - * an array with one function that does the following: - * - * - If XSRF prefix is detected, strip it (see Security Considerations section below). - * - If the `Content-Type` is `application/json` or the response looks like JSON, - * deserialize it using a JSON parser. - * - * - * ### Overriding the Default Transformations Per Request - * - * If you wish to override the request/response transformations only for a single request then provide - * `transformRequest` and/or `transformResponse` properties on the configuration object passed - * into `$http`. - * - * Note that if you provide these properties on the config object the default transformations will be - * overwritten. If you wish to augment the default transformations then you must include them in your - * local transformation array. - * - * The following code demonstrates adding a new response transformation to be run after the default response - * transformations have been run. - * - * ```js - * function appendTransform(defaults, transform) { - * - * // We can't guarantee that the default transformation is an array - * defaults = angular.isArray(defaults) ? defaults : [defaults]; - * - * // Append the new transformation to the defaults - * return defaults.concat(transform); - * } - * - * $http({ - * url: '...', - * method: 'GET', - * transformResponse: appendTransform($http.defaults.transformResponse, function(value) { - * return doTransform(value); - * }) - * }); - * ``` - * - * - * ## Caching - * - * {@link ng.$http `$http`} responses are not cached by default. To enable caching, you must - * set the config.cache value or the default cache value to TRUE or to a cache object (created - * with {@link ng.$cacheFactory `$cacheFactory`}). If defined, the value of config.cache takes - * precedence over the default cache value. - * - * In order to: - * * cache all responses - set the default cache value to TRUE or to a cache object - * * cache a specific response - set config.cache value to TRUE or to a cache object - * - * If caching is enabled, but neither the default cache nor config.cache are set to a cache object, - * then the default `$cacheFactory("$http")` object is used. - * - * The default cache value can be set by updating the - * {@link ng.$http#defaults `$http.defaults.cache`} property or the - * {@link $httpProvider#defaults `$httpProvider.defaults.cache`} property. - * - * When caching is enabled, {@link ng.$http `$http`} stores the response from the server using - * the relevant cache object. The next time the same request is made, the response is returned - * from the cache without sending a request to the server. - * - * Take note that: - * - * * Only GET and JSONP requests are cached. - * * The cache key is the request URL including search parameters; headers are not considered. - * * Cached responses are returned asynchronously, in the same way as responses from the server. - * * If multiple identical requests are made using the same cache, which is not yet populated, - * one request will be made to the server and remaining requests will return the same response. - * * A cache-control header on the response does not affect if or how responses are cached. - * - * - * ## Interceptors - * - * Before you start creating interceptors, be sure to understand the - * {@link ng.$q $q and deferred/promise APIs}. - * - * For purposes of global error handling, authentication, or any kind of synchronous or - * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be - * able to intercept requests before they are handed to the server and - * responses before they are handed over to the application code that - * initiated these requests. The interceptors leverage the {@link ng.$q - * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing. - * - * The interceptors are service factories that are registered with the `$httpProvider` by - * adding them to the `$httpProvider.interceptors` array. The factory is called and - * injected with dependencies (if specified) and returns the interceptor. - * - * There are two kinds of interceptors (and two kinds of rejection interceptors): - * - * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to - * modify the `config` object or create a new one. The function needs to return the `config` - * object directly, or a promise containing the `config` or a new `config` object. - * * `requestError`: interceptor gets called when a previous interceptor threw an error or - * resolved with a rejection. - * * `response`: interceptors get called with http `response` object. The function is free to - * modify the `response` object or create a new one. The function needs to return the `response` - * object directly, or as a promise containing the `response` or a new `response` object. - * * `responseError`: interceptor gets called when a previous interceptor threw an error or - * resolved with a rejection. - * - * - * ```js - * // register the interceptor as a service - * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) { - * return { - * // optional method - * 'request': function(config) { - * // do something on success - * return config; - * }, - * - * // optional method - * 'requestError': function(rejection) { - * // do something on error - * if (canRecover(rejection)) { - * return responseOrNewPromise - * } - * return $q.reject(rejection); - * }, - * - * - * - * // optional method - * 'response': function(response) { - * // do something on success - * return response; - * }, - * - * // optional method - * 'responseError': function(rejection) { - * // do something on error - * if (canRecover(rejection)) { - * return responseOrNewPromise - * } - * return $q.reject(rejection); - * } - * }; - * }); - * - * $httpProvider.interceptors.push('myHttpInterceptor'); - * - * - * // alternatively, register the interceptor via an anonymous factory - * $httpProvider.interceptors.push(function($q, dependency1, dependency2) { - * return { - * 'request': function(config) { - * // same as above - * }, - * - * 'response': function(response) { - * // same as above - * } - * }; - * }); - * ``` - * - * ## Security Considerations - * - * When designing web applications, consider security threats from: - * - * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) - * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) - * - * Both server and the client must cooperate in order to eliminate these threats. AngularJS comes - * pre-configured with strategies that address these issues, but for this to work backend server - * cooperation is required. - * - * ### JSON Vulnerability Protection - * - * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) - * allows third party website to turn your JSON resource URL into - * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To - * counter this your server can prefix all JSON requests with following string `")]}',\n"`. - * AngularJS will automatically strip the prefix before processing it as JSON. - * - * For example if your server needs to return: - * ```js - * ['one','two'] - * ``` - * - * which is vulnerable to attack, your server can return: - * ```js - * )]}', - * ['one','two'] - * ``` - * - * AngularJS will strip the prefix, before processing the JSON. - * - * - * ### Cross Site Request Forgery (XSRF) Protection - * - * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is an attack technique by - * which the attacker can trick an authenticated user into unknowingly executing actions on your - * website. AngularJS provides a mechanism to counter XSRF. When performing XHR requests, the - * $http service reads a token from a cookie (by default, `XSRF-TOKEN`) and sets it as an HTTP - * header (`X-XSRF-TOKEN`). Since only JavaScript that runs on your domain could read the - * cookie, your server can be assured that the XHR came from JavaScript running on your domain. - * The header will not be set for cross-domain requests. - * - * To take advantage of this, your server needs to set a token in a JavaScript readable session - * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the - * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure - * that only JavaScript running on your domain could have sent the request. The token must be - * unique for each user and must be verifiable by the server (to prevent the JavaScript from - * making up its own tokens). We recommend that the token is a digest of your site's - * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) - * for added security. - * - * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName - * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time, - * or the per-request config object. - * - * In order to prevent collisions in environments where multiple AngularJS apps share the - * same domain or subdomain, we recommend that each application uses unique cookie name. - * - * @param {object} config Object describing the request to be made and how it should be - * processed. The object has following properties: - * - * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc) - * - **url** – `{string|TrustedObject}` – Absolute or relative URL of the resource that is being requested; - * or an object created by a call to `$sce.trustAsResourceUrl(url)`. - * - **params** – `{Object.}` – Map of strings or objects which will be serialized - * with the `paramSerializer` and appended as GET parameters. - * - **data** – `{string|Object}` – Data to be sent as the request message data. - * - **headers** – `{Object}` – Map of strings or functions which return strings representing - * HTTP headers to send to the server. If the return value of a function is null, the - * header will not be sent. Functions accept a config object as an argument. - * - **eventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest object. - * To bind events to the XMLHttpRequest upload object, use `uploadEventHandlers`. - * The handler will be called in the context of a `$apply` block. - * - **uploadEventHandlers** - `{Object}` - Event listeners to be bound to the XMLHttpRequest upload - * object. To bind events to the XMLHttpRequest object, use `eventHandlers`. - * The handler will be called in the context of a `$apply` block. - * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token. - * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token. - * - **transformRequest** – - * `{function(data, headersGetter)|Array.}` – - * transform function or an array of such functions. The transform function takes the http - * request body and headers and returns its transformed (typically serialized) version. - * See {@link ng.$http#overriding-the-default-transformations-per-request - * Overriding the Default Transformations} - * - **transformResponse** – - * `{function(data, headersGetter, status)|Array.}` – - * transform function or an array of such functions. The transform function takes the http - * response body, headers and status and returns its transformed (typically deserialized) version. - * See {@link ng.$http#overriding-the-default-transformations-per-request - * Overriding the Default Transformations} - * - **paramSerializer** - `{string|function(Object):string}` - A function used to - * prepare the string representation of request parameters (specified as an object). - * If specified as string, it is interpreted as function registered with the - * {@link $injector $injector}, which means you can create your own serializer - * by registering it as a {@link auto.$provide#service service}. - * The default serializer is the {@link $httpParamSerializer $httpParamSerializer}; - * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike} - * - **cache** – `{boolean|Object}` – A boolean value or object created with - * {@link ng.$cacheFactory `$cacheFactory`} to enable or disable caching of the HTTP response. - * See {@link $http#caching $http Caching} for more information. - * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} - * that should abort the request when resolved. - * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the - * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials) - * for more information. - * - **responseType** - `{string}` - see - * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype). - * - * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object - * when the request succeeds or fails. - * - * - * @property {Array.} pendingRequests Array of config objects for currently pending - * requests. This is primarily meant to be used for debugging purposes. - * - * - * @example - - -
      - - -
      - - - -
      http status code: {{status}}
      -
      http response data: {{data}}
      -
      -
      - - angular.module('httpExample', []) - .config(['$sceDelegateProvider', function($sceDelegateProvider) { - // We must whitelist the JSONP endpoint that we are using to show that we trust it - $sceDelegateProvider.resourceUrlWhitelist([ - 'self', - 'https://angularjs.org/**' - ]); - }]) - .controller('FetchController', ['$scope', '$http', '$templateCache', - function($scope, $http, $templateCache) { - $scope.method = 'GET'; - $scope.url = 'http-hello.html'; - - $scope.fetch = function() { - $scope.code = null; - $scope.response = null; - - $http({method: $scope.method, url: $scope.url, cache: $templateCache}). - then(function(response) { - $scope.status = response.status; - $scope.data = response.data; - }, function(response) { - $scope.data = response.data || 'Request failed'; - $scope.status = response.status; - }); - }; - - $scope.updateModel = function(method, url) { - $scope.method = method; - $scope.url = url; - }; - }]); - - - Hello, $http! - - - var status = element(by.binding('status')); - var data = element(by.binding('data')); - var fetchBtn = element(by.id('fetchbtn')); - var sampleGetBtn = element(by.id('samplegetbtn')); - var invalidJsonpBtn = element(by.id('invalidjsonpbtn')); - - it('should make an xhr GET request', function() { - sampleGetBtn.click(); - fetchBtn.click(); - expect(status.getText()).toMatch('200'); - expect(data.getText()).toMatch(/Hello, \$http!/); - }); - -// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185 -// it('should make a JSONP request to angularjs.org', function() { -// var sampleJsonpBtn = element(by.id('samplejsonpbtn')); -// sampleJsonpBtn.click(); -// fetchBtn.click(); -// expect(status.getText()).toMatch('200'); -// expect(data.getText()).toMatch(/Super Hero!/); -// }); - - it('should make JSONP request to invalid URL and invoke the error handler', - function() { - invalidJsonpBtn.click(); - fetchBtn.click(); - expect(status.getText()).toMatch('0'); - expect(data.getText()).toMatch('Request failed'); - }); - -
      - */ - function $http(requestConfig) { - - if (!isObject(requestConfig)) { - throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig); - } - - if (!isString($sce.valueOf(requestConfig.url))) { - throw minErr('$http')('badreq', 'Http request configuration url must be a string or a $sce trusted object. Received: {0}', requestConfig.url); - } - - var config = extend({ - method: 'get', - transformRequest: defaults.transformRequest, - transformResponse: defaults.transformResponse, - paramSerializer: defaults.paramSerializer, - jsonpCallbackParam: defaults.jsonpCallbackParam - }, requestConfig); - - config.headers = mergeHeaders(requestConfig); - config.method = uppercase(config.method); - config.paramSerializer = isString(config.paramSerializer) ? - $injector.get(config.paramSerializer) : config.paramSerializer; - - $browser.$$incOutstandingRequestCount(); - - var requestInterceptors = []; - var responseInterceptors = []; - var promise = $q.resolve(config); - - // apply interceptors - forEach(reversedInterceptors, function(interceptor) { - if (interceptor.request || interceptor.requestError) { - requestInterceptors.unshift(interceptor.request, interceptor.requestError); - } - if (interceptor.response || interceptor.responseError) { - responseInterceptors.push(interceptor.response, interceptor.responseError); - } - }); - - promise = chainInterceptors(promise, requestInterceptors); - promise = promise.then(serverRequest); - promise = chainInterceptors(promise, responseInterceptors); - promise = promise.finally(completeOutstandingRequest); - - return promise; - - - function chainInterceptors(promise, interceptors) { - for (var i = 0, ii = interceptors.length; i < ii;) { - var thenFn = interceptors[i++]; - var rejectFn = interceptors[i++]; - - promise = promise.then(thenFn, rejectFn); - } - - interceptors.length = 0; - - return promise; - } - - function completeOutstandingRequest() { - $browser.$$completeOutstandingRequest(noop); - } - - function executeHeaderFns(headers, config) { - var headerContent, processedHeaders = {}; - - forEach(headers, function(headerFn, header) { - if (isFunction(headerFn)) { - headerContent = headerFn(config); - if (headerContent != null) { - processedHeaders[header] = headerContent; - } - } else { - processedHeaders[header] = headerFn; - } - }); - - return processedHeaders; - } - - function mergeHeaders(config) { - var defHeaders = defaults.headers, - reqHeaders = extend({}, config.headers), - defHeaderName, lowercaseDefHeaderName, reqHeaderName; - - defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]); - - // using for-in instead of forEach to avoid unnecessary iteration after header has been found - defaultHeadersIteration: - for (defHeaderName in defHeaders) { - lowercaseDefHeaderName = lowercase(defHeaderName); - - for (reqHeaderName in reqHeaders) { - if (lowercase(reqHeaderName) === lowercaseDefHeaderName) { - continue defaultHeadersIteration; - } - } - - reqHeaders[defHeaderName] = defHeaders[defHeaderName]; - } - - // execute if header value is a function for merged headers - return executeHeaderFns(reqHeaders, shallowCopy(config)); - } - - function serverRequest(config) { - var headers = config.headers; - var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest); - - // strip content-type if data is undefined - if (isUndefined(reqData)) { - forEach(headers, function(value, header) { - if (lowercase(header) === 'content-type') { - delete headers[header]; - } - }); - } - - if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) { - config.withCredentials = defaults.withCredentials; - } - - // send request - return sendReq(config, reqData).then(transformResponse, transformResponse); - } - - function transformResponse(response) { - // make a copy since the response must be cacheable - var resp = extend({}, response); - resp.data = transformData(response.data, response.headers, response.status, - config.transformResponse); - return (isSuccess(response.status)) - ? resp - : $q.reject(resp); - } - } - - $http.pendingRequests = []; - - /** - * @ngdoc method - * @name $http#get - * - * @description - * Shortcut method to perform `GET` request. - * - * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; - * or an object created by a call to `$sce.trustAsResourceUrl(url)`. - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - - /** - * @ngdoc method - * @name $http#delete - * - * @description - * Shortcut method to perform `DELETE` request. - * - * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; - * or an object created by a call to `$sce.trustAsResourceUrl(url)`. - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - - /** - * @ngdoc method - * @name $http#head - * - * @description - * Shortcut method to perform `HEAD` request. - * - * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; - * or an object created by a call to `$sce.trustAsResourceUrl(url)`. - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - - /** - * @ngdoc method - * @name $http#jsonp - * - * @description - * Shortcut method to perform `JSONP` request. - * - * Note that, since JSONP requests are sensitive because the response is given full access to the browser, - * the url must be declared, via {@link $sce} as a trusted resource URL. - * You can trust a URL by adding it to the whitelist via - * {@link $sceDelegateProvider#resourceUrlWhitelist `$sceDelegateProvider.resourceUrlWhitelist`} or - * by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}. - * - * You should avoid generating the URL for the JSONP request from user provided data. - * Provide additional query parameters via `params` property of the `config` parameter, rather than - * modifying the URL itself. - * - * JSONP requests must specify a callback to be used in the response from the server. This callback - * is passed as a query parameter in the request. You must specify the name of this parameter by - * setting the `jsonpCallbackParam` property on the request config object. - * - * ``` - * $http.jsonp('some/trusted/url', {jsonpCallbackParam: 'callback'}) - * ``` - * - * You can also specify a default callback parameter name in `$http.defaults.jsonpCallbackParam`. - * Initially this is set to `'callback'`. - * - *
      - * You can no longer use the `JSON_CALLBACK` string as a placeholder for specifying where the callback - * parameter value should go. - *
      - * - * If you would like to customise where and how the callbacks are stored then try overriding - * or decorating the {@link $jsonpCallbacks} service. - * - * @param {string|TrustedObject} url Absolute or relative URL of the resource that is being requested; - * or an object created by a call to `$sce.trustAsResourceUrl(url)`. - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - createShortMethods('get', 'delete', 'head', 'jsonp'); - - /** - * @ngdoc method - * @name $http#post - * - * @description - * Shortcut method to perform `POST` request. - * - * @param {string} url Relative or absolute URL specifying the destination of the request - * @param {*} data Request content - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - - /** - * @ngdoc method - * @name $http#put - * - * @description - * Shortcut method to perform `PUT` request. - * - * @param {string} url Relative or absolute URL specifying the destination of the request - * @param {*} data Request content - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - - /** - * @ngdoc method - * @name $http#patch - * - * @description - * Shortcut method to perform `PATCH` request. - * - * @param {string} url Relative or absolute URL specifying the destination of the request - * @param {*} data Request content - * @param {Object=} config Optional configuration object. See https://docs.angularjs.org/api/ng/service/$http#usage - * @returns {HttpPromise} Future object - */ - createShortMethodsWithData('post', 'put', 'patch'); - - /** - * @ngdoc property - * @name $http#defaults - * - * @description - * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of - * default headers, withCredentials as well as request and response transformations. - * - * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above. - */ - $http.defaults = defaults; - - - return $http; - - - function createShortMethods(names) { - forEach(arguments, function(name) { - $http[name] = function(url, config) { - return $http(extend({}, config || {}, { - method: name, - url: url - })); - }; - }); - } - - - function createShortMethodsWithData(name) { - forEach(arguments, function(name) { - $http[name] = function(url, data, config) { - return $http(extend({}, config || {}, { - method: name, - url: url, - data: data - })); - }; - }); - } - - - /** - * Makes the request. - * - * !!! ACCESSES CLOSURE VARS: - * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests - */ - function sendReq(config, reqData) { - var deferred = $q.defer(), - promise = deferred.promise, - cache, - cachedResp, - reqHeaders = config.headers, - isJsonp = lowercase(config.method) === 'jsonp', - url = config.url; - - if (isJsonp) { - // JSONP is a pretty sensitive operation where we're allowing a script to have full access to - // our DOM and JS space. So we require that the URL satisfies SCE.RESOURCE_URL. - url = $sce.getTrustedResourceUrl(url); - } else if (!isString(url)) { - // If it is not a string then the URL must be a $sce trusted object - url = $sce.valueOf(url); - } - - url = buildUrl(url, config.paramSerializer(config.params)); - - if (isJsonp) { - // Check the url and add the JSONP callback placeholder - url = sanitizeJsonpCallbackParam(url, config.jsonpCallbackParam); - } - - $http.pendingRequests.push(config); - promise.then(removePendingReq, removePendingReq); - - if ((config.cache || defaults.cache) && config.cache !== false && - (config.method === 'GET' || config.method === 'JSONP')) { - cache = isObject(config.cache) ? config.cache - : isObject(/** @type {?} */ (defaults).cache) - ? /** @type {?} */ (defaults).cache - : defaultCache; - } - - if (cache) { - cachedResp = cache.get(url); - if (isDefined(cachedResp)) { - if (isPromiseLike(cachedResp)) { - // cached request has already been sent, but there is no response yet - cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult); - } else { - // serving from cache - if (isArray(cachedResp)) { - resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3], cachedResp[4]); - } else { - resolvePromise(cachedResp, 200, {}, 'OK', 'complete'); - } - } - } else { - // put the promise for the non-transformed response into cache as a placeholder - cache.put(url, promise); - } - } - - - // if we won't have the response in cache, set the xsrf headers and - // send the request to the backend - if (isUndefined(cachedResp)) { - var xsrfValue = urlIsSameOrigin(config.url) - ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName] - : undefined; - if (xsrfValue) { - reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue; - } - - $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout, - config.withCredentials, config.responseType, - createApplyHandlers(config.eventHandlers), - createApplyHandlers(config.uploadEventHandlers)); - } - - return promise; - - function createApplyHandlers(eventHandlers) { - if (eventHandlers) { - var applyHandlers = {}; - forEach(eventHandlers, function(eventHandler, key) { - applyHandlers[key] = function(event) { - if (useApplyAsync) { - $rootScope.$applyAsync(callEventHandler); - } else if ($rootScope.$$phase) { - callEventHandler(); - } else { - $rootScope.$apply(callEventHandler); - } - - function callEventHandler() { - eventHandler(event); - } - }; - }); - return applyHandlers; - } - } - - - /** - * Callback registered to $httpBackend(): - * - caches the response if desired - * - resolves the raw $http promise - * - calls $apply - */ - function done(status, response, headersString, statusText, xhrStatus) { - if (cache) { - if (isSuccess(status)) { - cache.put(url, [status, response, parseHeaders(headersString), statusText, xhrStatus]); - } else { - // remove promise from the cache - cache.remove(url); - } - } - - function resolveHttpPromise() { - resolvePromise(response, status, headersString, statusText, xhrStatus); - } - - if (useApplyAsync) { - $rootScope.$applyAsync(resolveHttpPromise); - } else { - resolveHttpPromise(); - if (!$rootScope.$$phase) $rootScope.$apply(); - } - } - - - /** - * Resolves the raw $http promise. - */ - function resolvePromise(response, status, headers, statusText, xhrStatus) { - //status: HTTP response status code, 0, -1 (aborted by timeout / promise) - status = status >= -1 ? status : 0; - - (isSuccess(status) ? deferred.resolve : deferred.reject)({ - data: response, - status: status, - headers: headersGetter(headers), - config: config, - statusText: statusText, - xhrStatus: xhrStatus - }); - } - - function resolvePromiseWithResult(result) { - resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus); - } - - function removePendingReq() { - var idx = $http.pendingRequests.indexOf(config); - if (idx !== -1) $http.pendingRequests.splice(idx, 1); - } - } - - - function buildUrl(url, serializedParams) { - if (serializedParams.length > 0) { - url += ((url.indexOf('?') === -1) ? '?' : '&') + serializedParams; - } - return url; - } - - function sanitizeJsonpCallbackParam(url, cbKey) { - var parts = url.split('?'); - if (parts.length > 2) { - // Throw if the url contains more than one `?` query indicator - throw $httpMinErr('badjsonp', 'Illegal use more than one "?", in url, "{1}"', url); - } - var params = parseKeyValue(parts[1]); - forEach(params, function(value, key) { - if (value === 'JSON_CALLBACK') { - // Throw if the url already contains a reference to JSON_CALLBACK - throw $httpMinErr('badjsonp', 'Illegal use of JSON_CALLBACK in url, "{0}"', url); - } - if (key === cbKey) { - // Throw if the callback param was already provided - throw $httpMinErr('badjsonp', 'Illegal use of callback param, "{0}", in url, "{1}"', cbKey, url); - } - }); - - // Add in the JSON_CALLBACK callback param value - url += ((url.indexOf('?') === -1) ? '?' : '&') + cbKey + '=JSON_CALLBACK'; - - return url; - } - }]; -} - -/** - * @ngdoc service - * @name $xhrFactory - * @this - * - * @description - * Factory function used to create XMLHttpRequest objects. - * - * Replace or decorate this service to create your own custom XMLHttpRequest objects. - * - * ``` - * angular.module('myApp', []) - * .factory('$xhrFactory', function() { - * return function createXhr(method, url) { - * return new window.XMLHttpRequest({mozSystem: true}); - * }; - * }); - * ``` - * - * @param {string} method HTTP method of the request (GET, POST, PUT, ..) - * @param {string} url URL of the request. - */ -function $xhrFactoryProvider() { - this.$get = function() { - return function createXhr() { - return new window.XMLHttpRequest(); - }; - }; -} - -/** - * @ngdoc service - * @name $httpBackend - * @requires $jsonpCallbacks - * @requires $document - * @requires $xhrFactory - * @this - * - * @description - * HTTP backend used by the {@link ng.$http service} that delegates to - * XMLHttpRequest object or JSONP and deals with browser incompatibilities. - * - * You should never need to use this service directly, instead use the higher-level abstractions: - * {@link ng.$http $http} or {@link ngResource.$resource $resource}. - * - * During testing this implementation is swapped with {@link ngMock.$httpBackend mock - * $httpBackend} which can be trained with responses. - */ -function $HttpBackendProvider() { - this.$get = ['$browser', '$jsonpCallbacks', '$document', '$xhrFactory', function($browser, $jsonpCallbacks, $document, $xhrFactory) { - return createHttpBackend($browser, $xhrFactory, $browser.defer, $jsonpCallbacks, $document[0]); - }]; -} - -function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) { - // TODO(vojta): fix the signature - return function(method, url, post, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) { - url = url || $browser.url(); - - if (lowercase(method) === 'jsonp') { - var callbackPath = callbacks.createCallback(url); - var jsonpDone = jsonpReq(url, callbackPath, function(status, text) { - // jsonpReq only ever sets status to 200 (OK), 404 (ERROR) or -1 (WAITING) - var response = (status === 200) && callbacks.getResponse(callbackPath); - completeRequest(callback, status, response, '', text, 'complete'); - callbacks.removeCallback(callbackPath); - }); - } else { - - var xhr = createXhr(method, url); - - xhr.open(method, url, true); - forEach(headers, function(value, key) { - if (isDefined(value)) { - xhr.setRequestHeader(key, value); - } - }); - - xhr.onload = function requestLoaded() { - var statusText = xhr.statusText || ''; - - // responseText is the old-school way of retrieving response (supported by IE9) - // response/responseType properties were introduced in XHR Level2 spec (supported by IE10) - var response = ('response' in xhr) ? xhr.response : xhr.responseText; - - // normalize IE9 bug (http://bugs.jquery.com/ticket/1450) - var status = xhr.status === 1223 ? 204 : xhr.status; - - // fix status code when it is 0 (0 status is undocumented). - // Occurs when accessing file resources or on Android 4.1 stock browser - // while retrieving files from application cache. - if (status === 0) { - status = response ? 200 : urlResolve(url).protocol === 'file' ? 404 : 0; - } - - completeRequest(callback, - status, - response, - xhr.getAllResponseHeaders(), - statusText, - 'complete'); - }; - - var requestError = function() { - // The response is always empty - // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error - completeRequest(callback, -1, null, null, '', 'error'); - }; - - var requestAborted = function() { - completeRequest(callback, -1, null, null, '', 'abort'); - }; - - var requestTimeout = function() { - // The response is always empty - // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error - completeRequest(callback, -1, null, null, '', 'timeout'); - }; - - xhr.onerror = requestError; - xhr.onabort = requestAborted; - xhr.ontimeout = requestTimeout; - - forEach(eventHandlers, function(value, key) { - xhr.addEventListener(key, value); - }); - - forEach(uploadEventHandlers, function(value, key) { - xhr.upload.addEventListener(key, value); - }); - - if (withCredentials) { - xhr.withCredentials = true; - } - - if (responseType) { - try { - xhr.responseType = responseType; - } catch (e) { - // WebKit added support for the json responseType value on 09/03/2013 - // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are - // known to throw when setting the value "json" as the response type. Other older - // browsers implementing the responseType - // - // The json response type can be ignored if not supported, because JSON payloads are - // parsed on the client-side regardless. - if (responseType !== 'json') { - throw e; - } - } - } - - xhr.send(isUndefined(post) ? null : post); - } - - if (timeout > 0) { - var timeoutId = $browserDefer(timeoutRequest, timeout); - } else if (isPromiseLike(timeout)) { - timeout.then(timeoutRequest); - } - - - function timeoutRequest() { - if (jsonpDone) { - jsonpDone(); - } - if (xhr) { - xhr.abort(); - } - } - - function completeRequest(callback, status, response, headersString, statusText, xhrStatus) { - // cancel timeout and subsequent timeout promise resolution - if (isDefined(timeoutId)) { - $browserDefer.cancel(timeoutId); - } - jsonpDone = xhr = null; - - callback(status, response, headersString, statusText, xhrStatus); - } - }; - - function jsonpReq(url, callbackPath, done) { - url = url.replace('JSON_CALLBACK', callbackPath); - // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.: - // - fetches local scripts via XHR and evals them - // - adds and immediately removes script elements from the document - var script = rawDocument.createElement('script'), callback = null; - script.type = 'text/javascript'; - script.src = url; - script.async = true; - - callback = function(event) { - script.removeEventListener('load', callback); - script.removeEventListener('error', callback); - rawDocument.body.removeChild(script); - script = null; - var status = -1; - var text = 'unknown'; - - if (event) { - if (event.type === 'load' && !callbacks.wasCalled(callbackPath)) { - event = { type: 'error' }; - } - text = event.type; - status = event.type === 'error' ? 404 : 200; - } - - if (done) { - done(status, text); - } - }; - - script.addEventListener('load', callback); - script.addEventListener('error', callback); - rawDocument.body.appendChild(script); - return callback; - } -} - -var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate'); -$interpolateMinErr.throwNoconcat = function(text) { - throw $interpolateMinErr('noconcat', - 'Error while interpolating: {0}\nStrict Contextual Escaping disallows ' + - 'interpolations that concatenate multiple expressions when a trusted value is ' + - 'required. See http://docs.angularjs.org/api/ng.$sce', text); -}; - -$interpolateMinErr.interr = function(text, err) { - return $interpolateMinErr('interr', 'Can\'t interpolate: {0}\n{1}', text, err.toString()); -}; - -/** - * @ngdoc provider - * @name $interpolateProvider - * @this - * - * @description - * - * Used for configuring the interpolation markup. Defaults to `{{` and `}}`. - * - *
      - * This feature is sometimes used to mix different markup languages, e.g. to wrap an AngularJS - * template within a Python Jinja template (or any other template language). Mixing templating - * languages is **very dangerous**. The embedding template language will not safely escape AngularJS - * expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS) - * security bugs! - *
      - * - * @example - - - -
      - //demo.label// -
      -
      - - it('should interpolate binding with custom symbols', function() { - expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.'); - }); - -
      - */ -function $InterpolateProvider() { - var startSymbol = '{{'; - var endSymbol = '}}'; - - /** - * @ngdoc method - * @name $interpolateProvider#startSymbol - * @description - * Symbol to denote start of expression in the interpolated string. Defaults to `{{`. - * - * @param {string=} value new value to set the starting symbol to. - * @returns {string|self} Returns the symbol when used as getter and self if used as setter. - */ - this.startSymbol = function(value) { - if (value) { - startSymbol = value; - return this; - } else { - return startSymbol; - } - }; - - /** - * @ngdoc method - * @name $interpolateProvider#endSymbol - * @description - * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. - * - * @param {string=} value new value to set the ending symbol to. - * @returns {string|self} Returns the symbol when used as getter and self if used as setter. - */ - this.endSymbol = function(value) { - if (value) { - endSymbol = value; - return this; - } else { - return endSymbol; - } - }; - - - this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) { - var startSymbolLength = startSymbol.length, - endSymbolLength = endSymbol.length, - escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'), - escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g'); - - function escape(ch) { - return '\\\\\\' + ch; - } - - function unescapeText(text) { - return text.replace(escapedStartRegexp, startSymbol). - replace(escapedEndRegexp, endSymbol); - } - - // TODO: this is the same as the constantWatchDelegate in parse.js - function constantWatchDelegate(scope, listener, objectEquality, constantInterp) { - var unwatch = scope.$watch(function constantInterpolateWatch(scope) { - unwatch(); - return constantInterp(scope); - }, listener, objectEquality); - return unwatch; - } - - /** - * @ngdoc service - * @name $interpolate - * @kind function - * - * @requires $parse - * @requires $sce - * - * @description - * - * Compiles a string with markup into an interpolation function. This service is used by the - * HTML {@link ng.$compile $compile} service for data binding. See - * {@link ng.$interpolateProvider $interpolateProvider} for configuring the - * interpolation markup. - * - * - * ```js - * var $interpolate = ...; // injected - * var exp = $interpolate('Hello {{name | uppercase}}!'); - * expect(exp({name:'AngularJS'})).toEqual('Hello ANGULAR!'); - * ``` - * - * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is - * `true`, the interpolation function will return `undefined` unless all embedded expressions - * evaluate to a value other than `undefined`. - * - * ```js - * var $interpolate = ...; // injected - * var context = {greeting: 'Hello', name: undefined }; - * - * // default "forgiving" mode - * var exp = $interpolate('{{greeting}} {{name}}!'); - * expect(exp(context)).toEqual('Hello !'); - * - * // "allOrNothing" mode - * exp = $interpolate('{{greeting}} {{name}}!', false, null, true); - * expect(exp(context)).toBeUndefined(); - * context.name = 'AngularJS'; - * expect(exp(context)).toEqual('Hello AngularJS!'); - * ``` - * - * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior. - * - * #### Escaped Interpolation - * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers - * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash). - * It will be rendered as a regular start/end marker, and will not be interpreted as an expression - * or binding. - * - * This enables web-servers to prevent script injection attacks and defacing attacks, to some - * degree, while also enabling code examples to work without relying on the - * {@link ng.directive:ngNonBindable ngNonBindable} directive. - * - * **For security purposes, it is strongly encouraged that web servers escape user-supplied data, - * replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all - * interpolation start/end markers with their escaped counterparts.** - * - * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered - * output when the $interpolate service processes the text. So, for HTML elements interpolated - * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter - * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such, - * this is typically useful only when user-data is used in rendering a template from the server, or - * when otherwise untrusted data is used by a directive. - * - * - * - *
      - *

      {{apptitle}}: \{\{ username = "defaced value"; \}\} - *

      - *

      {{username}} attempts to inject code which will deface the - * application, but fails to accomplish their task, because the server has correctly - * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash) - * characters.

      - *

      Instead, the result of the attempted script injection is visible, and can be removed - * from the database by an administrator.

      - *
      - *
      - *
      - * - * @knownIssue - * It is currently not possible for an interpolated expression to contain the interpolation end - * symbol. For example, `{{ '}}' }}` will be incorrectly interpreted as `{{ ' }}` + `' }}`, i.e. - * an interpolated expression consisting of a single-quote (`'`) and the `' }}` string. - * - * @knownIssue - * All directives and components must use the standard `{{` `}}` interpolation symbols - * in their templates. If you change the application interpolation symbols the {@link $compile} - * service will attempt to denormalize the standard symbols to the custom symbols. - * The denormalization process is not clever enough to know not to replace instances of the standard - * symbols where they would not normally be treated as interpolation symbols. For example in the following - * code snippet the closing braces of the literal object will get incorrectly denormalized: - * - * ``` - *
      - * ``` - * - * See https://github.com/angular/angular.js/pull/14610#issuecomment-219401099 for more information. - * - * @param {string} text The text with markup to interpolate. - * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have - * embedded expression in order to return an interpolation function. Strings with no - * embedded expression will return null for the interpolation function. - * @param {string=} trustedContext when provided, the returned function passes the interpolated - * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult, - * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that - * provides Strict Contextual Escaping for details. - * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined - * unless all embedded expressions evaluate to a value other than `undefined`. - * @returns {function(context)} an interpolation function which is used to compute the - * interpolated string. The function has these parameters: - * - * - `context`: evaluation context for all expressions embedded in the interpolated text - */ - function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) { - // Provide a quick exit and simplified result function for text with no interpolation - if (!text.length || text.indexOf(startSymbol) === -1) { - var constantInterp; - if (!mustHaveExpression) { - var unescapedText = unescapeText(text); - constantInterp = valueFn(unescapedText); - constantInterp.exp = text; - constantInterp.expressions = []; - constantInterp.$$watchDelegate = constantWatchDelegate; - } - return constantInterp; - } - - allOrNothing = !!allOrNothing; - var startIndex, - endIndex, - index = 0, - expressions = [], - parseFns = [], - textLength = text.length, - exp, - concat = [], - expressionPositions = []; - - while (index < textLength) { - if (((startIndex = text.indexOf(startSymbol, index)) !== -1) && - ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) !== -1)) { - if (index !== startIndex) { - concat.push(unescapeText(text.substring(index, startIndex))); - } - exp = text.substring(startIndex + startSymbolLength, endIndex); - expressions.push(exp); - parseFns.push($parse(exp, parseStringifyInterceptor)); - index = endIndex + endSymbolLength; - expressionPositions.push(concat.length); - concat.push(''); - } else { - // we did not find an interpolation, so we have to add the remainder to the separators array - if (index !== textLength) { - concat.push(unescapeText(text.substring(index))); - } - break; - } - } - - // Concatenating expressions makes it hard to reason about whether some combination of - // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a - // single expression be used for iframe[src], object[src], etc., we ensure that the value - // that's used is assigned or constructed by some JS code somewhere that is more testable or - // make it obvious that you bound the value to some user controlled value. This helps reduce - // the load when auditing for XSS issues. - if (trustedContext && concat.length > 1) { - $interpolateMinErr.throwNoconcat(text); - } - - if (!mustHaveExpression || expressions.length) { - var compute = function(values) { - for (var i = 0, ii = expressions.length; i < ii; i++) { - if (allOrNothing && isUndefined(values[i])) return; - concat[expressionPositions[i]] = values[i]; - } - return concat.join(''); - }; - - var getValue = function(value) { - return trustedContext ? - $sce.getTrusted(trustedContext, value) : - $sce.valueOf(value); - }; - - return extend(function interpolationFn(context) { - var i = 0; - var ii = expressions.length; - var values = new Array(ii); - - try { - for (; i < ii; i++) { - values[i] = parseFns[i](context); - } - - return compute(values); - } catch (err) { - $exceptionHandler($interpolateMinErr.interr(text, err)); - } - - }, { - // all of these properties are undocumented for now - exp: text, //just for compatibility with regular watchers created via $watch - expressions: expressions, - $$watchDelegate: function(scope, listener) { - var lastValue; - return scope.$watchGroup(parseFns, /** @this */ function interpolateFnWatcher(values, oldValues) { - var currValue = compute(values); - listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope); - lastValue = currValue; - }); - } - }); - } - - function parseStringifyInterceptor(value) { - try { - value = getValue(value); - return allOrNothing && !isDefined(value) ? value : stringify(value); - } catch (err) { - $exceptionHandler($interpolateMinErr.interr(text, err)); - } - } - } - - - /** - * @ngdoc method - * @name $interpolate#startSymbol - * @description - * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`. - * - * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change - * the symbol. - * - * @returns {string} start symbol. - */ - $interpolate.startSymbol = function() { - return startSymbol; - }; - - - /** - * @ngdoc method - * @name $interpolate#endSymbol - * @description - * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. - * - * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change - * the symbol. - * - * @returns {string} end symbol. - */ - $interpolate.endSymbol = function() { - return endSymbol; - }; - - return $interpolate; - }]; -} - -/** @this */ -function $IntervalProvider() { - this.$get = ['$rootScope', '$window', '$q', '$$q', '$browser', - function($rootScope, $window, $q, $$q, $browser) { - var intervals = {}; - - - /** - * @ngdoc service - * @name $interval - * - * @description - * AngularJS's wrapper for `window.setInterval`. The `fn` function is executed every `delay` - * milliseconds. - * - * The return value of registering an interval function is a promise. This promise will be - * notified upon each tick of the interval, and will be resolved after `count` iterations, or - * run indefinitely if `count` is not defined. The value of the notification will be the - * number of iterations that have run. - * To cancel an interval, call `$interval.cancel(promise)`. - * - * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to - * move forward by `millis` milliseconds and trigger any functions scheduled to run in that - * time. - * - *
      - * **Note**: Intervals created by this service must be explicitly destroyed when you are finished - * with them. In particular they are not automatically destroyed when a controller's scope or a - * directive's element are destroyed. - * You should take this into consideration and make sure to always cancel the interval at the - * appropriate moment. See the example below for more details on how and when to do this. - *
      - * - * @param {function()} fn A function that should be called repeatedly. If no additional arguments - * are passed (see below), the function is called with the current iteration count. - * @param {number} delay Number of milliseconds between each function call. - * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat - * indefinitely. - * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise - * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. - * @param {...*=} Pass additional parameters to the executed function. - * @returns {promise} A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete. - * - * @example - * - * - * - * - *
      - *
      - *
      - * Current time is: - *
      - * Blood 1 : {{blood_1}} - * Blood 2 : {{blood_2}} - * - * - * - *
      - *
      - * - *
      - *
      - */ - function interval(fn, delay, count, invokeApply) { - var hasParams = arguments.length > 4, - args = hasParams ? sliceArgs(arguments, 4) : [], - setInterval = $window.setInterval, - clearInterval = $window.clearInterval, - iteration = 0, - skipApply = (isDefined(invokeApply) && !invokeApply), - deferred = (skipApply ? $$q : $q).defer(), - promise = deferred.promise; - - count = isDefined(count) ? count : 0; - - promise.$$intervalId = setInterval(function tick() { - if (skipApply) { - $browser.defer(callback); - } else { - $rootScope.$evalAsync(callback); - } - deferred.notify(iteration++); - - if (count > 0 && iteration >= count) { - deferred.resolve(iteration); - clearInterval(promise.$$intervalId); - delete intervals[promise.$$intervalId]; - } - - if (!skipApply) $rootScope.$apply(); - - }, delay); - - intervals[promise.$$intervalId] = deferred; - - return promise; - - function callback() { - if (!hasParams) { - fn(iteration); - } else { - fn.apply(null, args); - } - } - } - - - /** - * @ngdoc method - * @name $interval#cancel - * - * @description - * Cancels a task associated with the `promise`. - * - * @param {Promise=} promise returned by the `$interval` function. - * @returns {boolean} Returns `true` if the task was successfully canceled. - */ - interval.cancel = function(promise) { - if (promise && promise.$$intervalId in intervals) { - // Interval cancels should not report as unhandled promise. - markQExceptionHandled(intervals[promise.$$intervalId].promise); - intervals[promise.$$intervalId].reject('canceled'); - $window.clearInterval(promise.$$intervalId); - delete intervals[promise.$$intervalId]; - return true; - } - return false; - }; - - return interval; - }]; -} - -/** - * @ngdoc service - * @name $jsonpCallbacks - * @requires $window - * @description - * This service handles the lifecycle of callbacks to handle JSONP requests. - * Override this service if you wish to customise where the callbacks are stored and - * how they vary compared to the requested url. - */ -var $jsonpCallbacksProvider = /** @this */ function() { - this.$get = function() { - var callbacks = angular.callbacks; - var callbackMap = {}; - - function createCallback(callbackId) { - var callback = function(data) { - callback.data = data; - callback.called = true; - }; - callback.id = callbackId; - return callback; - } - - return { - /** - * @ngdoc method - * @name $jsonpCallbacks#createCallback - * @param {string} url the url of the JSONP request - * @returns {string} the callback path to send to the server as part of the JSONP request - * @description - * {@link $httpBackend} calls this method to create a callback and get hold of the path to the callback - * to pass to the server, which will be used to call the callback with its payload in the JSONP response. - */ - createCallback: function(url) { - var callbackId = '_' + (callbacks.$$counter++).toString(36); - var callbackPath = 'angular.callbacks.' + callbackId; - var callback = createCallback(callbackId); - callbackMap[callbackPath] = callbacks[callbackId] = callback; - return callbackPath; - }, - /** - * @ngdoc method - * @name $jsonpCallbacks#wasCalled - * @param {string} callbackPath the path to the callback that was sent in the JSONP request - * @returns {boolean} whether the callback has been called, as a result of the JSONP response - * @description - * {@link $httpBackend} calls this method to find out whether the JSONP response actually called the - * callback that was passed in the request. - */ - wasCalled: function(callbackPath) { - return callbackMap[callbackPath].called; - }, - /** - * @ngdoc method - * @name $jsonpCallbacks#getResponse - * @param {string} callbackPath the path to the callback that was sent in the JSONP request - * @returns {*} the data received from the response via the registered callback - * @description - * {@link $httpBackend} calls this method to get hold of the data that was provided to the callback - * in the JSONP response. - */ - getResponse: function(callbackPath) { - return callbackMap[callbackPath].data; - }, - /** - * @ngdoc method - * @name $jsonpCallbacks#removeCallback - * @param {string} callbackPath the path to the callback that was sent in the JSONP request - * @description - * {@link $httpBackend} calls this method to remove the callback after the JSONP request has - * completed or timed-out. - */ - removeCallback: function(callbackPath) { - var callback = callbackMap[callbackPath]; - delete callbacks[callback.id]; - delete callbackMap[callbackPath]; - } - }; - }; -}; - -/** - * @ngdoc service - * @name $locale - * - * @description - * $locale service provides localization rules for various AngularJS components. As of right now the - * only public api is: - * - * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`) - */ - -var PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, - DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21}; -var $locationMinErr = minErr('$location'); - - -/** - * Encode path using encodeUriSegment, ignoring forward slashes - * - * @param {string} path Path to encode - * @returns {string} - */ -function encodePath(path) { - var segments = path.split('/'), - i = segments.length; - - while (i--) { - // decode forward slashes to prevent them from being double encoded - segments[i] = encodeUriSegment(segments[i].replace(/%2F/g, '/')); - } - - return segments.join('/'); -} - -function decodePath(path, html5Mode) { - var segments = path.split('/'), - i = segments.length; - - while (i--) { - segments[i] = decodeURIComponent(segments[i]); - if (html5Mode) { - // encode forward slashes to prevent them from being mistaken for path separators - segments[i] = segments[i].replace(/\//g, '%2F'); - } - } - - return segments.join('/'); -} - -function parseAbsoluteUrl(absoluteUrl, locationObj) { - var parsedUrl = urlResolve(absoluteUrl); - - locationObj.$$protocol = parsedUrl.protocol; - locationObj.$$host = parsedUrl.hostname; - locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null; -} - -var DOUBLE_SLASH_REGEX = /^\s*[\\/]{2,}/; -function parseAppUrl(url, locationObj, html5Mode) { - - if (DOUBLE_SLASH_REGEX.test(url)) { - throw $locationMinErr('badpath', 'Invalid url "{0}".', url); - } - - var prefixed = (url.charAt(0) !== '/'); - if (prefixed) { - url = '/' + url; - } - var match = urlResolve(url); - var path = prefixed && match.pathname.charAt(0) === '/' ? match.pathname.substring(1) : match.pathname; - locationObj.$$path = decodePath(path, html5Mode); - locationObj.$$search = parseKeyValue(match.search); - locationObj.$$hash = decodeURIComponent(match.hash); - - // make sure path starts with '/'; - if (locationObj.$$path && locationObj.$$path.charAt(0) !== '/') { - locationObj.$$path = '/' + locationObj.$$path; - } -} - -function startsWith(str, search) { - return str.slice(0, search.length) === search; -} - -/** - * - * @param {string} base - * @param {string} url - * @returns {string} returns text from `url` after `base` or `undefined` if it does not begin with - * the expected string. - */ -function stripBaseUrl(base, url) { - if (startsWith(url, base)) { - return url.substr(base.length); - } -} - - -function stripHash(url) { - var index = url.indexOf('#'); - return index === -1 ? url : url.substr(0, index); -} - -function trimEmptyHash(url) { - return url.replace(/(#.+)|#$/, '$1'); -} - - -function stripFile(url) { - return url.substr(0, stripHash(url).lastIndexOf('/') + 1); -} - -/* return the server only (scheme://host:port) */ -function serverBase(url) { - return url.substring(0, url.indexOf('/', url.indexOf('//') + 2)); -} - - -/** - * LocationHtml5Url represents a URL - * This object is exposed as $location service when HTML5 mode is enabled and supported - * - * @constructor - * @param {string} appBase application base URL - * @param {string} appBaseNoFile application base URL stripped of any filename - * @param {string} basePrefix URL path prefix - */ -function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) { - this.$$html5 = true; - basePrefix = basePrefix || ''; - parseAbsoluteUrl(appBase, this); - - - /** - * Parse given HTML5 (regular) URL string into properties - * @param {string} url HTML5 URL - * @private - */ - this.$$parse = function(url) { - var pathUrl = stripBaseUrl(appBaseNoFile, url); - if (!isString(pathUrl)) { - throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url, - appBaseNoFile); - } - - parseAppUrl(pathUrl, this, true); - - if (!this.$$path) { - this.$$path = '/'; - } - - this.$$compose(); - }; - - /** - * Compose url and update `absUrl` property - * @private - */ - this.$$compose = function() { - var search = toKeyValue(this.$$search), - hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; - - this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; - this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/' - - this.$$urlUpdatedByLocation = true; - }; - - this.$$parseLinkUrl = function(url, relHref) { - if (relHref && relHref[0] === '#') { - // special case for links to hash fragments: - // keep the old url and only replace the hash fragment - this.hash(relHref.slice(1)); - return true; - } - var appUrl, prevAppUrl; - var rewrittenUrl; - - - if (isDefined(appUrl = stripBaseUrl(appBase, url))) { - prevAppUrl = appUrl; - if (basePrefix && isDefined(appUrl = stripBaseUrl(basePrefix, appUrl))) { - rewrittenUrl = appBaseNoFile + (stripBaseUrl('/', appUrl) || appUrl); - } else { - rewrittenUrl = appBase + prevAppUrl; - } - } else if (isDefined(appUrl = stripBaseUrl(appBaseNoFile, url))) { - rewrittenUrl = appBaseNoFile + appUrl; - } else if (appBaseNoFile === url + '/') { - rewrittenUrl = appBaseNoFile; - } - if (rewrittenUrl) { - this.$$parse(rewrittenUrl); - } - return !!rewrittenUrl; - }; -} - - -/** - * LocationHashbangUrl represents URL - * This object is exposed as $location service when developer doesn't opt into html5 mode. - * It also serves as the base class for html5 mode fallback on legacy browsers. - * - * @constructor - * @param {string} appBase application base URL - * @param {string} appBaseNoFile application base URL stripped of any filename - * @param {string} hashPrefix hashbang prefix - */ -function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) { - - parseAbsoluteUrl(appBase, this); - - - /** - * Parse given hashbang URL into properties - * @param {string} url Hashbang URL - * @private - */ - this.$$parse = function(url) { - var withoutBaseUrl = stripBaseUrl(appBase, url) || stripBaseUrl(appBaseNoFile, url); - var withoutHashUrl; - - if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') { - - // The rest of the URL starts with a hash so we have - // got either a hashbang path or a plain hash fragment - withoutHashUrl = stripBaseUrl(hashPrefix, withoutBaseUrl); - if (isUndefined(withoutHashUrl)) { - // There was no hashbang prefix so we just have a hash fragment - withoutHashUrl = withoutBaseUrl; - } - - } else { - // There was no hashbang path nor hash fragment: - // If we are in HTML5 mode we use what is left as the path; - // Otherwise we ignore what is left - if (this.$$html5) { - withoutHashUrl = withoutBaseUrl; - } else { - withoutHashUrl = ''; - if (isUndefined(withoutBaseUrl)) { - appBase = url; - /** @type {?} */ (this).replace(); - } - } - } - - parseAppUrl(withoutHashUrl, this, false); - - this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase); - - this.$$compose(); - - /* - * In Windows, on an anchor node on documents loaded from - * the filesystem, the browser will return a pathname - * prefixed with the drive name ('/C:/path') when a - * pathname without a drive is set: - * * a.setAttribute('href', '/foo') - * * a.pathname === '/C:/foo' //true - * - * Inside of AngularJS, we're always using pathnames that - * do not include drive names for routing. - */ - function removeWindowsDriveName(path, url, base) { - /* - Matches paths for file protocol on windows, - such as /C:/foo/bar, and captures only /foo/bar. - */ - var windowsFilePathExp = /^\/[A-Z]:(\/.*)/; - - var firstPathSegmentMatch; - - //Get the relative path from the input URL. - if (startsWith(url, base)) { - url = url.replace(base, ''); - } - - // The input URL intentionally contains a first path segment that ends with a colon. - if (windowsFilePathExp.exec(url)) { - return path; - } - - firstPathSegmentMatch = windowsFilePathExp.exec(path); - return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path; - } - }; - - /** - * Compose hashbang URL and update `absUrl` property - * @private - */ - this.$$compose = function() { - var search = toKeyValue(this.$$search), - hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; - - this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; - this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : ''); - - this.$$urlUpdatedByLocation = true; - }; - - this.$$parseLinkUrl = function(url, relHref) { - if (stripHash(appBase) === stripHash(url)) { - this.$$parse(url); - return true; - } - return false; - }; -} - - -/** - * LocationHashbangUrl represents URL - * This object is exposed as $location service when html5 history api is enabled but the browser - * does not support it. - * - * @constructor - * @param {string} appBase application base URL - * @param {string} appBaseNoFile application base URL stripped of any filename - * @param {string} hashPrefix hashbang prefix - */ -function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) { - this.$$html5 = true; - LocationHashbangUrl.apply(this, arguments); - - this.$$parseLinkUrl = function(url, relHref) { - if (relHref && relHref[0] === '#') { - // special case for links to hash fragments: - // keep the old url and only replace the hash fragment - this.hash(relHref.slice(1)); - return true; - } - - var rewrittenUrl; - var appUrl; - - if (appBase === stripHash(url)) { - rewrittenUrl = url; - } else if ((appUrl = stripBaseUrl(appBaseNoFile, url))) { - rewrittenUrl = appBase + hashPrefix + appUrl; - } else if (appBaseNoFile === url + '/') { - rewrittenUrl = appBaseNoFile; - } - if (rewrittenUrl) { - this.$$parse(rewrittenUrl); - } - return !!rewrittenUrl; - }; - - this.$$compose = function() { - var search = toKeyValue(this.$$search), - hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; - - this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; - // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#' - this.$$absUrl = appBase + hashPrefix + this.$$url; - - this.$$urlUpdatedByLocation = true; - }; - -} - - -var locationPrototype = { - - /** - * Ensure absolute URL is initialized. - * @private - */ - $$absUrl:'', - - /** - * Are we in html5 mode? - * @private - */ - $$html5: false, - - /** - * Has any change been replacing? - * @private - */ - $$replace: false, - - /** - * @ngdoc method - * @name $location#absUrl - * - * @description - * This method is getter only. - * - * Return full URL representation with all segments encoded according to rules specified in - * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt). - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var absUrl = $location.absUrl(); - * // => "http://example.com/#/some/path?foo=bar&baz=xoxo" - * ``` - * - * @return {string} full URL - */ - absUrl: locationGetter('$$absUrl'), - - /** - * @ngdoc method - * @name $location#url - * - * @description - * This method is getter / setter. - * - * Return URL (e.g. `/path?a=b#hash`) when called without any parameter. - * - * Change path, search and hash, when called with parameter and return `$location`. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var url = $location.url(); - * // => "/some/path?foo=bar&baz=xoxo" - * ``` - * - * @param {string=} url New URL without base prefix (e.g. `/path?a=b#hash`) - * @return {string} url - */ - url: function(url) { - if (isUndefined(url)) { - return this.$$url; - } - - var match = PATH_MATCH.exec(url); - if (match[1] || url === '') this.path(decodeURIComponent(match[1])); - if (match[2] || match[1] || url === '') this.search(match[3] || ''); - this.hash(match[5] || ''); - - return this; - }, - - /** - * @ngdoc method - * @name $location#protocol - * - * @description - * This method is getter only. - * - * Return protocol of current URL. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var protocol = $location.protocol(); - * // => "http" - * ``` - * - * @return {string} protocol of current URL - */ - protocol: locationGetter('$$protocol'), - - /** - * @ngdoc method - * @name $location#host - * - * @description - * This method is getter only. - * - * Return host of current URL. - * - * Note: compared to the non-AngularJS version `location.host` which returns `hostname:port`, this returns the `hostname` portion only. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var host = $location.host(); - * // => "example.com" - * - * // given URL http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo - * host = $location.host(); - * // => "example.com" - * host = location.host; - * // => "example.com:8080" - * ``` - * - * @return {string} host of current URL. - */ - host: locationGetter('$$host'), - - /** - * @ngdoc method - * @name $location#port - * - * @description - * This method is getter only. - * - * Return port of current URL. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var port = $location.port(); - * // => 80 - * ``` - * - * @return {Number} port - */ - port: locationGetter('$$port'), - - /** - * @ngdoc method - * @name $location#path - * - * @description - * This method is getter / setter. - * - * Return path of current URL when called without any parameter. - * - * Change path when called with parameter and return `$location`. - * - * Note: Path should always begin with forward slash (/), this method will add the forward slash - * if it is missing. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var path = $location.path(); - * // => "/some/path" - * ``` - * - * @param {(string|number)=} path New path - * @return {(string|object)} path if called with no parameters, or `$location` if called with a parameter - */ - path: locationGetterSetter('$$path', function(path) { - path = path !== null ? path.toString() : ''; - return path.charAt(0) === '/' ? path : '/' + path; - }), - - /** - * @ngdoc method - * @name $location#search - * - * @description - * This method is getter / setter. - * - * Return search part (as object) of current URL when called without any parameter. - * - * Change search part when called with parameter and return `$location`. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo - * var searchObject = $location.search(); - * // => {foo: 'bar', baz: 'xoxo'} - * - * // set foo to 'yipee' - * $location.search('foo', 'yipee'); - * // $location.search() => {foo: 'yipee', baz: 'xoxo'} - * ``` - * - * @param {string|Object.|Object.>} search New search params - string or - * hash object. - * - * When called with a single argument the method acts as a setter, setting the `search` component - * of `$location` to the specified value. - * - * If the argument is a hash object containing an array of values, these values will be encoded - * as duplicate search parameters in the URL. - * - * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue` - * will override only a single search property. - * - * If `paramValue` is an array, it will override the property of the `search` component of - * `$location` specified via the first argument. - * - * If `paramValue` is `null`, the property specified via the first argument will be deleted. - * - * If `paramValue` is `true`, the property specified via the first argument will be added with no - * value nor trailing equal sign. - * - * @return {Object} If called with no arguments returns the parsed `search` object. If called with - * one or more arguments returns `$location` object itself. - */ - search: function(search, paramValue) { - switch (arguments.length) { - case 0: - return this.$$search; - case 1: - if (isString(search) || isNumber(search)) { - search = search.toString(); - this.$$search = parseKeyValue(search); - } else if (isObject(search)) { - search = copy(search, {}); - // remove object undefined or null properties - forEach(search, function(value, key) { - if (value == null) delete search[key]; - }); - - this.$$search = search; - } else { - throw $locationMinErr('isrcharg', - 'The first argument of the `$location#search()` call must be a string or an object.'); - } - break; - default: - if (isUndefined(paramValue) || paramValue === null) { - delete this.$$search[search]; - } else { - this.$$search[search] = paramValue; - } - } - - this.$$compose(); - return this; - }, - - /** - * @ngdoc method - * @name $location#hash - * - * @description - * This method is getter / setter. - * - * Returns the hash fragment when called without any parameters. - * - * Changes the hash fragment when called with a parameter and returns `$location`. - * - * - * ```js - * // given URL http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue - * var hash = $location.hash(); - * // => "hashValue" - * ``` - * - * @param {(string|number)=} hash New hash fragment - * @return {string} hash - */ - hash: locationGetterSetter('$$hash', function(hash) { - return hash !== null ? hash.toString() : ''; - }), - - /** - * @ngdoc method - * @name $location#replace - * - * @description - * If called, all changes to $location during the current `$digest` will replace the current history - * record, instead of adding a new one. - */ - replace: function() { - this.$$replace = true; - return this; - } -}; - -forEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) { - Location.prototype = Object.create(locationPrototype); - - /** - * @ngdoc method - * @name $location#state - * - * @description - * This method is getter / setter. - * - * Return the history state object when called without any parameter. - * - * Change the history state object when called with one parameter and return `$location`. - * The state object is later passed to `pushState` or `replaceState`. - * - * NOTE: This method is supported only in HTML5 mode and only in browsers supporting - * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support - * older browsers (like IE9 or Android < 4.0), don't use this method. - * - * @param {object=} state State object for pushState or replaceState - * @return {object} state - */ - Location.prototype.state = function(state) { - if (!arguments.length) { - return this.$$state; - } - - if (Location !== LocationHtml5Url || !this.$$html5) { - throw $locationMinErr('nostate', 'History API state support is available only ' + - 'in HTML5 mode and only in browsers supporting HTML5 History API'); - } - // The user might modify `stateObject` after invoking `$location.state(stateObject)` - // but we're changing the $$state reference to $browser.state() during the $digest - // so the modification window is narrow. - this.$$state = isUndefined(state) ? null : state; - this.$$urlUpdatedByLocation = true; - - return this; - }; -}); - - -function locationGetter(property) { - return /** @this */ function() { - return this[property]; - }; -} - - -function locationGetterSetter(property, preprocess) { - return /** @this */ function(value) { - if (isUndefined(value)) { - return this[property]; - } - - this[property] = preprocess(value); - this.$$compose(); - - return this; - }; -} - - -/** - * @ngdoc service - * @name $location - * - * @requires $rootElement - * - * @description - * The $location service parses the URL in the browser address bar (based on the - * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL - * available to your application. Changes to the URL in the address bar are reflected into - * $location service and changes to $location are reflected into the browser address bar. - * - * **The $location service:** - * - * - Exposes the current URL in the browser address bar, so you can - * - Watch and observe the URL. - * - Change the URL. - * - Synchronizes the URL with the browser when the user - * - Changes the address bar. - * - Clicks the back or forward button (or clicks a History link). - * - Clicks on a link. - * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash). - * - * For more information see {@link guide/$location Developer Guide: Using $location} - */ - -/** - * @ngdoc provider - * @name $locationProvider - * @this - * - * @description - * Use the `$locationProvider` to configure how the application deep linking paths are stored. - */ -function $LocationProvider() { - var hashPrefix = '!', - html5Mode = { - enabled: false, - requireBase: true, - rewriteLinks: true - }; - - /** - * @ngdoc method - * @name $locationProvider#hashPrefix - * @description - * The default value for the prefix is `'!'`. - * @param {string=} prefix Prefix for hash part (containing path and search) - * @returns {*} current value if used as getter or itself (chaining) if used as setter - */ - this.hashPrefix = function(prefix) { - if (isDefined(prefix)) { - hashPrefix = prefix; - return this; - } else { - return hashPrefix; - } - }; - - /** - * @ngdoc method - * @name $locationProvider#html5Mode - * @description - * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value. - * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported - * properties: - * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to - * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not - * support `pushState`. - * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies - * whether or not a tag is required to be present. If `enabled` and `requireBase` are - * true, and a base tag is not present, an error will be thrown when `$location` is injected. - * See the {@link guide/$location $location guide for more information} - * - **rewriteLinks** - `{boolean|string}` - (default: `true`) When html5Mode is enabled, - * enables/disables URL rewriting for relative links. If set to a string, URL rewriting will - * only happen on links with an attribute that matches the given string. For example, if set - * to `'internal-link'`, then the URL will only be rewritten for `` links. - * Note that [attribute name normalization](guide/directive#normalization) does not apply - * here, so `'internalLink'` will **not** match `'internal-link'`. - * - * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter - */ - this.html5Mode = function(mode) { - if (isBoolean(mode)) { - html5Mode.enabled = mode; - return this; - } else if (isObject(mode)) { - - if (isBoolean(mode.enabled)) { - html5Mode.enabled = mode.enabled; - } - - if (isBoolean(mode.requireBase)) { - html5Mode.requireBase = mode.requireBase; - } - - if (isBoolean(mode.rewriteLinks) || isString(mode.rewriteLinks)) { - html5Mode.rewriteLinks = mode.rewriteLinks; - } - - return this; - } else { - return html5Mode; - } - }; - - /** - * @ngdoc event - * @name $location#$locationChangeStart - * @eventType broadcast on root scope - * @description - * Broadcasted before a URL will change. - * - * This change can be prevented by calling - * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more - * details about event object. Upon successful change - * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired. - * - * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when - * the browser supports the HTML5 History API. - * - * @param {Object} angularEvent Synthetic event object. - * @param {string} newUrl New URL - * @param {string=} oldUrl URL that was before it was changed. - * @param {string=} newState New history state object - * @param {string=} oldState History state object that was before it was changed. - */ - - /** - * @ngdoc event - * @name $location#$locationChangeSuccess - * @eventType broadcast on root scope - * @description - * Broadcasted after a URL was changed. - * - * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when - * the browser supports the HTML5 History API. - * - * @param {Object} angularEvent Synthetic event object. - * @param {string} newUrl New URL - * @param {string=} oldUrl URL that was before it was changed. - * @param {string=} newState New history state object - * @param {string=} oldState History state object that was before it was changed. - */ - - this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window', - function($rootScope, $browser, $sniffer, $rootElement, $window) { - var $location, - LocationMode, - baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to '' - initialUrl = $browser.url(), - appBase; - - if (html5Mode.enabled) { - if (!baseHref && html5Mode.requireBase) { - throw $locationMinErr('nobase', - '$location in HTML5 mode requires a tag to be present!'); - } - appBase = serverBase(initialUrl) + (baseHref || '/'); - LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url; - } else { - appBase = stripHash(initialUrl); - LocationMode = LocationHashbangUrl; - } - var appBaseNoFile = stripFile(appBase); - - $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix); - $location.$$parseLinkUrl(initialUrl, initialUrl); - - $location.$$state = $browser.state(); - - var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i; - - function setBrowserUrlWithFallback(url, replace, state) { - var oldUrl = $location.url(); - var oldState = $location.$$state; - try { - $browser.url(url, replace, state); - - // Make sure $location.state() returns referentially identical (not just deeply equal) - // state object; this makes possible quick checking if the state changed in the digest - // loop. Checking deep equality would be too expensive. - $location.$$state = $browser.state(); - } catch (e) { - // Restore old values if pushState fails - $location.url(oldUrl); - $location.$$state = oldState; - - throw e; - } - } - - $rootElement.on('click', function(event) { - var rewriteLinks = html5Mode.rewriteLinks; - // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser) - // currently we open nice url link and redirect then - - if (!rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which === 2 || event.button === 2) return; - - var elm = jqLite(event.target); - - // traverse the DOM up to find first A tag - while (nodeName_(elm[0]) !== 'a') { - // ignore rewriting if no A tag (reached root element, or no parent - removed from document) - if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return; - } - - if (isString(rewriteLinks) && isUndefined(elm.attr(rewriteLinks))) return; - - var absHref = elm.prop('href'); - // get the actual href attribute - see - // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx - var relHref = elm.attr('href') || elm.attr('xlink:href'); - - if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') { - // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during - // an animation. - absHref = urlResolve(absHref.animVal).href; - } - - // Ignore when url is started with javascript: or mailto: - if (IGNORE_URI_REGEXP.test(absHref)) return; - - if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) { - if ($location.$$parseLinkUrl(absHref, relHref)) { - // We do a preventDefault for all urls that are part of the AngularJS application, - // in html5mode and also without, so that we are able to abort navigation without - // getting double entries in the location history. - event.preventDefault(); - // update location manually - if ($location.absUrl() !== $browser.url()) { - $rootScope.$apply(); - // hack to work around FF6 bug 684208 when scenario runner clicks on links - $window.angular['ff-684208-preventDefault'] = true; - } - } - } - }); - - - // rewrite hashbang url <> html5 url - if (trimEmptyHash($location.absUrl()) !== trimEmptyHash(initialUrl)) { - $browser.url($location.absUrl(), true); - } - - var initializing = true; - - // update $location when $browser url changes - $browser.onUrlChange(function(newUrl, newState) { - - if (!startsWith(newUrl, appBaseNoFile)) { - // If we are navigating outside of the app then force a reload - $window.location.href = newUrl; - return; - } - - $rootScope.$evalAsync(function() { - var oldUrl = $location.absUrl(); - var oldState = $location.$$state; - var defaultPrevented; - newUrl = trimEmptyHash(newUrl); - $location.$$parse(newUrl); - $location.$$state = newState; - - defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, - newState, oldState).defaultPrevented; - - // if the location was changed by a `$locationChangeStart` handler then stop - // processing this location change - if ($location.absUrl() !== newUrl) return; - - if (defaultPrevented) { - $location.$$parse(oldUrl); - $location.$$state = oldState; - setBrowserUrlWithFallback(oldUrl, false, oldState); - } else { - initializing = false; - afterLocationChange(oldUrl, oldState); - } - }); - if (!$rootScope.$$phase) $rootScope.$digest(); - }); - - // update browser - $rootScope.$watch(function $locationWatch() { - if (initializing || $location.$$urlUpdatedByLocation) { - $location.$$urlUpdatedByLocation = false; - - var oldUrl = trimEmptyHash($browser.url()); - var newUrl = trimEmptyHash($location.absUrl()); - var oldState = $browser.state(); - var currentReplace = $location.$$replace; - var urlOrStateChanged = oldUrl !== newUrl || - ($location.$$html5 && $sniffer.history && oldState !== $location.$$state); - - if (initializing || urlOrStateChanged) { - initializing = false; - - $rootScope.$evalAsync(function() { - var newUrl = $location.absUrl(); - var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, - $location.$$state, oldState).defaultPrevented; - - // if the location was changed by a `$locationChangeStart` handler then stop - // processing this location change - if ($location.absUrl() !== newUrl) return; - - if (defaultPrevented) { - $location.$$parse(oldUrl); - $location.$$state = oldState; - } else { - if (urlOrStateChanged) { - setBrowserUrlWithFallback(newUrl, currentReplace, - oldState === $location.$$state ? null : $location.$$state); - } - afterLocationChange(oldUrl, oldState); - } - }); - } - } - - $location.$$replace = false; - - // we don't need to return anything because $evalAsync will make the digest loop dirty when - // there is a change - }); - - return $location; - - function afterLocationChange(oldUrl, oldState) { - $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl, - $location.$$state, oldState); - } -}]; -} - -/** - * @ngdoc service - * @name $log - * @requires $window - * - * @description - * Simple service for logging. Default implementation safely writes the message - * into the browser's console (if present). - * - * The main purpose of this service is to simplify debugging and troubleshooting. - * - * To reveal the location of the calls to `$log` in the JavaScript console, - * you can "blackbox" the AngularJS source in your browser: - * - * [Mozilla description of blackboxing](https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Black_box_a_source). - * [Chrome description of blackboxing](https://developer.chrome.com/devtools/docs/blackboxing). - * - * Note: Not all browsers support blackboxing. - * - * The default is to log `debug` messages. You can use - * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this. - * - * @example - - - angular.module('logExample', []) - .controller('LogController', ['$scope', '$log', function($scope, $log) { - $scope.$log = $log; - $scope.message = 'Hello World!'; - }]); - - -
      -

      Reload this page with open console, enter text and hit the log button...

      - - - - - - -
      -
      -
      - */ - -/** - * @ngdoc provider - * @name $logProvider - * @this - * - * @description - * Use the `$logProvider` to configure how the application logs messages - */ -function $LogProvider() { - var debug = true, - self = this; - - /** - * @ngdoc method - * @name $logProvider#debugEnabled - * @description - * @param {boolean=} flag enable or disable debug level messages - * @returns {*} current value if used as getter or itself (chaining) if used as setter - */ - this.debugEnabled = function(flag) { - if (isDefined(flag)) { - debug = flag; - return this; - } else { - return debug; - } - }; - - this.$get = ['$window', function($window) { - // Support: IE 9-11, Edge 12-14+ - // IE/Edge display errors in such a way that it requires the user to click in 4 places - // to see the stack trace. There is no way to feature-detect it so there's a chance - // of the user agent sniffing to go wrong but since it's only about logging, this shouldn't - // break apps. Other browsers display errors in a sensible way and some of them map stack - // traces along source maps if available so it makes sense to let browsers display it - // as they want. - var formatStackTrace = msie || /\bEdge\//.test($window.navigator && $window.navigator.userAgent); - - return { - /** - * @ngdoc method - * @name $log#log - * - * @description - * Write a log message - */ - log: consoleLog('log'), - - /** - * @ngdoc method - * @name $log#info - * - * @description - * Write an information message - */ - info: consoleLog('info'), - - /** - * @ngdoc method - * @name $log#warn - * - * @description - * Write a warning message - */ - warn: consoleLog('warn'), - - /** - * @ngdoc method - * @name $log#error - * - * @description - * Write an error message - */ - error: consoleLog('error'), - - /** - * @ngdoc method - * @name $log#debug - * - * @description - * Write a debug message - */ - debug: (function() { - var fn = consoleLog('debug'); - - return function() { - if (debug) { - fn.apply(self, arguments); - } - }; - })() - }; - - function formatError(arg) { - if (isError(arg)) { - if (arg.stack && formatStackTrace) { - arg = (arg.message && arg.stack.indexOf(arg.message) === -1) - ? 'Error: ' + arg.message + '\n' + arg.stack - : arg.stack; - } else if (arg.sourceURL) { - arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line; - } - } - return arg; - } - - function consoleLog(type) { - var console = $window.console || {}, - logFn = console[type] || console.log || noop; - - return function() { - var args = []; - forEach(arguments, function(arg) { - args.push(formatError(arg)); - }); - // Support: IE 9 only - // console methods don't inherit from Function.prototype in IE 9 so we can't - // call `logFn.apply(console, args)` directly. - return Function.prototype.apply.call(logFn, console, args); - }; - } - }]; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Any commits to this file should be reviewed with security in mind. * - * Changes to this file can potentially create security vulnerabilities. * - * An approval from 2 Core members with history of modifying * - * this file is required. * - * * - * Does the change somehow allow for arbitrary javascript to be executed? * - * Or allows for someone to change the prototype of built-in objects? * - * Or gives undesired access to variables likes document or window? * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -var $parseMinErr = minErr('$parse'); - -var objectValueOf = {}.constructor.prototype.valueOf; - -// Sandboxing AngularJS Expressions -// ------------------------------ -// AngularJS expressions are no longer sandboxed. So it is now even easier to access arbitrary JS code by -// various means such as obtaining a reference to native JS functions like the Function constructor. -// -// As an example, consider the following AngularJS expression: -// -// {}.toString.constructor('alert("evil JS code")') -// -// It is important to realize that if you create an expression from a string that contains user provided -// content then it is possible that your application contains a security vulnerability to an XSS style attack. -// -// See https://docs.angularjs.org/guide/security - - -function getStringValue(name) { - // Property names must be strings. This means that non-string objects cannot be used - // as keys in an object. Any non-string object, including a number, is typecasted - // into a string via the toString method. - // -- MDN, https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Property_accessors#Property_names - // - // So, to ensure that we are checking the same `name` that JavaScript would use, we cast it - // to a string. It's not always possible. If `name` is an object and its `toString` method is - // 'broken' (doesn't return a string, isn't a function, etc.), an error will be thrown: - // - // TypeError: Cannot convert object to primitive value - // - // For performance reasons, we don't catch this error here and allow it to propagate up the call - // stack. Note that you'll get the same error in JavaScript if you try to access a property using - // such a 'broken' object as a key. - return name + ''; -} - - -var OPERATORS = createMap(); -forEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; }); -var ESCAPE = {'n':'\n', 'f':'\f', 'r':'\r', 't':'\t', 'v':'\v', '\'':'\'', '"':'"'}; - - -///////////////////////////////////////// - - -/** - * @constructor - */ -var Lexer = function Lexer(options) { - this.options = options; -}; - -Lexer.prototype = { - constructor: Lexer, - - lex: function(text) { - this.text = text; - this.index = 0; - this.tokens = []; - - while (this.index < this.text.length) { - var ch = this.text.charAt(this.index); - if (ch === '"' || ch === '\'') { - this.readString(ch); - } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) { - this.readNumber(); - } else if (this.isIdentifierStart(this.peekMultichar())) { - this.readIdent(); - } else if (this.is(ch, '(){}[].,;:?')) { - this.tokens.push({index: this.index, text: ch}); - this.index++; - } else if (this.isWhitespace(ch)) { - this.index++; - } else { - var ch2 = ch + this.peek(); - var ch3 = ch2 + this.peek(2); - var op1 = OPERATORS[ch]; - var op2 = OPERATORS[ch2]; - var op3 = OPERATORS[ch3]; - if (op1 || op2 || op3) { - var token = op3 ? ch3 : (op2 ? ch2 : ch); - this.tokens.push({index: this.index, text: token, operator: true}); - this.index += token.length; - } else { - this.throwError('Unexpected next character ', this.index, this.index + 1); - } - } - } - return this.tokens; - }, - - is: function(ch, chars) { - return chars.indexOf(ch) !== -1; - }, - - peek: function(i) { - var num = i || 1; - return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false; - }, - - isNumber: function(ch) { - return ('0' <= ch && ch <= '9') && typeof ch === 'string'; - }, - - isWhitespace: function(ch) { - // IE treats non-breaking space as \u00A0 - return (ch === ' ' || ch === '\r' || ch === '\t' || - ch === '\n' || ch === '\v' || ch === '\u00A0'); - }, - - isIdentifierStart: function(ch) { - return this.options.isIdentifierStart ? - this.options.isIdentifierStart(ch, this.codePointAt(ch)) : - this.isValidIdentifierStart(ch); - }, - - isValidIdentifierStart: function(ch) { - return ('a' <= ch && ch <= 'z' || - 'A' <= ch && ch <= 'Z' || - '_' === ch || ch === '$'); - }, - - isIdentifierContinue: function(ch) { - return this.options.isIdentifierContinue ? - this.options.isIdentifierContinue(ch, this.codePointAt(ch)) : - this.isValidIdentifierContinue(ch); - }, - - isValidIdentifierContinue: function(ch, cp) { - return this.isValidIdentifierStart(ch, cp) || this.isNumber(ch); - }, - - codePointAt: function(ch) { - if (ch.length === 1) return ch.charCodeAt(0); - // eslint-disable-next-line no-bitwise - return (ch.charCodeAt(0) << 10) + ch.charCodeAt(1) - 0x35FDC00; - }, - - peekMultichar: function() { - var ch = this.text.charAt(this.index); - var peek = this.peek(); - if (!peek) { - return ch; - } - var cp1 = ch.charCodeAt(0); - var cp2 = peek.charCodeAt(0); - if (cp1 >= 0xD800 && cp1 <= 0xDBFF && cp2 >= 0xDC00 && cp2 <= 0xDFFF) { - return ch + peek; - } - return ch; - }, - - isExpOperator: function(ch) { - return (ch === '-' || ch === '+' || this.isNumber(ch)); - }, - - throwError: function(error, start, end) { - end = end || this.index; - var colStr = (isDefined(start) - ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']' - : ' ' + end); - throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].', - error, colStr, this.text); - }, - - readNumber: function() { - var number = ''; - var start = this.index; - while (this.index < this.text.length) { - var ch = lowercase(this.text.charAt(this.index)); - if (ch === '.' || this.isNumber(ch)) { - number += ch; - } else { - var peekCh = this.peek(); - if (ch === 'e' && this.isExpOperator(peekCh)) { - number += ch; - } else if (this.isExpOperator(ch) && - peekCh && this.isNumber(peekCh) && - number.charAt(number.length - 1) === 'e') { - number += ch; - } else if (this.isExpOperator(ch) && - (!peekCh || !this.isNumber(peekCh)) && - number.charAt(number.length - 1) === 'e') { - this.throwError('Invalid exponent'); - } else { - break; - } - } - this.index++; - } - this.tokens.push({ - index: start, - text: number, - constant: true, - value: Number(number) - }); - }, - - readIdent: function() { - var start = this.index; - this.index += this.peekMultichar().length; - while (this.index < this.text.length) { - var ch = this.peekMultichar(); - if (!this.isIdentifierContinue(ch)) { - break; - } - this.index += ch.length; - } - this.tokens.push({ - index: start, - text: this.text.slice(start, this.index), - identifier: true - }); - }, - - readString: function(quote) { - var start = this.index; - this.index++; - var string = ''; - var rawString = quote; - var escape = false; - while (this.index < this.text.length) { - var ch = this.text.charAt(this.index); - rawString += ch; - if (escape) { - if (ch === 'u') { - var hex = this.text.substring(this.index + 1, this.index + 5); - if (!hex.match(/[\da-f]{4}/i)) { - this.throwError('Invalid unicode escape [\\u' + hex + ']'); - } - this.index += 4; - string += String.fromCharCode(parseInt(hex, 16)); - } else { - var rep = ESCAPE[ch]; - string = string + (rep || ch); - } - escape = false; - } else if (ch === '\\') { - escape = true; - } else if (ch === quote) { - this.index++; - this.tokens.push({ - index: start, - text: rawString, - constant: true, - value: string - }); - return; - } else { - string += ch; - } - this.index++; - } - this.throwError('Unterminated quote', start); - } -}; - -var AST = function AST(lexer, options) { - this.lexer = lexer; - this.options = options; -}; - -AST.Program = 'Program'; -AST.ExpressionStatement = 'ExpressionStatement'; -AST.AssignmentExpression = 'AssignmentExpression'; -AST.ConditionalExpression = 'ConditionalExpression'; -AST.LogicalExpression = 'LogicalExpression'; -AST.BinaryExpression = 'BinaryExpression'; -AST.UnaryExpression = 'UnaryExpression'; -AST.CallExpression = 'CallExpression'; -AST.MemberExpression = 'MemberExpression'; -AST.Identifier = 'Identifier'; -AST.Literal = 'Literal'; -AST.ArrayExpression = 'ArrayExpression'; -AST.Property = 'Property'; -AST.ObjectExpression = 'ObjectExpression'; -AST.ThisExpression = 'ThisExpression'; -AST.LocalsExpression = 'LocalsExpression'; - -// Internal use only -AST.NGValueParameter = 'NGValueParameter'; - -AST.prototype = { - ast: function(text) { - this.text = text; - this.tokens = this.lexer.lex(text); - - var value = this.program(); - - if (this.tokens.length !== 0) { - this.throwError('is an unexpected token', this.tokens[0]); - } - - return value; - }, - - program: function() { - var body = []; - while (true) { - if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']')) - body.push(this.expressionStatement()); - if (!this.expect(';')) { - return { type: AST.Program, body: body}; - } - } - }, - - expressionStatement: function() { - return { type: AST.ExpressionStatement, expression: this.filterChain() }; - }, - - filterChain: function() { - var left = this.expression(); - while (this.expect('|')) { - left = this.filter(left); - } - return left; - }, - - expression: function() { - return this.assignment(); - }, - - assignment: function() { - var result = this.ternary(); - if (this.expect('=')) { - if (!isAssignable(result)) { - throw $parseMinErr('lval', 'Trying to assign a value to a non l-value'); - } - - result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='}; - } - return result; - }, - - ternary: function() { - var test = this.logicalOR(); - var alternate; - var consequent; - if (this.expect('?')) { - alternate = this.expression(); - if (this.consume(':')) { - consequent = this.expression(); - return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent}; - } - } - return test; - }, - - logicalOR: function() { - var left = this.logicalAND(); - while (this.expect('||')) { - left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() }; - } - return left; - }, - - logicalAND: function() { - var left = this.equality(); - while (this.expect('&&')) { - left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()}; - } - return left; - }, - - equality: function() { - var left = this.relational(); - var token; - while ((token = this.expect('==','!=','===','!=='))) { - left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() }; - } - return left; - }, - - relational: function() { - var left = this.additive(); - var token; - while ((token = this.expect('<', '>', '<=', '>='))) { - left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() }; - } - return left; - }, - - additive: function() { - var left = this.multiplicative(); - var token; - while ((token = this.expect('+','-'))) { - left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() }; - } - return left; - }, - - multiplicative: function() { - var left = this.unary(); - var token; - while ((token = this.expect('*','/','%'))) { - left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() }; - } - return left; - }, - - unary: function() { - var token; - if ((token = this.expect('+', '-', '!'))) { - return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() }; - } else { - return this.primary(); - } - }, - - primary: function() { - var primary; - if (this.expect('(')) { - primary = this.filterChain(); - this.consume(')'); - } else if (this.expect('[')) { - primary = this.arrayDeclaration(); - } else if (this.expect('{')) { - primary = this.object(); - } else if (this.selfReferential.hasOwnProperty(this.peek().text)) { - primary = copy(this.selfReferential[this.consume().text]); - } else if (this.options.literals.hasOwnProperty(this.peek().text)) { - primary = { type: AST.Literal, value: this.options.literals[this.consume().text]}; - } else if (this.peek().identifier) { - primary = this.identifier(); - } else if (this.peek().constant) { - primary = this.constant(); - } else { - this.throwError('not a primary expression', this.peek()); - } - - var next; - while ((next = this.expect('(', '[', '.'))) { - if (next.text === '(') { - primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() }; - this.consume(')'); - } else if (next.text === '[') { - primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true }; - this.consume(']'); - } else if (next.text === '.') { - primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false }; - } else { - this.throwError('IMPOSSIBLE'); - } - } - return primary; - }, - - filter: function(baseExpression) { - var args = [baseExpression]; - var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true}; - - while (this.expect(':')) { - args.push(this.expression()); - } - - return result; - }, - - parseArguments: function() { - var args = []; - if (this.peekToken().text !== ')') { - do { - args.push(this.filterChain()); - } while (this.expect(',')); - } - return args; - }, - - identifier: function() { - var token = this.consume(); - if (!token.identifier) { - this.throwError('is not a valid identifier', token); - } - return { type: AST.Identifier, name: token.text }; - }, - - constant: function() { - // TODO check that it is a constant - return { type: AST.Literal, value: this.consume().value }; - }, - - arrayDeclaration: function() { - var elements = []; - if (this.peekToken().text !== ']') { - do { - if (this.peek(']')) { - // Support trailing commas per ES5.1. - break; - } - elements.push(this.expression()); - } while (this.expect(',')); - } - this.consume(']'); - - return { type: AST.ArrayExpression, elements: elements }; - }, - - object: function() { - var properties = [], property; - if (this.peekToken().text !== '}') { - do { - if (this.peek('}')) { - // Support trailing commas per ES5.1. - break; - } - property = {type: AST.Property, kind: 'init'}; - if (this.peek().constant) { - property.key = this.constant(); - property.computed = false; - this.consume(':'); - property.value = this.expression(); - } else if (this.peek().identifier) { - property.key = this.identifier(); - property.computed = false; - if (this.peek(':')) { - this.consume(':'); - property.value = this.expression(); - } else { - property.value = property.key; - } - } else if (this.peek('[')) { - this.consume('['); - property.key = this.expression(); - this.consume(']'); - property.computed = true; - this.consume(':'); - property.value = this.expression(); - } else { - this.throwError('invalid key', this.peek()); - } - properties.push(property); - } while (this.expect(',')); - } - this.consume('}'); - - return {type: AST.ObjectExpression, properties: properties }; - }, - - throwError: function(msg, token) { - throw $parseMinErr('syntax', - 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].', - token.text, msg, (token.index + 1), this.text, this.text.substring(token.index)); - }, - - consume: function(e1) { - if (this.tokens.length === 0) { - throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text); - } - - var token = this.expect(e1); - if (!token) { - this.throwError('is unexpected, expecting [' + e1 + ']', this.peek()); - } - return token; - }, - - peekToken: function() { - if (this.tokens.length === 0) { - throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text); - } - return this.tokens[0]; - }, - - peek: function(e1, e2, e3, e4) { - return this.peekAhead(0, e1, e2, e3, e4); - }, - - peekAhead: function(i, e1, e2, e3, e4) { - if (this.tokens.length > i) { - var token = this.tokens[i]; - var t = token.text; - if (t === e1 || t === e2 || t === e3 || t === e4 || - (!e1 && !e2 && !e3 && !e4)) { - return token; - } - } - return false; - }, - - expect: function(e1, e2, e3, e4) { - var token = this.peek(e1, e2, e3, e4); - if (token) { - this.tokens.shift(); - return token; - } - return false; - }, - - selfReferential: { - 'this': {type: AST.ThisExpression }, - '$locals': {type: AST.LocalsExpression } - } -}; - -function ifDefined(v, d) { - return typeof v !== 'undefined' ? v : d; -} - -function plusFn(l, r) { - if (typeof l === 'undefined') return r; - if (typeof r === 'undefined') return l; - return l + r; -} - -function isStateless($filter, filterName) { - var fn = $filter(filterName); - return !fn.$stateful; -} - -var PURITY_ABSOLUTE = 1; -var PURITY_RELATIVE = 2; - -// Detect nodes which could depend on non-shallow state of objects -function isPure(node, parentIsPure) { - switch (node.type) { - // Computed members might invoke a stateful toString() - case AST.MemberExpression: - if (node.computed) { - return false; - } - break; - - // Unary always convert to primative - case AST.UnaryExpression: - return PURITY_ABSOLUTE; - - // The binary + operator can invoke a stateful toString(). - case AST.BinaryExpression: - return node.operator !== '+' ? PURITY_ABSOLUTE : false; - - // Functions / filters probably read state from within objects - case AST.CallExpression: - return false; - } - - return (undefined === parentIsPure) ? PURITY_RELATIVE : parentIsPure; -} - -function findConstantAndWatchExpressions(ast, $filter, parentIsPure) { - var allConstants; - var argsToWatch; - var isStatelessFilter; - - var astIsPure = ast.isPure = isPure(ast, parentIsPure); - - switch (ast.type) { - case AST.Program: - allConstants = true; - forEach(ast.body, function(expr) { - findConstantAndWatchExpressions(expr.expression, $filter, astIsPure); - allConstants = allConstants && expr.expression.constant; - }); - ast.constant = allConstants; - break; - case AST.Literal: - ast.constant = true; - ast.toWatch = []; - break; - case AST.UnaryExpression: - findConstantAndWatchExpressions(ast.argument, $filter, astIsPure); - ast.constant = ast.argument.constant; - ast.toWatch = ast.argument.toWatch; - break; - case AST.BinaryExpression: - findConstantAndWatchExpressions(ast.left, $filter, astIsPure); - findConstantAndWatchExpressions(ast.right, $filter, astIsPure); - ast.constant = ast.left.constant && ast.right.constant; - ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch); - break; - case AST.LogicalExpression: - findConstantAndWatchExpressions(ast.left, $filter, astIsPure); - findConstantAndWatchExpressions(ast.right, $filter, astIsPure); - ast.constant = ast.left.constant && ast.right.constant; - ast.toWatch = ast.constant ? [] : [ast]; - break; - case AST.ConditionalExpression: - findConstantAndWatchExpressions(ast.test, $filter, astIsPure); - findConstantAndWatchExpressions(ast.alternate, $filter, astIsPure); - findConstantAndWatchExpressions(ast.consequent, $filter, astIsPure); - ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant; - ast.toWatch = ast.constant ? [] : [ast]; - break; - case AST.Identifier: - ast.constant = false; - ast.toWatch = [ast]; - break; - case AST.MemberExpression: - findConstantAndWatchExpressions(ast.object, $filter, astIsPure); - if (ast.computed) { - findConstantAndWatchExpressions(ast.property, $filter, astIsPure); - } - ast.constant = ast.object.constant && (!ast.computed || ast.property.constant); - ast.toWatch = ast.constant ? [] : [ast]; - break; - case AST.CallExpression: - isStatelessFilter = ast.filter ? isStateless($filter, ast.callee.name) : false; - allConstants = isStatelessFilter; - argsToWatch = []; - forEach(ast.arguments, function(expr) { - findConstantAndWatchExpressions(expr, $filter, astIsPure); - allConstants = allConstants && expr.constant; - argsToWatch.push.apply(argsToWatch, expr.toWatch); - }); - ast.constant = allConstants; - ast.toWatch = isStatelessFilter ? argsToWatch : [ast]; - break; - case AST.AssignmentExpression: - findConstantAndWatchExpressions(ast.left, $filter, astIsPure); - findConstantAndWatchExpressions(ast.right, $filter, astIsPure); - ast.constant = ast.left.constant && ast.right.constant; - ast.toWatch = [ast]; - break; - case AST.ArrayExpression: - allConstants = true; - argsToWatch = []; - forEach(ast.elements, function(expr) { - findConstantAndWatchExpressions(expr, $filter, astIsPure); - allConstants = allConstants && expr.constant; - argsToWatch.push.apply(argsToWatch, expr.toWatch); - }); - ast.constant = allConstants; - ast.toWatch = argsToWatch; - break; - case AST.ObjectExpression: - allConstants = true; - argsToWatch = []; - forEach(ast.properties, function(property) { - findConstantAndWatchExpressions(property.value, $filter, astIsPure); - allConstants = allConstants && property.value.constant; - argsToWatch.push.apply(argsToWatch, property.value.toWatch); - if (property.computed) { - //`{[key]: value}` implicitly does `key.toString()` which may be non-pure - findConstantAndWatchExpressions(property.key, $filter, /*parentIsPure=*/false); - allConstants = allConstants && property.key.constant; - argsToWatch.push.apply(argsToWatch, property.key.toWatch); - } - }); - ast.constant = allConstants; - ast.toWatch = argsToWatch; - break; - case AST.ThisExpression: - ast.constant = false; - ast.toWatch = []; - break; - case AST.LocalsExpression: - ast.constant = false; - ast.toWatch = []; - break; - } -} - -function getInputs(body) { - if (body.length !== 1) return; - var lastExpression = body[0].expression; - var candidate = lastExpression.toWatch; - if (candidate.length !== 1) return candidate; - return candidate[0] !== lastExpression ? candidate : undefined; -} - -function isAssignable(ast) { - return ast.type === AST.Identifier || ast.type === AST.MemberExpression; -} - -function assignableAST(ast) { - if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) { - return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='}; - } -} - -function isLiteral(ast) { - return ast.body.length === 0 || - ast.body.length === 1 && ( - ast.body[0].expression.type === AST.Literal || - ast.body[0].expression.type === AST.ArrayExpression || - ast.body[0].expression.type === AST.ObjectExpression); -} - -function isConstant(ast) { - return ast.constant; -} - -function ASTCompiler($filter) { - this.$filter = $filter; -} - -ASTCompiler.prototype = { - compile: function(ast) { - var self = this; - this.state = { - nextId: 0, - filters: {}, - fn: {vars: [], body: [], own: {}}, - assign: {vars: [], body: [], own: {}}, - inputs: [] - }; - findConstantAndWatchExpressions(ast, self.$filter); - var extra = ''; - var assignable; - this.stage = 'assign'; - if ((assignable = assignableAST(ast))) { - this.state.computing = 'assign'; - var result = this.nextId(); - this.recurse(assignable, result); - this.return_(result); - extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l'); - } - var toWatch = getInputs(ast.body); - self.stage = 'inputs'; - forEach(toWatch, function(watch, key) { - var fnKey = 'fn' + key; - self.state[fnKey] = {vars: [], body: [], own: {}}; - self.state.computing = fnKey; - var intoId = self.nextId(); - self.recurse(watch, intoId); - self.return_(intoId); - self.state.inputs.push({name: fnKey, isPure: watch.isPure}); - watch.watchId = key; - }); - this.state.computing = 'fn'; - this.stage = 'main'; - this.recurse(ast); - var fnString = - // The build and minification steps remove the string "use strict" from the code, but this is done using a regex. - // This is a workaround for this until we do a better job at only removing the prefix only when we should. - '"' + this.USE + ' ' + this.STRICT + '";\n' + - this.filterPrefix() + - 'var fn=' + this.generateFunction('fn', 's,l,a,i') + - extra + - this.watchFns() + - 'return fn;'; - - // eslint-disable-next-line no-new-func - var fn = (new Function('$filter', - 'getStringValue', - 'ifDefined', - 'plus', - fnString))( - this.$filter, - getStringValue, - ifDefined, - plusFn); - this.state = this.stage = undefined; - return fn; - }, - - USE: 'use', - - STRICT: 'strict', - - watchFns: function() { - var result = []; - var inputs = this.state.inputs; - var self = this; - forEach(inputs, function(input) { - result.push('var ' + input.name + '=' + self.generateFunction(input.name, 's')); - if (input.isPure) { - result.push(input.name, '.isPure=' + JSON.stringify(input.isPure) + ';'); - } - }); - if (inputs.length) { - result.push('fn.inputs=[' + inputs.map(function(i) { return i.name; }).join(',') + '];'); - } - return result.join(''); - }, - - generateFunction: function(name, params) { - return 'function(' + params + '){' + - this.varsPrefix(name) + - this.body(name) + - '};'; - }, - - filterPrefix: function() { - var parts = []; - var self = this; - forEach(this.state.filters, function(id, filter) { - parts.push(id + '=$filter(' + self.escape(filter) + ')'); - }); - if (parts.length) return 'var ' + parts.join(',') + ';'; - return ''; - }, - - varsPrefix: function(section) { - return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : ''; - }, - - body: function(section) { - return this.state[section].body.join(''); - }, - - recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) { - var left, right, self = this, args, expression, computed; - recursionFn = recursionFn || noop; - if (!skipWatchIdCheck && isDefined(ast.watchId)) { - intoId = intoId || this.nextId(); - this.if_('i', - this.lazyAssign(intoId, this.computedMember('i', ast.watchId)), - this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true) - ); - return; - } - switch (ast.type) { - case AST.Program: - forEach(ast.body, function(expression, pos) { - self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; }); - if (pos !== ast.body.length - 1) { - self.current().body.push(right, ';'); - } else { - self.return_(right); - } - }); - break; - case AST.Literal: - expression = this.escape(ast.value); - this.assign(intoId, expression); - recursionFn(intoId || expression); - break; - case AST.UnaryExpression: - this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; }); - expression = ast.operator + '(' + this.ifDefined(right, 0) + ')'; - this.assign(intoId, expression); - recursionFn(expression); - break; - case AST.BinaryExpression: - this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; }); - this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; }); - if (ast.operator === '+') { - expression = this.plus(left, right); - } else if (ast.operator === '-') { - expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0); - } else { - expression = '(' + left + ')' + ast.operator + '(' + right + ')'; - } - this.assign(intoId, expression); - recursionFn(expression); - break; - case AST.LogicalExpression: - intoId = intoId || this.nextId(); - self.recurse(ast.left, intoId); - self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId)); - recursionFn(intoId); - break; - case AST.ConditionalExpression: - intoId = intoId || this.nextId(); - self.recurse(ast.test, intoId); - self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId)); - recursionFn(intoId); - break; - case AST.Identifier: - intoId = intoId || this.nextId(); - if (nameId) { - nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s'); - nameId.computed = false; - nameId.name = ast.name; - } - self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)), - function() { - self.if_(self.stage === 'inputs' || 's', function() { - if (create && create !== 1) { - self.if_( - self.isNull(self.nonComputedMember('s', ast.name)), - self.lazyAssign(self.nonComputedMember('s', ast.name), '{}')); - } - self.assign(intoId, self.nonComputedMember('s', ast.name)); - }); - }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name)) - ); - recursionFn(intoId); - break; - case AST.MemberExpression: - left = nameId && (nameId.context = this.nextId()) || this.nextId(); - intoId = intoId || this.nextId(); - self.recurse(ast.object, left, undefined, function() { - self.if_(self.notNull(left), function() { - if (ast.computed) { - right = self.nextId(); - self.recurse(ast.property, right); - self.getStringValue(right); - if (create && create !== 1) { - self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}')); - } - expression = self.computedMember(left, right); - self.assign(intoId, expression); - if (nameId) { - nameId.computed = true; - nameId.name = right; - } - } else { - if (create && create !== 1) { - self.if_(self.isNull(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}')); - } - expression = self.nonComputedMember(left, ast.property.name); - self.assign(intoId, expression); - if (nameId) { - nameId.computed = false; - nameId.name = ast.property.name; - } - } - }, function() { - self.assign(intoId, 'undefined'); - }); - recursionFn(intoId); - }, !!create); - break; - case AST.CallExpression: - intoId = intoId || this.nextId(); - if (ast.filter) { - right = self.filter(ast.callee.name); - args = []; - forEach(ast.arguments, function(expr) { - var argument = self.nextId(); - self.recurse(expr, argument); - args.push(argument); - }); - expression = right + '(' + args.join(',') + ')'; - self.assign(intoId, expression); - recursionFn(intoId); - } else { - right = self.nextId(); - left = {}; - args = []; - self.recurse(ast.callee, right, left, function() { - self.if_(self.notNull(right), function() { - forEach(ast.arguments, function(expr) { - self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) { - args.push(argument); - }); - }); - if (left.name) { - expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')'; - } else { - expression = right + '(' + args.join(',') + ')'; - } - self.assign(intoId, expression); - }, function() { - self.assign(intoId, 'undefined'); - }); - recursionFn(intoId); - }); - } - break; - case AST.AssignmentExpression: - right = this.nextId(); - left = {}; - this.recurse(ast.left, undefined, left, function() { - self.if_(self.notNull(left.context), function() { - self.recurse(ast.right, right); - expression = self.member(left.context, left.name, left.computed) + ast.operator + right; - self.assign(intoId, expression); - recursionFn(intoId || expression); - }); - }, 1); - break; - case AST.ArrayExpression: - args = []; - forEach(ast.elements, function(expr) { - self.recurse(expr, ast.constant ? undefined : self.nextId(), undefined, function(argument) { - args.push(argument); - }); - }); - expression = '[' + args.join(',') + ']'; - this.assign(intoId, expression); - recursionFn(intoId || expression); - break; - case AST.ObjectExpression: - args = []; - computed = false; - forEach(ast.properties, function(property) { - if (property.computed) { - computed = true; - } - }); - if (computed) { - intoId = intoId || this.nextId(); - this.assign(intoId, '{}'); - forEach(ast.properties, function(property) { - if (property.computed) { - left = self.nextId(); - self.recurse(property.key, left); - } else { - left = property.key.type === AST.Identifier ? - property.key.name : - ('' + property.key.value); - } - right = self.nextId(); - self.recurse(property.value, right); - self.assign(self.member(intoId, left, property.computed), right); - }); - } else { - forEach(ast.properties, function(property) { - self.recurse(property.value, ast.constant ? undefined : self.nextId(), undefined, function(expr) { - args.push(self.escape( - property.key.type === AST.Identifier ? property.key.name : - ('' + property.key.value)) + - ':' + expr); - }); - }); - expression = '{' + args.join(',') + '}'; - this.assign(intoId, expression); - } - recursionFn(intoId || expression); - break; - case AST.ThisExpression: - this.assign(intoId, 's'); - recursionFn(intoId || 's'); - break; - case AST.LocalsExpression: - this.assign(intoId, 'l'); - recursionFn(intoId || 'l'); - break; - case AST.NGValueParameter: - this.assign(intoId, 'v'); - recursionFn(intoId || 'v'); - break; - } - }, - - getHasOwnProperty: function(element, property) { - var key = element + '.' + property; - var own = this.current().own; - if (!own.hasOwnProperty(key)) { - own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')'); - } - return own[key]; - }, - - assign: function(id, value) { - if (!id) return; - this.current().body.push(id, '=', value, ';'); - return id; - }, - - filter: function(filterName) { - if (!this.state.filters.hasOwnProperty(filterName)) { - this.state.filters[filterName] = this.nextId(true); - } - return this.state.filters[filterName]; - }, - - ifDefined: function(id, defaultValue) { - return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')'; - }, - - plus: function(left, right) { - return 'plus(' + left + ',' + right + ')'; - }, - - return_: function(id) { - this.current().body.push('return ', id, ';'); - }, - - if_: function(test, alternate, consequent) { - if (test === true) { - alternate(); - } else { - var body = this.current().body; - body.push('if(', test, '){'); - alternate(); - body.push('}'); - if (consequent) { - body.push('else{'); - consequent(); - body.push('}'); - } - } - }, - - not: function(expression) { - return '!(' + expression + ')'; - }, - - isNull: function(expression) { - return expression + '==null'; - }, - - notNull: function(expression) { - return expression + '!=null'; - }, - - nonComputedMember: function(left, right) { - var SAFE_IDENTIFIER = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/; - var UNSAFE_CHARACTERS = /[^$_a-zA-Z0-9]/g; - if (SAFE_IDENTIFIER.test(right)) { - return left + '.' + right; - } else { - return left + '["' + right.replace(UNSAFE_CHARACTERS, this.stringEscapeFn) + '"]'; - } - }, - - computedMember: function(left, right) { - return left + '[' + right + ']'; - }, - - member: function(left, right, computed) { - if (computed) return this.computedMember(left, right); - return this.nonComputedMember(left, right); - }, - - getStringValue: function(item) { - this.assign(item, 'getStringValue(' + item + ')'); - }, - - lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) { - var self = this; - return function() { - self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck); - }; - }, - - lazyAssign: function(id, value) { - var self = this; - return function() { - self.assign(id, value); - }; - }, - - stringEscapeRegex: /[^ a-zA-Z0-9]/g, - - stringEscapeFn: function(c) { - return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4); - }, - - escape: function(value) { - if (isString(value)) return '\'' + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + '\''; - if (isNumber(value)) return value.toString(); - if (value === true) return 'true'; - if (value === false) return 'false'; - if (value === null) return 'null'; - if (typeof value === 'undefined') return 'undefined'; - - throw $parseMinErr('esc', 'IMPOSSIBLE'); - }, - - nextId: function(skip, init) { - var id = 'v' + (this.state.nextId++); - if (!skip) { - this.current().vars.push(id + (init ? '=' + init : '')); - } - return id; - }, - - current: function() { - return this.state[this.state.computing]; - } -}; - - -function ASTInterpreter($filter) { - this.$filter = $filter; -} - -ASTInterpreter.prototype = { - compile: function(ast) { - var self = this; - findConstantAndWatchExpressions(ast, self.$filter); - var assignable; - var assign; - if ((assignable = assignableAST(ast))) { - assign = this.recurse(assignable); - } - var toWatch = getInputs(ast.body); - var inputs; - if (toWatch) { - inputs = []; - forEach(toWatch, function(watch, key) { - var input = self.recurse(watch); - input.isPure = watch.isPure; - watch.input = input; - inputs.push(input); - watch.watchId = key; - }); - } - var expressions = []; - forEach(ast.body, function(expression) { - expressions.push(self.recurse(expression.expression)); - }); - var fn = ast.body.length === 0 ? noop : - ast.body.length === 1 ? expressions[0] : - function(scope, locals) { - var lastValue; - forEach(expressions, function(exp) { - lastValue = exp(scope, locals); - }); - return lastValue; - }; - if (assign) { - fn.assign = function(scope, value, locals) { - return assign(scope, locals, value); - }; - } - if (inputs) { - fn.inputs = inputs; - } - return fn; - }, - - recurse: function(ast, context, create) { - var left, right, self = this, args; - if (ast.input) { - return this.inputs(ast.input, ast.watchId); - } - switch (ast.type) { - case AST.Literal: - return this.value(ast.value, context); - case AST.UnaryExpression: - right = this.recurse(ast.argument); - return this['unary' + ast.operator](right, context); - case AST.BinaryExpression: - left = this.recurse(ast.left); - right = this.recurse(ast.right); - return this['binary' + ast.operator](left, right, context); - case AST.LogicalExpression: - left = this.recurse(ast.left); - right = this.recurse(ast.right); - return this['binary' + ast.operator](left, right, context); - case AST.ConditionalExpression: - return this['ternary?:']( - this.recurse(ast.test), - this.recurse(ast.alternate), - this.recurse(ast.consequent), - context - ); - case AST.Identifier: - return self.identifier(ast.name, context, create); - case AST.MemberExpression: - left = this.recurse(ast.object, false, !!create); - if (!ast.computed) { - right = ast.property.name; - } - if (ast.computed) right = this.recurse(ast.property); - return ast.computed ? - this.computedMember(left, right, context, create) : - this.nonComputedMember(left, right, context, create); - case AST.CallExpression: - args = []; - forEach(ast.arguments, function(expr) { - args.push(self.recurse(expr)); - }); - if (ast.filter) right = this.$filter(ast.callee.name); - if (!ast.filter) right = this.recurse(ast.callee, true); - return ast.filter ? - function(scope, locals, assign, inputs) { - var values = []; - for (var i = 0; i < args.length; ++i) { - values.push(args[i](scope, locals, assign, inputs)); - } - var value = right.apply(undefined, values, inputs); - return context ? {context: undefined, name: undefined, value: value} : value; - } : - function(scope, locals, assign, inputs) { - var rhs = right(scope, locals, assign, inputs); - var value; - if (rhs.value != null) { - var values = []; - for (var i = 0; i < args.length; ++i) { - values.push(args[i](scope, locals, assign, inputs)); - } - value = rhs.value.apply(rhs.context, values); - } - return context ? {value: value} : value; - }; - case AST.AssignmentExpression: - left = this.recurse(ast.left, true, 1); - right = this.recurse(ast.right); - return function(scope, locals, assign, inputs) { - var lhs = left(scope, locals, assign, inputs); - var rhs = right(scope, locals, assign, inputs); - lhs.context[lhs.name] = rhs; - return context ? {value: rhs} : rhs; - }; - case AST.ArrayExpression: - args = []; - forEach(ast.elements, function(expr) { - args.push(self.recurse(expr)); - }); - return function(scope, locals, assign, inputs) { - var value = []; - for (var i = 0; i < args.length; ++i) { - value.push(args[i](scope, locals, assign, inputs)); - } - return context ? {value: value} : value; - }; - case AST.ObjectExpression: - args = []; - forEach(ast.properties, function(property) { - if (property.computed) { - args.push({key: self.recurse(property.key), - computed: true, - value: self.recurse(property.value) - }); - } else { - args.push({key: property.key.type === AST.Identifier ? - property.key.name : - ('' + property.key.value), - computed: false, - value: self.recurse(property.value) - }); - } - }); - return function(scope, locals, assign, inputs) { - var value = {}; - for (var i = 0; i < args.length; ++i) { - if (args[i].computed) { - value[args[i].key(scope, locals, assign, inputs)] = args[i].value(scope, locals, assign, inputs); - } else { - value[args[i].key] = args[i].value(scope, locals, assign, inputs); - } - } - return context ? {value: value} : value; - }; - case AST.ThisExpression: - return function(scope) { - return context ? {value: scope} : scope; - }; - case AST.LocalsExpression: - return function(scope, locals) { - return context ? {value: locals} : locals; - }; - case AST.NGValueParameter: - return function(scope, locals, assign) { - return context ? {value: assign} : assign; - }; - } - }, - - 'unary+': function(argument, context) { - return function(scope, locals, assign, inputs) { - var arg = argument(scope, locals, assign, inputs); - if (isDefined(arg)) { - arg = +arg; - } else { - arg = 0; - } - return context ? {value: arg} : arg; - }; - }, - 'unary-': function(argument, context) { - return function(scope, locals, assign, inputs) { - var arg = argument(scope, locals, assign, inputs); - if (isDefined(arg)) { - arg = -arg; - } else { - arg = -0; - } - return context ? {value: arg} : arg; - }; - }, - 'unary!': function(argument, context) { - return function(scope, locals, assign, inputs) { - var arg = !argument(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary+': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var lhs = left(scope, locals, assign, inputs); - var rhs = right(scope, locals, assign, inputs); - var arg = plusFn(lhs, rhs); - return context ? {value: arg} : arg; - }; - }, - 'binary-': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var lhs = left(scope, locals, assign, inputs); - var rhs = right(scope, locals, assign, inputs); - var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0); - return context ? {value: arg} : arg; - }; - }, - 'binary*': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary/': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary%': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary===': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary!==': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary==': function(left, right, context) { - return function(scope, locals, assign, inputs) { - // eslint-disable-next-line eqeqeq - var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary!=': function(left, right, context) { - return function(scope, locals, assign, inputs) { - // eslint-disable-next-line eqeqeq - var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary<': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary>': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary<=': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary>=': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary&&': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'binary||': function(left, right, context) { - return function(scope, locals, assign, inputs) { - var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - 'ternary?:': function(test, alternate, consequent, context) { - return function(scope, locals, assign, inputs) { - var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs); - return context ? {value: arg} : arg; - }; - }, - value: function(value, context) { - return function() { return context ? {context: undefined, name: undefined, value: value} : value; }; - }, - identifier: function(name, context, create) { - return function(scope, locals, assign, inputs) { - var base = locals && (name in locals) ? locals : scope; - if (create && create !== 1 && base && base[name] == null) { - base[name] = {}; - } - var value = base ? base[name] : undefined; - if (context) { - return {context: base, name: name, value: value}; - } else { - return value; - } - }; - }, - computedMember: function(left, right, context, create) { - return function(scope, locals, assign, inputs) { - var lhs = left(scope, locals, assign, inputs); - var rhs; - var value; - if (lhs != null) { - rhs = right(scope, locals, assign, inputs); - rhs = getStringValue(rhs); - if (create && create !== 1) { - if (lhs && !(lhs[rhs])) { - lhs[rhs] = {}; - } - } - value = lhs[rhs]; - } - if (context) { - return {context: lhs, name: rhs, value: value}; - } else { - return value; - } - }; - }, - nonComputedMember: function(left, right, context, create) { - return function(scope, locals, assign, inputs) { - var lhs = left(scope, locals, assign, inputs); - if (create && create !== 1) { - if (lhs && lhs[right] == null) { - lhs[right] = {}; - } - } - var value = lhs != null ? lhs[right] : undefined; - if (context) { - return {context: lhs, name: right, value: value}; - } else { - return value; - } - }; - }, - inputs: function(input, watchId) { - return function(scope, value, locals, inputs) { - if (inputs) return inputs[watchId]; - return input(scope, value, locals); - }; - } -}; - -/** - * @constructor - */ -function Parser(lexer, $filter, options) { - this.ast = new AST(lexer, options); - this.astCompiler = options.csp ? new ASTInterpreter($filter) : - new ASTCompiler($filter); -} - -Parser.prototype = { - constructor: Parser, - - parse: function(text) { - var ast = this.getAst(text); - var fn = this.astCompiler.compile(ast.ast); - fn.literal = isLiteral(ast.ast); - fn.constant = isConstant(ast.ast); - fn.oneTime = ast.oneTime; - return fn; - }, - - getAst: function(exp) { - var oneTime = false; - exp = exp.trim(); - - if (exp.charAt(0) === ':' && exp.charAt(1) === ':') { - oneTime = true; - exp = exp.substring(2); - } - return { - ast: this.ast.ast(exp), - oneTime: oneTime - }; - } -}; - -function getValueOf(value) { - return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value); -} - -/////////////////////////////////// - -/** - * @ngdoc service - * @name $parse - * @kind function - * - * @description - * - * Converts AngularJS {@link guide/expression expression} into a function. - * - * ```js - * var getter = $parse('user.name'); - * var setter = getter.assign; - * var context = {user:{name:'AngularJS'}}; - * var locals = {user:{name:'local'}}; - * - * expect(getter(context)).toEqual('AngularJS'); - * setter(context, 'newValue'); - * expect(context.user.name).toEqual('newValue'); - * expect(getter(context, locals)).toEqual('local'); - * ``` - * - * - * @param {string} expression String expression to compile. - * @returns {function(context, locals)} a function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the strings - * are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values in - * `context`. - * - * The returned function also has the following properties: - * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript - * literal. - * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript - * constant literals. - * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be - * set to a function to change its value on the given context. - * - */ - - -/** - * @ngdoc provider - * @name $parseProvider - * @this - * - * @description - * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse} - * service. - */ -function $ParseProvider() { - var cache = createMap(); - var literals = { - 'true': true, - 'false': false, - 'null': null, - 'undefined': undefined - }; - var identStart, identContinue; - - /** - * @ngdoc method - * @name $parseProvider#addLiteral - * @description - * - * Configure $parse service to add literal values that will be present as literal at expressions. - * - * @param {string} literalName Token for the literal value. The literal name value must be a valid literal name. - * @param {*} literalValue Value for this literal. All literal values must be primitives or `undefined`. - * - **/ - this.addLiteral = function(literalName, literalValue) { - literals[literalName] = literalValue; - }; - - /** - * @ngdoc method - * @name $parseProvider#setIdentifierFns - * - * @description - * - * Allows defining the set of characters that are allowed in AngularJS expressions. The function - * `identifierStart` will get called to know if a given character is a valid character to be the - * first character for an identifier. The function `identifierContinue` will get called to know if - * a given character is a valid character to be a follow-up identifier character. The functions - * `identifierStart` and `identifierContinue` will receive as arguments the single character to be - * identifier and the character code point. These arguments will be `string` and `numeric`. Keep in - * mind that the `string` parameter can be two characters long depending on the character - * representation. It is expected for the function to return `true` or `false`, whether that - * character is allowed or not. - * - * Since this function will be called extensively, keep the implementation of these functions fast, - * as the performance of these functions have a direct impact on the expressions parsing speed. - * - * @param {function=} identifierStart The function that will decide whether the given character is - * a valid identifier start character. - * @param {function=} identifierContinue The function that will decide whether the given character is - * a valid identifier continue character. - */ - this.setIdentifierFns = function(identifierStart, identifierContinue) { - identStart = identifierStart; - identContinue = identifierContinue; - return this; - }; - - this.$get = ['$filter', function($filter) { - var noUnsafeEval = csp().noUnsafeEval; - var $parseOptions = { - csp: noUnsafeEval, - literals: copy(literals), - isIdentifierStart: isFunction(identStart) && identStart, - isIdentifierContinue: isFunction(identContinue) && identContinue - }; - $parse.$$getAst = $$getAst; - return $parse; - - function $parse(exp, interceptorFn) { - var parsedExpression, cacheKey; - - switch (typeof exp) { - case 'string': - exp = exp.trim(); - cacheKey = exp; - - parsedExpression = cache[cacheKey]; - - if (!parsedExpression) { - var lexer = new Lexer($parseOptions); - var parser = new Parser(lexer, $filter, $parseOptions); - parsedExpression = parser.parse(exp); - if (parsedExpression.constant) { - parsedExpression.$$watchDelegate = constantWatchDelegate; - } else if (parsedExpression.oneTime) { - parsedExpression.$$watchDelegate = parsedExpression.literal ? - oneTimeLiteralWatchDelegate : oneTimeWatchDelegate; - } else if (parsedExpression.inputs) { - parsedExpression.$$watchDelegate = inputsWatchDelegate; - } - cache[cacheKey] = parsedExpression; - } - return addInterceptor(parsedExpression, interceptorFn); - - case 'function': - return addInterceptor(exp, interceptorFn); - - default: - return addInterceptor(noop, interceptorFn); - } - } - - function $$getAst(exp) { - var lexer = new Lexer($parseOptions); - var parser = new Parser(lexer, $filter, $parseOptions); - return parser.getAst(exp).ast; - } - - function expressionInputDirtyCheck(newValue, oldValueOfValue, compareObjectIdentity) { - - if (newValue == null || oldValueOfValue == null) { // null/undefined - return newValue === oldValueOfValue; - } - - if (typeof newValue === 'object') { - - // attempt to convert the value to a primitive type - // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can - // be cheaply dirty-checked - newValue = getValueOf(newValue); - - if (typeof newValue === 'object' && !compareObjectIdentity) { - // objects/arrays are not supported - deep-watching them would be too expensive - return false; - } - - // fall-through to the primitive equality check - } - - //Primitive or NaN - // eslint-disable-next-line no-self-compare - return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue); - } - - function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) { - var inputExpressions = parsedExpression.inputs; - var lastResult; - - if (inputExpressions.length === 1) { - var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails - inputExpressions = inputExpressions[0]; - return scope.$watch(function expressionInputWatch(scope) { - var newInputValue = inputExpressions(scope); - if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf, inputExpressions.isPure)) { - lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]); - oldInputValueOf = newInputValue && getValueOf(newInputValue); - } - return lastResult; - }, listener, objectEquality, prettyPrintExpression); - } - - var oldInputValueOfValues = []; - var oldInputValues = []; - for (var i = 0, ii = inputExpressions.length; i < ii; i++) { - oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails - oldInputValues[i] = null; - } - - return scope.$watch(function expressionInputsWatch(scope) { - var changed = false; - - for (var i = 0, ii = inputExpressions.length; i < ii; i++) { - var newInputValue = inputExpressions[i](scope); - if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i], inputExpressions[i].isPure))) { - oldInputValues[i] = newInputValue; - oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue); - } - } - - if (changed) { - lastResult = parsedExpression(scope, undefined, undefined, oldInputValues); - } - - return lastResult; - }, listener, objectEquality, prettyPrintExpression); - } - - function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) { - var unwatch, lastValue; - if (parsedExpression.inputs) { - unwatch = inputsWatchDelegate(scope, oneTimeListener, objectEquality, parsedExpression, prettyPrintExpression); - } else { - unwatch = scope.$watch(oneTimeWatch, oneTimeListener, objectEquality); - } - return unwatch; - - function oneTimeWatch(scope) { - return parsedExpression(scope); - } - function oneTimeListener(value, old, scope) { - lastValue = value; - if (isFunction(listener)) { - listener(value, old, scope); - } - if (isDefined(value)) { - scope.$$postDigest(function() { - if (isDefined(lastValue)) { - unwatch(); - } - }); - } - } - } - - function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) { - var unwatch, lastValue; - unwatch = scope.$watch(function oneTimeWatch(scope) { - return parsedExpression(scope); - }, function oneTimeListener(value, old, scope) { - lastValue = value; - if (isFunction(listener)) { - listener(value, old, scope); - } - if (isAllDefined(value)) { - scope.$$postDigest(function() { - if (isAllDefined(lastValue)) unwatch(); - }); - } - }, objectEquality); - - return unwatch; - - function isAllDefined(value) { - var allDefined = true; - forEach(value, function(val) { - if (!isDefined(val)) allDefined = false; - }); - return allDefined; - } - } - - function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) { - var unwatch = scope.$watch(function constantWatch(scope) { - unwatch(); - return parsedExpression(scope); - }, listener, objectEquality); - return unwatch; - } - - function addInterceptor(parsedExpression, interceptorFn) { - if (!interceptorFn) return parsedExpression; - var watchDelegate = parsedExpression.$$watchDelegate; - var useInputs = false; - - var regularWatch = - watchDelegate !== oneTimeLiteralWatchDelegate && - watchDelegate !== oneTimeWatchDelegate; - - var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) { - var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs); - return interceptorFn(value, scope, locals); - } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) { - var value = parsedExpression(scope, locals, assign, inputs); - var result = interceptorFn(value, scope, locals); - // we only return the interceptor's result if the - // initial value is defined (for bind-once) - return isDefined(value) ? result : value; - }; - - // Propagate $$watchDelegates other then inputsWatchDelegate - useInputs = !parsedExpression.inputs; - if (watchDelegate && watchDelegate !== inputsWatchDelegate) { - fn.$$watchDelegate = watchDelegate; - fn.inputs = parsedExpression.inputs; - } else if (!interceptorFn.$stateful) { - // Treat interceptor like filters - assume non-stateful by default and use the inputsWatchDelegate - fn.$$watchDelegate = inputsWatchDelegate; - fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression]; - } - - if (fn.inputs) { - fn.inputs = fn.inputs.map(function(e) { - // Remove the isPure flag of inputs when it is not absolute because they are now wrapped in a - // potentially non-pure interceptor function. - if (e.isPure === PURITY_RELATIVE) { - return function depurifier(s) { return e(s); }; - } - return e; - }); - } - - return fn; - } - }]; -} - -/** - * @ngdoc service - * @name $q - * @requires $rootScope - * - * @description - * A service that helps you run functions asynchronously, and use their return values (or exceptions) - * when they are done processing. - * - * This is a [Promises/A+](https://promisesaplus.com/)-compliant implementation of promises/deferred - * objects inspired by [Kris Kowal's Q](https://github.com/kriskowal/q). - * - * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred - * implementations, and the other which resembles ES6 (ES2015) promises to some degree. - * - * ## $q constructor - * - * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver` - * function as the first argument. This is similar to the native Promise implementation from ES6, - * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). - * - * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are - * available yet. - * - * It can be used like so: - * - * ```js - * // for the purpose of this example let's assume that variables `$q` and `okToGreet` - * // are available in the current lexical scope (they could have been injected or passed in). - * - * function asyncGreet(name) { - * // perform some asynchronous operation, resolve or reject the promise when appropriate. - * return $q(function(resolve, reject) { - * setTimeout(function() { - * if (okToGreet(name)) { - * resolve('Hello, ' + name + '!'); - * } else { - * reject('Greeting ' + name + ' is not allowed.'); - * } - * }, 1000); - * }); - * } - * - * var promise = asyncGreet('Robin Hood'); - * promise.then(function(greeting) { - * alert('Success: ' + greeting); - * }, function(reason) { - * alert('Failed: ' + reason); - * }); - * ``` - * - * Note: progress/notify callbacks are not currently supported via the ES6-style interface. - * - * Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise. - * - * However, the more traditional CommonJS-style usage is still available, and documented below. - * - * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an - * interface for interacting with an object that represents the result of an action that is - * performed asynchronously, and may or may not be finished at any given point in time. - * - * From the perspective of dealing with error handling, deferred and promise APIs are to - * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming. - * - * ```js - * // for the purpose of this example let's assume that variables `$q` and `okToGreet` - * // are available in the current lexical scope (they could have been injected or passed in). - * - * function asyncGreet(name) { - * var deferred = $q.defer(); - * - * setTimeout(function() { - * deferred.notify('About to greet ' + name + '.'); - * - * if (okToGreet(name)) { - * deferred.resolve('Hello, ' + name + '!'); - * } else { - * deferred.reject('Greeting ' + name + ' is not allowed.'); - * } - * }, 1000); - * - * return deferred.promise; - * } - * - * var promise = asyncGreet('Robin Hood'); - * promise.then(function(greeting) { - * alert('Success: ' + greeting); - * }, function(reason) { - * alert('Failed: ' + reason); - * }, function(update) { - * alert('Got notification: ' + update); - * }); - * ``` - * - * At first it might not be obvious why this extra complexity is worth the trouble. The payoff - * comes in the way of guarantees that promise and deferred APIs make, see - * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md. - * - * Additionally the promise api allows for composition that is very hard to do with the - * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach. - * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the - * section on serial or parallel joining of promises. - * - * ## The Deferred API - * - * A new instance of deferred is constructed by calling `$q.defer()`. - * - * The purpose of the deferred object is to expose the associated Promise instance as well as APIs - * that can be used for signaling the successful or unsuccessful completion, as well as the status - * of the task. - * - * **Methods** - * - * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection - * constructed via `$q.reject`, the promise will be rejected instead. - * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to - * resolving it with a rejection constructed via `$q.reject`. - * - `notify(value)` - provides updates on the status of the promise's execution. This may be called - * multiple times before the promise is either resolved or rejected. - * - * **Properties** - * - * - promise – `{Promise}` – promise object associated with this deferred. - * - * - * ## The Promise API - * - * A new promise instance is created when a deferred instance is created and can be retrieved by - * calling `deferred.promise`. - * - * The purpose of the promise object is to allow for interested parties to get access to the result - * of the deferred task when it completes. - * - * **Methods** - * - * - `then(successCallback, [errorCallback], [notifyCallback])` – regardless of when the promise was or - * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously - * as soon as the result is available. The callbacks are called with a single argument: the result - * or rejection reason. Additionally, the notify callback may be called zero or more times to - * provide a progress indication, before the promise is resolved or rejected. - * - * This method *returns a new promise* which is resolved or rejected via the return value of the - * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved - * with the value which is resolved in that promise using - * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)). - * It also notifies via the return value of the `notifyCallback` method. The promise cannot be - * resolved or rejected from the notifyCallback method. The errorCallback and notifyCallback - * arguments are optional. - * - * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)` - * - * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise, - * but to do so without modifying the final value. This is useful to release resources or do some - * clean-up that needs to be done whether the promise was rejected or resolved. See the [full - * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for - * more information. - * - * ## Chaining promises - * - * Because calling the `then` method of a promise returns a new derived promise, it is easily - * possible to create a chain of promises: - * - * ```js - * promiseB = promiseA.then(function(result) { - * return result + 1; - * }); - * - * // promiseB will be resolved immediately after promiseA is resolved and its value - * // will be the result of promiseA incremented by 1 - * ``` - * - * It is possible to create chains of any length and since a promise can be resolved with another - * promise (which will defer its resolution further), it is possible to pause/defer resolution of - * the promises at any point in the chain. This makes it possible to implement powerful APIs like - * $http's response interceptors. - * - * - * ## Differences between Kris Kowal's Q and $q - * - * There are two main differences: - * - * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation - * mechanism in AngularJS, which means faster propagation of resolution or rejection into your - * models and avoiding unnecessary browser repaints, which would result in flickering UI. - * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains - * all the important functionality needed for common async tasks. - * - * ## Testing - * - * ```js - * it('should simulate promise', inject(function($q, $rootScope) { - * var deferred = $q.defer(); - * var promise = deferred.promise; - * var resolvedValue; - * - * promise.then(function(value) { resolvedValue = value; }); - * expect(resolvedValue).toBeUndefined(); - * - * // Simulate resolving of promise - * deferred.resolve(123); - * // Note that the 'then' function does not get called synchronously. - * // This is because we want the promise API to always be async, whether or not - * // it got called synchronously or asynchronously. - * expect(resolvedValue).toBeUndefined(); - * - * // Propagate promise resolution to 'then' functions using $apply(). - * $rootScope.$apply(); - * expect(resolvedValue).toEqual(123); - * })); - * ``` - * - * @param {function(function, function)} resolver Function which is responsible for resolving or - * rejecting the newly created promise. The first parameter is a function which resolves the - * promise, the second parameter is a function which rejects the promise. - * - * @returns {Promise} The newly created promise. - */ -/** - * @ngdoc provider - * @name $qProvider - * @this - * - * @description - */ -function $QProvider() { - var errorOnUnhandledRejections = true; - this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) { - return qFactory(function(callback) { - $rootScope.$evalAsync(callback); - }, $exceptionHandler, errorOnUnhandledRejections); - }]; - - /** - * @ngdoc method - * @name $qProvider#errorOnUnhandledRejections - * @kind function - * - * @description - * Retrieves or overrides whether to generate an error when a rejected promise is not handled. - * This feature is enabled by default. - * - * @param {boolean=} value Whether to generate an error when a rejected promise is not handled. - * @returns {boolean|ng.$qProvider} Current value when called without a new value or self for - * chaining otherwise. - */ - this.errorOnUnhandledRejections = function(value) { - if (isDefined(value)) { - errorOnUnhandledRejections = value; - return this; - } else { - return errorOnUnhandledRejections; - } - }; -} - -/** @this */ -function $$QProvider() { - var errorOnUnhandledRejections = true; - this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) { - return qFactory(function(callback) { - $browser.defer(callback); - }, $exceptionHandler, errorOnUnhandledRejections); - }]; - - this.errorOnUnhandledRejections = function(value) { - if (isDefined(value)) { - errorOnUnhandledRejections = value; - return this; - } else { - return errorOnUnhandledRejections; - } - }; -} - -/** - * Constructs a promise manager. - * - * @param {function(function)} nextTick Function for executing functions in the next turn. - * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for - * debugging purposes. - * @param {boolean=} errorOnUnhandledRejections Whether an error should be generated on unhandled - * promises rejections. - * @returns {object} Promise manager. - */ -function qFactory(nextTick, exceptionHandler, errorOnUnhandledRejections) { - var $qMinErr = minErr('$q', TypeError); - var queueSize = 0; - var checkQueue = []; - - /** - * @ngdoc method - * @name ng.$q#defer - * @kind function - * - * @description - * Creates a `Deferred` object which represents a task which will finish in the future. - * - * @returns {Deferred} Returns a new instance of deferred. - */ - function defer() { - return new Deferred(); - } - - function Deferred() { - var promise = this.promise = new Promise(); - //Non prototype methods necessary to support unbound execution :/ - this.resolve = function(val) { resolvePromise(promise, val); }; - this.reject = function(reason) { rejectPromise(promise, reason); }; - this.notify = function(progress) { notifyPromise(promise, progress); }; - } - - - function Promise() { - this.$$state = { status: 0 }; - } - - extend(Promise.prototype, { - then: function(onFulfilled, onRejected, progressBack) { - if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) { - return this; - } - var result = new Promise(); - - this.$$state.pending = this.$$state.pending || []; - this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]); - if (this.$$state.status > 0) scheduleProcessQueue(this.$$state); - - return result; - }, - - 'catch': function(callback) { - return this.then(null, callback); - }, - - 'finally': function(callback, progressBack) { - return this.then(function(value) { - return handleCallback(value, resolve, callback); - }, function(error) { - return handleCallback(error, reject, callback); - }, progressBack); - } - }); - - function processQueue(state) { - var fn, promise, pending; - - pending = state.pending; - state.processScheduled = false; - state.pending = undefined; - try { - for (var i = 0, ii = pending.length; i < ii; ++i) { - markQStateExceptionHandled(state); - promise = pending[i][0]; - fn = pending[i][state.status]; - try { - if (isFunction(fn)) { - resolvePromise(promise, fn(state.value)); - } else if (state.status === 1) { - resolvePromise(promise, state.value); - } else { - rejectPromise(promise, state.value); - } - } catch (e) { - rejectPromise(promise, e); - // This error is explicitly marked for being passed to the $exceptionHandler - if (e && e.$$passToExceptionHandler === true) { - exceptionHandler(e); - } - } - } - } finally { - --queueSize; - if (errorOnUnhandledRejections && queueSize === 0) { - nextTick(processChecks); - } - } - } - - function processChecks() { - // eslint-disable-next-line no-unmodified-loop-condition - while (!queueSize && checkQueue.length) { - var toCheck = checkQueue.shift(); - if (!isStateExceptionHandled(toCheck)) { - markQStateExceptionHandled(toCheck); - var errorMessage = 'Possibly unhandled rejection: ' + toDebugString(toCheck.value); - if (isError(toCheck.value)) { - exceptionHandler(toCheck.value, errorMessage); - } else { - exceptionHandler(errorMessage); - } - } - } - } - - function scheduleProcessQueue(state) { - if (errorOnUnhandledRejections && !state.pending && state.status === 2 && !isStateExceptionHandled(state)) { - if (queueSize === 0 && checkQueue.length === 0) { - nextTick(processChecks); - } - checkQueue.push(state); - } - if (state.processScheduled || !state.pending) return; - state.processScheduled = true; - ++queueSize; - nextTick(function() { processQueue(state); }); - } - - function resolvePromise(promise, val) { - if (promise.$$state.status) return; - if (val === promise) { - $$reject(promise, $qMinErr( - 'qcycle', - 'Expected promise to be resolved with value other than itself \'{0}\'', - val)); - } else { - $$resolve(promise, val); - } - - } - - function $$resolve(promise, val) { - var then; - var done = false; - try { - if (isObject(val) || isFunction(val)) then = val.then; - if (isFunction(then)) { - promise.$$state.status = -1; - then.call(val, doResolve, doReject, doNotify); - } else { - promise.$$state.value = val; - promise.$$state.status = 1; - scheduleProcessQueue(promise.$$state); - } - } catch (e) { - doReject(e); - } - - function doResolve(val) { - if (done) return; - done = true; - $$resolve(promise, val); - } - function doReject(val) { - if (done) return; - done = true; - $$reject(promise, val); - } - function doNotify(progress) { - notifyPromise(promise, progress); - } - } - - function rejectPromise(promise, reason) { - if (promise.$$state.status) return; - $$reject(promise, reason); - } - - function $$reject(promise, reason) { - promise.$$state.value = reason; - promise.$$state.status = 2; - scheduleProcessQueue(promise.$$state); - } - - function notifyPromise(promise, progress) { - var callbacks = promise.$$state.pending; - - if ((promise.$$state.status <= 0) && callbacks && callbacks.length) { - nextTick(function() { - var callback, result; - for (var i = 0, ii = callbacks.length; i < ii; i++) { - result = callbacks[i][0]; - callback = callbacks[i][3]; - try { - notifyPromise(result, isFunction(callback) ? callback(progress) : progress); - } catch (e) { - exceptionHandler(e); - } - } - }); - } - } - - /** - * @ngdoc method - * @name $q#reject - * @kind function - * - * @description - * Creates a promise that is resolved as rejected with the specified `reason`. This api should be - * used to forward rejection in a chain of promises. If you are dealing with the last promise in - * a promise chain, you don't need to worry about it. - * - * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of - * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via - * a promise error callback and you want to forward the error to the promise derived from the - * current promise, you have to "rethrow" the error by returning a rejection constructed via - * `reject`. - * - * ```js - * promiseB = promiseA.then(function(result) { - * // success: do something and resolve promiseB - * // with the old or a new result - * return result; - * }, function(reason) { - * // error: handle the error if possible and - * // resolve promiseB with newPromiseOrValue, - * // otherwise forward the rejection to promiseB - * if (canHandle(reason)) { - * // handle the error and recover - * return newPromiseOrValue; - * } - * return $q.reject(reason); - * }); - * ``` - * - * @param {*} reason Constant, message, exception or an object representing the rejection reason. - * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`. - */ - function reject(reason) { - var result = new Promise(); - rejectPromise(result, reason); - return result; - } - - function handleCallback(value, resolver, callback) { - var callbackOutput = null; - try { - if (isFunction(callback)) callbackOutput = callback(); - } catch (e) { - return reject(e); - } - if (isPromiseLike(callbackOutput)) { - return callbackOutput.then(function() { - return resolver(value); - }, reject); - } else { - return resolver(value); - } - } - - /** - * @ngdoc method - * @name $q#when - * @kind function - * - * @description - * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. - * This is useful when you are dealing with an object that might or might not be a promise, or if - * the promise comes from a source that can't be trusted. - * - * @param {*} value Value or a promise - * @param {Function=} successCallback - * @param {Function=} errorCallback - * @param {Function=} progressCallback - * @returns {Promise} Returns a promise of the passed value or promise - */ - - - function when(value, callback, errback, progressBack) { - var result = new Promise(); - resolvePromise(result, value); - return result.then(callback, errback, progressBack); - } - - /** - * @ngdoc method - * @name $q#resolve - * @kind function - * - * @description - * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6. - * - * @param {*} value Value or a promise - * @param {Function=} successCallback - * @param {Function=} errorCallback - * @param {Function=} progressCallback - * @returns {Promise} Returns a promise of the passed value or promise - */ - var resolve = when; - - /** - * @ngdoc method - * @name $q#all - * @kind function - * - * @description - * Combines multiple promises into a single promise that is resolved when all of the input - * promises are resolved. - * - * @param {Array.|Object.} promises An array or hash of promises. - * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values, - * each value corresponding to the promise at the same index/key in the `promises` array/hash. - * If any of the promises is resolved with a rejection, this resulting promise will be rejected - * with the same rejection value. - */ - - function all(promises) { - var result = new Promise(), - counter = 0, - results = isArray(promises) ? [] : {}; - - forEach(promises, function(promise, key) { - counter++; - when(promise).then(function(value) { - results[key] = value; - if (!(--counter)) resolvePromise(result, results); - }, function(reason) { - rejectPromise(result, reason); - }); - }); - - if (counter === 0) { - resolvePromise(result, results); - } - - return result; - } - - /** - * @ngdoc method - * @name $q#race - * @kind function - * - * @description - * Returns a promise that resolves or rejects as soon as one of those promises - * resolves or rejects, with the value or reason from that promise. - * - * @param {Array.|Object.} promises An array or hash of promises. - * @returns {Promise} a promise that resolves or rejects as soon as one of the `promises` - * resolves or rejects, with the value or reason from that promise. - */ - - function race(promises) { - var deferred = defer(); - - forEach(promises, function(promise) { - when(promise).then(deferred.resolve, deferred.reject); - }); - - return deferred.promise; - } - - function $Q(resolver) { - if (!isFunction(resolver)) { - throw $qMinErr('norslvr', 'Expected resolverFn, got \'{0}\'', resolver); - } - - var promise = new Promise(); - - function resolveFn(value) { - resolvePromise(promise, value); - } - - function rejectFn(reason) { - rejectPromise(promise, reason); - } - - resolver(resolveFn, rejectFn); - - return promise; - } - - // Let's make the instanceof operator work for promises, so that - // `new $q(fn) instanceof $q` would evaluate to true. - $Q.prototype = Promise.prototype; - - $Q.defer = defer; - $Q.reject = reject; - $Q.when = when; - $Q.resolve = resolve; - $Q.all = all; - $Q.race = race; - - return $Q; -} - -function isStateExceptionHandled(state) { - return !!state.pur; -} -function markQStateExceptionHandled(state) { - state.pur = true; -} -function markQExceptionHandled(q) { - markQStateExceptionHandled(q.$$state); -} - -/** @this */ -function $$RAFProvider() { //rAF - this.$get = ['$window', '$timeout', function($window, $timeout) { - var requestAnimationFrame = $window.requestAnimationFrame || - $window.webkitRequestAnimationFrame; - - var cancelAnimationFrame = $window.cancelAnimationFrame || - $window.webkitCancelAnimationFrame || - $window.webkitCancelRequestAnimationFrame; - - var rafSupported = !!requestAnimationFrame; - var raf = rafSupported - ? function(fn) { - var id = requestAnimationFrame(fn); - return function() { - cancelAnimationFrame(id); - }; - } - : function(fn) { - var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666 - return function() { - $timeout.cancel(timer); - }; - }; - - raf.supported = rafSupported; - - return raf; - }]; -} - -/** - * DESIGN NOTES - * - * The design decisions behind the scope are heavily favored for speed and memory consumption. - * - * The typical use of scope is to watch the expressions, which most of the time return the same - * value as last time so we optimize the operation. - * - * Closures construction is expensive in terms of speed as well as memory: - * - No closures, instead use prototypical inheritance for API - * - Internal state needs to be stored on scope directly, which means that private state is - * exposed as $$____ properties - * - * Loop operations are optimized by using while(count--) { ... } - * - This means that in order to keep the same order of execution as addition we have to add - * items to the array at the beginning (unshift) instead of at the end (push) - * - * Child scopes are created and removed often - * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists - * - * There are fewer watches than observers. This is why you don't want the observer to be implemented - * in the same way as watch. Watch requires return of the initialization function which is expensive - * to construct. - */ - - -/** - * @ngdoc provider - * @name $rootScopeProvider - * @description - * - * Provider for the $rootScope service. - */ - -/** - * @ngdoc method - * @name $rootScopeProvider#digestTtl - * @description - * - * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and - * assuming that the model is unstable. - * - * The current default is 10 iterations. - * - * In complex applications it's possible that the dependencies between `$watch`s will result in - * several digest iterations. However if an application needs more than the default 10 digest - * iterations for its model to stabilize then you should investigate what is causing the model to - * continuously change during the digest. - * - * Increasing the TTL could have performance implications, so you should not change it without - * proper justification. - * - * @param {number} limit The number of digest iterations. - */ - - -/** - * @ngdoc service - * @name $rootScope - * @this - * - * @description - * - * Every application has a single root {@link ng.$rootScope.Scope scope}. - * All other scopes are descendant scopes of the root scope. Scopes provide separation - * between the model and the view, via a mechanism for watching the model for changes. - * They also provide event emission/broadcast and subscription facility. See the - * {@link guide/scope developer guide on scopes}. - */ -function $RootScopeProvider() { - var TTL = 10; - var $rootScopeMinErr = minErr('$rootScope'); - var lastDirtyWatch = null; - var applyAsyncId = null; - - this.digestTtl = function(value) { - if (arguments.length) { - TTL = value; - } - return TTL; - }; - - function createChildScopeClass(parent) { - function ChildScope() { - this.$$watchers = this.$$nextSibling = - this.$$childHead = this.$$childTail = null; - this.$$listeners = {}; - this.$$listenerCount = {}; - this.$$watchersCount = 0; - this.$id = nextUid(); - this.$$ChildScope = null; - } - ChildScope.prototype = parent; - return ChildScope; - } - - this.$get = ['$exceptionHandler', '$parse', '$browser', - function($exceptionHandler, $parse, $browser) { - - function destroyChildScope($event) { - $event.currentScope.$$destroyed = true; - } - - function cleanUpScope($scope) { - - // Support: IE 9 only - if (msie === 9) { - // There is a memory leak in IE9 if all child scopes are not disconnected - // completely when a scope is destroyed. So this code will recurse up through - // all this scopes children - // - // See issue https://github.com/angular/angular.js/issues/10706 - if ($scope.$$childHead) { - cleanUpScope($scope.$$childHead); - } - if ($scope.$$nextSibling) { - cleanUpScope($scope.$$nextSibling); - } - } - - // The code below works around IE9 and V8's memory leaks - // - // See: - // - https://code.google.com/p/v8/issues/detail?id=2073#c26 - // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909 - // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451 - - $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead = - $scope.$$childTail = $scope.$root = $scope.$$watchers = null; - } - - /** - * @ngdoc type - * @name $rootScope.Scope - * - * @description - * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the - * {@link auto.$injector $injector}. Child scopes are created using the - * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when - * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for - * an in-depth introduction and usage examples. - * - * - * ## Inheritance - * A scope can inherit from a parent scope, as in this example: - * ```js - var parent = $rootScope; - var child = parent.$new(); - - parent.salutation = "Hello"; - expect(child.salutation).toEqual('Hello'); - - child.salutation = "Welcome"; - expect(child.salutation).toEqual('Welcome'); - expect(parent.salutation).toEqual('Hello'); - * ``` - * - * When interacting with `Scope` in tests, additional helper methods are available on the - * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional - * details. - * - * - * @param {Object.=} providers Map of service factory which need to be - * provided for the current scope. Defaults to {@link ng}. - * @param {Object.=} instanceCache Provides pre-instantiated services which should - * append/override services provided by `providers`. This is handy - * when unit-testing and having the need to override a default - * service. - * @returns {Object} Newly created scope. - * - */ - function Scope() { - this.$id = nextUid(); - this.$$phase = this.$parent = this.$$watchers = - this.$$nextSibling = this.$$prevSibling = - this.$$childHead = this.$$childTail = null; - this.$root = this; - this.$$destroyed = false; - this.$$listeners = {}; - this.$$listenerCount = {}; - this.$$watchersCount = 0; - this.$$isolateBindings = null; - } - - /** - * @ngdoc property - * @name $rootScope.Scope#$id - * - * @description - * Unique scope ID (monotonically increasing) useful for debugging. - */ - - /** - * @ngdoc property - * @name $rootScope.Scope#$parent - * - * @description - * Reference to the parent scope. - */ - - /** - * @ngdoc property - * @name $rootScope.Scope#$root - * - * @description - * Reference to the root scope. - */ - - Scope.prototype = { - constructor: Scope, - /** - * @ngdoc method - * @name $rootScope.Scope#$new - * @kind function - * - * @description - * Creates a new child {@link ng.$rootScope.Scope scope}. - * - * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event. - * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}. - * - * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is - * desired for the scope and its child scopes to be permanently detached from the parent and - * thus stop participating in model change detection and listener notification by invoking. - * - * @param {boolean} isolate If true, then the scope does not prototypically inherit from the - * parent scope. The scope is isolated, as it can not see parent scope properties. - * When creating widgets, it is useful for the widget to not accidentally read parent - * state. - * - * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent` - * of the newly created scope. Defaults to `this` scope if not provided. - * This is used when creating a transclude scope to correctly place it - * in the scope hierarchy while maintaining the correct prototypical - * inheritance. - * - * @returns {Object} The newly created child scope. - * - */ - $new: function(isolate, parent) { - var child; - - parent = parent || this; - - if (isolate) { - child = new Scope(); - child.$root = this.$root; - } else { - // Only create a child scope class if somebody asks for one, - // but cache it to allow the VM to optimize lookups. - if (!this.$$ChildScope) { - this.$$ChildScope = createChildScopeClass(this); - } - child = new this.$$ChildScope(); - } - child.$parent = parent; - child.$$prevSibling = parent.$$childTail; - if (parent.$$childHead) { - parent.$$childTail.$$nextSibling = child; - parent.$$childTail = child; - } else { - parent.$$childHead = parent.$$childTail = child; - } - - // When the new scope is not isolated or we inherit from `this`, and - // the parent scope is destroyed, the property `$$destroyed` is inherited - // prototypically. In all other cases, this property needs to be set - // when the parent scope is destroyed. - // The listener needs to be added after the parent is set - if (isolate || parent !== this) child.$on('$destroy', destroyChildScope); - - return child; - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$watch - * @kind function - * - * @description - * Registers a `listener` callback to be executed whenever the `watchExpression` changes. - * - * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest - * $digest()} and should return the value that will be watched. (`watchExpression` should not change - * its value when executed multiple times with the same input because it may be executed multiple - * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be - * [idempotent](http://en.wikipedia.org/wiki/Idempotence).) - * - The `listener` is called only when the value from the current `watchExpression` and the - * previous call to `watchExpression` are not equal (with the exception of the initial run, - * see below). Inequality is determined according to reference inequality, - * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators) - * via the `!==` Javascript operator, unless `objectEquality == true` - * (see next point) - * - When `objectEquality == true`, inequality of the `watchExpression` is determined - * according to the {@link angular.equals} function. To save the value of the object for - * later comparison, the {@link angular.copy} function is used. This therefore means that - * watching complex objects will have adverse memory and performance implications. - * - This should not be used to watch for changes in objects that are - * or contain [File](https://developer.mozilla.org/docs/Web/API/File) objects due to limitations with {@link angular.copy `angular.copy`}. - * - The watch `listener` may change the model, which may trigger other `listener`s to fire. - * This is achieved by rerunning the watchers until no changes are detected. The rerun - * iteration limit is 10 to prevent an infinite loop deadlock. - * - * - * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called, - * you can register a `watchExpression` function with no `listener`. (Be prepared for - * multiple calls to your `watchExpression` because it will execute multiple times in a - * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.) - * - * After a watcher is registered with the scope, the `listener` fn is called asynchronously - * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the - * watcher. In rare cases, this is undesirable because the listener is called when the result - * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you - * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the - * listener was called due to initialization. - * - * - * - * @example - * ```js - // let's assume that scope was dependency injected as the $rootScope - var scope = $rootScope; - scope.name = 'misko'; - scope.counter = 0; - - expect(scope.counter).toEqual(0); - scope.$watch('name', function(newValue, oldValue) { - scope.counter = scope.counter + 1; - }); - expect(scope.counter).toEqual(0); - - scope.$digest(); - // the listener is always called during the first $digest loop after it was registered - expect(scope.counter).toEqual(1); - - scope.$digest(); - // but now it will not be called unless the value changes - expect(scope.counter).toEqual(1); - - scope.name = 'adam'; - scope.$digest(); - expect(scope.counter).toEqual(2); - - - - // Using a function as a watchExpression - var food; - scope.foodCounter = 0; - expect(scope.foodCounter).toEqual(0); - scope.$watch( - // This function returns the value being watched. It is called for each turn of the $digest loop - function() { return food; }, - // This is the change listener, called when the value returned from the above function changes - function(newValue, oldValue) { - if ( newValue !== oldValue ) { - // Only increment the counter if the value changed - scope.foodCounter = scope.foodCounter + 1; - } - } - ); - // No digest has been run so the counter will be zero - expect(scope.foodCounter).toEqual(0); - - // Run the digest but since food has not changed count will still be zero - scope.$digest(); - expect(scope.foodCounter).toEqual(0); - - // Update food and run digest. Now the counter will increment - food = 'cheeseburger'; - scope.$digest(); - expect(scope.foodCounter).toEqual(1); - - * ``` - * - * - * - * @param {(function()|string)} watchExpression Expression that is evaluated on each - * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers - * a call to the `listener`. - * - * - `string`: Evaluated as {@link guide/expression expression} - * - `function(scope)`: called with current `scope` as a parameter. - * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value - * of `watchExpression` changes. - * - * - `newVal` contains the current value of the `watchExpression` - * - `oldVal` contains the previous value of the `watchExpression` - * - `scope` refers to the current scope - * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of - * comparing for reference equality. - * @returns {function()} Returns a deregistration function for this listener. - */ - $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) { - var get = $parse(watchExp); - var fn = isFunction(listener) ? listener : noop; - - if (get.$$watchDelegate) { - return get.$$watchDelegate(this, fn, objectEquality, get, watchExp); - } - var scope = this, - array = scope.$$watchers, - watcher = { - fn: fn, - last: initWatchVal, - get: get, - exp: prettyPrintExpression || watchExp, - eq: !!objectEquality - }; - - lastDirtyWatch = null; - - if (!array) { - array = scope.$$watchers = []; - array.$$digestWatchIndex = -1; - } - // we use unshift since we use a while loop in $digest for speed. - // the while loop reads in reverse order. - array.unshift(watcher); - array.$$digestWatchIndex++; - incrementWatchersCount(this, 1); - - return function deregisterWatch() { - var index = arrayRemove(array, watcher); - if (index >= 0) { - incrementWatchersCount(scope, -1); - if (index < array.$$digestWatchIndex) { - array.$$digestWatchIndex--; - } - } - lastDirtyWatch = null; - }; - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$watchGroup - * @kind function - * - * @description - * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`. - * If any one expression in the collection changes the `listener` is executed. - * - * - The items in the `watchExpressions` array are observed via the standard `$watch` operation. Their return - * values are examined for changes on every call to `$digest`. - * - The `listener` is called whenever any expression in the `watchExpressions` array changes. - * - * `$watchGroup` is more performant than watching each expression individually, and should be - * used when the listener does not need to know which expression has changed. - * If the listener needs to know which expression has changed, - * {@link ng.$rootScope.Scope#$watch $watch()} or - * {@link ng.$rootScope.Scope#$watchCollection $watchCollection()} should be used. - * - * @param {Array.} watchExpressions Array of expressions that will be individually - * watched using {@link ng.$rootScope.Scope#$watch $watch()} - * - * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any - * expression in `watchExpressions` changes - * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching - * those of `watchExpression` - * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching - * those of `watchExpression`. - * - * Note that `newValues` and `oldValues` reflect the differences in each **individual** - * expression, and not the difference of the values between each call of the listener. - * That means the difference between `newValues` and `oldValues` cannot be used to determine - * which expression has changed / remained stable: - * - * ```js - * - * $scope.$watchGroup(['v1', 'v2'], function(newValues, oldValues) { - * console.log(newValues, oldValues); - * }); - * - * // newValues, oldValues initially - * // [undefined, undefined], [undefined, undefined] - * - * $scope.v1 = 'a'; - * $scope.v2 = 'a'; - * - * // ['a', 'a'], [undefined, undefined] - * - * $scope.v2 = 'b' - * - * // v1 hasn't changed since it became `'a'`, therefore its oldValue is still `undefined` - * // ['a', 'b'], [undefined, 'a'] - * - * ``` - * - * The `scope` refers to the current scope. - * @returns {function()} Returns a de-registration function for all listeners. - */ - $watchGroup: function(watchExpressions, listener) { - var oldValues = new Array(watchExpressions.length); - var newValues = new Array(watchExpressions.length); - var deregisterFns = []; - var self = this; - var changeReactionScheduled = false; - var firstRun = true; - - if (!watchExpressions.length) { - // No expressions means we call the listener ASAP - var shouldCall = true; - self.$evalAsync(function() { - if (shouldCall) listener(newValues, newValues, self); - }); - return function deregisterWatchGroup() { - shouldCall = false; - }; - } - - if (watchExpressions.length === 1) { - // Special case size of one - return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) { - newValues[0] = value; - oldValues[0] = oldValue; - listener(newValues, (value === oldValue) ? newValues : oldValues, scope); - }); - } - - forEach(watchExpressions, function(expr, i) { - var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) { - newValues[i] = value; - oldValues[i] = oldValue; - if (!changeReactionScheduled) { - changeReactionScheduled = true; - self.$evalAsync(watchGroupAction); - } - }); - deregisterFns.push(unwatchFn); - }); - - function watchGroupAction() { - changeReactionScheduled = false; - - if (firstRun) { - firstRun = false; - listener(newValues, newValues, self); - } else { - listener(newValues, oldValues, self); - } - } - - return function deregisterWatchGroup() { - while (deregisterFns.length) { - deregisterFns.shift()(); - } - }; - }, - - - /** - * @ngdoc method - * @name $rootScope.Scope#$watchCollection - * @kind function - * - * @description - * Shallow watches the properties of an object and fires whenever any of the properties change - * (for arrays, this implies watching the array items; for object maps, this implies watching - * the properties). If a change is detected, the `listener` callback is fired. - * - * - The `obj` collection is observed via standard $watch operation and is examined on every - * call to $digest() to see if any items have been added, removed, or moved. - * - The `listener` is called whenever anything within the `obj` has changed. Examples include - * adding, removing, and moving items belonging to an object or array. - * - * - * @example - * ```js - $scope.names = ['igor', 'matias', 'misko', 'james']; - $scope.dataCount = 4; - - $scope.$watchCollection('names', function(newNames, oldNames) { - $scope.dataCount = newNames.length; - }); - - expect($scope.dataCount).toEqual(4); - $scope.$digest(); - - //still at 4 ... no changes - expect($scope.dataCount).toEqual(4); - - $scope.names.pop(); - $scope.$digest(); - - //now there's been a change - expect($scope.dataCount).toEqual(3); - * ``` - * - * - * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The - * expression value should evaluate to an object or an array which is observed on each - * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the - * collection will trigger a call to the `listener`. - * - * @param {function(newCollection, oldCollection, scope)} listener a callback function called - * when a change is detected. - * - The `newCollection` object is the newly modified data obtained from the `obj` expression - * - The `oldCollection` object is a copy of the former collection data. - * Due to performance considerations, the`oldCollection` value is computed only if the - * `listener` function declares two or more arguments. - * - The `scope` argument refers to the current scope. - * - * @returns {function()} Returns a de-registration function for this listener. When the - * de-registration function is executed, the internal watch operation is terminated. - */ - $watchCollection: function(obj, listener) { - $watchCollectionInterceptor.$stateful = true; - - var self = this; - // the current value, updated on each dirty-check run - var newValue; - // a shallow copy of the newValue from the last dirty-check run, - // updated to match newValue during dirty-check run - var oldValue; - // a shallow copy of the newValue from when the last change happened - var veryOldValue; - // only track veryOldValue if the listener is asking for it - var trackVeryOldValue = (listener.length > 1); - var changeDetected = 0; - var changeDetector = $parse(obj, $watchCollectionInterceptor); - var internalArray = []; - var internalObject = {}; - var initRun = true; - var oldLength = 0; - - function $watchCollectionInterceptor(_value) { - newValue = _value; - var newLength, key, bothNaN, newItem, oldItem; - - // If the new value is undefined, then return undefined as the watch may be a one-time watch - if (isUndefined(newValue)) return; - - if (!isObject(newValue)) { // if primitive - if (oldValue !== newValue) { - oldValue = newValue; - changeDetected++; - } - } else if (isArrayLike(newValue)) { - if (oldValue !== internalArray) { - // we are transitioning from something which was not an array into array. - oldValue = internalArray; - oldLength = oldValue.length = 0; - changeDetected++; - } - - newLength = newValue.length; - - if (oldLength !== newLength) { - // if lengths do not match we need to trigger change notification - changeDetected++; - oldValue.length = oldLength = newLength; - } - // copy the items to oldValue and look for changes. - for (var i = 0; i < newLength; i++) { - oldItem = oldValue[i]; - newItem = newValue[i]; - - // eslint-disable-next-line no-self-compare - bothNaN = (oldItem !== oldItem) && (newItem !== newItem); - if (!bothNaN && (oldItem !== newItem)) { - changeDetected++; - oldValue[i] = newItem; - } - } - } else { - if (oldValue !== internalObject) { - // we are transitioning from something which was not an object into object. - oldValue = internalObject = {}; - oldLength = 0; - changeDetected++; - } - // copy the items to oldValue and look for changes. - newLength = 0; - for (key in newValue) { - if (hasOwnProperty.call(newValue, key)) { - newLength++; - newItem = newValue[key]; - oldItem = oldValue[key]; - - if (key in oldValue) { - // eslint-disable-next-line no-self-compare - bothNaN = (oldItem !== oldItem) && (newItem !== newItem); - if (!bothNaN && (oldItem !== newItem)) { - changeDetected++; - oldValue[key] = newItem; - } - } else { - oldLength++; - oldValue[key] = newItem; - changeDetected++; - } - } - } - if (oldLength > newLength) { - // we used to have more keys, need to find them and destroy them. - changeDetected++; - for (key in oldValue) { - if (!hasOwnProperty.call(newValue, key)) { - oldLength--; - delete oldValue[key]; - } - } - } - } - return changeDetected; - } - - function $watchCollectionAction() { - if (initRun) { - initRun = false; - listener(newValue, newValue, self); - } else { - listener(newValue, veryOldValue, self); - } - - // make a copy for the next time a collection is changed - if (trackVeryOldValue) { - if (!isObject(newValue)) { - //primitive - veryOldValue = newValue; - } else if (isArrayLike(newValue)) { - veryOldValue = new Array(newValue.length); - for (var i = 0; i < newValue.length; i++) { - veryOldValue[i] = newValue[i]; - } - } else { // if object - veryOldValue = {}; - for (var key in newValue) { - if (hasOwnProperty.call(newValue, key)) { - veryOldValue[key] = newValue[key]; - } - } - } - } - } - - return this.$watch(changeDetector, $watchCollectionAction); - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$digest - * @kind function - * - * @description - * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and - * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change - * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} - * until no more listeners are firing. This means that it is possible to get into an infinite - * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of - * iterations exceeds 10. - * - * Usually, you don't call `$digest()` directly in - * {@link ng.directive:ngController controllers} or in - * {@link ng.$compileProvider#directive directives}. - * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within - * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`. - * - * If you want to be notified whenever `$digest()` is called, - * you can register a `watchExpression` function with - * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`. - * - * In unit tests, you may need to call `$digest()` to simulate the scope life cycle. - * - * @example - * ```js - var scope = ...; - scope.name = 'misko'; - scope.counter = 0; - - expect(scope.counter).toEqual(0); - scope.$watch('name', function(newValue, oldValue) { - scope.counter = scope.counter + 1; - }); - expect(scope.counter).toEqual(0); - - scope.$digest(); - // the listener is always called during the first $digest loop after it was registered - expect(scope.counter).toEqual(1); - - scope.$digest(); - // but now it will not be called unless the value changes - expect(scope.counter).toEqual(1); - - scope.name = 'adam'; - scope.$digest(); - expect(scope.counter).toEqual(2); - * ``` - * - */ - $digest: function() { - var watch, value, last, fn, get, - watchers, - dirty, ttl = TTL, - next, current, target = this, - watchLog = [], - logIdx, asyncTask; - - beginPhase('$digest'); - // Check for changes to browser url that happened in sync before the call to $digest - $browser.$$checkUrlChange(); - - if (this === $rootScope && applyAsyncId !== null) { - // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then - // cancel the scheduled $apply and flush the queue of expressions to be evaluated. - $browser.defer.cancel(applyAsyncId); - flushApplyAsync(); - } - - lastDirtyWatch = null; - - do { // "while dirty" loop - dirty = false; - current = target; - - // It's safe for asyncQueuePosition to be a local variable here because this loop can't - // be reentered recursively. Calling $digest from a function passed to $evalAsync would - // lead to a '$digest already in progress' error. - for (var asyncQueuePosition = 0; asyncQueuePosition < asyncQueue.length; asyncQueuePosition++) { - try { - asyncTask = asyncQueue[asyncQueuePosition]; - fn = asyncTask.fn; - fn(asyncTask.scope, asyncTask.locals); - } catch (e) { - $exceptionHandler(e); - } - lastDirtyWatch = null; - } - asyncQueue.length = 0; - - traverseScopesLoop: - do { // "traverse the scopes" loop - if ((watchers = current.$$watchers)) { - // process our watches - watchers.$$digestWatchIndex = watchers.length; - while (watchers.$$digestWatchIndex--) { - try { - watch = watchers[watchers.$$digestWatchIndex]; - // Most common watches are on primitives, in which case we can short - // circuit it with === operator, only when === fails do we use .equals - if (watch) { - get = watch.get; - if ((value = get(current)) !== (last = watch.last) && - !(watch.eq - ? equals(value, last) - : (isNumberNaN(value) && isNumberNaN(last)))) { - dirty = true; - lastDirtyWatch = watch; - watch.last = watch.eq ? copy(value, null) : value; - fn = watch.fn; - fn(value, ((last === initWatchVal) ? value : last), current); - if (ttl < 5) { - logIdx = 4 - ttl; - if (!watchLog[logIdx]) watchLog[logIdx] = []; - watchLog[logIdx].push({ - msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp, - newVal: value, - oldVal: last - }); - } - } else if (watch === lastDirtyWatch) { - // If the most recently dirty watcher is now clean, short circuit since the remaining watchers - // have already been tested. - dirty = false; - break traverseScopesLoop; - } - } - } catch (e) { - $exceptionHandler(e); - } - } - } - - // Insanity Warning: scope depth-first traversal - // yes, this code is a bit crazy, but it works and we have tests to prove it! - // this piece should be kept in sync with the traversal in $broadcast - if (!(next = ((current.$$watchersCount && current.$$childHead) || - (current !== target && current.$$nextSibling)))) { - while (current !== target && !(next = current.$$nextSibling)) { - current = current.$parent; - } - } - } while ((current = next)); - - // `break traverseScopesLoop;` takes us to here - - if ((dirty || asyncQueue.length) && !(ttl--)) { - clearPhase(); - throw $rootScopeMinErr('infdig', - '{0} $digest() iterations reached. Aborting!\n' + - 'Watchers fired in the last 5 iterations: {1}', - TTL, watchLog); - } - - } while (dirty || asyncQueue.length); - - clearPhase(); - - // postDigestQueuePosition isn't local here because this loop can be reentered recursively. - while (postDigestQueuePosition < postDigestQueue.length) { - try { - postDigestQueue[postDigestQueuePosition++](); - } catch (e) { - $exceptionHandler(e); - } - } - postDigestQueue.length = postDigestQueuePosition = 0; - - // Check for changes to browser url that happened during the $digest - // (for which no event is fired; e.g. via `history.pushState()`) - $browser.$$checkUrlChange(); - }, - - - /** - * @ngdoc event - * @name $rootScope.Scope#$destroy - * @eventType broadcast on scope being destroyed - * - * @description - * Broadcasted when a scope and its children are being destroyed. - * - * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to - * clean up DOM bindings before an element is removed from the DOM. - */ - - /** - * @ngdoc method - * @name $rootScope.Scope#$destroy - * @kind function - * - * @description - * Removes the current scope (and all of its children) from the parent scope. Removal implies - * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer - * propagate to the current scope and its children. Removal also implies that the current - * scope is eligible for garbage collection. - * - * The `$destroy()` is usually used by directives such as - * {@link ng.directive:ngRepeat ngRepeat} for managing the - * unrolling of the loop. - * - * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope. - * Application code can register a `$destroy` event handler that will give it a chance to - * perform any necessary cleanup. - * - * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to - * clean up DOM bindings before an element is removed from the DOM. - */ - $destroy: function() { - // We can't destroy a scope that has been already destroyed. - if (this.$$destroyed) return; - var parent = this.$parent; - - this.$broadcast('$destroy'); - this.$$destroyed = true; - - if (this === $rootScope) { - //Remove handlers attached to window when $rootScope is removed - $browser.$$applicationDestroyed(); - } - - incrementWatchersCount(this, -this.$$watchersCount); - for (var eventName in this.$$listenerCount) { - decrementListenerCount(this, this.$$listenerCount[eventName], eventName); - } - - // sever all the references to parent scopes (after this cleanup, the current scope should - // not be retained by any of our references and should be eligible for garbage collection) - if (parent && parent.$$childHead === this) parent.$$childHead = this.$$nextSibling; - if (parent && parent.$$childTail === this) parent.$$childTail = this.$$prevSibling; - if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling; - if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling; - - // Disable listeners, watchers and apply/digest methods - this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop; - this.$on = this.$watch = this.$watchGroup = function() { return noop; }; - this.$$listeners = {}; - - // Disconnect the next sibling to prevent `cleanUpScope` destroying those too - this.$$nextSibling = null; - cleanUpScope(this); - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$eval - * @kind function - * - * @description - * Executes the `expression` on the current scope and returns the result. Any exceptions in - * the expression are propagated (uncaught). This is useful when evaluating AngularJS - * expressions. - * - * @example - * ```js - var scope = ng.$rootScope.Scope(); - scope.a = 1; - scope.b = 2; - - expect(scope.$eval('a+b')).toEqual(3); - expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); - * ``` - * - * @param {(string|function())=} expression An AngularJS expression to be executed. - * - * - `string`: execute using the rules as defined in {@link guide/expression expression}. - * - `function(scope)`: execute the function with the current `scope` parameter. - * - * @param {(object)=} locals Local variables object, useful for overriding values in scope. - * @returns {*} The result of evaluating the expression. - */ - $eval: function(expr, locals) { - return $parse(expr)(this, locals); - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$evalAsync - * @kind function - * - * @description - * Executes the expression on the current scope at a later point in time. - * - * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only - * that: - * - * - it will execute after the function that scheduled the evaluation (preferably before DOM - * rendering). - * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after - * `expression` execution. - * - * Any exceptions from the execution of the expression are forwarded to the - * {@link ng.$exceptionHandler $exceptionHandler} service. - * - * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle - * will be scheduled. However, it is encouraged to always call code that changes the model - * from within an `$apply` call. That includes code evaluated via `$evalAsync`. - * - * @param {(string|function())=} expression An AngularJS expression to be executed. - * - * - `string`: execute using the rules as defined in {@link guide/expression expression}. - * - `function(scope)`: execute the function with the current `scope` parameter. - * - * @param {(object)=} locals Local variables object, useful for overriding values in scope. - */ - $evalAsync: function(expr, locals) { - // if we are outside of an $digest loop and this is the first time we are scheduling async - // task also schedule async auto-flush - if (!$rootScope.$$phase && !asyncQueue.length) { - $browser.defer(function() { - if (asyncQueue.length) { - $rootScope.$digest(); - } - }); - } - - asyncQueue.push({scope: this, fn: $parse(expr), locals: locals}); - }, - - $$postDigest: function(fn) { - postDigestQueue.push(fn); - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$apply - * @kind function - * - * @description - * `$apply()` is used to execute an expression in AngularJS from outside of the AngularJS - * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries). - * Because we are calling into the AngularJS framework we need to perform proper scope life - * cycle of {@link ng.$exceptionHandler exception handling}, - * {@link ng.$rootScope.Scope#$digest executing watches}. - * - * **Life cycle: Pseudo-Code of `$apply()`** - * - * ```js - function $apply(expr) { - try { - return $eval(expr); - } catch (e) { - $exceptionHandler(e); - } finally { - $root.$digest(); - } - } - * ``` - * - * - * Scope's `$apply()` method transitions through the following stages: - * - * 1. The {@link guide/expression expression} is executed using the - * {@link ng.$rootScope.Scope#$eval $eval()} method. - * 2. Any exceptions from the execution of the expression are forwarded to the - * {@link ng.$exceptionHandler $exceptionHandler} service. - * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the - * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method. - * - * - * @param {(string|function())=} exp An AngularJS expression to be executed. - * - * - `string`: execute using the rules as defined in {@link guide/expression expression}. - * - `function(scope)`: execute the function with current `scope` parameter. - * - * @returns {*} The result of evaluating the expression. - */ - $apply: function(expr) { - try { - beginPhase('$apply'); - try { - return this.$eval(expr); - } finally { - clearPhase(); - } - } catch (e) { - $exceptionHandler(e); - } finally { - try { - $rootScope.$digest(); - } catch (e) { - $exceptionHandler(e); - // eslint-disable-next-line no-unsafe-finally - throw e; - } - } - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$applyAsync - * @kind function - * - * @description - * Schedule the invocation of $apply to occur at a later time. The actual time difference - * varies across browsers, but is typically around ~10 milliseconds. - * - * This can be used to queue up multiple expressions which need to be evaluated in the same - * digest. - * - * @param {(string|function())=} exp An AngularJS expression to be executed. - * - * - `string`: execute using the rules as defined in {@link guide/expression expression}. - * - `function(scope)`: execute the function with current `scope` parameter. - */ - $applyAsync: function(expr) { - var scope = this; - if (expr) { - applyAsyncQueue.push($applyAsyncExpression); - } - expr = $parse(expr); - scheduleApplyAsync(); - - function $applyAsyncExpression() { - scope.$eval(expr); - } - }, - - /** - * @ngdoc method - * @name $rootScope.Scope#$on - * @kind function - * - * @description - * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for - * discussion of event life cycle. - * - * The event listener function format is: `function(event, args...)`. The `event` object - * passed into the listener has the following attributes: - * - * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or - * `$broadcast`-ed. - * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the - * event propagates through the scope hierarchy, this property is set to null. - * - `name` - `{string}`: name of the event. - * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel - * further event propagation (available only for events that were `$emit`-ed). - * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag - * to true. - * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called. - * - * @param {string} name Event name to listen on. - * @param {function(event, ...args)} listener Function to call when the event is emitted. - * @returns {function()} Returns a deregistration function for this listener. - */ - $on: function(name, listener) { - var namedListeners = this.$$listeners[name]; - if (!namedListeners) { - this.$$listeners[name] = namedListeners = []; - } - namedListeners.push(listener); - - var current = this; - do { - if (!current.$$listenerCount[name]) { - current.$$listenerCount[name] = 0; - } - current.$$listenerCount[name]++; - } while ((current = current.$parent)); - - var self = this; - return function() { - var indexOfListener = namedListeners.indexOf(listener); - if (indexOfListener !== -1) { - // Use delete in the hope of the browser deallocating the memory for the array entry, - // while not shifting the array indexes of other listeners. - // See issue https://github.com/angular/angular.js/issues/16135 - delete namedListeners[indexOfListener]; - decrementListenerCount(self, 1, name); - } - }; - }, - - - /** - * @ngdoc method - * @name $rootScope.Scope#$emit - * @kind function - * - * @description - * Dispatches an event `name` upwards through the scope hierarchy notifying the - * registered {@link ng.$rootScope.Scope#$on} listeners. - * - * The event life cycle starts at the scope on which `$emit` was called. All - * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get - * notified. Afterwards, the event traverses upwards toward the root scope and calls all - * registered listeners along the way. The event will stop propagating if one of the listeners - * cancels it. - * - * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed - * onto the {@link ng.$exceptionHandler $exceptionHandler} service. - * - * @param {string} name Event name to emit. - * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. - * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}). - */ - $emit: function(name, args) { - var empty = [], - namedListeners, - scope = this, - stopPropagation = false, - event = { - name: name, - targetScope: scope, - stopPropagation: function() {stopPropagation = true;}, - preventDefault: function() { - event.defaultPrevented = true; - }, - defaultPrevented: false - }, - listenerArgs = concat([event], arguments, 1), - i, length; - - do { - namedListeners = scope.$$listeners[name] || empty; - event.currentScope = scope; - for (i = 0, length = namedListeners.length; i < length; i++) { - - // if listeners were deregistered, defragment the array - if (!namedListeners[i]) { - namedListeners.splice(i, 1); - i--; - length--; - continue; - } - try { - //allow all listeners attached to the current scope to run - namedListeners[i].apply(null, listenerArgs); - } catch (e) { - $exceptionHandler(e); - } - } - //if any listener on the current scope stops propagation, prevent bubbling - if (stopPropagation) { - break; - } - //traverse upwards - scope = scope.$parent; - } while (scope); - - event.currentScope = null; - - return event; - }, - - - /** - * @ngdoc method - * @name $rootScope.Scope#$broadcast - * @kind function - * - * @description - * Dispatches an event `name` downwards to all child scopes (and their children) notifying the - * registered {@link ng.$rootScope.Scope#$on} listeners. - * - * The event life cycle starts at the scope on which `$broadcast` was called. All - * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get - * notified. Afterwards, the event propagates to all direct and indirect scopes of the current - * scope and calls all registered listeners along the way. The event cannot be canceled. - * - * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed - * onto the {@link ng.$exceptionHandler $exceptionHandler} service. - * - * @param {string} name Event name to broadcast. - * @param {...*} args Optional one or more arguments which will be passed onto the event listeners. - * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on} - */ - $broadcast: function(name, args) { - var target = this, - current = target, - next = target, - event = { - name: name, - targetScope: target, - preventDefault: function() { - event.defaultPrevented = true; - }, - defaultPrevented: false - }; - - if (!target.$$listenerCount[name]) return event; - - var listenerArgs = concat([event], arguments, 1), - listeners, i, length; - - //down while you can, then up and next sibling or up and next sibling until back at root - while ((current = next)) { - event.currentScope = current; - listeners = current.$$listeners[name] || []; - for (i = 0, length = listeners.length; i < length; i++) { - // if listeners were deregistered, defragment the array - if (!listeners[i]) { - listeners.splice(i, 1); - i--; - length--; - continue; - } - - try { - listeners[i].apply(null, listenerArgs); - } catch (e) { - $exceptionHandler(e); - } - } - - // Insanity Warning: scope depth-first traversal - // yes, this code is a bit crazy, but it works and we have tests to prove it! - // this piece should be kept in sync with the traversal in $digest - // (though it differs due to having the extra check for $$listenerCount) - if (!(next = ((current.$$listenerCount[name] && current.$$childHead) || - (current !== target && current.$$nextSibling)))) { - while (current !== target && !(next = current.$$nextSibling)) { - current = current.$parent; - } - } - } - - event.currentScope = null; - return event; - } - }; - - var $rootScope = new Scope(); - - //The internal queues. Expose them on the $rootScope for debugging/testing purposes. - var asyncQueue = $rootScope.$$asyncQueue = []; - var postDigestQueue = $rootScope.$$postDigestQueue = []; - var applyAsyncQueue = $rootScope.$$applyAsyncQueue = []; - - var postDigestQueuePosition = 0; - - return $rootScope; - - - function beginPhase(phase) { - if ($rootScope.$$phase) { - throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase); - } - - $rootScope.$$phase = phase; - } - - function clearPhase() { - $rootScope.$$phase = null; - } - - function incrementWatchersCount(current, count) { - do { - current.$$watchersCount += count; - } while ((current = current.$parent)); - } - - function decrementListenerCount(current, count, name) { - do { - current.$$listenerCount[name] -= count; - - if (current.$$listenerCount[name] === 0) { - delete current.$$listenerCount[name]; - } - } while ((current = current.$parent)); - } - - /** - * function used as an initial value for watchers. - * because it's unique we can easily tell it apart from other values - */ - function initWatchVal() {} - - function flushApplyAsync() { - while (applyAsyncQueue.length) { - try { - applyAsyncQueue.shift()(); - } catch (e) { - $exceptionHandler(e); - } - } - applyAsyncId = null; - } - - function scheduleApplyAsync() { - if (applyAsyncId === null) { - applyAsyncId = $browser.defer(function() { - $rootScope.$apply(flushApplyAsync); - }); - } - } - }]; -} - -/** - * @ngdoc service - * @name $rootElement - * - * @description - * The root element of AngularJS application. This is either the element where {@link - * ng.directive:ngApp ngApp} was declared or the element passed into - * {@link angular.bootstrap}. The element represents the root element of application. It is also the - * location where the application's {@link auto.$injector $injector} service gets - * published, and can be retrieved using `$rootElement.injector()`. - */ - - -// the implementation is in angular.bootstrap - -/** - * @this - * @description - * Private service to sanitize uris for links and images. Used by $compile and $sanitize. - */ -function $$SanitizeUriProvider() { - var aHrefSanitizationWhitelist = /^\s*(https?|s?ftp|mailto|tel|file):/, - imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file|blob):|data:image\/)/; - - /** - * @description - * Retrieves or overrides the default regular expression that is used for whitelisting of safe - * urls during a[href] sanitization. - * - * The sanitization is a security measure aimed at prevent XSS attacks via html links. - * - * Any url about to be assigned to a[href] via data-binding is first normalized and turned into - * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist` - * regular expression. If a match is found, the original url is written into the dom. Otherwise, - * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. - * - * @param {RegExp=} regexp New regexp to whitelist urls with. - * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for - * chaining otherwise. - */ - this.aHrefSanitizationWhitelist = function(regexp) { - if (isDefined(regexp)) { - aHrefSanitizationWhitelist = regexp; - return this; - } - return aHrefSanitizationWhitelist; - }; - - - /** - * @description - * Retrieves or overrides the default regular expression that is used for whitelisting of safe - * urls during img[src] sanitization. - * - * The sanitization is a security measure aimed at prevent XSS attacks via html links. - * - * Any url about to be assigned to img[src] via data-binding is first normalized and turned into - * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist` - * regular expression. If a match is found, the original url is written into the dom. Otherwise, - * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM. - * - * @param {RegExp=} regexp New regexp to whitelist urls with. - * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for - * chaining otherwise. - */ - this.imgSrcSanitizationWhitelist = function(regexp) { - if (isDefined(regexp)) { - imgSrcSanitizationWhitelist = regexp; - return this; - } - return imgSrcSanitizationWhitelist; - }; - - this.$get = function() { - return function sanitizeUri(uri, isImage) { - var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist; - var normalizedVal; - normalizedVal = urlResolve(uri && uri.trim()).href; - if (normalizedVal !== '' && !normalizedVal.match(regex)) { - return 'unsafe:' + normalizedVal; - } - return uri; - }; - }; -} - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Any commits to this file should be reviewed with security in mind. * - * Changes to this file can potentially create security vulnerabilities. * - * An approval from 2 Core members with history of modifying * - * this file is required. * - * * - * Does the change somehow allow for arbitrary javascript to be executed? * - * Or allows for someone to change the prototype of built-in objects? * - * Or gives undesired access to variables likes document or window? * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/* exported $SceProvider, $SceDelegateProvider */ - -var $sceMinErr = minErr('$sce'); - -var SCE_CONTEXTS = { - // HTML is used when there's HTML rendered (e.g. ng-bind-html, iframe srcdoc binding). - HTML: 'html', - - // Style statements or stylesheets. Currently unused in AngularJS. - CSS: 'css', - - // An URL used in a context where it does not refer to a resource that loads code. Currently - // unused in AngularJS. - URL: 'url', - - // RESOURCE_URL is a subtype of URL used where the referred-to resource could be interpreted as - // code. (e.g. ng-include, script src binding, templateUrl) - RESOURCE_URL: 'resourceUrl', - - // Script. Currently unused in AngularJS. - JS: 'js' -}; - -// Helper functions follow. - -var UNDERSCORE_LOWERCASE_REGEXP = /_([a-z])/g; - -function snakeToCamel(name) { - return name - .replace(UNDERSCORE_LOWERCASE_REGEXP, fnCamelCaseReplace); -} - -function adjustMatcher(matcher) { - if (matcher === 'self') { - return matcher; - } else if (isString(matcher)) { - // Strings match exactly except for 2 wildcards - '*' and '**'. - // '*' matches any character except those from the set ':/.?&'. - // '**' matches any character (like .* in a RegExp). - // More than 2 *'s raises an error as it's ill defined. - if (matcher.indexOf('***') > -1) { - throw $sceMinErr('iwcard', - 'Illegal sequence *** in string matcher. String: {0}', matcher); - } - matcher = escapeForRegexp(matcher). - replace(/\\\*\\\*/g, '.*'). - replace(/\\\*/g, '[^:/.?&;]*'); - return new RegExp('^' + matcher + '$'); - } else if (isRegExp(matcher)) { - // The only other type of matcher allowed is a Regexp. - // Match entire URL / disallow partial matches. - // Flags are reset (i.e. no global, ignoreCase or multiline) - return new RegExp('^' + matcher.source + '$'); - } else { - throw $sceMinErr('imatcher', - 'Matchers may only be "self", string patterns or RegExp objects'); - } -} - - -function adjustMatchers(matchers) { - var adjustedMatchers = []; - if (isDefined(matchers)) { - forEach(matchers, function(matcher) { - adjustedMatchers.push(adjustMatcher(matcher)); - }); - } - return adjustedMatchers; -} - - -/** - * @ngdoc service - * @name $sceDelegate - * @kind function - * - * @description - * - * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict - * Contextual Escaping (SCE)} services to AngularJS. - * - * For an overview of this service and the functionnality it provides in AngularJS, see the main - * page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how - * SCE works in their application, which shouldn't be needed in most cases. - * - *
      - * AngularJS strongly relies on contextual escaping for the security of bindings: disabling or - * modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners, - * changes to this service will also influence users, so be extra careful and document your changes. - *
      - * - * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of - * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is - * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to - * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things - * work because `$sce` delegates to `$sceDelegate` for these operations. - * - * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service. - * - * The default instance of `$sceDelegate` should work out of the box with little pain. While you - * can override it completely to change the behavior of `$sce`, the common case would - * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting - * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as - * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist - * $sceDelegateProvider.resourceUrlWhitelist} and {@link - * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist} - */ - -/** - * @ngdoc provider - * @name $sceDelegateProvider - * @this - * - * @description - * - * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate - * $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}. - * - * The `$sceDelegateProvider` allows one to get/set the whitelists and blacklists used to ensure - * that the URLs used for sourcing AngularJS templates and other script-running URLs are safe (all - * places that use the `$sce.RESOURCE_URL` context). See - * {@link ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} - * and - * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}, - * - * For the general details about this service in AngularJS, read the main page for {@link ng.$sce - * Strict Contextual Escaping (SCE)}. - * - * **Example**: Consider the following case.
      - * - * - your app is hosted at url `http://myapp.example.com/` - * - but some of your templates are hosted on other domains you control such as - * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc. - * - and you have an open redirect at `http://myapp.example.com/clickThru?...`. - * - * Here is what a secure configuration for this scenario might look like: - * - * ``` - * angular.module('myApp', []).config(function($sceDelegateProvider) { - * $sceDelegateProvider.resourceUrlWhitelist([ - * // Allow same origin resource loads. - * 'self', - * // Allow loading from our assets domain. Notice the difference between * and **. - * 'http://srv*.assets.example.com/**' - * ]); - * - * // The blacklist overrides the whitelist so the open redirect here is blocked. - * $sceDelegateProvider.resourceUrlBlacklist([ - * 'http://myapp.example.com/clickThru**' - * ]); - * }); - * ``` - * Note that an empty whitelist will block every resource URL from being loaded, and will require - * you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates - * requested by {@link ng.$templateRequest $templateRequest} that are present in - * {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism - * to populate your templates in that cache at config time, then it is a good idea to remove 'self' - * from that whitelist. This helps to mitigate the security impact of certain types of issues, like - * for instance attacker-controlled `ng-includes`. - */ - -function $SceDelegateProvider() { - this.SCE_CONTEXTS = SCE_CONTEXTS; - - // Resource URLs can also be trusted by policy. - var resourceUrlWhitelist = ['self'], - resourceUrlBlacklist = []; - - /** - * @ngdoc method - * @name $sceDelegateProvider#resourceUrlWhitelist - * @kind function - * - * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value - * provided. This must be an array or null. A snapshot of this array is used so further - * changes to the array are ignored. - * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items - * allowed in this array. - * - * @return {Array} The currently set whitelist array. - * - * @description - * Sets/Gets the whitelist of trusted resource URLs. - * - * The **default value** when no whitelist has been explicitly set is `['self']` allowing only - * same origin resource requests. - * - *
      - * **Note:** the default whitelist of 'self' is not recommended if your app shares its origin - * with other apps! It is a good idea to limit it to only your application's directory. - *
      - */ - this.resourceUrlWhitelist = function(value) { - if (arguments.length) { - resourceUrlWhitelist = adjustMatchers(value); - } - return resourceUrlWhitelist; - }; - - /** - * @ngdoc method - * @name $sceDelegateProvider#resourceUrlBlacklist - * @kind function - * - * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value - * provided. This must be an array or null. A snapshot of this array is used so further - * changes to the array are ignored.

      - * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items - * allowed in this array.

      - * The typical usage for the blacklist is to **block - * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as - * these would otherwise be trusted but actually return content from the redirected domain. - *

      - * Finally, **the blacklist overrides the whitelist** and has the final say. - * - * @return {Array} The currently set blacklist array. - * - * @description - * Sets/Gets the blacklist of trusted resource URLs. - * - * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there - * is no blacklist.) - */ - - this.resourceUrlBlacklist = function(value) { - if (arguments.length) { - resourceUrlBlacklist = adjustMatchers(value); - } - return resourceUrlBlacklist; - }; - - this.$get = ['$injector', function($injector) { - - var htmlSanitizer = function htmlSanitizer(html) { - throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.'); - }; - - if ($injector.has('$sanitize')) { - htmlSanitizer = $injector.get('$sanitize'); - } - - - function matchUrl(matcher, parsedUrl) { - if (matcher === 'self') { - return urlIsSameOrigin(parsedUrl); - } else { - // definitely a regex. See adjustMatchers() - return !!matcher.exec(parsedUrl.href); - } - } - - function isResourceUrlAllowedByPolicy(url) { - var parsedUrl = urlResolve(url.toString()); - var i, n, allowed = false; - // Ensure that at least one item from the whitelist allows this url. - for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) { - if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) { - allowed = true; - break; - } - } - if (allowed) { - // Ensure that no item from the blacklist blocked this url. - for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) { - if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) { - allowed = false; - break; - } - } - } - return allowed; - } - - function generateHolderType(Base) { - var holderType = function TrustedValueHolderType(trustedValue) { - this.$$unwrapTrustedValue = function() { - return trustedValue; - }; - }; - if (Base) { - holderType.prototype = new Base(); - } - holderType.prototype.valueOf = function sceValueOf() { - return this.$$unwrapTrustedValue(); - }; - holderType.prototype.toString = function sceToString() { - return this.$$unwrapTrustedValue().toString(); - }; - return holderType; - } - - var trustedValueHolderBase = generateHolderType(), - byType = {}; - - byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase); - byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase); - byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase); - byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase); - byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]); - - /** - * @ngdoc method - * @name $sceDelegate#trustAs - * - * @description - * Returns a trusted representation of the parameter for the specified context. This trusted - * object will later on be used as-is, without any security check, by bindings or directives - * that require this security context. - * For instance, marking a string as trusted for the `$sce.HTML` context will entirely bypass - * the potential `$sanitize` call in corresponding `$sce.HTML` bindings or directives, such as - * `ng-bind-html`. Note that in most cases you won't need to call this function: if you have the - * sanitizer loaded, passing the value itself will render all the HTML that does not pose a - * security risk. - * - * See {@link ng.$sceDelegate#getTrusted getTrusted} for the function that will consume those - * trusted values, and {@link ng.$sce $sce} for general documentation about strict contextual - * escaping. - * - * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`, - * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`. - * - * @param {*} value The value that should be considered trusted. - * @return {*} A trusted representation of value, that can be used in the given context. - */ - function trustAs(type, trustedValue) { - var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null); - if (!Constructor) { - throw $sceMinErr('icontext', - 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}', - type, trustedValue); - } - if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') { - return trustedValue; - } - // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting - // mutable objects, we ensure here that the value passed in is actually a string. - if (typeof trustedValue !== 'string') { - throw $sceMinErr('itype', - 'Attempted to trust a non-string value in a content requiring a string: Context: {0}', - type); - } - return new Constructor(trustedValue); - } - - /** - * @ngdoc method - * @name $sceDelegate#valueOf - * - * @description - * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs - * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link - * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. - * - * If the passed parameter is not a value that had been returned by {@link - * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, it must be returned as-is. - * - * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} - * call or anything else. - * @return {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs - * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns - * `value` unchanged. - */ - function valueOf(maybeTrusted) { - if (maybeTrusted instanceof trustedValueHolderBase) { - return maybeTrusted.$$unwrapTrustedValue(); - } else { - return maybeTrusted; - } - } - - /** - * @ngdoc method - * @name $sceDelegate#getTrusted - * - * @description - * Takes any input, and either returns a value that's safe to use in the specified context, or - * throws an exception. - * - * In practice, there are several cases. When given a string, this function runs checks - * and sanitization to make it safe without prior assumptions. When given the result of a {@link - * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call, it returns the originally supplied - * value if that value's context is valid for this call's context. Finally, this function can - * also throw when there is no way to turn `maybeTrusted` in a safe value (e.g., no sanitization - * is available or possible.) - * - * @param {string} type The context in which this value is to be used (such as `$sce.HTML`). - * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs - * `$sceDelegate.trustAs`} call, or anything else (which will not be considered trusted.) - * @return {*} A version of the value that's safe to use in the given context, or throws an - * exception if this is impossible. - */ - function getTrusted(type, maybeTrusted) { - if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') { - return maybeTrusted; - } - var constructor = (byType.hasOwnProperty(type) ? byType[type] : null); - // If maybeTrusted is a trusted class instance or subclass instance, then unwrap and return - // as-is. - if (constructor && maybeTrusted instanceof constructor) { - return maybeTrusted.$$unwrapTrustedValue(); - } - // Otherwise, if we get here, then we may either make it safe, or throw an exception. This - // depends on the context: some are sanitizatible (HTML), some use whitelists (RESOURCE_URL), - // some are impossible to do (JS). This step isn't implemented for CSS and URL, as AngularJS - // has no corresponding sinks. - if (type === SCE_CONTEXTS.RESOURCE_URL) { - // RESOURCE_URL uses a whitelist. - if (isResourceUrlAllowedByPolicy(maybeTrusted)) { - return maybeTrusted; - } else { - throw $sceMinErr('insecurl', - 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}', - maybeTrusted.toString()); - } - } else if (type === SCE_CONTEXTS.HTML) { - // htmlSanitizer throws its own error when no sanitizer is available. - return htmlSanitizer(maybeTrusted); - } - // Default error when the $sce service has no way to make the input safe. - throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.'); - } - - return { trustAs: trustAs, - getTrusted: getTrusted, - valueOf: valueOf }; - }]; -} - - -/** - * @ngdoc provider - * @name $sceProvider - * @this - * - * @description - * - * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service. - * - enable/disable Strict Contextual Escaping (SCE) in a module - * - override the default implementation with a custom delegate - * - * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}. - */ - -/** - * @ngdoc service - * @name $sce - * @kind function - * - * @description - * - * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS. - * - * ## Strict Contextual Escaping - * - * Strict Contextual Escaping (SCE) is a mode in which AngularJS constrains bindings to only render - * trusted values. Its goal is to assist in writing code in a way that (a) is secure by default, and - * (b) makes auditing for security vulnerabilities such as XSS, clickjacking, etc. a lot easier. - * - * ### Overview - * - * To systematically block XSS security bugs, AngularJS treats all values as untrusted by default in - * HTML or sensitive URL bindings. When binding untrusted values, AngularJS will automatically - * run security checks on them (sanitizations, whitelists, depending on context), or throw when it - * cannot guarantee the security of the result. That behavior depends strongly on contexts: HTML - * can be sanitized, but template URLs cannot, for instance. - * - * To illustrate this, consider the `ng-bind-html` directive. It renders its value directly as HTML: - * we call that the *context*. When given an untrusted input, AngularJS will attempt to sanitize it - * before rendering if a sanitizer is available, and throw otherwise. To bypass sanitization and - * render the input as-is, you will need to mark it as trusted for that context before attempting - * to bind it. - * - * As of version 1.2, AngularJS ships with SCE enabled by default. - * - * ### In practice - * - * Here's an example of a binding in a privileged context: - * - * ``` - * - *

      - * ``` - * - * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE - * disabled, this application allows the user to render arbitrary HTML into the DIV, which would - * be an XSS security bug. In a more realistic example, one may be rendering user comments, blog - * articles, etc. via bindings. (HTML is just one example of a context where rendering user - * controlled input creates security vulnerabilities.) - * - * For the case of HTML, you might use a library, either on the client side, or on the server side, - * to sanitize unsafe HTML before binding to the value and rendering it in the document. - * - * How would you ensure that every place that used these types of bindings was bound to a value that - * was sanitized by your library (or returned as safe for rendering by your server?) How can you - * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some - * properties/fields and forgot to update the binding to the sanitized value? - * - * To be secure by default, AngularJS makes sure bindings go through that sanitization, or - * any similar validation process, unless there's a good reason to trust the given value in this - * context. That trust is formalized with a function call. This means that as a developer, you - * can assume all untrusted bindings are safe. Then, to audit your code for binding security issues, - * you just need to ensure the values you mark as trusted indeed are safe - because they were - * received from your server, sanitized by your library, etc. You can organize your codebase to - * help with this - perhaps allowing only the files in a specific directory to do this. - * Ensuring that the internal API exposed by that code doesn't markup arbitrary values as safe then - * becomes a more manageable task. - * - * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs} - * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to - * build the trusted versions of your values. - * - * ### How does it work? - * - * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted - * $sce.getTrusted(context, value)} rather than to the value directly. Think of this function as - * a way to enforce the required security context in your data sink. Directives use {@link - * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs - * the {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals. Also, - * when binding without directives, AngularJS will understand the context of your bindings - * automatically. - * - * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link - * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly - * simplified): - * - * ``` - * var ngBindHtmlDirective = ['$sce', function($sce) { - * return function(scope, element, attr) { - * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) { - * element.html(value || ''); - * }); - * }; - * }]; - * ``` - * - * ### Impact on loading templates - * - * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as - * `templateUrl`'s specified by {@link guide/directive directives}. - * - * By default, AngularJS only loads templates from the same domain and protocol as the application - * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl - * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or - * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist - * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value. - * - * *Please note*: - * The browser's - * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) - * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) - * policy apply in addition to this and may further restrict whether the template is successfully - * loaded. This means that without the right CORS policy, loading templates from a different domain - * won't work on all browsers. Also, loading templates from `file://` URL does not work on some - * browsers. - * - * ### This feels like too much overhead - * - * It's important to remember that SCE only applies to interpolation expressions. - * - * If your expressions are constant literals, they're automatically trusted and you don't need to - * call `$sce.trustAs` on them (e.g. - * `
      `) just works. The `$sceDelegate` will - * also use the `$sanitize` service if it is available when binding untrusted values to - * `$sce.HTML` context. AngularJS provides an implementation in `angular-sanitize.js`, and if you - * wish to use it, you will also need to depend on the {@link ngSanitize `ngSanitize`} module in - * your application. - * - * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load - * templates in `ng-include` from your application's domain without having to even know about SCE. - * It blocks loading templates from other domains or loading templates over http from an https - * served document. You can change these by setting your own custom {@link - * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link - * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs. - * - * This significantly reduces the overhead. It is far easier to pay the small overhead and have an - * application that's secure and can be audited to verify that with much more ease than bolting - * security onto an application later. - * - * - * ### What trusted context types are supported? - * - * | Context | Notes | - * |---------------------|----------------| - * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered, and the {@link ngSanitize.$sanitize $sanitize} service is available (implemented by the {@link ngSanitize ngSanitize} module) this will sanitize the value instead of throwing an error. | - * | `$sce.CSS` | For CSS that's safe to source into the application. Currently, no bindings require this context. Feel free to use it in your own directives. | - * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`
      Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does (it's not just the URL that matters, but also what is at the end of it), and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. | - * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently, no bindings require this context. Feel free to use it in your own directives. | - * - * - * Be aware that `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them - * through {@link ng.$sce#getTrusted $sce.getTrusted}. There's no CSS-, URL-, or JS-context bindings - * in AngularJS currently, so their corresponding `$sce.trustAs` functions aren't useful yet. This - * might evolve. - * - * ### Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist}
      - * - * Each element in these arrays must be one of the following: - * - * - **'self'** - * - The special **string**, `'self'`, can be used to match against all URLs of the **same - * domain** as the application document using the **same protocol**. - * - **String** (except the special value `'self'`) - * - The string is matched against the full *normalized / absolute URL* of the resource - * being tested (substring matches are not good enough.) - * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters - * match themselves. - * - `*`: matches zero or more occurrences of any character other than one of the following 6 - * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use - * in a whitelist. - * - `**`: matches zero or more occurrences of *any* character. As such, it's not - * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g. - * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might - * not have been the intention.) Its usage at the very end of the path is ok. (e.g. - * http://foo.example.com/templates/**). - * - **RegExp** (*see caveat below*) - * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax - * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to - * accidentally introduce a bug when one updates a complex expression (imho, all regexes should - * have good test coverage). For instance, the use of `.` in the regex is correct only in a - * small number of cases. A `.` character in the regex used when matching the scheme or a - * subdomain could be matched against a `:` or literal `.` that was likely not intended. It - * is highly recommended to use the string patterns and only fall back to regular expressions - * as a last resort. - * - The regular expression must be an instance of RegExp (i.e. not a string.) It is - * matched against the **entire** *normalized / absolute URL* of the resource being tested - * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags - * present on the RegExp (such as multiline, global, ignoreCase) are ignored. - * - If you are generating your JavaScript from some other templating engine (not - * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)), - * remember to escape your regular expression (and be aware that you might need more than - * one level of escaping depending on your templating engine and the way you interpolated - * the value.) Do make use of your platform's escaping mechanism as it might be good - * enough before coding your own. E.g. Ruby has - * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape) - * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape). - * Javascript lacks a similar built in function for escaping. Take a look at Google - * Closure library's [goog.string.regExpEscape(s)]( - * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962). - * - * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example. - * - * ### Show me an example using SCE. - * - * - * - *
      - *

      - * User comments
      - * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when - * $sanitize is available. If $sanitize isn't available, this results in an error instead of an - * exploit. - *
      - *
      - * {{userComment.name}}: - * - *
      - *
      - *
      - *
      - *
      - * - * - * angular.module('mySceApp', ['ngSanitize']) - * .controller('AppController', ['$http', '$templateCache', '$sce', - * function AppController($http, $templateCache, $sce) { - * var self = this; - * $http.get('test_data.json', {cache: $templateCache}).then(function(response) { - * self.userComments = response.data; - * }); - * self.explicitlyTrustedHtml = $sce.trustAsHtml( - * 'Hover over this text.'); - * }]); - * - * - * - * [ - * { "name": "Alice", - * "htmlComment": - * "Is anyone reading this?" - * }, - * { "name": "Bob", - * "htmlComment": "Yes! Am I the only other one?" - * } - * ] - * - * - * - * describe('SCE doc demo', function() { - * it('should sanitize untrusted values', function() { - * expect(element.all(by.css('.htmlComment')).first().getAttribute('innerHTML')) - * .toBe('Is anyone reading this?'); - * }); - * - * it('should NOT sanitize explicitly trusted values', function() { - * expect(element(by.id('explicitlyTrustedHtml')).getAttribute('innerHTML')).toBe( - * 'Hover over this text.'); - * }); - * }); - * - *
      - * - * - * - * ## Can I disable SCE completely? - * - * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits - * for little coding overhead. It will be much harder to take an SCE disabled application and - * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE - * for cases where you have a lot of existing code that was written before SCE was introduced and - * you're migrating them a module at a time. Also do note that this is an app-wide setting, so if - * you are writing a library, you will cause security bugs applications using it. - * - * That said, here's how you can completely disable SCE: - * - * ``` - * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) { - * // Completely disable SCE. For demonstration purposes only! - * // Do not use in new projects or libraries. - * $sceProvider.enabled(false); - * }); - * ``` - * - */ - -function $SceProvider() { - var enabled = true; - - /** - * @ngdoc method - * @name $sceProvider#enabled - * @kind function - * - * @param {boolean=} value If provided, then enables/disables SCE application-wide. - * @return {boolean} True if SCE is enabled, false otherwise. - * - * @description - * Enables/disables SCE and returns the current value. - */ - this.enabled = function(value) { - if (arguments.length) { - enabled = !!value; - } - return enabled; - }; - - - /* Design notes on the default implementation for SCE. - * - * The API contract for the SCE delegate - * ------------------------------------- - * The SCE delegate object must provide the following 3 methods: - * - * - trustAs(contextEnum, value) - * This method is used to tell the SCE service that the provided value is OK to use in the - * contexts specified by contextEnum. It must return an object that will be accepted by - * getTrusted() for a compatible contextEnum and return this value. - * - * - valueOf(value) - * For values that were not produced by trustAs(), return them as is. For values that were - * produced by trustAs(), return the corresponding input value to trustAs. Basically, if - * trustAs is wrapping the given values into some type, this operation unwraps it when given - * such a value. - * - * - getTrusted(contextEnum, value) - * This function should return the a value that is safe to use in the context specified by - * contextEnum or throw and exception otherwise. - * - * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be - * opaque or wrapped in some holder object. That happens to be an implementation detail. For - * instance, an implementation could maintain a registry of all trusted objects by context. In - * such a case, trustAs() would return the same object that was passed in. getTrusted() would - * return the same object passed in if it was found in the registry under a compatible context or - * throw an exception otherwise. An implementation might only wrap values some of the time based - * on some criteria. getTrusted() might return a value and not throw an exception for special - * constants or objects even if not wrapped. All such implementations fulfill this contract. - * - * - * A note on the inheritance model for SCE contexts - * ------------------------------------------------ - * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This - * is purely an implementation details. - * - * The contract is simply this: - * - * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value) - * will also succeed. - * - * Inheritance happens to capture this in a natural way. In some future, we may not use - * inheritance anymore. That is OK because no code outside of sce.js and sceSpecs.js would need to - * be aware of this detail. - */ - - this.$get = ['$parse', '$sceDelegate', function( - $parse, $sceDelegate) { - // Support: IE 9-11 only - // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow - // the "expression(javascript expression)" syntax which is insecure. - if (enabled && msie < 8) { - throw $sceMinErr('iequirks', - 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' + - 'mode. You can fix this by adding the text to the top of your HTML ' + - 'document. See http://docs.angularjs.org/api/ng.$sce for more information.'); - } - - var sce = shallowCopy(SCE_CONTEXTS); - - /** - * @ngdoc method - * @name $sce#isEnabled - * @kind function - * - * @return {Boolean} True if SCE is enabled, false otherwise. If you want to set the value, you - * have to do it at module config time on {@link ng.$sceProvider $sceProvider}. - * - * @description - * Returns a boolean indicating if SCE is enabled. - */ - sce.isEnabled = function() { - return enabled; - }; - sce.trustAs = $sceDelegate.trustAs; - sce.getTrusted = $sceDelegate.getTrusted; - sce.valueOf = $sceDelegate.valueOf; - - if (!enabled) { - sce.trustAs = sce.getTrusted = function(type, value) { return value; }; - sce.valueOf = identity; - } - - /** - * @ngdoc method - * @name $sce#parseAs - * - * @description - * Converts AngularJS {@link guide/expression expression} into a function. This is like {@link - * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it - * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*, - * *result*)} - * - * @param {string} type The SCE context in which this result will be used. - * @param {string} expression String expression to compile. - * @return {function(context, locals)} A function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the - * strings are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values - * in `context`. - */ - sce.parseAs = function sceParseAs(type, expr) { - var parsed = $parse(expr); - if (parsed.literal && parsed.constant) { - return parsed; - } else { - return $parse(expr, function(value) { - return sce.getTrusted(type, value); - }); - } - }; - - /** - * @ngdoc method - * @name $sce#trustAs - * - * @description - * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, returns a - * wrapped object that represents your value, and the trust you have in its safety for the given - * context. AngularJS can then use that value as-is in bindings of the specified secure context. - * This is used in bindings for `ng-bind-html`, `ng-include`, and most `src` attribute - * interpolations. See {@link ng.$sce $sce} for strict contextual escaping. - * - * @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`, - * `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`. - * - * @param {*} value The value that that should be considered trusted. - * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` - * in the context you specified. - */ - - /** - * @ngdoc method - * @name $sce#trustAsHtml - * - * @description - * Shorthand method. `$sce.trustAsHtml(value)` → - * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`} - * - * @param {*} value The value to mark as trusted for `$sce.HTML` context. - * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` - * in `$sce.HTML` context (like `ng-bind-html`). - */ - - /** - * @ngdoc method - * @name $sce#trustAsCss - * - * @description - * Shorthand method. `$sce.trustAsCss(value)` → - * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.CSS, value)`} - * - * @param {*} value The value to mark as trusted for `$sce.CSS` context. - * @return {*} A wrapped version of value that can be used as a trusted variant - * of your `value` in `$sce.CSS` context. This context is currently unused, so there are - * almost no reasons to use this function so far. - */ - - /** - * @ngdoc method - * @name $sce#trustAsUrl - * - * @description - * Shorthand method. `$sce.trustAsUrl(value)` → - * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`} - * - * @param {*} value The value to mark as trusted for `$sce.URL` context. - * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` - * in `$sce.URL` context. That context is currently unused, so there are almost no reasons - * to use this function so far. - */ - - /** - * @ngdoc method - * @name $sce#trustAsResourceUrl - * - * @description - * Shorthand method. `$sce.trustAsResourceUrl(value)` → - * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`} - * - * @param {*} value The value to mark as trusted for `$sce.RESOURCE_URL` context. - * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` - * in `$sce.RESOURCE_URL` context (template URLs in `ng-include`, most `src` attribute - * bindings, ...) - */ - - /** - * @ngdoc method - * @name $sce#trustAsJs - * - * @description - * Shorthand method. `$sce.trustAsJs(value)` → - * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`} - * - * @param {*} value The value to mark as trusted for `$sce.JS` context. - * @return {*} A wrapped version of value that can be used as a trusted variant of your `value` - * in `$sce.JS` context. That context is currently unused, so there are almost no reasons to - * use this function so far. - */ - - /** - * @ngdoc method - * @name $sce#getTrusted - * - * @description - * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such, - * takes any input, and either returns a value that's safe to use in the specified context, - * or throws an exception. This function is aware of trusted values created by the `trustAs` - * function and its shorthands, and when contexts are appropriate, returns the unwrapped value - * as-is. Finally, this function can also throw when there is no way to turn `maybeTrusted` in a - * safe value (e.g., no sanitization is available or possible.) - * - * @param {string} type The context in which this value is to be used. - * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs - * `$sce.trustAs`} call, or anything else (which will not be considered trusted.) - * @return {*} A version of the value that's safe to use in the given context, or throws an - * exception if this is impossible. - */ - - /** - * @ngdoc method - * @name $sce#getTrustedHtml - * - * @description - * Shorthand method. `$sce.getTrustedHtml(value)` → - * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`} - * - * @param {*} value The value to pass to `$sce.getTrusted`. - * @return {*} The return value of `$sce.getTrusted($sce.HTML, value)` - */ - - /** - * @ngdoc method - * @name $sce#getTrustedCss - * - * @description - * Shorthand method. `$sce.getTrustedCss(value)` → - * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`} - * - * @param {*} value The value to pass to `$sce.getTrusted`. - * @return {*} The return value of `$sce.getTrusted($sce.CSS, value)` - */ - - /** - * @ngdoc method - * @name $sce#getTrustedUrl - * - * @description - * Shorthand method. `$sce.getTrustedUrl(value)` → - * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`} - * - * @param {*} value The value to pass to `$sce.getTrusted`. - * @return {*} The return value of `$sce.getTrusted($sce.URL, value)` - */ - - /** - * @ngdoc method - * @name $sce#getTrustedResourceUrl - * - * @description - * Shorthand method. `$sce.getTrustedResourceUrl(value)` → - * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`} - * - * @param {*} value The value to pass to `$sceDelegate.getTrusted`. - * @return {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)` - */ - - /** - * @ngdoc method - * @name $sce#getTrustedJs - * - * @description - * Shorthand method. `$sce.getTrustedJs(value)` → - * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`} - * - * @param {*} value The value to pass to `$sce.getTrusted`. - * @return {*} The return value of `$sce.getTrusted($sce.JS, value)` - */ - - /** - * @ngdoc method - * @name $sce#parseAsHtml - * - * @description - * Shorthand method. `$sce.parseAsHtml(expression string)` → - * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`} - * - * @param {string} expression String expression to compile. - * @return {function(context, locals)} A function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the - * strings are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values - * in `context`. - */ - - /** - * @ngdoc method - * @name $sce#parseAsCss - * - * @description - * Shorthand method. `$sce.parseAsCss(value)` → - * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`} - * - * @param {string} expression String expression to compile. - * @return {function(context, locals)} A function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the - * strings are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values - * in `context`. - */ - - /** - * @ngdoc method - * @name $sce#parseAsUrl - * - * @description - * Shorthand method. `$sce.parseAsUrl(value)` → - * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`} - * - * @param {string} expression String expression to compile. - * @return {function(context, locals)} A function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the - * strings are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values - * in `context`. - */ - - /** - * @ngdoc method - * @name $sce#parseAsResourceUrl - * - * @description - * Shorthand method. `$sce.parseAsResourceUrl(value)` → - * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`} - * - * @param {string} expression String expression to compile. - * @return {function(context, locals)} A function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the - * strings are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values - * in `context`. - */ - - /** - * @ngdoc method - * @name $sce#parseAsJs - * - * @description - * Shorthand method. `$sce.parseAsJs(value)` → - * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`} - * - * @param {string} expression String expression to compile. - * @return {function(context, locals)} A function which represents the compiled expression: - * - * * `context` – `{object}` – an object against which any expressions embedded in the - * strings are evaluated against (typically a scope object). - * * `locals` – `{object=}` – local variables context object, useful for overriding values - * in `context`. - */ - - // Shorthand delegations. - var parse = sce.parseAs, - getTrusted = sce.getTrusted, - trustAs = sce.trustAs; - - forEach(SCE_CONTEXTS, function(enumValue, name) { - var lName = lowercase(name); - sce[snakeToCamel('parse_as_' + lName)] = function(expr) { - return parse(enumValue, expr); - }; - sce[snakeToCamel('get_trusted_' + lName)] = function(value) { - return getTrusted(enumValue, value); - }; - sce[snakeToCamel('trust_as_' + lName)] = function(value) { - return trustAs(enumValue, value); - }; - }); - - return sce; - }]; -} - -/* exported $SnifferProvider */ - -/** - * !!! This is an undocumented "private" service !!! - * - * @name $sniffer - * @requires $window - * @requires $document - * @this - * - * @property {boolean} history Does the browser support html5 history api ? - * @property {boolean} transitions Does the browser support CSS transition events ? - * @property {boolean} animations Does the browser support CSS animation events ? - * - * @description - * This is very simple implementation of testing browser's features. - */ -function $SnifferProvider() { - this.$get = ['$window', '$document', function($window, $document) { - var eventSupport = {}, - // Chrome Packaged Apps are not allowed to access `history.pushState`. - // If not sandboxed, they can be detected by the presence of `chrome.app.runtime` - // (see https://developer.chrome.com/apps/api_index). If sandboxed, they can be detected by - // the presence of an extension runtime ID and the absence of other Chrome runtime APIs - // (see https://developer.chrome.com/apps/manifest/sandbox). - // (NW.js apps have access to Chrome APIs, but do support `history`.) - isNw = $window.nw && $window.nw.process, - isChromePackagedApp = - !isNw && - $window.chrome && - ($window.chrome.app && $window.chrome.app.runtime || - !$window.chrome.app && $window.chrome.runtime && $window.chrome.runtime.id), - hasHistoryPushState = !isChromePackagedApp && $window.history && $window.history.pushState, - android = - toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]), - boxee = /Boxee/i.test(($window.navigator || {}).userAgent), - document = $document[0] || {}, - bodyStyle = document.body && document.body.style, - transitions = false, - animations = false; - - if (bodyStyle) { - // Support: Android <5, Blackberry Browser 10, default Chrome in Android 4.4.x - // Mentioned browsers need a -webkit- prefix for transitions & animations. - transitions = !!('transition' in bodyStyle || 'webkitTransition' in bodyStyle); - animations = !!('animation' in bodyStyle || 'webkitAnimation' in bodyStyle); - } - - - return { - // Android has history.pushState, but it does not update location correctly - // so let's not use the history API at all. - // http://code.google.com/p/android/issues/detail?id=17471 - // https://github.com/angular/angular.js/issues/904 - - // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has - // so let's not use the history API also - // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined - history: !!(hasHistoryPushState && !(android < 4) && !boxee), - hasEvent: function(event) { - // Support: IE 9-11 only - // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have - // it. In particular the event is not fired when backspace or delete key are pressed or - // when cut operation is performed. - // IE10+ implements 'input' event but it erroneously fires under various situations, - // e.g. when placeholder changes, or a form is focused. - if (event === 'input' && msie) return false; - - if (isUndefined(eventSupport[event])) { - var divElm = document.createElement('div'); - eventSupport[event] = 'on' + event in divElm; - } - - return eventSupport[event]; - }, - csp: csp(), - transitions: transitions, - animations: animations, - android: android - }; - }]; -} - -var $templateRequestMinErr = minErr('$compile'); - -/** - * @ngdoc provider - * @name $templateRequestProvider - * @this - * - * @description - * Used to configure the options passed to the {@link $http} service when making a template request. - * - * For example, it can be used for specifying the "Accept" header that is sent to the server, when - * requesting a template. - */ -function $TemplateRequestProvider() { - - var httpOptions; - - /** - * @ngdoc method - * @name $templateRequestProvider#httpOptions - * @description - * The options to be passed to the {@link $http} service when making the request. - * You can use this to override options such as the "Accept" header for template requests. - * - * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the - * options if not overridden here. - * - * @param {string=} value new value for the {@link $http} options. - * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter. - */ - this.httpOptions = function(val) { - if (val) { - httpOptions = val; - return this; - } - return httpOptions; - }; - - /** - * @ngdoc service - * @name $templateRequest - * - * @description - * The `$templateRequest` service runs security checks then downloads the provided template using - * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request - * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the - * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the - * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted - * when `tpl` is of type string and `$templateCache` has the matching entry. - * - * If you want to pass custom options to the `$http` service, such as setting the Accept header you - * can configure this via {@link $templateRequestProvider#httpOptions}. - * - * `$templateRequest` is used internally by {@link $compile}, {@link ngRoute.$route}, and directives such - * as {@link ngInclude} to download and cache templates. - * - * 3rd party modules should use `$templateRequest` if their services or directives are loading - * templates. - * - * @param {string|TrustedResourceUrl} tpl The HTTP request template URL - * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty - * - * @return {Promise} a promise for the HTTP response data of the given URL. - * - * @property {number} totalPendingRequests total amount of pending template requests being downloaded. - */ - this.$get = ['$exceptionHandler', '$templateCache', '$http', '$q', '$sce', - function($exceptionHandler, $templateCache, $http, $q, $sce) { - - function handleRequestFn(tpl, ignoreRequestError) { - handleRequestFn.totalPendingRequests++; - - // We consider the template cache holds only trusted templates, so - // there's no need to go through whitelisting again for keys that already - // are included in there. This also makes AngularJS accept any script - // directive, no matter its name. However, we still need to unwrap trusted - // types. - if (!isString(tpl) || isUndefined($templateCache.get(tpl))) { - tpl = $sce.getTrustedResourceUrl(tpl); - } - - var transformResponse = $http.defaults && $http.defaults.transformResponse; - - if (isArray(transformResponse)) { - transformResponse = transformResponse.filter(function(transformer) { - return transformer !== defaultHttpResponseTransform; - }); - } else if (transformResponse === defaultHttpResponseTransform) { - transformResponse = null; - } - - return $http.get(tpl, extend({ - cache: $templateCache, - transformResponse: transformResponse - }, httpOptions)) - .finally(function() { - handleRequestFn.totalPendingRequests--; - }) - .then(function(response) { - $templateCache.put(tpl, response.data); - return response.data; - }, handleError); - - function handleError(resp) { - if (!ignoreRequestError) { - resp = $templateRequestMinErr('tpload', - 'Failed to load template: {0} (HTTP status: {1} {2})', - tpl, resp.status, resp.statusText); - - $exceptionHandler(resp); - } - - return $q.reject(resp); - } - } - - handleRequestFn.totalPendingRequests = 0; - - return handleRequestFn; - } - ]; -} - -/** @this */ -function $$TestabilityProvider() { - this.$get = ['$rootScope', '$browser', '$location', - function($rootScope, $browser, $location) { - - /** - * @name $testability - * - * @description - * The private $$testability service provides a collection of methods for use when debugging - * or by automated test and debugging tools. - */ - var testability = {}; - - /** - * @name $$testability#findBindings - * - * @description - * Returns an array of elements that are bound (via ng-bind or {{}}) - * to expressions matching the input. - * - * @param {Element} element The element root to search from. - * @param {string} expression The binding expression to match. - * @param {boolean} opt_exactMatch If true, only returns exact matches - * for the expression. Filters and whitespace are ignored. - */ - testability.findBindings = function(element, expression, opt_exactMatch) { - var bindings = element.getElementsByClassName('ng-binding'); - var matches = []; - forEach(bindings, function(binding) { - var dataBinding = angular.element(binding).data('$binding'); - if (dataBinding) { - forEach(dataBinding, function(bindingName) { - if (opt_exactMatch) { - var matcher = new RegExp('(^|\\s)' + escapeForRegexp(expression) + '(\\s|\\||$)'); - if (matcher.test(bindingName)) { - matches.push(binding); - } - } else { - if (bindingName.indexOf(expression) !== -1) { - matches.push(binding); - } - } - }); - } - }); - return matches; - }; - - /** - * @name $$testability#findModels - * - * @description - * Returns an array of elements that are two-way found via ng-model to - * expressions matching the input. - * - * @param {Element} element The element root to search from. - * @param {string} expression The model expression to match. - * @param {boolean} opt_exactMatch If true, only returns exact matches - * for the expression. - */ - testability.findModels = function(element, expression, opt_exactMatch) { - var prefixes = ['ng-', 'data-ng-', 'ng\\:']; - for (var p = 0; p < prefixes.length; ++p) { - var attributeEquals = opt_exactMatch ? '=' : '*='; - var selector = '[' + prefixes[p] + 'model' + attributeEquals + '"' + expression + '"]'; - var elements = element.querySelectorAll(selector); - if (elements.length) { - return elements; - } - } - }; - - /** - * @name $$testability#getLocation - * - * @description - * Shortcut for getting the location in a browser agnostic way. Returns - * the path, search, and hash. (e.g. /path?a=b#hash) - */ - testability.getLocation = function() { - return $location.url(); - }; - - /** - * @name $$testability#setLocation - * - * @description - * Shortcut for navigating to a location without doing a full page reload. - * - * @param {string} url The location url (path, search and hash, - * e.g. /path?a=b#hash) to go to. - */ - testability.setLocation = function(url) { - if (url !== $location.url()) { - $location.url(url); - $rootScope.$digest(); - } - }; - - /** - * @name $$testability#whenStable - * - * @description - * Calls the callback when $timeout and $http requests are completed. - * - * @param {function} callback - */ - testability.whenStable = function(callback) { - $browser.notifyWhenNoOutstandingRequests(callback); - }; - - return testability; - }]; -} - -/** @this */ -function $TimeoutProvider() { - this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler', - function($rootScope, $browser, $q, $$q, $exceptionHandler) { - - var deferreds = {}; - - - /** - * @ngdoc service - * @name $timeout - * - * @description - * AngularJS's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch - * block and delegates any exceptions to - * {@link ng.$exceptionHandler $exceptionHandler} service. - * - * The return value of calling `$timeout` is a promise, which will be resolved when - * the delay has passed and the timeout function, if provided, is executed. - * - * To cancel a timeout request, call `$timeout.cancel(promise)`. - * - * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to - * synchronously flush the queue of deferred functions. - * - * If you only want a promise that will be resolved after some specified delay - * then you can call `$timeout` without the `fn` function. - * - * @param {function()=} fn A function, whose execution should be delayed. - * @param {number=} [delay=0] Delay in milliseconds. - * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise - * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block. - * @param {...*=} Pass additional parameters to the executed function. - * @returns {Promise} Promise that will be resolved when the timeout is reached. The promise - * will be resolved with the return value of the `fn` function. - * - */ - function timeout(fn, delay, invokeApply) { - if (!isFunction(fn)) { - invokeApply = delay; - delay = fn; - fn = noop; - } - - var args = sliceArgs(arguments, 3), - skipApply = (isDefined(invokeApply) && !invokeApply), - deferred = (skipApply ? $$q : $q).defer(), - promise = deferred.promise, - timeoutId; - - timeoutId = $browser.defer(function() { - try { - deferred.resolve(fn.apply(null, args)); - } catch (e) { - deferred.reject(e); - $exceptionHandler(e); - } finally { - delete deferreds[promise.$$timeoutId]; - } - - if (!skipApply) $rootScope.$apply(); - }, delay); - - promise.$$timeoutId = timeoutId; - deferreds[timeoutId] = deferred; - - return promise; - } - - - /** - * @ngdoc method - * @name $timeout#cancel - * - * @description - * Cancels a task associated with the `promise`. As a result of this, the promise will be - * resolved with a rejection. - * - * @param {Promise=} promise Promise returned by the `$timeout` function. - * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully - * canceled. - */ - timeout.cancel = function(promise) { - if (promise && promise.$$timeoutId in deferreds) { - // Timeout cancels should not report an unhandled promise. - markQExceptionHandled(deferreds[promise.$$timeoutId].promise); - deferreds[promise.$$timeoutId].reject('canceled'); - delete deferreds[promise.$$timeoutId]; - return $browser.defer.cancel(promise.$$timeoutId); - } - return false; - }; - - return timeout; - }]; -} - -// NOTE: The usage of window and document instead of $window and $document here is -// deliberate. This service depends on the specific behavior of anchor nodes created by the -// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and -// cause us to break tests. In addition, when the browser resolves a URL for XHR, it -// doesn't know about mocked locations and resolves URLs to the real document - which is -// exactly the behavior needed here. There is little value is mocking these out for this -// service. -var urlParsingNode = window.document.createElement('a'); -var originUrl = urlResolve(window.location.href); - - -/** - * - * Implementation Notes for non-IE browsers - * ---------------------------------------- - * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM, - * results both in the normalizing and parsing of the URL. Normalizing means that a relative - * URL will be resolved into an absolute URL in the context of the application document. - * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related - * properties are all populated to reflect the normalized URL. This approach has wide - * compatibility - Safari 1+, Mozilla 1+ etc. See - * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html - * - * Implementation Notes for IE - * --------------------------- - * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other - * browsers. However, the parsed components will not be set if the URL assigned did not specify - * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We - * work around that by performing the parsing in a 2nd step by taking a previously normalized - * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the - * properties such as protocol, hostname, port, etc. - * - * References: - * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement - * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html - * http://url.spec.whatwg.org/#urlutils - * https://github.com/angular/angular.js/pull/2902 - * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/ - * - * @kind function - * @param {string} url The URL to be parsed. - * @description Normalizes and parses a URL. - * @returns {object} Returns the normalized URL as a dictionary. - * - * | member name | Description | - * |---------------|----------------| - * | href | A normalized version of the provided URL if it was not an absolute URL | - * | protocol | The protocol including the trailing colon | - * | host | The host and port (if the port is non-default) of the normalizedUrl | - * | search | The search params, minus the question mark | - * | hash | The hash string, minus the hash symbol - * | hostname | The hostname - * | port | The port, without ":" - * | pathname | The pathname, beginning with "/" - * - */ -function urlResolve(url) { - var href = url; - - // Support: IE 9-11 only - if (msie) { - // Normalize before parse. Refer Implementation Notes on why this is - // done in two steps on IE. - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') - ? urlParsingNode.pathname - : '/' + urlParsingNode.pathname - }; -} - -/** - * Parse a request URL and determine whether this is a same-origin request as the application document. - * - * @param {string|object} requestUrl The url of the request as a string that will be resolved - * or a parsed URL object. - * @returns {boolean} Whether the request is for the same origin as the application document. - */ -function urlIsSameOrigin(requestUrl) { - var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; - return (parsed.protocol === originUrl.protocol && - parsed.host === originUrl.host); -} - -/** - * @ngdoc service - * @name $window - * @this - * - * @description - * A reference to the browser's `window` object. While `window` - * is globally available in JavaScript, it causes testability problems, because - * it is a global variable. In AngularJS we always refer to it through the - * `$window` service, so it may be overridden, removed or mocked for testing. - * - * Expressions, like the one defined for the `ngClick` directive in the example - * below, are evaluated with respect to the current scope. Therefore, there is - * no risk of inadvertently coding in a dependency on a global value in such an - * expression. - * - * @example - - - -
      - - -
      -
      - - it('should display the greeting in the input box', function() { - element(by.model('greeting')).sendKeys('Hello, E2E Tests'); - // If we click the button it will block the test runner - // element(':button').click(); - }); - -
      - */ -function $WindowProvider() { - this.$get = valueFn(window); -} - -/** - * @name $$cookieReader - * @requires $document - * - * @description - * This is a private service for reading cookies used by $http and ngCookies - * - * @return {Object} a key/value map of the current cookies - */ -function $$CookieReader($document) { - var rawDocument = $document[0] || {}; - var lastCookies = {}; - var lastCookieString = ''; - - function safeGetCookie(rawDocument) { - try { - return rawDocument.cookie || ''; - } catch (e) { - return ''; - } - } - - function safeDecodeURIComponent(str) { - try { - return decodeURIComponent(str); - } catch (e) { - return str; - } - } - - return function() { - var cookieArray, cookie, i, index, name; - var currentCookieString = safeGetCookie(rawDocument); - - if (currentCookieString !== lastCookieString) { - lastCookieString = currentCookieString; - cookieArray = lastCookieString.split('; '); - lastCookies = {}; - - for (i = 0; i < cookieArray.length; i++) { - cookie = cookieArray[i]; - index = cookie.indexOf('='); - if (index > 0) { //ignore nameless cookies - name = safeDecodeURIComponent(cookie.substring(0, index)); - // the first value that is seen for a cookie is the most - // specific one. values for the same cookie name that - // follow are for less specific paths. - if (isUndefined(lastCookies[name])) { - lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1)); - } - } - } - } - return lastCookies; - }; -} - -$$CookieReader.$inject = ['$document']; - -/** @this */ -function $$CookieReaderProvider() { - this.$get = $$CookieReader; -} - -/* global currencyFilter: true, - dateFilter: true, - filterFilter: true, - jsonFilter: true, - limitToFilter: true, - lowercaseFilter: true, - numberFilter: true, - orderByFilter: true, - uppercaseFilter: true, - */ - -/** - * @ngdoc provider - * @name $filterProvider - * @description - * - * Filters are just functions which transform input to an output. However filters need to be - * Dependency Injected. To achieve this a filter definition consists of a factory function which is - * annotated with dependencies and is responsible for creating a filter function. - * - *
      - * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`. - * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace - * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores - * (`myapp_subsection_filterx`). - *
      - * - * ```js - * // Filter registration - * function MyModule($provide, $filterProvider) { - * // create a service to demonstrate injection (not always needed) - * $provide.value('greet', function(name){ - * return 'Hello ' + name + '!'; - * }); - * - * // register a filter factory which uses the - * // greet service to demonstrate DI. - * $filterProvider.register('greet', function(greet){ - * // return the filter function which uses the greet service - * // to generate salutation - * return function(text) { - * // filters need to be forgiving so check input validity - * return text && greet(text) || text; - * }; - * }); - * } - * ``` - * - * The filter function is registered with the `$injector` under the filter name suffix with - * `Filter`. - * - * ```js - * it('should be the same instance', inject( - * function($filterProvider) { - * $filterProvider.register('reverse', function(){ - * return ...; - * }); - * }, - * function($filter, reverseFilter) { - * expect($filter('reverse')).toBe(reverseFilter); - * }); - * ``` - * - * - * For more information about how AngularJS filters work, and how to create your own filters, see - * {@link guide/filter Filters} in the AngularJS Developer Guide. - */ - -/** - * @ngdoc service - * @name $filter - * @kind function - * @description - * Filters are used for formatting data displayed to the user. - * - * They can be used in view templates, controllers or services. AngularJS comes - * with a collection of [built-in filters](api/ng/filter), but it is easy to - * define your own as well. - * - * The general syntax in templates is as follows: - * - * ```html - * {{ expression [| filter_name[:parameter_value] ... ] }} - * ``` - * - * @param {String} name Name of the filter function to retrieve - * @return {Function} the filter function - * @example - - -
      -

      {{ originalText }}

      -

      {{ filteredText }}

      -
      -
      - - - angular.module('filterExample', []) - .controller('MainCtrl', function($scope, $filter) { - $scope.originalText = 'hello'; - $scope.filteredText = $filter('uppercase')($scope.originalText); - }); - -
      - */ -$FilterProvider.$inject = ['$provide']; -/** @this */ -function $FilterProvider($provide) { - var suffix = 'Filter'; - - /** - * @ngdoc method - * @name $filterProvider#register - * @param {string|Object} name Name of the filter function, or an object map of filters where - * the keys are the filter names and the values are the filter factories. - * - *
      - * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`. - * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace - * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores - * (`myapp_subsection_filterx`). - *
      - * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered. - * @returns {Object} Registered filter instance, or if a map of filters was provided then a map - * of the registered filter instances. - */ - function register(name, factory) { - if (isObject(name)) { - var filters = {}; - forEach(name, function(filter, key) { - filters[key] = register(key, filter); - }); - return filters; - } else { - return $provide.factory(name + suffix, factory); - } - } - this.register = register; - - this.$get = ['$injector', function($injector) { - return function(name) { - return $injector.get(name + suffix); - }; - }]; - - //////////////////////////////////////// - - /* global - currencyFilter: false, - dateFilter: false, - filterFilter: false, - jsonFilter: false, - limitToFilter: false, - lowercaseFilter: false, - numberFilter: false, - orderByFilter: false, - uppercaseFilter: false - */ - - register('currency', currencyFilter); - register('date', dateFilter); - register('filter', filterFilter); - register('json', jsonFilter); - register('limitTo', limitToFilter); - register('lowercase', lowercaseFilter); - register('number', numberFilter); - register('orderBy', orderByFilter); - register('uppercase', uppercaseFilter); -} - -/** - * @ngdoc filter - * @name filter - * @kind function - * - * @description - * Selects a subset of items from `array` and returns it as a new array. - * - * @param {Array} array The source array. - *
      - * **Note**: If the array contains objects that reference themselves, filtering is not possible. - *
      - * @param {string|Object|function()} expression The predicate to be used for selecting items from - * `array`. - * - * Can be one of: - * - * - `string`: The string is used for matching against the contents of the `array`. All strings or - * objects with string properties in `array` that match this string will be returned. This also - * applies to nested object properties. - * The predicate can be negated by prefixing the string with `!`. - * - * - `Object`: A pattern object can be used to filter specific properties on objects contained - * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items - * which have property `name` containing "M" and property `phone` containing "1". A special - * property name (`$` by default) can be used (e.g. as in `{$: "text"}`) to accept a match - * against any property of the object or its nested object properties. That's equivalent to the - * simple substring match with a `string` as described above. The special property name can be - * overwritten, using the `anyPropertyKey` parameter. - * The predicate can be negated by prefixing the string with `!`. - * For example `{name: "!M"}` predicate will return an array of items which have property `name` - * not containing "M". - * - * Note that a named property will match properties on the same level only, while the special - * `$` property will match properties on the same level or deeper. E.g. an array item like - * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but - * **will** be matched by `{$: 'John'}`. - * - * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters. - * The function is called for each element of the array, with the element, its index, and - * the entire array itself as arguments. - * - * The final result is an array of those elements that the predicate returned true for. - * - * @param {function(actual, expected)|true|false} [comparator] Comparator which is used in - * determining if values retrieved using `expression` (when it is not a function) should be - * considered a match based on the expected value (from the filter expression) and actual - * value (from the object in the array). - * - * Can be one of: - * - * - `function(actual, expected)`: - * The function will be given the object value and the predicate value to compare and - * should return true if both values should be considered equal. - * - * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`. - * This is essentially strict comparison of expected and actual. - * - * - `false`: A short hand for a function which will look for a substring match in a case - * insensitive way. Primitive values are converted to strings. Objects are not compared against - * primitives, unless they have a custom `toString` method (e.g. `Date` objects). - * - * - * Defaults to `false`. - * - * @param {string} [anyPropertyKey] The special property name that matches against any property. - * By default `$`. - * - * @example - - -
      - - - - - - - - -
      NamePhone
      {{friend.name}}{{friend.phone}}
      -
      -
      -
      -
      -
      - - - - - - -
      NamePhone
      {{friendObj.name}}{{friendObj.phone}}
      -
      - - var expectFriendNames = function(expectedNames, key) { - element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) { - arr.forEach(function(wd, i) { - expect(wd.getText()).toMatch(expectedNames[i]); - }); - }); - }; - - it('should search across all fields when filtering with a string', function() { - var searchText = element(by.model('searchText')); - searchText.clear(); - searchText.sendKeys('m'); - expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend'); - - searchText.clear(); - searchText.sendKeys('76'); - expectFriendNames(['John', 'Julie'], 'friend'); - }); - - it('should search in specific fields when filtering with a predicate object', function() { - var searchAny = element(by.model('search.$')); - searchAny.clear(); - searchAny.sendKeys('i'); - expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj'); - }); - it('should use a equal comparison when comparator is true', function() { - var searchName = element(by.model('search.name')); - var strict = element(by.model('strict')); - searchName.clear(); - searchName.sendKeys('Julie'); - strict.click(); - expectFriendNames(['Julie'], 'friendObj'); - }); - -
      - */ - -function filterFilter() { - return function(array, expression, comparator, anyPropertyKey) { - if (!isArrayLike(array)) { - if (array == null) { - return array; - } else { - throw minErr('filter')('notarray', 'Expected array but received: {0}', array); - } - } - - anyPropertyKey = anyPropertyKey || '$'; - var expressionType = getTypeForFilter(expression); - var predicateFn; - var matchAgainstAnyProp; - - switch (expressionType) { - case 'function': - predicateFn = expression; - break; - case 'boolean': - case 'null': - case 'number': - case 'string': - matchAgainstAnyProp = true; - // falls through - case 'object': - predicateFn = createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp); - break; - default: - return array; - } - - return Array.prototype.filter.call(array, predicateFn); - }; -} - -// Helper functions for `filterFilter` -function createPredicateFn(expression, comparator, anyPropertyKey, matchAgainstAnyProp) { - var shouldMatchPrimitives = isObject(expression) && (anyPropertyKey in expression); - var predicateFn; - - if (comparator === true) { - comparator = equals; - } else if (!isFunction(comparator)) { - comparator = function(actual, expected) { - if (isUndefined(actual)) { - // No substring matching against `undefined` - return false; - } - if ((actual === null) || (expected === null)) { - // No substring matching against `null`; only match against `null` - return actual === expected; - } - if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) { - // Should not compare primitives against objects, unless they have custom `toString` method - return false; - } - - actual = lowercase('' + actual); - expected = lowercase('' + expected); - return actual.indexOf(expected) !== -1; - }; - } - - predicateFn = function(item) { - if (shouldMatchPrimitives && !isObject(item)) { - return deepCompare(item, expression[anyPropertyKey], comparator, anyPropertyKey, false); - } - return deepCompare(item, expression, comparator, anyPropertyKey, matchAgainstAnyProp); - }; - - return predicateFn; -} - -function deepCompare(actual, expected, comparator, anyPropertyKey, matchAgainstAnyProp, dontMatchWholeObject) { - var actualType = getTypeForFilter(actual); - var expectedType = getTypeForFilter(expected); - - if ((expectedType === 'string') && (expected.charAt(0) === '!')) { - return !deepCompare(actual, expected.substring(1), comparator, anyPropertyKey, matchAgainstAnyProp); - } else if (isArray(actual)) { - // In case `actual` is an array, consider it a match - // if ANY of it's items matches `expected` - return actual.some(function(item) { - return deepCompare(item, expected, comparator, anyPropertyKey, matchAgainstAnyProp); - }); - } - - switch (actualType) { - case 'object': - var key; - if (matchAgainstAnyProp) { - for (key in actual) { - // Under certain, rare, circumstances, key may not be a string and `charAt` will be undefined - // See: https://github.com/angular/angular.js/issues/15644 - if (key.charAt && (key.charAt(0) !== '$') && - deepCompare(actual[key], expected, comparator, anyPropertyKey, true)) { - return true; - } - } - return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, anyPropertyKey, false); - } else if (expectedType === 'object') { - for (key in expected) { - var expectedVal = expected[key]; - if (isFunction(expectedVal) || isUndefined(expectedVal)) { - continue; - } - - var matchAnyProperty = key === anyPropertyKey; - var actualVal = matchAnyProperty ? actual : actual[key]; - if (!deepCompare(actualVal, expectedVal, comparator, anyPropertyKey, matchAnyProperty, matchAnyProperty)) { - return false; - } - } - return true; - } else { - return comparator(actual, expected); - } - case 'function': - return false; - default: - return comparator(actual, expected); - } -} - -// Used for easily differentiating between `null` and actual `object` -function getTypeForFilter(val) { - return (val === null) ? 'null' : typeof val; -} - -var MAX_DIGITS = 22; -var DECIMAL_SEP = '.'; -var ZERO_CHAR = '0'; - -/** - * @ngdoc filter - * @name currency - * @kind function - * - * @description - * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default - * symbol for current locale is used. - * - * @param {number} amount Input to filter. - * @param {string=} symbol Currency symbol or identifier to be displayed. - * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale - * @returns {string} Formatted number. - * - * - * @example - - - -
      -
      - default currency symbol ($): {{amount | currency}}
      - custom currency identifier (USD$): {{amount | currency:"USD$"}}
      - no fractions (0): {{amount | currency:"USD$":0}} -
      -
      - - it('should init with 1234.56', function() { - expect(element(by.id('currency-default')).getText()).toBe('$1,234.56'); - expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56'); - expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235'); - }); - it('should update', function() { - if (browser.params.browser === 'safari') { - // Safari does not understand the minus key. See - // https://github.com/angular/protractor/issues/481 - return; - } - element(by.model('amount')).clear(); - element(by.model('amount')).sendKeys('-1234'); - expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00'); - expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00'); - expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234'); - }); - -
      - */ -currencyFilter.$inject = ['$locale']; -function currencyFilter($locale) { - var formats = $locale.NUMBER_FORMATS; - return function(amount, currencySymbol, fractionSize) { - if (isUndefined(currencySymbol)) { - currencySymbol = formats.CURRENCY_SYM; - } - - if (isUndefined(fractionSize)) { - fractionSize = formats.PATTERNS[1].maxFrac; - } - - // If the currency symbol is empty, trim whitespace around the symbol - var currencySymbolRe = !currencySymbol ? /\s*\u00A4\s*/g : /\u00A4/g; - - // if null or undefined pass it through - return (amount == null) - ? amount - : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize). - replace(currencySymbolRe, currencySymbol); - }; -} - -/** - * @ngdoc filter - * @name number - * @kind function - * - * @description - * Formats a number as text. - * - * If the input is null or undefined, it will just be returned. - * If the input is infinite (Infinity or -Infinity), the Infinity symbol '∞' or '-∞' is returned, respectively. - * If the input is not a number an empty string is returned. - * - * - * @param {number|string} number Number to format. - * @param {(number|string)=} fractionSize Number of decimal places to round the number to. - * If this is not provided then the fraction size is computed from the current locale's number - * formatting pattern. In the case of the default locale, it will be 3. - * @returns {string} Number rounded to `fractionSize` appropriately formatted based on the current - * locale (e.g., in the en_US locale it will have "." as the decimal separator and - * include "," group separators after each third digit). - * - * @example - - - -
      -
      - Default formatting: {{val | number}}
      - No fractions: {{val | number:0}}
      - Negative number: {{-val | number:4}} -
      -
      - - it('should format numbers', function() { - expect(element(by.id('number-default')).getText()).toBe('1,234.568'); - expect(element(by.binding('val | number:0')).getText()).toBe('1,235'); - expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679'); - }); - - it('should update', function() { - element(by.model('val')).clear(); - element(by.model('val')).sendKeys('3374.333'); - expect(element(by.id('number-default')).getText()).toBe('3,374.333'); - expect(element(by.binding('val | number:0')).getText()).toBe('3,374'); - expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330'); - }); - -
      - */ -numberFilter.$inject = ['$locale']; -function numberFilter($locale) { - var formats = $locale.NUMBER_FORMATS; - return function(number, fractionSize) { - - // if null or undefined pass it through - return (number == null) - ? number - : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP, - fractionSize); - }; -} - -/** - * Parse a number (as a string) into three components that can be used - * for formatting the number. - * - * (Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/) - * - * @param {string} numStr The number to parse - * @return {object} An object describing this number, containing the following keys: - * - d : an array of digits containing leading zeros as necessary - * - i : the number of the digits in `d` that are to the left of the decimal point - * - e : the exponent for numbers that would need more than `MAX_DIGITS` digits in `d` - * - */ -function parse(numStr) { - var exponent = 0, digits, numberOfIntegerDigits; - var i, j, zeros; - - // Decimal point? - if ((numberOfIntegerDigits = numStr.indexOf(DECIMAL_SEP)) > -1) { - numStr = numStr.replace(DECIMAL_SEP, ''); - } - - // Exponential form? - if ((i = numStr.search(/e/i)) > 0) { - // Work out the exponent. - if (numberOfIntegerDigits < 0) numberOfIntegerDigits = i; - numberOfIntegerDigits += +numStr.slice(i + 1); - numStr = numStr.substring(0, i); - } else if (numberOfIntegerDigits < 0) { - // There was no decimal point or exponent so it is an integer. - numberOfIntegerDigits = numStr.length; - } - - // Count the number of leading zeros. - for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */ } - - if (i === (zeros = numStr.length)) { - // The digits are all zero. - digits = [0]; - numberOfIntegerDigits = 1; - } else { - // Count the number of trailing zeros - zeros--; - while (numStr.charAt(zeros) === ZERO_CHAR) zeros--; - - // Trailing zeros are insignificant so ignore them - numberOfIntegerDigits -= i; - digits = []; - // Convert string to array of digits without leading/trailing zeros. - for (j = 0; i <= zeros; i++, j++) { - digits[j] = +numStr.charAt(i); - } - } - - // If the number overflows the maximum allowed digits then use an exponent. - if (numberOfIntegerDigits > MAX_DIGITS) { - digits = digits.splice(0, MAX_DIGITS - 1); - exponent = numberOfIntegerDigits - 1; - numberOfIntegerDigits = 1; - } - - return { d: digits, e: exponent, i: numberOfIntegerDigits }; -} - -/** - * Round the parsed number to the specified number of decimal places - * This function changed the parsedNumber in-place - */ -function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) { - var digits = parsedNumber.d; - var fractionLen = digits.length - parsedNumber.i; - - // determine fractionSize if it is not specified; `+fractionSize` converts it to a number - fractionSize = (isUndefined(fractionSize)) ? Math.min(Math.max(minFrac, fractionLen), maxFrac) : +fractionSize; - - // The index of the digit to where rounding is to occur - var roundAt = fractionSize + parsedNumber.i; - var digit = digits[roundAt]; - - if (roundAt > 0) { - // Drop fractional digits beyond `roundAt` - digits.splice(Math.max(parsedNumber.i, roundAt)); - - // Set non-fractional digits beyond `roundAt` to 0 - for (var j = roundAt; j < digits.length; j++) { - digits[j] = 0; - } - } else { - // We rounded to zero so reset the parsedNumber - fractionLen = Math.max(0, fractionLen); - parsedNumber.i = 1; - digits.length = Math.max(1, roundAt = fractionSize + 1); - digits[0] = 0; - for (var i = 1; i < roundAt; i++) digits[i] = 0; - } - - if (digit >= 5) { - if (roundAt - 1 < 0) { - for (var k = 0; k > roundAt; k--) { - digits.unshift(0); - parsedNumber.i++; - } - digits.unshift(1); - parsedNumber.i++; - } else { - digits[roundAt - 1]++; - } - } - - // Pad out with zeros to get the required fraction length - for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0); - - - // Do any carrying, e.g. a digit was rounded up to 10 - var carry = digits.reduceRight(function(carry, d, i, digits) { - d = d + carry; - digits[i] = d % 10; - return Math.floor(d / 10); - }, 0); - if (carry) { - digits.unshift(carry); - parsedNumber.i++; - } -} - -/** - * Format a number into a string - * @param {number} number The number to format - * @param {{ - * minFrac, // the minimum number of digits required in the fraction part of the number - * maxFrac, // the maximum number of digits required in the fraction part of the number - * gSize, // number of digits in each group of separated digits - * lgSize, // number of digits in the last group of digits before the decimal separator - * negPre, // the string to go in front of a negative number (e.g. `-` or `(`)) - * posPre, // the string to go in front of a positive number - * negSuf, // the string to go after a negative number (e.g. `)`) - * posSuf // the string to go after a positive number - * }} pattern - * @param {string} groupSep The string to separate groups of number (e.g. `,`) - * @param {string} decimalSep The string to act as the decimal separator (e.g. `.`) - * @param {[type]} fractionSize The size of the fractional part of the number - * @return {string} The number formatted as a string - */ -function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { - - if (!(isString(number) || isNumber(number)) || isNaN(number)) return ''; - - var isInfinity = !isFinite(number); - var isZero = false; - var numStr = Math.abs(number) + '', - formattedText = '', - parsedNumber; - - if (isInfinity) { - formattedText = '\u221e'; - } else { - parsedNumber = parse(numStr); - - roundNumber(parsedNumber, fractionSize, pattern.minFrac, pattern.maxFrac); - - var digits = parsedNumber.d; - var integerLen = parsedNumber.i; - var exponent = parsedNumber.e; - var decimals = []; - isZero = digits.reduce(function(isZero, d) { return isZero && !d; }, true); - - // pad zeros for small numbers - while (integerLen < 0) { - digits.unshift(0); - integerLen++; - } - - // extract decimals digits - if (integerLen > 0) { - decimals = digits.splice(integerLen, digits.length); - } else { - decimals = digits; - digits = [0]; - } - - // format the integer digits with grouping separators - var groups = []; - if (digits.length >= pattern.lgSize) { - groups.unshift(digits.splice(-pattern.lgSize, digits.length).join('')); - } - while (digits.length > pattern.gSize) { - groups.unshift(digits.splice(-pattern.gSize, digits.length).join('')); - } - if (digits.length) { - groups.unshift(digits.join('')); - } - formattedText = groups.join(groupSep); - - // append the decimal digits - if (decimals.length) { - formattedText += decimalSep + decimals.join(''); - } - - if (exponent) { - formattedText += 'e+' + exponent; - } - } - if (number < 0 && !isZero) { - return pattern.negPre + formattedText + pattern.negSuf; - } else { - return pattern.posPre + formattedText + pattern.posSuf; - } -} - -function padNumber(num, digits, trim, negWrap) { - var neg = ''; - if (num < 0 || (negWrap && num <= 0)) { - if (negWrap) { - num = -num + 1; - } else { - num = -num; - neg = '-'; - } - } - num = '' + num; - while (num.length < digits) num = ZERO_CHAR + num; - if (trim) { - num = num.substr(num.length - digits); - } - return neg + num; -} - - -function dateGetter(name, size, offset, trim, negWrap) { - offset = offset || 0; - return function(date) { - var value = date['get' + name](); - if (offset > 0 || value > -offset) { - value += offset; - } - if (value === 0 && offset === -12) value = 12; - return padNumber(value, size, trim, negWrap); - }; -} - -function dateStrGetter(name, shortForm, standAlone) { - return function(date, formats) { - var value = date['get' + name](); - var propPrefix = (standAlone ? 'STANDALONE' : '') + (shortForm ? 'SHORT' : ''); - var get = uppercase(propPrefix + name); - - return formats[get][value]; - }; -} - -function timeZoneGetter(date, formats, offset) { - var zone = -1 * offset; - var paddedZone = (zone >= 0) ? '+' : ''; - - paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) + - padNumber(Math.abs(zone % 60), 2); - - return paddedZone; -} - -function getFirstThursdayOfYear(year) { - // 0 = index of January - var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay(); - // 4 = index of Thursday (+1 to account for 1st = 5) - // 11 = index of *next* Thursday (+1 account for 1st = 12) - return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst); -} - -function getThursdayThisWeek(datetime) { - return new Date(datetime.getFullYear(), datetime.getMonth(), - // 4 = index of Thursday - datetime.getDate() + (4 - datetime.getDay())); -} - -function weekGetter(size) { - return function(date) { - var firstThurs = getFirstThursdayOfYear(date.getFullYear()), - thisThurs = getThursdayThisWeek(date); - - var diff = +thisThurs - +firstThurs, - result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week - - return padNumber(result, size); - }; -} - -function ampmGetter(date, formats) { - return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1]; -} - -function eraGetter(date, formats) { - return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1]; -} - -function longEraGetter(date, formats) { - return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1]; -} - -var DATE_FORMATS = { - yyyy: dateGetter('FullYear', 4, 0, false, true), - yy: dateGetter('FullYear', 2, 0, true, true), - y: dateGetter('FullYear', 1, 0, false, true), - MMMM: dateStrGetter('Month'), - MMM: dateStrGetter('Month', true), - MM: dateGetter('Month', 2, 1), - M: dateGetter('Month', 1, 1), - LLLL: dateStrGetter('Month', false, true), - dd: dateGetter('Date', 2), - d: dateGetter('Date', 1), - HH: dateGetter('Hours', 2), - H: dateGetter('Hours', 1), - hh: dateGetter('Hours', 2, -12), - h: dateGetter('Hours', 1, -12), - mm: dateGetter('Minutes', 2), - m: dateGetter('Minutes', 1), - ss: dateGetter('Seconds', 2), - s: dateGetter('Seconds', 1), - // while ISO 8601 requires fractions to be prefixed with `.` or `,` - // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions - sss: dateGetter('Milliseconds', 3), - EEEE: dateStrGetter('Day'), - EEE: dateStrGetter('Day', true), - a: ampmGetter, - Z: timeZoneGetter, - ww: weekGetter(2), - w: weekGetter(1), - G: eraGetter, - GG: eraGetter, - GGG: eraGetter, - GGGG: longEraGetter -}; - -var DATE_FORMATS_SPLIT = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/, - NUMBER_STRING = /^-?\d+$/; - -/** - * @ngdoc filter - * @name date - * @kind function - * - * @description - * Formats `date` to a string based on the requested `format`. - * - * `format` string can be composed of the following elements: - * - * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010) - * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) - * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199) - * * `'MMMM'`: Month in year (January-December) - * * `'MMM'`: Month in year (Jan-Dec) - * * `'MM'`: Month in year, padded (01-12) - * * `'M'`: Month in year (1-12) - * * `'LLLL'`: Stand-alone month in year (January-December) - * * `'dd'`: Day in month, padded (01-31) - * * `'d'`: Day in month (1-31) - * * `'EEEE'`: Day in Week,(Sunday-Saturday) - * * `'EEE'`: Day in Week, (Sun-Sat) - * * `'HH'`: Hour in day, padded (00-23) - * * `'H'`: Hour in day (0-23) - * * `'hh'`: Hour in AM/PM, padded (01-12) - * * `'h'`: Hour in AM/PM, (1-12) - * * `'mm'`: Minute in hour, padded (00-59) - * * `'m'`: Minute in hour (0-59) - * * `'ss'`: Second in minute, padded (00-59) - * * `'s'`: Second in minute (0-59) - * * `'sss'`: Millisecond in second, padded (000-999) - * * `'a'`: AM/PM marker - * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200) - * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year - * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year - * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD') - * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini') - * - * `format` string can also be one of the following predefined - * {@link guide/i18n localizable formats}: - * - * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale - * (e.g. Sep 3, 2010 12:05:08 PM) - * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM) - * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale - * (e.g. Friday, September 3, 2010) - * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010) - * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010) - * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10) - * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM) - * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM) - * - * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g. - * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence - * (e.g. `"h 'o''clock'"`). - * - * Any other characters in the `format` string will be output as-is. - * - * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or - * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its - * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is - * specified in the string input, the time is considered to be in the local timezone. - * @param {string=} format Formatting rules (see Description). If not specified, - * `mediumDate` is used. - * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the - * continental US time zone abbreviations, but for general use, use a time zone offset, for - * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian) - * If not specified, the timezone of the browser will be used. - * @returns {string} Formatted string or the input if input is not recognized as date/millis. - * - * @example - - - {{1288323623006 | date:'medium'}}: - {{1288323623006 | date:'medium'}}
      - {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}: - {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
      - {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}: - {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
      - {{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}: - {{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}
      -
      - - it('should format date', function() { - expect(element(by.binding("1288323623006 | date:'medium'")).getText()). - toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); - expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()). - toMatch(/2010-10-2\d \d{2}:\d{2}:\d{2} (-|\+)?\d{4}/); - expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()). - toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); - expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()). - toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/); - }); - -
      - */ -dateFilter.$inject = ['$locale']; -function dateFilter($locale) { - - - var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; - // 1 2 3 4 5 6 7 8 9 10 11 - function jsonStringToDate(string) { - var match; - if ((match = string.match(R_ISO8601_STR))) { - var date = new Date(0), - tzHour = 0, - tzMin = 0, - dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear, - timeSetter = match[8] ? date.setUTCHours : date.setHours; - - if (match[9]) { - tzHour = toInt(match[9] + match[10]); - tzMin = toInt(match[9] + match[11]); - } - dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3])); - var h = toInt(match[4] || 0) - tzHour; - var m = toInt(match[5] || 0) - tzMin; - var s = toInt(match[6] || 0); - var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000); - timeSetter.call(date, h, m, s, ms); - return date; - } - return string; - } - - - return function(date, format, timezone) { - var text = '', - parts = [], - fn, match; - - format = format || 'mediumDate'; - format = $locale.DATETIME_FORMATS[format] || format; - if (isString(date)) { - date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date); - } - - if (isNumber(date)) { - date = new Date(date); - } - - if (!isDate(date) || !isFinite(date.getTime())) { - return date; - } - - while (format) { - match = DATE_FORMATS_SPLIT.exec(format); - if (match) { - parts = concat(parts, match, 1); - format = parts.pop(); - } else { - parts.push(format); - format = null; - } - } - - var dateTimezoneOffset = date.getTimezoneOffset(); - if (timezone) { - dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); - date = convertTimezoneToLocal(date, timezone, true); - } - forEach(parts, function(value) { - fn = DATE_FORMATS[value]; - text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset) - : value === '\'\'' ? '\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\''); - }); - - return text; - }; -} - - -/** - * @ngdoc filter - * @name json - * @kind function - * - * @description - * Allows you to convert a JavaScript object into JSON string. - * - * This filter is mostly useful for debugging. When using the double curly {{value}} notation - * the binding is automatically converted to JSON. - * - * @param {*} object Any JavaScript object (including arrays and primitive types) to filter. - * @param {number=} spacing The number of spaces to use per indentation, defaults to 2. - * @returns {string} JSON string. - * - * - * @example - - -
      {{ {'name':'value'} | json }}
      -
      {{ {'name':'value'} | json:4 }}
      -
      - - it('should jsonify filtered objects', function() { - expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n {2}"name": ?"value"\n}/); - expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n {4}"name": ?"value"\n}/); - }); - -
      - * - */ -function jsonFilter() { - return function(object, spacing) { - if (isUndefined(spacing)) { - spacing = 2; - } - return toJson(object, spacing); - }; -} - - -/** - * @ngdoc filter - * @name lowercase - * @kind function - * @description - * Converts string to lowercase. - * - * See the {@link ng.uppercase uppercase filter documentation} for a functionally identical example. - * - * @see angular.lowercase - */ -var lowercaseFilter = valueFn(lowercase); - - -/** - * @ngdoc filter - * @name uppercase - * @kind function - * @description - * Converts string to uppercase. - * @example - - - -
      - -

      {{title}}

      - -

      {{title | uppercase}}

      -
      -
      -
      - */ -var uppercaseFilter = valueFn(uppercase); - -/** - * @ngdoc filter - * @name limitTo - * @kind function - * - * @description - * Creates a new array or string containing only a specified number of elements. The elements are - * taken from either the beginning or the end of the source array, string or number, as specified by - * the value and sign (positive or negative) of `limit`. Other array-like objects are also supported - * (e.g. array subclasses, NodeLists, jqLite/jQuery collections etc). If a number is used as input, - * it is converted to a string. - * - * @param {Array|ArrayLike|string|number} input - Array/array-like, string or number to be limited. - * @param {string|number} limit - The length of the returned array or string. If the `limit` number - * is positive, `limit` number of items from the beginning of the source array/string are copied. - * If the number is negative, `limit` number of items from the end of the source array/string - * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined, - * the input will be returned unchanged. - * @param {(string|number)=} begin - Index at which to begin limitation. As a negative index, - * `begin` indicates an offset from the end of `input`. Defaults to `0`. - * @returns {Array|string} A new sub-array or substring of length `limit` or less if the input had - * less than `limit` elements. - * - * @example - - - -
      - -

      Output numbers: {{ numbers | limitTo:numLimit }}

      - -

      Output letters: {{ letters | limitTo:letterLimit }}

      - -

      Output long number: {{ longNumber | limitTo:longNumberLimit }}

      -
      -
      - - var numLimitInput = element(by.model('numLimit')); - var letterLimitInput = element(by.model('letterLimit')); - var longNumberLimitInput = element(by.model('longNumberLimit')); - var limitedNumbers = element(by.binding('numbers | limitTo:numLimit')); - var limitedLetters = element(by.binding('letters | limitTo:letterLimit')); - var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit')); - - it('should limit the number array to first three items', function() { - expect(numLimitInput.getAttribute('value')).toBe('3'); - expect(letterLimitInput.getAttribute('value')).toBe('3'); - expect(longNumberLimitInput.getAttribute('value')).toBe('3'); - expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]'); - expect(limitedLetters.getText()).toEqual('Output letters: abc'); - expect(limitedLongNumber.getText()).toEqual('Output long number: 234'); - }); - - // There is a bug in safari and protractor that doesn't like the minus key - // it('should update the output when -3 is entered', function() { - // numLimitInput.clear(); - // numLimitInput.sendKeys('-3'); - // letterLimitInput.clear(); - // letterLimitInput.sendKeys('-3'); - // longNumberLimitInput.clear(); - // longNumberLimitInput.sendKeys('-3'); - // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]'); - // expect(limitedLetters.getText()).toEqual('Output letters: ghi'); - // expect(limitedLongNumber.getText()).toEqual('Output long number: 342'); - // }); - - it('should not exceed the maximum size of input array', function() { - numLimitInput.clear(); - numLimitInput.sendKeys('100'); - letterLimitInput.clear(); - letterLimitInput.sendKeys('100'); - longNumberLimitInput.clear(); - longNumberLimitInput.sendKeys('100'); - expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]'); - expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi'); - expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342'); - }); - -
      -*/ -function limitToFilter() { - return function(input, limit, begin) { - if (Math.abs(Number(limit)) === Infinity) { - limit = Number(limit); - } else { - limit = toInt(limit); - } - if (isNumberNaN(limit)) return input; - - if (isNumber(input)) input = input.toString(); - if (!isArrayLike(input)) return input; - - begin = (!begin || isNaN(begin)) ? 0 : toInt(begin); - begin = (begin < 0) ? Math.max(0, input.length + begin) : begin; - - if (limit >= 0) { - return sliceFn(input, begin, begin + limit); - } else { - if (begin === 0) { - return sliceFn(input, limit, input.length); - } else { - return sliceFn(input, Math.max(0, begin + limit), begin); - } - } - }; -} - -function sliceFn(input, begin, end) { - if (isString(input)) return input.slice(begin, end); - - return slice.call(input, begin, end); -} - -/** - * @ngdoc filter - * @name orderBy - * @kind function - * - * @description - * Returns an array containing the items from the specified `collection`, ordered by a `comparator` - * function based on the values computed using the `expression` predicate. - * - * For example, `[{id: 'foo'}, {id: 'bar'}] | orderBy:'id'` would result in - * `[{id: 'bar'}, {id: 'foo'}]`. - * - * The `collection` can be an Array or array-like object (e.g. NodeList, jQuery object, TypedArray, - * String, etc). - * - * The `expression` can be a single predicate, or a list of predicates each serving as a tie-breaker - * for the preceding one. The `expression` is evaluated against each item and the output is used - * for comparing with other items. - * - * You can change the sorting order by setting `reverse` to `true`. By default, items are sorted in - * ascending order. - * - * The comparison is done using the `comparator` function. If none is specified, a default, built-in - * comparator is used (see below for details - in a nutshell, it compares numbers numerically and - * strings alphabetically). - * - * ### Under the hood - * - * Ordering the specified `collection` happens in two phases: - * - * 1. All items are passed through the predicate (or predicates), and the returned values are saved - * along with their type (`string`, `number` etc). For example, an item `{label: 'foo'}`, passed - * through a predicate that extracts the value of the `label` property, would be transformed to: - * ``` - * { - * value: 'foo', - * type: 'string', - * index: ... - * } - * ``` - * 2. The comparator function is used to sort the items, based on the derived values, types and - * indices. - * - * If you use a custom comparator, it will be called with pairs of objects of the form - * `{value: ..., type: '...', index: ...}` and is expected to return `0` if the objects are equal - * (as far as the comparator is concerned), `-1` if the 1st one should be ranked higher than the - * second, or `1` otherwise. - * - * In order to ensure that the sorting will be deterministic across platforms, if none of the - * specified predicates can distinguish between two items, `orderBy` will automatically introduce a - * dummy predicate that returns the item's index as `value`. - * (If you are using a custom comparator, make sure it can handle this predicate as well.) - * - * If a custom comparator still can't distinguish between two items, then they will be sorted based - * on their index using the built-in comparator. - * - * Finally, in an attempt to simplify things, if a predicate returns an object as the extracted - * value for an item, `orderBy` will try to convert that object to a primitive value, before passing - * it to the comparator. The following rules govern the conversion: - * - * 1. If the object has a `valueOf()` method that returns a primitive, its return value will be - * used instead.
      - * (If the object has a `valueOf()` method that returns another object, then the returned object - * will be used in subsequent steps.) - * 2. If the object has a custom `toString()` method (i.e. not the one inherited from `Object`) that - * returns a primitive, its return value will be used instead.
      - * (If the object has a `toString()` method that returns another object, then the returned object - * will be used in subsequent steps.) - * 3. No conversion; the object itself is used. - * - * ### The default comparator - * - * The default, built-in comparator should be sufficient for most usecases. In short, it compares - * numbers numerically, strings alphabetically (and case-insensitively), for objects falls back to - * using their index in the original collection, and sorts values of different types by type. - * - * More specifically, it follows these steps to determine the relative order of items: - * - * 1. If the compared values are of different types, compare the types themselves alphabetically. - * 2. If both values are of type `string`, compare them alphabetically in a case- and - * locale-insensitive way. - * 3. If both values are objects, compare their indices instead. - * 4. Otherwise, return: - * - `0`, if the values are equal (by strict equality comparison, i.e. using `===`). - * - `-1`, if the 1st value is "less than" the 2nd value (compared using the `<` operator). - * - `1`, otherwise. - * - * **Note:** If you notice numbers not being sorted as expected, make sure they are actually being - * saved as numbers and not strings. - * **Note:** For the purpose of sorting, `null` values are treated as the string `'null'` (i.e. - * `type: 'string'`, `value: 'null'`). This may cause unexpected sort order relative to - * other values. - * - * @param {Array|ArrayLike} collection - The collection (array or array-like object) to sort. - * @param {(Function|string|Array.)=} expression - A predicate (or list of - * predicates) to be used by the comparator to determine the order of elements. - * - * Can be one of: - * - * - `Function`: A getter function. This function will be called with each item as argument and - * the return value will be used for sorting. - * - `string`: An AngularJS expression. This expression will be evaluated against each item and the - * result will be used for sorting. For example, use `'label'` to sort by a property called - * `label` or `'label.substring(0, 3)'` to sort by the first 3 characters of the `label` - * property.
      - * (The result of a constant expression is interpreted as a property name to be used for - * comparison. For example, use `'"special name"'` (note the extra pair of quotes) to sort by a - * property called `special name`.)
      - * An expression can be optionally prefixed with `+` or `-` to control the sorting direction, - * ascending or descending. For example, `'+label'` or `'-label'`. If no property is provided, - * (e.g. `'+'` or `'-'`), the collection element itself is used in comparisons. - * - `Array`: An array of function and/or string predicates. If a predicate cannot determine the - * relative order of two items, the next predicate is used as a tie-breaker. - * - * **Note:** If the predicate is missing or empty then it defaults to `'+'`. - * - * @param {boolean=} reverse - If `true`, reverse the sorting order. - * @param {(Function)=} comparator - The comparator function used to determine the relative order of - * value pairs. If omitted, the built-in comparator will be used. - * - * @returns {Array} - The sorted array. - * - * - * @example - * ### Ordering a table with `ngRepeat` - * - * The example below demonstrates a simple {@link ngRepeat ngRepeat}, where the data is sorted by - * age in descending order (expression is set to `'-age'`). The `comparator` is not set, which means - * it defaults to the built-in comparator. - * - - -
      - - - - - - - - - - - -
      NamePhone NumberAge
      {{friend.name}}{{friend.phone}}{{friend.age}}
      -
      -
      - - angular.module('orderByExample1', []) - .controller('ExampleController', ['$scope', function($scope) { - $scope.friends = [ - {name: 'John', phone: '555-1212', age: 10}, - {name: 'Mary', phone: '555-9876', age: 19}, - {name: 'Mike', phone: '555-4321', age: 21}, - {name: 'Adam', phone: '555-5678', age: 35}, - {name: 'Julie', phone: '555-8765', age: 29} - ]; - }]); - - - .friends { - border-collapse: collapse; - } - - .friends th { - border-bottom: 1px solid; - } - .friends td, .friends th { - border-left: 1px solid; - padding: 5px 10px; - } - .friends td:first-child, .friends th:first-child { - border-left: none; - } - - - // Element locators - var names = element.all(by.repeater('friends').column('friend.name')); - - it('should sort friends by age in reverse order', function() { - expect(names.get(0).getText()).toBe('Adam'); - expect(names.get(1).getText()).toBe('Julie'); - expect(names.get(2).getText()).toBe('Mike'); - expect(names.get(3).getText()).toBe('Mary'); - expect(names.get(4).getText()).toBe('John'); - }); - -
      - *
      - * - * @example - * ### Changing parameters dynamically - * - * All parameters can be changed dynamically. The next example shows how you can make the columns of - * a table sortable, by binding the `expression` and `reverse` parameters to scope properties. - * - - -
      -
      Sort by = {{propertyName}}; reverse = {{reverse}}
      -
      - -
      - - - - - - - - - - - -
      - - - - - - - - -
      {{friend.name}}{{friend.phone}}{{friend.age}}
      -
      -
      - - angular.module('orderByExample2', []) - .controller('ExampleController', ['$scope', function($scope) { - var friends = [ - {name: 'John', phone: '555-1212', age: 10}, - {name: 'Mary', phone: '555-9876', age: 19}, - {name: 'Mike', phone: '555-4321', age: 21}, - {name: 'Adam', phone: '555-5678', age: 35}, - {name: 'Julie', phone: '555-8765', age: 29} - ]; - - $scope.propertyName = 'age'; - $scope.reverse = true; - $scope.friends = friends; - - $scope.sortBy = function(propertyName) { - $scope.reverse = ($scope.propertyName === propertyName) ? !$scope.reverse : false; - $scope.propertyName = propertyName; - }; - }]); - - - .friends { - border-collapse: collapse; - } - - .friends th { - border-bottom: 1px solid; - } - .friends td, .friends th { - border-left: 1px solid; - padding: 5px 10px; - } - .friends td:first-child, .friends th:first-child { - border-left: none; - } - - .sortorder:after { - content: '\25b2'; // BLACK UP-POINTING TRIANGLE - } - .sortorder.reverse:after { - content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE - } - - - // Element locators - var unsortButton = element(by.partialButtonText('unsorted')); - var nameHeader = element(by.partialButtonText('Name')); - var phoneHeader = element(by.partialButtonText('Phone')); - var ageHeader = element(by.partialButtonText('Age')); - var firstName = element(by.repeater('friends').column('friend.name').row(0)); - var lastName = element(by.repeater('friends').column('friend.name').row(4)); - - it('should sort friends by some property, when clicking on the column header', function() { - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - - phoneHeader.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Mary'); - - nameHeader.click(); - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('Mike'); - - ageHeader.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Adam'); - }); - - it('should sort friends in reverse order, when clicking on the same column', function() { - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - - ageHeader.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Adam'); - - ageHeader.click(); - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - }); - - it('should restore the original order, when clicking "Set to unsorted"', function() { - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - - unsortButton.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Julie'); - }); - -
      - *
      - * - * @example - * ### Using `orderBy` inside a controller - * - * It is also possible to call the `orderBy` filter manually, by injecting `orderByFilter`, and - * calling it with the desired parameters. (Alternatively, you could inject the `$filter` factory - * and retrieve the `orderBy` filter with `$filter('orderBy')`.) - * - - -
      -
      Sort by = {{propertyName}}; reverse = {{reverse}}
      -
      - -
      - - - - - - - - - - - -
      - - - - - - - - -
      {{friend.name}}{{friend.phone}}{{friend.age}}
      -
      -
      - - angular.module('orderByExample3', []) - .controller('ExampleController', ['$scope', 'orderByFilter', function($scope, orderBy) { - var friends = [ - {name: 'John', phone: '555-1212', age: 10}, - {name: 'Mary', phone: '555-9876', age: 19}, - {name: 'Mike', phone: '555-4321', age: 21}, - {name: 'Adam', phone: '555-5678', age: 35}, - {name: 'Julie', phone: '555-8765', age: 29} - ]; - - $scope.propertyName = 'age'; - $scope.reverse = true; - $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse); - - $scope.sortBy = function(propertyName) { - $scope.reverse = (propertyName !== null && $scope.propertyName === propertyName) - ? !$scope.reverse : false; - $scope.propertyName = propertyName; - $scope.friends = orderBy(friends, $scope.propertyName, $scope.reverse); - }; - }]); - - - .friends { - border-collapse: collapse; - } - - .friends th { - border-bottom: 1px solid; - } - .friends td, .friends th { - border-left: 1px solid; - padding: 5px 10px; - } - .friends td:first-child, .friends th:first-child { - border-left: none; - } - - .sortorder:after { - content: '\25b2'; // BLACK UP-POINTING TRIANGLE - } - .sortorder.reverse:after { - content: '\25bc'; // BLACK DOWN-POINTING TRIANGLE - } - - - // Element locators - var unsortButton = element(by.partialButtonText('unsorted')); - var nameHeader = element(by.partialButtonText('Name')); - var phoneHeader = element(by.partialButtonText('Phone')); - var ageHeader = element(by.partialButtonText('Age')); - var firstName = element(by.repeater('friends').column('friend.name').row(0)); - var lastName = element(by.repeater('friends').column('friend.name').row(4)); - - it('should sort friends by some property, when clicking on the column header', function() { - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - - phoneHeader.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Mary'); - - nameHeader.click(); - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('Mike'); - - ageHeader.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Adam'); - }); - - it('should sort friends in reverse order, when clicking on the same column', function() { - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - - ageHeader.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Adam'); - - ageHeader.click(); - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - }); - - it('should restore the original order, when clicking "Set to unsorted"', function() { - expect(firstName.getText()).toBe('Adam'); - expect(lastName.getText()).toBe('John'); - - unsortButton.click(); - expect(firstName.getText()).toBe('John'); - expect(lastName.getText()).toBe('Julie'); - }); - -
      - *
      - * - * @example - * ### Using a custom comparator - * - * If you have very specific requirements about the way items are sorted, you can pass your own - * comparator function. For example, you might need to compare some strings in a locale-sensitive - * way. (When specifying a custom comparator, you also need to pass a value for the `reverse` - * argument - passing `false` retains the default sorting order, i.e. ascending.) - * - - -
      -
      -

      Locale-sensitive Comparator

      - - - - - - - - - -
      NameFavorite Letter
      {{friend.name}}{{friend.favoriteLetter}}
      -
      -
      -

      Default Comparator

      - - - - - - - - - -
      NameFavorite Letter
      {{friend.name}}{{friend.favoriteLetter}}
      -
      -
      -
      - - angular.module('orderByExample4', []) - .controller('ExampleController', ['$scope', function($scope) { - $scope.friends = [ - {name: 'John', favoriteLetter: 'Ä'}, - {name: 'Mary', favoriteLetter: 'Ü'}, - {name: 'Mike', favoriteLetter: 'Ö'}, - {name: 'Adam', favoriteLetter: 'H'}, - {name: 'Julie', favoriteLetter: 'Z'} - ]; - - $scope.localeSensitiveComparator = function(v1, v2) { - // If we don't get strings, just compare by index - if (v1.type !== 'string' || v2.type !== 'string') { - return (v1.index < v2.index) ? -1 : 1; - } - - // Compare strings alphabetically, taking locale into account - return v1.value.localeCompare(v2.value); - }; - }]); - - - .friends-container { - display: inline-block; - margin: 0 30px; - } - - .friends { - border-collapse: collapse; - } - - .friends th { - border-bottom: 1px solid; - } - .friends td, .friends th { - border-left: 1px solid; - padding: 5px 10px; - } - .friends td:first-child, .friends th:first-child { - border-left: none; - } - - - // Element locators - var container = element(by.css('.custom-comparator')); - var names = container.all(by.repeater('friends').column('friend.name')); - - it('should sort friends by favorite letter (in correct alphabetical order)', function() { - expect(names.get(0).getText()).toBe('John'); - expect(names.get(1).getText()).toBe('Adam'); - expect(names.get(2).getText()).toBe('Mike'); - expect(names.get(3).getText()).toBe('Mary'); - expect(names.get(4).getText()).toBe('Julie'); - }); - -
      - * - */ -orderByFilter.$inject = ['$parse']; -function orderByFilter($parse) { - return function(array, sortPredicate, reverseOrder, compareFn) { - - if (array == null) return array; - if (!isArrayLike(array)) { - throw minErr('orderBy')('notarray', 'Expected array but received: {0}', array); - } - - if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; } - if (sortPredicate.length === 0) { sortPredicate = ['+']; } - - var predicates = processPredicates(sortPredicate); - - var descending = reverseOrder ? -1 : 1; - - // Define the `compare()` function. Use a default comparator if none is specified. - var compare = isFunction(compareFn) ? compareFn : defaultCompare; - - // The next three lines are a version of a Swartzian Transform idiom from Perl - // (sometimes called the Decorate-Sort-Undecorate idiom) - // See https://en.wikipedia.org/wiki/Schwartzian_transform - var compareValues = Array.prototype.map.call(array, getComparisonObject); - compareValues.sort(doComparison); - array = compareValues.map(function(item) { return item.value; }); - - return array; - - function getComparisonObject(value, index) { - // NOTE: We are adding an extra `tieBreaker` value based on the element's index. - // This will be used to keep the sort stable when none of the input predicates can - // distinguish between two elements. - return { - value: value, - tieBreaker: {value: index, type: 'number', index: index}, - predicateValues: predicates.map(function(predicate) { - return getPredicateValue(predicate.get(value), index); - }) - }; - } - - function doComparison(v1, v2) { - for (var i = 0, ii = predicates.length; i < ii; i++) { - var result = compare(v1.predicateValues[i], v2.predicateValues[i]); - if (result) { - return result * predicates[i].descending * descending; - } - } - - return (compare(v1.tieBreaker, v2.tieBreaker) || defaultCompare(v1.tieBreaker, v2.tieBreaker)) * descending; - } - }; - - function processPredicates(sortPredicates) { - return sortPredicates.map(function(predicate) { - var descending = 1, get = identity; - - if (isFunction(predicate)) { - get = predicate; - } else if (isString(predicate)) { - if ((predicate.charAt(0) === '+' || predicate.charAt(0) === '-')) { - descending = predicate.charAt(0) === '-' ? -1 : 1; - predicate = predicate.substring(1); - } - if (predicate !== '') { - get = $parse(predicate); - if (get.constant) { - var key = get(); - get = function(value) { return value[key]; }; - } - } - } - return {get: get, descending: descending}; - }); - } - - function isPrimitive(value) { - switch (typeof value) { - case 'number': /* falls through */ - case 'boolean': /* falls through */ - case 'string': - return true; - default: - return false; - } - } - - function objectValue(value) { - // If `valueOf` is a valid function use that - if (isFunction(value.valueOf)) { - value = value.valueOf(); - if (isPrimitive(value)) return value; - } - // If `toString` is a valid function and not the one from `Object.prototype` use that - if (hasCustomToString(value)) { - value = value.toString(); - if (isPrimitive(value)) return value; - } - - return value; - } - - function getPredicateValue(value, index) { - var type = typeof value; - if (value === null) { - type = 'string'; - value = 'null'; - } else if (type === 'object') { - value = objectValue(value); - } - return {value: value, type: type, index: index}; - } - - function defaultCompare(v1, v2) { - var result = 0; - var type1 = v1.type; - var type2 = v2.type; - - if (type1 === type2) { - var value1 = v1.value; - var value2 = v2.value; - - if (type1 === 'string') { - // Compare strings case-insensitively - value1 = value1.toLowerCase(); - value2 = value2.toLowerCase(); - } else if (type1 === 'object') { - // For basic objects, use the position of the object - // in the collection instead of the value - if (isObject(value1)) value1 = v1.index; - if (isObject(value2)) value2 = v2.index; - } - - if (value1 !== value2) { - result = value1 < value2 ? -1 : 1; - } - } else { - result = type1 < type2 ? -1 : 1; - } - - return result; - } -} - -function ngDirective(directive) { - if (isFunction(directive)) { - directive = { - link: directive - }; - } - directive.restrict = directive.restrict || 'AC'; - return valueFn(directive); -} - -/** - * @ngdoc directive - * @name a - * @restrict E - * - * @description - * Modifies the default behavior of the html a tag so that the default action is prevented when - * the href attribute is empty. - * - * For dynamically creating `href` attributes for a tags, see the {@link ng.ngHref `ngHref`} directive. - */ -var htmlAnchorDirective = valueFn({ - restrict: 'E', - compile: function(element, attr) { - if (!attr.href && !attr.xlinkHref) { - return function(scope, element) { - // If the linked element is not an anchor tag anymore, do nothing - if (element[0].nodeName.toLowerCase() !== 'a') return; - - // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. - var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ? - 'xlink:href' : 'href'; - element.on('click', function(event) { - // if we have no href url, then don't navigate anywhere. - if (!element.attr(href)) { - event.preventDefault(); - } - }); - }; - } - } -}); - -/** - * @ngdoc directive - * @name ngHref - * @restrict A - * @priority 99 - * - * @description - * Using AngularJS markup like `{{hash}}` in an href attribute will - * make the link go to the wrong URL if the user clicks it before - * AngularJS has a chance to replace the `{{hash}}` markup with its - * value. Until AngularJS replaces the markup the link will be broken - * and will most likely return a 404 error. The `ngHref` directive - * solves this problem. - * - * The wrong way to write it: - * ```html - * link1 - * ``` - * - * The correct way to write it: - * ```html - * link1 - * ``` - * - * @element A - * @param {template} ngHref any string which can contain `{{}}` markup. - * - * @example - * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes - * in links and their different behaviors: - - -
      - link 1 (link, don't reload)
      - link 2 (link, don't reload)
      - link 3 (link, reload!)
      - anchor (link, don't reload)
      - anchor (no link)
      - link (link, change location) -
      - - it('should execute ng-click but not reload when href without value', function() { - element(by.id('link-1')).click(); - expect(element(by.model('value')).getAttribute('value')).toEqual('1'); - expect(element(by.id('link-1')).getAttribute('href')).toBe(''); - }); - - it('should execute ng-click but not reload when href empty string', function() { - element(by.id('link-2')).click(); - expect(element(by.model('value')).getAttribute('value')).toEqual('2'); - expect(element(by.id('link-2')).getAttribute('href')).toBe(''); - }); - - it('should execute ng-click and change url when ng-href specified', function() { - expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/); - - element(by.id('link-3')).click(); - - // At this point, we navigate away from an AngularJS page, so we need - // to use browser.driver to get the base webdriver. - - browser.wait(function() { - return browser.driver.getCurrentUrl().then(function(url) { - return url.match(/\/123$/); - }); - }, 5000, 'page should navigate to /123'); - }); - - it('should execute ng-click but not reload when href empty string and name specified', function() { - element(by.id('link-4')).click(); - expect(element(by.model('value')).getAttribute('value')).toEqual('4'); - expect(element(by.id('link-4')).getAttribute('href')).toBe(''); - }); - - it('should execute ng-click but not reload when no href but name specified', function() { - element(by.id('link-5')).click(); - expect(element(by.model('value')).getAttribute('value')).toEqual('5'); - expect(element(by.id('link-5')).getAttribute('href')).toBe(null); - }); - - it('should only change url when only ng-href', function() { - element(by.model('value')).clear(); - element(by.model('value')).sendKeys('6'); - expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/); - - element(by.id('link-6')).click(); - - // At this point, we navigate away from an AngularJS page, so we need - // to use browser.driver to get the base webdriver. - browser.wait(function() { - return browser.driver.getCurrentUrl().then(function(url) { - return url.match(/\/6$/); - }); - }, 5000, 'page should navigate to /6'); - }); - -
      - */ - -/** - * @ngdoc directive - * @name ngSrc - * @restrict A - * @priority 99 - * - * @description - * Using AngularJS markup like `{{hash}}` in a `src` attribute doesn't - * work right: The browser will fetch from the URL with the literal - * text `{{hash}}` until AngularJS replaces the expression inside - * `{{hash}}`. The `ngSrc` directive solves this problem. - * - * The buggy way to write it: - * ```html - * Description - * ``` - * - * The correct way to write it: - * ```html - * Description - * ``` - * - * @element IMG - * @param {template} ngSrc any string which can contain `{{}}` markup. - */ - -/** - * @ngdoc directive - * @name ngSrcset - * @restrict A - * @priority 99 - * - * @description - * Using AngularJS markup like `{{hash}}` in a `srcset` attribute doesn't - * work right: The browser will fetch from the URL with the literal - * text `{{hash}}` until AngularJS replaces the expression inside - * `{{hash}}`. The `ngSrcset` directive solves this problem. - * - * The buggy way to write it: - * ```html - * Description - * ``` - * - * The correct way to write it: - * ```html - * Description - * ``` - * - * @element IMG - * @param {template} ngSrcset any string which can contain `{{}}` markup. - */ - -/** - * @ngdoc directive - * @name ngDisabled - * @restrict A - * @priority 100 - * - * @description - * - * This directive sets the `disabled` attribute on the element (typically a form control, - * e.g. `input`, `button`, `select` etc.) if the - * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy. - * - * A special directive is necessary because we cannot use interpolation inside the `disabled` - * attribute. See the {@link guide/interpolation interpolation guide} for more info. - * - * @example - - -
      - -
      - - it('should toggle button', function() { - expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy(); - element(by.model('checked')).click(); - expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy(); - }); - -
      - * - * @element INPUT - * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy, - * then the `disabled` attribute will be set on the element - */ - - -/** - * @ngdoc directive - * @name ngChecked - * @restrict A - * @priority 100 - * - * @description - * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy. - * - * Note that this directive should not be used together with {@link ngModel `ngModel`}, - * as this can lead to unexpected behavior. - * - * A special directive is necessary because we cannot use interpolation inside the `checked` - * attribute. See the {@link guide/interpolation interpolation guide} for more info. - * - * @example - - -
      - -
      - - it('should check both checkBoxes', function() { - expect(element(by.id('checkFollower')).getAttribute('checked')).toBeFalsy(); - element(by.model('leader')).click(); - expect(element(by.id('checkFollower')).getAttribute('checked')).toBeTruthy(); - }); - -
      - * - * @element INPUT - * @param {expression} ngChecked If the {@link guide/expression expression} is truthy, - * then the `checked` attribute will be set on the element - */ - - -/** - * @ngdoc directive - * @name ngReadonly - * @restrict A - * @priority 100 - * - * @description - * - * Sets the `readonly` attribute on the element, if the expression inside `ngReadonly` is truthy. - * Note that `readonly` applies only to `input` elements with specific types. [See the input docs on - * MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) for more information. - * - * A special directive is necessary because we cannot use interpolation inside the `readonly` - * attribute. See the {@link guide/interpolation interpolation guide} for more info. - * - * @example - - -
      - -
      - - it('should toggle readonly attr', function() { - expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy(); - element(by.model('checked')).click(); - expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy(); - }); - -
      - * - * @element INPUT - * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy, - * then special attribute "readonly" will be set on the element - */ - - -/** - * @ngdoc directive - * @name ngSelected - * @restrict A - * @priority 100 - * - * @description - * - * Sets the `selected` attribute on the element, if the expression inside `ngSelected` is truthy. - * - * A special directive is necessary because we cannot use interpolation inside the `selected` - * attribute. See the {@link guide/interpolation interpolation guide} for more info. - * - *
      - * **Note:** `ngSelected` does not interact with the `select` and `ngModel` directives, it only - * sets the `selected` attribute on the element. If you are using `ngModel` on the select, you - * should not use `ngSelected` on the options, as `ngModel` will set the select value and - * selected options. - *
      - * - * @example - - -
      - -
      - - it('should select Greetings!', function() { - expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy(); - element(by.model('selected')).click(); - expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy(); - }); - -
      - * - * @element OPTION - * @param {expression} ngSelected If the {@link guide/expression expression} is truthy, - * then special attribute "selected" will be set on the element - */ - -/** - * @ngdoc directive - * @name ngOpen - * @restrict A - * @priority 100 - * - * @description - * - * Sets the `open` attribute on the element, if the expression inside `ngOpen` is truthy. - * - * A special directive is necessary because we cannot use interpolation inside the `open` - * attribute. See the {@link guide/interpolation interpolation guide} for more info. - * - * ## A note about browser compatibility - * - * Internet Explorer and Edge do not support the `details` element, it is - * recommended to use {@link ng.ngShow} and {@link ng.ngHide} instead. - * - * @example - - -
      -
      - List -
        -
      • Apple
      • -
      • Orange
      • -
      • Durian
      • -
      -
      -
      - - it('should toggle open', function() { - expect(element(by.id('details')).getAttribute('open')).toBeFalsy(); - element(by.model('open')).click(); - expect(element(by.id('details')).getAttribute('open')).toBeTruthy(); - }); - -
      - * - * @element DETAILS - * @param {expression} ngOpen If the {@link guide/expression expression} is truthy, - * then special attribute "open" will be set on the element - */ - -var ngAttributeAliasDirectives = {}; - -// boolean attrs are evaluated -forEach(BOOLEAN_ATTR, function(propName, attrName) { - // binding to multiple is not supported - if (propName === 'multiple') return; - - function defaultLinkFn(scope, element, attr) { - scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) { - attr.$set(attrName, !!value); - }); - } - - var normalized = directiveNormalize('ng-' + attrName); - var linkFn = defaultLinkFn; - - if (propName === 'checked') { - linkFn = function(scope, element, attr) { - // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input - if (attr.ngModel !== attr[normalized]) { - defaultLinkFn(scope, element, attr); - } - }; - } - - ngAttributeAliasDirectives[normalized] = function() { - return { - restrict: 'A', - priority: 100, - link: linkFn - }; - }; -}); - -// aliased input attrs are evaluated -forEach(ALIASED_ATTR, function(htmlAttr, ngAttr) { - ngAttributeAliasDirectives[ngAttr] = function() { - return { - priority: 100, - link: function(scope, element, attr) { - //special case ngPattern when a literal regular expression value - //is used as the expression (this way we don't have to watch anything). - if (ngAttr === 'ngPattern' && attr.ngPattern.charAt(0) === '/') { - var match = attr.ngPattern.match(REGEX_STRING_REGEXP); - if (match) { - attr.$set('ngPattern', new RegExp(match[1], match[2])); - return; - } - } - - scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) { - attr.$set(ngAttr, value); - }); - } - }; - }; -}); - -// ng-src, ng-srcset, ng-href are interpolated -forEach(['src', 'srcset', 'href'], function(attrName) { - var normalized = directiveNormalize('ng-' + attrName); - ngAttributeAliasDirectives[normalized] = function() { - return { - priority: 99, // it needs to run after the attributes are interpolated - link: function(scope, element, attr) { - var propName = attrName, - name = attrName; - - if (attrName === 'href' && - toString.call(element.prop('href')) === '[object SVGAnimatedString]') { - name = 'xlinkHref'; - attr.$attr[name] = 'xlink:href'; - propName = null; - } - - attr.$observe(normalized, function(value) { - if (!value) { - if (attrName === 'href') { - attr.$set(name, null); - } - return; - } - - attr.$set(name, value); - - // Support: IE 9-11 only - // On IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist - // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need - // to set the property as well to achieve the desired effect. - // We use attr[attrName] value since $set can sanitize the url. - if (msie && propName) element.prop(propName, attr[name]); - }); - } - }; - }; -}); - -/* global -nullFormCtrl, -PENDING_CLASS, -SUBMITTED_CLASS - */ -var nullFormCtrl = { - $addControl: noop, - $$renameControl: nullFormRenameControl, - $removeControl: noop, - $setValidity: noop, - $setDirty: noop, - $setPristine: noop, - $setSubmitted: noop -}, -PENDING_CLASS = 'ng-pending', -SUBMITTED_CLASS = 'ng-submitted'; - -function nullFormRenameControl(control, name) { - control.$name = name; -} - -/** - * @ngdoc type - * @name form.FormController - * - * @property {boolean} $pristine True if user has not interacted with the form yet. - * @property {boolean} $dirty True if user has already interacted with the form. - * @property {boolean} $valid True if all of the containing forms and controls are valid. - * @property {boolean} $invalid True if at least one containing control or form is invalid. - * @property {boolean} $submitted True if user has submitted the form even if its invalid. - * - * @property {Object} $pending An object hash, containing references to controls or forms with - * pending validators, where: - * - * - keys are validations tokens (error names). - * - values are arrays of controls or forms that have a pending validator for the given error name. - * - * See {@link form.FormController#$error $error} for a list of built-in validation tokens. - * - * @property {Object} $error An object hash, containing references to controls or forms with failing - * validators, where: - * - * - keys are validation tokens (error names), - * - values are arrays of controls or forms that have a failing validator for the given error name. - * - * Built-in validation tokens: - * - `email` - * - `max` - * - `maxlength` - * - `min` - * - `minlength` - * - `number` - * - `pattern` - * - `required` - * - `url` - * - `date` - * - `datetimelocal` - * - `time` - * - `week` - * - `month` - * - * @description - * `FormController` keeps track of all its controls and nested forms as well as the state of them, - * such as being valid/invalid or dirty/pristine. - * - * Each {@link ng.directive:form form} directive creates an instance - * of `FormController`. - * - */ -//asks for $scope to fool the BC controller module -FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate']; -function FormController($element, $attrs, $scope, $animate, $interpolate) { - this.$$controls = []; - - // init state - this.$error = {}; - this.$$success = {}; - this.$pending = undefined; - this.$name = $interpolate($attrs.name || $attrs.ngForm || '')($scope); - this.$dirty = false; - this.$pristine = true; - this.$valid = true; - this.$invalid = false; - this.$submitted = false; - this.$$parentForm = nullFormCtrl; - - this.$$element = $element; - this.$$animate = $animate; - - setupValidity(this); -} - -FormController.prototype = { - /** - * @ngdoc method - * @name form.FormController#$rollbackViewValue - * - * @description - * Rollback all form controls pending updates to the `$modelValue`. - * - * Updates may be pending by a debounced event or because the input is waiting for a some future - * event defined in `ng-model-options`. This method is typically needed by the reset button of - * a form that uses `ng-model-options` to pend updates. - */ - $rollbackViewValue: function() { - forEach(this.$$controls, function(control) { - control.$rollbackViewValue(); - }); - }, - - /** - * @ngdoc method - * @name form.FormController#$commitViewValue - * - * @description - * Commit all form controls pending updates to the `$modelValue`. - * - * Updates may be pending by a debounced event or because the input is waiting for a some future - * event defined in `ng-model-options`. This method is rarely needed as `NgModelController` - * usually handles calling this in response to input events. - */ - $commitViewValue: function() { - forEach(this.$$controls, function(control) { - control.$commitViewValue(); - }); - }, - - /** - * @ngdoc method - * @name form.FormController#$addControl - * @param {object} control control object, either a {@link form.FormController} or an - * {@link ngModel.NgModelController} - * - * @description - * Register a control with the form. Input elements using ngModelController do this automatically - * when they are linked. - * - * Note that the current state of the control will not be reflected on the new parent form. This - * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine` - * state. - * - * However, if the method is used programmatically, for example by adding dynamically created controls, - * or controls that have been previously removed without destroying their corresponding DOM element, - * it's the developers responsibility to make sure the current state propagates to the parent form. - * - * For example, if an input control is added that is already `$dirty` and has `$error` properties, - * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form. - */ - $addControl: function(control) { - // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored - // and not added to the scope. Now we throw an error. - assertNotHasOwnProperty(control.$name, 'input'); - this.$$controls.push(control); - - if (control.$name) { - this[control.$name] = control; - } - - control.$$parentForm = this; - }, - - // Private API: rename a form control - $$renameControl: function(control, newName) { - var oldName = control.$name; - - if (this[oldName] === control) { - delete this[oldName]; - } - this[newName] = control; - control.$name = newName; - }, - - /** - * @ngdoc method - * @name form.FormController#$removeControl - * @param {object} control control object, either a {@link form.FormController} or an - * {@link ngModel.NgModelController} - * - * @description - * Deregister a control from the form. - * - * Input elements using ngModelController do this automatically when they are destroyed. - * - * Note that only the removed control's validation state (`$errors`etc.) will be removed from the - * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be - * different from case to case. For example, removing the only `$dirty` control from a form may or - * may not mean that the form is still `$dirty`. - */ - $removeControl: function(control) { - if (control.$name && this[control.$name] === control) { - delete this[control.$name]; - } - forEach(this.$pending, function(value, name) { - // eslint-disable-next-line no-invalid-this - this.$setValidity(name, null, control); - }, this); - forEach(this.$error, function(value, name) { - // eslint-disable-next-line no-invalid-this - this.$setValidity(name, null, control); - }, this); - forEach(this.$$success, function(value, name) { - // eslint-disable-next-line no-invalid-this - this.$setValidity(name, null, control); - }, this); - - arrayRemove(this.$$controls, control); - control.$$parentForm = nullFormCtrl; - }, - - /** - * @ngdoc method - * @name form.FormController#$setDirty - * - * @description - * Sets the form to a dirty state. - * - * This method can be called to add the 'ng-dirty' class and set the form to a dirty - * state (ng-dirty class). This method will also propagate to parent forms. - */ - $setDirty: function() { - this.$$animate.removeClass(this.$$element, PRISTINE_CLASS); - this.$$animate.addClass(this.$$element, DIRTY_CLASS); - this.$dirty = true; - this.$pristine = false; - this.$$parentForm.$setDirty(); - }, - - /** - * @ngdoc method - * @name form.FormController#$setPristine - * - * @description - * Sets the form to its pristine state. - * - * This method sets the form's `$pristine` state to true, the `$dirty` state to false, removes - * the `ng-dirty` class and adds the `ng-pristine` class. Additionally, it sets the `$submitted` - * state to false. - * - * This method will also propagate to all the controls contained in this form. - * - * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after - * saving or resetting it. - */ - $setPristine: function() { - this.$$animate.setClass(this.$$element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS); - this.$dirty = false; - this.$pristine = true; - this.$submitted = false; - forEach(this.$$controls, function(control) { - control.$setPristine(); - }); - }, - - /** - * @ngdoc method - * @name form.FormController#$setUntouched - * - * @description - * Sets the form to its untouched state. - * - * This method can be called to remove the 'ng-touched' class and set the form controls to their - * untouched state (ng-untouched class). - * - * Setting a form controls back to their untouched state is often useful when setting the form - * back to its pristine state. - */ - $setUntouched: function() { - forEach(this.$$controls, function(control) { - control.$setUntouched(); - }); - }, - - /** - * @ngdoc method - * @name form.FormController#$setSubmitted - * - * @description - * Sets the form to its submitted state. - */ - $setSubmitted: function() { - this.$$animate.addClass(this.$$element, SUBMITTED_CLASS); - this.$submitted = true; - this.$$parentForm.$setSubmitted(); - } -}; - -/** - * @ngdoc method - * @name form.FormController#$setValidity - * - * @description - * Change the validity state of the form, and notify the parent form (if any). - * - * Application developers will rarely need to call this method directly. It is used internally, by - * {@link ngModel.NgModelController#$setValidity NgModelController.$setValidity()}, to propagate a - * control's validity state to the parent `FormController`. - * - * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be - * assigned to either `$error[validationErrorKey]` or `$pending[validationErrorKey]` (for - * unfulfilled `$asyncValidators`), so that it is available for data-binding. The - * `validationErrorKey` should be in camelCase and will get converted into dash-case for - * class name. Example: `myError` will result in `ng-valid-my-error` and - * `ng-invalid-my-error` classes and can be bound to as `{{ someForm.$error.myError }}`. - * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending - * (undefined), or skipped (null). Pending is used for unfulfilled `$asyncValidators`. - * Skipped is used by AngularJS when validators do not run because of parse errors and when - * `$asyncValidators` do not run because any of the `$validators` failed. - * @param {NgModelController | FormController} controller - The controller whose validity state is - * triggering the change. - */ -addSetValidityMethod({ - clazz: FormController, - set: function(object, property, controller) { - var list = object[property]; - if (!list) { - object[property] = [controller]; - } else { - var index = list.indexOf(controller); - if (index === -1) { - list.push(controller); - } - } - }, - unset: function(object, property, controller) { - var list = object[property]; - if (!list) { - return; - } - arrayRemove(list, controller); - if (list.length === 0) { - delete object[property]; - } - } -}); - -/** - * @ngdoc directive - * @name ngForm - * @restrict EAC - * - * @description - * Nestable alias of {@link ng.directive:form `form`} directive. HTML - * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a - * sub-group of controls needs to be determined. - * - * Note: the purpose of `ngForm` is to group controls, - * but not to be a replacement for the `
      ` tag with all of its capabilities - * (e.g. posting to the server, ...). - * - * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into - * related scope, under this name. - * - */ - - /** - * @ngdoc directive - * @name form - * @restrict E - * - * @description - * Directive that instantiates - * {@link form.FormController FormController}. - * - * If the `name` attribute is specified, the form controller is published onto the current scope under - * this name. - * - * ## Alias: {@link ng.directive:ngForm `ngForm`} - * - * In AngularJS, forms can be nested. This means that the outer form is valid when all of the child - * forms are valid as well. However, browsers do not allow nesting of `` elements, so - * AngularJS provides the {@link ng.directive:ngForm `ngForm`} directive, which behaves identically to - * `form` but can be nested. Nested forms can be useful, for example, if the validity of a sub-group - * of controls needs to be determined. - * - * ## CSS classes - * - `ng-valid` is set if the form is valid. - * - `ng-invalid` is set if the form is invalid. - * - `ng-pending` is set if the form is pending. - * - `ng-pristine` is set if the form is pristine. - * - `ng-dirty` is set if the form is dirty. - * - `ng-submitted` is set if the form was submitted. - * - * Keep in mind that ngAnimate can detect each of these classes when added and removed. - * - * - * ## Submitting a form and preventing the default action - * - * Since the role of forms in client-side AngularJS applications is different than in classical - * roundtrip apps, it is desirable for the browser not to translate the form submission into a full - * page reload that sends the data to the server. Instead some javascript logic should be triggered - * to handle the form submission in an application-specific way. - * - * For this reason, AngularJS prevents the default action (form submission to the server) unless the - * `` element has an `action` attribute specified. - * - * You can use one of the following two ways to specify what javascript method should be called when - * a form is submitted: - * - * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element - * - {@link ng.directive:ngClick ngClick} directive on the first - * button or input field of type submit (input[type=submit]) - * - * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit} - * or {@link ng.directive:ngClick ngClick} directives. - * This is because of the following form submission rules in the HTML specification: - * - * - If a form has only one input field then hitting enter in this field triggers form submit - * (`ngSubmit`) - * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter - * doesn't trigger submit - * - if a form has one or more input fields and one or more buttons or input[type=submit] then - * hitting enter in any of the input fields will trigger the click handler on the *first* button or - * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`) - * - * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is - * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit` - * to have access to the updated model. - * - * @animations - * Animations in ngForm are triggered when any of the associated CSS classes are added and removed. - * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any - * other validations that are performed within the form. Animations in ngForm are similar to how - * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well - * as JS animations. - * - * The following example shows a simple way to utilize CSS transitions to style a form element - * that has been rendered as invalid after it has been validated: - * - *
      - * //be sure to include ngAnimate as a module to hook into more
      - * //advanced animations
      - * .my-form {
      - *   transition:0.5s linear all;
      - *   background: white;
      - * }
      - * .my-form.ng-invalid {
      - *   background: red;
      - *   color:white;
      - * }
      - * 
      - * - * @example - - - - - - userType: - Required!
      - userType = {{userType}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      - -
      - - it('should initialize to model', function() { - var userType = element(by.binding('userType')); - var valid = element(by.binding('myForm.input.$valid')); - - expect(userType.getText()).toContain('guest'); - expect(valid.getText()).toContain('true'); - }); - - it('should be invalid if empty', function() { - var userType = element(by.binding('userType')); - var valid = element(by.binding('myForm.input.$valid')); - var userInput = element(by.model('userType')); - - userInput.clear(); - userInput.sendKeys(''); - - expect(userType.getText()).toEqual('userType ='); - expect(valid.getText()).toContain('false'); - }); - -
      - * - * @param {string=} name Name of the form. If specified, the form controller will be published into - * related scope, under this name. - */ -var formDirectiveFactory = function(isNgForm) { - return ['$timeout', '$parse', function($timeout, $parse) { - var formDirective = { - name: 'form', - restrict: isNgForm ? 'EAC' : 'E', - require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form - controller: FormController, - compile: function ngFormCompile(formElement, attr) { - // Setup initial state of the control - formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS); - - var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false); - - return { - pre: function ngFormPreLink(scope, formElement, attr, ctrls) { - var controller = ctrls[0]; - - // if `action` attr is not present on the form, prevent the default action (submission) - if (!('action' in attr)) { - // we can't use jq events because if a form is destroyed during submission the default - // action is not prevented. see #1238 - // - // IE 9 is not affected because it doesn't fire a submit event and try to do a full - // page reload if the form was destroyed by submission of the form via a click handler - // on a button in the form. Looks like an IE9 specific bug. - var handleFormSubmission = function(event) { - scope.$apply(function() { - controller.$commitViewValue(); - controller.$setSubmitted(); - }); - - event.preventDefault(); - }; - - formElement[0].addEventListener('submit', handleFormSubmission); - - // unregister the preventDefault listener so that we don't not leak memory but in a - // way that will achieve the prevention of the default action. - formElement.on('$destroy', function() { - $timeout(function() { - formElement[0].removeEventListener('submit', handleFormSubmission); - }, 0, false); - }); - } - - var parentFormCtrl = ctrls[1] || controller.$$parentForm; - parentFormCtrl.$addControl(controller); - - var setter = nameAttr ? getSetter(controller.$name) : noop; - - if (nameAttr) { - setter(scope, controller); - attr.$observe(nameAttr, function(newValue) { - if (controller.$name === newValue) return; - setter(scope, undefined); - controller.$$parentForm.$$renameControl(controller, newValue); - setter = getSetter(controller.$name); - setter(scope, controller); - }); - } - formElement.on('$destroy', function() { - controller.$$parentForm.$removeControl(controller); - setter(scope, undefined); - extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards - }); - } - }; - } - }; - - return formDirective; - - function getSetter(expression) { - if (expression === '') { - //create an assignable expression, so forms with an empty name can be renamed later - return $parse('this[""]').assign; - } - return $parse(expression).assign || noop; - } - }]; -}; - -var formDirective = formDirectiveFactory(); -var ngFormDirective = formDirectiveFactory(true); - - - -// helper methods -function setupValidity(instance) { - instance.$$classCache = {}; - instance.$$classCache[INVALID_CLASS] = !(instance.$$classCache[VALID_CLASS] = instance.$$element.hasClass(VALID_CLASS)); -} -function addSetValidityMethod(context) { - var clazz = context.clazz, - set = context.set, - unset = context.unset; - - clazz.prototype.$setValidity = function(validationErrorKey, state, controller) { - if (isUndefined(state)) { - createAndSet(this, '$pending', validationErrorKey, controller); - } else { - unsetAndCleanup(this, '$pending', validationErrorKey, controller); - } - if (!isBoolean(state)) { - unset(this.$error, validationErrorKey, controller); - unset(this.$$success, validationErrorKey, controller); - } else { - if (state) { - unset(this.$error, validationErrorKey, controller); - set(this.$$success, validationErrorKey, controller); - } else { - set(this.$error, validationErrorKey, controller); - unset(this.$$success, validationErrorKey, controller); - } - } - if (this.$pending) { - cachedToggleClass(this, PENDING_CLASS, true); - this.$valid = this.$invalid = undefined; - toggleValidationCss(this, '', null); - } else { - cachedToggleClass(this, PENDING_CLASS, false); - this.$valid = isObjectEmpty(this.$error); - this.$invalid = !this.$valid; - toggleValidationCss(this, '', this.$valid); - } - - // re-read the state as the set/unset methods could have - // combined state in this.$error[validationError] (used for forms), - // where setting/unsetting only increments/decrements the value, - // and does not replace it. - var combinedState; - if (this.$pending && this.$pending[validationErrorKey]) { - combinedState = undefined; - } else if (this.$error[validationErrorKey]) { - combinedState = false; - } else if (this.$$success[validationErrorKey]) { - combinedState = true; - } else { - combinedState = null; - } - - toggleValidationCss(this, validationErrorKey, combinedState); - this.$$parentForm.$setValidity(validationErrorKey, combinedState, this); - }; - - function createAndSet(ctrl, name, value, controller) { - if (!ctrl[name]) { - ctrl[name] = {}; - } - set(ctrl[name], value, controller); - } - - function unsetAndCleanup(ctrl, name, value, controller) { - if (ctrl[name]) { - unset(ctrl[name], value, controller); - } - if (isObjectEmpty(ctrl[name])) { - ctrl[name] = undefined; - } - } - - function cachedToggleClass(ctrl, className, switchValue) { - if (switchValue && !ctrl.$$classCache[className]) { - ctrl.$$animate.addClass(ctrl.$$element, className); - ctrl.$$classCache[className] = true; - } else if (!switchValue && ctrl.$$classCache[className]) { - ctrl.$$animate.removeClass(ctrl.$$element, className); - ctrl.$$classCache[className] = false; - } - } - - function toggleValidationCss(ctrl, validationErrorKey, isValid) { - validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : ''; - - cachedToggleClass(ctrl, VALID_CLASS + validationErrorKey, isValid === true); - cachedToggleClass(ctrl, INVALID_CLASS + validationErrorKey, isValid === false); - } -} - -function isObjectEmpty(obj) { - if (obj) { - for (var prop in obj) { - if (obj.hasOwnProperty(prop)) { - return false; - } - } - } - return true; -} - -/* global - VALID_CLASS: false, - INVALID_CLASS: false, - PRISTINE_CLASS: false, - DIRTY_CLASS: false, - ngModelMinErr: false -*/ - -// Regex code was initially obtained from SO prior to modification: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231 -var ISO_DATE_REGEXP = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/; -// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987) -// Note: We are being more lenient, because browsers are too. -// 1. Scheme -// 2. Slashes -// 3. Username -// 4. Password -// 5. Hostname -// 6. Port -// 7. Path -// 8. Query -// 9. Fragment -// 1111111111111111 222 333333 44444 55555555555555555555555 666 77777777 8888888 999 -var URL_REGEXP = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i; -// eslint-disable-next-line max-len -var EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/; -var NUMBER_REGEXP = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/; -var DATE_REGEXP = /^(\d{4,})-(\d{2})-(\d{2})$/; -var DATETIMELOCAL_REGEXP = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/; -var WEEK_REGEXP = /^(\d{4,})-W(\d\d)$/; -var MONTH_REGEXP = /^(\d{4,})-(\d\d)$/; -var TIME_REGEXP = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/; - -var PARTIAL_VALIDATION_EVENTS = 'keydown wheel mousedown'; -var PARTIAL_VALIDATION_TYPES = createMap(); -forEach('date,datetime-local,month,time,week'.split(','), function(type) { - PARTIAL_VALIDATION_TYPES[type] = true; -}); - -var inputType = { - - /** - * @ngdoc input - * @name input[text] - * - * @description - * Standard HTML text input with AngularJS data binding, inherited by most of the `input` elements. - * - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} required Adds `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than - * minlength. - * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than - * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of - * any length. - * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string - * that contains the regular expression body that will be converted to a regular expression - * as in the ngPattern directive. - * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} - * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value. - * If the expression evaluates to a RegExp object, then this is used directly. - * If the expression evaluates to a string, then it will be converted to a RegExp - * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to - * `new RegExp('^abc$')`.
      - * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to - * start at the index of the last search's match, thus not taking the whole input value into - * account. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input. - * This parameter is ignored for input[type=password] controls, which will never trim the - * input. - * - * @example - - - -
      - -
      - - Required! - - Single word only! -
      - text = {{example.text}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var text = element(by.binding('example.text')); - var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('example.text')); - - it('should initialize to model', function() { - expect(text.getText()).toContain('guest'); - expect(valid.getText()).toContain('true'); - }); - - it('should be invalid if empty', function() { - input.clear(); - input.sendKeys(''); - - expect(text.getText()).toEqual('text ='); - expect(valid.getText()).toContain('false'); - }); - - it('should be invalid if multi word', function() { - input.clear(); - input.sendKeys('hello world'); - - expect(valid.getText()).toContain('false'); - }); - -
      - */ - 'text': textInputType, - - /** - * @ngdoc input - * @name input[date] - * - * @description - * Input with date validation and transformation. In browsers that do not yet support - * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601 - * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many - * modern browsers do not yet support this input type, it is important to provide cues to users on the - * expected input format via a placeholder or label. - * - * The model must always be a Date object, otherwise AngularJS will throw an error. - * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. - * - * The timezone to be used to read/write the `Date` instance in the model can be defined using - * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a - * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute - * (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Note that `min` will also add native HTML5 - * constraint validation. - * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be - * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute - * (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Note that `max` will also add native HTML5 - * constraint validation. - * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string - * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. - * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string - * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - - -
      - - Required! - - Not a valid date! -
      - value = {{example.value | date: "yyyy-MM-dd"}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var value = element(by.binding('example.value | date: "yyyy-MM-dd"')); - var valid = element(by.binding('myForm.input.$valid')); - - // currently protractor/webdriver does not support - // sending keys to all known HTML5 input controls - // for various browsers (see https://github.com/angular/protractor/issues/562). - function setInput(val) { - // set the value of the element and force validation. - var scr = "var ipt = document.getElementById('exampleInput'); " + - "ipt.value = '" + val + "';" + - "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; - browser.executeScript(scr); - } - - it('should initialize to model', function() { - expect(value.getText()).toContain('2013-10-22'); - expect(valid.getText()).toContain('myForm.input.$valid = true'); - }); - - it('should be invalid if empty', function() { - setInput(''); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - - it('should be invalid if over max', function() { - setInput('2015-01-01'); - expect(value.getText()).toContain(''); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - -
      - */ - 'date': createDateInputType('date', DATE_REGEXP, - createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']), - 'yyyy-MM-dd'), - - /** - * @ngdoc input - * @name input[datetime-local] - * - * @description - * Input with datetime validation and transformation. In browsers that do not yet support - * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 - * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. - * - * The model must always be a Date object, otherwise AngularJS will throw an error. - * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. - * - * The timezone to be used to read/write the `Date` instance in the model can be defined using - * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. - * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation - * inside this attribute (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`). - * Note that `min` will also add native HTML5 constraint validation. - * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. - * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation - * inside this attribute (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`). - * Note that `max` will also add native HTML5 constraint validation. - * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string - * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. - * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string - * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - - -
      - - Required! - - Not a valid date! -
      - value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"')); - var valid = element(by.binding('myForm.input.$valid')); - - // currently protractor/webdriver does not support - // sending keys to all known HTML5 input controls - // for various browsers (https://github.com/angular/protractor/issues/562). - function setInput(val) { - // set the value of the element and force validation. - var scr = "var ipt = document.getElementById('exampleInput'); " + - "ipt.value = '" + val + "';" + - "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; - browser.executeScript(scr); - } - - it('should initialize to model', function() { - expect(value.getText()).toContain('2010-12-28T14:57:00'); - expect(valid.getText()).toContain('myForm.input.$valid = true'); - }); - - it('should be invalid if empty', function() { - setInput(''); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - - it('should be invalid if over max', function() { - setInput('2015-01-01T23:59:00'); - expect(value.getText()).toContain(''); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - -
      - */ - 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP, - createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']), - 'yyyy-MM-ddTHH:mm:ss.sss'), - - /** - * @ngdoc input - * @name input[time] - * - * @description - * Input with time validation and transformation. In browsers that do not yet support - * the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 - * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a - * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`. - * - * The model must always be a Date object, otherwise AngularJS will throw an error. - * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. - * - * The timezone to be used to read/write the `Date` instance in the model can be defined using - * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. - * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this - * attribute (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`). Note that `min` will also add - * native HTML5 constraint validation. - * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. - * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this - * attribute (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`). Note that `max` will also add - * native HTML5 constraint validation. - * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the - * `ngMin` expression evaluates to. Note that it does not set the `min` attribute. - * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the - * `ngMax` expression evaluates to. Note that it does not set the `max` attribute. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - - -
      - - Required! - - Not a valid date! -
      - value = {{example.value | date: "HH:mm:ss"}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var value = element(by.binding('example.value | date: "HH:mm:ss"')); - var valid = element(by.binding('myForm.input.$valid')); - - // currently protractor/webdriver does not support - // sending keys to all known HTML5 input controls - // for various browsers (https://github.com/angular/protractor/issues/562). - function setInput(val) { - // set the value of the element and force validation. - var scr = "var ipt = document.getElementById('exampleInput'); " + - "ipt.value = '" + val + "';" + - "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; - browser.executeScript(scr); - } - - it('should initialize to model', function() { - expect(value.getText()).toContain('14:57:00'); - expect(valid.getText()).toContain('myForm.input.$valid = true'); - }); - - it('should be invalid if empty', function() { - setInput(''); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - - it('should be invalid if over max', function() { - setInput('23:59:00'); - expect(value.getText()).toContain(''); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - -
      - */ - 'time': createDateInputType('time', TIME_REGEXP, - createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']), - 'HH:mm:ss.sss'), - - /** - * @ngdoc input - * @name input[week] - * - * @description - * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support - * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 - * week format (yyyy-W##), for example: `2013-W02`. - * - * The model must always be a Date object, otherwise AngularJS will throw an error. - * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. - * - * The timezone to be used to read/write the `Date` instance in the model can be defined using - * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. - * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this - * attribute (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Note that `min` will also add - * native HTML5 constraint validation. - * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. - * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this - * attribute (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Note that `max` will also add - * native HTML5 constraint validation. - * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string - * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. - * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string - * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - -
      - - Required! - - Not a valid date! -
      - value = {{example.value | date: "yyyy-Www"}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var value = element(by.binding('example.value | date: "yyyy-Www"')); - var valid = element(by.binding('myForm.input.$valid')); - - // currently protractor/webdriver does not support - // sending keys to all known HTML5 input controls - // for various browsers (https://github.com/angular/protractor/issues/562). - function setInput(val) { - // set the value of the element and force validation. - var scr = "var ipt = document.getElementById('exampleInput'); " + - "ipt.value = '" + val + "';" + - "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; - browser.executeScript(scr); - } - - it('should initialize to model', function() { - expect(value.getText()).toContain('2013-W01'); - expect(valid.getText()).toContain('myForm.input.$valid = true'); - }); - - it('should be invalid if empty', function() { - setInput(''); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - - it('should be invalid if over max', function() { - setInput('2015-W01'); - expect(value.getText()).toContain(''); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - -
      - */ - 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'), - - /** - * @ngdoc input - * @name input[month] - * - * @description - * Input with month validation and transformation. In browsers that do not yet support - * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601 - * month format (yyyy-MM), for example: `2009-01`. - * - * The model must always be a Date object, otherwise AngularJS will throw an error. - * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string. - * If the model is not set to the first of the month, the next view to model update will set it - * to the first of the month. - * - * The timezone to be used to read/write the `Date` instance in the model can be defined using - * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. - * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this - * attribute (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Note that `min` will also add - * native HTML5 constraint validation. - * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. - * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this - * attribute (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Note that `max` will also add - * native HTML5 constraint validation. - * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string - * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute. - * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string - * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute. - - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - - -
      - - Required! - - Not a valid month! -
      - value = {{example.value | date: "yyyy-MM"}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var value = element(by.binding('example.value | date: "yyyy-MM"')); - var valid = element(by.binding('myForm.input.$valid')); - - // currently protractor/webdriver does not support - // sending keys to all known HTML5 input controls - // for various browsers (https://github.com/angular/protractor/issues/562). - function setInput(val) { - // set the value of the element and force validation. - var scr = "var ipt = document.getElementById('exampleInput'); " + - "ipt.value = '" + val + "';" + - "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });"; - browser.executeScript(scr); - } - - it('should initialize to model', function() { - expect(value.getText()).toContain('2013-10'); - expect(valid.getText()).toContain('myForm.input.$valid = true'); - }); - - it('should be invalid if empty', function() { - setInput(''); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - - it('should be invalid if over max', function() { - setInput('2015-01'); - expect(value.getText()).toContain(''); - expect(valid.getText()).toContain('myForm.input.$valid = false'); - }); - -
      - */ - 'month': createDateInputType('month', MONTH_REGEXP, - createDateParser(MONTH_REGEXP, ['yyyy', 'MM']), - 'yyyy-MM'), - - /** - * @ngdoc input - * @name input[number] - * - * @description - * Text input with number validation and transformation. Sets the `number` validation - * error if not a valid number. - * - *
      - * The model must always be of type `number` otherwise AngularJS will throw an error. - * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt} - * error docs for more information and an example of how to convert your model if necessary. - *
      - * - * ## Issues with HTML5 constraint validation - * - * In browsers that follow the - * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29), - * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}. - * If a non-number is entered in the input, the browser will report the value as an empty string, - * which means the view / model values in `ngModel` and subsequently the scope value - * will also be an empty string. - * - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. - * Can be interpolated. - * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. - * Can be interpolated. - * @param {string=} ngMin Like `min`, sets the `min` validation error key if the value entered is less than `ngMin`, - * but does not trigger HTML5 native validation. Takes an expression. - * @param {string=} ngMax Like `max`, sets the `max` validation error key if the value entered is greater than `ngMax`, - * but does not trigger HTML5 native validation. Takes an expression. - * @param {string=} step Sets the `step` validation error key if the value entered does not fit the `step` constraint. - * Can be interpolated. - * @param {string=} ngStep Like `step`, sets the `step` validation error key if the value entered does not fit the `ngStep` constraint, - * but does not trigger HTML5 native validation. Takes an expression. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than - * minlength. - * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than - * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of - * any length. - * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string - * that contains the regular expression body that will be converted to a regular expression - * as in the ngPattern directive. - * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} - * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value. - * If the expression evaluates to a RegExp object, then this is used directly. - * If the expression evaluates to a string, then it will be converted to a RegExp - * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to - * `new RegExp('^abc$')`.
      - * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to - * start at the index of the last search's match, thus not taking the whole input value into - * account. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - -
      - - Required! - - Not valid number! -
      - value = {{example.value}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      -
      -
      - - var value = element(by.binding('example.value')); - var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('example.value')); - - it('should initialize to model', function() { - expect(value.getText()).toContain('12'); - expect(valid.getText()).toContain('true'); - }); - - it('should be invalid if empty', function() { - input.clear(); - input.sendKeys(''); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('false'); - }); - - it('should be invalid if over max', function() { - input.clear(); - input.sendKeys('123'); - expect(value.getText()).toEqual('value ='); - expect(valid.getText()).toContain('false'); - }); - -
      - */ - 'number': numberInputType, - - - /** - * @ngdoc input - * @name input[url] - * - * @description - * Text input with URL validation. Sets the `url` validation error key if the content is not a - * valid URL. - * - *
      - * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex - * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify - * the built-in validators (see the {@link guide/forms Forms guide}) - *
      - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than - * minlength. - * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than - * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of - * any length. - * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string - * that contains the regular expression body that will be converted to a regular expression - * as in the ngPattern directive. - * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} - * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value. - * If the expression evaluates to a RegExp object, then this is used directly. - * If the expression evaluates to a string, then it will be converted to a RegExp - * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to - * `new RegExp('^abc$')`.
      - * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to - * start at the index of the last search's match, thus not taking the whole input value into - * account. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      -
      - - var text = element(by.binding('url.text')); - var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('url.text')); - - it('should initialize to model', function() { - expect(text.getText()).toContain('http://google.com'); - expect(valid.getText()).toContain('true'); - }); - - it('should be invalid if empty', function() { - input.clear(); - input.sendKeys(''); - - expect(text.getText()).toEqual('text ='); - expect(valid.getText()).toContain('false'); - }); - - it('should be invalid if not url', function() { - input.clear(); - input.sendKeys('box'); - - expect(valid.getText()).toContain('false'); - }); - -
      - */ - 'url': urlInputType, - - - /** - * @ngdoc input - * @name input[email] - * - * @description - * Text input with email validation. Sets the `email` validation error key if not a valid email - * address. - * - *
      - * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex - * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can - * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide}) - *
      - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than - * minlength. - * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than - * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of - * any length. - * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string - * that contains the regular expression body that will be converted to a regular expression - * as in the ngPattern directive. - * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} - * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value. - * If the expression evaluates to a RegExp object, then this is used directly. - * If the expression evaluates to a string, then it will be converted to a RegExp - * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to - * `new RegExp('^abc$')`.
      - * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to - * start at the index of the last search's match, thus not taking the whole input value into - * account. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      - -
      - - Required! - - Not valid email! -
      - text = {{email.text}}
      - myForm.input.$valid = {{myForm.input.$valid}}
      - myForm.input.$error = {{myForm.input.$error}}
      - myForm.$valid = {{myForm.$valid}}
      - myForm.$error.required = {{!!myForm.$error.required}}
      - myForm.$error.email = {{!!myForm.$error.email}}
      -
      -
      - - var text = element(by.binding('email.text')); - var valid = element(by.binding('myForm.input.$valid')); - var input = element(by.model('email.text')); - - it('should initialize to model', function() { - expect(text.getText()).toContain('me@example.com'); - expect(valid.getText()).toContain('true'); - }); - - it('should be invalid if empty', function() { - input.clear(); - input.sendKeys(''); - expect(text.getText()).toEqual('text ='); - expect(valid.getText()).toContain('false'); - }); - - it('should be invalid if not email', function() { - input.clear(); - input.sendKeys('xxx'); - - expect(valid.getText()).toContain('false'); - }); - -
      - */ - 'email': emailInputType, - - - /** - * @ngdoc input - * @name input[radio] - * - * @description - * HTML radio button. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string} value The value to which the `ngModel` expression should be set when selected. - * Note that `value` only supports `string` values, i.e. the scope model needs to be a string, - * too. Use `ngValue` if you need complex models (`number`, `object`, ...). - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * @param {string} ngValue AngularJS expression to which `ngModel` will be be set when the radio - * is selected. Should be used instead of the `value` attribute if you need - * a non-string `ngModel` (`boolean`, `array`, ...). - * - * @example - - - -
      -
      -
      -
      - color = {{color.name | json}}
      -
      - Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. -
      - - it('should change state', function() { - var inputs = element.all(by.model('color.name')); - var color = element(by.binding('color.name')); - - expect(color.getText()).toContain('blue'); - - inputs.get(0).click(); - expect(color.getText()).toContain('red'); - - inputs.get(1).click(); - expect(color.getText()).toContain('green'); - }); - -
      - */ - 'radio': radioInputType, - - /** - * @ngdoc input - * @name input[range] - * - * @description - * Native range input with validation and transformation. - * - * The model for the range input must always be a `Number`. - * - * IE9 and other browsers that do not support the `range` type fall back - * to a text input without any default values for `min`, `max` and `step`. Model binding, - * validation and number parsing are nevertheless supported. - * - * Browsers that support range (latest Chrome, Safari, Firefox, Edge) treat `input[range]` - * in a way that never allows the input to hold an invalid value. That means: - * - any non-numerical value is set to `(max + min) / 2`. - * - any numerical value that is less than the current min val, or greater than the current max val - * is set to the min / max val respectively. - * - additionally, the current `step` is respected, so the nearest value that satisfies a step - * is used. - * - * See the [HTML Spec on input[type=range]](https://www.w3.org/TR/html5/forms.html#range-state-(type=range)) - * for more info. - * - * This has the following consequences for AngularJS: - * - * Since the element value should always reflect the current model value, a range input - * will set the bound ngModel expression to the value that the browser has set for the - * input element. For example, in the following input ``, - * if the application sets `model.value = null`, the browser will set the input to `'50'`. - * AngularJS will then set the model to `50`, to prevent input and model value being out of sync. - * - * That means the model for range will immediately be set to `50` after `ngModel` has been - * initialized. It also means a range input can never have the required error. - * - * This does not only affect changes to the model value, but also to the values of the `min`, - * `max`, and `step` attributes. When these change in a way that will cause the browser to modify - * the input value, AngularJS will also update the model value. - * - * Automatic value adjustment also means that a range input element can never have the `required`, - * `min`, or `max` errors. - * - * However, `step` is currently only fully implemented by Firefox. Other browsers have problems - * when the step value changes dynamically - they do not adjust the element value correctly, but - * instead may set the `stepMismatch` error. If that's the case, the AngularJS will set the `step` - * error on the input, and set the model to `undefined`. - * - * Note that `input[range]` is not compatible with`ngMax`, `ngMin`, and `ngStep`, because they do - * not set the `min` and `max` attributes, which means that the browser won't automatically adjust - * the input value based on their values, and will always assume min = 0, max = 100, and step = 1. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} min Sets the `min` validation to ensure that the value entered is greater - * than `min`. Can be interpolated. - * @param {string=} max Sets the `max` validation to ensure that the value entered is less than `max`. - * Can be interpolated. - * @param {string=} step Sets the `step` validation to ensure that the value entered matches the `step` - * Can be interpolated. - * @param {string=} ngChange AngularJS expression to be executed when the ngModel value changes due - * to user interaction with the input element. - * @param {expression=} ngChecked If the expression is truthy, then the `checked` attribute will be set on the - * element. **Note** : `ngChecked` should not be used alongside `ngModel`. - * Checkout {@link ng.directive:ngChecked ngChecked} for usage. - * - * @example - - - -
      - - Model as range: -
      - Model as number:
      - Min:
      - Max:
      - value = {{value}}
      - myForm.range.$valid = {{myForm.range.$valid}}
      - myForm.range.$error = {{myForm.range.$error}} -
      -
      -
      - - * ## Range Input with ngMin & ngMax attributes - - * @example - - - -
      - Model as range: -
      - Model as number:
      - Min:
      - Max:
      - value = {{value}}
      - myForm.range.$valid = {{myForm.range.$valid}}
      - myForm.range.$error = {{myForm.range.$error}} -
      -
      -
      - - */ - 'range': rangeInputType, - - /** - * @ngdoc input - * @name input[checkbox] - * - * @description - * HTML checkbox. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {expression=} ngTrueValue The value to which the expression should be set when selected. - * @param {expression=} ngFalseValue The value to which the expression should be set when not selected. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * - * @example - - - -
      -
      -
      - value1 = {{checkboxModel.value1}}
      - value2 = {{checkboxModel.value2}}
      -
      -
      - - it('should change state', function() { - var value1 = element(by.binding('checkboxModel.value1')); - var value2 = element(by.binding('checkboxModel.value2')); - - expect(value1.getText()).toContain('true'); - expect(value2.getText()).toContain('YES'); - - element(by.model('checkboxModel.value1')).click(); - element(by.model('checkboxModel.value2')).click(); - - expect(value1.getText()).toContain('false'); - expect(value2.getText()).toContain('NO'); - }); - -
      - */ - 'checkbox': checkboxInputType, - - 'hidden': noop, - 'button': noop, - 'submit': noop, - 'reset': noop, - 'file': noop -}; - -function stringBasedInputType(ctrl) { - ctrl.$formatters.push(function(value) { - return ctrl.$isEmpty(value) ? value : value.toString(); - }); -} - -function textInputType(scope, element, attr, ctrl, $sniffer, $browser) { - baseInputType(scope, element, attr, ctrl, $sniffer, $browser); - stringBasedInputType(ctrl); -} - -function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) { - var type = lowercase(element[0].type); - - // In composition mode, users are still inputting intermediate text buffer, - // hold the listener until composition is done. - // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent - if (!$sniffer.android) { - var composing = false; - - element.on('compositionstart', function() { - composing = true; - }); - - element.on('compositionend', function() { - composing = false; - listener(); - }); - } - - var timeout; - - var listener = function(ev) { - if (timeout) { - $browser.defer.cancel(timeout); - timeout = null; - } - if (composing) return; - var value = element.val(), - event = ev && ev.type; - - // By default we will trim the value - // If the attribute ng-trim exists we will avoid trimming - // If input type is 'password', the value is never trimmed - if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) { - value = trim(value); - } - - // If a control is suffering from bad input (due to native validators), browsers discard its - // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the - // control's value is the same empty value twice in a row. - if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) { - ctrl.$setViewValue(value, event); - } - }; - - // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the - // input event on backspace, delete or cut - if ($sniffer.hasEvent('input')) { - element.on('input', listener); - } else { - var deferListener = function(ev, input, origValue) { - if (!timeout) { - timeout = $browser.defer(function() { - timeout = null; - if (!input || input.value !== origValue) { - listener(ev); - } - }); - } - }; - - element.on('keydown', /** @this */ function(event) { - var key = event.keyCode; - - // ignore - // command modifiers arrows - if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return; - - deferListener(event, this, this.value); - }); - - // if user modifies input value using context menu in IE, we need "paste", "cut" and "drop" events to catch it - if ($sniffer.hasEvent('paste')) { - element.on('paste cut drop', deferListener); - } - } - - // if user paste into input using mouse on older browser - // or form autocomplete on newer browser, we need "change" event to catch it - element.on('change', listener); - - // Some native input types (date-family) have the ability to change validity without - // firing any input/change events. - // For these event types, when native validators are present and the browser supports the type, - // check for validity changes on various DOM events. - if (PARTIAL_VALIDATION_TYPES[type] && ctrl.$$hasNativeValidators && type === attr.type) { - element.on(PARTIAL_VALIDATION_EVENTS, /** @this */ function(ev) { - if (!timeout) { - var validity = this[VALIDITY_STATE_PROPERTY]; - var origBadInput = validity.badInput; - var origTypeMismatch = validity.typeMismatch; - timeout = $browser.defer(function() { - timeout = null; - if (validity.badInput !== origBadInput || validity.typeMismatch !== origTypeMismatch) { - listener(ev); - } - }); - } - }); - } - - ctrl.$render = function() { - // Workaround for Firefox validation #12102. - var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue; - if (element.val() !== value) { - element.val(value); - } - }; -} - -function weekParser(isoWeek, existingDate) { - if (isDate(isoWeek)) { - return isoWeek; - } - - if (isString(isoWeek)) { - WEEK_REGEXP.lastIndex = 0; - var parts = WEEK_REGEXP.exec(isoWeek); - if (parts) { - var year = +parts[1], - week = +parts[2], - hours = 0, - minutes = 0, - seconds = 0, - milliseconds = 0, - firstThurs = getFirstThursdayOfYear(year), - addDays = (week - 1) * 7; - - if (existingDate) { - hours = existingDate.getHours(); - minutes = existingDate.getMinutes(); - seconds = existingDate.getSeconds(); - milliseconds = existingDate.getMilliseconds(); - } - - return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds); - } - } - - return NaN; -} - -function createDateParser(regexp, mapping) { - return function(iso, date) { - var parts, map; - - if (isDate(iso)) { - return iso; - } - - if (isString(iso)) { - // When a date is JSON'ified to wraps itself inside of an extra - // set of double quotes. This makes the date parsing code unable - // to match the date string and parse it as a date. - if (iso.charAt(0) === '"' && iso.charAt(iso.length - 1) === '"') { - iso = iso.substring(1, iso.length - 1); - } - if (ISO_DATE_REGEXP.test(iso)) { - return new Date(iso); - } - regexp.lastIndex = 0; - parts = regexp.exec(iso); - - if (parts) { - parts.shift(); - if (date) { - map = { - yyyy: date.getFullYear(), - MM: date.getMonth() + 1, - dd: date.getDate(), - HH: date.getHours(), - mm: date.getMinutes(), - ss: date.getSeconds(), - sss: date.getMilliseconds() / 1000 - }; - } else { - map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }; - } - - forEach(parts, function(part, index) { - if (index < mapping.length) { - map[mapping[index]] = +part; - } - }); - return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0); - } - } - - return NaN; - }; -} - -function createDateInputType(type, regexp, parseDate, format) { - return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) { - badInputChecker(scope, element, attr, ctrl); - baseInputType(scope, element, attr, ctrl, $sniffer, $browser); - var timezone = ctrl && ctrl.$options.getOption('timezone'); - var previousDate; - - ctrl.$$parserName = type; - ctrl.$parsers.push(function(value) { - if (ctrl.$isEmpty(value)) return null; - if (regexp.test(value)) { - // Note: We cannot read ctrl.$modelValue, as there might be a different - // parser/formatter in the processing chain so that the model - // contains some different data format! - var parsedDate = parseDate(value, previousDate); - if (timezone) { - parsedDate = convertTimezoneToLocal(parsedDate, timezone); - } - return parsedDate; - } - return undefined; - }); - - ctrl.$formatters.push(function(value) { - if (value && !isDate(value)) { - throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value); - } - if (isValidDate(value)) { - previousDate = value; - if (previousDate && timezone) { - previousDate = convertTimezoneToLocal(previousDate, timezone, true); - } - return $filter('date')(value, format, timezone); - } else { - previousDate = null; - return ''; - } - }); - - if (isDefined(attr.min) || attr.ngMin) { - var minVal; - ctrl.$validators.min = function(value) { - return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal; - }; - attr.$observe('min', function(val) { - minVal = parseObservedDateValue(val); - ctrl.$validate(); - }); - } - - if (isDefined(attr.max) || attr.ngMax) { - var maxVal; - ctrl.$validators.max = function(value) { - return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal; - }; - attr.$observe('max', function(val) { - maxVal = parseObservedDateValue(val); - ctrl.$validate(); - }); - } - - function isValidDate(value) { - // Invalid Date: getTime() returns NaN - return value && !(value.getTime && value.getTime() !== value.getTime()); - } - - function parseObservedDateValue(val) { - return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val; - } - }; -} - -function badInputChecker(scope, element, attr, ctrl) { - var node = element[0]; - var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity); - if (nativeValidation) { - ctrl.$parsers.push(function(value) { - var validity = element.prop(VALIDITY_STATE_PROPERTY) || {}; - return validity.badInput || validity.typeMismatch ? undefined : value; - }); - } -} - -function numberFormatterParser(ctrl) { - ctrl.$$parserName = 'number'; - ctrl.$parsers.push(function(value) { - if (ctrl.$isEmpty(value)) return null; - if (NUMBER_REGEXP.test(value)) return parseFloat(value); - return undefined; - }); - - ctrl.$formatters.push(function(value) { - if (!ctrl.$isEmpty(value)) { - if (!isNumber(value)) { - throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value); - } - value = value.toString(); - } - return value; - }); -} - -function parseNumberAttrVal(val) { - if (isDefined(val) && !isNumber(val)) { - val = parseFloat(val); - } - return !isNumberNaN(val) ? val : undefined; -} - -function isNumberInteger(num) { - // See http://stackoverflow.com/questions/14636536/how-to-check-if-a-variable-is-an-integer-in-javascript#14794066 - // (minus the assumption that `num` is a number) - - // eslint-disable-next-line no-bitwise - return (num | 0) === num; -} - -function countDecimals(num) { - var numString = num.toString(); - var decimalSymbolIndex = numString.indexOf('.'); - - if (decimalSymbolIndex === -1) { - if (-1 < num && num < 1) { - // It may be in the exponential notation format (`1e-X`) - var match = /e-(\d+)$/.exec(numString); - - if (match) { - return Number(match[1]); - } - } - - return 0; - } - - return numString.length - decimalSymbolIndex - 1; -} - -function isValidForStep(viewValue, stepBase, step) { - // At this point `stepBase` and `step` are expected to be non-NaN values - // and `viewValue` is expected to be a valid stringified number. - var value = Number(viewValue); - - var isNonIntegerValue = !isNumberInteger(value); - var isNonIntegerStepBase = !isNumberInteger(stepBase); - var isNonIntegerStep = !isNumberInteger(step); - - // Due to limitations in Floating Point Arithmetic (e.g. `0.3 - 0.2 !== 0.1` or - // `0.5 % 0.1 !== 0`), we need to convert all numbers to integers. - if (isNonIntegerValue || isNonIntegerStepBase || isNonIntegerStep) { - var valueDecimals = isNonIntegerValue ? countDecimals(value) : 0; - var stepBaseDecimals = isNonIntegerStepBase ? countDecimals(stepBase) : 0; - var stepDecimals = isNonIntegerStep ? countDecimals(step) : 0; - - var decimalCount = Math.max(valueDecimals, stepBaseDecimals, stepDecimals); - var multiplier = Math.pow(10, decimalCount); - - value = value * multiplier; - stepBase = stepBase * multiplier; - step = step * multiplier; - - if (isNonIntegerValue) value = Math.round(value); - if (isNonIntegerStepBase) stepBase = Math.round(stepBase); - if (isNonIntegerStep) step = Math.round(step); - } - - return (value - stepBase) % step === 0; -} - -function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) { - badInputChecker(scope, element, attr, ctrl); - numberFormatterParser(ctrl); - baseInputType(scope, element, attr, ctrl, $sniffer, $browser); - - var minVal; - var maxVal; - - if (isDefined(attr.min) || attr.ngMin) { - ctrl.$validators.min = function(value) { - return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal; - }; - - attr.$observe('min', function(val) { - minVal = parseNumberAttrVal(val); - // TODO(matsko): implement validateLater to reduce number of validations - ctrl.$validate(); - }); - } - - if (isDefined(attr.max) || attr.ngMax) { - ctrl.$validators.max = function(value) { - return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal; - }; - - attr.$observe('max', function(val) { - maxVal = parseNumberAttrVal(val); - // TODO(matsko): implement validateLater to reduce number of validations - ctrl.$validate(); - }); - } - - if (isDefined(attr.step) || attr.ngStep) { - var stepVal; - ctrl.$validators.step = function(modelValue, viewValue) { - return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) || - isValidForStep(viewValue, minVal || 0, stepVal); - }; - - attr.$observe('step', function(val) { - stepVal = parseNumberAttrVal(val); - // TODO(matsko): implement validateLater to reduce number of validations - ctrl.$validate(); - }); - } -} - -function rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) { - badInputChecker(scope, element, attr, ctrl); - numberFormatterParser(ctrl); - baseInputType(scope, element, attr, ctrl, $sniffer, $browser); - - var supportsRange = ctrl.$$hasNativeValidators && element[0].type === 'range', - minVal = supportsRange ? 0 : undefined, - maxVal = supportsRange ? 100 : undefined, - stepVal = supportsRange ? 1 : undefined, - validity = element[0].validity, - hasMinAttr = isDefined(attr.min), - hasMaxAttr = isDefined(attr.max), - hasStepAttr = isDefined(attr.step); - - var originalRender = ctrl.$render; - - ctrl.$render = supportsRange && isDefined(validity.rangeUnderflow) && isDefined(validity.rangeOverflow) ? - //Browsers that implement range will set these values automatically, but reading the adjusted values after - //$render would cause the min / max validators to be applied with the wrong value - function rangeRender() { - originalRender(); - ctrl.$setViewValue(element.val()); - } : - originalRender; - - if (hasMinAttr) { - ctrl.$validators.min = supportsRange ? - // Since all browsers set the input to a valid value, we don't need to check validity - function noopMinValidator() { return true; } : - // non-support browsers validate the min val - function minValidator(modelValue, viewValue) { - return ctrl.$isEmpty(viewValue) || isUndefined(minVal) || viewValue >= minVal; - }; - - setInitialValueAndObserver('min', minChange); - } - - if (hasMaxAttr) { - ctrl.$validators.max = supportsRange ? - // Since all browsers set the input to a valid value, we don't need to check validity - function noopMaxValidator() { return true; } : - // non-support browsers validate the max val - function maxValidator(modelValue, viewValue) { - return ctrl.$isEmpty(viewValue) || isUndefined(maxVal) || viewValue <= maxVal; - }; - - setInitialValueAndObserver('max', maxChange); - } - - if (hasStepAttr) { - ctrl.$validators.step = supportsRange ? - function nativeStepValidator() { - // Currently, only FF implements the spec on step change correctly (i.e. adjusting the - // input element value to a valid value). It's possible that other browsers set the stepMismatch - // validity error instead, so we can at least report an error in that case. - return !validity.stepMismatch; - } : - // ngStep doesn't set the setp attr, so the browser doesn't adjust the input value as setting step would - function stepValidator(modelValue, viewValue) { - return ctrl.$isEmpty(viewValue) || isUndefined(stepVal) || - isValidForStep(viewValue, minVal || 0, stepVal); - }; - - setInitialValueAndObserver('step', stepChange); - } - - function setInitialValueAndObserver(htmlAttrName, changeFn) { - // interpolated attributes set the attribute value only after a digest, but we need the - // attribute value when the input is first rendered, so that the browser can adjust the - // input value based on the min/max value - element.attr(htmlAttrName, attr[htmlAttrName]); - attr.$observe(htmlAttrName, changeFn); - } - - function minChange(val) { - minVal = parseNumberAttrVal(val); - // ignore changes before model is initialized - if (isNumberNaN(ctrl.$modelValue)) { - return; - } - - if (supportsRange) { - var elVal = element.val(); - // IE11 doesn't set the el val correctly if the minVal is greater than the element value - if (minVal > elVal) { - elVal = minVal; - element.val(elVal); - } - ctrl.$setViewValue(elVal); - } else { - // TODO(matsko): implement validateLater to reduce number of validations - ctrl.$validate(); - } - } - - function maxChange(val) { - maxVal = parseNumberAttrVal(val); - // ignore changes before model is initialized - if (isNumberNaN(ctrl.$modelValue)) { - return; - } - - if (supportsRange) { - var elVal = element.val(); - // IE11 doesn't set the el val correctly if the maxVal is less than the element value - if (maxVal < elVal) { - element.val(maxVal); - // IE11 and Chrome don't set the value to the minVal when max < min - elVal = maxVal < minVal ? minVal : maxVal; - } - ctrl.$setViewValue(elVal); - } else { - // TODO(matsko): implement validateLater to reduce number of validations - ctrl.$validate(); - } - } - - function stepChange(val) { - stepVal = parseNumberAttrVal(val); - // ignore changes before model is initialized - if (isNumberNaN(ctrl.$modelValue)) { - return; - } - - // Some browsers don't adjust the input value correctly, but set the stepMismatch error - if (supportsRange && ctrl.$viewValue !== element.val()) { - ctrl.$setViewValue(element.val()); - } else { - // TODO(matsko): implement validateLater to reduce number of validations - ctrl.$validate(); - } - } -} - -function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) { - // Note: no badInputChecker here by purpose as `url` is only a validation - // in browsers, i.e. we can always read out input.value even if it is not valid! - baseInputType(scope, element, attr, ctrl, $sniffer, $browser); - stringBasedInputType(ctrl); - - ctrl.$$parserName = 'url'; - ctrl.$validators.url = function(modelValue, viewValue) { - var value = modelValue || viewValue; - return ctrl.$isEmpty(value) || URL_REGEXP.test(value); - }; -} - -function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) { - // Note: no badInputChecker here by purpose as `url` is only a validation - // in browsers, i.e. we can always read out input.value even if it is not valid! - baseInputType(scope, element, attr, ctrl, $sniffer, $browser); - stringBasedInputType(ctrl); - - ctrl.$$parserName = 'email'; - ctrl.$validators.email = function(modelValue, viewValue) { - var value = modelValue || viewValue; - return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value); - }; -} - -function radioInputType(scope, element, attr, ctrl) { - var doTrim = !attr.ngTrim || trim(attr.ngTrim) !== 'false'; - // make the name unique, if not defined - if (isUndefined(attr.name)) { - element.attr('name', nextUid()); - } - - var listener = function(ev) { - var value; - if (element[0].checked) { - value = attr.value; - if (doTrim) { - value = trim(value); - } - ctrl.$setViewValue(value, ev && ev.type); - } - }; - - element.on('click', listener); - - ctrl.$render = function() { - var value = attr.value; - if (doTrim) { - value = trim(value); - } - element[0].checked = (value === ctrl.$viewValue); - }; - - attr.$observe('value', ctrl.$render); -} - -function parseConstantExpr($parse, context, name, expression, fallback) { - var parseFn; - if (isDefined(expression)) { - parseFn = $parse(expression); - if (!parseFn.constant) { - throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' + - '`{1}`.', name, expression); - } - return parseFn(context); - } - return fallback; -} - -function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) { - var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true); - var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false); - - var listener = function(ev) { - ctrl.$setViewValue(element[0].checked, ev && ev.type); - }; - - element.on('click', listener); - - ctrl.$render = function() { - element[0].checked = ctrl.$viewValue; - }; - - // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false` - // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert - // it to a boolean. - ctrl.$isEmpty = function(value) { - return value === false; - }; - - ctrl.$formatters.push(function(value) { - return equals(value, trueValue); - }); - - ctrl.$parsers.push(function(value) { - return value ? trueValue : falseValue; - }); -} - - -/** - * @ngdoc directive - * @name textarea - * @restrict E - * - * @description - * HTML textarea element control with AngularJS data-binding. The data-binding and validation - * properties of this element are exactly the same as those of the - * {@link ng.directive:input input element}. - * - * @param {string} ngModel Assignable AngularJS expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {string=} required Sets `required` validation error key if the value is not entered. - * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to - * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of - * `required` when you want to data-bind to the `required` attribute. - * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than - * minlength. - * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than - * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any - * length. - * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel {@link ngModel.NgModelController#$viewValue $viewValue} - * does not match a RegExp found by evaluating the AngularJS expression given in the attribute value. - * If the expression evaluates to a RegExp object, then this is used directly. - * If the expression evaluates to a string, then it will be converted to a RegExp - * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to - * `new RegExp('^abc$')`.
      - * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to - * start at the index of the last search's match, thus not taking the whole input value into - * account. - * @param {string=} ngChange AngularJS expression to be executed when input changes due to user - * interaction with the input element. - * @param {boolean=} [ngTrim=true] If set to false AngularJS will not automatically trim the input. - * - * @knownIssue - * - * When specifying the `placeholder` attribute of ` - *
      {{ list | json }}
      - * - * - * it("should split the text by newlines", function() { - * var listInput = element(by.model('list')); - * var output = element(by.binding('list | json')); - * listInput.sendKeys('abc\ndef\nghi'); - * expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]'); - * }); - * - * - * - */ -var ngListDirective = function() { - return { - restrict: 'A', - priority: 100, - require: 'ngModel', - link: function(scope, element, attr, ctrl) { - var ngList = attr.ngList || ', '; - var trimValues = attr.ngTrim !== 'false'; - var separator = trimValues ? trim(ngList) : ngList; - - var parse = function(viewValue) { - // If the viewValue is invalid (say required but empty) it will be `undefined` - if (isUndefined(viewValue)) return; - - var list = []; - - if (viewValue) { - forEach(viewValue.split(separator), function(value) { - if (value) list.push(trimValues ? trim(value) : value); - }); - } - - return list; - }; - - ctrl.$parsers.push(parse); - ctrl.$formatters.push(function(value) { - if (isArray(value)) { - return value.join(ngList); - } - - return undefined; - }); - - // Override the standard $isEmpty because an empty array means the input is empty. - ctrl.$isEmpty = function(value) { - return !value || !value.length; - }; - } - }; -}; - -/* global VALID_CLASS: true, - INVALID_CLASS: true, - PRISTINE_CLASS: true, - DIRTY_CLASS: true, - UNTOUCHED_CLASS: true, - TOUCHED_CLASS: true, - PENDING_CLASS: true, - addSetValidityMethod: true, - setupValidity: true, - defaultModelOptions: false -*/ - - -var VALID_CLASS = 'ng-valid', - INVALID_CLASS = 'ng-invalid', - PRISTINE_CLASS = 'ng-pristine', - DIRTY_CLASS = 'ng-dirty', - UNTOUCHED_CLASS = 'ng-untouched', - TOUCHED_CLASS = 'ng-touched', - EMPTY_CLASS = 'ng-empty', - NOT_EMPTY_CLASS = 'ng-not-empty'; - -var ngModelMinErr = minErr('ngModel'); - -/** - * @ngdoc type - * @name ngModel.NgModelController - * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a - * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue - * is set. - * - * @property {*} $modelValue The value in the model that the control is bound to. - * - * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever - * the control updates the ngModelController with a new {@link ngModel.NgModelController#$viewValue - `$viewValue`} from the DOM, usually via user input. - See {@link ngModel.NgModelController#$setViewValue `$setViewValue()`} for a detailed lifecycle explanation. - Note that the `$parsers` are not called when the bound ngModel expression changes programmatically. - - The functions are called in array order, each passing - its return value through to the next. The last return value is forwarded to the - {@link ngModel.NgModelController#$validators `$validators`} collection. - - Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue - `$viewValue`}. - - Returning `undefined` from a parser means a parse error occurred. In that case, - no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel` - will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`} - is set to `true`. The parse error is stored in `ngModel.$error.parse`. - - This simple example shows a parser that would convert text input value to lowercase: - * ```js - * function parse(value) { - * if (value) { - * return value.toLowerCase(); - * } - * } - * ngModelController.$parsers.push(parse); - * ``` - - * - * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever - the bound ngModel expression changes programmatically. The `$formatters` are not called when the - value of the control is changed by user interaction. - - Formatters are used to format / convert the {@link ngModel.NgModelController#$modelValue - `$modelValue`} for display in the control. - - The functions are called in reverse array order, each passing the value through to the - next. The last return value is used as the actual DOM value. - - This simple example shows a formatter that would convert the model value to uppercase: - - * ```js - * function format(value) { - * if (value) { - * return value.toUpperCase(); - * } - * } - * ngModel.$formatters.push(format); - * ``` - * - * @property {Object.} $validators A collection of validators that are applied - * whenever the model value changes. The key value within the object refers to the name of the - * validator while the function refers to the validation operation. The validation operation is - * provided with the model value as an argument and must return a true or false value depending - * on the response of that validation. - * - * ```js - * ngModel.$validators.validCharacters = function(modelValue, viewValue) { - * var value = modelValue || viewValue; - * return /[0-9]+/.test(value) && - * /[a-z]+/.test(value) && - * /[A-Z]+/.test(value) && - * /\W+/.test(value); - * }; - * ``` - * - * @property {Object.} $asyncValidators A collection of validations that are expected to - * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided - * is expected to return a promise when it is run during the model validation process. Once the promise - * is delivered then the validation status will be set to true when fulfilled and false when rejected. - * When the asynchronous validators are triggered, each of the validators will run in parallel and the model - * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator - * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators - * will only run once all synchronous validators have passed. - * - * Please note that if $http is used then it is important that the server returns a success HTTP response code - * in order to fulfill the validation and a status level of `4xx` in order to reject the validation. - * - * ```js - * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) { - * var value = modelValue || viewValue; - * - * // Lookup user by username - * return $http.get('/api/users/' + value). - * then(function resolved() { - * //username exists, this means validation fails - * return $q.reject('exists'); - * }, function rejected() { - * //username does not exist, therefore this validation passes - * return true; - * }); - * }; - * ``` - * - * @property {Array.} $viewChangeListeners Array of functions to execute whenever - * a change to {@link ngModel.NgModelController#$viewValue `$viewValue`} has caused a change - * to {@link ngModel.NgModelController#$modelValue `$modelValue`}. - * It is called with no arguments, and its return value is ignored. - * This can be used in place of additional $watches against the model value. - * - * @property {Object} $error An object hash with all failing validator ids as keys. - * @property {Object} $pending An object hash with all pending validator ids as keys. - * - * @property {boolean} $untouched True if control has not lost focus yet. - * @property {boolean} $touched True if control has lost focus. - * @property {boolean} $pristine True if user has not interacted with the control yet. - * @property {boolean} $dirty True if user has already interacted with the control. - * @property {boolean} $valid True if there is no error. - * @property {boolean} $invalid True if at least one error on the control. - * @property {string} $name The name attribute of the control. - * - * @description - * - * `NgModelController` provides API for the {@link ngModel `ngModel`} directive. - * The controller contains services for data-binding, validation, CSS updates, and value formatting - * and parsing. It purposefully does not contain any logic which deals with DOM rendering or - * listening to DOM events. - * Such DOM related logic should be provided by other directives which make use of - * `NgModelController` for data-binding to control elements. - * AngularJS provides this DOM logic for most {@link input `input`} elements. - * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example - * custom control example} that uses `ngModelController` to bind to `contenteditable` elements. - * - * @example - * ### Custom Control Example - * This example shows how to use `NgModelController` with a custom control to achieve - * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`) - * collaborate together to achieve the desired result. - * - * `contenteditable` is an HTML5 attribute, which tells the browser to let the element - * contents be edited in place by the user. - * - * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize} - * module to automatically remove "bad" content like inline event listener (e.g. ``). - * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks - * that content using the `$sce` service. - * - * - - [contenteditable] { - border: 1px solid black; - background-color: white; - min-height: 20px; - } - - .ng-invalid { - border: 1px solid red; - } - - - - angular.module('customControl', ['ngSanitize']). - directive('contenteditable', ['$sce', function($sce) { - return { - restrict: 'A', // only activate on element attribute - require: '?ngModel', // get a hold of NgModelController - link: function(scope, element, attrs, ngModel) { - if (!ngModel) return; // do nothing if no ng-model - - // Specify how UI should be updated - ngModel.$render = function() { - element.html($sce.getTrustedHtml(ngModel.$viewValue || '')); - }; - - // Listen for change events to enable binding - element.on('blur keyup change', function() { - scope.$evalAsync(read); - }); - read(); // initialize - - // Write data to the model - function read() { - var html = element.html(); - // When we clear the content editable the browser leaves a
      behind - // If strip-br attribute is provided then we strip this out - if (attrs.stripBr && html === '
      ') { - html = ''; - } - ngModel.$setViewValue(html); - } - } - }; - }]); -
      - -
      -
      Change me!
      - Required! -
      - -
      -
      - - it('should data-bind and become invalid', function() { - if (browser.params.browser === 'safari' || browser.params.browser === 'firefox') { - // SafariDriver can't handle contenteditable - // and Firefox driver can't clear contenteditables very well - return; - } - var contentEditable = element(by.css('[contenteditable]')); - var content = 'Change me!'; - - expect(contentEditable.getText()).toEqual(content); - - contentEditable.clear(); - contentEditable.sendKeys(protractor.Key.BACK_SPACE); - expect(contentEditable.getText()).toEqual(''); - expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/); - }); - - *
      - * - * - */ -NgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate']; -function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) { - this.$viewValue = Number.NaN; - this.$modelValue = Number.NaN; - this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity. - this.$validators = {}; - this.$asyncValidators = {}; - this.$parsers = []; - this.$formatters = []; - this.$viewChangeListeners = []; - this.$untouched = true; - this.$touched = false; - this.$pristine = true; - this.$dirty = false; - this.$valid = true; - this.$invalid = false; - this.$error = {}; // keep invalid keys here - this.$$success = {}; // keep valid keys here - this.$pending = undefined; // keep pending keys here - this.$name = $interpolate($attr.name || '', false)($scope); - this.$$parentForm = nullFormCtrl; - this.$options = defaultModelOptions; - this.$$updateEvents = ''; - // Attach the correct context to the event handler function for updateOn - this.$$updateEventHandler = this.$$updateEventHandler.bind(this); - - this.$$parsedNgModel = $parse($attr.ngModel); - this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; - this.$$ngModelGet = this.$$parsedNgModel; - this.$$ngModelSet = this.$$parsedNgModelAssign; - this.$$pendingDebounce = null; - this.$$parserValid = undefined; - - this.$$currentValidationRunId = 0; - - // https://github.com/angular/angular.js/issues/15833 - // Prevent `$$scope` from being iterated over by `copy` when NgModelController is deep watched - Object.defineProperty(this, '$$scope', {value: $scope}); - this.$$attr = $attr; - this.$$element = $element; - this.$$animate = $animate; - this.$$timeout = $timeout; - this.$$parse = $parse; - this.$$q = $q; - this.$$exceptionHandler = $exceptionHandler; - - setupValidity(this); - setupModelWatcher(this); -} - -NgModelController.prototype = { - $$initGetterSetters: function() { - if (this.$options.getOption('getterSetter')) { - var invokeModelGetter = this.$$parse(this.$$attr.ngModel + '()'), - invokeModelSetter = this.$$parse(this.$$attr.ngModel + '($$$p)'); - - this.$$ngModelGet = function($scope) { - var modelValue = this.$$parsedNgModel($scope); - if (isFunction(modelValue)) { - modelValue = invokeModelGetter($scope); - } - return modelValue; - }; - this.$$ngModelSet = function($scope, newValue) { - if (isFunction(this.$$parsedNgModel($scope))) { - invokeModelSetter($scope, {$$$p: newValue}); - } else { - this.$$parsedNgModelAssign($scope, newValue); - } - }; - } else if (!this.$$parsedNgModel.assign) { - throw ngModelMinErr('nonassign', 'Expression \'{0}\' is non-assignable. Element: {1}', - this.$$attr.ngModel, startingTag(this.$$element)); - } - }, - - - /** - * @ngdoc method - * @name ngModel.NgModelController#$render - * - * @description - * Called when the view needs to be updated. It is expected that the user of the ng-model - * directive will implement this method. - * - * The `$render()` method is invoked in the following situations: - * - * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last - * committed value then `$render()` is called to update the input control. - * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and - * the `$viewValue` are different from last time. - * - * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of - * `$modelValue` and `$viewValue` are actually different from their previous values. If `$modelValue` - * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be - * invoked if you only change a property on the objects. - */ - $render: noop, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$isEmpty - * - * @description - * This is called when we need to determine if the value of an input is empty. - * - * For instance, the required directive does this to work out if the input has data or not. - * - * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`. - * - * You can override this for input directives whose concept of being empty is different from the - * default. The `checkboxInputType` directive does this because in its case a value of `false` - * implies empty. - * - * @param {*} value The value of the input to check for emptiness. - * @returns {boolean} True if `value` is "empty". - */ - $isEmpty: function(value) { - // eslint-disable-next-line no-self-compare - return isUndefined(value) || value === '' || value === null || value !== value; - }, - - $$updateEmptyClasses: function(value) { - if (this.$isEmpty(value)) { - this.$$animate.removeClass(this.$$element, NOT_EMPTY_CLASS); - this.$$animate.addClass(this.$$element, EMPTY_CLASS); - } else { - this.$$animate.removeClass(this.$$element, EMPTY_CLASS); - this.$$animate.addClass(this.$$element, NOT_EMPTY_CLASS); - } - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$setPristine - * - * @description - * Sets the control to its pristine state. - * - * This method can be called to remove the `ng-dirty` class and set the control to its pristine - * state (`ng-pristine` class). A model is considered to be pristine when the control - * has not been changed from when first compiled. - */ - $setPristine: function() { - this.$dirty = false; - this.$pristine = true; - this.$$animate.removeClass(this.$$element, DIRTY_CLASS); - this.$$animate.addClass(this.$$element, PRISTINE_CLASS); - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$setDirty - * - * @description - * Sets the control to its dirty state. - * - * This method can be called to remove the `ng-pristine` class and set the control to its dirty - * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed - * from when first compiled. - */ - $setDirty: function() { - this.$dirty = true; - this.$pristine = false; - this.$$animate.removeClass(this.$$element, PRISTINE_CLASS); - this.$$animate.addClass(this.$$element, DIRTY_CLASS); - this.$$parentForm.$setDirty(); - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$setUntouched - * - * @description - * Sets the control to its untouched state. - * - * This method can be called to remove the `ng-touched` class and set the control to its - * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched - * by default, however this function can be used to restore that state if the model has - * already been touched by the user. - */ - $setUntouched: function() { - this.$touched = false; - this.$untouched = true; - this.$$animate.setClass(this.$$element, UNTOUCHED_CLASS, TOUCHED_CLASS); - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$setTouched - * - * @description - * Sets the control to its touched state. - * - * This method can be called to remove the `ng-untouched` class and set the control to its - * touched state (`ng-touched` class). A model is considered to be touched when the user has - * first focused the control element and then shifted focus away from the control (blur event). - */ - $setTouched: function() { - this.$touched = true; - this.$untouched = false; - this.$$animate.setClass(this.$$element, TOUCHED_CLASS, UNTOUCHED_CLASS); - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$rollbackViewValue - * - * @description - * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`, - * which may be caused by a pending debounced event or because the input is waiting for some - * future event. - * - * If you have an input that uses `ng-model-options` to set up debounced updates or updates that - * depend on special events such as `blur`, there can be a period when the `$viewValue` is out of - * sync with the ngModel's `$modelValue`. - * - * In this case, you can use `$rollbackViewValue()` to manually cancel the debounced / future update - * and reset the input to the last committed view value. - * - * It is also possible that you run into difficulties if you try to update the ngModel's `$modelValue` - * programmatically before these debounced/future events have resolved/occurred, because AngularJS's - * dirty checking mechanism is not able to tell whether the model has actually changed or not. - * - * The `$rollbackViewValue()` method should be called before programmatically changing the model of an - * input which may have such events pending. This is important in order to make sure that the - * input field will be updated with the new model value and any pending operations are cancelled. - * - * @example - * - * - * angular.module('cancel-update-example', []) - * - * .controller('CancelUpdateController', ['$scope', function($scope) { - * $scope.model = {value1: '', value2: ''}; - * - * $scope.setEmpty = function(e, value, rollback) { - * if (e.keyCode === 27) { - * e.preventDefault(); - * if (rollback) { - * $scope.myForm[value].$rollbackViewValue(); - * } - * $scope.model[value] = ''; - * } - * }; - * }]); - * - * - *
      - *

      Both of these inputs are only updated if they are blurred. Hitting escape should - * empty them. Follow these steps and observe the difference:

      - *
        - *
      1. Type something in the input. You will see that the model is not yet updated
      2. - *
      3. Press the Escape key. - *
          - *
        1. In the first example, nothing happens, because the model is already '', and no - * update is detected. If you blur the input, the model will be set to the current view. - *
        2. - *
        3. In the second example, the pending update is cancelled, and the input is set back - * to the last committed view value (''). Blurring the input does nothing. - *
        4. - *
        - *
      4. - *
      - * - *
      - *
      - *

      Without $rollbackViewValue():

      - * - * value1: "{{ model.value1 }}" - *
      - * - *
      - *

      With $rollbackViewValue():

      - * - * value2: "{{ model.value2 }}" - *
      - *
      - *
      - *
      - - div { - display: table-cell; - } - div:nth-child(1) { - padding-right: 30px; - } - - - *
      - */ - $rollbackViewValue: function() { - this.$$timeout.cancel(this.$$pendingDebounce); - this.$viewValue = this.$$lastCommittedViewValue; - this.$render(); - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$validate - * - * @description - * Runs each of the registered validators (first synchronous validators and then - * asynchronous validators). - * If the validity changes to invalid, the model will be set to `undefined`, - * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`. - * If the validity changes to valid, it will set the model to the last available valid - * `$modelValue`, i.e. either the last parsed value or the last value set from the scope. - */ - $validate: function() { - // ignore $validate before model is initialized - if (isNumberNaN(this.$modelValue)) { - return; - } - - var viewValue = this.$$lastCommittedViewValue; - // Note: we use the $$rawModelValue as $modelValue might have been - // set to undefined during a view -> model update that found validation - // errors. We can't parse the view here, since that could change - // the model although neither viewValue nor the model on the scope changed - var modelValue = this.$$rawModelValue; - - var prevValid = this.$valid; - var prevModelValue = this.$modelValue; - - var allowInvalid = this.$options.getOption('allowInvalid'); - - var that = this; - this.$$runValidators(modelValue, viewValue, function(allValid) { - // If there was no change in validity, don't update the model - // This prevents changing an invalid modelValue to undefined - if (!allowInvalid && prevValid !== allValid) { - // Note: Don't check this.$valid here, as we could have - // external validators (e.g. calculated on the server), - // that just call $setValidity and need the model value - // to calculate their validity. - that.$modelValue = allValid ? modelValue : undefined; - - if (that.$modelValue !== prevModelValue) { - that.$$writeModelToScope(); - } - } - }); - }, - - $$runValidators: function(modelValue, viewValue, doneCallback) { - this.$$currentValidationRunId++; - var localValidationRunId = this.$$currentValidationRunId; - var that = this; - - // check parser error - if (!processParseErrors()) { - validationDone(false); - return; - } - if (!processSyncValidators()) { - validationDone(false); - return; - } - processAsyncValidators(); - - function processParseErrors() { - var errorKey = that.$$parserName || 'parse'; - if (isUndefined(that.$$parserValid)) { - setValidity(errorKey, null); - } else { - if (!that.$$parserValid) { - forEach(that.$validators, function(v, name) { - setValidity(name, null); - }); - forEach(that.$asyncValidators, function(v, name) { - setValidity(name, null); - }); - } - // Set the parse error last, to prevent unsetting it, should a $validators key == parserName - setValidity(errorKey, that.$$parserValid); - return that.$$parserValid; - } - return true; - } - - function processSyncValidators() { - var syncValidatorsValid = true; - forEach(that.$validators, function(validator, name) { - var result = Boolean(validator(modelValue, viewValue)); - syncValidatorsValid = syncValidatorsValid && result; - setValidity(name, result); - }); - if (!syncValidatorsValid) { - forEach(that.$asyncValidators, function(v, name) { - setValidity(name, null); - }); - return false; - } - return true; - } - - function processAsyncValidators() { - var validatorPromises = []; - var allValid = true; - forEach(that.$asyncValidators, function(validator, name) { - var promise = validator(modelValue, viewValue); - if (!isPromiseLike(promise)) { - throw ngModelMinErr('nopromise', - 'Expected asynchronous validator to return a promise but got \'{0}\' instead.', promise); - } - setValidity(name, undefined); - validatorPromises.push(promise.then(function() { - setValidity(name, true); - }, function() { - allValid = false; - setValidity(name, false); - })); - }); - if (!validatorPromises.length) { - validationDone(true); - } else { - that.$$q.all(validatorPromises).then(function() { - validationDone(allValid); - }, noop); - } - } - - function setValidity(name, isValid) { - if (localValidationRunId === that.$$currentValidationRunId) { - that.$setValidity(name, isValid); - } - } - - function validationDone(allValid) { - if (localValidationRunId === that.$$currentValidationRunId) { - - doneCallback(allValid); - } - } - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$commitViewValue - * - * @description - * Commit a pending update to the `$modelValue`. - * - * Updates may be pending by a debounced event or because the input is waiting for a some future - * event defined in `ng-model-options`. this method is rarely needed as `NgModelController` - * usually handles calling this in response to input events. - */ - $commitViewValue: function() { - var viewValue = this.$viewValue; - - this.$$timeout.cancel(this.$$pendingDebounce); - - // If the view value has not changed then we should just exit, except in the case where there is - // a native validator on the element. In this case the validation state may have changed even though - // the viewValue has stayed empty. - if (this.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !this.$$hasNativeValidators)) { - return; - } - this.$$updateEmptyClasses(viewValue); - this.$$lastCommittedViewValue = viewValue; - - // change to dirty - if (this.$pristine) { - this.$setDirty(); - } - this.$$parseAndValidate(); - }, - - $$parseAndValidate: function() { - var viewValue = this.$$lastCommittedViewValue; - var modelValue = viewValue; - var that = this; - - this.$$parserValid = isUndefined(modelValue) ? undefined : true; - - if (this.$$parserValid) { - for (var i = 0; i < this.$parsers.length; i++) { - modelValue = this.$parsers[i](modelValue); - if (isUndefined(modelValue)) { - this.$$parserValid = false; - break; - } - } - } - if (isNumberNaN(this.$modelValue)) { - // this.$modelValue has not been touched yet... - this.$modelValue = this.$$ngModelGet(this.$$scope); - } - var prevModelValue = this.$modelValue; - var allowInvalid = this.$options.getOption('allowInvalid'); - this.$$rawModelValue = modelValue; - - if (allowInvalid) { - this.$modelValue = modelValue; - writeToModelIfNeeded(); - } - - // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date. - // This can happen if e.g. $setViewValue is called from inside a parser - this.$$runValidators(modelValue, this.$$lastCommittedViewValue, function(allValid) { - if (!allowInvalid) { - // Note: Don't check this.$valid here, as we could have - // external validators (e.g. calculated on the server), - // that just call $setValidity and need the model value - // to calculate their validity. - that.$modelValue = allValid ? modelValue : undefined; - writeToModelIfNeeded(); - } - }); - - function writeToModelIfNeeded() { - if (that.$modelValue !== prevModelValue) { - that.$$writeModelToScope(); - } - } - }, - - $$writeModelToScope: function() { - this.$$ngModelSet(this.$$scope, this.$modelValue); - forEach(this.$viewChangeListeners, function(listener) { - try { - listener(); - } catch (e) { - // eslint-disable-next-line no-invalid-this - this.$$exceptionHandler(e); - } - }, this); - }, - - /** - * @ngdoc method - * @name ngModel.NgModelController#$setViewValue - * - * @description - * Update the view value. - * - * This method should be called when a control wants to change the view value; typically, - * this is done from within a DOM event handler. For example, the {@link ng.directive:input input} - * directive calls it when the value of the input changes and {@link ng.directive:select select} - * calls it when an option is selected. - * - * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers` - * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged - * value is sent directly for processing through the `$parsers` pipeline. After this, the `$validators` and - * `$asyncValidators` are called and the value is applied to `$modelValue`. - * Finally, the value is set to the **expression** specified in the `ng-model` attribute and - * all the registered change listeners, in the `$viewChangeListeners` list are called. - * - * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn` - * and the `default` trigger is not listed, all those actions will remain pending until one of the - * `updateOn` events is triggered on the DOM element. - * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions} - * directive is used with a custom debounce for this particular event. - * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce` - * is specified, once the timer runs out. - * - * When used with standard inputs, the view value will always be a string (which is in some cases - * parsed into another type, such as a `Date` object for `input[date]`.) - * However, custom controls might also pass objects to this method. In this case, we should make - * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not - * perform a deep watch of objects, it only looks for a change of identity. If you only change - * the property of the object then ngModel will not realize that the object has changed and - * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should - * not change properties of the copy once it has been passed to `$setViewValue`. - * Otherwise you may cause the model value on the scope to change incorrectly. - * - *
      - * In any case, the value passed to the method should always reflect the current value - * of the control. For example, if you are calling `$setViewValue` for an input element, - * you should pass the input DOM value. Otherwise, the control and the scope model become - * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change - * the control's DOM value in any way. If we want to change the control's DOM value - * programmatically, we should update the `ngModel` scope expression. Its new value will be - * picked up by the model controller, which will run it through the `$formatters`, `$render` it - * to update the DOM, and finally call `$validate` on it. - *
      - * - * @param {*} value value from the view. - * @param {string} trigger Event that triggered the update. - */ - $setViewValue: function(value, trigger) { - this.$viewValue = value; - if (this.$options.getOption('updateOnDefault')) { - this.$$debounceViewValueCommit(trigger); - } - }, - - $$debounceViewValueCommit: function(trigger) { - var debounceDelay = this.$options.getOption('debounce'); - - if (isNumber(debounceDelay[trigger])) { - debounceDelay = debounceDelay[trigger]; - } else if (isNumber(debounceDelay['default'])) { - debounceDelay = debounceDelay['default']; - } - - this.$$timeout.cancel(this.$$pendingDebounce); - var that = this; - if (debounceDelay > 0) { // this fails if debounceDelay is an object - this.$$pendingDebounce = this.$$timeout(function() { - that.$commitViewValue(); - }, debounceDelay); - } else if (this.$$scope.$root.$$phase) { - this.$commitViewValue(); - } else { - this.$$scope.$apply(function() { - that.$commitViewValue(); - }); - } - }, - - /** - * @ngdoc method - * - * @name ngModel.NgModelController#$overrideModelOptions - * - * @description - * - * Override the current model options settings programmatically. - * - * The previous `ModelOptions` value will not be modified. Instead, a - * new `ModelOptions` object will inherit from the previous one overriding - * or inheriting settings that are defined in the given parameter. - * - * See {@link ngModelOptions} for information about what options can be specified - * and how model option inheritance works. - * - *
      - * **Note:** this function only affects the options set on the `ngModelController`, - * and not the options on the {@link ngModelOptions} directive from which they might have been - * obtained initially. - *
      - * - *
      - * **Note:** it is not possible to override the `getterSetter` option. - *
      - * - * @param {Object} options a hash of settings to override the previous options - * - */ - $overrideModelOptions: function(options) { - this.$options = this.$options.createChild(options); - this.$$setUpdateOnEvents(); - }, - - /** - * @ngdoc method - * - * @name ngModel.NgModelController#$processModelValue - - * @description - * - * Runs the model -> view pipeline on the current - * {@link ngModel.NgModelController#$modelValue $modelValue}. - * - * The following actions are performed by this method: - * - * - the `$modelValue` is run through the {@link ngModel.NgModelController#$formatters $formatters} - * and the result is set to the {@link ngModel.NgModelController#$viewValue $viewValue} - * - the `ng-empty` or `ng-not-empty` class is set on the element - * - if the `$viewValue` has changed: - * - {@link ngModel.NgModelController#$render $render} is called on the control - * - the {@link ngModel.NgModelController#$validators $validators} are run and - * the validation status is set. - * - * This method is called by ngModel internally when the bound scope value changes. - * Application developers usually do not have to call this function themselves. - * - * This function can be used when the `$viewValue` or the rendered DOM value are not correctly - * formatted and the `$modelValue` must be run through the `$formatters` again. - * - * @example - * Consider a text input with an autocomplete list (for fruit), where the items are - * objects with a name and an id. - * A user enters `ap` and then selects `Apricot` from the list. - * Based on this, the autocomplete widget will call `$setViewValue({name: 'Apricot', id: 443})`, - * but the rendered value will still be `ap`. - * The widget can then call `ctrl.$processModelValue()` to run the model -> view - * pipeline again, which formats the object to the string `Apricot`, - * then updates the `$viewValue`, and finally renders it in the DOM. - * - * - -
      -
      - Search Fruit: - -
      -
      - Model:
      -
      {{selectedFruit | json}}
      -
      -
      -
      - - angular.module('inputExample', []) - .controller('inputController', function($scope) { - $scope.items = [ - {name: 'Apricot', id: 443}, - {name: 'Clementine', id: 972}, - {name: 'Durian', id: 169}, - {name: 'Jackfruit', id: 982}, - {name: 'Strawberry', id: 863} - ]; - }) - .component('basicAutocomplete', { - bindings: { - items: '<', - onSelect: '&' - }, - templateUrl: 'autocomplete.html', - controller: function($element, $scope) { - var that = this; - var ngModel; - - that.$postLink = function() { - ngModel = $element.find('input').controller('ngModel'); - - ngModel.$formatters.push(function(value) { - return (value && value.name) || value; - }); - - ngModel.$parsers.push(function(value) { - var match = value; - for (var i = 0; i < that.items.length; i++) { - if (that.items[i].name === value) { - match = that.items[i]; - break; - } - } - - return match; - }); - }; - - that.selectItem = function(item) { - ngModel.$setViewValue(item); - ngModel.$processModelValue(); - that.onSelect({item: item}); - }; - } - }); - - -
      - -
        -
      • - -
      • -
      -
      -
      - *
      - * - */ - $processModelValue: function() { - var viewValue = this.$$format(); - - if (this.$viewValue !== viewValue) { - this.$$updateEmptyClasses(viewValue); - this.$viewValue = this.$$lastCommittedViewValue = viewValue; - this.$render(); - // It is possible that model and view value have been updated during render - this.$$runValidators(this.$modelValue, this.$viewValue, noop); - } - }, - - /** - * This method is called internally to run the $formatters on the $modelValue - */ - $$format: function() { - var formatters = this.$formatters, - idx = formatters.length; - - var viewValue = this.$modelValue; - while (idx--) { - viewValue = formatters[idx](viewValue); - } - - return viewValue; - }, - - /** - * This method is called internally when the bound scope value changes. - */ - $$setModelValue: function(modelValue) { - this.$modelValue = this.$$rawModelValue = modelValue; - this.$$parserValid = undefined; - this.$processModelValue(); - }, - - $$setUpdateOnEvents: function() { - if (this.$$updateEvents) { - this.$$element.off(this.$$updateEvents, this.$$updateEventHandler); - } - - this.$$updateEvents = this.$options.getOption('updateOn'); - if (this.$$updateEvents) { - this.$$element.on(this.$$updateEvents, this.$$updateEventHandler); - } - }, - - $$updateEventHandler: function(ev) { - this.$$debounceViewValueCommit(ev && ev.type); - } -}; - -function setupModelWatcher(ctrl) { - // model -> value - // Note: we cannot use a normal scope.$watch as we want to detect the following: - // 1. scope value is 'a' - // 2. user enters 'b' - // 3. ng-change kicks in and reverts scope value to 'a' - // -> scope value did not change since the last digest as - // ng-change executes in apply phase - // 4. view should be changed back to 'a' - ctrl.$$scope.$watch(function ngModelWatch(scope) { - var modelValue = ctrl.$$ngModelGet(scope); - - // if scope model value and ngModel value are out of sync - // This cannot be moved to the action function, because it would not catch the - // case where the model is changed in the ngChange function or the model setter - if (modelValue !== ctrl.$modelValue && - // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator - // eslint-disable-next-line no-self-compare - (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue) - ) { - ctrl.$$setModelValue(modelValue); - } - - return modelValue; - }); -} - -/** - * @ngdoc method - * @name ngModel.NgModelController#$setValidity - * - * @description - * Change the validity state, and notify the form. - * - * This method can be called within $parsers/$formatters or a custom validation implementation. - * However, in most cases it should be sufficient to use the `ngModel.$validators` and - * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically. - * - * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned - * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]` - * (for unfulfilled `$asyncValidators`), so that it is available for data-binding. - * The `validationErrorKey` should be in camelCase and will get converted into dash-case - * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error` - * classes and can be bound to as `{{ someForm.someControl.$error.myError }}`. - * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined), - * or skipped (null). Pending is used for unfulfilled `$asyncValidators`. - * Skipped is used by AngularJS when validators do not run because of parse errors and - * when `$asyncValidators` do not run because any of the `$validators` failed. - */ -addSetValidityMethod({ - clazz: NgModelController, - set: function(object, property) { - object[property] = true; - }, - unset: function(object, property) { - delete object[property]; - } -}); - - -/** - * @ngdoc directive - * @name ngModel - * @restrict A - * @priority 1 - * @param {expression} ngModel assignable {@link guide/expression Expression} to bind to. - * - * @description - * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a - * property on the scope using {@link ngModel.NgModelController NgModelController}, - * which is created and exposed by this directive. - * - * `ngModel` is responsible for: - * - * - Binding the view into the model, which other directives such as `input`, `textarea` or `select` - * require. - * - Providing validation behavior (i.e. required, number, email, url). - * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors). - * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, - * `ng-untouched`, `ng-empty`, `ng-not-empty`) including animations. - * - Registering the control with its parent {@link ng.directive:form form}. - * - * Note: `ngModel` will try to bind to the property given by evaluating the expression on the - * current scope. If the property doesn't already exist on this scope, it will be created - * implicitly and added to the scope. - * - * For best practices on using `ngModel`, see: - * - * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes) - * - * For basic examples, how to use `ngModel`, see: - * - * - {@link ng.directive:input input} - * - {@link input[text] text} - * - {@link input[checkbox] checkbox} - * - {@link input[radio] radio} - * - {@link input[number] number} - * - {@link input[email] email} - * - {@link input[url] url} - * - {@link input[date] date} - * - {@link input[datetime-local] datetime-local} - * - {@link input[time] time} - * - {@link input[month] month} - * - {@link input[week] week} - * - {@link ng.directive:select select} - * - {@link ng.directive:textarea textarea} - * - * ## Complex Models (objects or collections) - * - * By default, `ngModel` watches the model by reference, not value. This is important to know when - * binding inputs to models that are objects (e.g. `Date`) or collections (e.g. arrays). If only properties of the - * object or collection change, `ngModel` will not be notified and so the input will not be re-rendered. - * - * The model must be assigned an entirely new object or collection before a re-rendering will occur. - * - * Some directives have options that will cause them to use a custom `$watchCollection` on the model expression - * - for example, `ngOptions` will do so when a `track by` clause is included in the comprehension expression or - * if the select is given the `multiple` attribute. - * - * The `$watchCollection()` method only does a shallow comparison, meaning that changing properties deeper than the - * first level of the object (or only changing the properties of an item in the collection if it's an array) will still - * not trigger a re-rendering of the model. - * - * ## CSS classes - * The following CSS classes are added and removed on the associated input/select/textarea element - * depending on the validity of the model. - * - * - `ng-valid`: the model is valid - * - `ng-invalid`: the model is invalid - * - `ng-valid-[key]`: for each valid key added by `$setValidity` - * - `ng-invalid-[key]`: for each invalid key added by `$setValidity` - * - `ng-pristine`: the control hasn't been interacted with yet - * - `ng-dirty`: the control has been interacted with - * - `ng-touched`: the control has been blurred - * - `ng-untouched`: the control hasn't been blurred - * - `ng-pending`: any `$asyncValidators` are unfulfilled - * - `ng-empty`: the view does not contain a value or the value is deemed "empty", as defined - * by the {@link ngModel.NgModelController#$isEmpty} method - * - `ng-not-empty`: the view contains a non-empty value - * - * Keep in mind that ngAnimate can detect each of these classes when added and removed. - * - * @animations - * Animations within models are triggered when any of the associated CSS classes are added and removed - * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`, - * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself. - * The animations that are triggered within ngModel are similar to how they work in ngClass and - * animations can be hooked into using CSS transitions, keyframes as well as JS animations. - * - * The following example shows a simple way to utilize CSS transitions to style an input element - * that has been rendered as invalid after it has been validated: - * - *
      - * //be sure to include ngAnimate as a module to hook into more
      - * //advanced animations
      - * .my-input {
      - *   transition:0.5s linear all;
      - *   background: white;
      - * }
      - * .my-input.ng-invalid {
      - *   background: red;
      - *   color:white;
      - * }
      - * 
      - * - * @example - * ### Basic Usage - * - - - -

      - Update input to see transitions when valid/invalid. - Integer is a valid value. -

      -
      - -
      -
      - *
      - * - * @example - * ### Binding to a getter/setter - * - * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a - * function that returns a representation of the model when called with zero arguments, and sets - * the internal state of a model when called with an argument. It's sometimes useful to use this - * for models that have an internal representation that's different from what the model exposes - * to the view. - * - *
      - * **Best Practice:** It's best to keep getters fast because AngularJS is likely to call them more - * frequently than other parts of your code. - *
      - * - * You use this behavior by adding `ng-model-options="{ getterSetter: true }"` to an element that - * has `ng-model` attached to it. You can also add `ng-model-options="{ getterSetter: true }"` to - * a `
      `, which will enable this behavior for all ``s within it. See - * {@link ng.directive:ngModelOptions `ngModelOptions`} for more. - * - * The following example shows how to use `ngModel` with a getter/setter: - * - * @example - * - -
      - - - -
      user.name = 
      -
      -
      - - angular.module('getterSetterExample', []) - .controller('ExampleController', ['$scope', function($scope) { - var _name = 'Brian'; - $scope.user = { - name: function(newName) { - // Note that newName can be undefined for two reasons: - // 1. Because it is called as a getter and thus called with no arguments - // 2. Because the property should actually be set to undefined. This happens e.g. if the - // input is invalid - return arguments.length ? (_name = newName) : _name; - } - }; - }]); - - *
      - */ -var ngModelDirective = ['$rootScope', function($rootScope) { - return { - restrict: 'A', - require: ['ngModel', '^?form', '^?ngModelOptions'], - controller: NgModelController, - // Prelink needs to run before any input directive - // so that we can set the NgModelOptions in NgModelController - // before anyone else uses it. - priority: 1, - compile: function ngModelCompile(element) { - // Setup initial state of the control - element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS); - - return { - pre: function ngModelPreLink(scope, element, attr, ctrls) { - var modelCtrl = ctrls[0], - formCtrl = ctrls[1] || modelCtrl.$$parentForm, - optionsCtrl = ctrls[2]; - - if (optionsCtrl) { - modelCtrl.$options = optionsCtrl.$options; - } - - modelCtrl.$$initGetterSetters(); - - // notify others, especially parent forms - formCtrl.$addControl(modelCtrl); - - attr.$observe('name', function(newValue) { - if (modelCtrl.$name !== newValue) { - modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue); - } - }); - - scope.$on('$destroy', function() { - modelCtrl.$$parentForm.$removeControl(modelCtrl); - }); - }, - post: function ngModelPostLink(scope, element, attr, ctrls) { - var modelCtrl = ctrls[0]; - modelCtrl.$$setUpdateOnEvents(); - - function setTouched() { - modelCtrl.$setTouched(); - } - - element.on('blur', function() { - if (modelCtrl.$touched) return; - - if ($rootScope.$$phase) { - scope.$evalAsync(setTouched); - } else { - scope.$apply(setTouched); - } - }); - } - }; - } - }; -}]; - -/* exported defaultModelOptions */ -var defaultModelOptions; -var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/; - -/** - * @ngdoc type - * @name ModelOptions - * @description - * A container for the options set by the {@link ngModelOptions} directive - */ -function ModelOptions(options) { - this.$$options = options; -} - -ModelOptions.prototype = { - - /** - * @ngdoc method - * @name ModelOptions#getOption - * @param {string} name the name of the option to retrieve - * @returns {*} the value of the option - * @description - * Returns the value of the given option - */ - getOption: function(name) { - return this.$$options[name]; - }, - - /** - * @ngdoc method - * @name ModelOptions#createChild - * @param {Object} options a hash of options for the new child that will override the parent's options - * @return {ModelOptions} a new `ModelOptions` object initialized with the given options. - */ - createChild: function(options) { - var inheritAll = false; - - // make a shallow copy - options = extend({}, options); - - // Inherit options from the parent if specified by the value `"$inherit"` - forEach(options, /* @this */ function(option, key) { - if (option === '$inherit') { - if (key === '*') { - inheritAll = true; - } else { - options[key] = this.$$options[key]; - // `updateOn` is special so we must also inherit the `updateOnDefault` option - if (key === 'updateOn') { - options.updateOnDefault = this.$$options.updateOnDefault; - } - } - } else { - if (key === 'updateOn') { - // If the `updateOn` property contains the `default` event then we have to remove - // it from the event list and set the `updateOnDefault` flag. - options.updateOnDefault = false; - options[key] = trim(option.replace(DEFAULT_REGEXP, function() { - options.updateOnDefault = true; - return ' '; - })); - } - } - }, this); - - if (inheritAll) { - // We have a property of the form: `"*": "$inherit"` - delete options['*']; - defaults(options, this.$$options); - } - - // Finally add in any missing defaults - defaults(options, defaultModelOptions.$$options); - - return new ModelOptions(options); - } -}; - - -defaultModelOptions = new ModelOptions({ - updateOn: '', - updateOnDefault: true, - debounce: 0, - getterSetter: false, - allowInvalid: false, - timezone: null -}); - - -/** - * @ngdoc directive - * @name ngModelOptions - * @restrict A - * @priority 10 - * - * @description - * This directive allows you to modify the behaviour of {@link ngModel} directives within your - * application. You can specify an `ngModelOptions` directive on any element. All {@link ngModel} - * directives will use the options of their nearest `ngModelOptions` ancestor. - * - * The `ngModelOptions` settings are found by evaluating the value of the attribute directive as - * an AngularJS expression. This expression should evaluate to an object, whose properties contain - * the settings. For example: `
      - *
      - * - *
      - *
      - * ``` - * - * the `input` element will have the following settings - * - * ```js - * { allowInvalid: true, updateOn: 'default', debounce: 0 } - * ``` - * - * Notice that the `debounce` setting was not inherited and used the default value instead. - * - * You can specify that all undefined settings are automatically inherited from an ancestor by - * including a property with key of `"*"` and value of `"$inherit"`. - * - * For example given the following fragment of HTML - * - * - * ```html - *
      - *
      - * - *
      - *
      - * ``` - * - * the `input` element will have the following settings - * - * ```js - * { allowInvalid: true, updateOn: 'default', debounce: 200 } - * ``` - * - * Notice that the `debounce` setting now inherits the value from the outer `
      ` element. - * - * If you are creating a reusable component then you should be careful when using `"*": "$inherit"` - * since you may inadvertently inherit a setting in the future that changes the behavior of your component. - * - * - * ## Triggering and debouncing model updates - * - * The `updateOn` and `debounce` properties allow you to specify a custom list of events that will - * trigger a model update and/or a debouncing delay so that the actual update only takes place when - * a timer expires; this timer will be reset after another change takes place. - * - * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might - * be different from the value in the actual model. This means that if you update the model you - * should also invoke {@link ngModel.NgModelController#$rollbackViewValue} on the relevant input field in - * order to make sure it is synchronized with the model and that any debounced action is canceled. - * - * The easiest way to reference the control's {@link ngModel.NgModelController#$rollbackViewValue} - * method is by making sure the input is placed inside a form that has a `name` attribute. This is - * important because `form` controllers are published to the related scope under the name in their - * `name` attribute. - * - * Any pending changes will take place immediately when an enclosing form is submitted via the - * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit` - * to have access to the updated model. - * - * ### Overriding immediate updates - * - * The following example shows how to override immediate updates. Changes on the inputs within the - * form will update the model only when the control loses focus (blur event). If `escape` key is - * pressed while the input field is focused, the value is reset to the value in the current model. - * - * - * - *
      - *
      - *
      - *
      - *
      - *
      user.name = 
      - *
      - *
      - * - * angular.module('optionsExample', []) - * .controller('ExampleController', ['$scope', function($scope) { - * $scope.user = { name: 'say', data: '' }; - * - * $scope.cancel = function(e) { - * if (e.keyCode === 27) { - * $scope.userForm.userName.$rollbackViewValue(); - * } - * }; - * }]); - * - * - * var model = element(by.binding('user.name')); - * var input = element(by.model('user.name')); - * var other = element(by.model('user.data')); - * - * it('should allow custom events', function() { - * input.sendKeys(' hello'); - * input.click(); - * expect(model.getText()).toEqual('say'); - * other.click(); - * expect(model.getText()).toEqual('say hello'); - * }); - * - * it('should $rollbackViewValue when model changes', function() { - * input.sendKeys(' hello'); - * expect(input.getAttribute('value')).toEqual('say hello'); - * input.sendKeys(protractor.Key.ESCAPE); - * expect(input.getAttribute('value')).toEqual('say'); - * other.click(); - * expect(model.getText()).toEqual('say'); - * }); - * - *
      - * - * ### Debouncing updates - * - * The next example shows how to debounce model changes. Model will be updated only 1 sec after last change. - * If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty. - * - * - * - *
      - *
      - * Name: - * - *
      - *
      - *
      user.name = 
      - *
      - *
      - * - * angular.module('optionsExample', []) - * .controller('ExampleController', ['$scope', function($scope) { - * $scope.user = { name: 'say' }; - * }]); - * - *
      - * - * - * ## Model updates and validation - * - * The default behaviour in `ngModel` is that the model value is set to `undefined` when the - * validation determines that the value is invalid. By setting the `allowInvalid` property to true, - * the model will still be updated even if the value is invalid. - * - * - * ## Connecting to the scope - * - * By setting the `getterSetter` property to true you are telling ngModel that the `ngModel` expression - * on the scope refers to a "getter/setter" function rather than the value itself. - * - * The following example shows how to bind to getter/setters: - * - * - * - *
      - *
      - * - *
      - *
      user.name = 
      - *
      - *
      - * - * angular.module('getterSetterExample', []) - * .controller('ExampleController', ['$scope', function($scope) { - * var _name = 'Brian'; - * $scope.user = { - * name: function(newName) { - * return angular.isDefined(newName) ? (_name = newName) : _name; - * } - * }; - * }]); - * - *
      - * - * - * ## Specifying timezones - * - * You can specify the timezone that date/time input directives expect by providing its name in the - * `timezone` property. - * - * - * ## Programmatically changing options - * - * The `ngModelOptions` expression is only evaluated once when the directive is linked; it is not - * watched for changes. However, it is possible to override the options on a single - * {@link ngModel.NgModelController} instance with - * {@link ngModel.NgModelController#$overrideModelOptions `NgModelController#$overrideModelOptions()`}. - * - * - * @param {Object} ngModelOptions options to apply to {@link ngModel} directives on this element and - * and its descendents. Valid keys are: - * - `updateOn`: string specifying which event should the input be bound to. You can set several - * events using an space delimited list. There is a special event called `default` that - * matches the default events belonging to the control. These are the events that are bound to - * the control, and when fired, update the `$viewValue` via `$setViewValue`. - * - * `ngModelOptions` considers every event that is not listed in `updateOn` a "default" event, - * since different control types use different default events. - * - * See also the section {@link ngModelOptions#triggering-and-debouncing-model-updates - * Triggering and debouncing model updates}. - * - * - `debounce`: integer value which contains the debounce model update value in milliseconds. A - * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a - * custom value for each event. For example: - * ``` - * ng-model-options="{ - * updateOn: 'default blur click', - * debounce: { 'default': 500, 'blur': 0 } - * }" - * ``` - * - * "default" also applies to all events that are listed in `updateOn` but are not - * listed in `debounce`, i.e. "click" would also be debounced by 500 milliseconds. - * - * - `allowInvalid`: boolean value which indicates that the model can be set with values that did - * not validate correctly instead of the default behavior of setting the model to undefined. - * - `getterSetter`: boolean value which determines whether or not to treat functions bound to - * `ngModel` as getters/setters. - * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for - * ``, ``, ... . It understands UTC/GMT and the - * continental US time zone abbreviations, but for general use, use a time zone offset, for - * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian) - * If not specified, the timezone of the browser will be used. - * - */ -var ngModelOptionsDirective = function() { - NgModelOptionsController.$inject = ['$attrs', '$scope']; - function NgModelOptionsController($attrs, $scope) { - this.$$attrs = $attrs; - this.$$scope = $scope; - } - NgModelOptionsController.prototype = { - $onInit: function() { - var parentOptions = this.parentCtrl ? this.parentCtrl.$options : defaultModelOptions; - var modelOptionsDefinition = this.$$scope.$eval(this.$$attrs.ngModelOptions); - - this.$options = parentOptions.createChild(modelOptionsDefinition); - } - }; - - return { - restrict: 'A', - // ngModelOptions needs to run before ngModel and input directives - priority: 10, - require: {parentCtrl: '?^^ngModelOptions'}, - bindToController: true, - controller: NgModelOptionsController - }; -}; - - -// shallow copy over values from `src` that are not already specified on `dst` -function defaults(dst, src) { - forEach(src, function(value, key) { - if (!isDefined(dst[key])) { - dst[key] = value; - } - }); -} - -/** - * @ngdoc directive - * @name ngNonBindable - * @restrict AC - * @priority 1000 - * @element ANY - * - * @description - * The `ngNonBindable` directive tells AngularJS not to compile or bind the contents of the current - * DOM element, including directives on the element itself that have a lower priority than - * `ngNonBindable`. This is useful if the element contains what appears to be AngularJS directives - * and bindings but which should be ignored by AngularJS. This could be the case if you have a site - * that displays snippets of code, for instance. - * - * @example - * In this example there are two locations where a simple interpolation binding (`{{}}`) is present, - * but the one wrapped in `ngNonBindable` is left alone. - * - - -
      Normal: {{1 + 2}}
      -
      Ignored: {{1 + 2}}
      -
      - - it('should check ng-non-bindable', function() { - expect(element(by.binding('1 + 2')).getText()).toContain('3'); - expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/); - }); - -
      - */ -var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 }); - -/* exported ngOptionsDirective */ - -/* global jqLiteRemove */ - -var ngOptionsMinErr = minErr('ngOptions'); - -/** - * @ngdoc directive - * @name ngOptions - * @restrict A - * - * @description - * - * The `ngOptions` attribute can be used to dynamically generate a list of `` - * DOM element. - * * `disable`: The result of this expression will be used to disable the rendered ` - * - *
      - * - *
      - *
      - *
      - * singleSelect = {{data.singleSelect}} - * - *
      - *
      - *
      - * multipleSelect = {{data.multipleSelect}}
      - * - *
      - * - * - * angular.module('staticSelect', []) - * .controller('ExampleController', ['$scope', function($scope) { - * $scope.data = { - * singleSelect: null, - * multipleSelect: [], - * option1: 'option-1' - * }; - * - * $scope.forceUnknownOption = function() { - * $scope.data.singleSelect = 'nonsense'; - * }; - * }]); - * - * - * - * @example - * ### Using `ngRepeat` to generate `select` options - * - * - *
      - *
      - * - * - *
      - *
      - * model = {{data.model}}
      - *
      - *
      - * - * angular.module('ngrepeatSelect', []) - * .controller('ExampleController', ['$scope', function($scope) { - * $scope.data = { - * model: null, - * availableOptions: [ - * {id: '1', name: 'Option A'}, - * {id: '2', name: 'Option B'}, - * {id: '3', name: 'Option C'} - * ] - * }; - * }]); - * - *
      - * - * @example - * ### Using `ngValue` to bind the model to an array of objects - * - * - *
      - *
      - * - * - *
      - *
      - *
      model = {{data.model | json}}

      - *
      - *
      - * - * angular.module('ngvalueSelect', []) - * .controller('ExampleController', ['$scope', function($scope) { - * $scope.data = { - * model: null, - * availableOptions: [ - {value: 'myString', name: 'string'}, - {value: 1, name: 'integer'}, - {value: true, name: 'boolean'}, - {value: null, name: 'null'}, - {value: {prop: 'value'}, name: 'object'}, - {value: ['a'], name: 'array'} - * ] - * }; - * }]); - * - *
      - * - * @example - * ### Using `select` with `ngOptions` and setting a default value - * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples. - * - * - * - *
      - *
      - * - * - *
      - *
      - * option = {{data.selectedOption}}
      - *
      - *
      - * - * angular.module('defaultValueSelect', []) - * .controller('ExampleController', ['$scope', function($scope) { - * $scope.data = { - * availableOptions: [ - * {id: '1', name: 'Option A'}, - * {id: '2', name: 'Option B'}, - * {id: '3', name: 'Option C'} - * ], - * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui - * }; - * }]); - * - *
      - * - * @example - * ### Binding `select` to a non-string value via `ngModel` parsing / formatting - * - * - * - * - * {{ model }} - * - * - * angular.module('nonStringSelect', []) - * .run(function($rootScope) { - * $rootScope.model = { id: 2 }; - * }) - * .directive('convertToNumber', function() { - * return { - * require: 'ngModel', - * link: function(scope, element, attrs, ngModel) { - * ngModel.$parsers.push(function(val) { - * return parseInt(val, 10); - * }); - * ngModel.$formatters.push(function(val) { - * return '' + val; - * }); - * } - * }; - * }); - * - * - * it('should initialize to model', function() { - * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two'); - * }); - * - * - * - */ -var selectDirective = function() { - - return { - restrict: 'E', - require: ['select', '?ngModel'], - controller: SelectController, - priority: 1, - link: { - pre: selectPreLink, - post: selectPostLink - } - }; - - function selectPreLink(scope, element, attr, ctrls) { - - var selectCtrl = ctrls[0]; - var ngModelCtrl = ctrls[1]; - - // if ngModel is not defined, we don't need to do anything but set the registerOption - // function to noop, so options don't get added internally - if (!ngModelCtrl) { - selectCtrl.registerOption = noop; - return; - } - - - selectCtrl.ngModelCtrl = ngModelCtrl; - - // When the selected item(s) changes we delegate getting the value of the select control - // to the `readValue` method, which can be changed if the select can have multiple - // selected values or if the options are being generated by `ngOptions` - element.on('change', function() { - selectCtrl.removeUnknownOption(); - scope.$apply(function() { - ngModelCtrl.$setViewValue(selectCtrl.readValue()); - }); - }); - - // If the select allows multiple values then we need to modify how we read and write - // values from and to the control; also what it means for the value to be empty and - // we have to add an extra watch since ngModel doesn't work well with arrays - it - // doesn't trigger rendering if only an item in the array changes. - if (attr.multiple) { - selectCtrl.multiple = true; - - // Read value now needs to check each option to see if it is selected - selectCtrl.readValue = function readMultipleValue() { - var array = []; - forEach(element.find('option'), function(option) { - if (option.selected && !option.disabled) { - var val = option.value; - array.push(val in selectCtrl.selectValueMap ? selectCtrl.selectValueMap[val] : val); - } - }); - return array; - }; - - // Write value now needs to set the selected property of each matching option - selectCtrl.writeValue = function writeMultipleValue(value) { - forEach(element.find('option'), function(option) { - var shouldBeSelected = !!value && (includes(value, option.value) || - includes(value, selectCtrl.selectValueMap[option.value])); - var currentlySelected = option.selected; - - // Support: IE 9-11 only, Edge 12-15+ - // In IE and Edge adding options to the selection via shift+click/UP/DOWN - // will de-select already selected options if "selected" on those options was set - // more than once (i.e. when the options were already selected) - // So we only modify the selected property if necessary. - // Note: this behavior cannot be replicated via unit tests because it only shows in the - // actual user interface. - if (shouldBeSelected !== currentlySelected) { - setOptionSelectedStatus(jqLite(option), shouldBeSelected); - } - - }); - }; - - // we have to do it on each watch since ngModel watches reference, but - // we need to work of an array, so we need to see if anything was inserted/removed - var lastView, lastViewRef = NaN; - scope.$watch(function selectMultipleWatch() { - if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) { - lastView = shallowCopy(ngModelCtrl.$viewValue); - ngModelCtrl.$render(); - } - lastViewRef = ngModelCtrl.$viewValue; - }); - - // If we are a multiple select then value is now a collection - // so the meaning of $isEmpty changes - ngModelCtrl.$isEmpty = function(value) { - return !value || value.length === 0; - }; - - } - } - - function selectPostLink(scope, element, attrs, ctrls) { - // if ngModel is not defined, we don't need to do anything - var ngModelCtrl = ctrls[1]; - if (!ngModelCtrl) return; - - var selectCtrl = ctrls[0]; - - // We delegate rendering to the `writeValue` method, which can be changed - // if the select can have multiple selected values or if the options are being - // generated by `ngOptions`. - // This must be done in the postLink fn to prevent $render to be called before - // all nodes have been linked correctly. - ngModelCtrl.$render = function() { - selectCtrl.writeValue(ngModelCtrl.$viewValue); - }; - } -}; - - -// The option directive is purely designed to communicate the existence (or lack of) -// of dynamically created (and destroyed) option elements to their containing select -// directive via its controller. -var optionDirective = ['$interpolate', function($interpolate) { - return { - restrict: 'E', - priority: 100, - compile: function(element, attr) { - var interpolateValueFn, interpolateTextFn; - - if (isDefined(attr.ngValue)) { - // Will be handled by registerOption - } else if (isDefined(attr.value)) { - // If the value attribute is defined, check if it contains an interpolation - interpolateValueFn = $interpolate(attr.value, true); - } else { - // If the value attribute is not defined then we fall back to the - // text content of the option element, which may be interpolated - interpolateTextFn = $interpolate(element.text(), true); - if (!interpolateTextFn) { - attr.$set('value', element.text()); - } - } - - return function(scope, element, attr) { - // This is an optimization over using ^^ since we don't want to have to search - // all the way to the root of the DOM for every single option element - var selectCtrlName = '$selectController', - parent = element.parent(), - selectCtrl = parent.data(selectCtrlName) || - parent.parent().data(selectCtrlName); // in case we are in optgroup - - if (selectCtrl) { - selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn); - } - }; - } - }; -}]; - -/** - * @ngdoc directive - * @name ngRequired - * @restrict A - * - * @param {expression} ngRequired AngularJS expression. If it evaluates to `true`, it sets the - * `required` attribute to the element and adds the `required` - * {@link ngModel.NgModelController#$validators `validator`}. - * - * @description - * - * ngRequired adds the required {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. - * It is most often used for {@link input `input`} and {@link select `select`} controls, but can also be - * applied to custom controls. - * - * The directive sets the `required` attribute on the element if the AngularJS expression inside - * `ngRequired` evaluates to true. A special directive for setting `required` is necessary because we - * cannot use interpolation inside `required`. See the {@link guide/interpolation interpolation guide} - * for more info. - * - * The validator will set the `required` error key to true if the `required` attribute is set and - * calling {@link ngModel.NgModelController#$isEmpty `NgModelController.$isEmpty`} with the - * {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} returns `true`. For example, the - * `$isEmpty()` implementation for `input[text]` checks the length of the `$viewValue`. When developing - * custom controls, `$isEmpty()` can be overwritten to account for a $viewValue that is not string-based. - * - * @example - * - * - * - *
      - *
      - * - * - *
      - * - *
      - *
      - * required error set? = {{form.input.$error.required}}
      - * model = {{model}} - *
      - *
      - *
      - * - var required = element(by.binding('form.input.$error.required')); - var model = element(by.binding('model')); - var input = element(by.id('input')); - - it('should set the required error', function() { - expect(required.getText()).toContain('true'); - - input.sendKeys('123'); - expect(required.getText()).not.toContain('true'); - expect(model.getText()).toContain('123'); - }); - * - *
      - */ -var requiredDirective = function() { - return { - restrict: 'A', - require: '?ngModel', - link: function(scope, elm, attr, ctrl) { - if (!ctrl) return; - attr.required = true; // force truthy in case we are on non input element - - ctrl.$validators.required = function(modelValue, viewValue) { - return !attr.required || !ctrl.$isEmpty(viewValue); - }; - - attr.$observe('required', function() { - ctrl.$validate(); - }); - } - }; -}; - -/** - * @ngdoc directive - * @name ngPattern - * @restrict A - * - * @param {expression|RegExp} ngPattern AngularJS expression that must evaluate to a `RegExp` or a `String` - * parsable into a `RegExp`, or a `RegExp` literal. See above for - * more details. - * - * @description - * - * ngPattern adds the pattern {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. - * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. - * - * The validator sets the `pattern` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} - * does not match a RegExp which is obtained from the `ngPattern` attribute value: - * - the value is an AngularJS expression: - * - If the expression evaluates to a RegExp object, then this is used directly. - * - If the expression evaluates to a string, then it will be converted to a RegExp after wrapping it - * in `^` and `$` characters. For instance, `"abc"` will be converted to `new RegExp('^abc$')`. - * - If the value is a RegExp literal, e.g. `ngPattern="/^\d+$/"`, it is used directly. - * - *
      - * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to - * start at the index of the last search's match, thus not taking the whole input value into - * account. - *
      - * - *
      - * **Note:** This directive is also added when the plain `pattern` attribute is used, with two - * differences: - *
        - *
      1. - * `ngPattern` does not set the `pattern` attribute and therefore HTML5 constraint validation is - * not available. - *
      2. - *
      3. - * The `ngPattern` attribute must be an expression, while the `pattern` value must be - * interpolated. - *
      4. - *
      - *
      - * - * @example - * - * - * - *
      - *
      - * - * - *
      - * - *
      - *
      - * input valid? = {{form.input.$valid}}
      - * model = {{model}} - *
      - *
      - *
      - * - var model = element(by.binding('model')); - var input = element(by.id('input')); - - it('should validate the input with the default pattern', function() { - input.sendKeys('aaa'); - expect(model.getText()).not.toContain('aaa'); - - input.clear().then(function() { - input.sendKeys('123'); - expect(model.getText()).toContain('123'); - }); - }); - * - *
      - */ -var patternDirective = function() { - return { - restrict: 'A', - require: '?ngModel', - link: function(scope, elm, attr, ctrl) { - if (!ctrl) return; - - var regexp, patternExp = attr.ngPattern || attr.pattern; - attr.$observe('pattern', function(regex) { - if (isString(regex) && regex.length > 0) { - regex = new RegExp('^' + regex + '$'); - } - - if (regex && !regex.test) { - throw minErr('ngPattern')('noregexp', - 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp, - regex, startingTag(elm)); - } - - regexp = regex || undefined; - ctrl.$validate(); - }); - - ctrl.$validators.pattern = function(modelValue, viewValue) { - // HTML5 pattern constraint validates the input value, so we validate the viewValue - return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue); - }; - } - }; -}; - -/** - * @ngdoc directive - * @name ngMaxlength - * @restrict A - * - * @param {expression} ngMaxlength AngularJS expression that must evaluate to a `Number` or `String` - * parsable into a `Number`. Used as value for the `maxlength` - * {@link ngModel.NgModelController#$validators validator}. - * - * @description - * - * ngMaxlength adds the maxlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. - * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. - * - * The validator sets the `maxlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} - * is longer than the integer obtained by evaluating the AngularJS expression given in the - * `ngMaxlength` attribute value. - * - *
      - * **Note:** This directive is also added when the plain `maxlength` attribute is used, with two - * differences: - *
        - *
      1. - * `ngMaxlength` does not set the `maxlength` attribute and therefore HTML5 constraint - * validation is not available. - *
      2. - *
      3. - * The `ngMaxlength` attribute must be an expression, while the `maxlength` value must be - * interpolated. - *
      4. - *
      - *
      - * - * @example - * - * - * - *
      - *
      - * - * - *
      - * - *
      - *
      - * input valid? = {{form.input.$valid}}
      - * model = {{model}} - *
      - *
      - *
      - * - var model = element(by.binding('model')); - var input = element(by.id('input')); - - it('should validate the input with the default maxlength', function() { - input.sendKeys('abcdef'); - expect(model.getText()).not.toContain('abcdef'); - - input.clear().then(function() { - input.sendKeys('abcde'); - expect(model.getText()).toContain('abcde'); - }); - }); - * - *
      - */ -var maxlengthDirective = function() { - return { - restrict: 'A', - require: '?ngModel', - link: function(scope, elm, attr, ctrl) { - if (!ctrl) return; - - var maxlength = -1; - attr.$observe('maxlength', function(value) { - var intVal = toInt(value); - maxlength = isNumberNaN(intVal) ? -1 : intVal; - ctrl.$validate(); - }); - ctrl.$validators.maxlength = function(modelValue, viewValue) { - return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength); - }; - } - }; -}; - -/** - * @ngdoc directive - * @name ngMinlength - * @restrict A - * - * @param {expression} ngMinlength AngularJS expression that must evaluate to a `Number` or `String` - * parsable into a `Number`. Used as value for the `minlength` - * {@link ngModel.NgModelController#$validators validator}. - * - * @description - * - * ngMinlength adds the minlength {@link ngModel.NgModelController#$validators `validator`} to {@link ngModel `ngModel`}. - * It is most often used for text-based {@link input `input`} controls, but can also be applied to custom text-based controls. - * - * The validator sets the `minlength` error key if the {@link ngModel.NgModelController#$viewValue `ngModel.$viewValue`} - * is shorter than the integer obtained by evaluating the AngularJS expression given in the - * `ngMinlength` attribute value. - * - *
      - * **Note:** This directive is also added when the plain `minlength` attribute is used, with two - * differences: - *
        - *
      1. - * `ngMinlength` does not set the `minlength` attribute and therefore HTML5 constraint - * validation is not available. - *
      2. - *
      3. - * The `ngMinlength` value must be an expression, while the `minlength` value must be - * interpolated. - *
      4. - *
      - *
      - * - * @example - * - * - * - *
      - *
      - * - * - *
      - * - *
      - *
      - * input valid? = {{form.input.$valid}}
      - * model = {{model}} - *
      - *
      - *
      - * - var model = element(by.binding('model')); - var input = element(by.id('input')); - - it('should validate the input with the default minlength', function() { - input.sendKeys('ab'); - expect(model.getText()).not.toContain('ab'); - - input.sendKeys('abc'); - expect(model.getText()).toContain('abc'); - }); - * - *
      - */ -var minlengthDirective = function() { - return { - restrict: 'A', - require: '?ngModel', - link: function(scope, elm, attr, ctrl) { - if (!ctrl) return; - - var minlength = 0; - attr.$observe('minlength', function(value) { - minlength = toInt(value) || 0; - ctrl.$validate(); - }); - ctrl.$validators.minlength = function(modelValue, viewValue) { - return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength; - }; - } - }; -}; - -if (window.angular.bootstrap) { - // AngularJS is already loaded, so we can return here... - if (window.console) { - console.log('WARNING: Tried to load AngularJS more than once.'); - } - return; -} - -// try to bind to jquery now so that one can write jqLite(fn) -// but we will rebind on bootstrap again. -bindJQuery(); - -publishExternalAPI(angular); - -angular.module("ngLocale", [], ["$provide", function($provide) { -var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; -function getDecimals(n) { - n = n + ''; - var i = n.indexOf('.'); - return (i == -1) ? 0 : n.length - i - 1; -} - -function getVF(n, opt_precision) { - var v = opt_precision; - - if (undefined === v) { - v = Math.min(getDecimals(n), 3); - } - - var base = Math.pow(10, v); - var f = ((n * base) | 0) % base; - return {v: v, f: f}; -} - -$provide.value("$locale", { - "DATETIME_FORMATS": { - "AMPMS": [ - "AM", - "PM" - ], - "DAY": [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - "ERANAMES": [ - "Before Christ", - "Anno Domini" - ], - "ERAS": [ - "BC", - "AD" - ], - "FIRSTDAYOFWEEK": 6, - "MONTH": [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - "SHORTDAY": [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ], - "SHORTMONTH": [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - "STANDALONEMONTH": [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - "WEEKENDRANGE": [ - 5, - 6 - ], - "fullDate": "EEEE, MMMM d, y", - "longDate": "MMMM d, y", - "medium": "MMM d, y h:mm:ss a", - "mediumDate": "MMM d, y", - "mediumTime": "h:mm:ss a", - "short": "M/d/yy h:mm a", - "shortDate": "M/d/yy", - "shortTime": "h:mm a" - }, - "NUMBER_FORMATS": { - "CURRENCY_SYM": "$", - "DECIMAL_SEP": ".", - "GROUP_SEP": ",", - "PATTERNS": [ - { - "gSize": 3, - "lgSize": 3, - "maxFrac": 3, - "minFrac": 0, - "minInt": 1, - "negPre": "-", - "negSuf": "", - "posPre": "", - "posSuf": "" - }, - { - "gSize": 3, - "lgSize": 3, - "maxFrac": 2, - "minFrac": 2, - "minInt": 1, - "negPre": "-\u00a4", - "negSuf": "", - "posPre": "\u00a4", - "posSuf": "" - } - ] - }, - "id": "en-us", - "localeID": "en_US", - "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} -}); -}]); - - jqLite(function() { - angularInit(window.document, bootstrap); - }); - -})(window); - -!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(''); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js deleted file mode 100644 index cd242a09..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js +++ /dev/null @@ -1,337 +0,0 @@ -/* - AngularJS v1.6.9 - (c) 2010-2018 Google, Inc. http://angularjs.org - License: MIT -*/ -(function(w){'use strict';function oe(a){if(B(a))u(a.objectMaxDepth)&&(Mc.objectMaxDepth=Wb(a.objectMaxDepth)?a.objectMaxDepth:NaN);else return Mc}function Wb(a){return Y(a)&&0c)return"...";var d=b.$$hashKey,g;if(I(a)){g=0;for(var f=a.length;g").append(a).html();try{return a[0].nodeType===Oa?L(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+L(b)})}catch(d){return L(b)}}function Tc(a){try{return decodeURIComponent(a)}catch(b){}}function ec(a){var b={};r((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g, -"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Tc(e),u(e)&&(f=u(f)?Tc(f):!0,ra.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function fc(a){var b=[];r(a,function(a,c){I(a)?r(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function fb(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi, -"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ve(a,b){var d,c,e=Ha.length;for(c=0;c protocol indicates an extension, document.location.href does not match."))}function Uc(a,b,d){B(d)||(d={});d=O({strictDi:!1},d);var c=function(){a=z(a);if(a.injector()){var c=a[0]===w.document?"document":za(a);throw qa("btstrpd",c.replace(//,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]); -b.unshift("ng");c=gb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;w&&e.test(w.name)&&(d.debugInfoEnabled=!0,w.name=w.name.replace(e,""));if(w&&!f.test(w.name))return c();w.name=w.name.replace(f,"");$.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};C($.resumeDeferredBootstrap)&&$.resumeDeferredBootstrap()}function ye(){w.name= -"NG_ENABLE_DEBUG_INFO!"+w.name;w.location.reload()}function ze(a){a=$.element(a).injector();if(!a)throw qa("test");return a.get("$$testability")}function Vc(a,b){b=b||"_";return a.replace(Ae,function(a,c){return(c?b:"")+a.toLowerCase()})}function Be(){var a;if(!Wc){var b=rb();(ma=x(b)?w.jQuery:b?w[b]:void 0)&&ma.fn.on?(z=ma,O(ma.fn,{scope:Sa.scope,isolateScope:Sa.isolateScope,controller:Sa.controller,injector:Sa.injector,inheritedData:Sa.inheritedData}),a=ma.cleanData,ma.cleanData=function(b){for(var c, -e=0,f;null!=(f=b[e]);e++)(c=ma._data(f,"events"))&&c.$destroy&&ma(f).triggerHandler("$destroy");a(b)}):z=V;$.element=z;Wc=!0}}function hb(a,b,d){if(!a)throw qa("areq",b||"?",d||"required");return a}function sb(a,b,d){d&&I(a)&&(a=a[a.length-1]);hb(C(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ia(a,b){if("hasOwnProperty"===a)throw qa("badname",b);}function Xc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g")+c[2];for(c=c[0];c--;)d=d.lastChild;f=db(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";r(f,function(a){e.appendChild(a)});return e}function V(a){if(a instanceof V)return a;var b;E(a)&&(a=Q(a),b=!0);if(!(this instanceof V)){if(b&&"<"!==a.charAt(0))throw lc("nosel");return new V(a)}if(b){b=w.document;var d;a=(d=fg.exec(a))?[b.createElement(d[1])]:(d=fd(a,b))?d.childNodes: -[];mc(this,a)}else C(a)?gd(a):mc(this,a)}function nc(a){return a.cloneNode(!0)}function yb(a,b){!b&&jc(a)&&z.cleanData([a]);a.querySelectorAll&&z.cleanData(a.querySelectorAll("*"))}function hd(a,b,d,c){if(u(c))throw lc("offargs");var e=(c=zb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];u(d)&&cb(c||[],d);u(d)&&c&&0l&&this.remove(n.key);return b}},get:function(a){if(l";b=Ba.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function na(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof z||(a=z(a));var g=Ua(a,b,a,c,d,e);da.$$addScopeClass(a); -var f=null;return function(b,c,d){if(!a)throw ca("multilink");hb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);f||(f=(d=d&&d[0])?"foreignobject"!==ya(d)&&ia.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==f?z(ka(f,z("
      ").append(a).html())):c?Sa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&& -c(d,b);g&&g(b,d,d,h);c||(a=g=null);return d}}function Ua(a,b,c,d,e,g){function f(a,c,d,e){var g,k,l,m,p,n,G;if(t)for(G=Array(c.length),m=0;ms.priority)break;if(w=s.scope)s.templateUrl||(B(w)?(aa("new/isolated scope",J||t,s,v),J=s):aa("new/isolated scope",J,s,v)),t=t||s;R=s.name;if(!u&&(s.replace&&(s.templateUrl||s.template)||s.transclude&&!s.$$tlb)){for(w=Da+1;u=a[w++];)if(u.transclude&&!u.$$tlb||u.replace&&(u.templateUrl||u.template)){Ib=!0;break}u=!0}!s.templateUrl&&s.controller&&(H=H||S(),aa("'"+R+"' controller",H[R],s,v),H[R]=s);if(w=s.transclude)if(ba=!0, -s.$$tlb||(aa("transclusion",y,s,v),y=s),"element"===w)T=!0,n=s.priority,P=v,v=d.$$element=z(da.$$createComment(R,d[R])),b=v[0],ma(g,xa.call(P,0),b),P[0].$$parentNode=P[0].parentNode,q=W(Ib,P,e,n,f&&f.name,{nonTlbTranscludeDirective:y});else{var na=S();if(B(w)){P=[];var Ua=S(),Ma=S();r(w,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Ua[a]=b;na[b]=null;Ma[b]=c});r(v.contents(),function(a){var b=Ua[Ea(ya(a))];b?(Ma[b]=!0,na[b]=na[b]||[],na[b].push(a)):P.push(a)});r(Ma,function(a,b){if(!a)throw ca("reqslot", -b);});for(var L in na)na[L]&&(na[L]=W(Ib,na[L],e))}else P=z(nc(b)).contents();v.empty();q=W(Ib,P,e,void 0,void 0,{needsNewScope:s.$$isolateScope||s.$$newScope});q.$$slots=na}if(s.template)if(M=!0,aa("template",A,s,v),A=s,w=C(s.template)?s.template(v,d):s.template,w=Ia(w),s.replace){f=s;P=kc.test(w)?qd(ka(s.templateNamespace,Q(w))):[];b=P[0];if(1!==P.length||1!==b.nodeType)throw ca("tplrt",R,"");ma(g,v,b);D={$attr:{}};w=K(b,[],D);var rc=a.splice(Da+1,a.length-(Da+1));(J||t)&&Z(w,J,t);a=a.concat(w).concat(rc); -fa(d,D);D=a.length}else v.html(w);if(s.templateUrl)M=!0,aa("template",A,s,v),A=s,s.replace&&(f=s),p=ja(a.splice(Da,a.length-Da),v,d,g,ba&&q,h,k,{controllerDirectives:H,newScopeDirective:t!==s&&t,newIsolateScopeDirective:J,templateDirective:A,nonTlbTranscludeDirective:y}),D=a.length;else if(s.compile)try{N=s.compile(v,d,q);var U=s.$$originalDirective||s;C(N)?m(null,Ra(U,N),Ta,E):N&&m(Ra(U,N.pre),Ra(U,N.post),Ta,E)}catch($){c($,za(v))}s.terminal&&(p.terminal=!0,n=Math.max(n,s.priority))}p.scope=t&& -!0===t.scope;p.transcludeOnThisElement=ba;p.templateOnThisElement=M;p.transclude=q;l.hasElementTranscludeDirective=T;return p}function X(a,b,c,d){var e;if(E(b)){var g=b.match(l);b=b.substring(g[0].length);var f=g[1]||g[3],g="?"===g[2];"^^"===f?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e=f?c.inheritedData(h):c.data(h)}if(!e&&!g)throw ca("ctreq",b,a);}else if(I(b))for(e=[],f=0,g=b.length;fc.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=$b(c,{$$start:k,$$end:l}));if(!c.$$bindings){var t=m=c,G=c.name,H={isolateScope:null,bindToController:null};B(t.scope)&&(!0===t.bindToController?(H.bindToController=d(t.scope,G,!0),H.isolateScope={}):H.isolateScope=d(t.scope,G,!1));B(t.bindToController)&&(H.bindToController=d(t.bindToController,G,!0));if(H.bindToController&&!t.controller)throw ca("noctrl",G);m=m.$$bindings=H;B(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c); -m=c}}return m}function $(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function ua(a,b){if("srcdoc"===b)return T.HTML;var c=ya(a);if("src"===b||"ngSrc"===b){if(-1===["img","video","audio","source","track"].indexOf(c))return T.RESOURCE_URL}else if("xlinkHref"===b||"form"===c&&"action"===b||"link"===c&&"href"===b)return T.RESOURCE_URL}function wa(a,c,d,e,g){var f=ua(a,e),h=k[e]||g,l=b(d,!g,f,h);if(l){if("multiple"===e&&"select"===ya(a))throw ca("selmulti", -za(a));if(m.test(e))throw ca("nodomevents");c.push({priority:100,compile:function(){return{pre:function(a,c,g){c=g.$$observers||(g.$$observers=S());var k=g[e];k!==d&&(l=k&&b(k,!0,f,h),d=k);l&&(g[e]=l(a),(c[e]||(c[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope||a).$watch(l,function(a,b){"class"===e&&a!==b?g.$updateClass(a,b):g.$set(e,a)}))}}}})}}function ma(a,b,c){var d=b[0],e=b.length,g=d.parentNode,f,h;if(a)for(f=0,h=a.length;f=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Oa&&""===d.nodeValue.trim())&&ug.call(a,b,1)}return a}function sg(a,b){if(b&&E(b))return b;if(E(a)){var d=td.exec(a);if(d)return d[3]}}function yf(){var a={},b=!1;this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b, -c){Ia(b,"controller");B(b)?O(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!B(a.$scope))throw K("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,p;h=!0===h;k&&E(k)&&(p=k);if(E(f)){k=f.match(td);if(!k)throw ud("ctrlfmt",f);m=k[1];p=p||k[3];f=a.hasOwnProperty(m)?a[m]:Xc(g.$scope,m,!0)||(b?Xc(c,m,!0):void 0);if(!f)throw ud("ctrlreg",m);sb(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h|| -null),p&&e(g,p,l,m||f.name),O(function(){var a=d.invoke(f,l,g,m);a!==l&&(B(a)||C(a))&&(l=a,p&&e(g,p,l,m||f.name));return l},{instance:l,identifier:p});l=d.instantiate(f,g,m);p&&e(g,p,l,m||f.name);return l}}]}function zf(){this.$get=["$window",function(a){return z(a.document)}]}function Af(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden;a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]} -function Bf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function tc(a){return B(a)?fa(a)?a.toISOString():eb(a):a}function Gf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Oc(a,function(a,c){null===a||x(a)||C(a)||(I(a)?r(a,function(a){b.push(ja(c)+"="+ja(tc(a)))}):b.push(ja(c)+"="+ja(tc(a))))});return b.join("&")}}}function Hf(){this.$get=function(){return function(a){function b(a,e,f){null===a||x(a)||(I(a)?r(a,function(a,c){b(a,e+"["+(B(a)? -c:"")+"]")}):B(a)&&!fa(a)?Oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(tc(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function uc(a,b){if(E(a)){var d=a.replace(vg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(vd),e;(e=c)||(e=(e=d.match(wg))&&xg[e[0]].test(d));if(e)try{a=Rc(d)}catch(f){if(!c)return a;throw Kb("baddata",a,f);}}}return a}function wd(a){var b=S(),d;E(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=L(Q(a.substr(0,d)));a= -Q(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):B(a)&&r(a,function(a,d){var f=L(d),g=Q(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function xd(a){var b;return function(d){b||(b=wd(a));return d?(d=b[L(d)],void 0===d&&(d=null),d):b}}function yd(a,b,d,c){if(C(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Ff(){var a=this.defaults={transformResponse:[uc],transformRequest:[function(a){return B(a)&&"[object File]"!==ia.call(a)&&"[object Blob]"!==ia.call(a)&&"[object FormData]"!==ia.call(a)? -eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ka(vc),put:ka(vc),patch:ka(vc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return u(a)?(b=!!a,this):b};var d=this.interceptors=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(c,e,f,g,h,k,l,m){function p(b){function d(a,b){for(var c=0, -e=b.length;ca?b:k.reject(b)}if(!B(b))throw K("$http")("badreq",b);if(!E(m.valueOf(b.url)))throw K("$http")("badreq",b.url);var f=O({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer, -jsonpCallbackParam:a.jsonpCallbackParam},b);f.headers=function(b){var c=a.headers,d=O({},b.headers),g,f,h,c=O({},c.common,c[L(b.method)]);a:for(g in c){f=L(g);for(h in d)if(L(h)===f)continue a;d[g]=c[g]}return e(d,ka(b))}(b);f.method=ub(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;c.$$incOutstandingRequestCount();var h=[],p=[];b=k.resolve(f);r(y,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&& -p.push(a.response,a.responseError)});b=d(b,h);b=b.then(function(b){var c=b.headers,d=yd(b.data,xd(c),void 0,b.transformRequest);x(d)&&r(c,function(a,b){"content-type"===L(b)&&delete c[b]});x(b.withCredentials)&&!x(a.withCredentials)&&(b.withCredentials=a.withCredentials);return n(b,d).then(g,g)});b=d(b,p);return b=b.finally(function(){c.$$completeOutstandingRequest(D)})}function n(c,d){function g(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d(): -h.$apply(d)}});return c}}function l(a,c,d,e,g){function f(){n(c,a,d,e,g)}M&&(200<=a&&300>a?M.put(N,[a,c,wd(d),e,g]):M.remove(N));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function n(a,b,d,e,g){b=-1<=b?b:0;(200<=b&&300>b?J.resolve:J.reject)({data:a,status:b,headers:xd(d),config:c,statusText:e,xhrStatus:g})}function G(a){n(a.data,a.status,ka(a.headers()),a.statusText,a.xhrStatus)}function y(){var a=p.pendingRequests.indexOf(c);-1!==a&&p.pendingRequests.splice(a,1)}var J=k.defer(),R=J.promise,M, -T,P=c.headers,q="jsonp"===L(c.method),N=c.url;q?N=m.getTrustedResourceUrl(N):E(N)||(N=m.valueOf(N));N=F(N,c.paramSerializer(c.params));q&&(N=s(N,c.jsonpCallbackParam));p.pendingRequests.push(c);R.then(y,y);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(M=B(c.cache)?c.cache:B(a.cache)?a.cache:v);M&&(T=M.get(N),u(T)?T&&C(T.then)?T.then(G,G):I(T)?n(T[1],T[0],ka(T[2]),T[3],T[4]):n(T,200,{},"OK","complete"):M.put(N,R));x(T)&&((T=zd(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]: -void 0)&&(P[c.xsrfHeaderName||a.xsrfHeaderName]=T),e(c.method,N,d,l,P,c.timeout,c.withCredentials,c.responseType,g(c.eventHandlers),g(c.uploadEventHandlers)));return R}function F(a,b){0=l&&(r.resolve(y),v(q.$$intervalId),delete g[q.$$intervalId]);t||a.$apply()},k);g[q.$$intervalId]=r;return q} -var g={};f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].promise.$$state.pur=!0,g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete g[a.$$intervalId],!0):!1};return f}]}function wc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=fb(a[b].replace(/%2F/g,"/"));return a.join("/")}function Ad(a,b){var d=ta(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=Z(d.port)||zg[d.protocol]||null}function Bd(a,b,d){if(Ag.test(a))throw kb("badpath",a);var c="/"!== -a.charAt(0);c&&(a="/"+a);a=ta(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=ec(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function xc(a,b){return a.slice(0,b.length)===b}function ua(a,b){if(xc(b,a))return b.substr(a.length)}function La(a){var b=a.indexOf("#");return-1===b?a: -a.substr(0,b)}function lb(a){return a.replace(/(#.+)|#$/,"$1")}function yc(a,b,d){this.$$html5=!0;d=d||"";Ad(a,this);this.$$parse=function(a){var d=ua(b,a);if(!E(d))throw kb("ipthprfx",a,b);Bd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=fc(this.$$search),d=this.$$hash?"#"+fb(this.$$hash):"";this.$$url=wc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1);this.$$urlUpdatedByLocation=!0};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)), -!0;var f,g;u(f=ua(a,c))?(g=f,g=d&&u(f=ua(d,f))?b+(ua("/",f)||f):a+g):u(f=ua(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function zc(a,b,d){Ad(a,this);this.$$parse=function(c){var e=ua(a,c)||ua(b,c),f;x(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",x(e)&&(a=c,this.replace())):(f=ua(d,e),x(f)&&(f=e));Bd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;xc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=fc(this.$$search), -e=this.$$hash?"#"+fb(this.$$hash):"";this.$$url=wc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?d+this.$$url:"");this.$$urlUpdatedByLocation=!0};this.$$parseLinkUrl=function(b,d){return La(a)===La(b)?(this.$$parse(b),!0):!1}}function Cd(a,b,d){this.$$html5=!0;zc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===La(c)?f=c:(g=ua(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=fc(this.$$search), -e=this.$$hash?"#"+fb(this.$$hash):"";this.$$url=wc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url;this.$$urlUpdatedByLocation=!0}}function Lb(a){return function(){return this[a]}}function Dd(a,b){return function(d){if(x(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Lf(){var a="!",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return u(b)?(a=b,this):a};this.html5Mode=function(a){if(Na(a))return b.enabled=a,this;if(B(a)){Na(a.enabled)&&(b.enabled= -a.enabled);Na(a.requireBase)&&(b.requireBase=a.requireBase);if(Na(a.rewriteLinks)||E(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function h(a,b,d){var e=l.url(),g=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(f){throw l.url(e),l.$$state=g,f;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var p=c.url(),n;if(b.enabled){if(!m&& -b.requireBase)throw kb("nobase");n=p.substring(0,p.indexOf("/",p.indexOf("//")+2))+(m||"/");m=e.history?yc:Cd}else n=La(p),m=zc;var F=n.substr(0,La(n).lastIndexOf("/")+1);l=new m(n,F,"#"+a);l.$$parseLinkUrl(p,p);l.$$state=c.state();var s=/^\s*(javascript|mailto):/i;f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var h=z(a.target);"a"!==ya(h[0]);)if(h[0]===f[0]||!(h=h.parent())[0])return;if(!E(e)||!x(h.attr(e))){var e=h.prop("href"), -k=h.attr("href")||h.attr("xlink:href");B(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ta(e.animVal).href);s.test(e)||!e||h.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(e,k)||(a.preventDefault(),l.absUrl()!==c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}});lb(l.absUrl())!==lb(p)&&c.url(l.absUrl(),!0);var v=!0;c.onUrlChange(function(a,b){xc(a,F)?(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,g;a=lb(a);l.$$parse(a);l.$$state=b;g=d.$broadcast("$locationChangeStart", -a,c,b,e).defaultPrevented;l.absUrl()===a&&(g?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(v=!1,k(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(v||l.$$urlUpdatedByLocation){l.$$urlUpdatedByLocation=!1;var a=lb(c.url()),b=lb(l.absUrl()),g=c.state(),f=l.$$replace,m=a!==b||l.$$html5&&e.history&&g!==l.$$state;if(v||m)v=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,g).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=g): -(m&&h(b,f,g===l.$$state?null:l.$$state),k(a,g)))})}l.$$replace=!1});return l}]}function Mf(){var a=!0,b=this;this.debugEnabled=function(b){return u(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){bc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||D;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e, -b,a)}}var f=Ca||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Bg(a){return a+""}function Cg(a,b){return"undefined"!==typeof a?a:b}function Ed(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Dg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!== -a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Fd:b}function W(a,b,d){var c,e,f=a.isPure=Dg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){W(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch=[];break;case q.UnaryExpression:W(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:W(a.left,b,f);W(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch= -a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:W(a.left,b,f);W(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:W(a.test,b,f);W(a.alternate,b,f);W(a.consequent,b,f);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:W(a.object,b,f);a.computed&&W(a.property,b,f);a.constant=a.object.constant&& -(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){W(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:W(a.left,b,f);W(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){W(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c; -a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){W(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(W(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant=!1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Gd(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Hd(a){return a.type=== -q.Identifier||a.type===q.MemberExpression}function Id(a){if(1===a.body.length&&Hd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Jd(a){this.$filter=a}function Kd(a){this.$filter=a}function Mb(a,b,d){this.ast=new q(a,d);this.astCompiler=d.csp?new Kd(b):new Jd(b)}function Ac(a){return C(a.valueOf)?a.valueOf():Eg.call(a)}function Nf(){var a=S(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral= -function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,g;switch(typeof b){case "string":return g=b=b.trim(),d=a[g],d||(d=new Nb(n),d=(new Mb(d,e,n)).parse(b),d.constant?d.$$watchDelegate=m:d.oneTime?d.$$watchDelegate=d.literal?l:k:d.inputs&&(d.$$watchDelegate=h),a[g]=d),p(d,c);case "function":return p(b,c);default:return p(D,c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Ac(a),"object"!==typeof a|| -c)?a===b||a!==a&&b!==b:!1}function h(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Ac(b));return h},b,c,e)}for(var l=[],m=[],p=0,n=f.length;p=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,g=0,f=e.length;ga)for(b in l++,f)ra.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1F&&(y=4-F,A[y]||(A[y]=[]),A[y].push({msg:C(a.exp)?"fn: "+(a.exp.name||a.exp.toString()): -a.exp,newVal:g,oldVal:k}));else if(a===c){r=!1;break a}}catch(D){f(D)}if(!(n=q.$$watchersCount&&q.$$childHead||q!==this&&q.$$nextSibling))for(;q!==this&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((r||u.length)&&!F--)throw t.$$phase=null,d("infdig",b,A);}while(r||u.length);for(t.$$phase=null;HCa)throw va("iequirks");var c=ka(oa);c.isEnabled=function(){return a};c.trustAs= -d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=ab);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(oa,function(a,b){var d=L(b);c[("parse_as_"+d).replace(Bc,wb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Bc,wb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Bc,wb)]=function(b){return g(a,b)}});return c}]} -function Tf(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=Z((/android (\d+)/.exec(L((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h=g.body&&g.body.style,k=!1,l=!1;h&&(k=!!("transition"in h||"webkitTransition"in h),l=!!("animation"in h||"webkitAnimation"in h));return{history:!(!c|| -4>e||f),hasEvent:function(a){if("input"===a&&Ca)return!1;if(x(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ja(),transitions:k,animations:l,android:e}}]}function Vf(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(h,k){g.totalPendingRequests++;if(!E(h)||x(d.get(h)))h=f.getTrustedResourceUrl(h);var l=c.defaults&&c.defaults.transformResponse;I(l)?l=l.filter(function(a){return a!== -uc}):l===uc&&(l=null);return c.get(h,O({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){d.put(h,a.data);return a.data},function(a){k||(a=Gg("tpload",h,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function Wf(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=$.element(a).data("$binding");c&& -r(c,function(c){d?(new RegExp("(^|\\s)"+Md(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;hc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Dc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Dc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Wd&&(d=d.splice(0,Wd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function Og(a,b,d,c){var e=a.d,f=e.length-a.i;b=x(b)?Math.min(Math.max(d,f),c):+b;d= -b+a.i;c=e[d];if(0d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;fh;)k.unshift(0),h++;0=b.lgSize&&h.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>b.gSize;)h.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&h.unshift(k.join(""));k=h.join(d);f.length&&(k+=c+f.join(""));e&&(k+="e+"+e)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+k+b.posSuf}function Ob(a,b,d,c){var e="";if(0>a||c&&0>= -a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length-d)f+=d;0===f&&-12===d&&(f=12);return Ob(f,b,c,e)}}function mb(a,b,d){return function(c,e){var f=c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Xd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Yd(a){return function(b){var d=Xd(b.getFullYear());b=+new Date(b.getFullYear(), -b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Ob(b,a)}}function Ec(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Rd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Z(b[9]+b[10]),g=Z(b[9]+b[11]));h.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));f=Z(b[4]||0)-f;g=Z(b[5]||0)-g;h=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; -return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=Pg.test(c)?Z(c):b(c));Y(c)&&(c=new Date(c));if(!fa(c)||!isFinite(c.getTime()))return c;for(;d;)(l=Qg.exec(d))?(h=db(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=Sc(f,m),c=dc(c,f,!0));r(h,function(b){k=Rg[b];g+=k?k(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Ig(){return function(a,b){x(b)&&(b=2);return eb(a,b)}}function Jg(){return function(a, -b,d){b=Infinity===Math.abs(Number(b))?Number(b):Z(b);if(U(b))return a;Y(a)&&(a=a.toString());if(!wa(a))return a;d=!d||isNaN(d)?0:Z(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Fc(a,d,d+b):0===d?Fc(a,b,a.length):Fc(a,Math.max(0,d+b),d)}}function Fc(a,b,d){return E(a)?a.slice(b,d):xa.call(a,b,d)}function Td(a){function b(b){return b.map(function(b){var c=1,d=ab;if(C(b))d=b;else if(E(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e= -d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,k=b.type;if(d===k){var k=a.value,l=b.value;"string"===d?(k=k.toLowerCase(),l=l.toLowerCase()):"object"===d&&(B(k)&&(k=a.index),B(l)&&(l=b.index));k!==l&&(c=kb||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ce[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!k){var b=this.validity,c=b.badInput,d=b.typeMismatch;k=f.defer(function(){k=null;b.badInput===c&& -b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(fa(d))return d;if(E(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(Sg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970, -MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){c=q};g.$observe("min",function(a){q=n(a);h.$validate()})}if(u(g.max)||g.ngMax){var y;h.$validators.max=function(a){return!p(a)||x(y)||d(a)<=y};g.$observe("max",function(a){y=n(a);h.$validate()})}}}function Hc(a,b,d,c){(c.$$hasNativeValidators=B(b[0].validity))&&c.$parsers.push(function(a){var c= -b.prop("validity")||{};return c.badInput||c.typeMismatch?void 0:a})}function de(a){a.$$parserName="number";a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(Tg.test(b))return parseFloat(b)});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!Y(b))throw pb("numfmt",b);b=b.toString()}return b})}function Wa(a){u(a)&&!Y(a)&&(a=parseFloat(a));return U(a)?void 0:a}function Ic(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ee(a, -b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Ic(a):0,h=e?Ic(b):0,k=f?Ic(d):0,g=Math.max(g,h,k),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function fe(a,b,d,c,e){if(u(c)){a=a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Jc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d(?:<\/\1>|)$/,kc=/<|&#?\w+;/,dg=/<([\w:-]+)/,eg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,aa={option:[1,'"],thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};aa.optgroup=aa.option;aa.tbody=aa.tfoot=aa.colgroup=aa.caption=aa.thead;aa.th=aa.td;var lg=w.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Sa=V.prototype={ready:gd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"}, -eq:function(a){return 0<=a?z(this[a]):z(this[this.length+a])},length:0,push:Wg,sort:[].sort,splice:[].splice},Gb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Gb[L(a)]=a});var ld={};r("input select option textarea button form details".split(" "),function(a){ld[a]=!0});var sd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:pc,removeData:oc,hasData:function(a){for(var b in ib[a.ng339])return!0; -return!1},cleanData:function(a){for(var b=0,d=a.length;b/,og=/^[^(]*\(\s*([^)]*)\)/m, -Zg=/,/,$g=/^\s*(_?)(\S+?)\1\s*$/,mg=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ba=K("$injector");gb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw E(d)&&d||(d=a.name||pg(a)),Ba("strictdi",d);b=nd(a);r(b[1].split(Zg),function(a){a.replace($g,function(a,b,d){c.push(d)})})}a.$inject=c}}else I(a)?(b=a.length-1,sb(a[b],"fn"),c=a.slice(0,b)):sb(a,"fn",!0);return c};var he=K("$animate"),sf=function(){this.$get=D},tf=function(){var a=new Hb,b=[];this.$get= -["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=E(b)?b.split(" "):I(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=qg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Db(a,e);f&&Cb(a,f)});a.delete(b)}});b.length=0}return{enabled:D,on:D,off:D,pin:D,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass|| -k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.set(g,k),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},qf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw he("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g,d)};this.customFilter=function(a){1===arguments.length&&(c=C(a)?a:null);return c}; -this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,he("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e <= >= && || ! = |".split(" "),function(a){Ub[a]=!0});var ch={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Nb=function(a){this.options=a};Nb.prototype={constructor:Nb,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue? -this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"=== -a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=u(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Xa("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a}, -unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=pa(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}: -this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE"); -return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}}, -arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")? -(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Xa("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Xa("ueoe", -this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Xa("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression}, -$locals:{type:q.LocalsExpression}}};var Fd=2;Jd.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};W(a,b.$filter);var d="",c;this.stage="assign";if(c=Id(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Gd(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d; -var h=b.nextId();b.recurse(a,h);b.return_(h);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Bg,Cg,Ed);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs, -d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length? -"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,h,k=this,l,m,p;c=c||D;if(!f&&u(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){k.recurse(b.expression,void 0,void 0,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case q.Literal:m=this.escape(a.value); -this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){h=a});m=a.operator+"("+this.ifDefined(h,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId(); -k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"=== -k.stage||"s",function(){e&&1!==e&&k.if_(k.isNull(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,void 0,function(){k.if_(k.notNull(g),function(){a.computed?(h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),e&&1!==e&&k.if_(k.not(k.computedMember(g, -h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.computedMember(g,h),k.assign(b,m),d&&(d.computed=!0,d.name=h)):(e&&1!==e&&k.if_(k.isNull(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}")),m=k.nonComputedMember(g,a.property.name),k.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){k.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],r(a.arguments,function(a){var b= -k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){r(a.arguments,function(b){k.recurse(b,a.constant?void 0:k.nextId(),void 0,function(a){l.push(a)})});m=g.name?k.member(g.context,g.name,g.computed)+"("+l.join(",")+")":h+"("+l.join(",")+")";k.assign(b,m)},function(){k.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:h=this.nextId();g={};this.recurse(a.left,void 0, -g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){k.recurse(b,a.constant?void 0:k.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed? -(g=k.nextId(),k.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;h=k.nextId();k.recurse(a.value,h);k.assign(k.member(b,g,a.computed),h)})):(r(a.properties,function(b){k.recurse(b.value,a.constant?void 0:k.nextId(),void 0,function(a){l.push(k.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break; -case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a, -b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a, -b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex, -this.stringEscapeFn)+"'";if(Y(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Xa("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Kd.prototype={compile:function(a){var b=this;W(a,b.$filter);var d,c;if(d=Id(a))c=this.recurse(d);d=Gd(a.body);var e;d&&(e=[],r(d,function(a,c){var d= -b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body,function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?D:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument), -this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed|| -(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f, -g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0, -name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c=e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,h){var k=a(e,f,g,h),l,m;null!=k&&(l=b(e,f,g,h),l+="",c&&1!==c&&k&&!k[l]&&(k[l]={}),m=k[l]);return d?{context:k,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0; -return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};Mb.prototype={constructor:Mb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"=== -a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a),oneTime:b}}};var va=K("$sce"),oa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Bc=/_([a-z])/g,Gg=K("$compile"),X=w.document.createElement("a"),Od=ta(w.location.href);Pd.$inject=["$document"];ed.$inject=["$provide"];var Wd=22,Vd=".",Dc="0";Qd.$inject=["$locale"];Sd.$inject=["$locale"];var Rg={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0),MMMM:mb("Month"), -MMM:mb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:mb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:mb("Day"),EEE:mb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Ob(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},Qg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,Pg=/^-?\d+$/;Rd.$inject=["$locale"];var Kg=la(L),Lg=la(ub);Td.$inject=["$parse"];var He=la({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===ia.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)|| -a.preventDefault()})}}}}),vb={};r(Gb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=Ea("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(sd,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(Vg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b, -a)})}}}});r(["src","srcset","href"],function(a){var b=Ea("ng-"+a);vb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===ia.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ca&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Qb={$addControl:D,$$renameControl:function(a,b){a.$name=b},$removeControl:D,$setValidity:D,$setDirty:D,$setPristine:D,$setSubmitted:D};Pb.$inject=["$element", -"$attrs","$scope","$animate","$interpolate"];Pb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ia(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name]; -r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=Qb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Ya);this.$$animate.addClass(this.$$element,Vb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Ya,Vb+" ng-submitted");this.$dirty= -!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){this.$$animate.addClass(this.$$element,"ng-submitted");this.$submitted=!0;this.$$parentForm.$setSubmitted()}};ae({clazz:Pb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var ie=function(a){return["$timeout","$parse", -function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||D}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Pb,compile:function(d,f){d.addClass(Ya).addClass(nb);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit", -n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var r=g?c(p.$name):D;g&&(r(a,p),e.$observe(g,function(b){p.$name!==b&&(r(a,void 0),p.$$parentForm.$$renameControl(p,b),r=c(p.$name),r(a,p))}));d.on("$destroy",function(){p.$$parentForm.$removeControl(p);r(a,void 0);O(p,Qb)})}}}}}]},Ie=ie(),Ue=ie(!0),Sg=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,dh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i, -eh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Tg=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,je=/^(\d{4,})-(\d{2})-(\d{2})$/,ke=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Lc=/^(\d{4,})-W(\d\d)$/,le=/^(\d{4,})-(\d\d)$/,me=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ce=S();r(["date","datetime-local","month","time","week"],function(a){ce[a]= -!0});var ne={text:function(a,b,d,c,e,f){Va(a,b,d,c,e,f);Gc(c)},date:ob("date",je,Rb(je,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",ke,Rb(ke,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",me,Rb(me,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Lc,function(a,b){if(fa(a))return a;if(E(a)){Lc.lastIndex=0;var d=Lc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Xd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds()); -return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:ob("month",le,Rb(le,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hc(a,b,d,c);de(c);Va(a,b,d,c,e,f);var g,h;if(u(d.min)||d.ngMin)c.$validators.min=function(a){return c.$isEmpty(a)||x(g)||a>=g},d.$observe("min",function(a){g=Wa(a);c.$validate()});if(u(d.max)||d.ngMax)c.$validators.max=function(a){return c.$isEmpty(a)||x(h)||a<=h},d.$observe("max",function(a){h=Wa(a);c.$validate()});if(u(d.step)||d.ngStep){var k;c.$validators.step= -function(a,b){return c.$isEmpty(b)||x(k)||ee(b,g||0,k)};d.$observe("step",function(a){k=Wa(a);c.$validate()})}},url:function(a,b,d,c,e,f){Va(a,b,d,c,e,f);Gc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||dh.test(d)}},email:function(a,b,d,c,e,f){Va(a,b,d,c,e,f);Gc(c);c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||eh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==Q(d.ngTrim);x(d.name)&&b.attr("name",++qb); -b.on("click",function(a){var g;b[0].checked&&(g=d.value,e&&(g=Q(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=Q(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);d.$observe(a,c)}function h(a){p=Wa(a);U(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function k(a){n=Wa(a);U(c.$modelValue)||(m?(a=b.val(),n=p},g("min",h));e&& -(c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||x(n)||b<=n},g("max",k));f&&(c.$validators.step=m?function(){return!q.stepMismatch}:function(a,b){return c.$isEmpty(b)||x(r)||ee(b,p||0,r)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,h){var k=fe(h,a,"ngTrueValue",d.ngTrueValue,!0),l=fe(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1=== -a};c.$formatters.push(function(a){return sa(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:D,button:D,submit:D,reset:D,file:D},Zc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(ne[L(g.type)]||ne.text)(e,f,g,h[0],b,a,d,c)}}}}],fh=/^(true|false|\d+)$/,mf=function(){function a(a,d,c){var e=u(c)?c:9===Ca?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return fh.test(d.ngValue)? -function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue,function(b){a(d,f,b)})}}}},Me=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=gc(a)})}}}}],Oe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions); -d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=x(a)?"":a})}}}}],Ne=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],lf=la({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}), -Pe=Jc("",!0),Re=Jc("Odd",0),Qe=Jc("Even",1),Se=Qa({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Te=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],dd={},gh={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=Ea("ng-"+a);dd[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g= -d(f[b]);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};gh[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var We=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var h,k,l;d.$watch(e.ngIf,function(d){d?k||g(function(d,f){k=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);h={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),k&&(k.$destroy(),k=null),h&&(l= -tb(h.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),h=null))})}}}],Xe=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:$.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,p,n){var r=0,q,v,y,t=function(){v&&(v.remove(),v=null);q&&(q.$destroy(),q=null);y&&(d.leave(y).done(function(a){!1!==a&&(v=null)}),v=y,y=null)};c.$watch(f,function(f){var m=function(a){!1=== -a||!u(h)||h&&!c.$eval(h)||b()},v=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&v===r){var b=c.$new();p.template=a;a=n(b,function(a){t();d.enter(a,null,e).done(m)});q=b;y=a;q.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||v!==r||(t(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(t(),p.template=null)})}}}}],of=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){ia.call(d[0]).match(/SVG/)? -(d.empty(),a(fd(e.template,w.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],Ye=Qa({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),kf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?Q(e):e;c.$parsers.push(function(a){if(!x(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?Q(a):a)});return b}});c.$formatters.push(function(a){if(I(a))return a.join(e)}); -c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",$d="ng-invalid",Ya="ng-pristine",Vb="ng-dirty",pb=K("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" ");Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);C(c)&&(c=a(b));return c};this.$$ngModelSet= -function(a,c){C(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,za(this.$$element));},$render:D,$isEmpty:function(a){return x(a)||""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element, -"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Vb);this.$$animate.addClass(this.$$element,Ya)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element,Ya);this.$$animate.addClass(this.$$element,Vb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched= -!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!U(this.$modelValue)){var a=this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!== -c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(k.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(k.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(k.$asyncValidators,function(e,g){var k=e(a,b);if(!k||!C(k.then))throw pb("nopromise",k);f(g,void 0);c.push(k.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?k.$$q.all(c).then(function(){g(d)},D):g(!0)}function f(a,b){h===k.$$currentValidationRunId&& -k.$setValidity(a,b)}function g(a){h===k.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var h=this.$$currentValidationRunId,k=this;(function(){var a=k.$$parserName||"parse";if(x(k.$$parserValid))f(a,null);else return k.$$parserValid||(r(k.$validators,function(a,b){f(b,null)}),r(k.$asyncValidators,function(a,b){f(b,null)})),f(a,k.$$parserValid),k.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce); -if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;if(this.$$parserValid=x(a)?void 0:!0)for(var d=0;de||c.$isEmpty(b)||b.length<=e}}}}},bd=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=Z(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};w.angular.bootstrap?w.console&&console.log("WARNING: Tried to load AngularJS more than once."): -(Be(),Ee($),$.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), -STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2, -minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),z(function(){we(w.document,Uc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(''); -//# sourceMappingURL=angular.min.js.map diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js.gzip b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js.gzip deleted file mode 100644 index ceccaf51..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js.gzip and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js.map b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js.map deleted file mode 100644 index efa32160..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/angular.min.js.map +++ /dev/null @@ -1,8 +0,0 @@ -{ -"version":3, -"file":"angular.min.js", -"lineCount":336, -"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAAS,CAiClBC,QAASA,GAAmB,CAACC,CAAD,CAAS,CACnC,GAAIC,CAAA,CAASD,CAAT,C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AAuJ,SAAZ,CAA6BmD,EAA7B,CADgB,CAAlB,CA7JF,CA94iCkB,CAAjB,CAAD,CA+ijCG1M,MA/ijCH,CAijjCC8mE,EAAA9mE,MAAAuO,QAAAslF,MAAA,EAAA/sB,cAAD,EAAyC9mE,MAAAuO,QAAAtI,QAAA,CAAuBsD,QAAAuqF,KAAvB,CAAArpB,QAAA,CAA8C,gRAA9C;", -"sources":["angular.js"], -"names":["window","errorHandlingConfig","config","isObject","isDefined","objectMaxDepth","minErrConfig","isValidObjectMaxDepth","NaN","maxDepth","isNumber","minErr","isArrayLike","obj","isWindow","isArray","isString","jqLite","length","Object","Array","item","forEach","iterator","context","key","isFunction","hasOwnProperty","call","isPrimitive","isBlankObject","forEachSorted","keys","sort","i","reverseParams","iteratorFn","value","nextUid","uid","baseExtend","dst","objs","deep","h","$$hashKey","ii","j","jj","src","isDate","Date","valueOf","isRegExp","RegExp","nodeName","cloneNode","isElement","clone","extend","slice","arguments","merge","toInt","str","parseInt","inherit","parent","extra","create","noop","identity","$","valueFn","valueRef","hasCustomToString","toString","isUndefined","getPrototypeOf","isError","tag","Error","isScope","$evalAsync","$watch","isBoolean","isTypedArray","TYPED_ARRAY_REGEXP","test","node","prop","attr","find","makeMap","items","split","nodeName_","element","lowercase","arrayRemove","array","index","indexOf","splice","copy","source","destination","copyRecurse","push","copyElement","stackSource","stackDest","ngMinErr","needsRecurse","copyType","undefined","constructor","buffer","byteOffset","copied","ArrayBuffer","byteLength","set","Uint8Array","re","match","lastIndex","type","simpleCompare","a","b","equals","o1","o2","t1","t2","getTime","keySet","createMap","charAt","concat","array1","array2","bind","self","fn","curryArgs","startIndex","apply","toJsonReplacer","val","document","toJson","pretty","JSON","stringify","fromJson","json","parse","timezoneToOffset","timezone","fallback","replace","ALL_COLONS","requestedTimezoneOffset","isNumberNaN","convertTimezoneToLocal","date","reverse","dateTimezoneOffset","getTimezoneOffset","timezoneOffset","setMinutes","getMinutes","minutes","startingTag","empty","elemHtml","append","html","nodeType","NODE_TYPE_TEXT","e","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","splitPoint","substring","toKeyValue","parts","arrayValue","encodeUriQuery","join","encodeUriSegment","pctEncodeSpaces","encodeURIComponent","getNgAttribute","ngAttr","ngAttrPrefixes","getAttribute","angularInit","bootstrap","appElement","module","prefix","name","hasAttribute","candidate","querySelector","isAutoBootstrapAllowed","strictDi","console","error","modules","defaultConfig","doBootstrap","injector","unshift","$provide","debugInfoEnabled","$compileProvider","createInjector","invoke","bootstrapApply","scope","compile","$apply","data","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","angular","resumeBootstrap","angular.resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","location","reload","getTestability","rootElement","get","snake_case","separator","SNAKE_CASE_REGEXP","letter","pos","toLowerCase","bindJQuery","originalCleanData","bindJQueryFired","jqName","jq","jQuery","on","JQLitePrototype","isolateScope","controller","inheritedData","cleanData","jQuery.cleanData","elems","events","elem","_data","$destroy","triggerHandler","JQLite","assertArg","arg","reason","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","getter","path","bindFnToScope","lastInstance","len","getBlockNodes","nodes","endNode","blockNodes","nextSibling","setupModuleLoader","ensure","factory","$injectorMinErr","$$minErr","requires","configFn","info","invokeLater","provider","method","insertMethod","queue","invokeQueue","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","configBlocks","runBlocks","_invokeQueue","_configBlocks","_runBlocks","service","constant","decorator","animation","filter","directive","component","run","block","shallowCopy","serializeObject","seen","publishExternalAPI","version","uppercase","$$counter","csp","angularModule","ngModule","$$sanitizeUri","$$SanitizeUriProvider","$CompileProvider","htmlAnchorDirective","input","inputDirective","textarea","form","formDirective","script","scriptDirective","select","selectDirective","option","optionDirective","ngBind","ngBindDirective","ngBindHtml","ngBindHtmlDirective","ngBindTemplate","ngBindTemplateDirective","ngClass","ngClassDirective","ngClassEven","ngClassEvenDirective","ngClassOdd","ngClassOddDirective","ngCloak","ngCloakDirective","ngController","ngControllerDirective","ngForm","ngFormDirective","ngHide","ngHideDirective","ngIf","ngIfDirective","ngInclude","ngIncludeDirective","ngInit","ngInitDirective","ngNonBindable","ngNonBindableDirective","ngPluralize","ngPluralizeDirective","ngRepeat","ngRepeatDirective","ngShow","ngShowDirective","ngStyle","ngStyleDirective","ngSwitch","ngSwitchDirective","ngSwitchWhen","ngSwitchWhenDirective","ngSwitchDefault","ngSwitchDefaultDirective","ngOptions","ngOptionsDirective","ngTransclude","ngTranscludeDirective","ngModel","ngModelDirective","ngList","ngListDirective","ngChange","ngChangeDirective","pattern","patternDirective","ngPattern","required","requiredDirective","ngRequired","minlength","minlengthDirective","ngMinlength","maxlength","maxlengthDirective","ngMaxlength","ngValue","ngValueDirective","ngModelOptions","ngModelOptionsDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$anchorScroll","$AnchorScrollProvider","$animate","$AnimateProvider","$animateCss","$CoreAnimateCssProvider","$$animateJs","$$CoreAnimateJsProvider","$$animateQueue","$$CoreAnimateQueueProvider","$$AnimateRunner","$$AnimateRunnerFactoryProvider","$$animateAsyncRun","$$AnimateAsyncRunFactoryProvider","$browser","$BrowserProvider","$cacheFactory","$CacheFactoryProvider","$controller","$ControllerProvider","$document","$DocumentProvider","$$isDocumentHidden","$$IsDocumentHiddenProvider","$exceptionHandler","$ExceptionHandlerProvider","$filter","$FilterProvider","$$forceReflow","$$ForceReflowProvider","$interpolate","$InterpolateProvider","$interval","$IntervalProvider","$http","$HttpProvider","$httpParamSerializer","$HttpParamSerializerProvider","$httpParamSerializerJQLike","$HttpParamSerializerJQLikeProvider","$httpBackend","$HttpBackendProvider","$xhrFactory","$xhrFactoryProvider","$jsonpCallbacks","$jsonpCallbacksProvider","$location","$LocationProvider","$log","$LogProvider","$parse","$ParseProvider","$rootScope","$RootScopeProvider","$q","$QProvider","$$q","$$QProvider","$sce","$SceProvider","$sceDelegate","$SceDelegateProvider","$sniffer","$SnifferProvider","$templateCache","$TemplateCacheProvider","$templateRequest","$TemplateRequestProvider","$$testability","$$TestabilityProvider","$timeout","$TimeoutProvider","$window","$WindowProvider","$$rAF","$$RAFProvider","$$jqLite","$$jqLiteProvider","$$Map","$$MapProvider","$$cookieReader","$$CookieReaderProvider","angularVersion","fnCamelCaseReplace","all","toUpperCase","kebabToCamel","DASH_LOWERCASE_REGEXP","jqLiteAcceptsData","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT","jqLiteBuildFragment","tmp","fragment","createDocumentFragment","HTML_REGEXP","appendChild","createElement","TAG_NAME_REGEXP","exec","wrap","wrapMap","_default","innerHTML","XHTML_TAG_REGEXP","lastChild","childNodes","firstChild","textContent","createTextNode","argIsString","trim","jqLiteMinErr","parsed","SINGLE_TAG_REGEXP","jqLiteAddNodes","jqLiteReady","jqLiteClone","jqLiteDealoc","onlyDescendants","querySelectorAll","jqLiteOff","unsupported","expandoStore","jqLiteExpandoStore","handle","removeHandler","listenerFns","removeEventListener","MOUSE_EVENT_MAP","jqLiteRemoveData","expandoId","ng339","jqCache","createIfNecessary","jqId","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","selector","jqLiteRemoveClass","cssClasses","setAttribute","existingClasses","newClasses","cssClass","jqLiteAddClass","root","elements","jqLiteController","jqLiteInheritedData","documentElement","names","parentNode","NODE_TYPE_DOCUMENT_FRAGMENT","host","jqLiteEmpty","removeChild","jqLiteRemove","keepData","jqLiteDocumentLoaded","action","win","readyState","setTimeout","trigger","addEventListener","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","createEventHandler","eventHandler","event","isDefaultPrevented","event.isDefaultPrevented","defaultPrevented","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","stopImmediatePropagation","event.stopImmediatePropagation","stopPropagation","isImmediatePropagationStopped","event.isImmediatePropagationStopped","handlerWrapper","specialHandlerWrapper","defaultHandlerWrapper","handler","specialMouseHandlerWrapper","target","related","relatedTarget","jqLiteContains","$get","this.$get","hasClass","classes","addClass","removeClass","hashKey","nextUidFn","objType","NgMapShim","_keys","_values","_lastKey","_lastIndex","extractArgs","fnText","Function","prototype","STRIP_COMMENTS","ARROW_ARG","FN_ARGS","anonFn","args","modulesToLoad","supportObject","delegate","provider_","providerInjector","instantiate","providerCache","providerSuffix","enforceReturnValue","enforcedReturnValue","result","instanceInjector","factoryFn","enforce","loadModules","moduleFn","runInvokeQueue","invokeArgs","loadedModules","message","stack","createInternalInjector","cache","getService","serviceName","caller","INSTANTIATING","err","shift","injectionArgs","locals","$inject","$$annotate","msie","func","$$ngIsClass","Type","ctor","annotate","has","NgMap","$injector","instanceCache","decorFn","origProvider","orig$get","origProvider.$get","origInstance","$delegate","protoInstanceInjector","loadNewModules","instanceInjector.loadNewModules","mods","autoScrollingEnabled","disableAutoScrolling","this.disableAutoScrolling","getFirstAnchor","list","some","scrollTo","scrollIntoView","offset","scroll","yOffset","getComputedStyle","style","position","getBoundingClientRect","bottom","elemTop","top","scrollBy","hash","elm","getElementById","getElementsByName","autoScrollWatch","autoScrollWatchAction","newVal","oldVal","mergeClasses","splitClasses","klass","prepareAnimateOptions","options","Browser","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","pop","cacheStateAndFireUrlChange","pendingLocation","fireStateOrUrlChange","cacheState","cachedState","getCurrentState","lastCachedState","lastHistoryState","prevLastHistoryState","lastBrowserUrl","url","urlChangeListeners","listener","history","clearTimeout","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","self.$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","self.notifyWhenNoOutstandingRequests","callback","href","baseElement","state","self.url","sameState","sameBase","stripHash","substr","self.state","urlChangeInit","onUrlChange","self.onUrlChange","$$applicationDestroyed","self.$$applicationDestroyed","off","$$checkUrlChange","baseHref","self.baseHref","defer","self.defer","delay","timeoutId","cancel","self.defer.cancel","deferId","cacheFactory","cacheId","refresh","entry","freshEnd","staleEnd","n","link","p","nextEntry","prevEntry","caches","size","stats","id","capacity","Number","MAX_VALUE","lruHash","put","lruEntry","remove","removeAll","destroy","cacheFactory.info","cacheFactory.get","$$sanitizeUriProvider","parseIsolateBindings","directiveName","isController","LOCAL_REGEXP","bindings","definition","scopeName","bindingCache","$compileMinErr","mode","collection","optional","attrName","assertValidDirectiveName","getDirectiveRequire","require","REQUIRE_PREFIX_REGEXP","hasDirectives","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","EVENT_HANDLER_ATTR_REGEXP","this.directive","registerDirective","directiveFactory","Suffix","directives","priority","restrict","this.component","registerComponent","makeInjectable","tElement","tAttrs","$element","$attrs","template","templateUrl","ddo","controllerAs","identifierForController","transclude","bindToController","aHrefSanitizationWhitelist","this.aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","this.imgSrcSanitizationWhitelist","this.debugInfoEnabled","enabled","preAssignBindingsEnabled","this.preAssignBindingsEnabled","strictComponentBindingsEnabled","this.strictComponentBindingsEnabled","TTL","onChangesTtl","this.onChangesTtl","commentDirectivesEnabledConfig","commentDirectivesEnabled","this.commentDirectivesEnabled","cssClassDirectivesEnabledConfig","cssClassDirectivesEnabled","this.cssClassDirectivesEnabled","flushOnChangesQueue","onChangesQueue","errors","Attributes","attributesToCopy","l","$attr","$$element","setSpecialAttr","specialAttrHolder","attributes","attribute","removeNamedItem","setNamedItem","safeAddClass","className","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","compositeLinkFn","compileNodes","$$addScopeClass","namespace","publicLinkFn","cloneConnectFn","needsNewScope","$parent","$new","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","$linkNode","wrapTemplate","controllerName","instance","$$addScopeInfo","nodeList","$rootElement","childLinkFn","childScope","childBoundTranscludeFn","stableNodeList","nodeLinkFnFound","linkFns","idx","nodeLinkFn","transcludeOnThisElement","createBoundTranscludeFn","templateOnThisElement","notLiveList","attrs","linkFnFound","mergeConsecutiveTextNodes","collectDirectives","applyDirectivesToNode","terminal","sibling","nodeValue","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","containingScope","$$transcluded","boundSlots","$$slots","slotName","attrsMap","addDirective","directiveNormalize","isNgAttr","nAttrs","attrStartName","attrEndName","ngAttrName","NG_ATTR_BINDING","PREFIX_REGEXP","multiElementMatch","MULTI_ELEMENT_DIR_RE","directiveIsMultiElement","nName","addAttrInterpolateDirective","animVal","addTextInterpolateDirective","NODE_TYPE_COMMENT","collectCommentDirectives","byPriority","groupScan","attrStart","attrEnd","depth","groupElementsLinkFnWrapper","linkFn","groupedElementsLink","compilationGenerator","eager","compiled","lazyCompilation","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","linkNode","controllersBoundTransclude","cloneAttachFn","hasElementTranscludeDirective","elementControllers","slotTranscludeFn","scopeToChild","controllerScope","newScopeDirective","isSlotFilled","transcludeFn.isSlotFilled","controllerDirectives","setupControllers","templateDirective","$$originalDirective","$$isolateBindings","scopeBindingInfo","initializeDirectiveBindings","removeWatches","$on","controllerDirective","$$bindings","bindingInfo","controllerResult","getControllers","controllerInstance","$onChanges","initialChanges","$onInit","$doCheck","$onDestroy","callOnDestroyHook","invokeLinkFn","$postLink","terminalPriority","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","$template","childTranscludeFn","didScanForMultipleTransclusion","mightHaveMultipleTransclusionError","directiveValue","$$start","$$end","assertNoDuplicate","$$tlb","scanningIndex","candidateDirective","$$createComment","replaceWith","$$parentNode","replaceDirective","slots","slotMap","filledSlots","elementSelector","contents","filled","$$newScope","denormalizeTemplate","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectiveScope","mergeTemplateAttributes","compileTemplateUrl","Math","max","inheritType","dataName","property","controllerKey","$scope","$transclude","newScope","tDirectives","startAttrName","endAttrName","multiElement","srcAttr","dstAttr","$set","linkQueue","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","then","content","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","$$destroyed","oldClasses","catch","delayedNodeLinkFn","ignoreChildLinkFn","diff","what","previousDirective","wrapModuleNameIfDefined","moduleName","text","interpolateFn","textInterpolateCompileFn","templateNode","templateNodeParent","hasCompileParent","$$addBindingClass","textInterpolateLinkFn","$$addBindingInfo","expressions","interpolateFnWatchAction","wrapper","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","trustedContext","allOrNothing","mustHaveExpression","attrInterpolatePreLinkFn","$$observers","newValue","$$inter","$$scope","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","replaceChild","hasData","annotation","strictBindingsCheck","recordChanges","currentValue","previousValue","$$postDigest","changes","triggerOnChangesHook","SimpleChange","removeWatchCollection","initializeBinding","lastValue","parentGet","parentSet","compare","removeWatch","$observe","_UNINITIALIZED_VALUE","literal","assign","parentValueWatch","parentValue","$stateful","$watchCollection","deepWatch","initialValue","parentValueWatchAction","SIMPLE_ATTR_NAME","$normalize","$addClass","classVal","$removeClass","toAdd","tokenDifference","toRemove","writeAttr","booleanKey","aliasedKey","ALIASED_ATTR","observer","trimmedSrcset","srcPattern","rawUris","nbrUrisWith2parts","floor","innerIdx","lastTuple","removeAttr","listeners","startSymbol","endSymbol","binding","isolated","noTemplate","compile.$$createComment","comment","createComment","previous","current","SPECIAL_CHARS_REGEXP","_","str1","str2","values","tokens1","tokens2","token","jqNodes","ident","CNTRL_REG","globals","this.has","register","this.register","allowGlobals","this.allowGlobals","addIdentifier","identifier","expression","later","$controllerMinErr","controllerPrototype","$controllerInit","changeListener","hidden","doc","exception","cause","serializeValue","v","toISOString","ngParamSerializer","params","jQueryLikeParamSerializer","serialize","toSerialize","topLevel","defaultHttpResponseTransform","headers","tempData","JSON_PROTECTION_PREFIX","contentType","hasJsonContentType","APPLICATION_JSON","jsonStart","JSON_START","JSON_ENDS","$httpMinErr","parseHeaders","line","headerVal","headerKey","headersGetter","headersObj","transformData","status","fns","defaults","transformResponse","transformRequest","d","common","CONTENT_TYPE_APPLICATION_JSON","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","jsonpCallbackParam","useApplyAsync","this.useApplyAsync","interceptorFactories","interceptors","requestConfig","chainInterceptors","promise","thenFn","rejectFn","executeHeaderFns","headerContent","processedHeaders","headerFn","header","response","resp","reject","mergeHeaders","defHeaders","reqHeaders","defHeaderName","lowercaseDefHeaderName","reqHeaderName","requestInterceptors","responseInterceptors","resolve","reversedInterceptors","interceptor","request","requestError","responseError","serverRequest","reqData","withCredentials","sendReq","finally","createApplyHandlers","eventHandlers","applyHandlers","callEventHandler","$applyAsync","$$phase","done","headersString","statusText","xhrStatus","resolveHttpPromise","resolvePromise","deferred","resolvePromiseWithResult","removePendingReq","pendingRequests","cachedResp","isJsonp","getTrustedResourceUrl","buildUrl","sanitizeJsonpCallbackParam","defaultCache","xsrfValue","urlIsSameOrigin","timeout","responseType","uploadEventHandlers","serializedParams","cbKey","interceptorFactory","createShortMethods","createShortMethodsWithData","createXhr","XMLHttpRequest","createHttpBackend","$browserDefer","callbacks","rawDocument","jsonpReq","callbackPath","async","body","wasCalled","timeoutRequest","jsonpDone","xhr","abort","completeRequest","createCallback","getResponse","removeCallback","open","setRequestHeader","onload","xhr.onload","responseText","urlResolve","protocol","getAllResponseHeaders","onerror","onabort","requestAborted","ontimeout","requestTimeout","upload","send","this.startSymbol","this.endSymbol","escape","ch","unescapeText","escapedStartRegexp","escapedEndRegexp","constantWatchDelegate","objectEquality","constantInterp","unwatch","constantInterpolateWatch","parseStringifyInterceptor","getTrusted","$interpolateMinErr","interr","unescapedText","exp","$$watchDelegate","endIndex","parseFns","textLength","expressionPositions","startSymbolLength","endSymbolLength","throwNoconcat","compute","interpolationFn","$watchGroup","interpolateFnWatcher","oldValues","currValue","$interpolate.startSymbol","$interpolate.endSymbol","interval","count","invokeApply","hasParams","iteration","setInterval","clearInterval","skipApply","$$intervalId","tick","notify","intervals","interval.cancel","$$state","pur","encodePath","segments","parseAbsoluteUrl","absoluteUrl","locationObj","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","html5Mode","DOUBLE_SLASH_REGEX","$locationMinErr","prefixed","pathname","$$path","$$search","search","$$hash","startsWith","stripBaseUrl","base","trimEmptyHash","LocationHtml5Url","appBase","appBaseNoFile","basePrefix","$$html5","$$parse","this.$$parse","pathUrl","$$compose","this.$$compose","$$url","$$absUrl","$$urlUpdatedByLocation","$$parseLinkUrl","this.$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","hashPrefix","withoutBaseUrl","withoutHashUrl","windowsFilePathExp","firstPathSegmentMatch","LocationHashbangInHtml5Url","locationGetter","locationGetterSetter","preprocess","requireBase","rewriteLinks","this.hashPrefix","this.html5Mode","setBrowserUrlWithFallback","oldUrl","oldState","afterLocationChange","$broadcast","absUrl","LocationMode","initialUrl","lastIndexOf","IGNORE_URI_REGEXP","ctrlKey","metaKey","shiftKey","which","button","absHref","preventDefault","initializing","newUrl","newState","$digest","$locationWatch","currentReplace","$$replace","urlOrStateChanged","debug","debugEnabled","this.debugEnabled","flag","formatError","formatStackTrace","sourceURL","consoleLog","logFn","log","navigator","userAgent","warn","getStringValue","ifDefined","plusFn","r","isPure","parentIsPure","AST","MemberExpression","computed","UnaryExpression","PURITY_ABSOLUTE","BinaryExpression","operator","CallExpression","PURITY_RELATIVE","findConstantAndWatchExpressions","ast","allConstants","argsToWatch","astIsPure","Program","expr","Literal","toWatch","argument","left","right","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","object","isStatelessFilter","callee","AssignmentExpression","ArrayExpression","ObjectExpression","properties","ThisExpression","LocalsExpression","getInputs","lastExpression","isAssignable","assignableAST","NGValueParameter","ASTCompiler","ASTInterpreter","Parser","lexer","astCompiler","getValueOf","objectValueOf","literals","identStart","identContinue","addLiteral","this.addLiteral","literalName","literalValue","setIdentifierFns","this.setIdentifierFns","identifierStart","identifierContinue","interceptorFn","parsedExpression","cacheKey","Lexer","$parseOptions","parser","oneTime","oneTimeLiteralWatchDelegate","oneTimeWatchDelegate","inputs","inputsWatchDelegate","addInterceptor","expressionInputDirtyCheck","oldValueOfValue","compareObjectIdentity","prettyPrintExpression","inputExpressions","lastResult","oldInputValueOf","expressionInputWatch","newInputValue","oldInputValueOfValues","oldInputValues","expressionInputsWatch","changed","oneTimeWatch","oneTimeListener","old","isAllDefined","allDefined","constantWatch","watchDelegate","useInputs","regularInterceptedExpression","oneTimeInterceptedExpression","map","depurifier","s","noUnsafeEval","isIdentifierStart","isIdentifierContinue","$$getAst","getAst","errorOnUnhandledRejections","qFactory","this.errorOnUnhandledRejections","nextTick","exceptionHandler","Deferred","Promise","this.resolve","this.reject","rejectPromise","this.notify","progress","notifyPromise","processChecks","queueSize","checkQueue","toCheck","errorMessage","scheduleProcessQueue","pending","processScheduled","$$passToExceptionHandler","$$reject","$qMinErr","$$resolve","doResolve","doReject","doNotify","handleCallback","resolver","callbackOutput","when","errback","progressBack","$Q","resolveFn","TypeError","onFulfilled","onRejected","promises","counter","results","race","requestAnimationFrame","webkitRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","supported","createChildScopeClass","ChildScope","$$watchers","$$nextSibling","$$childHead","$$childTail","$$listeners","$$listenerCount","$$watchersCount","$id","$$ChildScope","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","this.digestTtl","destroyChildScope","$event","currentScope","cleanUpScope","$$prevSibling","$root","Scope","beginPhase","phase","incrementWatchersCount","decrementListenerCount","initWatchVal","flushApplyAsync","applyAsyncQueue","scheduleApplyAsync","isolate","child","watchExp","watcher","last","eq","$$digestWatchIndex","deregisterWatch","watchExpressions","watchGroupAction","changeReactionScheduled","firstRun","newValues","deregisterFns","shouldCall","deregisterWatchGroup","unwatchFn","watchGroupSubAction","$watchCollectionInterceptor","_value","bothNaN","newItem","oldItem","internalArray","oldLength","changeDetected","newLength","internalObject","veryOldValue","trackVeryOldValue","changeDetector","initRun","$watchCollectionAction","watch","watchers","dirty","ttl","watchLog","logIdx","asyncTask","asyncQueuePosition","asyncQueue","msg","next","postDigestQueuePosition","postDigestQueue","eventName","this.$watchGroup","$eval","$applyAsyncExpression","namedListeners","indexOfListener","$emit","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","sanitizeUri","uri","isImage","regex","normalizedVal","adjustMatcher","matcher","$sceMinErr","escapeForRegexp","adjustMatchers","matchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","this.resourceUrlWhitelist","this.resourceUrlBlacklist","matchUrl","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","this.$$unwrapTrustedValue","holderType.prototype.valueOf","holderType.prototype.toString","htmlSanitizer","trustedValueHolderBase","byType","CSS","URL","JS","trustAs","Constructor","maybeTrusted","allowed","this.enabled","sce","isEnabled","sce.isEnabled","sce.getTrusted","parseAs","sce.parseAs","enumValue","lName","UNDERSCORE_LOWERCASE_REGEXP","eventSupport","hasHistoryPushState","nw","process","chrome","app","runtime","pushState","android","boxee","bodyStyle","transitions","animations","hasEvent","divElm","httpOptions","this.httpOptions","handleRequestFn","tpl","ignoreRequestError","totalPendingRequests","transformer","handleError","$templateRequestMinErr","testability","testability.findBindings","opt_exactMatch","getElementsByClassName","matches","dataBinding","bindingName","testability.findModels","prefixes","attributeEquals","testability.getLocation","testability.setLocation","testability.whenStable","deferreds","$$timeoutId","timeout.cancel","urlParsingNode","requestUrl","originUrl","$$CookieReader","safeDecodeURIComponent","lastCookies","lastCookieString","cookieArray","cookie","currentCookieString","filters","suffix","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","anyPropertyKey","matchAgainstAnyProp","getTypeForFilter","expressionType","predicateFn","createPredicateFn","shouldMatchPrimitives","actual","expected","deepCompare","dontMatchWholeObject","actualType","expectedType","expectedVal","matchAnyProperty","actualVal","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","currencySymbolRe","formatNumber","GROUP_SEP","DECIMAL_SEP","number","numStr","exponent","digits","numberOfIntegerDigits","zeros","ZERO_CHAR","MAX_DIGITS","roundNumber","parsedNumber","minFrac","fractionLen","min","roundAt","digit","k","carry","reduceRight","groupSep","decimalSep","isNaN","isInfinity","isFinite","isZero","abs","formattedText","integerLen","decimals","reduce","groups","lgSize","gSize","negPre","negSuf","posPre","posSuf","padNumber","num","negWrap","neg","dateGetter","dateStrGetter","shortForm","standAlone","getFirstThursdayOfYear","year","dayOfWeekOnFirst","getDay","weekGetter","firstThurs","getFullYear","thisThurs","getMonth","getDate","round","eraGetter","ERAS","jsonStringToDate","string","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","m","ms","parseFloat","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","DATE_FORMATS","spacing","limit","begin","Infinity","sliceFn","end","processPredicates","sortPredicates","predicate","descending","defaultCompare","v1","v2","type1","type2","value1","value2","sortPredicate","reverseOrder","compareFn","predicates","compareValues","getComparisonObject","tieBreaker","predicateValues","doComparison","ngDirective","FormController","$$controls","$error","$$success","$pending","$name","$dirty","$valid","$pristine","$submitted","$invalid","$$parentForm","nullFormCtrl","$$animate","setupValidity","$$classCache","INVALID_CLASS","VALID_CLASS","addSetValidityMethod","cachedToggleClass","ctrl","switchValue","toggleValidationCss","validationErrorKey","isValid","unset","clazz","$setValidity","clazz.prototype.$setValidity","isObjectEmpty","PENDING_CLASS","combinedState","stringBasedInputType","$formatters","$isEmpty","baseInputType","composing","ev","ngTrim","$viewValue","$$hasNativeValidators","$setViewValue","deferListener","origValue","keyCode","PARTIAL_VALIDATION_TYPES","PARTIAL_VALIDATION_EVENTS","validity","origBadInput","badInput","origTypeMismatch","typeMismatch","$render","ctrl.$render","createDateParser","mapping","iso","ISO_DATE_REGEXP","yyyy","MM","dd","HH","getHours","mm","ss","getSeconds","sss","getMilliseconds","part","createDateInputType","parseDate","dynamicDateInputType","isValidDate","parseObservedDateValue","badInputChecker","$options","getOption","previousDate","$$parserName","$parsers","parsedDate","ngModelMinErr","ngMin","minVal","$validators","ctrl.$validators.min","$validate","ngMax","maxVal","ctrl.$validators.max","VALIDITY_STATE_PROPERTY","numberFormatterParser","NUMBER_REGEXP","parseNumberAttrVal","countDecimals","numString","decimalSymbolIndex","isValidForStep","viewValue","stepBase","step","isNonIntegerValue","isNonIntegerStepBase","isNonIntegerStep","valueDecimals","stepBaseDecimals","stepDecimals","decimalCount","multiplier","pow","parseConstantExpr","parseFn","classDirective","arrayDifference","toClassString","classValue","classString","toFlatValue","flatValue","hasUndefined","indexWatchExpression","digestClassCounts","classArray","classesToUpdate","classCounts","ngClassIndexWatchAction","newModulo","oldClassString","oldModulo","ngClassOneTimeWatchAction","newClassValue","newClassString","ngClassWatchAction","oldClassArray","newClassArray","toRemoveArray","toAddArray","toRemoveString","toAddString","isOneTime","watchExpression","watchInterceptor","watchAction","moduloTwo","$index","NgModelController","$modelValue","$$rawModelValue","$asyncValidators","$viewChangeListeners","$untouched","$touched","defaultModelOptions","$$updateEvents","$$updateEventHandler","$$parsedNgModel","$$parsedNgModelAssign","$$ngModelGet","$$ngModelSet","$$pendingDebounce","$$parserValid","$$currentValidationRunId","defineProperty","$$attr","$$timeout","$$exceptionHandler","setupModelWatcher","ngModelWatch","modelValue","$$setModelValue","ModelOptions","$$options","setOptionSelectedStatus","optionEl","REGEX_STRING_REGEXP","documentMode","rules","ngCspElement","ngCspAttribute","noInlineStyle","name_","el","allowAutoBootstrap","currentScript","HTMLScriptElement","SVGScriptElement","srcs","getNamedItem","every","origin","full","major","minor","dot","codeName","expando","JQLite._data","MS_HACK_REGEXP","mouseleave","mouseenter","optgroup","tbody","tfoot","colgroup","caption","thead","th","td","Node","contains","compareDocumentPosition","ready","removeData","jqLiteHasData","jqLiteCleanData","removeAttribute","css","NODE_TYPE_ATTRIBUTE","lowercasedName","isBooleanAttr","ret","getText","$dv","multiple","selected","arg1","arg2","nodeCount","jqLiteOn","types","addHandler","noEventListener","one","onFn","replaceNode","insertBefore","children","contentDocument","prepend","wrapNode","detach","after","newElement","toggleClass","condition","classCondition","nextElementSibling","getElementsByTagName","extraParameters","dummyEvent","handlerArgs","eventFnsCopy","arg3","unbind","nanKey","_idx","_transformKey","delete","FN_ARG_SPLIT","FN_ARG","argDecl","underscore","$animateMinErr","postDigestElements","updateData","handleCSSClassChanges","existing","pin","domOperation","from","to","classesAdded","add","classesRemoved","runner","complete","classNameFilter","customFilter","$$registeredAnimations","this.customFilter","filterFn","this.classNameFilter","reservedRegex","NG_ANIMATE_CLASSNAME","domInsert","parentElement","afterElement","afterNode","ELEMENT_NODE","previousElementSibling","enter","move","leave","addclass","setClass","animate","tempClasses","waitForTick","waitQueue","passed","AnimateRunner","setHost","rafTick","_doneCallbacks","_tick","this._tick","_state","chain","AnimateRunner.chain","AnimateRunner.all","runners","onProgress","DONE_COMPLETE_STATE","getPromise","resolveHandler","rejectHandler","pause","resume","_resolve","INITIAL_STATE","DONE_PENDING_STATE","initialOptions","closed","$$prepared","cleanupStyles","start","UNINITIALIZED_VALUE","isFirstChange","SimpleChange.prototype.isFirstChange","domNode","offsetWidth","$interpolateMinErr.throwNoconcat","$interpolateMinErr.interr","callbackId","called","callbackMap","PATH_MATCH","locationPrototype","paramValue","Location","Location.prototype.state","$parseMinErr","OPERATORS","ESCAPE","lex","tokens","readString","peek","readNumber","peekMultichar","readIdent","is","isWhitespace","ch2","ch3","op2","op3","op1","throwError","chars","codePointAt","isValidIdentifierStart","isValidIdentifierContinue","cp","charCodeAt","cp1","cp2","isExpOperator","colStr","peekCh","quote","rawString","hex","String","fromCharCode","rep","ExpressionStatement","Property","program","expressionStatement","expect","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","additive","multiplicative","unary","primary","arrayDeclaration","selfReferential","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","t","nextId","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","not","getHasOwnProperty","isNull","nonComputedMember","notNull","member","filterName","defaultValue","UNSAFE_CHARACTERS","SAFE_IDENTIFIER","stringEscapeFn","stringEscapeRegex","c","skip","init","fn.assign","rhs","lhs","unary+","unary-","unary!","binary+","binary-","binary*","binary/","binary%","binary===","binary!==","binary==","binary!=","binary<","binary>","binary<=","binary>=","binary&&","binary||","ternary?:","yy","y","MMMM","MMM","M","LLLL","H","hh","EEEE","EEE","ampmGetter","AMPMS","Z","timeZoneGetter","zone","paddedZone","ww","w","G","GG","GGG","GGGG","longEraGetter","ERANAMES","xlinkHref","propName","defaultLinkFn","normalized","ngBooleanAttrWatchAction","htmlAttr","ngAttrAliasWatchAction","$addControl","$$renameControl","nullFormRenameControl","control","$removeControl","$setDirty","$setPristine","$setSubmitted","$rollbackViewValue","$commitViewValue","newName","oldName","PRISTINE_CLASS","DIRTY_CLASS","SUBMITTED_CLASS","$setUntouched","formDirectiveFactory","isNgForm","getSetter","ngFormCompile","formElement","nameAttr","ngFormPreLink","ctrls","handleFormSubmission","setter","URL_REGEXP","EMAIL_REGEXP","DATE_REGEXP","DATETIMELOCAL_REGEXP","WEEK_REGEXP","MONTH_REGEXP","TIME_REGEXP","inputType","textInputType","weekParser","isoWeek","existingDate","week","hours","seconds","milliseconds","addDays","numberInputType","ngStep","stepVal","ctrl.$validators.step","urlInputType","ctrl.$validators.url","emailInputType","email","ctrl.$validators.email","radioInputType","doTrim","checked","rangeInputType","setInitialValueAndObserver","htmlAttrName","changeFn","minChange","supportsRange","elVal","maxChange","stepChange","hasMinAttr","hasMaxAttr","hasStepAttr","originalRender","rangeUnderflow","rangeOverflow","rangeRender","noopMinValidator","minValidator","noopMaxValidator","maxValidator","nativeStepValidator","stepMismatch","stepValidator","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","ctrl.$isEmpty","CONSTANT_VALUE_REGEXP","updateElementValue","propValue","tplAttr","ngValueConstantLink","ngValueLink","valueWatchAction","$compile","ngBindCompile","templateElement","ngBindLink","ngBindWatchAction","ngBindTemplateCompile","ngBindTemplateLink","ngBindHtmlCompile","ngBindHtmlGetter","ngBindHtmlWatch","sceValueOf","ngBindHtmlLink","ngBindHtmlWatchAction","getTrustedHtml","forceAsyncEvents","ngEventHandler","previousElements","ngIfWatchAction","srcExp","onloadExp","autoScrollExp","autoscroll","changeCounter","previousElement","currentElement","cleanupLastIncludeContent","ngIncludeWatchAction","afterAnimation","thisChangeId","namespaceAdaptedClone","trimValues","$$initGetterSetters","invokeModelGetter","invokeModelSetter","this.$$ngModelGet","this.$$ngModelSet","$$$p","$$updateEmptyClasses","NOT_EMPTY_CLASS","EMPTY_CLASS","UNTOUCHED_CLASS","TOUCHED_CLASS","$setTouched","$$lastCommittedViewValue","prevValid","prevModelValue","allowInvalid","that","$$runValidators","allValid","$$writeModelToScope","doneCallback","processSyncValidators","syncValidatorsValid","validator","Boolean","setValidity","processAsyncValidators","validatorPromises","validationDone","localValidationRunId","processParseErrors","errorKey","$$parseAndValidate","$$debounceViewValueCommit","debounceDelay","$overrideModelOptions","createChild","$$setUpdateOnEvents","$processModelValue","$$format","formatters","ngModelCompile","ngModelPreLink","modelCtrl","formCtrl","optionsCtrl","ngModelPostLink","setTouched","DEFAULT_REGEXP","inheritAll","updateOnDefault","updateOn","debounce","getterSetter","NgModelOptionsController","$$attrs","parentOptions","parentCtrl","modelOptionsDefinition","ngOptionsMinErr","NG_OPTIONS_REGEXP","parseOptionsExpression","optionsExp","selectElement","Option","selectValue","label","group","disabled","getOptionValuesKeys","optionValues","optionValuesKeys","keyName","itemKey","valueName","selectAs","trackBy","viewValueFn","trackByFn","getTrackByValueFn","getHashOfValue","getTrackByValue","getLocals","displayFn","groupByFn","disableWhenFn","valuesFn","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","optionTemplate","optGroupTemplate","ngOptionsPreLink","registerOption","ngOptionsPostLink","getAndUpdateSelectedOption","updateOptionElement","selectCtrl","ngModelCtrl","hasEmptyOption","emptyOption","providedEmptyOption","unknownOption","listFragment","generateUnknownOptionValue","selectCtrl.generateUnknownOptionValue","writeValue","selectCtrl.writeValue","selectedOptions","readValue","selectCtrl.readValue","selectedValues","selections","selectedOption","selectedIndex","removeUnknownOption","selectUnknownOrEmptyOption","unselectEmptyOption","selectCtrl.registerOption","optionScope","needsRerender","$isEmptyOptionSelected","updateOptions","groupElementMap","addOption","groupElement","optionElement","nextValue","BRACE","IS_WHEN","updateElementText","newText","numberExp","whenExp","whens","whensExpFns","braceReplacement","watchRemover","lastCount","attributeName","tmpMatch","whenKey","ngPluralizeWatchAction","countIsNaN","pluralCat","whenExpFn","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","ngRepeatCompile","ngRepeatEndComment","aliasAs","trackByExp","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","hashFnLocals","ngRepeatLink","lastBlockMap","ngRepeatAction","previousNode","nextNode","nextBlockMap","collectionLength","trackById","collectionKeys","nextBlockOrder","trackByIdFn","blockKey","ngRepeatTransclude","ngShowWatchAction","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","ngHideWatchAction","ngStyleWatchAction","newStyles","oldStyles","NgSwitchController","cases","ngSwitchController","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","ngSwitchWatchAction","selectedTransclude","caseElement","selectedScope","anchor","ngSwitchWhenSeparator","whenCase","ngTranscludeMinErr","ngTranscludeCompile","fallbackLinkFn","ngTranscludePostLink","useFallbackContent","ngTranscludeSlot","ngTranscludeCloneAttachFn","noopNgModelController","SelectController","scheduleRender","renderScheduled","scheduleViewValueUpdate","renderAfter","updateScheduled","optionsMap","renderUnknownOption","self.renderUnknownOption","unknownVal","updateUnknownOption","self.updateUnknownOption","self.generateUnknownOptionValue","self.removeUnknownOption","selectEmptyOption","self.selectEmptyOption","self.unselectEmptyOption","self.readValue","realVal","hasOption","self.writeValue","currentlySelectedOption","hashedVal","self.addOption","removeOption","self.removeOption","self.hasOption","$hasEmptyOption","self.$hasEmptyOption","$isUnknownOptionSelected","self.$isUnknownOptionSelected","self.$isEmptyOptionSelected","self.selectUnknownOrEmptyOption","self.registerOption","optionAttrs","interpolateValueFn","interpolateTextFn","valueAttributeObserveAction","removal","previouslySelected","interpolateWatchAction","removeValue","selectPreLink","shouldBeSelected","lastView","lastViewRef","selectMultipleWatch","ngModelCtrl.$isEmpty","selectPostLink","ngModelCtrl.$render","selectCtrlName","ctrl.$validators.required","patternExp","ctrl.$validators.pattern","intVal","ctrl.$validators.maxlength","ctrl.$validators.minlength","getDecimals","opt_precision","ONE","OTHER","$$csp","head"] -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/bower.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/bower.json deleted file mode 100644 index d245bee0..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/bower.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "angular", - "version": "1.6.9", - "license": "MIT", - "main": "./angular.js", - "ignore": [], - "dependencies": { - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/index.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/index.js deleted file mode 100644 index 5c1aafcc..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/index.js +++ /dev/null @@ -1,2 +0,0 @@ -require('./angular'); -module.exports = angular; diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/package.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/package.json deleted file mode 100644 index 853a4947..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/angular/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "angular", - "version": "1.6.9", - "description": "HTML enhanced for web apps", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "https://github.com/angular/angular.js.git" - }, - "keywords": [ - "angular", - "framework", - "browser", - "client-side" - ], - "author": "Angular Core Team ", - "license": "MIT", - "bugs": { - "url": "https://github.com/angular/angular.js/issues" - }, - "homepage": "http://angularjs.org" -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.babelrc.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.babelrc.js deleted file mode 100644 index 277f96ae..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.babelrc.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - presets: [ - [ - '@babel/env', - { - loose: true, - modules: false, - exclude: ['transform-typeof-symbol'] - } - ] - ], - plugins: [ - process.env.PLUGINS && 'transform-es2015-modules-strip', - '@babel/proposal-object-rest-spread' - ].filter(Boolean) -}; diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.bower.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.bower.json deleted file mode 100644 index f4efe0cf..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.bower.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "bootstrap", - "homepage": "https://github.com/twbs/bootstrap", - "version": "4.0.0", - "_release": "4.0.0", - "_resolution": { - "type": "version", - "tag": "v4.0.0", - "commit": "8a628b943cf31ca0a002c08af661a95772480225" - }, - "_source": "https://github.com/twbs/bootstrap.git", - "_target": "v4.0.0", - "_originalSource": "bootstrap" -} \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.editorconfig b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.editorconfig deleted file mode 100644 index 9d5248e8..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# editorconfig.org - -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.eslintignore b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.eslintignore deleted file mode 100644 index e1d5490e..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -**/*.min.js -**/dist/ -**/vendor/ -/_gh_pages/ -/package.js diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.eslintrc.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.eslintrc.json deleted file mode 100644 index 8cfaeea1..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.eslintrc.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "root": true, - "parser": "babel-eslint", - "env": { - "browser": true, - "es6": true - }, - "extends": "eslint:recommended", - "plugins": ["compat"], - "rules": { - // Possible Errors - "no-await-in-loop": "error", - "no-extra-parens": "error", - "no-prototype-builtins": "error", - "no-template-curly-in-string": "error", - "compat/compat": "error", - "valid-jsdoc": "error", - - // Best Practices - "accessor-pairs": "error", - "array-callback-return": "error", - "block-scoped-var": "error", - "class-methods-use-this": "off", - "complexity": "error", - "consistent-return": "error", - "curly": "error", - "default-case": "error", - "dot-location": ["error", "property"], - "dot-notation": "error", - "eqeqeq": "error", - "guard-for-in": "error", - "no-alert": "error", - "no-caller": "error", - "no-div-regex": "error", - "no-else-return": "error", - "no-empty-function": "error", - "no-eq-null": "error", - "no-eval": "error", - "no-extend-native": "error", - "no-extra-bind": "error", - "no-extra-label": "error", - "no-floating-decimal": "error", - "no-implicit-coercion": "error", - "no-implicit-globals": "error", - "no-implied-eval": "error", - "no-invalid-this": "off", - "no-iterator": "error", - "no-labels": "error", - "no-lone-blocks": "error", - "no-loop-func": "error", - "no-magic-numbers": ["error", { - "ignore": [-1, 0, 1], - "ignoreArrayIndexes": true - } - ], - "no-multi-spaces": ["error", { - "ignoreEOLComments": true, - "exceptions": { - "AssignmentExpression": true, - "ArrowFunctionExpression": true, - "CallExpression": true, - "VariableDeclarator": true - } - } - ], - "no-multi-str": "error", - "no-new": "error", - "no-new-func": "error", - "no-new-wrappers": "error", - "no-octal-escape": "error", - "no-param-reassign": "off", - "no-proto": "error", - "no-restricted-properties": "error", - "no-return-assign": "error", - "no-return-await": "error", - "no-script-url": "error", - "no-self-compare": "error", - "no-sequences": "error", - "no-throw-literal": "error", - "no-unmodified-loop-condition": "error", - "no-unused-expressions": "error", - "no-useless-call": "error", - "no-useless-concat": "error", - "no-useless-return": "error", - "no-void": "error", - "no-warning-comments": "off", - "no-with": "error", - "prefer-promise-reject-errors": "error", - "radix": "error", - "require-await": "error", - "vars-on-top": "error", - "wrap-iife": "error", - "yoda": "error", - - // Strict Mode - "strict": "error", - - // Variables - "init-declarations": "off", - "no-catch-shadow": "error", - "no-label-var": "error", - "no-restricted-globals": "error", - "no-shadow": "off", - "no-shadow-restricted-names": "error", - "no-undef-init": "error", - "no-undefined": "error", - "no-use-before-define": "off", - - // Node.js and CommonJS - "callback-return": "off", - "global-require": "error", - "handle-callback-err": "error", - "no-mixed-requires": "error", - "no-new-require": "error", - "no-path-concat": "error", - "no-process-env": "error", - "no-process-exit": "error", - "no-restricted-modules": "error", - "no-sync": "error", - - // Stylistic Issues - "array-bracket-spacing": "error", - "block-spacing": "error", - "brace-style": "error", - "camelcase": "error", - "capitalized-comments": "off", - "comma-dangle": "error", - "comma-spacing": "error", - "comma-style": "error", - "computed-property-spacing": "error", - "consistent-this": "error", - "eol-last": "error", - "func-call-spacing": "error", - "func-name-matching": "error", - "func-names": "off", - "func-style": ["error", "declaration"], - "id-blacklist": "error", - "id-length": "off", - "id-match": "error", - "indent": ["error", 2, { "SwitchCase": 1 }], - "jsx-quotes": "error", - "key-spacing": "off", - "keyword-spacing": "error", - "linebreak-style": ["error", "unix"], - "line-comment-position": "off", - "lines-around-comment": "off", - "lines-around-directive": "error", - "max-depth": ["error", 10], - "max-len": "off", - "max-lines": "off", - "max-nested-callbacks": "error", - "max-params": "off", - "max-statements": "off", - "max-statements-per-line": "error", - "multiline-ternary": "off", - "new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }], - "newline-after-var": "off", - "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }], - "new-parens": "error", - "no-array-constructor": "error", - "no-bitwise": "error", - "no-continue": "off", - "no-inline-comments": "off", - "no-lonely-if": "error", - "no-mixed-operators": "off", - "no-multi-assign": "error", - "no-multiple-empty-lines": "error", - "nonblock-statement-body-position": "error", - "no-negated-condition": "off", - "no-nested-ternary": "error", - "no-new-object": "error", - "no-plusplus": "off", - "no-restricted-syntax": "error", - "no-tabs": "error", - "no-ternary": "off", - "no-trailing-spaces": "error", - "no-underscore-dangle": "off", - "no-unneeded-ternary": "error", - "no-whitespace-before-property": "error", - "object-curly-newline": ["error", { "minProperties": 1 }], - "object-curly-spacing": ["error", "always"], - "object-property-newline": "error", - "one-var": ["error", "never"], - "one-var-declaration-per-line": "error", - "operator-assignment": "error", - "operator-linebreak": "error", - "padded-blocks": ["error", "never"], - "padding-line-between-statements": "off", - "quote-props": ["error", "as-needed"], - "quotes": ["error", "single"], - "require-jsdoc": "off", - "semi": ["error", "never"], - "semi-spacing": "error", - "sort-keys": "off", - "sort-vars": "error", - "space-before-blocks": "error", - "space-before-function-paren": ["error", { - "anonymous": "always", - "named": "never" - }], - "space-in-parens": "error", - "space-infix-ops": "error", - "space-unary-ops": "error", - "spaced-comment": "error", - "template-tag-spacing": "error", - "unicode-bom": "error", - "wrap-regex": "off", - - // ECMAScript 6 - "arrow-body-style": ["error", "as-needed"], - "arrow-parens": "error", - "arrow-spacing": "error", - "generator-star-spacing": "error", - "no-confusing-arrow": "error", - "no-duplicate-imports": "error", - "no-restricted-imports": "error", - "no-useless-computed-key": "error", - "no-useless-constructor": "error", - "no-useless-rename": "error", - "no-var": "error", - "object-shorthand": "error", - "prefer-arrow-callback": "error", - "prefer-const": "error", - "prefer-destructuring": "off", - "prefer-numeric-literals": "error", - "prefer-rest-params": "error", - "prefer-spread": "error", - "prefer-template": "error", - "rest-spread-spacing": "error", - "sort-imports": "error", - "symbol-description": "error", - "template-curly-spacing": "error", - "yield-star-spacing": "error" - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.gitattributes b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.gitattributes deleted file mode 100644 index 21b6fd14..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.gitattributes +++ /dev/null @@ -1,16 +0,0 @@ -# Enforce Unix newlines -*.css text eol=lf -*.html text eol=lf -*.js text eol=lf -*.json text eol=lf -*.md text eol=lf -*.rb text eol=lf -*.scss text eol=lf -*.svg text eol=lf -*.txt text eol=lf -*.yml text eol=lf -# Don't diff or textually merge source maps -*.map binary - -bootstrap.css linguist-vendored=false -bootstrap.js linguist-vendored=false diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.github/CONTRIBUTING.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.github/CONTRIBUTING.md deleted file mode 100644 index 0aaa1bb9..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.github/CONTRIBUTING.md +++ /dev/null @@ -1,252 +0,0 @@ -# Contributing to Bootstrap - -Looking to contribute something to Bootstrap? **Here's how you can help.** - -Please take a moment to review this document in order to make the contribution -process easy and effective for everyone involved. - -Following these guidelines helps to communicate that you respect the time of -the developers managing and developing this open source project. In return, -they should reciprocate that respect in addressing your issue or assessing -patches and features. - - -## Using the issue tracker - -The [issue tracker](https://github.com/twbs/bootstrap/issues) is -the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) -and [submitting pull requests](#pull-requests), but please respect the following -restrictions: - -* Please **do not** use the issue tracker for personal support requests. Stack - Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag), [Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help. - -* Please **do not** derail or troll issues. Keep the discussion on topic and - respect the opinions of others. - -* Please **do not** post comments consisting solely of "+1" or ":thumbsup:". - Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) - instead. We reserve the right to delete comments which violate this rule. - -* Please **do not** open issues regarding the official themes offered on . - Instead, please email any questions or feedback regarding those themes to `themes AT getbootstrap DOT com`. - - -## Issues and labels - -Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them: - -- `browser bug` - Issues that are reported to us, but actually are the result of a browser-specific bug. These are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker. -- `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in Bootstrap. -- `css` - Issues stemming from our compiled CSS or source Sass files. -- `docs` - Issues for improving or updating our documentation. -- `examples` - Issues involving the example templates included in our docs. -- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v3.0.0` to `v3.1.0`). -- `build` - Issues with our build system, which is used to run all our tests, concatenate and compile source files, and more. -- `help wanted` - Issues we need or would love help from the community to resolve. -- `js` - Issues stemming from our compiled or source JavaScript files. -- `meta` - Issues with the project itself or our GitHub repository. - -For a complete look at our labels, see the [project labels page](https://github.com/twbs/bootstrap/labels). - - -## Bug reports - -A bug is a _demonstrable problem_ that is caused by the code in the repository. -Good bug reports are extremely helpful, so thanks! - -Guidelines for bug reports: - -0. **Validate and lint your code** — [validate your HTML](https://html5.validator.nu/) - and [lint your HTML](https://github.com/twbs/bootlint) to ensure your - problem isn't caused by a simple error in your own code. - -1. **Use the GitHub issue search** — check if the issue has already been - reported. - -2. **Check if the issue has been fixed** — try to reproduce it using the - latest `master` or development branch in the repository. - -3. **Isolate the problem** — ideally create a [reduced test - case](https://css-tricks.com/reduced-test-cases/) and a live example. - [This JS Bin](https://jsbin.com/lolome/edit?html,output) is a helpful template. - - -A good bug report shouldn't leave others needing to chase you up for more -information. Please try to be as detailed as possible in your report. What is -your environment? What steps will reproduce the issue? What browser(s) and OS -experience the problem? Do other browsers show the bug differently? What -would you expect to be the outcome? All these details will help people to fix -any potential bugs. - -Example: - -> Short and descriptive example bug report title -> -> A summary of the issue and the browser/OS environment in which it occurs. If -> suitable, include the steps required to reproduce the bug. -> -> 1. This is the first step -> 2. This is the second step -> 3. Further steps, etc. -> -> `` - a link to the reduced test case -> -> Any other information you want to share that is relevant to the issue being -> reported. This might include the lines of code that you have identified as -> causing the bug, and potential solutions (and your opinions on their -> merits). - -### Reporting upstream browser bugs - -Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se. -When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web). - -| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes | -| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. | -| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit
      https://bugreport.apple.com | In Apple's bug reporter, choose "Safari" as the product. | -| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://code.google.com/p/chromium/issues/list | Click the "New issue" button. | -| Microsoft | Edge | EdgeHTML | https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ | | - -### Issues bots - -[@twbs-lmvtfy](https://github.com/twbs-lmvtfy) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks for HTML validation errors in live examples (e.g. jsFiddles, JS Bins, Bootplys, Plunks, CodePens, etc.) posted in issue comments. If it finds any errors, it will post a follow-up comment on the issue and point out the errors. If this happens with an example you've posted, please fix the errors and post an updated live example. If you opened a bug report, please check whether the bug still occurs with your revised, valid live example. If the bug no longer occurs, it was probably due to your invalid HTML rather than something in Bootstrap and we'd appreciate it if you could close out the GitHub issue. - - -## Feature requests - -Feature requests are welcome. But take a moment to find out whether your idea -fits with the scope and aims of the project. It's up to *you* to make a strong -case to convince the project's developers of the merits of this feature. Please -provide as much detail and context as possible. - - -## Pull requests - -Good pull requests—patches, improvements, new features—are a fantastic -help. They should remain focused in scope and avoid containing unrelated -commits. - -**Please ask first** before embarking on any significant pull request (e.g. -implementing features, refactoring code, porting to a different language), -otherwise you risk spending a lot of time working on something that the -project's developers might not want to merge into the project. - -Please adhere to the [coding guidelines](#code-guidelines) used throughout the -project (indentation, accurate comments, etc.) and any other requirements -(such as test coverage). - -**Do not edit `bootstrap.css`, or `bootstrap.js` -directly!** Those files are automatically generated. You should edit the -source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/master/scss) -and/or [`/bootstrap/js/`](https://github.com/twbs/bootstrap/tree/master/js) instead. - -Similarly, when contributing to Bootstrap's documentation, you should edit the -documentation source files in -[the `/bootstrap/docs/` directory of the `master` branch](https://github.com/twbs/bootstrap/tree/master/docs). -**Do not edit the `gh-pages` branch.** That branch is generated from the -documentation source files and is managed separately by the Bootstrap Core Team. - -Adhering to the following process is the best way to get your work -included in the project: - -1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork, - and configure the remotes: - - ```bash - # Clone your fork of the repo into the current directory - git clone https://github.com//bootstrap.git - # Navigate to the newly cloned directory - cd bootstrap - # Assign the original repo to a remote called "upstream" - git remote add upstream https://github.com/twbs/bootstrap.git - ``` - -2. If you cloned a while ago, get the latest changes from upstream: - - ```bash - git checkout master - git pull upstream master - ``` - -3. Create a new topic branch (off the main project development branch) to - contain your feature, change, or fix: - - ```bash - git checkout -b - ``` - -4. Commit your changes in logical chunks. Please adhere to these [git commit - message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) - or your code is unlikely be merged into the main project. Use Git's - [interactive rebase](https://help.github.com/articles/about-git-rebase/) - feature to tidy up your commits before making them public. - -5. Locally merge (or rebase) the upstream development branch into your topic branch: - - ```bash - git pull [--rebase] upstream master - ``` - -6. Push your topic branch up to your fork: - - ```bash - git push origin - ``` - -7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/) - with a clear title and description against the `master` branch. - -**IMPORTANT**: By submitting a patch, you agree to allow the project owners to -license your work under the terms of the [MIT License](LICENSE) (if it -includes code changes) and under the terms of the -[Creative Commons Attribution 3.0 Unported License](docs/LICENSE) -(if it includes documentation changes). - -### Pull request bots - -[@twbs-rorschach](https://github.com/twbs-rorschach) is a Bootstrap bot that hangs out in our GitHub issue tracker and automatically checks all pull requests for a few simple common mistakes. It's possible that Rorschach might leave a comment on your pull request and then close it. If that happens, simply fix the problem(s) mentioned in the comment (there should be link(s) in the comment explaining the problem(s) in detail) and then either: - -* Push the revised version to your pull request's branch and post a comment on the pull request saying that you've fixed the problem(s). One of the Bootstrap Core Team members will then come along and reopen your pull request. -* Or you can just open a new pull request for your revised version. - -[@twbs-savage](https://github.com/twbs-savage) is a Bootstrap bot that automatically runs cross-browser tests (via [Sauce](https://saucelabs.com/) and Travis CI) on JavaScript pull requests. Savage will leave a comment on pull requests stating whether cross-browser JS tests passed or failed, with a link to the full Travis build details. If your pull request fails, check the Travis log to see which browser + OS combinations failed. Each browser test in the Travis log includes a link to a Sauce page with details about the test. On those details pages, you can watch a screencast of the test run to see exactly which unit tests failed. - - -## Code guidelines - -### HTML - -[Adhere to the Code Guide.](http://codeguide.co/#html) - -- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags). -- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`. -- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility. - -### CSS - -[Adhere to the Code Guide.](http://codeguide.co/#css) - -- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast). -- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details. - -### JS - -- No semicolons (in client-side JS) -- 2 spaces (no tabs) -- strict mode -- "Attractive" -- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded. - -### Checking coding style - -Run `npm run test` before committing to ensure your changes follow our coding standards. - - -## License - -By contributing your code, you agree to license your contribution under the [MIT License](LICENSE). -By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE). - -Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0. diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.github/ISSUE_TEMPLATE.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 98b760ec..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,22 +0,0 @@ -Before opening an issue: - -- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) -- [Validate](https://html5.validator.nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems -- Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs -- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) - -When asking general "how to" questions: - -- Please do not open an issue here -- Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community) - -When reporting a bug, include: - -- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile) -- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser) -- Reduced test cases and potential fixes using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/) - -When suggesting a feature, include: - -- As much detail as possible for what we should add and why it's important to Bootstrap -- Relevant links to prior art, screenshots, or live demos whenever possible diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.gitignore b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.gitignore deleted file mode 100644 index 2ea8867b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.gitignore +++ /dev/null @@ -1,46 +0,0 @@ -# Ignore docs files -_gh_pages -_site - -# Ignore ruby files -.ruby-version -.bundle -vendor/cache -vendor/bundle - -# Numerous always-ignore extensions -*.diff -*.err -*.log -*.orig -*.rej -*.swo -*.swp -*.vi -*.zip -*~ - -# OS or Editor folders -._* -.cache -.DS_Store -.idea -.project -.settings -.tmproj -*.esproj -*.sublime-project -*.sublime-workspace -nbproject -Thumbs.db - -# Komodo -.komodotools -*.komodoproject - -# Jekyll metadata and extra config file for `github` script -docs/.jekyll-metadata -twbsconfig.yml - -# Folders to ignore -node_modules diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.stylelintignore b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.stylelintignore deleted file mode 100644 index 7bc488e5..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.stylelintignore +++ /dev/null @@ -1,4 +0,0 @@ -**/*.min.css -**/dist/ -**/vendor/ -/_gh_pages/ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.stylelintrc b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.stylelintrc deleted file mode 100644 index 4a475331..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.stylelintrc +++ /dev/null @@ -1,247 +0,0 @@ -{ - "extends": ["stylelint-config-standard", "stylelint-config-recommended-scss"], - "plugins": [ - "stylelint-order" - ], - "rules": { - "at-rule-empty-line-before": [null, - "except": ["first-nested"] - ], - "at-rule-name-space-after": "always", - "at-rule-no-vendor-prefix": true, - "at-rule-semicolon-space-before": "never", - "block-closing-brace-empty-line-before": null, - "block-closing-brace-newline-after": null, - "block-opening-brace-space-before": null, - "color-named": "never", - "declaration-block-semicolon-newline-after": "always-multi-line", - "declaration-block-semicolon-newline-before": "never-multi-line", - "declaration-block-semicolon-space-after": "always-single-line", - "declaration-empty-line-before": null, - "declaration-no-important": true, - "font-family-name-quotes": "always-where-recommended", - "font-weight-notation": "numeric", - "function-url-no-scheme-relative": true, - "function-url-quotes": "always", - "length-zero-no-unit": true, - "max-empty-lines": 2, - "max-line-length": null, - "media-feature-name-no-vendor-prefix": true, - "media-feature-parentheses-space-inside": "never", - "media-feature-range-operator-space-after": "always", - "media-feature-range-operator-space-before": "never", - "no-descending-specificity": null, - "no-duplicate-selectors": true, - "number-leading-zero": "never", - "order/properties-order": [ - "position", - "top", - "right", - "bottom", - "left", - "z-index", - "box-sizing", - "display", - "flex", - "flex-align", - "flex-basis", - "flex-direction", - "flex-wrap", - "flex-flow", - "flex-grow", - "flex-order", - "flex-pack", - "align-items", - "align-self", - "justify-content", - "order", - "float", - "width", - "min-width", - "max-width", - "height", - "min-height", - "max-height", - "padding", - "padding-top", - "padding-right", - "padding-bottom", - "padding-left", - "margin", - "margin-top", - "margin-right", - "margin-bottom", - "margin-left", - "overflow", - "overflow-x", - "overflow-y", - "-webkit-overflow-scrolling", - "-ms-overflow-x", - "-ms-overflow-y", - "-ms-overflow-style", - "clip", - "clear", - "font", - "font-family", - "font-size", - "font-style", - "font-weight", - "font-variant", - "font-size-adjust", - "font-stretch", - "font-effect", - "font-emphasize", - "font-emphasize-position", - "font-emphasize-style", - "font-smooth", - "hyphens", - "line-height", - "color", - "text-align", - "text-align-last", - "text-emphasis", - "text-emphasis-color", - "text-emphasis-style", - "text-emphasis-position", - "text-decoration", - "text-indent", - "text-justify", - "text-outline", - "-ms-text-overflow", - "text-overflow", - "text-overflow-ellipsis", - "text-overflow-mode", - "text-shadow", - "text-transform", - "text-wrap", - "-webkit-text-size-adjust", - "-ms-text-size-adjust", - "letter-spacing", - "-ms-word-break", - "word-break", - "word-spacing", - "-ms-word-wrap", - "word-wrap", - "overflow-wrap", - "tab-size", - "white-space", - "vertical-align", - "list-style", - "list-style-position", - "list-style-type", - "list-style-image", - "pointer-events", - "-ms-touch-action", - "touch-action", - "cursor", - "visibility", - "zoom", - "table-layout", - "empty-cells", - "caption-side", - "border-spacing", - "border-collapse", - "content", - "quotes", - "counter-reset", - "counter-increment", - "resize", - "user-select", - "nav-index", - "nav-up", - "nav-right", - "nav-down", - "nav-left", - "background", - "background-color", - "background-image", - "filter", - "background-repeat", - "background-attachment", - "background-position", - "background-position-x", - "background-position-y", - "background-clip", - "background-origin", - "background-size", - "border", - "border-color", - "border-style", - "border-width", - "border-top", - "border-top-color", - "border-top-style", - "border-top-width", - "border-right", - "border-right-color", - "border-right-style", - "border-right-width", - "border-bottom", - "border-bottom-color", - "border-bottom-style", - "border-bottom-width", - "border-left", - "border-left-color", - "border-left-style", - "border-left-width", - "border-radius", - "border-top-left-radius", - "border-top-right-radius", - "border-bottom-right-radius", - "border-bottom-left-radius", - "border-image", - "border-image-source", - "border-image-slice", - "border-image-width", - "border-image-outset", - "border-image-repeat", - "outline", - "outline-width", - "outline-style", - "outline-color", - "outline-offset", - "box-shadow", - "opacity", - "-ms-interpolation-mode", - "transition", - "transition-delay", - "transition-timing-function", - "transition-duration", - "transition-property", - "transform", - "transform-origin", - "animation", - "animation-name", - "animation-duration", - "animation-play-state", - "animation-timing-function", - "animation-delay", - "animation-iteration-count", - "animation-direction" - ], - "property-no-vendor-prefix": true, - "rule-empty-line-before": null, - "selector-attribute-quotes": "always", - "selector-list-comma-newline-after": "always", - "selector-list-comma-newline-before": "never-multi-line", - "selector-list-comma-space-after": "always-single-line", - "selector-list-comma-space-before": "never-single-line", - "selector-max-attribute": 2, - "selector-max-class": 4, - "selector-max-combinators": 4, - "selector-max-compound-selectors": 4, - "selector-max-empty-lines": 1, - "selector-max-id": 0, - "selector-max-specificity": null, - "selector-max-type": 2, - "selector-max-universal": 1, - "selector-no-qualifying-type": true, - "selector-no-vendor-prefix": true, - "string-quotes": "double", - "value-keyword-case": "lower", - "value-list-comma-newline-after": "never-multi-line", - "value-list-comma-newline-before": "never-multi-line", - "value-list-comma-space-after": "always", - "value-no-vendor-prefix": true - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.travis.yml b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.travis.yml deleted file mode 100644 index bc169451..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -sudo: required -dist: trusty -addons: - chrome: stable -language: node_js -git: - depth: 3 -node_js: - - "6" - - "8" -before_install: - - if [[ `npm -v` != 5* ]]; then npm install -g npm@5; fi -install: - - bundle install --deployment --jobs=3 --retry=3 - - npm install -after_success: - - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then npm run docs-upload-preview; fi -stages: - - test - - name: browser - if: type = push -jobs: - include: - - stage: browser - node_js: 8 - script: if ! git log --format=%B --no-merges -n 1 | grep '\[skip browser\]'; then npm test && npm run js-test-cloud; fi -cache: - directories: - - node_modules - - vendor/bundle -notifications: - slack: heybb:iz4wwosL0N0EdaX1gvgkU0NH - webhooks: - - http://savage.twbsapps.com/savage/travis diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/CNAME b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/CNAME deleted file mode 100644 index 52c85339..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/CNAME +++ /dev/null @@ -1 +0,0 @@ -getbootstrap.com diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/CODE_OF_CONDUCT.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/CODE_OF_CONDUCT.md deleted file mode 100644 index 660428d8..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mdo@getbootstrap.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/Gemfile b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/Gemfile deleted file mode 100644 index b80761f8..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/Gemfile +++ /dev/null @@ -1,8 +0,0 @@ -source 'https://rubygems.org' - -group :development, :test do - gem 'jekyll', '~> 3.7.0' - gem 'jekyll-redirect-from', '~> 0.13.0' - gem 'jekyll-sitemap', '~> 1.1.1' - gem 'jekyll-toc', '~> 0.5.1' -end diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/Gemfile.lock b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/Gemfile.lock deleted file mode 100644 index a49115b3..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/Gemfile.lock +++ /dev/null @@ -1,80 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - colorator (1.1.0) - concurrent-ruby (1.0.5) - em-websocket (0.5.1) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) - eventmachine (1.2.5) - eventmachine (1.2.5-x64-mingw32) - ffi (1.9.18) - ffi (1.9.18-x64-mingw32) - forwardable-extended (2.6.0) - http_parser.rb (0.6.0) - i18n (0.9.1) - concurrent-ruby (~> 1.0) - jekyll (3.7.0) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 0.7) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (~> 1.14) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-redirect-from (0.13.0) - jekyll (~> 3.3) - jekyll-sass-converter (1.5.1) - sass (~> 3.4) - jekyll-sitemap (1.1.1) - jekyll (~> 3.3) - jekyll-toc (0.5.1) - nokogiri (~> 1.6) - jekyll-watch (2.0.0) - listen (~> 3.0) - kramdown (1.16.2) - liquid (4.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - mercenary (0.3.6) - mini_portile2 (2.3.0) - nokogiri (1.8.1) - mini_portile2 (~> 2.3.0) - nokogiri (1.8.1-x64-mingw32) - mini_portile2 (~> 2.3.0) - pathutil (0.16.1) - forwardable-extended (~> 2.6) - public_suffix (3.0.1) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) - rouge (3.1.0) - ruby_dep (1.5.0) - safe_yaml (1.0.4) - sass (3.5.5) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - -PLATFORMS - ruby - x64-mingw32 - -DEPENDENCIES - jekyll (~> 3.7.0) - jekyll-redirect-from (~> 0.13.0) - jekyll-sitemap (~> 1.1.1) - jekyll-toc (~> 0.5.1) - -BUNDLED WITH - 1.16.1 diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/LICENSE b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/LICENSE deleted file mode 100644 index 86f4b8ca..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2011-2018 Twitter, Inc. -Copyright (c) 2011-2018 The Bootstrap Authors - -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. diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/README.md b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/README.md deleted file mode 100644 index 6734d355..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/README.md +++ /dev/null @@ -1,167 +0,0 @@ -

      - - - - -

      Bootstrap

      - -

      - Sleek, intuitive, and powerful front-end framework for faster and easier web development. -
      - Explore Bootstrap docs » -
      -
      - Bootstrap Themes - · - Job Board - · - Blog -

      -

      - -
      - -## Table of contents - -- [Quick start](#quick-start) -- [Status](#status) -- [What's included](#whats-included) -- [Bugs and feature requests](#bugs-and-feature-requests) -- [Documentation](#documentation) -- [Contributing](#contributing) -- [Community](#community) -- [Versioning](#versioning) -- [Creators](#creators) -- [Copyright and license](#copyright-and-license) - -## Quick start - -Several quick start options are available: - -- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0.zip) -- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` -- Install with [npm](https://www.npmjs.com/): `npm install bootstrap` -- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.0.0` -- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.0.0` -- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap -Pre` Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only required until Bootstrap v4 has a stable release). - -Read the [Getting started page](https://getbootstrap.com/docs/4.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more. - -## Status - -[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/) -[![Build Status](https://img.shields.io/travis/twbs/bootstrap/v4-dev.svg)](https://travis-ci.org/twbs/bootstrap) -[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap) -[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap) -[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap) -[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap) -[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/absoluteLatest) -[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=peer) -[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev) -[![CSS gzip size](http://img.badgesize.io/twbs/bootstrap/v4-dev/dist/css/bootstrap.min.css?compression=gzip&label=CSS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/css/bootstrap.min.css) -[![JS gzip size](http://img.badgesize.io/twbs/bootstrap/v4-dev/dist/js/bootstrap.min.js?compression=gzip&label=JS+gzip+size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/js/bootstrap.min.js) - -[![Sauce Labs Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap) - -## What's included - -Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this: - -``` -bootstrap/ -├── css/ -│ ├── bootstrap.css -│ ├── bootstrap.css.map -│ ├── bootstrap.min.css -│ ├── bootstrap.min.css.map -│ ├── bootstrap-grid.css -│ ├── bootstrap-grid.css.map -│ ├── bootstrap-grid.min.css -│ ├── bootstrap-grid.min.css.map -│ ├── bootstrap-reboot.css -│ ├── bootstrap-reboot.css.map -│ ├── bootstrap-reboot.min.css -│ └── bootstrap-reboot.min.css.map -└── js/ - ├── bootstrap.bundle.js - ├── bootstrap.bundle.min.js - ├── bootstrap.js - └── bootstrap.min.js -``` - -We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developers.google.com/web/tools/chrome-devtools/debug/readability/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/). - - -## Bugs and feature requests - -Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). - - -## Documentation - -Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at . The docs may also be run locally. - -Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in the `_scripts.html` include. - -### Running documentation locally - -1. Run through the [tooling setup](https://getbootstrap.com/docs/4.0/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`. -2. Run `npm install` to install Node.js dependencies. -3. Run `npm run test` (or a specific NPM script) to rebuild distributed CSS and JavaScript files, as well as our docs assets. -4. From the root `/bootstrap` directory, run `npm run docs-serve` in the command line. -5. Open `http://localhost:9001` in your browser, and voilà. - -Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/). - -### Documentation for previous releases - -- For v2.3.2: -- For v3.3.x: - -[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. - - -## Contributing - -Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. - -Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo). - -Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at . - - -## Community - -Get updates on Bootstrap's development and chat with the project maintainers and community members. - -- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). -- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/). -- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). -- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. -- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)). -- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability. - - -## Versioning - -For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible. - -See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release. - - -## Creators - -**Mark Otto** - -- -- - -**Jacob Thornton** - -- -- - - -## Copyright and license - -Code and documentation copyright 2011-2018 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE). diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_config.yml b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_config.yml deleted file mode 100644 index 0d22eaef..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_config.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Dependencies -markdown: kramdown -highlighter: rouge - -kramdown: - auto_ids: true - -# Permalinks -permalink: pretty - -# Server -source: "." -destination: ./_gh_pages -host: 0.0.0.0 -port: 9001 -baseurl: "" -url: "https://getbootstrap.com" -encoding: UTF-8 -exclude: - - .git/ - - .github/ - - assets/scss/ - - build/ - - js/ - - node_modules/ - - nuget/ - - scss/ - - vendor/ - - CODE_OF_CONDUCT.md - - composer.json - - Gemfile - - Gemfile.lock - - package.js - - package.json - - package-lock.json - - README.md - - sache.json - - twbsconfig.yml - -plugins: - - jekyll-redirect-from - - jekyll-sitemap - - jekyll-toc - -# Social -title: Bootstrap -description: "The most popular HTML, CSS, and JS library in the world." -twitter: getbootstrap -authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors" -social_image_path: /assets/brand/bootstrap-social.png -social_logo_path: /assets/brand/bootstrap-social-logo.png - -# Custom variables -current_version: 4.0.0 -current_ruby_version: 4.0.0 -docs_version: 4.0 -repo: "https://github.com/twbs/bootstrap" -slack: "https://bootstrap-slack.herokuapp.com" -blog: "https://blog.getbootstrap.com" -expo: "https://expo.getbootstrap.com" -jobs: "https://jobs.getbootstrap.com" -themes: "https://themes.getbootstrap.com" - -download: - source: "https://github.com/twbs/bootstrap/archive/v4.0.0.zip" - dist: "https://github.com/twbs/bootstrap/releases/download/v4.0.0/bootstrap-4.0.0-dist.zip" - -cdn: - # See https://www.srihash.org for info on how to generate the hashes - css: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" - css_hash: "sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" - js: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" - js_hash: "sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" - jquery: "https://code.jquery.com/jquery-3.2.1.slim.min.js" - jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" - popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" - popper_hash: "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" - -toc: - min_level: 2 - max_level: 4 diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_data/breakpoints.yml b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_data/breakpoints.yml deleted file mode 100644 index 3c8cfe29..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_data/breakpoints.yml +++ /dev/null @@ -1,29 +0,0 @@ -- breakpoint: xs - abbr: "" - name: Extra small - min-width: 0px - container: "" - -- breakpoint: sm - abbr: -sm - name: Small - min-width: 576px - container: 540px - -- breakpoint: md - abbr: -md - name: Medium - min-width: 768px - container: 720px - -- breakpoint: lg - abbr: -lg - name: Large - min-width: 992px - container: 960px - -- breakpoint: xl - abbr: -xl - name: Extra large - min-width: 1200px - container: 1140px diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_data/browser-bugs.yml b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_data/browser-bugs.yml deleted file mode 100644 index 1ef63f26..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_data/browser-bugs.yml +++ /dev/null @@ -1,451 +0,0 @@ -- - browser: > - Edge - summary: > - Visual artifacts in scrollable modal dialogs - upstream_bug: > - Edge#9011176 - origin: > - Bootstrap#20755 - -- - browser: > - Edge - summary: > - Native browser tooltip for `title` shows on first keyboard focus (in addition to custom tooltip component) - upstream_bug: > - Edge#6793560 - origin: > - Bootstrap#18692 - -- - browser: > - Edge - summary: > - Hovered element still remains in `:hover` state after scrolling away. - upstream_bug: > - Edge#5381673 - origin: > - Bootstrap#14211 - -- - browser: > - Edge - summary: > - CSS `border-radius` sometimes causes lines of bleed-through of the `background-color` of the parent element. - upstream_bug: > - Edge#3342037 - origin: > - Bootstrap#16671 - -- - browser: > - Edge - summary: > - `background` of `` is only applied to first child cell instead of all cells in the row - upstream_bug: > - Edge#5865620 - origin: > - Bootstrap#18504 - -- - browser: > - Edge - summary: > - `@-ms-viewport{width: device-width;}` has side-effect of making scrollbars auto-hide - upstream_bug: > - Edge#7165383 - origin: > - Bootstrap#18543 - -- - browser: > - Edge - summary: > - Background color from lower layer bleeds through transparent border in some cases - upstream_bug: > - Edge#6274505 - origin: > - Bootstrap#18228 - -- - browser: > - Edge - summary: > - Hovering over descendant SVG element fires `mouseleave` event at ancestor - upstream_bug: > - Edge#7787318 - origin: > - Bootstrap#19670 - -- - browser: > - Edge - summary: > - Active `position: fixed;` ` - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/favicons.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/favicons.html deleted file mode 100644 index 97dab4ba..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/favicons.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/footer.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/footer.html deleted file mode 100644 index 8e16577c..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/footer.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/header.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/header.html deleted file mode 100644 index 85d3753e..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/header.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - {%- if page.title -%} - {{ page.title | smartify }} · {{ site.title | smartify }} - {%- else -%} - {{ site.title | smartify }} · {{ site.description | smartify }} - {%- endif -%} - - - -{% if site.github %} - -{% else %} - -{% endif %} - - -{% if page.layout == "docs" %} - -{% endif %} - - -{% include favicons.html %} - -{% include social.html %} - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/bootstrap.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/bootstrap.svg deleted file mode 100644 index 816028bd..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/bootstrap.svg +++ /dev/null @@ -1 +0,0 @@ -Bootstrap diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/download.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/download.svg deleted file mode 100644 index aa5f3f1b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/download.svg +++ /dev/null @@ -1 +0,0 @@ -Download icon diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/github.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/github.svg deleted file mode 100644 index 5d6ad180..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/github.svg +++ /dev/null @@ -1 +0,0 @@ -GitHub diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/import.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/import.svg deleted file mode 100644 index 0a9dbb26..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/import.svg +++ /dev/null @@ -1 +0,0 @@ -Import icon diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/lightning.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/lightning.svg deleted file mode 100644 index be6f475e..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/lightning.svg +++ /dev/null @@ -1 +0,0 @@ -Lightning icon diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/menu.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/menu.svg deleted file mode 100644 index 03e15dc4..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/menu.svg +++ /dev/null @@ -1 +0,0 @@ -Menu diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/slack.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/slack.svg deleted file mode 100644 index 3927fa45..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/slack.svg +++ /dev/null @@ -1 +0,0 @@ -Slack diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/twitter.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/twitter.svg deleted file mode 100644 index 450c393b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/icons/twitter.svg +++ /dev/null @@ -1 +0,0 @@ -Twitter diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/scripts.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/scripts.html deleted file mode 100644 index 7c262149..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/scripts.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -{%- if site.github -%} - -{%- else -%} - -{%- endif -%} - -{%- if page.layout == "docs" -%} - -{%- endif -%} - -{%- if site.github -%} - -{%- else -%} - - - - - - -{%- endif -%} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/social.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/social.html deleted file mode 100644 index 277ee231..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_includes/social.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/default.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/default.html deleted file mode 100644 index e6e576fa..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/default.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - {% include header.html %} - - - -
      - Skip to main content -
      -
      - - {% include docs-navbar.html %} - - {% if page.layout == "simple" %} - {{ content }} - {% else %} -
      - {{ content }} -
      - {% endif %} - - {% include footer.html %} - {% include scripts.html %} - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/docs.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/docs.html deleted file mode 100644 index f876055d..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/docs.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - {% include header.html %} - - - -
      - Skip to main content -
      -
      - - {% include docs-navbar.html %} - -
      -
      -
      - {% include docs-sidebar.html %} -
      - - {% if page.toc %} -
      - {{ content | toc_only }} -
      - {% endif %} - -
      -

      {{ page.title | smartify }}

      -

      {{ page.description | smartify }}

      - {% include ads.html %} - {{ content }} -
      -
      -
      - - {% include scripts.html %} - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/examples.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/examples.html deleted file mode 100644 index 768f577f..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/examples.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default ---- - -
      -
      -

      {{ page.title | smartify }}

      -

      {{ page.description | smartify }}

      - Download source code -
      - {% include ads.html %} -
      - -
      - {{ content }} -
      diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/home.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/home.html deleted file mode 100644 index a406ba2e..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/home.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - {% include header.html %} - - - -
      - Skip to main content -
      -
      - - {% include docs-navbar.html %} - - {{ content }} - - {% include footer.html %} - {% include scripts.html %} - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/redirect.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/redirect.html deleted file mode 100644 index 6cf445d6..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/redirect.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Bootstrap · Content moved - - - - - - -

      Redirecting…

      - Click here if you are not redirected - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/simple.html b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/simple.html deleted file mode 100644 index dfd9afd1..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_layouts/simple.html +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: default ---- - -
      -
      -

      {{ page.title | smartify }}

      -

      {{ page.description | smartify }}

      - {% include ads.html %} - {{ content }} -
      -
      diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/bugify.rb b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/bugify.rb deleted file mode 100644 index 0f910718..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/bugify.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Jekyll - module BugFilter - def bugify(input) - upstream_map = { - "Bootstrap" => "https://github.com/twbs/bootstrap/issues/", - "Edge" => ["https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/", "Edge issue"], - "A11yUserVoice" => ["https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/", "Microsoft A11y UserVoice idea"], - "UserVoice" => ["https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/", "Edge UserVoice idea"], - "Mozilla" => ["https://bugzilla.mozilla.org/show_bug.cgi?id=", "Mozilla bug"], - "Chromium" => ["https://bugs.chromium.org/p/chromium/issues/detail?id=", "Chromium issue"], - "WebKit" => ["https://bugs.webkit.org/show_bug.cgi?id=", "WebKit bug"], - "Safari" => ["https://openradar.appspot.com/", "Apple Safari Radar"], - "Normalize" => ["https://github.com/necolas/normalize.css/issues/", "Normalize"] - } - - upstream_map.each do |key, data| - url = data.is_a?(Array) ? data[0] : data - label = data.is_a?(Array) ? "#{data[1]} " : "" - input = input.gsub(/#{key}#(\d+)/, "#{label}#\\1") - end - - return input - end - end -end - -Liquid::Template.register_filter(Jekyll::BugFilter) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/callout.rb b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/callout.rb deleted file mode 100644 index 58453ecb..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/callout.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Source: https://stackoverflow.com/questions/19169849/how-to-get-markdown-processed-content-in-jekyll-tag-plugin - -module Jekyll - module Tags - class CalloutTag < Liquid::Block - - def initialize(tag_name, type, tokens) - super - type.strip! - if %w(info danger warning).include?(type) - @type = type - else - puts "#{type} callout not supported. Defaulting to info" - @type = "info" - end - end - - def render(context) - site = context.registers[:site] - converter = site.find_converter_instance(::Jekyll::Converters::Markdown) - output = converter.convert(super(context)) - "
      #{output}
      " - end - end - end -end - -Liquid::Template.register_tag('callout', Jekyll::Tags::CalloutTag) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/example.rb b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/example.rb deleted file mode 100644 index 91328972..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/example.rb +++ /dev/null @@ -1,95 +0,0 @@ -module Jekyll - module Tags - class ExampleBlock < Liquid::Block - include Liquid::StandardFilters - - # The regular expression syntax checker. Start with the language specifier. - # Follow that by zero or more space separated options that take one of three - # forms: name, name=value, or name="" - # - # is a space-separated list of numbers - SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=((\w|[0-9_-])+|"([0-9]+\s)*[0-9]+"))?)*)$/ - - def initialize(tag_name, markup, tokens) - super - if markup.strip =~ SYNTAX - @lang = $1.downcase - @options = {} - if defined?($2) && $2 != '' - # Split along 3 possible forms -- key="", key=value, or key - $2.scan(/(?:\w+(?:=(?:(?:\w|[0-9_-])+|"[^"]*")?)?)/) do |opt| - key, value = opt.split('=') - # If a quoted list, convert to array - if value && value.include?("\"") - value.gsub!(/"/, "") - value = value.split - end - @options[key.to_sym] = value || true - end - end - @options[:linenos] = false - else - raise SyntaxError.new <<-eos -Syntax Error in tag 'example' while parsing the following markup: - - #{markup} - -Valid syntax: example [id=foo] -eos - end - end - - def render(context) - prefix = context["highlighter_prefix"] || "" - suffix = context["highlighter_suffix"] || "" - code = super.to_s.strip - - output = case context.registers[:site].highlighter - - when 'rouge' - render_rouge(code) - end - - rendered_output = example(code) + add_code_tag(output) - prefix + rendered_output + suffix - end - - def example(output) - "
      \n#{output}\n
      " - end - - def remove_holderjs(code) - code = code.gsub(/data-src="holder.js.+?"/, 'src="..."') - end - - def remove_example_classes(code) - # Find `bd-` classes and remove them from the highlighted code. Because of how this regex works, it will also - # remove classes that are after the `bd-` class. While this is a bug, I left it because it can be helpful too. - # To fix the bug, replace `(?=")` with `(?=("|\ ))`. - code = code.gsub(/(?!class=".)\ *?bd-.+?(?=")/, "") - # Find empty class attributes after the previous regex and remove those too. - code = code.gsub(/\ class=""/, "") - end - - def render_rouge(code) - require 'rouge' - formatter = Rouge::Formatters::HTML.new(line_numbers: @options[:linenos], wrap: false) - lexer = Rouge::Lexer.find_fancy(@lang, code) || Rouge::Lexers::PlainText - code = remove_holderjs(code) - code = remove_example_classes(code) - code = formatter.format(lexer.lex(code)) - "
      #{code}
      " - end - - def add_code_tag(code) - # Add nested tags to code blocks - code = code.sub(/
      \n*/,'
      ')
      -        code = code.sub(/\n*<\/pre>/,"
      ") - code.strip - end - - end - end -end - -Liquid::Template.register_tag('example', Jekyll::Tags::ExampleBlock) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/markdown-block.rb b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/markdown-block.rb deleted file mode 100644 index f9f1531b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/_plugins/markdown-block.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Jekyll - class MarkdownBlock < Liquid::Block - alias_method :render_block, :render - - def initialize(tag_name, markup, tokens) - super - end - - # Uses the default Jekyll markdown parser to - # parse the contents of this block - # - def render(context) - site = context.registers[:site] - converter = site.find_converter_instance(::Jekyll::Converters::Markdown) - converter.convert(render_block(context)) - end - end -end - -Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-outline.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-outline.svg deleted file mode 100644 index 8af91343..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-outline.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-punchout.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-punchout.svg deleted file mode 100644 index 8dd9005d..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-punchout.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-social-logo.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-social-logo.png deleted file mode 100644 index fdd35e5d..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-social-logo.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-social.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-social.png deleted file mode 100644 index 468ab5b5..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-social.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-solid.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-solid.svg deleted file mode 100644 index b624a024..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/brand/bootstrap-solid.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/css/docs.min.css b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/css/docs.min.css deleted file mode 100644 index ea39b863..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/css/docs.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Bootstrap Docs (https://getbootstrap.com) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. - * Licensed under the Creative Commons Attribution 3.0 Unported License. For - * details, see https://creativecommons.org/licenses/by/3.0/. - */.bd-navbar{min-height:4rem;background-color:#563d7c;box-shadow:0 .5rem 1rem rgba(0,0,0,.05),inset 0 -1px 0 rgba(0,0,0,.1)}@media (max-width:991.98px){.bd-navbar{padding-right:.5rem;padding-left:.5rem}.bd-navbar .navbar-nav-scroll{max-width:100%;height:2.5rem;margin-top:.25rem;overflow:hidden;font-size:.875rem}.bd-navbar .navbar-nav-scroll .navbar-nav{padding-bottom:2rem;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}}@media (min-width:768px){@supports ((position:-webkit-sticky) or (position:sticky)){.bd-navbar{position:-webkit-sticky;position:sticky;top:0;z-index:1071}}}.bd-navbar .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem;color:#cbbde2}.bd-navbar .navbar-nav .nav-link.active,.bd-navbar .navbar-nav .nav-link:hover{color:#fff;background-color:transparent}.bd-navbar .navbar-nav .nav-link.active{font-weight:500}.bd-navbar .navbar-nav-svg{display:inline-block;width:1rem;height:1rem;vertical-align:text-top}.bd-navbar .dropdown-menu{font-size:.875rem}.bd-navbar .dropdown-item.active{font-weight:500;color:#212529;background-color:transparent;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23292b2c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:.4rem .6rem;background-size:.75rem .75rem}.bd-masthead{position:relative;padding:3rem 15px}.bd-masthead h1{line-height:1}.bd-masthead .btn{width:100%;padding:.8rem 2rem;font-size:1.25rem;font-weight:500}.bd-masthead .carbonad{margin-top:0!important;margin-bottom:-3rem!important}@media (min-width:576px){.bd-masthead{padding-top:5rem;padding-bottom:5rem}.bd-masthead .carbonad{margin-bottom:0!important}}@media (min-width:768px){.bd-masthead h1{font-size:4rem}.bd-masthead .carbonad{margin-top:3rem!important}}.half-rule{width:6rem;margin:2.5rem 0}.masthead-followup .bd-clipboard{display:none}.masthead-followup .highlight{padding:.5rem 0;background-color:transparent}#carbonads{position:static;display:block;max-width:400px;padding:15px 15px 15px 160px;margin:2rem 0;overflow:hidden;font-size:13px;line-height:1.4;text-align:left;background-color:rgba(0,0,0,.05)}#carbonads a{color:#333;text-decoration:none}@media (min-width:576px){#carbonads{max-width:330px;border-radius:4px}}.carbon-img{float:left;margin-left:-145px}.carbon-poweredby{display:block;color:#777!important}.bd-content{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.bd-content>h2[id],.bd-content>h3[id],.bd-content>h4[id]{pointer-events:none}.bd-content>h2[id]>a,.bd-content>h2[id]>div,.bd-content>h3[id]>a,.bd-content>h3[id]>div,.bd-content>h4[id]>a,.bd-content>h4[id]>div{pointer-events:auto}.bd-content>h2[id]::before,.bd-content>h3[id]::before,.bd-content>h4[id]::before{display:block;height:6rem;margin-top:-6rem;visibility:hidden;content:""}.bd-content>table{width:100%;max-width:100%;margin-bottom:1rem}@media (max-width:991.98px){.bd-content>table{display:block;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}.bd-content>table.table-bordered{border:0}}.bd-content>table>tbody>tr>td,.bd-content>table>tbody>tr>th,.bd-content>table>tfoot>tr>td,.bd-content>table>tfoot>tr>th,.bd-content>table>thead>tr>td,.bd-content>table>thead>tr>th{padding:.75rem;vertical-align:top;border:1px solid #dee2e6}.bd-content>table>tbody>tr>td>p:last-child,.bd-content>table>tbody>tr>th>p:last-child,.bd-content>table>tfoot>tr>td>p:last-child,.bd-content>table>tfoot>tr>th>p:last-child,.bd-content>table>thead>tr>td>p:last-child,.bd-content>table>thead>tr>th>p:last-child{margin-bottom:0}.bd-content>table td:first-child>code{white-space:nowrap}.bd-content>h2:not(:first-child){margin-top:3rem}.bd-content>h3{margin-top:1.5rem}.bd-content>ol li,.bd-content>ul li{margin-bottom:.25rem}@media (min-width:992px){.bd-content>ol,.bd-content>p,.bd-content>ul{max-width:80%}}.bd-title{margin-top:1rem;margin-bottom:.5rem;font-weight:300}@media (min-width:576px){.bd-title{font-size:3rem}}.bd-lead{font-size:1.125rem;font-weight:300}@media (min-width:576px){.bd-lead{max-width:80%;margin-bottom:1rem;font-size:1.5rem}}.bd-text-purple{color:#563d7c}.bd-text-purple-bright{color:#7952b3}#skippy{display:block;padding:1em;color:#fff;background-color:#563d7c;outline:0}#skippy .skiplink-text{padding:.5em;outline:1px dotted}.bd-toc{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding-top:1.5rem;padding-bottom:1.5rem;font-size:.875rem}@supports ((position:-webkit-sticky) or (position:sticky)){.bd-toc{position:-webkit-sticky;position:sticky;top:4rem;height:calc(100vh - 4rem);overflow-y:auto}}.section-nav{padding-left:0;border-left:1px solid #eee}.section-nav ul{padding-left:1rem}.section-nav ul ul{display:none}.toc-entry{display:block}.toc-entry a{display:block;padding:.125rem 1.5rem;color:#99979c}.toc-entry a:hover{color:#007bff;text-decoration:none}.bd-sidebar{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0;border-bottom:1px solid rgba(0,0,0,.1)}@media (min-width:768px){.bd-sidebar{border-right:1px solid rgba(0,0,0,.1)}@supports ((position:-webkit-sticky) or (position:sticky)){.bd-sidebar{position:-webkit-sticky;position:sticky;top:4rem;z-index:1000;height:calc(100vh - 4rem)}}}@media (min-width:1200px){.bd-sidebar{-webkit-box-flex:0;-ms-flex:0 1 320px;flex:0 1 320px}}.bd-links{padding-top:1rem;padding-bottom:1rem;margin-right:-15px;margin-left:-15px}@media (min-width:768px){@supports ((position:-webkit-sticky) or (position:sticky)){.bd-links{max-height:calc(100vh - 9rem);overflow-y:auto}}}@media (min-width:768px){.bd-links{display:block!important}}.bd-search{position:relative;padding:1rem 15px;margin-right:-15px;margin-left:-15px;border-bottom:1px solid rgba(0,0,0,.05)}.bd-search .form-control:focus{border-color:#7952b3;box-shadow:0 0 0 3px rgba(121,82,179,.25)}.bd-search-docs-toggle{line-height:1;color:#212529}.bd-sidenav{display:none}.bd-toc-link{display:block;padding:.25rem 1.5rem;font-weight:500;color:rgba(0,0,0,.65)}.bd-toc-link:hover{color:rgba(0,0,0,.85);text-decoration:none}.bd-toc-item.active{margin-bottom:1rem}.bd-toc-item.active:not(:first-child){margin-top:1rem}.bd-toc-item.active>.bd-toc-link{color:rgba(0,0,0,.85)}.bd-toc-item.active>.bd-toc-link:hover{background-color:transparent}.bd-toc-item.active>.bd-sidenav{display:block}.bd-sidebar .nav>li>a{display:block;padding:.25rem 1.5rem;font-size:90%;color:rgba(0,0,0,.65)}.bd-sidebar .nav>li>a:hover{color:rgba(0,0,0,.85);text-decoration:none;background-color:transparent}.bd-sidebar .nav>.active:hover>a,.bd-sidebar .nav>.active>a{font-weight:500;color:rgba(0,0,0,.85);background-color:transparent}.bd-footer{font-size:85%;text-align:center;background-color:#f7f7f7}.bd-footer a{font-weight:500;color:#495057}.bd-footer a:focus,.bd-footer a:hover{color:#007bff}.bd-footer p{margin-bottom:0}@media (min-width:576px){.bd-footer{text-align:left}}.bd-footer-links{padding-left:0;margin-bottom:1rem}.bd-footer-links li{display:inline-block}.bd-footer-links li+li{margin-left:1rem}.bd-example-row .row>.col,.bd-example-row .row>[class^=col-]{padding-top:.75rem;padding-bottom:.75rem;background-color:rgba(86,61,124,.15);border:1px solid rgba(86,61,124,.2)}.bd-example-row .row+.row{margin-top:1rem}.bd-example-row .flex-items-bottom,.bd-example-row .flex-items-middle,.bd-example-row .flex-items-top{min-height:6rem;background-color:rgba(255,0,0,.1)}.bd-example-row-flex-cols .row{min-height:10rem;background-color:rgba(255,0,0,.1)}.bd-highlight{background-color:rgba(86,61,124,.15);border:1px solid rgba(86,61,124,.15)}.example-container{width:800px;width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.example-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.example-content-main{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}@media (min-width:576px){.example-content-main{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}@media (min-width:992px){.example-content-main{-webkit-box-flex:0;-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}}.example-content-secondary{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}@media (min-width:576px){.example-content-secondary{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}@media (min-width:992px){.example-content-secondary{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}}.bd-example-container{min-width:16rem;max-width:25rem;margin-right:auto;margin-left:auto}.bd-example-container-header{height:3rem;margin-bottom:.5rem;background-color:#fff;border-radius:.25rem}.bd-example-container-sidebar{float:right;width:4rem;height:8rem;background-color:#80bdff;border-radius:.25rem}.bd-example-container-body{height:8rem;margin-right:4.5rem;background-color:#957bbe;border-radius:.25rem}.bd-example-container-fluid{max-width:none}.bd-example{position:relative;padding:1rem;margin:1rem -15px 0;border:solid #f7f7f9;border-width:.2rem 0 0}.bd-example::after{display:block;clear:both;content:""}@media (min-width:576px){.bd-example{padding:1.5rem;margin-right:0;margin-left:0;border-width:.2rem}}.bd-example+.clipboard+.highlight,.bd-example+.highlight{margin-top:0}.bd-example+p{margin-top:2rem}.bd-example .pos-f-t{position:relative;margin:-1rem}@media (min-width:576px){.bd-example .pos-f-t{margin:-1.5rem}}.bd-example .custom-file-input:lang(es)~.custom-file-label::after{content:"Elegir"}.bd-example>.form-control+.form-control{margin-top:.5rem}.bd-example>.alert+.alert,.bd-example>.nav+.nav,.bd-example>.navbar+.navbar,.bd-example>.progress+.btn,.bd-example>.progress+.progress{margin-top:1rem}.bd-example>.dropdown-menu:first-child{position:static;display:block}.bd-example>.form-group:last-child{margin-bottom:0}.bd-example>.close{float:none}.bd-example-type .table .type-info{color:#999;vertical-align:middle}.bd-example-type .table td{padding:1rem 0;border-color:#eee}.bd-example-type .table tr:first-child td{border-top:0}.bd-example-type h1,.bd-example-type h2,.bd-example-type h3,.bd-example-type h4,.bd-example-type h5,.bd-example-type h6{margin-top:0;margin-bottom:0}.bd-example-bg-classes p{padding:1rem}.bd-example>img+img{margin-left:.5rem}.bd-example>.btn-group{margin-top:.25rem;margin-bottom:.25rem}.bd-example>.btn-toolbar+.btn-toolbar{margin-top:.5rem}.bd-example-control-sizing input[type=text]+input[type=text],.bd-example-control-sizing select{margin-top:.5rem}.bd-example-form .input-group{margin-bottom:.5rem}.bd-example>textarea.form-control{resize:vertical}.bd-example>.list-group{max-width:400px}.bd-example .fixed-top,.bd-example .sticky-top{position:static;margin:-1rem -1rem 1rem}.bd-example .fixed-bottom{position:static;margin:1rem -1rem -1rem}@media (min-width:576px){.bd-example .fixed-top,.bd-example .sticky-top{margin:-1.5rem -1.5rem 1rem}.bd-example .fixed-bottom{margin:1rem -1.5rem -1.5rem}}.bd-example .pagination{margin-top:.5rem;margin-bottom:.5rem}.modal{z-index:1072}.modal .popover,.modal .tooltip{z-index:1073}.modal-backdrop{z-index:1071}.bd-example-modal{background-color:#fafafa}.bd-example-modal .modal{position:relative;top:auto;right:auto;bottom:auto;left:auto;z-index:1;display:block}.bd-example-modal .modal-dialog{left:auto;margin-right:auto;margin-left:auto}.bd-example-tabs .nav-tabs{margin-bottom:1rem}.bd-example-popover-static{padding-bottom:1.5rem;background-color:#f9f9f9}.bd-example-popover-static .popover{position:relative;display:block;float:left;width:260px;margin:1.25rem}.tooltip-demo a{white-space:nowrap}.bd-example-tooltip-static .tooltip{position:relative;display:inline-block;margin:10px 20px;opacity:1}.scrollspy-example{position:relative;height:200px;margin-top:.5rem;overflow:auto}.scrollspy-example-2{position:relative;height:350px;overflow:auto}.bd-example-border-utils [class^=border]{display:inline-block;width:5rem;height:5rem;margin:.25rem;background-color:#f5f5f5}.bd-example-border-utils-0 [class^=border]{border:1px solid #dee2e6}.highlight{padding:1rem;margin-top:1rem;margin-bottom:1rem;background-color:#f7f7f9;-ms-overflow-style:-ms-autohiding-scrollbar}@media (min-width:576px){.highlight{padding:1.5rem}}.bd-content .highlight{margin-right:-15px;margin-left:-15px}@media (min-width:576px){.bd-content .highlight{margin-right:0;margin-left:0}}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#212529}.btn-bd-primary{font-weight:500;color:#7952b3;border-color:#7952b3}.btn-bd-primary:active,.btn-bd-primary:hover{color:#fff;background-color:#7952b3;border-color:#7952b3}.btn-bd-download{font-weight:500;color:#ffe484;border-color:#ffe484}.btn-bd-download:active,.btn-bd-download:hover{color:#2a2730;background-color:#ffe484;border-color:#ffe484}.bd-callout{padding:1.25rem;margin-top:1.25rem;margin-bottom:1.25rem;border:1px solid #eee;border-left-width:.25rem;border-radius:.25rem}.bd-callout h4{margin-top:0;margin-bottom:.25rem}.bd-callout p:last-child{margin-bottom:0}.bd-callout code{border-radius:.25rem}.bd-callout+.bd-callout{margin-top:-.25rem}.bd-callout-info{border-left-color:#5bc0de}.bd-callout-info h4{color:#5bc0de}.bd-callout-warning{border-left-color:#f0ad4e}.bd-callout-warning h4{color:#f0ad4e}.bd-callout-danger{border-left-color:#d9534f}.bd-callout-danger h4{color:#d9534f}.bd-examples .img-thumbnail{margin-bottom:.75rem}.bd-examples h4{margin-bottom:.25rem}.bd-examples p{margin-bottom:1.25rem}@media (max-width:480px){.bd-examples{margin-right:-.75rem;margin-left:-.75rem}.bd-examples>[class^=col-]{padding-right:.75rem;padding-left:.75rem}}.bd-browser-bugs td p{margin-bottom:0}.bd-browser-bugs th:first-child{width:18%}.bd-brand-logos{display:table;width:100%;margin-bottom:1rem;overflow:hidden;color:#563d7c;background-color:#f9f9f9;border-radius:.25rem}.bd-brand-item{padding:4rem 0;text-align:center}.bd-brand-item+.bd-brand-item{border-top:1px solid #fff}.bd-brand-logos .inverse{color:#fff;background-color:#563d7c}.bd-brand-item h1,.bd-brand-item h3{margin-top:0;margin-bottom:0}.bd-brand-item .bd-booticon{margin-right:auto;margin-left:auto}@media (min-width:768px){.bd-brand-item{display:table-cell;width:1%}.bd-brand-item+.bd-brand-item{border-top:0;border-left:1px solid #fff}.bd-brand-item h1{font-size:4rem}}.color-swatches{margin:0 -5px;overflow:hidden}.color-swatch{float:left;width:4rem;height:4rem;margin-right:.25rem;margin-left:.25rem;border-radius:.25rem}@media (min-width:768px){.color-swatch{width:6rem;height:6rem}}.color-swatches .bd-purple{background-color:#563d7c}.color-swatches .bd-purple-light{background-color:#cbbde2}.color-swatches .bd-purple-lighter{background-color:#e5e1ea}.color-swatches .bd-gray{background-color:#f9f9f9}.swatch-blue{color:#fff;background-color:#007bff}.swatch-indigo{color:#fff;background-color:#6610f2}.swatch-purple{color:#fff;background-color:#6f42c1}.swatch-pink{color:#fff;background-color:#e83e8c}.swatch-red{color:#fff;background-color:#dc3545}.swatch-orange{color:#212529;background-color:#fd7e14}.swatch-yellow{color:#212529;background-color:#ffc107}.swatch-green{color:#fff;background-color:#28a745}.swatch-teal{color:#fff;background-color:#20c997}.swatch-cyan{color:#fff;background-color:#17a2b8}.swatch-white{color:#212529;background-color:#fff}.swatch-gray{color:#fff;background-color:#6c757d}.swatch-gray-dark{color:#fff;background-color:#343a40}.swatch-primary{color:#fff;background-color:#007bff}.swatch-secondary{color:#fff;background-color:#6c757d}.swatch-success{color:#fff;background-color:#28a745}.swatch-info{color:#fff;background-color:#17a2b8}.swatch-warning{color:#212529;background-color:#ffc107}.swatch-danger{color:#fff;background-color:#dc3545}.swatch-light{color:#212529;background-color:#f8f9fa}.swatch-dark{color:#fff;background-color:#343a40}.swatch-100{color:#212529;background-color:#f8f9fa}.swatch-200{color:#212529;background-color:#e9ecef}.swatch-300{color:#212529;background-color:#dee2e6}.swatch-400{color:#212529;background-color:#ced4da}.swatch-500{color:#212529;background-color:#adb5bd}.swatch-600{color:#fff;background-color:#6c757d}.swatch-700{color:#fff;background-color:#495057}.swatch-800{color:#fff;background-color:#343a40}.swatch-900{color:#fff;background-color:#212529}.bd-clipboard{position:relative;display:none;float:right}.bd-clipboard+.highlight{margin-top:0}.btn-clipboard{position:absolute;top:.5rem;right:.5rem;z-index:10;display:block;padding:.25rem .5rem;font-size:75%;color:#818a91;cursor:pointer;background-color:transparent;border:0;border-radius:.25rem}.btn-clipboard:hover{color:#fff;background-color:#027de7}@media (min-width:768px){.bd-clipboard{display:block}}.hll{background-color:#ffc}.c{color:#999}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1{color:#999}.cs{color:#999}.gd{background-color:#fcc;border:1px solid #c00}.ge{font-style:italic}.gr{color:red}.gh{color:#030}.gi{background-color:#cfc;border:1px solid #0c0}.go{color:#aaa}.gp{color:#009}.gu{color:#030}.gt{color:#9c6}.kc{color:#069}.kd{color:#069}.kn{color:#069}.kp{color:#069}.kr{color:#069}.kt{color:#078}.m{color:#f60}.s{color:#d44950}.na{color:#4f9fcf}.nb{color:#366}.nc{color:#0a8}.no{color:#360}.nd{color:#99f}.ni{color:#999}.ne{color:#c00}.nf{color:#c0f}.nl{color:#99f}.nn{color:#0cf}.nt{color:#2f6f9f}.nv{color:#033}.ow{color:#000}.w{color:#bbb}.mf{color:#f60}.mh{color:#f60}.mi{color:#f60}.mo{color:#f60}.sb{color:#c30}.sc{color:#c30}.sd{font-style:italic;color:#c30}.s2{color:#c30}.se{color:#c30}.sh{color:#c30}.si{color:#a00}.sx{color:#c30}.sr{color:#3aa}.s1{color:#c30}.ss{color:#fc3}.bp{color:#366}.vc{color:#033}.vg{color:#033}.vi{color:#033}.il{color:#f60}.css .nt+.nt,.css .o,.css .o+.nt{color:#999}.language-bash::before,.language-sh::before{color:#009;content:"$ ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.language-powershell::before{color:#009;content:"PM> ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.anchorjs-link{font-weight:400;color:rgba(0,123,255,.5);transition:color .16s linear}.anchorjs-link:hover{color:#007bff;text-decoration:none}.algolia-autocomplete{display:block!important;-webkit-box-flex:1;-ms-flex:1;flex:1}.algolia-autocomplete .ds-dropdown-menu{width:100%;min-width:0!important;max-width:none!important;padding:.75rem 0!important;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .5rem 1rem rgba(0,0,0,.175)}@media (min-width:768px){.algolia-autocomplete .ds-dropdown-menu{width:175%}}.algolia-autocomplete .ds-dropdown-menu::before{display:none!important}.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-]{padding:0!important;overflow:visible!important;background-color:transparent!important;border:0!important}.algolia-autocomplete .ds-dropdown-menu .ds-suggestions{margin-top:0!important}.algolia-autocomplete .algolia-docsearch-suggestion{padding:0!important;overflow:visible!important}.algolia-autocomplete .algolia-docsearch-suggestion--category-header{padding:.125rem 1rem!important;margin-top:0!important;font-size:.875rem!important;font-weight:500!important;color:#7952b3!important;border-bottom:0!important}.algolia-autocomplete .algolia-docsearch-suggestion--wrapper{float:none!important;padding-top:0!important}.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column{float:none!important;width:auto!important;padding:0!important;text-align:left!important}.algolia-autocomplete .algolia-docsearch-suggestion--content{float:none!important;width:auto!important;padding:0!important}.algolia-autocomplete .algolia-docsearch-suggestion--content::before{display:none!important}.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header{padding-top:.75rem!important;margin-top:.75rem!important;border-top:1px solid rgba(0,0,0,.1)}.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column{display:none!important}.algolia-autocomplete .algolia-docsearch-suggestion--title{display:block;padding:.25rem 1rem!important;margin-bottom:0!important;font-size:.875rem!important;font-weight:400!important}.algolia-autocomplete .algolia-docsearch-suggestion--text{padding:0 1rem .5rem!important;margin-top:-.25rem;font-size:.875rem!important;font-weight:400;line-height:1.25!important}.algolia-autocomplete .algolia-docsearch-footer{float:none!important;width:auto!important;height:auto!important;padding:.75rem 1rem 0;font-size:.75rem!important;line-height:1!important;color:#767676!important;border-top:1px solid rgba(0,0,0,.1)}.algolia-autocomplete .algolia-docsearch-footer--logo{display:inline!important;overflow:visible!important;color:inherit!important;text-indent:0!important;background:0 0!important}.algolia-autocomplete .algolia-docsearch-suggestion--highlight{color:#5f2dab;background-color:rgba(154,132,187,.12)}.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight{box-shadow:inset 0 -2px 0 0 rgba(95,45,171,.5)!important}.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content{background-color:rgba(208,189,236,.15)!important} -/*# sourceMappingURL=docs.min.css.map */ \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/css/docs.min.css.map b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/css/docs.min.css.map deleted file mode 100644 index a3c581d6..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/css/docs.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../scss/docs.scss","assets/css/docs.min.css"],"names":[],"mappings":"AAAA;;;;;;ACOA,WACE,WAAY,KACZ,iBAAkB,QAClB,WAAY,EAAE,MAAO,KAAK,eAAmB,CAAE,MAAM,EAAE,KAAK,EAAE,eAGhE,4BACE,WACE,cAAe,MACf,aAAc,MAEhB,8BACE,UAAW,KACX,OAAQ,OACR,WAAY,OACZ,SAAU,OACV,UAAW,QAEb,0CACE,eAAgB,KAChB,WAAY,KACZ,YAAa,OACb,2BAA4B,OAIhC,yBACE,2DACE,WACE,SAAU,eACV,SAAU,OACV,IAAK,EACL,QAAS,OAKf,iCACE,cAAe,MACf,aAAc,MACd,MAAO,QAGT,wCAAyC,uCACvC,MAAO,KACP,iBAAkB,YAGpB,wCACE,YAAa,IAGf,2BACE,QAAS,aACT,MAAO,KACP,OAAQ,KACR,eAAgB,SAGlB,0BACE,UAAW,QAGb,iCACE,YAAa,IACb,MAAO,QACP,iBAAkB,YAClB,iBAAkB,wPAClB,kBAAmB,UACnB,oBAAqB,MAAM,MAC3B,gBAAiB,OAAO,OAG1B,aACE,SAAU,SACV,QAAS,KAAK,KAGhB,gBACE,YAAa,EAGf,kBACE,MAAO,KACP,QAAS,MAAM,KACf,UAAW,QACX,YAAa,IAGf,uBACE,WAAY,YACZ,cAAe,gBAGjB,yBACE,aACE,YAAa,KACb,eAAgB,KAElB,uBACE,cAAe,aAInB,yBACE,gBACE,UAAW,KAEb,uBACE,WAAY,gBAIhB,WACE,MAAO,KACP,OAAQ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sGACE,YAAa,iBACb,WAAY,iBACZ,WAAY,IAAI,MAAM,eAGxB,uFACE,QAAS,eAGX,2DACE,QAAS,MACT,QAAS,OAAO,eAChB,cAAe,YACf,UAAW,kBACX,YAAa,cAGf,0DACE,QAAS,EAAE,KAAK,gBAChB,WAAY,QACZ,UAAW,kBACX,YAAa,IACb,YAAa,eAGf,gDACE,MAAO,eACP,MAAO,eACP,OAAQ,eACR,QAAS,OAAO,KAAK,EACrB,UAAW,iBACX,YAAa,YACb,MAAO,kBACP,WAAY,IAAI,MAAM,eAGxB,sDACE,QAAS,iBACT,SAAU,kBACV,MAAO,kBACP,YAAa,YACb,WAAY,cAGd,+DACE,MAAO,QACP,iBAAkB,sBAGpB,mGACE,WAAY,MAAM,EAAE,KAAK,EAAE,EAAE,6BAG/B,sFACE,iBAAkB","sourcesContent":["/*!\n * Bootstrap Docs (https://getbootstrap.com)\n * Copyright 2011-2018 The Bootstrap Authors\n * Copyright 2011-2018 Twitter, Inc.\n * Licensed under the Creative Commons Attribution 3.0 Unported License. For\n * details, see https://creativecommons.org/licenses/by/3.0/.\n */\n\n// Dev notes\n//\n// Background information on nomenclature and architecture decisions here.\n//\n// - Bootstrap functions, variables, and mixins are included for easy reuse.\n// Doing so gives us access to the same core utilities provided by Bootstrap.\n// For example, consistent media queries through those mixins.\n//\n// - Bootstrap's **docs variables** are prefixed with `$bd-`.\n// These custom colors avoid collision with the components Bootstrap provides.\n//\n// - Classes are prefixed with `.bd-`.\n// These classes indicate custom-built or modified components for the design\n// and layout of the Bootstrap docs. They are not included in our builds.\n//\n// Happy Bootstrapping!\n\n// Load Bootstrap variables and mixins\n@import \"../../scss/functions\";\n@import \"../../scss/variables\";\n@import \"../../scss/mixins\";\n\n// Load docs components\n@import \"variables\";\n@import \"nav\";\n@import \"masthead\";\n@import \"ads\";\n@import \"content\";\n@import \"skiplink\";\n@import \"sidebar\";\n@import \"footer\";\n@import \"component-examples\";\n@import \"buttons\";\n@import \"callouts\";\n@import \"examples\";\n@import \"browser-bugs\";\n@import \"brand\";\n@import \"colors\";\n@import \"clipboard-js\";\n\n// Load docs dependencies\n@import \"syntax\";\n@import \"anchor\";\n@import \"algolia\";\n","/*!\n * Bootstrap Docs (https://getbootstrap.com)\n * Copyright 2011-2018 The Bootstrap Authors\n * Copyright 2011-2018 Twitter, Inc.\n * Licensed under the Creative Commons Attribution 3.0 Unported License. For\n * details, see https://creativecommons.org/licenses/by/3.0/.\n */\n.bd-navbar {\n min-height: 4rem;\n background-color: #563d7c;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.1);\n}\n\n@media (max-width: 991.98px) {\n .bd-navbar {\n padding-right: .5rem;\n padding-left: .5rem;\n }\n .bd-navbar .navbar-nav-scroll {\n max-width: 100%;\n height: 2.5rem;\n margin-top: .25rem;\n overflow: hidden;\n font-size: .875rem;\n }\n .bd-navbar .navbar-nav-scroll .navbar-nav {\n padding-bottom: 2rem;\n overflow-x: auto;\n white-space: nowrap;\n -webkit-overflow-scrolling: touch;\n }\n}\n\n@media (min-width: 768px) {\n @supports ((position: -webkit-sticky) or (position: sticky)) {\n .bd-navbar {\n position: -webkit-sticky;\n position: sticky;\n top: 0;\n z-index: 1071;\n }\n }\n}\n\n.bd-navbar .navbar-nav .nav-link {\n padding-right: .5rem;\n padding-left: .5rem;\n color: #cbbde2;\n}\n\n.bd-navbar .navbar-nav .nav-link.active, .bd-navbar .navbar-nav .nav-link:hover {\n color: #fff;\n background-color: transparent;\n}\n\n.bd-navbar .navbar-nav .nav-link.active {\n font-weight: 500;\n}\n\n.bd-navbar .navbar-nav-svg {\n display: inline-block;\n width: 1rem;\n height: 1rem;\n vertical-align: text-top;\n}\n\n.bd-navbar .dropdown-menu {\n font-size: .875rem;\n}\n\n.bd-navbar .dropdown-item.active {\n font-weight: 500;\n color: #212529;\n background-color: transparent;\n background-image: url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23292b2c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: .4rem .6rem;\n background-size: .75rem .75rem;\n}\n\n.bd-masthead {\n position: relative;\n padding: 3rem 15px;\n}\n\n.bd-masthead h1 {\n line-height: 1;\n}\n\n.bd-masthead .btn {\n width: 100%;\n padding: .8rem 2rem;\n font-size: 1.25rem;\n font-weight: 500;\n}\n\n.bd-masthead .carbonad {\n margin-top: 0 !important;\n margin-bottom: -3rem !important;\n}\n\n@media (min-width: 576px) {\n .bd-masthead {\n padding-top: 5rem;\n padding-bottom: 5rem;\n }\n .bd-masthead .carbonad {\n margin-bottom: 0 !important;\n }\n}\n\n@media (min-width: 768px) {\n .bd-masthead h1 {\n font-size: 4rem;\n }\n .bd-masthead .carbonad {\n margin-top: 3rem !important;\n }\n}\n\n.half-rule {\n width: 6rem;\n margin: 2.5rem 0;\n}\n\n.masthead-followup .bd-clipboard {\n display: none;\n}\n\n.masthead-followup .highlight {\n padding: .5rem 0;\n background-color: transparent;\n}\n\n#carbonads {\n position: static;\n display: block;\n max-width: 400px;\n padding: 15px 15px 15px 160px;\n margin: 2rem 0;\n overflow: hidden;\n font-size: 13px;\n line-height: 1.4;\n text-align: left;\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n#carbonads a {\n color: #333;\n text-decoration: none;\n}\n\n@media (min-width: 576px) {\n #carbonads {\n max-width: 330px;\n border-radius: 4px;\n }\n}\n\n.carbon-img {\n float: left;\n margin-left: -145px;\n}\n\n.carbon-poweredby {\n display: block;\n color: #777 !important;\n}\n\n.bd-content {\n -webkit-box-ordinal-group: 2;\n -ms-flex-order: 1;\n order: 1;\n}\n\n.bd-content > h2[id],\n.bd-content > h3[id],\n.bd-content > h4[id] {\n pointer-events: none;\n}\n\n.bd-content > h2[id] > div,\n.bd-content > h2[id] > a,\n.bd-content > h3[id] > div,\n.bd-content > h3[id] > a,\n.bd-content > h4[id] > div,\n.bd-content > h4[id] > a {\n pointer-events: auto;\n}\n\n.bd-content > h2[id]::before,\n.bd-content > h3[id]::before,\n.bd-content > h4[id]::before {\n display: block;\n height: 6rem;\n margin-top: -6rem;\n visibility: hidden;\n content: \"\";\n}\n\n.bd-content > table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 1rem;\n}\n\n@media (max-width: 991.98px) {\n .bd-content > table {\n display: block;\n overflow-x: auto;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n }\n .bd-content > table.table-bordered {\n border: 0;\n }\n}\n\n.bd-content > table > thead > tr > th,\n.bd-content > table > thead > tr > td,\n.bd-content > table > tbody > tr > th,\n.bd-content > table > tbody > tr > td,\n.bd-content > table > tfoot > tr > th,\n.bd-content > table > tfoot > tr > td {\n padding: 0.75rem;\n vertical-align: top;\n border: 1px solid #dee2e6;\n}\n\n.bd-content > table > thead > tr > th > p:last-child,\n.bd-content > table > thead > tr > td > p:last-child,\n.bd-content > table > tbody > tr > th > p:last-child,\n.bd-content > table > tbody > tr > td > p:last-child,\n.bd-content > table > tfoot > tr > th > p:last-child,\n.bd-content > table > tfoot > tr > td > p:last-child {\n margin-bottom: 0;\n}\n\n.bd-content > table td:first-child > code {\n white-space: nowrap;\n}\n\n.bd-content > h2:not(:first-child) {\n margin-top: 3rem;\n}\n\n.bd-content > h3 {\n margin-top: 1.5rem;\n}\n\n.bd-content > ul li,\n.bd-content > ol li {\n margin-bottom: .25rem;\n}\n\n@media (min-width: 992px) {\n .bd-content > ul,\n .bd-content > ol,\n .bd-content > p {\n max-width: 80%;\n }\n}\n\n.bd-title {\n margin-top: 1rem;\n margin-bottom: .5rem;\n font-weight: 300;\n}\n\n@media (min-width: 576px) {\n .bd-title {\n font-size: 3rem;\n }\n}\n\n.bd-lead {\n font-size: 1.125rem;\n font-weight: 300;\n}\n\n@media (min-width: 576px) {\n .bd-lead {\n max-width: 80%;\n margin-bottom: 1rem;\n font-size: 1.5rem;\n }\n}\n\n.bd-text-purple {\n color: #563d7c;\n}\n\n.bd-text-purple-bright {\n color: #7952b3;\n}\n\n#skippy {\n display: block;\n padding: 1em;\n color: #fff;\n background-color: #563d7c;\n outline: 0;\n}\n\n#skippy .skiplink-text {\n padding: .5em;\n outline: 1px dotted;\n}\n\n.bd-toc {\n -webkit-box-ordinal-group: 3;\n -ms-flex-order: 2;\n order: 2;\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n font-size: .875rem;\n}\n\n@supports ((position: -webkit-sticky) or (position: sticky)) {\n .bd-toc {\n position: -webkit-sticky;\n position: sticky;\n top: 4rem;\n height: calc(100vh - 4rem);\n overflow-y: auto;\n }\n}\n\n.section-nav {\n padding-left: 0;\n border-left: 1px solid #eee;\n}\n\n.section-nav ul {\n padding-left: 1rem;\n}\n\n.section-nav ul ul {\n display: none;\n}\n\n.toc-entry {\n display: block;\n}\n\n.toc-entry a {\n display: block;\n padding: .125rem 1.5rem;\n color: #99979c;\n}\n\n.toc-entry a:hover {\n color: #007bff;\n text-decoration: none;\n}\n\n.bd-sidebar {\n -webkit-box-ordinal-group: 1;\n -ms-flex-order: 0;\n order: 0;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n@media (min-width: 768px) {\n .bd-sidebar {\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n }\n @supports ((position: -webkit-sticky) or (position: sticky)) {\n .bd-sidebar {\n position: -webkit-sticky;\n position: sticky;\n top: 4rem;\n z-index: 1000;\n height: calc(100vh - 4rem);\n }\n }\n}\n\n@media (min-width: 1200px) {\n .bd-sidebar {\n -webkit-box-flex: 0;\n -ms-flex: 0 1 320px;\n flex: 0 1 320px;\n }\n}\n\n.bd-links {\n padding-top: 1rem;\n padding-bottom: 1rem;\n margin-right: -15px;\n margin-left: -15px;\n}\n\n@media (min-width: 768px) {\n @supports ((position: -webkit-sticky) or (position: sticky)) {\n .bd-links {\n max-height: calc(100vh - 9rem);\n overflow-y: auto;\n }\n }\n}\n\n@media (min-width: 768px) {\n .bd-links {\n display: block !important;\n }\n}\n\n.bd-search {\n position: relative;\n padding: 1rem 15px;\n margin-right: -15px;\n margin-left: -15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\n.bd-search .form-control:focus {\n border-color: #7952b3;\n box-shadow: 0 0 0 3px rgba(121, 82, 179, 0.25);\n}\n\n.bd-search-docs-toggle {\n line-height: 1;\n color: #212529;\n}\n\n.bd-sidenav {\n display: none;\n}\n\n.bd-toc-link {\n display: block;\n padding: .25rem 1.5rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.65);\n}\n\n.bd-toc-link:hover {\n color: rgba(0, 0, 0, 0.85);\n text-decoration: none;\n}\n\n.bd-toc-item.active {\n margin-bottom: 1rem;\n}\n\n.bd-toc-item.active:not(:first-child) {\n margin-top: 1rem;\n}\n\n.bd-toc-item.active > .bd-toc-link {\n color: rgba(0, 0, 0, 0.85);\n}\n\n.bd-toc-item.active > .bd-toc-link:hover {\n background-color: transparent;\n}\n\n.bd-toc-item.active > .bd-sidenav {\n display: block;\n}\n\n.bd-sidebar .nav > li > a {\n display: block;\n padding: .25rem 1.5rem;\n font-size: 90%;\n color: rgba(0, 0, 0, 0.65);\n}\n\n.bd-sidebar .nav > li > a:hover {\n color: rgba(0, 0, 0, 0.85);\n text-decoration: none;\n background-color: transparent;\n}\n\n.bd-sidebar .nav > .active > a,\n.bd-sidebar .nav > .active:hover > a {\n font-weight: 500;\n color: rgba(0, 0, 0, 0.85);\n background-color: transparent;\n}\n\n.bd-footer {\n font-size: 85%;\n text-align: center;\n background-color: #f7f7f7;\n}\n\n.bd-footer a {\n font-weight: 500;\n color: #495057;\n}\n\n.bd-footer a:hover, .bd-footer a:focus {\n color: #007bff;\n}\n\n.bd-footer p {\n margin-bottom: 0;\n}\n\n@media (min-width: 576px) {\n .bd-footer {\n text-align: left;\n }\n}\n\n.bd-footer-links {\n padding-left: 0;\n margin-bottom: 1rem;\n}\n\n.bd-footer-links li {\n display: inline-block;\n}\n\n.bd-footer-links li + li {\n margin-left: 1rem;\n}\n\n.bd-example-row .row > .col,\n.bd-example-row .row > [class^=\"col-\"] {\n padding-top: .75rem;\n padding-bottom: .75rem;\n background-color: rgba(86, 61, 124, 0.15);\n border: 1px solid rgba(86, 61, 124, 0.2);\n}\n\n.bd-example-row .row + .row {\n margin-top: 1rem;\n}\n\n.bd-example-row .flex-items-top,\n.bd-example-row .flex-items-middle,\n.bd-example-row .flex-items-bottom {\n min-height: 6rem;\n background-color: rgba(255, 0, 0, 0.1);\n}\n\n.bd-example-row-flex-cols .row {\n min-height: 10rem;\n background-color: rgba(255, 0, 0, 0.1);\n}\n\n.bd-highlight {\n background-color: rgba(86, 61, 124, 0.15);\n border: 1px solid rgba(86, 61, 124, 0.15);\n}\n\n.example-container {\n width: 800px;\n width: 100%;\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n}\n\n.example-row {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n margin-right: -15px;\n margin-left: -15px;\n}\n\n.example-content-main {\n position: relative;\n width: 100%;\n min-height: 1px;\n padding-right: 15px;\n padding-left: 15px;\n}\n\n@media (min-width: 576px) {\n .example-content-main {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n }\n}\n\n@media (min-width: 992px) {\n .example-content-main {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 66.666667%;\n flex: 0 0 66.666667%;\n max-width: 66.666667%;\n }\n}\n\n.example-content-secondary {\n position: relative;\n width: 100%;\n min-height: 1px;\n padding-right: 15px;\n padding-left: 15px;\n}\n\n@media (min-width: 576px) {\n .example-content-secondary {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n }\n}\n\n@media (min-width: 992px) {\n .example-content-secondary {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 33.333333%;\n flex: 0 0 33.333333%;\n max-width: 33.333333%;\n }\n}\n\n.bd-example-container {\n min-width: 16rem;\n max-width: 25rem;\n margin-right: auto;\n margin-left: auto;\n}\n\n.bd-example-container-header {\n height: 3rem;\n margin-bottom: .5rem;\n background-color: white;\n border-radius: .25rem;\n}\n\n.bd-example-container-sidebar {\n float: right;\n width: 4rem;\n height: 8rem;\n background-color: #80bdff;\n border-radius: .25rem;\n}\n\n.bd-example-container-body {\n height: 8rem;\n margin-right: 4.5rem;\n background-color: #957bbe;\n border-radius: .25rem;\n}\n\n.bd-example-container-fluid {\n max-width: none;\n}\n\n.bd-example {\n position: relative;\n padding: 1rem;\n margin: 1rem -15px 0;\n border: solid #f7f7f9;\n border-width: .2rem 0 0;\n}\n\n.bd-example::after {\n display: block;\n clear: both;\n content: \"\";\n}\n\n@media (min-width: 576px) {\n .bd-example {\n padding: 1.5rem;\n margin-right: 0;\n margin-left: 0;\n border-width: .2rem;\n }\n}\n\n.bd-example + .highlight,\n.bd-example + .clipboard + .highlight {\n margin-top: 0;\n}\n\n.bd-example + p {\n margin-top: 2rem;\n}\n\n.bd-example .pos-f-t {\n position: relative;\n margin: -1rem;\n}\n\n@media (min-width: 576px) {\n .bd-example .pos-f-t {\n margin: -1.5rem;\n }\n}\n\n.bd-example .custom-file-input:lang(es) ~ .custom-file-label::after {\n content: \"Elegir\";\n}\n\n.bd-example > .form-control + .form-control {\n margin-top: .5rem;\n}\n\n.bd-example > .nav + .nav,\n.bd-example > .alert + .alert,\n.bd-example > .navbar + .navbar,\n.bd-example > .progress + .progress,\n.bd-example > .progress + .btn {\n margin-top: 1rem;\n}\n\n.bd-example > .dropdown-menu:first-child {\n position: static;\n display: block;\n}\n\n.bd-example > .form-group:last-child {\n margin-bottom: 0;\n}\n\n.bd-example > .close {\n float: none;\n}\n\n.bd-example-type .table .type-info {\n color: #999;\n vertical-align: middle;\n}\n\n.bd-example-type .table td {\n padding: 1rem 0;\n border-color: #eee;\n}\n\n.bd-example-type .table tr:first-child td {\n border-top: 0;\n}\n\n.bd-example-type h1,\n.bd-example-type h2,\n.bd-example-type h3,\n.bd-example-type h4,\n.bd-example-type h5,\n.bd-example-type h6 {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.bd-example-bg-classes p {\n padding: 1rem;\n}\n\n.bd-example > img + img {\n margin-left: .5rem;\n}\n\n.bd-example > .btn-group {\n margin-top: .25rem;\n margin-bottom: .25rem;\n}\n\n.bd-example > .btn-toolbar + .btn-toolbar {\n margin-top: .5rem;\n}\n\n.bd-example-control-sizing select,\n.bd-example-control-sizing input[type=\"text\"] + input[type=\"text\"] {\n margin-top: .5rem;\n}\n\n.bd-example-form .input-group {\n margin-bottom: .5rem;\n}\n\n.bd-example > textarea.form-control {\n resize: vertical;\n}\n\n.bd-example > .list-group {\n max-width: 400px;\n}\n\n.bd-example .fixed-top,\n.bd-example .sticky-top {\n position: static;\n margin: -1rem -1rem 1rem;\n}\n\n.bd-example .fixed-bottom {\n position: static;\n margin: 1rem -1rem -1rem;\n}\n\n@media (min-width: 576px) {\n .bd-example .fixed-top,\n .bd-example .sticky-top {\n margin: -1.5rem -1.5rem 1rem;\n }\n .bd-example .fixed-bottom {\n margin: 1rem -1.5rem -1.5rem;\n }\n}\n\n.bd-example .pagination {\n margin-top: .5rem;\n margin-bottom: .5rem;\n}\n\n.modal {\n z-index: 1072;\n}\n\n.modal .tooltip,\n.modal .popover {\n z-index: 1073;\n}\n\n.modal-backdrop {\n z-index: 1071;\n}\n\n.bd-example-modal {\n background-color: #fafafa;\n}\n\n.bd-example-modal .modal {\n position: relative;\n top: auto;\n right: auto;\n bottom: auto;\n left: auto;\n z-index: 1;\n display: block;\n}\n\n.bd-example-modal .modal-dialog {\n left: auto;\n margin-right: auto;\n margin-left: auto;\n}\n\n.bd-example-tabs .nav-tabs {\n margin-bottom: 1rem;\n}\n\n.bd-example-popover-static {\n padding-bottom: 1.5rem;\n background-color: #f9f9f9;\n}\n\n.bd-example-popover-static .popover {\n position: relative;\n display: block;\n float: left;\n width: 260px;\n margin: 1.25rem;\n}\n\n.tooltip-demo a {\n white-space: nowrap;\n}\n\n.bd-example-tooltip-static .tooltip {\n position: relative;\n display: inline-block;\n margin: 10px 20px;\n opacity: 1;\n}\n\n.scrollspy-example {\n position: relative;\n height: 200px;\n margin-top: .5rem;\n overflow: auto;\n}\n\n.scrollspy-example-2 {\n position: relative;\n height: 350px;\n overflow: auto;\n}\n\n.bd-example-border-utils [class^=\"border\"] {\n display: inline-block;\n width: 5rem;\n height: 5rem;\n margin: .25rem;\n background-color: #f5f5f5;\n}\n\n.bd-example-border-utils-0 [class^=\"border\"] {\n border: 1px solid #dee2e6;\n}\n\n.highlight {\n padding: 1rem;\n margin-top: 1rem;\n margin-bottom: 1rem;\n background-color: #f7f7f9;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n}\n\n@media (min-width: 576px) {\n .highlight {\n padding: 1.5rem;\n }\n}\n\n.bd-content .highlight {\n margin-right: -15px;\n margin-left: -15px;\n}\n\n@media (min-width: 576px) {\n .bd-content .highlight {\n margin-right: 0;\n margin-left: 0;\n }\n}\n\n.highlight pre {\n padding: 0;\n margin-top: 0;\n margin-bottom: 0;\n background-color: transparent;\n border: 0;\n}\n\n.highlight pre code {\n font-size: inherit;\n color: #212529;\n}\n\n.btn-bd-primary {\n font-weight: 500;\n color: #7952b3;\n border-color: #7952b3;\n}\n\n.btn-bd-primary:hover, .btn-bd-primary:active {\n color: #fff;\n background-color: #7952b3;\n border-color: #7952b3;\n}\n\n.btn-bd-download {\n font-weight: 500;\n color: #ffe484;\n border-color: #ffe484;\n}\n\n.btn-bd-download:hover, .btn-bd-download:active {\n color: #2a2730;\n background-color: #ffe484;\n border-color: #ffe484;\n}\n\n.bd-callout {\n padding: 1.25rem;\n margin-top: 1.25rem;\n margin-bottom: 1.25rem;\n border: 1px solid #eee;\n border-left-width: .25rem;\n border-radius: .25rem;\n}\n\n.bd-callout h4 {\n margin-top: 0;\n margin-bottom: .25rem;\n}\n\n.bd-callout p:last-child {\n margin-bottom: 0;\n}\n\n.bd-callout code {\n border-radius: .25rem;\n}\n\n.bd-callout + .bd-callout {\n margin-top: -.25rem;\n}\n\n.bd-callout-info {\n border-left-color: #5bc0de;\n}\n\n.bd-callout-info h4 {\n color: #5bc0de;\n}\n\n.bd-callout-warning {\n border-left-color: #f0ad4e;\n}\n\n.bd-callout-warning h4 {\n color: #f0ad4e;\n}\n\n.bd-callout-danger {\n border-left-color: #d9534f;\n}\n\n.bd-callout-danger h4 {\n color: #d9534f;\n}\n\n.bd-examples .img-thumbnail {\n margin-bottom: .75rem;\n}\n\n.bd-examples h4 {\n margin-bottom: .25rem;\n}\n\n.bd-examples p {\n margin-bottom: 1.25rem;\n}\n\n@media (max-width: 480px) {\n .bd-examples {\n margin-right: -.75rem;\n margin-left: -.75rem;\n }\n .bd-examples > [class^=\"col-\"] {\n padding-right: .75rem;\n padding-left: .75rem;\n }\n}\n\n.bd-browser-bugs td p {\n margin-bottom: 0;\n}\n\n.bd-browser-bugs th:first-child {\n width: 18%;\n}\n\n.bd-brand-logos {\n display: table;\n width: 100%;\n margin-bottom: 1rem;\n overflow: hidden;\n color: #563d7c;\n background-color: #f9f9f9;\n border-radius: .25rem;\n}\n\n.bd-brand-item {\n padding: 4rem 0;\n text-align: center;\n}\n\n.bd-brand-item + .bd-brand-item {\n border-top: 1px solid #fff;\n}\n\n.bd-brand-logos .inverse {\n color: #fff;\n background-color: #563d7c;\n}\n\n.bd-brand-item h1,\n.bd-brand-item h3 {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.bd-brand-item .bd-booticon {\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 768px) {\n .bd-brand-item {\n display: table-cell;\n width: 1%;\n }\n .bd-brand-item + .bd-brand-item {\n border-top: 0;\n border-left: 1px solid #fff;\n }\n .bd-brand-item h1 {\n font-size: 4rem;\n }\n}\n\n.color-swatches {\n margin: 0 -5px;\n overflow: hidden;\n}\n\n.color-swatch {\n float: left;\n width: 4rem;\n height: 4rem;\n margin-right: .25rem;\n margin-left: .25rem;\n border-radius: .25rem;\n}\n\n@media (min-width: 768px) {\n .color-swatch {\n width: 6rem;\n height: 6rem;\n }\n}\n\n.color-swatches .bd-purple {\n background-color: #563d7c;\n}\n\n.color-swatches .bd-purple-light {\n background-color: #cbbde2;\n}\n\n.color-swatches .bd-purple-lighter {\n background-color: #e5e1ea;\n}\n\n.color-swatches .bd-gray {\n background-color: #f9f9f9;\n}\n\n.swatch-blue {\n color: #fff;\n background-color: #007bff;\n}\n\n.swatch-indigo {\n color: #fff;\n background-color: #6610f2;\n}\n\n.swatch-purple {\n color: #fff;\n background-color: #6f42c1;\n}\n\n.swatch-pink {\n color: #fff;\n background-color: #e83e8c;\n}\n\n.swatch-red {\n color: #fff;\n background-color: #dc3545;\n}\n\n.swatch-orange {\n color: #212529;\n background-color: #fd7e14;\n}\n\n.swatch-yellow {\n color: #212529;\n background-color: #ffc107;\n}\n\n.swatch-green {\n color: #fff;\n background-color: #28a745;\n}\n\n.swatch-teal {\n color: #fff;\n background-color: #20c997;\n}\n\n.swatch-cyan {\n color: #fff;\n background-color: #17a2b8;\n}\n\n.swatch-white {\n color: #212529;\n background-color: #fff;\n}\n\n.swatch-gray {\n color: #fff;\n background-color: #6c757d;\n}\n\n.swatch-gray-dark {\n color: #fff;\n background-color: #343a40;\n}\n\n.swatch-primary {\n color: #fff;\n background-color: #007bff;\n}\n\n.swatch-secondary {\n color: #fff;\n background-color: #6c757d;\n}\n\n.swatch-success {\n color: #fff;\n background-color: #28a745;\n}\n\n.swatch-info {\n color: #fff;\n background-color: #17a2b8;\n}\n\n.swatch-warning {\n color: #212529;\n background-color: #ffc107;\n}\n\n.swatch-danger {\n color: #fff;\n background-color: #dc3545;\n}\n\n.swatch-light {\n color: #212529;\n background-color: #f8f9fa;\n}\n\n.swatch-dark {\n color: #fff;\n background-color: #343a40;\n}\n\n.swatch-100 {\n color: #212529;\n background-color: #f8f9fa;\n}\n\n.swatch-200 {\n color: #212529;\n background-color: #e9ecef;\n}\n\n.swatch-300 {\n color: #212529;\n background-color: #dee2e6;\n}\n\n.swatch-400 {\n color: #212529;\n background-color: #ced4da;\n}\n\n.swatch-500 {\n color: #212529;\n background-color: #adb5bd;\n}\n\n.swatch-600 {\n color: #fff;\n background-color: #6c757d;\n}\n\n.swatch-700 {\n color: #fff;\n background-color: #495057;\n}\n\n.swatch-800 {\n color: #fff;\n background-color: #343a40;\n}\n\n.swatch-900 {\n color: #fff;\n background-color: #212529;\n}\n\n.bd-clipboard {\n position: relative;\n display: none;\n float: right;\n}\n\n.bd-clipboard + .highlight {\n margin-top: 0;\n}\n\n.btn-clipboard {\n position: absolute;\n top: .5rem;\n right: .5rem;\n z-index: 10;\n display: block;\n padding: .25rem .5rem;\n font-size: 75%;\n color: #818a91;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n border-radius: .25rem;\n}\n\n.btn-clipboard:hover {\n color: #fff;\n background-color: #027de7;\n}\n\n@media (min-width: 768px) {\n .bd-clipboard {\n display: block;\n }\n}\n\n.hll {\n background-color: #ffc;\n}\n\n.c {\n color: #999;\n}\n\n.k {\n color: #069;\n}\n\n.o {\n color: #555;\n}\n\n.cm {\n color: #999;\n}\n\n.cp {\n color: #099;\n}\n\n.c1 {\n color: #999;\n}\n\n.cs {\n color: #999;\n}\n\n.gd {\n background-color: #fcc;\n border: 1px solid #c00;\n}\n\n.ge {\n font-style: italic;\n}\n\n.gr {\n color: #f00;\n}\n\n.gh {\n color: #030;\n}\n\n.gi {\n background-color: #cfc;\n border: 1px solid #0c0;\n}\n\n.go {\n color: #aaa;\n}\n\n.gp {\n color: #009;\n}\n\n.gu {\n color: #030;\n}\n\n.gt {\n color: #9c6;\n}\n\n.kc {\n color: #069;\n}\n\n.kd {\n color: #069;\n}\n\n.kn {\n color: #069;\n}\n\n.kp {\n color: #069;\n}\n\n.kr {\n color: #069;\n}\n\n.kt {\n color: #078;\n}\n\n.m {\n color: #f60;\n}\n\n.s {\n color: #d44950;\n}\n\n.na {\n color: #4f9fcf;\n}\n\n.nb {\n color: #366;\n}\n\n.nc {\n color: #0a8;\n}\n\n.no {\n color: #360;\n}\n\n.nd {\n color: #99f;\n}\n\n.ni {\n color: #999;\n}\n\n.ne {\n color: #c00;\n}\n\n.nf {\n color: #c0f;\n}\n\n.nl {\n color: #99f;\n}\n\n.nn {\n color: #0cf;\n}\n\n.nt {\n color: #2f6f9f;\n}\n\n.nv {\n color: #033;\n}\n\n.ow {\n color: #000;\n}\n\n.w {\n color: #bbb;\n}\n\n.mf {\n color: #f60;\n}\n\n.mh {\n color: #f60;\n}\n\n.mi {\n color: #f60;\n}\n\n.mo {\n color: #f60;\n}\n\n.sb {\n color: #c30;\n}\n\n.sc {\n color: #c30;\n}\n\n.sd {\n font-style: italic;\n color: #c30;\n}\n\n.s2 {\n color: #c30;\n}\n\n.se {\n color: #c30;\n}\n\n.sh {\n color: #c30;\n}\n\n.si {\n color: #a00;\n}\n\n.sx {\n color: #c30;\n}\n\n.sr {\n color: #3aa;\n}\n\n.s1 {\n color: #c30;\n}\n\n.ss {\n color: #fc3;\n}\n\n.bp {\n color: #366;\n}\n\n.vc {\n color: #033;\n}\n\n.vg {\n color: #033;\n}\n\n.vi {\n color: #033;\n}\n\n.il {\n color: #f60;\n}\n\n.css .o,\n.css .o + .nt,\n.css .nt + .nt {\n color: #999;\n}\n\n.language-bash::before,\n.language-sh::before {\n color: #009;\n content: \"$ \";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.language-powershell::before {\n color: #009;\n content: \"PM> \";\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.anchorjs-link {\n font-weight: 400;\n color: rgba(0, 123, 255, 0.5);\n transition: color .16s linear;\n}\n\n.anchorjs-link:hover {\n color: #007bff;\n text-decoration: none;\n}\n\n.algolia-autocomplete {\n display: block !important;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n\n.algolia-autocomplete .ds-dropdown-menu {\n width: 100%;\n min-width: 0 !important;\n max-width: none !important;\n padding: .75rem 0 !important;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);\n}\n\n@media (min-width: 768px) {\n .algolia-autocomplete .ds-dropdown-menu {\n width: 175%;\n }\n}\n\n.algolia-autocomplete .ds-dropdown-menu::before {\n display: none !important;\n}\n\n.algolia-autocomplete .ds-dropdown-menu [class^=\"ds-dataset-\"] {\n padding: 0 !important;\n overflow: visible !important;\n background-color: transparent !important;\n border: 0 !important;\n}\n\n.algolia-autocomplete .ds-dropdown-menu .ds-suggestions {\n margin-top: 0 !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion {\n padding: 0 !important;\n overflow: visible !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--category-header {\n padding: .125rem 1rem !important;\n margin-top: 0 !important;\n font-size: .875rem !important;\n font-weight: 500 !important;\n color: #7952b3 !important;\n border-bottom: 0 !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--wrapper {\n float: none !important;\n padding-top: 0 !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {\n float: none !important;\n width: auto !important;\n padding: 0 !important;\n text-align: left !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--content {\n float: none !important;\n width: auto !important;\n padding: 0 !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--content::before {\n display: none !important;\n}\n\n.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header {\n padding-top: .75rem !important;\n margin-top: .75rem !important;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column {\n display: none !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--title {\n display: block;\n padding: .25rem 1rem !important;\n margin-bottom: 0 !important;\n font-size: .875rem !important;\n font-weight: 400 !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--text {\n padding: 0 1rem .5rem !important;\n margin-top: -.25rem;\n font-size: .875rem !important;\n font-weight: 400;\n line-height: 1.25 !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-footer {\n float: none !important;\n width: auto !important;\n height: auto !important;\n padding: .75rem 1rem 0;\n font-size: .75rem !important;\n line-height: 1 !important;\n color: #767676 !important;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n.algolia-autocomplete .algolia-docsearch-footer--logo {\n display: inline !important;\n overflow: visible !important;\n color: inherit !important;\n text-indent: 0 !important;\n background: none !important;\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--highlight {\n color: #5f2dab;\n background-color: rgba(154, 132, 187, 0.12);\n}\n\n.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {\n box-shadow: inset 0 -2px 0 0 rgba(95, 45, 171, 0.5) !important;\n}\n\n.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {\n background-color: rgba(208, 189, 236, 0.15) !important;\n}\n/*# sourceMappingURL=docs.min.css.map */"]} \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/bootstrap-stack.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/bootstrap-stack.png deleted file mode 100644 index 7cae17fe..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/bootstrap-stack.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/bootstrap-themes.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/bootstrap-themes.png deleted file mode 100644 index 3876a18e..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/bootstrap-themes.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/android-chrome-192x192.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/android-chrome-192x192.png deleted file mode 100644 index 547386f3..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/android-chrome-192x192.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/android-chrome-512x512.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/android-chrome-512x512.png deleted file mode 100644 index eae76488..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/android-chrome-512x512.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/apple-touch-icon.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/apple-touch-icon.png deleted file mode 100644 index 447cec2c..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/apple-touch-icon.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/browserconfig.xml b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/browserconfig.xml deleted file mode 100644 index 8b193171..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/browserconfig.xml +++ /dev/null @@ -1,11 +0,0 @@ ---- ---- - - - - - - #563d7c - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/favicon-16x16.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/favicon-16x16.png deleted file mode 100644 index 5f7d1188..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/favicon-16x16.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/favicon-32x32.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/favicon-32x32.png deleted file mode 100644 index d752fd5d..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/favicon-32x32.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/manifest.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/manifest.json deleted file mode 100644 index 14cd5241..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/manifest.json +++ /dev/null @@ -1,22 +0,0 @@ ---- ---- -{ - "name": "Bootstrap", - "short_name": "Bootstrap", - "icons": [ - { - "src": "{{ site.baseurl }}/assets/img/favicons/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "{{ site.baseurl }}/assets/img/favicons/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image/png" - } - ], - "start_url": "/", - "theme_color": "#563d7c", - "background_color": "#563d7c", - "display": "standalone" -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-144x144.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-144x144.png deleted file mode 100644 index 262a3c2e..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-144x144.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-150x150.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-150x150.png deleted file mode 100644 index bb87faf7..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-150x150.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-310x150.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-310x150.png deleted file mode 100644 index 2fc36a72..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-310x150.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-310x310.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-310x310.png deleted file mode 100644 index 7f00d0c6..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-310x310.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-70x70.png b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-70x70.png deleted file mode 100644 index 4da2de9e..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/mstile-70x70.png and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/safari-pinned-tab.svg b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/safari-pinned-tab.svg deleted file mode 100644 index 086866a1..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/img/favicons/safari-pinned-tab.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/.eslintrc.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/.eslintrc.json deleted file mode 100644 index 7ea25a91..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "env": { - "es6": false, - "jquery": true - }, - "parserOptions": { - "ecmaVersion": 5, - "sourceType": "script" - }, - "extends": "../../.eslintrc.json", - "rules": { - // Best Practices - "no-magic-numbers": "off", - "vars-on-top": "off", - - // Stylistic Issues - "spaced-comment": "off", - - // ECMAScript 6 - "no-var": "off", - "object-shorthand": "off", - "prefer-arrow-callback": "off", - "prefer-template": "off", - "prefer-rest-params": "off" - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/docs.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/docs.min.js deleted file mode 100644 index 0326eb3c..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/docs.min.js +++ /dev/null @@ -1,28 +0,0 @@ -!function(e,t){"use strict";"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():(e.AnchorJS=t(),e.anchors=new e.AnchorJS)}(this,function(){"use strict";return function(e){function t(e){e.icon=e.hasOwnProperty("icon")?e.icon:"",e.visible=e.hasOwnProperty("visible")?e.visible:"hover",e.placement=e.hasOwnProperty("placement")?e.placement:"right",e.ariaLabel=e.hasOwnProperty("ariaLabel")?e.ariaLabel:"Anchor",e.class=e.hasOwnProperty("class")?e.class:"",e.truncate=e.hasOwnProperty("truncate")?Math.floor(e.truncate):64}function n(e){var t;if("string"==typeof e||e instanceof String)t=[].slice.call(document.querySelectorAll(e));else{if(!(Array.isArray(e)||e instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");t=[].slice.call(e)}return t}function r(){if(null===document.head.querySelector("style.anchorjs")){var e,t=document.createElement("style");t.className="anchorjs",t.appendChild(document.createTextNode("")),void 0===(e=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(t):document.head.insertBefore(t,e),t.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",t.sheet.cssRules.length),t.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",t.sheet.cssRules.length),t.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",t.sheet.cssRules.length),t.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',t.sheet.cssRules.length)}}this.options=e||{},this.elements=[],t(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(e){var i,o,a,s,l,c,u,h,d,f,A,p=[];if(t(this.options),"touch"===(A=this.options.visible)&&(A=this.isTouchDevice()?"always":"hover"),e||(e="h2, h3, h4, h5, h6"),0===(i=n(e)).length)return this;for(r(),o=document.querySelectorAll("[id]"),a=[].map.call(o,function(e){return e.id}),l=0;l\]\.\/\(\)\*\\]/g;return this.options.truncate||t(this.options),e.trim().replace(/\'/gi,"").replace(n,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(e){var t=e.firstChild&&(" "+e.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,n=e.lastChild&&(" "+e.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return t||n||!1}}}); -/*! - * clipboard.js v1.7.1 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function e(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function e(){var t=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=r+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function e(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function e(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function e(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function e(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function e(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function e(){this.removeFake()}},{key:"action",set:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function e(){return this._action}},{key:"target",set:function e(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function e(){return this._target}}]),e}();e.exports=s})},{select:5}],8:[function(t,n,r){!function(i,o){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],o);else if(void 0!==r)o(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var a={exports:{}};o(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(e,t,n,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var c=i(t),u=i(n),h=i(r),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function e(t){var n=this;this.listener=(0,h.default)(t,"click",function(e){return n.onClick(e)})}},{key:"onClick",value:function e(t){var n=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c.default({action:this.action(n),target:this.target(n),text:this.text(n),container:this.container,trigger:n,emitter:this})}},{key:"defaultAction",value:function e(t){return l("action",t)}},{key:"defaultTarget",value:function e(t){var n=l("target",t);if(n)return document.querySelector(n)}},{key:"defaultText",value:function e(t){return l("text",t)}},{key:"destroy",value:function e(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],n="string"==typeof t?[t]:t,r=!!document.queryCommandSupported;return n.forEach(function(e){r=r&&!!document.queryCommandSupported(e)}),r}}]),t}(u.default);e.exports=A})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}); -/*! - -Holder - client side image placeholders -Version 2.9.4+cabil -© 2016 Ivan Malopinsky - http://imsky.co - -Site: http://holderjs.com -Issues: https://github.com/imsky/holder/issues -License: MIT - -*/ -!function(e){if(e.document){var t=e.document;t.querySelectorAll||(t.querySelectorAll=function(n){var r,i=t.createElement("style"),o=[];for(t.documentElement.firstChild.appendChild(i),t._qsa=[],i.styleSheet.cssText=n+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",e.scrollBy(0,0),i.parentNode.removeChild(i);t._qsa.length;)r=t._qsa.shift(),r.style.removeAttribute("x-qsa"),o.push(r);return t._qsa=null,o}),t.querySelector||(t.querySelector=function(e){var n=t.querySelectorAll(e);return n.length?n[0]:null}),t.getElementsByClassName||(t.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),t.querySelectorAll(e)}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw TypeError("Object.keys called on non-object");var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e){if(void 0===this||null===this)throw TypeError();var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw TypeError();var r,i=arguments[1];for(r=0;r>16&255)),i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o)),a=0,o=0),r+=1;return 12===a?(o>>=4,i.push(String.fromCharCode(255&o))):18===a&&(o>>=2,i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o))),i.join("")},e.btoa=e.btoa||function(e){e=String(e);var n,r,i,o,a,s,l,c=0,u=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;c>2,a=(3&n)<<4|r>>4,s=(15&r)<<2|i>>6,l=63&i,c===e.length+2?(s=64,l=64):c===e.length+1&&(l=64),u.push(t.charAt(o),t.charAt(a),t.charAt(s),t.charAt(l));return u.join("")}}(e),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(e){var t=this.__proto__||this.constructor.prototype;return e in this&&(!(e in t)||t[e]!==this[e])}),function(){if("performance"in e==!1&&(e.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in e.performance==!1){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),e.performance.now=function(){return Date.now()-t}}}(),e.requestAnimationFrame||(e.webkitRequestAnimationFrame&&e.webkitCancelAnimationFrame?!function(e){e.requestAnimationFrame=function(t){return webkitRequestAnimationFrame(function(){t(e.performance.now())})},e.cancelAnimationFrame=e.webkitCancelAnimationFrame}(e):e.mozRequestAnimationFrame&&e.mozCancelAnimationFrame?!function(e){e.requestAnimationFrame=function(t){return mozRequestAnimationFrame(function(){t(e.performance.now())})},e.cancelAnimationFrame=e.mozCancelAnimationFrame}(e):!function(e){e.requestAnimationFrame=function(t){return e.setTimeout(t,1e3/60)},e.cancelAnimationFrame=e.clearTimeout}(e))}}(this),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Holder=t():e.Holder=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){(function(t){function r(e,t,n,r){var a=i(n.substr(n.lastIndexOf(e.domain)),e);a&&o({mode:null,el:r,flags:a,engineSettings:t})}function i(e,t){var n={theme:k(M.settings.themes.gray,null),stylesheets:t.stylesheets,instanceOptions:t},r=e.indexOf("?"),i=[e];r!==-1&&(i=[e.slice(0,r),e.slice(r+1)]);var o=i[0].split("/");n.holderURL=e;var a=o[1],s=a.match(/([\d]+p?)x([\d]+p?)/);if(!s)return!1;if(n.fluid=a.indexOf("p")!==-1,n.dimensions={width:s[1].replace("p","%"),height:s[2].replace("p","%")},2===i.length){var l=m.parse(i[1]);if(y.truthy(l.ratio)){n.fluid=!0;var c=parseFloat(n.dimensions.width.replace("%","")),u=parseFloat(n.dimensions.height.replace("%",""));u=Math.floor(100*(u/c)),c=100,n.dimensions.width=c+"%",n.dimensions.height=u+"%"}if(n.auto=y.truthy(l.auto),l.bg&&(n.theme.bg=y.parseColor(l.bg)),l.fg&&(n.theme.fg=y.parseColor(l.fg)),l.bg&&!l.fg&&(n.autoFg=!0),l.theme&&n.instanceOptions.themes.hasOwnProperty(l.theme)&&(n.theme=k(n.instanceOptions.themes[l.theme],null)),l.text&&(n.text=l.text),l.textmode&&(n.textmode=l.textmode),l.size&&(n.size=l.size),l.font&&(n.font=l.font),l.align&&(n.align=l.align),l.lineWrap&&(n.lineWrap=l.lineWrap),n.nowrap=y.truthy(l.nowrap),n.outline=y.truthy(l.outline),y.truthy(l.random)){M.vars.cache.themeKeys=M.vars.cache.themeKeys||Object.keys(n.instanceOptions.themes);var h=M.vars.cache.themeKeys[0|Math.random()*M.vars.cache.themeKeys.length];n.theme=k(n.instanceOptions.themes[h],null)}}return n}function o(e){var t=e.mode,n=e.el,r=e.flags,i=e.engineSettings,o=r.dimensions,s=r.theme,l=o.width+"x"+o.height;t=null==t?r.fluid?"fluid":"image":t;var h=/holder_([a-z]+)/g,d=!1;if(null!=r.text&&(s.text=r.text,"object"===n.nodeName.toLowerCase())){for(var f=s.text.split("\\n"),A=0;A1){var b,w=0,E=0,S=0;y=new s.Group("line"+S),"left"!==e.align&&"right"!==e.align||(o=e.width*(1-2*(1-r)));for(var C=0;C=o||T===!0)&&(t(p,y,w,p.properties.leading),p.add(y),w=0,E+=p.properties.leading,S+=1,y=new s.Group("line"+S),y.y=E),T!==!0&&(m.moveTo(w,0),w+=g.spaceWidth+k.width,y.add(m))}if(t(p,y,w,p.properties.leading),p.add(y),"left"===e.align)p.moveTo(e.width-i,null,null);else if("right"===e.align){for(b in p.children)y=p.children[b],y.moveTo(e.width-y.width,null,null);p.moveTo(0-(e.width-i),null,null)}else{for(b in p.children)y=p.children[b],y.moveTo((p.width-y.width)/2,null,null);p.moveTo((e.width-p.width)/2,null,null)}p.moveTo(null,(e.height-p.height)/2,null),(e.height-p.height)/2<0&&p.moveTo(null,0,null)}else m=new s.Text(e.text),y=new s.Group("line0"),y.add(m),p.add(y),"left"===e.align?p.moveTo(e.width-i,null,null):"right"===e.align?p.moveTo(0-(e.width-i),null,null):p.moveTo((e.width-g.boundingBox.width)/2,null,null),p.moveTo(null,(e.height-g.boundingBox.height)/2,null);return a}function l(e,t,n,r){var i=parseInt(e,10),o=parseInt(t,10),a=Math.max(i,o),s=Math.min(i,o),l=.8*Math.min(s,a*r);return Math.round(Math.max(n,l))}function c(e){var t;t=null==e||null==e.nodeType?M.vars.resizableImages:[e];for(var n=0,r=t.length;n1){n.nodeValue="";for(var m=0;m=0?t:1)}function o(e){w?i(e):x.push(e)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function e(){document.removeEventListener("DOMContentLoaded",e,!1),document.readyState="complete"},!1),document.readyState="loading");var a=e.document,s=a.documentElement,l="load",c=!1,u="on"+l,h="complete",d="readyState",f="attachEvent",A="detachEvent",p="addEventListener",g="DOMContentLoaded",m="onreadystatechange",v="removeEventListener",y=p in a,b=c,w=c,x=[];if(a[d]===h)i(t);else if(y)a[p](g,n,c),e[p](l,n,c);else{a[f](m,n),e[f](u,n);try{b=null==e.frameElement&&s}catch(e){}b&&b.doScroll&&!function e(){if(!w){try{b.doScroll("left")}catch(t){return i(e,50)}r(),t()}}()}return o.version="1.4.0",o.isReady=function(){return w},o}e.exports="undefined"!=typeof window&&n(window)},function(e,t,n){var r=encodeURIComponent,i=decodeURIComponent,o=n(4),a=n(5),s=/(\w+)\[(\d+)\]/,l=/\w+\.\w+/;t.parse=function(e){if("string"!=typeof e)return{};if(e=o(e),""===e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),r=0;r=0;r--)n=e.charCodeAt(r),n>128?t.unshift(["&#",n,";"].join("")):t.unshift(e[r]);return t.join("")},t.imageExists=function(e,t){var n=new Image;n.onerror=function(){t.call(this,!1)},n.onload=function(){t.call(this,!0)},n.src=e},t.decodeHtmlEntity=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)})},t.dimensionCheck=function(e){var t={height:e.clientHeight,width:e.clientWidth};return!(!t.height||!t.width)&&t},t.truthy=function(e){return"string"==typeof e?"true"===e||"yes"===e||"1"===e||"on"===e||"✓"===e:!!e},t.parseColor=function(e){var t,n=/(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i,r=/^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,i=/^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/,o=e.match(n);return null!==o?(t=o[1]||o[2],"#"!==t[0]?"#"+t:t):(o=e.match(r),null!==o?t="rgb("+o.slice(1).join(",")+")":(o=e.match(i),null!==o?t="rgba("+o.slice(1).join(",")+")":null))},t.canvasRatio=function(){var t=1,n=1;if(e.document){var r=e.document.createElement("canvas");if(r.getContext){var i=r.getContext("2d");t=e.devicePixelRatio||1,n=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1}}return t/n}}).call(t,function(){return this}())},function(e,t,n){(function(e){var r=n(9),i="http://www.w3.org/2000/svg",o=8;t.initSVG=function(e,t,n){var a,s,l=!1;e&&e.querySelector?(s=e.querySelector("style"),null===s&&(l=!0)):(e=r.newEl("svg",i),l=!0),l&&(a=r.newEl("defs",i),s=r.newEl("style",i),r.setAttr(s,{type:"text/css"}),a.appendChild(s),e.appendChild(a)),e.webkitMatchesSelector&&e.setAttribute("xmlns",i);for(var c=0;c=0;l--){var c=s.createProcessingInstruction("xml-stylesheet",'href="'+a[l]+'" rel="stylesheet"');s.insertBefore(c,s.firstChild)}s.removeChild(s.documentElement),o=i.serializeToString(s)}var u=i.serializeToString(t);return u=u.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),o+u}}}).call(t,function(){return this}())},function(e,t){(function(e){t.newEl=function(t,n){if(e.document)return null==n?e.document.createElement(t):e.document.createElementNS(n,t)},t.setAttr=function(e,t){for(var n in t)e.setAttribute(n,t[n])},t.createXML=function(){if(e.DOMParser)return(new DOMParser).parseFromString("","application/xml")},t.getNodeArray=function(t){var n=null;return"string"==typeof t?n=document.querySelectorAll(t):e.NodeList&&t instanceof e.NodeList?n=t:e.Node&&t instanceof e.Node?n=[t]:e.HTMLCollection&&t instanceof e.HTMLCollection?n=t:t instanceof Array?n=t:null===t&&(n=[]),n=Array.prototype.slice.call(n)}}).call(t,function(){return this}())},function(e,t){var n=function(e,t){"string"==typeof e&&(this.original=e,"#"===e.charAt(0)&&(e=e.slice(1)),/[^a-f0-9]+/i.test(e)||(3===e.length&&(e=e.replace(/./g,"$&$&")),6===e.length&&(this.alpha=1,t&&t.alpha&&(this.alpha=t.alpha),this.set(parseInt(e,16)))))};n.rgb2hex=function(e,t,n){function r(e){var t=(0|e).toString(16);return e<16&&(t="0"+t),t}return[e,t,n].map(r).join("")},n.hsl2rgb=function(e,t,n){var r=e/60,i=(1-Math.abs(2*n-1))*t,o=i*(1-Math.abs(parseInt(r)%2-1)),a=n-i/2,s=0,l=0,c=0;return r>=0&&r<1?(s=i,l=o):r>=1&&r<2?(s=o,l=i):r>=2&&r<3?(l=i,c=o):r>=3&&r<4?(l=o,c=i):r>=4&&r<5?(s=o,c=i):r>=5&&r<6&&(s=i,c=o),s+=a,l+=a,c+=a,s=parseInt(255*s),l=parseInt(255*l),c=parseInt(255*c),[s,l,c]},n.prototype.set=function(e){this.raw=e;var t=(16711680&this.raw)>>16,n=(65280&this.raw)>>8,r=255&this.raw,i=.2126*t+.7152*n+.0722*r,o=-.09991*t-.33609*n+.436*r,a=.615*t-.55861*n-.05639*r;return this.rgb={r:t,g:n,b:r},this.yuv={y:i,u:o,v:a},this},n.prototype.lighten=function(e){var t=Math.min(1,Math.max(0,Math.abs(e)))*(e<0?-1:1),r=255*t|0,i=Math.min(255,Math.max(0,this.rgb.r+r)),o=Math.min(255,Math.max(0,this.rgb.g+r)),a=Math.min(255,Math.max(0,this.rgb.b+r)),s=n.rgb2hex(i,o,a);return new n(s)},n.prototype.toHex=function(e){return(e?"#":"")+this.raw.toString(16)},n.prototype.lighterThan=function(e){return e instanceof n||(e=new n(e)),this.yuv.y>e.yuv.y},n.prototype.blendAlpha=function(e){e instanceof n||(e=new n(e));var t=e,r=this,i=t.alpha*t.rgb.r+(1-t.alpha)*r.rgb.r,o=t.alpha*t.rgb.g+(1-t.alpha)*r.rgb.g,a=t.alpha*t.rgb.b+(1-t.alpha)*r.rgb.b;return new n(n.rgb2hex(i,o,a))},e.exports=n},function(e,t){e.exports={version:"2.9.4",svg_ns:"http://www.w3.org/2000/svg"}},function(e,t,n){function r(e,t){return h.element({tag:t,width:e.width,height:e.height,fill:e.properties.fill})}function i(e){return c.cssProps({fill:e.fill,"font-weight":e.font.weight,"font-family":e.font.family+", monospace","font-size":e.font.size+e.font.units})}function o(e,t,n){var r=n/2;return["M",r,r,"H",e-r,"V",t-r,"H",r,"V",0,"M",0,r,"L",e,t-r,"M",0,t-r,"L",e,r].join(" ")}var a=n(13),s=n(8),l=n(11),c=n(7),u=l.svg_ns,h={element:function(e){var t=e.tag,n=e.content||"";return delete e.tag,delete e.content,[t,n,e]}};e.exports=function(e,t){var n=t.engineSettings,l=n.stylesheets,c=l.map(function(e){return''}).join("\n"),d="holder_"+Number(new Date).toString(16),f=e.root,A=f.children.holderTextGroup,p="#"+d+" text { "+i(A.properties)+" } ";A.y+=.8*A.textPositionData.boundingBox.height;var g=[];Object.keys(A.children).forEach(function(e){var t=A.children[e];Object.keys(t.children).forEach(function(e){var n=t.children[e],r=A.x+t.x+n.x,i=A.y+t.y+n.y,o=h.element({tag:"text",content:n.properties.text,x:r,y:i});g.push(o)})});var m=h.element({tag:"g",content:g}),v=null;if(f.children.holderBg.properties.outline){var y=f.children.holderBg.properties.outline;v=h.element({tag:"path",d:o(f.children.holderBg.width,f.children.holderBg.height,y.width),"stroke-width":y.width,stroke:y.fill,fill:"none"})}var b=r(f.children.holderBg,"rect"),w=[];w.push(b),y&&w.push(v),w.push(m);var x=h.element({tag:"g",id:d,content:w}),E=h.element({tag:"style",content:p,type:"text/css"}),S=h.element({tag:"defs",content:E}),C=h.element({tag:"svg",content:[S,x],width:f.properties.width,height:f.properties.height,xmlns:u,viewBox:[0,0,f.properties.width,f.properties.height].join(" "),preserveAspectRatio:"none"}),k=a(C);k=c+k[0];var T=s.svgStringToDataURI(k,"background"===t.mode);return T}},function(e,t,n){n(14);e.exports=function e(t,n,r){"use strict";function i(e){var t=e.match(/^[\w-]+/),n={tag:t?t[0]:"div",attr:{},children:[]},i=e.match(/#([\w-]+)/),o=e.match(/\$([\w-]+)/),a=e.match(/\.[\w-]+/g);return i&&(n.attr.id=i[1],r[i[1]]=n),o&&(r[o[1]]=n),a&&(n.attr["class"]=a.join(" ").replace(/\./g,"")),e.match(/&$/g)&&(f=!1),n}function o(e,t){if(null!==t&&t!==!1&&void 0!==t)return"string"!=typeof t&&"object"!=typeof t?String(t):t}function a(e){return e||0===e?String(e).replace(/&/g,"&").replace(/"/g,"""):""}function s(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}var l,c,u,h,d=1,f=!0;if(r=r||{},"string"==typeof t[0])t[0]=i(t[0]);else{if(!Array.isArray(t[0]))throw new Error("First element of array must be a string, or an array and not "+JSON.stringify(t[0]));d=0}for(;d",t[0]=l}return r[0]=t[0],u&&u(t[0]),r}},function(e,t){"use strict";function n(e){var t=""+e,n=r.exec(t);if(!n)return t;var i,o="",a=0,s=0;for(a=n.index;a]/;e.exports=n},function(e,t,n){var r=n(9),i=n(7);e.exports=function(){var e=r.newEl("canvas"),t=null;return function(n){null==t&&(t=e.getContext("2d"));var r=i.canvasRatio(),o=n.root;e.width=r*o.properties.width,e.height=r*o.properties.height,t.textBaseline="middle";var a=o.children.holderBg,s=r*a.width,l=r*a.height,c=2,u=c/2;t.fillStyle=a.properties.fill,t.fillRect(0,0,s,l),a.properties.outline&&(t.strokeStyle=a.properties.outline.fill,t.lineWidth=a.properties.outline.width,t.moveTo(u,u),t.lineTo(s-u,u),t.lineTo(s-u,l-u),t.lineTo(u,l-u),t.lineTo(u,u),t.moveTo(0,u),t.lineTo(s,l-u),t.moveTo(0,l-u),t.lineTo(s,u),t.stroke());var h=o.children.holderTextGroup;t.font=h.properties.font.weight+" "+r*h.properties.font.size+h.properties.font.units+" "+h.properties.font.family+", monospace",t.fillStyle=h.properties.fill;for(var d in h.children){var f=h.children[d];for(var A in f.children){var p=f.children[A],g=r*(h.x+f.x+p.x),m=r*(h.y+f.y+p.y+h.properties.leading/2);t.fillText(p.properties.text,g,m)}}return e.toDataURL("image/png")}}()}])}),function(e,t){t&&(Holder=e.Holder)}(this,"undefined"!=typeof Meteor&&"undefined"!=typeof Package); -/*! - * JavaScript for Bootstrap's docs (https://getbootstrap.com) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. - * Licensed under the Creative Commons Attribution 3.0 Unported License. For - * details, see https://creativecommons.org/licenses/by/3.0/. - */ -(function(e){"use strict";e(function(){e(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"});e('[data-toggle="popover"]').popover();e(".tooltip-test").tooltip();e(".popover-test").popover();e('.bd-example-indeterminate [type="checkbox"]').prop("indeterminate",true);e('.bd-content [href="#"]').click(function(e){e.preventDefault()});e("#exampleModal").on("show.bs.modal",function(t){var n=e(t.relatedTarget);var r=n.data("whatever");var i=e(this);i.find(".modal-title").text("New message to "+r);i.find(".modal-body input").val(r)});e(".bd-toggle-animated-progress").on("click",function(){e(this).siblings(".progress").find(".progress-bar-striped").toggleClass("progress-bar-animated")});e("figure.highlight, div.highlight").each(function(){var t='
      ';e(this).before(t);e(".btn-clipboard").tooltip().on("mouseleave",function(){e(this).tooltip("hide")})});var t=new Clipboard(".btn-clipboard",{target:function(e){return e.parentNode.nextElementSibling}});t.on("success",function(t){e(t.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle");t.clearSelection()});t.on("error",function(t){var n=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var r="Press "+n+"C to copy";e(t.trigger).attr("title",r).tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle")});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");e(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5").wrapInner("
      ");if(window.docsearch){window.docsearch({apiKey:"48cb48b22351bc71ea5f12f4d1ede198",indexName:"bootstrap-v4",inputSelector:"#search-input",handleSelected:function(e,t,n){var r=n.url;r=n.isLvl1?r.split("#")[0]:r;window.location.href=r},transformData:function(e){return e.map(function(e){e.url=e.url.replace("https://v4-alpha.getbootstrap.com","/docs/4.0");return e})},debug:false})}Holder.addTheme("gray",{bg:"#777",fg:"rgba(255,255,255,.75)",font:"Helvetica",fontweight:"normal"})})})(jQuery);(function(){"use strict";function e(){var e=/MSIE ([0-9.]+)/.exec(window.navigator.userAgent);if(e===null){return null}var t=parseInt(e[1],10);var n=Math.floor(t);return n}function t(){var e=new Function("/*@cc_on return @_jscript_version; @*/")();if(typeof e==="undefined"){return 11}if(e<9){return 8}return e}var n=window.navigator.userAgent;if(n.indexOf("Opera")>-1||n.indexOf("Presto")>-1){return}var r=e();if(r===null){return}var i=t();if(r!==i){window.alert("WARNING: You appear to be using IE"+i+" in IE"+r+" emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!")}})();(function(){"use strict";if("serviceWorker"in navigator){window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope)}).catch(function(e){console.log("ServiceWorker registration failed: ",e)})})}else{console.log("Service workers are not supported.")}})(); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/application.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/application.js deleted file mode 100644 index a067c9fb..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/application.js +++ /dev/null @@ -1,134 +0,0 @@ -// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT -// IT'S ALL JUST JUNK FOR OUR DOCS! -// ++++++++++++++++++++++++++++++++++++++++++ - -/*! - * JavaScript for Bootstrap's docs (https://getbootstrap.com) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. - * Licensed under the Creative Commons Attribution 3.0 Unported License. For - * details, see https://creativecommons.org/licenses/by/3.0/. - */ - -/* global Clipboard: false, anchors: false, Holder: false */ - -(function ($) { - 'use strict' - - $(function () { - // Tooltip and popover demos - $('.tooltip-demo').tooltip({ - selector: '[data-toggle="tooltip"]', - container: 'body' - }) - - $('[data-toggle="popover"]').popover() - - // Demos within modals - $('.tooltip-test').tooltip() - $('.popover-test').popover() - - // Indeterminate checkbox example - $('.bd-example-indeterminate [type="checkbox"]').prop('indeterminate', true) - - // Disable empty links in docs examples - $('.bd-content [href="#"]').click(function (e) { - e.preventDefault() - }) - - // Modal relatedTarget demo - $('#exampleModal').on('show.bs.modal', function (event) { - var $button = $(event.relatedTarget) // Button that triggered the modal - var recipient = $button.data('whatever') // Extract info from data-* attributes - // If necessary, you could initiate an AJAX request here (and then do the updating in a callback). - // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. - var $modal = $(this) - $modal.find('.modal-title').text('New message to ' + recipient) - $modal.find('.modal-body input').val(recipient) - }) - - // Activate animated progress bar - $('.bd-toggle-animated-progress').on('click', function () { - $(this).siblings('.progress').find('.progress-bar-striped').toggleClass('progress-bar-animated') - }) - - // Insert copy to clipboard button before .highlight - $('figure.highlight, div.highlight').each(function () { - var btnHtml = '
      ' - $(this).before(btnHtml) - $('.btn-clipboard') - .tooltip() - .on('mouseleave', function () { - // Explicitly hide tooltip, since after clicking it remains - // focused (as it's a button), so tooltip would otherwise - // remain visible until focus is moved away - $(this).tooltip('hide') - }) - }) - - var clipboard = new Clipboard('.btn-clipboard', { - target: function (trigger) { - return trigger.parentNode.nextElementSibling - } - }) - - clipboard.on('success', function (e) { - $(e.trigger) - .attr('title', 'Copied!') - .tooltip('_fixTitle') - .tooltip('show') - .attr('title', 'Copy to clipboard') - .tooltip('_fixTitle') - - e.clearSelection() - }) - - clipboard.on('error', function (e) { - var modifierKey = /Mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-' - var fallbackMsg = 'Press ' + modifierKey + 'C to copy' - - $(e.trigger) - .attr('title', fallbackMsg) - .tooltip('_fixTitle') - .tooltip('show') - .attr('title', 'Copy to clipboard') - .tooltip('_fixTitle') - }) - - anchors.options = { - icon: '#' - } - anchors.add('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5') - $('.bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5').wrapInner('
      ') - - // Search - if (window.docsearch) { - window.docsearch({ - apiKey: '48cb48b22351bc71ea5f12f4d1ede198', - indexName: 'bootstrap-v4', - inputSelector: '#search-input', - handleSelected: function (input, event, suggestion) { - var url = suggestion.url - url = suggestion.isLvl1 ? url.split('#')[0] : url - // If it's a title we remove the anchor so it does not jump. - window.location.href = url - }, - transformData: function (hits) { - return hits.map(function (hit) { - hit.url = hit.url.replace('https://v4-alpha.getbootstrap.com', '/docs/4.0') - return hit - }) - }, - debug: false // Set debug to true if you want to inspect the dropdown - }) - } - - // Holder - Holder.addTheme('gray', { - bg: '#777', - fg: 'rgba(255,255,255,.75)', - font: 'Helvetica', - fontweight: 'normal' - }) - }) -}(jQuery)) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/ie-emulation-modes-warning.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/ie-emulation-modes-warning.js deleted file mode 100644 index ca2ae122..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/ie-emulation-modes-warning.js +++ /dev/null @@ -1,47 +0,0 @@ -// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT -// IT'S JUST JUNK FOR OUR DOCS! -// ++++++++++++++++++++++++++++++++++++++++++ - -// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes. -(function () { - 'use strict' - - function emulatedIEMajorVersion() { - var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent) - if (groups === null) { - return null - } - var ieVersionNum = parseInt(groups[1], 10) - var ieMajorVersion = Math.floor(ieVersionNum) - return ieMajorVersion - } - - function actualNonEmulatedIEMajorVersion() { - // Detects the actual version of IE in use, even if it's in an older-IE emulation mode. - // IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx - // @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx - var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // eslint-disable-line no-new-func - if (typeof jscriptVersion === 'undefined') { - return 11 // IE11+ not in emulation mode - } - if (jscriptVersion < 9) { - return 8 // IE8 (or lower; haven't tested on IE<8) - } - return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode - } - - var ua = window.navigator.userAgent - if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) { - return // Opera, which might pretend to be IE - } - var emulated = emulatedIEMajorVersion() - if (emulated === null) { - return // Not IE - } - var nonEmulated = actualNonEmulatedIEMajorVersion() - - if (emulated !== nonEmulated) { - // eslint-disable-next-line no-alert - window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!') - } -}()) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/pwa.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/pwa.js deleted file mode 100644 index 22a0dde6..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/src/pwa.js +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint no-console:off */ - -(function () { - 'use strict' - - if ('serviceWorker' in navigator) { - window.addEventListener('load', function () { - navigator.serviceWorker.register('/sw.js').then(function (registration) { // eslint-disable-line compat/compat - console.log('ServiceWorker registration successful with scope: ', registration.scope) - }).catch(function (err) { - console.log('ServiceWorker registration failed: ', err) - }) - }) - } else { - console.log('Service workers are not supported.') - } -}()) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/anchor.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/anchor.min.js deleted file mode 100644 index ee4e3b3f..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/anchor.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * AnchorJS - v4.1.0 - 2017-09-20 - * https://github.com/bryanbraun/anchorjs - * Copyright (c) 2017 Bryan Braun; Licensed MIT - */ -!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function e(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64}function t(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}function i(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}this.options=A||{},this.elements=[],e(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var n,o,s,a,r,c,h,l,u,d,f,p=[];if(e(this.options),"touch"===(f=this.options.visible)&&(f=this.isTouchDevice()?"always":"hover"),A||(A="h2, h3, h4, h5, h6"),0===(n=t(A)).length)return this;for(i(),o=document.querySelectorAll("[id]"),s=[].map.call(o,function(A){return A.id}),r=0;r\]\.\/\(\)\*\\]/g;return this.options.truncate||e(this.options),A.trim().replace(/\'/gi,"").replace(t,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&(" "+A.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,t=A.lastChild&&(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return e||t||!1}}}); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/clipboard.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/clipboard.min.js deleted file mode 100644 index 90fd15b1..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/clipboard.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * clipboard.js v1.7.1 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n||t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function t(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function t(){var e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=o+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function t(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function t(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function t(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function t(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function t(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function t(){this.removeFake()}},{key:"action",set:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function t(){return this._action}},{key:"target",set:function t(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function t(){return this._target}}]),t}();t.exports=c})},{select:5}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if(void 0!==o)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var s=i(e),u=i(n),f=i(o),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function t(e){var n=this;this.listener=(0,f.default)(e,"click",function(t){return n.onClick(t)})}},{key:"onClick",value:function t(e){var n=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(n),target:this.target(n),text:this.text(n),container:this.container,trigger:n,emitter:this})}},{key:"defaultAction",value:function t(e){return l("action",e)}},{key:"defaultTarget",value:function t(e){var n=l("target",e);if(n)return document.querySelector(n)}},{key:"defaultText",value:function t(e){return l("text",e)}},{key:"destroy",value:function t(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],n="string"==typeof e?[e]:e,o=!!document.queryCommandSupported;return n.forEach(function(t){o=o&&!!document.queryCommandSupported(t)}),o}}]),e}(u.default);t.exports=p})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/holder.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/holder.min.js deleted file mode 100644 index 62255af4..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/holder.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! - -Holder - client side image placeholders -Version 2.9.4+cabil -© 2016 Ivan Malopinsky - http://imsky.co - -Site: http://holderjs.com -Issues: https://github.com/imsky/holder/issues -License: MIT - -*/ -!function(e){if(e.document){var t=e.document;t.querySelectorAll||(t.querySelectorAll=function(n){var r,i=t.createElement("style"),o=[];for(t.documentElement.firstChild.appendChild(i),t._qsa=[],i.styleSheet.cssText=n+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",e.scrollBy(0,0),i.parentNode.removeChild(i);t._qsa.length;)r=t._qsa.shift(),r.style.removeAttribute("x-qsa"),o.push(r);return t._qsa=null,o}),t.querySelector||(t.querySelector=function(e){var n=t.querySelectorAll(e);return n.length?n[0]:null}),t.getElementsByClassName||(t.getElementsByClassName=function(e){return e=String(e).replace(/^|\s+/g,"."),t.querySelectorAll(e)}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw TypeError("Object.keys called on non-object");var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e){if(void 0===this||null===this)throw TypeError();var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw TypeError();var r,i=arguments[1];for(r=0;r>16&255)),i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o)),a=0,o=0),r+=1;return 12===a?(o>>=4,i.push(String.fromCharCode(255&o))):18===a&&(o>>=2,i.push(String.fromCharCode(o>>8&255)),i.push(String.fromCharCode(255&o))),i.join("")},e.btoa=e.btoa||function(e){e=String(e);var n,r,i,o,a,s,l,h=0,u=[];if(/[^\x00-\xFF]/.test(e))throw Error("InvalidCharacterError");for(;h>2,a=(3&n)<<4|r>>4,s=(15&r)<<2|i>>6,l=63&i,h===e.length+2?(s=64,l=64):h===e.length+1&&(l=64),u.push(t.charAt(o),t.charAt(a),t.charAt(s),t.charAt(l));return u.join("")}}(e),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(e){var t=this.__proto__||this.constructor.prototype;return e in this&&(!(e in t)||t[e]!==this[e])}),function(){if("performance"in e==!1&&(e.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in e.performance==!1){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),e.performance.now=function(){return Date.now()-t}}}(),e.requestAnimationFrame||(e.webkitRequestAnimationFrame&&e.webkitCancelAnimationFrame?!function(e){e.requestAnimationFrame=function(t){return webkitRequestAnimationFrame(function(){t(e.performance.now())})},e.cancelAnimationFrame=e.webkitCancelAnimationFrame}(e):e.mozRequestAnimationFrame&&e.mozCancelAnimationFrame?!function(e){e.requestAnimationFrame=function(t){return mozRequestAnimationFrame(function(){t(e.performance.now())})},e.cancelAnimationFrame=e.mozCancelAnimationFrame}(e):!function(e){e.requestAnimationFrame=function(t){return e.setTimeout(t,1e3/60)},e.cancelAnimationFrame=e.clearTimeout}(e))}}(this),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Holder=t():e.Holder=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){(function(t){function r(e,t,n,r){var a=i(n.substr(n.lastIndexOf(e.domain)),e);a&&o({mode:null,el:r,flags:a,engineSettings:t})}function i(e,t){var n={theme:k(O.settings.themes.gray,null),stylesheets:t.stylesheets,instanceOptions:t},r=e.indexOf("?"),i=[e];r!==-1&&(i=[e.slice(0,r),e.slice(r+1)]);var o=i[0].split("/");n.holderURL=e;var a=o[1],s=a.match(/([\d]+p?)x([\d]+p?)/);if(!s)return!1;if(n.fluid=a.indexOf("p")!==-1,n.dimensions={width:s[1].replace("p","%"),height:s[2].replace("p","%")},2===i.length){var l=v.parse(i[1]);if(w.truthy(l.ratio)){n.fluid=!0;var h=parseFloat(n.dimensions.width.replace("%","")),u=parseFloat(n.dimensions.height.replace("%",""));u=Math.floor(100*(u/h)),h=100,n.dimensions.width=h+"%",n.dimensions.height=u+"%"}if(n.auto=w.truthy(l.auto),l.bg&&(n.theme.bg=w.parseColor(l.bg)),l.fg&&(n.theme.fg=w.parseColor(l.fg)),l.bg&&!l.fg&&(n.autoFg=!0),l.theme&&n.instanceOptions.themes.hasOwnProperty(l.theme)&&(n.theme=k(n.instanceOptions.themes[l.theme],null)),l.text&&(n.text=l.text),l.textmode&&(n.textmode=l.textmode),l.size&&(n.size=l.size),l.font&&(n.font=l.font),l.align&&(n.align=l.align),l.lineWrap&&(n.lineWrap=l.lineWrap),n.nowrap=w.truthy(l.nowrap),n.outline=w.truthy(l.outline),w.truthy(l.random)){O.vars.cache.themeKeys=O.vars.cache.themeKeys||Object.keys(n.instanceOptions.themes);var c=O.vars.cache.themeKeys[0|Math.random()*O.vars.cache.themeKeys.length];n.theme=k(n.instanceOptions.themes[c],null)}}return n}function o(e){var t=e.mode,n=e.el,r=e.flags,i=e.engineSettings,o=r.dimensions,s=r.theme,l=o.width+"x"+o.height;t=null==t?r.fluid?"fluid":"image":t;var c=/holder_([a-z]+)/g,d=!1;if(null!=r.text&&(s.text=r.text,"object"===n.nodeName.toLowerCase())){for(var f=s.text.split("\\n"),p=0;p1){var b,x=0,A=0,C=0;w=new s.Group("line"+C),"left"!==e.align&&"right"!==e.align||(o=e.width*(1-2*(1-r)));for(var E=0;E=o||T===!0)&&(t(g,w,x,g.properties.leading),g.add(w),x=0,A+=g.properties.leading,C+=1,w=new s.Group("line"+C),w.y=A),T!==!0&&(v.moveTo(x,0),x+=m.spaceWidth+k.width,w.add(v))}if(t(g,w,x,g.properties.leading),g.add(w),"left"===e.align)g.moveTo(e.width-i,null,null);else if("right"===e.align){for(b in g.children)w=g.children[b],w.moveTo(e.width-w.width,null,null);g.moveTo(0-(e.width-i),null,null)}else{for(b in g.children)w=g.children[b],w.moveTo((g.width-w.width)/2,null,null);g.moveTo((e.width-g.width)/2,null,null)}g.moveTo(null,(e.height-g.height)/2,null),(e.height-g.height)/2<0&&g.moveTo(null,0,null)}else v=new s.Text(e.text),w=new s.Group("line0"),w.add(v),g.add(w),"left"===e.align?g.moveTo(e.width-i,null,null):"right"===e.align?g.moveTo(0-(e.width-i),null,null):g.moveTo((e.width-m.boundingBox.width)/2,null,null),g.moveTo(null,(e.height-m.boundingBox.height)/2,null);return a}function l(e,t,n,r){var i=parseInt(e,10),o=parseInt(t,10),a=Math.max(i,o),s=Math.min(i,o),l=.8*Math.min(s,a*r);return Math.round(Math.max(n,l))}function h(e){var t;t=null==e||null==e.nodeType?O.vars.resizableImages:[e];for(var n=0,r=t.length;n1){n.nodeValue="";for(var v=0;v=0?t:1)}function o(e){x?i(e):S.push(e)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function C(){document.removeEventListener("DOMContentLoaded",C,!1),document.readyState="complete"},!1),document.readyState="loading");var a=e.document,s=a.documentElement,l="load",h=!1,u="on"+l,c="complete",d="readyState",f="attachEvent",p="detachEvent",g="addEventListener",m="DOMContentLoaded",v="onreadystatechange",y="removeEventListener",w=g in a,b=h,x=h,S=[];if(a[d]===c)i(t);else if(w)a[g](m,n,h),e[g](l,n,h);else{a[f](v,n),e[f](u,n);try{b=null==e.frameElement&&s}catch(A){}b&&b.doScroll&&!function E(){if(!x){try{b.doScroll("left")}catch(e){return i(E,50)}r(),t()}}()}return o.version="1.4.0",o.isReady=function(){return x},o}e.exports="undefined"!=typeof window&&n(window)},function(e,t,n){var r=encodeURIComponent,i=decodeURIComponent,o=n(4),a=n(5),s=/(\w+)\[(\d+)\]/,l=/\w+\.\w+/;t.parse=function(e){if("string"!=typeof e)return{};if(e=o(e),""===e)return{};"?"===e.charAt(0)&&(e=e.slice(1));for(var t={},n=e.split("&"),r=0;r=0;r--)n=e.charCodeAt(r),n>128?t.unshift(["&#",n,";"].join("")):t.unshift(e[r]);return t.join("")},t.imageExists=function(e,t){var n=new Image;n.onerror=function(){t.call(this,!1)},n.onload=function(){t.call(this,!0)},n.src=e},t.decodeHtmlEntity=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)})},t.dimensionCheck=function(e){var t={height:e.clientHeight,width:e.clientWidth};return!(!t.height||!t.width)&&t},t.truthy=function(e){return"string"==typeof e?"true"===e||"yes"===e||"1"===e||"on"===e||"✓"===e:!!e},t.parseColor=function(e){var t,n=/(^(?:#?)[0-9a-f]{6}$)|(^(?:#?)[0-9a-f]{3}$)/i,r=/^rgb\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,i=/^rgba\((\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0\.\d{1,}|1)\)$/,o=e.match(n);return null!==o?(t=o[1]||o[2],"#"!==t[0]?"#"+t:t):(o=e.match(r),null!==o?t="rgb("+o.slice(1).join(",")+")":(o=e.match(i),null!==o?t="rgba("+o.slice(1).join(",")+")":null))},t.canvasRatio=function(){var t=1,n=1;if(e.document){var r=e.document.createElement("canvas");if(r.getContext){var i=r.getContext("2d");t=e.devicePixelRatio||1,n=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1}}return t/n}}).call(t,function(){return this}())},function(e,t,n){(function(e){var r=n(9),i="http://www.w3.org/2000/svg",o=8;t.initSVG=function(e,t,n){var a,s,l=!1;e&&e.querySelector?(s=e.querySelector("style"),null===s&&(l=!0)):(e=r.newEl("svg",i),l=!0),l&&(a=r.newEl("defs",i),s=r.newEl("style",i),r.setAttr(s,{type:"text/css"}),a.appendChild(s),e.appendChild(a)),e.webkitMatchesSelector&&e.setAttribute("xmlns",i);for(var h=0;h=0;l--){var h=s.createProcessingInstruction("xml-stylesheet",'href="'+a[l]+'" rel="stylesheet"');s.insertBefore(h,s.firstChild)}s.removeChild(s.documentElement),o=i.serializeToString(s)}var u=i.serializeToString(t);return u=u.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),o+u}}}).call(t,function(){return this}())},function(e,t){(function(e){t.newEl=function(t,n){if(e.document)return null==n?e.document.createElement(t):e.document.createElementNS(n,t)},t.setAttr=function(e,t){for(var n in t)e.setAttribute(n,t[n])},t.createXML=function(){if(e.DOMParser)return(new DOMParser).parseFromString("","application/xml")},t.getNodeArray=function(t){var n=null;return"string"==typeof t?n=document.querySelectorAll(t):e.NodeList&&t instanceof e.NodeList?n=t:e.Node&&t instanceof e.Node?n=[t]:e.HTMLCollection&&t instanceof e.HTMLCollection?n=t:t instanceof Array?n=t:null===t&&(n=[]),n=Array.prototype.slice.call(n)}}).call(t,function(){return this}())},function(e,t){var n=function(e,t){"string"==typeof e&&(this.original=e,"#"===e.charAt(0)&&(e=e.slice(1)),/[^a-f0-9]+/i.test(e)||(3===e.length&&(e=e.replace(/./g,"$&$&")),6===e.length&&(this.alpha=1,t&&t.alpha&&(this.alpha=t.alpha),this.set(parseInt(e,16)))))};n.rgb2hex=function(e,t,n){function r(e){var t=(0|e).toString(16);return e<16&&(t="0"+t),t}return[e,t,n].map(r).join("")},n.hsl2rgb=function(e,t,n){var r=e/60,i=(1-Math.abs(2*n-1))*t,o=i*(1-Math.abs(parseInt(r)%2-1)),a=n-i/2,s=0,l=0,h=0;return r>=0&&r<1?(s=i,l=o):r>=1&&r<2?(s=o,l=i):r>=2&&r<3?(l=i,h=o):r>=3&&r<4?(l=o,h=i):r>=4&&r<5?(s=o,h=i):r>=5&&r<6&&(s=i,h=o),s+=a,l+=a,h+=a,s=parseInt(255*s),l=parseInt(255*l),h=parseInt(255*h),[s,l,h]},n.prototype.set=function(e){this.raw=e;var t=(16711680&this.raw)>>16,n=(65280&this.raw)>>8,r=255&this.raw,i=.2126*t+.7152*n+.0722*r,o=-.09991*t-.33609*n+.436*r,a=.615*t-.55861*n-.05639*r;return this.rgb={r:t,g:n,b:r},this.yuv={y:i,u:o,v:a},this},n.prototype.lighten=function(e){var t=Math.min(1,Math.max(0,Math.abs(e)))*(e<0?-1:1),r=255*t|0,i=Math.min(255,Math.max(0,this.rgb.r+r)),o=Math.min(255,Math.max(0,this.rgb.g+r)),a=Math.min(255,Math.max(0,this.rgb.b+r)),s=n.rgb2hex(i,o,a);return new n(s)},n.prototype.toHex=function(e){return(e?"#":"")+this.raw.toString(16)},n.prototype.lighterThan=function(e){return e instanceof n||(e=new n(e)),this.yuv.y>e.yuv.y},n.prototype.blendAlpha=function(e){e instanceof n||(e=new n(e));var t=e,r=this,i=t.alpha*t.rgb.r+(1-t.alpha)*r.rgb.r,o=t.alpha*t.rgb.g+(1-t.alpha)*r.rgb.g,a=t.alpha*t.rgb.b+(1-t.alpha)*r.rgb.b;return new n(n.rgb2hex(i,o,a))},e.exports=n},function(e,t){e.exports={version:"2.9.4",svg_ns:"http://www.w3.org/2000/svg"}},function(e,t,n){function r(e,t){return c.element({tag:t,width:e.width,height:e.height,fill:e.properties.fill})}function i(e){return h.cssProps({fill:e.fill,"font-weight":e.font.weight,"font-family":e.font.family+", monospace","font-size":e.font.size+e.font.units})}function o(e,t,n){var r=n/2;return["M",r,r,"H",e-r,"V",t-r,"H",r,"V",0,"M",0,r,"L",e,t-r,"M",0,t-r,"L",e,r].join(" ")}var a=n(13),s=n(8),l=n(11),h=n(7),u=l.svg_ns,c={element:function(e){var t=e.tag,n=e.content||"";return delete e.tag,delete e.content,[t,n,e]}};e.exports=function(e,t){var n=t.engineSettings,l=n.stylesheets,h=l.map(function(e){return''}).join("\n"),d="holder_"+Number(new Date).toString(16),f=e.root,p=f.children.holderTextGroup,g="#"+d+" text { "+i(p.properties)+" } ";p.y+=.8*p.textPositionData.boundingBox.height;var m=[];Object.keys(p.children).forEach(function(e){var t=p.children[e];Object.keys(t.children).forEach(function(e){var n=t.children[e],r=p.x+t.x+n.x,i=p.y+t.y+n.y,o=c.element({tag:"text",content:n.properties.text,x:r,y:i});m.push(o)})});var v=c.element({tag:"g",content:m}),y=null;if(f.children.holderBg.properties.outline){var w=f.children.holderBg.properties.outline;y=c.element({tag:"path",d:o(f.children.holderBg.width,f.children.holderBg.height,w.width),"stroke-width":w.width,stroke:w.fill,fill:"none"})}var b=r(f.children.holderBg,"rect"),x=[];x.push(b),w&&x.push(y),x.push(v);var S=c.element({tag:"g",id:d,content:x}),A=c.element({tag:"style",content:g,type:"text/css"}),C=c.element({tag:"defs",content:A}),E=c.element({tag:"svg",content:[C,S],width:f.properties.width,height:f.properties.height,xmlns:u,viewBox:[0,0,f.properties.width,f.properties.height].join(" "),preserveAspectRatio:"none"}),k=a(E);k=h+k[0];var T=s.svgStringToDataURI(k,"background"===t.mode);return T}},function(e,t,n){n(14);e.exports=function r(e,t,n){"use strict";function i(e){var t=e.match(/^[\w-]+/),r={tag:t?t[0]:"div",attr:{},children:[]},i=e.match(/#([\w-]+)/),o=e.match(/\$([\w-]+)/),a=e.match(/\.[\w-]+/g);return i&&(r.attr.id=i[1],n[i[1]]=r),o&&(n[o[1]]=r),a&&(r.attr["class"]=a.join(" ").replace(/\./g,"")),e.match(/&$/g)&&(f=!1),r}function o(e,t){if(null!==t&&t!==!1&&void 0!==t)return"string"!=typeof t&&"object"!=typeof t?String(t):t}function a(e){return e||0===e?String(e).replace(/&/g,"&").replace(/"/g,"""):""}function s(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}var l,h,u,c,d=1,f=!0;if(n=n||{},"string"==typeof e[0])e[0]=i(e[0]);else{if(!Array.isArray(e[0]))throw new Error("First element of array must be a string, or an array and not "+JSON.stringify(e[0]));d=0}for(;d",e[0]=l}return n[0]=e[0],u&&u(e[0]),n}},function(e,t){"use strict";function n(e){var t=""+e,n=r.exec(t);if(!n)return t;var i,o="",a=0,s=0;for(a=n.index;a]/;e.exports=n},function(e,t,n){var r=n(9),i=n(7);e.exports=function(){var e=r.newEl("canvas"),t=null;return function(n){null==t&&(t=e.getContext("2d"));var r=i.canvasRatio(),o=n.root;e.width=r*o.properties.width,e.height=r*o.properties.height,t.textBaseline="middle";var a=o.children.holderBg,s=r*a.width,l=r*a.height,h=2,u=h/2;t.fillStyle=a.properties.fill,t.fillRect(0,0,s,l),a.properties.outline&&(t.strokeStyle=a.properties.outline.fill,t.lineWidth=a.properties.outline.width,t.moveTo(u,u),t.lineTo(s-u,u),t.lineTo(s-u,l-u),t.lineTo(u,l-u),t.lineTo(u,u),t.moveTo(0,u),t.lineTo(s,l-u),t.moveTo(0,l-u),t.lineTo(s,u),t.stroke());var c=o.children.holderTextGroup;t.font=c.properties.font.weight+" "+r*c.properties.font.size+c.properties.font.units+" "+c.properties.font.family+", monospace",t.fillStyle=c.properties.fill;for(var d in c.children){var f=c.children[d];for(var p in f.children){var g=f.children[p],m=r*(c.x+f.x+g.x),v=r*(c.y+f.y+g.y+c.properties.leading/2);t.fillText(g.properties.text,m,v)}}return e.toDataURL("image/png")}}()}])}),function(e,t){t&&(Holder=e.Holder); -}(this,"undefined"!=typeof Meteor&&"undefined"!=typeof Package); \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/jquery-slim.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/jquery-slim.min.js deleted file mode 100644 index 105d00e6..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/jquery-slim.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v3.2.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */ -!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a); -}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}}),r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var _a,ab=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return T(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?_a:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),_a={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ab[b]||r.find.attr;ab[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ab[g],ab[g]=e,e=null!=c(a,b,d)?g:null,ab[g]=f),e}});var bb=/^(?:input|select|textarea|button)$/i,cb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function db(a){var b=a.match(L)||[];return b.join(" ")}function eb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,eb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=eb(c),d=1===c.nodeType&&" "+db(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=db(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,eb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=eb(c),d=1===c.nodeType&&" "+db(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=db(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,eb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=eb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+db(eb(c))+" ").indexOf(b)>-1)return!0;return!1}});var fb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(fb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:db(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var gb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!gb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,gb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var hb=/\[\]$/,ib=/\r?\n/g,jb=/^(?:submit|button|image|reset|file)$/i,kb=/^(?:input|select|textarea|keygen)/i;function lb(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||hb.test(a)?d(a,e):lb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d); -});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)lb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)lb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&kb.test(this.nodeName)&&!jb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ib,"\r\n")}}):{name:b.name,value:c.replace(ib,"\r\n")}}).get()}}),r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="
      ",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=C.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=qa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),b=f.ownerDocument,c=b.documentElement,e=b.defaultView,{top:d.top+e.pageYOffset-c.clientTop,left:d.left+e.pageXOffset-c.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),B(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||ra})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return T(this,function(a,d,e){var f;return r.isWindow(a)?f=a:9===a.nodeType&&(f=a.defaultView),void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Pa(o.pixelPosition,function(a,c){if(c)return c=Oa(a,b),Ma.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return T(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.holdReady=function(a){a?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=B,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var mb=a.jQuery,nb=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=nb),b&&a.jQuery===r&&(a.jQuery=mb),r},b||(a.jQuery=a.$=r),r}); diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/popper.min.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/popper.min.js deleted file mode 100644 index 0f20d2a8..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/js/vendor/popper.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/* - Copyright (C) Federico Zivolo 2017 - Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). - */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:e?e.ownerDocument.documentElement:document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var t=1=o.clientWidth&&i>=o.clientHeight}),l=0i[e]&&!t.escapeWithReference&&(n=_(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=X,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var i;if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var n=o.element;if('string'==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e;}else if(!e.instance.popper.contains(n))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',g=a?'bottom':'right',u=L(n)[l];d[g]-us[g]&&(e.offsets.popper[m]+=d[m]+u-s[g]),e.offsets.popper=c(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=J(_(s[l]-u,v),0),e.arrowElement=n,e.offsets.arrow=(i={},pe(i,m,Math.round(v)),pe(i,h,''),i),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(k(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=x(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case le.FLIP:p=[i,n];break;case le.CLOCKWISE:p=q(i);break;case le.COUNTERCLOCKWISE:p=q(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=x(i);var a=e.offsets.popper,l=e.offsets.reference,f=X,m='left'===i&&f(a.right)>f(l.left)||'right'===i&&f(a.left)f(l.top)||'bottom'===i&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,w=-1!==['top','bottom'].indexOf(i),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),y&&(r=K(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=C(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[o]-(s?n[p?'width':'height']:0),e.placement=x(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right .col, - > [class^="col-"] { - padding-top: .75rem; - padding-bottom: .75rem; - background-color: rgba(86, 61, 124, .15); - border: 1px solid rgba(86, 61, 124, .2); - } - } - - .row + .row { - margin-top: 1rem; - } - - .flex-items-top, - .flex-items-middle, - .flex-items-bottom { - min-height: 6rem; - background-color: rgba(255, 0, 0, .1); - } -} - -.bd-example-row-flex-cols .row { - min-height: 10rem; - background-color: rgba(255, 0, 0, .1); -} - -.bd-highlight { - background-color: rgba($bd-purple, .15); - border: 1px solid rgba($bd-purple, .15); -} - -// Grid mixins -.example-container { - width: 800px; - @include make-container(); -} - -.example-row { - @include make-row(); -} - -.example-content-main { - @include make-col-ready(); - - @include media-breakpoint-up(sm) { - @include make-col(6); - } - - @include media-breakpoint-up(lg) { - @include make-col(8); - } -} - -.example-content-secondary { - @include make-col-ready(); - - @include media-breakpoint-up(sm) { - @include make-col(6); - } - - @include media-breakpoint-up(lg) { - @include make-col(4); - } -} - - -// -// Container illustrations -// - -.bd-example-container { - min-width: 16rem; - max-width: 25rem; - margin-right: auto; - margin-left: auto; -} - -.bd-example-container-header { - height: 3rem; - margin-bottom: .5rem; - background-color: lighten($blue, 50%); - border-radius: .25rem; -} - -.bd-example-container-sidebar { - float: right; - width: 4rem; - height: 8rem; - background-color: lighten($blue, 25%); - border-radius: .25rem; -} - -.bd-example-container-body { - height: 8rem; - margin-right: 4.5rem; - background-color: lighten($bd-purple, 25%); - border-radius: .25rem; -} - -.bd-example-container-fluid { - max-width: none; -} - - -// -// Docs examples -// - -.bd-example { - position: relative; - padding: 1rem; - margin: 1rem (-$grid-gutter-width / 2) 0; - border: solid #f7f7f9; - border-width: .2rem 0 0; - @include clearfix(); - - @include media-breakpoint-up(sm) { - padding: 1.5rem; - margin-right: 0; - margin-left: 0; - border-width: .2rem; - } - - + .highlight, - + .clipboard + .highlight { - margin-top: 0; - } - - + p { - margin-top: 2rem; - } - - .pos-f-t { - position: relative; - margin: -1rem; - - @include media-breakpoint-up(sm) { - margin: -1.5rem; - } - } - - .custom-file-input:lang(es) ~ .custom-file-label::after { - content: "Elegir"; - } - - > .form-control { - + .form-control { - margin-top: .5rem; - } - } - - > .nav + .nav, - > .alert + .alert, - > .navbar + .navbar, - > .progress + .progress, - > .progress + .btn { - margin-top: 1rem; - } - - > .dropdown-menu:first-child { - position: static; - display: block; - } - - > .form-group:last-child { - margin-bottom: 0; - } - - > .close { - float: none; - } -} - -// Typography -.bd-example-type { - .table { - .type-info { - color: #999; - vertical-align: middle; - } - td { - padding: 1rem 0; - border-color: #eee; - } - tr:first-child td { - border-top: 0; - } - } - - h1, - h2, - h3, - h4, - h5, - h6 { - margin-top: 0; - margin-bottom: 0; - } -} - -// Contextual background colors -.bd-example-bg-classes p { - padding: 1rem; -} - -// Images -.bd-example > img { - + img { - margin-left: .5rem; - } -} - -// Buttons -.bd-example { - > .btn-group { - margin-top: .25rem; - margin-bottom: .25rem; - } - > .btn-toolbar + .btn-toolbar { - margin-top: .5rem; - } -} - -// Forms -.bd-example-control-sizing select, -.bd-example-control-sizing input[type="text"] + input[type="text"] { - margin-top: .5rem; -} -.bd-example-form .input-group { - margin-bottom: .5rem; -} -.bd-example > textarea.form-control { - resize: vertical; -} - -// List groups -.bd-example > .list-group { - max-width: 400px; -} - -// Navbars -.bd-example { - .fixed-top, - .sticky-top { - position: static; - margin: -1rem -1rem 1rem; - } - .fixed-bottom { - position: static; - margin: 1rem -1rem -1rem; - } - - @include media-breakpoint-up(sm) { - .fixed-top, - .sticky-top { - margin: -1.5rem -1.5rem 1rem; - } - .fixed-bottom { - margin: 1rem -1.5rem -1.5rem; - } - } -} - -// Pagination -.bd-example .pagination { - margin-top: .5rem; - margin-bottom: .5rem; -} - -// Example modals -.modal { - z-index: 1072; - - .tooltip, - .popover { - z-index: 1073; - } -} - -.modal-backdrop { - z-index: 1071; -} - -.bd-example-modal { - background-color: #fafafa; - - .modal { - position: relative; - top: auto; - right: auto; - bottom: auto; - left: auto; - z-index: 1; - display: block; - } - - .modal-dialog { - left: auto; - margin-right: auto; - margin-left: auto; - } -} - -// Example tabbable tabs -.bd-example-tabs .nav-tabs { - margin-bottom: 1rem; -} - -// Popovers -.bd-example-popover-static { - padding-bottom: 1.5rem; - background-color: #f9f9f9; - - .popover { - position: relative; - display: block; - float: left; - width: 260px; - margin: 1.25rem; - } -} - -// Tooltips -.tooltip-demo a { - white-space: nowrap; -} - -.bd-example-tooltip-static .tooltip { - position: relative; - display: inline-block; - margin: 10px 20px; - opacity: 1; -} - -// Scrollspy demo on fixed height div -.scrollspy-example { - position: relative; - height: 200px; - margin-top: .5rem; - overflow: auto; -} - -.scrollspy-example-2 { - position: relative; - height: 350px; - overflow: auto; -} - -.bd-example-border-utils { - [class^="border"] { - display: inline-block; - width: 5rem; - height: 5rem; - margin: .25rem; - background-color: #f5f5f5; - } -} - -.bd-example-border-utils-0 { - [class^="border"] { - border: 1px solid $border-color; - } -} - -// -// Code snippets -// - -.highlight { - padding: 1rem; - margin-top: 1rem; - margin-bottom: 1rem; - background-color: #f7f7f9; - -ms-overflow-style: -ms-autohiding-scrollbar; - - @include media-breakpoint-up(sm) { - padding: 1.5rem; - } -} - -.bd-content .highlight { - margin-right: (-$grid-gutter-width / 2); - margin-left: (-$grid-gutter-width / 2); - - @include media-breakpoint-up(sm) { - margin-right: 0; - margin-left: 0; - } -} - -.highlight { - pre { - padding: 0; - margin-top: 0; - margin-bottom: 0; - background-color: transparent; - border: 0; - } - pre code { - font-size: inherit; - color: $gray-900; // Effectively the base text color - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_content.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_content.scss deleted file mode 100644 index decb6c4c..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_content.scss +++ /dev/null @@ -1,119 +0,0 @@ -// stylelint-disable no-duplicate-selectors, selector-max-combinators, selector-max-compound-selectors, selector-max-type, selector-no-qualifying-type - -// -// Automatically style Markdown-based tables like a Bootstrap `.table`. -// - -.bd-content { - order: 1; - - // Hack the sticky header - > h2[id], - > h3[id], - > h4[id] { - pointer-events: none; - - > div, - > a { - pointer-events: auto; - } - - &::before { - display: block; - height: 6rem; - margin-top: -6rem; - visibility: hidden; - content: ""; - } - } - - > table { - width: 100%; - max-width: 100%; - margin-bottom: 1rem; - - @include media-breakpoint-down(md) { - display: block; - overflow-x: auto; - -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057 - - &.table-bordered { - border: 0; - } - } - - // Cells - > thead, - > tbody, - > tfoot { - > tr { - > th, - > td { - padding: $table-cell-padding; - vertical-align: top; - border: 1px solid $table-border-color; - - > p:last-child { - margin-bottom: 0; - } - } - } - } - - // Prevent breaking of code (e.g., Grunt tasks list) - td:first-child > code { - white-space: nowrap; - } - } -} - -// -// Docs sections -// - -.bd-content { - > h2:not(:first-child) { - margin-top: 3rem; - } - - > h3 { - margin-top: 1.5rem; - } - - > ul li, - > ol li { - margin-bottom: .25rem; - } - - @include media-breakpoint-up(lg) { - > ul, - > ol, - > p { - max-width: 80%; - } - } -} - -.bd-title { - margin-top: 1rem; - margin-bottom: .5rem; - font-weight: 300; - - @include media-breakpoint-up(sm) { - font-size: 3rem; - } -} - -.bd-lead { - font-size: 1.125rem; - font-weight: 300; - - @include media-breakpoint-up(sm) { - max-width: 80%; - margin-bottom: 1rem; - font-size: 1.5rem; - } -} - -.bd-text-purple { color: $bd-purple; } -.bd-text-purple-bright { color: $bd-purple-bright; } diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_examples.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_examples.scss deleted file mode 100644 index a4ec7a29..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_examples.scss +++ /dev/null @@ -1,24 +0,0 @@ -// -// Examples -// - -.bd-examples .img-thumbnail { - margin-bottom: .75rem; -} -.bd-examples h4 { - margin-bottom: .25rem; -} -.bd-examples p { - margin-bottom: 1.25rem; -} - -@media (max-width: 480px) { - .bd-examples { - margin-right: -.75rem; - margin-left: -.75rem; - } - .bd-examples > [class^="col-"] { - padding-right: .75rem; - padding-left: .75rem; - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_footer.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_footer.scss deleted file mode 100644 index ab605d28..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_footer.scss +++ /dev/null @@ -1,40 +0,0 @@ -// -// Footer -// - -.bd-footer { - font-size: 85%; - text-align: center; - background-color: #f7f7f7; - - a { - font-weight: 500; - color: $gray-700; - - &:hover, - &:focus { - color: $link-color; - } - } - - p { - margin-bottom: 0; - } - - @include media-breakpoint-up(sm) { - text-align: left; - } -} - -.bd-footer-links { - padding-left: 0; - margin-bottom: 1rem; - - li { - display: inline-block; - - + li { - margin-left: 1rem; - } - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_masthead.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_masthead.scss deleted file mode 100644 index 0e3cea06..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_masthead.scss +++ /dev/null @@ -1,56 +0,0 @@ -// stylelint-disable declaration-no-important - -.bd-masthead { - position: relative; - padding: 3rem ($grid-gutter-width / 2); - // background-image: linear-gradient(45deg, #fafafa, #f5f5f5); - - h1 { - line-height: 1; - } - - .btn { - width: 100%; - padding: .8rem 2rem; - font-size: 1.25rem; - font-weight: 500; - } - - .carbonad { - margin-top: 0 !important; - margin-bottom: -3rem !important; - } - - @include media-breakpoint-up(sm) { - padding-top: 5rem; - padding-bottom: 5rem; - - .carbonad { - margin-bottom: 0 !important; - } - } - - @include media-breakpoint-up(md) { - h1 { - font-size: 4rem; - } - - .carbonad { - margin-top: 3rem !important; - } - } -} - -.half-rule { - width: 6rem; - margin: 2.5rem 0; -} - -.masthead-followup { - .bd-clipboard { display: none; } - - .highlight { - padding: .5rem 0; - background-color: transparent; - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_nav.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_nav.scss deleted file mode 100644 index 73c6bad6..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_nav.scss +++ /dev/null @@ -1,76 +0,0 @@ -// -// Main navbar -// - -.bd-navbar { - min-height: 4rem; - background-color: $bd-purple; - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .05), inset 0 -1px 0 rgba(0, 0, 0, .1); - - @include media-breakpoint-down(md) { - padding-right: .5rem; - padding-left: .5rem; - - .navbar-nav-scroll { - max-width: 100%; - height: 2.5rem; - margin-top: .25rem; - overflow: hidden; - font-size: .875rem; - - .navbar-nav { - padding-bottom: 2rem; - overflow-x: auto; - white-space: nowrap; - -webkit-overflow-scrolling: touch; - } - } - } - - @include media-breakpoint-up(md) { - @supports (position: sticky) { - position: sticky; - top: 0; - z-index: 1071; // over everything in bootstrap - } - } - - .navbar-nav { - .nav-link { - padding-right: .5rem; - padding-left: .5rem; - color: $bd-purple-light; - - &.active, - &:hover { - color: #fff; - background-color: transparent; - } - - &.active { - font-weight: 500; - } - } - } - - .navbar-nav-svg { - display: inline-block; - width: 1rem; - height: 1rem; - vertical-align: text-top; - } - - .dropdown-menu { - font-size: .875rem; - } - - .dropdown-item.active { - font-weight: 500; - color: $gray-900; - background-color: transparent; - background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23292b2c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: .4rem .6rem; - background-size: .75rem .75rem; - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_sidebar.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_sidebar.scss deleted file mode 100644 index 0cfbd60d..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_sidebar.scss +++ /dev/null @@ -1,166 +0,0 @@ -// stylelint-disable declaration-no-important - -// -// Right side table of contents -// - -.bd-toc { - @supports (position: sticky) { - position: sticky; - top: 4rem; - height: calc(100vh - 4rem); - overflow-y: auto; - } - order: 2; - padding-top: 1.5rem; - padding-bottom: 1.5rem; - font-size: .875rem; -} - -.section-nav { - padding-left: 0; - border-left: 1px solid #eee; - - ul { - padding-left: 1rem; - - ul { - display: none; - } - } -} - -.toc-entry { - display: block; - - a { - display: block; - padding: .125rem 1.5rem; - color: #99979c; - - &:hover { - color: $blue; - text-decoration: none; - } - } -} - -// -// Left side navigation -// - -.bd-sidebar { - order: 0; - // background-color: #f5f2f9; - border-bottom: 1px solid rgba(0, 0, 0, .1); - - @include media-breakpoint-up(md) { - @supports (position: sticky) { - position: sticky; - top: 4rem; - z-index: 1000; - height: calc(100vh - 4rem); - } - border-right: 1px solid rgba(0, 0, 0, .1); - } - - @include media-breakpoint-up(xl) { - flex: 0 1 320px; - } -} - -.bd-links { - padding-top: 1rem; - padding-bottom: 1rem; - margin-right: -15px; - margin-left: -15px; - - @include media-breakpoint-up(md) { - @supports (position: sticky) { - max-height: calc(100vh - 9rem); - overflow-y: auto; - } - } - - // Override collapse behaviors - @include media-breakpoint-up(md) { - display: block !important; - } -} - -.bd-search { - position: relative; // To contain the Algolia search - padding: 1rem 15px; - margin-right: -15px; - margin-left: -15px; - border-bottom: 1px solid rgba(0, 0, 0, .05); - - .form-control:focus { - border-color: $bd-purple-bright; - box-shadow: 0 0 0 3px rgba($bd-purple-bright, .25); - } -} - -.bd-search-docs-toggle { - line-height: 1; - color: $gray-900; -} - -.bd-sidenav { - display: none; -} - -.bd-toc-link { - display: block; - padding: .25rem 1.5rem; - font-weight: 500; - color: rgba(0, 0, 0, .65); - - &:hover { - color: rgba(0, 0, 0, .85); - text-decoration: none; - } -} - -.bd-toc-item { - &.active { - margin-bottom: 1rem; - - &:not(:first-child) { - margin-top: 1rem; - } - - > .bd-toc-link { - color: rgba(0, 0, 0, .85); - - &:hover { - background-color: transparent; - } - } - - > .bd-sidenav { - display: block; - } - } -} - -// All levels of nav -.bd-sidebar .nav > li > a { - display: block; - padding: .25rem 1.5rem; - font-size: 90%; - color: rgba(0, 0, 0, .65); -} - -.bd-sidebar .nav > li > a:hover { - color: rgba(0, 0, 0, .85); - text-decoration: none; - background-color: transparent; -} - -.bd-sidebar .nav > .active > a, -.bd-sidebar .nav > .active:hover > a { - font-weight: 500; - color: rgba(0, 0, 0, .85); - background-color: transparent; -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_skiplink.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_skiplink.scss deleted file mode 100644 index 7ca3074a..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_skiplink.scss +++ /dev/null @@ -1,14 +0,0 @@ -// stylelint-disable selector-max-id - -#skippy { - display: block; - padding: 1em; - color: #fff; - background-color: $bd-purple; - outline: 0; - - .skiplink-text { - padding: .5em; - outline: 1px dotted; - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_syntax.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_syntax.scss deleted file mode 100644 index e66c5da2..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_syntax.scss +++ /dev/null @@ -1,78 +0,0 @@ -// stylelint-disable declaration-block-single-line-max-declarations - -.hll { background-color: #ffc; } -.c { color: #999; } -.k { color: #069; } -.o { color: #555; } -.cm { color: #999; } -.cp { color: #099; } -.c1 { color: #999; } -.cs { color: #999; } -.gd { background-color: #fcc; border: 1px solid #c00; } -.ge { font-style: italic; } -.gr { color: #f00; } -.gh { color: #030; } -.gi { background-color: #cfc; border: 1px solid #0c0; } -.go { color: #aaa; } -.gp { color: #009; } -.gu { color: #030; } -.gt { color: #9c6; } -.kc { color: #069; } -.kd { color: #069; } -.kn { color: #069; } -.kp { color: #069; } -.kr { color: #069; } -.kt { color: #078; } -.m { color: #f60; } -.s { color: #d44950; } -.na { color: #4f9fcf; } -.nb { color: #366; } -.nc { color: #0a8; } -.no { color: #360; } -.nd { color: #99f; } -.ni { color: #999; } -.ne { color: #c00; } -.nf { color: #c0f; } -.nl { color: #99f; } -.nn { color: #0cf; } -.nt { color: #2f6f9f; } -.nv { color: #033; } -.ow { color: #000; } -.w { color: #bbb; } -.mf { color: #f60; } -.mh { color: #f60; } -.mi { color: #f60; } -.mo { color: #f60; } -.sb { color: #c30; } -.sc { color: #c30; } -.sd { font-style: italic; color: #c30; } -.s2 { color: #c30; } -.se { color: #c30; } -.sh { color: #c30; } -.si { color: #a00; } -.sx { color: #c30; } -.sr { color: #3aa; } -.s1 { color: #c30; } -.ss { color: #fc3; } -.bp { color: #366; } -.vc { color: #033; } -.vg { color: #033; } -.vi { color: #033; } -.il { color: #f60; } - -.css .o, -.css .o + .nt, -.css .nt + .nt { color: #999; } - -.language-bash::before, -.language-sh::before { - color: #009; - content: "$ "; - user-select: none; -} - -.language-powershell::before { - color: #009; - content: "PM> "; - user-select: none; -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_variables.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_variables.scss deleted file mode 100644 index b60a2136..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/_variables.scss +++ /dev/null @@ -1,9 +0,0 @@ -// Local docs variables -$bd-purple: #563d7c !default; -$bd-purple-bright: lighten(saturate($bd-purple, 5%), 15%) !default; -$bd-purple-light: lighten(saturate($bd-purple, 5%), 45%) !default; -$bd-dark: #2a2730 !default; -$bd-download: #ffe484 !default; -$bd-info: #5bc0de !default; -$bd-warning: #f0ad4e !default; -$bd-danger: #d9534f !default; diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/docs.scss b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/docs.scss deleted file mode 100644 index 7bc1196b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/assets/scss/docs.scss +++ /dev/null @@ -1,52 +0,0 @@ -/*! - * Bootstrap Docs (https://getbootstrap.com) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. - * Licensed under the Creative Commons Attribution 3.0 Unported License. For - * details, see https://creativecommons.org/licenses/by/3.0/. - */ - -// Dev notes -// -// Background information on nomenclature and architecture decisions here. -// -// - Bootstrap functions, variables, and mixins are included for easy reuse. -// Doing so gives us access to the same core utilities provided by Bootstrap. -// For example, consistent media queries through those mixins. -// -// - Bootstrap's **docs variables** are prefixed with `$bd-`. -// These custom colors avoid collision with the components Bootstrap provides. -// -// - Classes are prefixed with `.bd-`. -// These classes indicate custom-built or modified components for the design -// and layout of the Bootstrap docs. They are not included in our builds. -// -// Happy Bootstrapping! - -// Load Bootstrap variables and mixins -@import "../../scss/functions"; -@import "../../scss/variables"; -@import "../../scss/mixins"; - -// Load docs components -@import "variables"; -@import "nav"; -@import "masthead"; -@import "ads"; -@import "content"; -@import "skiplink"; -@import "sidebar"; -@import "footer"; -@import "component-examples"; -@import "buttons"; -@import "callouts"; -@import "examples"; -@import "browser-bugs"; -@import "brand"; -@import "colors"; -@import "clipboard-js"; - -// Load docs dependencies -@import "syntax"; -@import "anchor"; -@import "algolia"; diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/.eslintrc.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/.eslintrc.json deleted file mode 100644 index 76e7f37b..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/.eslintrc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "env": { - "browser": false, - "node": true - }, - "parserOptions": { - "sourceType": "script" - }, - "extends": "../.eslintrc.json", - "rules": { - "consistent-return": "off", - "func-style": "off", - "no-console": "off", - "no-magic-numbers": "off", - "no-process-env": "off", - "no-process-exit": "off", - "no-sync": "off", - "spaced-comment": "off" - } -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/.htmllintrc b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/.htmllintrc deleted file mode 100644 index ba2c6b3a..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/.htmllintrc +++ /dev/null @@ -1,43 +0,0 @@ -{ - "attr-bans": ["align", "background", "bgcolor", "border", "frameborder", "longdesc", "marginwidth", "marginheight", "scrolling"], - "attr-name-style": false, - "attr-no-dup": true, - "attr-no-unsafe-char": true, - "attr-quote-style": "double", - "attr-req-value": true, - "attr-validate": true, - "class-no-dup": true, - "class-style": "dash", - "doctype-first": true, - "doctype-html5": true, - "fig-req-figcaption": false, - "focusable-tabindex-style": true, - "head-req-title": true, - "head-valid-content-model": false, - "href-style": false, - "html-req-lang": true, - "html-valid-content-model": false, - "id-class-ignore-regex": "(onclick|content|[a-z]+([A-Z][a-z])+)", - "id-class-no-ad": true, - "id-class-style": "dash", - "id-no-dup": true, - "img-req-alt": "allownull", - "img-req-src": false, - "indent-style": "spaces", - "indent-width": 2, - "input-radio-req-name": false, - "input-req-label": false, - "label-req-for": true, - "lang-style": "case", - "line-end-style": "lf", - "spec-char-escape": false, - "table-req-header": false, - "tag-bans": ["b", "i"], - "tag-close": true, - "tagname-lowercase": true, - "tag-name-match": true, - "tag-self-close": false, - "text-ignore-regex": false, - "title-max-len": 70, - "title-no-dup": true -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/change-version.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/change-version.js deleted file mode 100644 index 25283c44..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/change-version.js +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env node - -'use strict' - -/*! - * Script to update version number references in the project. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/* global Set */ - -const fs = require('fs') -const path = require('path') -const sh = require('shelljs') - -sh.config.fatal = true - -// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 -function regExpQuote(string) { - return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&') -} - -function regExpQuoteReplacement(string) { - return string.replace(/[$]/g, '$$') -} - -const DRY_RUN = false - -function walkAsync(directory, excludedDirectories, fileCallback, errback) { - if (excludedDirectories.has(path.parse(directory).base)) { - return - } - fs.readdir(directory, (err, names) => { - if (err) { - errback(err) - return - } - names.forEach((name) => { - const filepath = path.join(directory, name) - fs.lstat(filepath, (err, stats) => { - if (err) { - process.nextTick(errback, err) - return - } - if (stats.isDirectory()) { - process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback) - } else if (stats.isFile()) { - process.nextTick(fileCallback, filepath) - } - }) - }) - }) -} - -function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { - original = new RegExp(regExpQuote(original), 'g') - replacement = regExpQuoteReplacement(replacement) - const updateFile = DRY_RUN ? (filepath) => { - if (allowedExtensions.has(path.parse(filepath).ext)) { - console.log(`FILE: ${filepath}`) - } else { - console.log(`EXCLUDED:${filepath}`) - } - } : (filepath) => { - if (allowedExtensions.has(path.parse(filepath).ext)) { - sh.sed('-i', original, replacement, filepath) - } - } - walkAsync(directory, excludedDirectories, updateFile, (err) => { - console.error('ERROR while traversing directory!:') - console.error(err) - process.exit(1) - }) -} - -function main(args) { - if (args.length !== 2) { - console.error('USAGE: change-version old_version new_version') - console.error('Got arguments:', args) - process.exit(1) - } - const oldVersion = args[0] - const newVersion = args[1] - const EXCLUDED_DIRS = new Set([ - '.git', - 'node_modules', - 'vendor' - ]) - const INCLUDED_EXTENSIONS = new Set([ - // This extension whitelist is how we avoid modifying binary files - '', - '.css', - '.html', - '.js', - '.json', - '.md', - '.scss', - '.txt', - '.yml' - ]) - replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion) -} - -main(process.argv.slice(2)) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/gcp-key.json.enc b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/gcp-key.json.enc deleted file mode 100644 index 6e1856a2..00000000 Binary files a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/gcp-key.json.enc and /dev/null differ diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/generate-sri.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/generate-sri.js deleted file mode 100644 index f6790e44..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/generate-sri.js +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to generate SRI hashes for use in our docs. - * Remember to use the same vendor files as the CDN ones, - * otherwise the hashes won't match! - * - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -'use strict' - -const fs = require('fs') -const path = require('path') -const sriToolbox = require('sri-toolbox') -const sh = require('shelljs') - -sh.config.fatal = true - -const configFile = path.join(__dirname, '../_config.yml') - -// Array of objects which holds the files to generate SRI hashes for. -// `file` is the path from the root folder -// `configPropertyName` is the _config.yml variable's name of the file -const files = [ - { - file: 'dist/css/bootstrap.min.css', - configPropertyName: 'css_hash' - }, - { - file: 'dist/js/bootstrap.min.js', - configPropertyName: 'js_hash' - }, - { - file: 'assets/js/vendor/jquery-slim.min.js', - configPropertyName: 'jquery_hash' - }, - { - file: 'assets/js/vendor/popper.min.js', - configPropertyName: 'popper_hash' - } -] - -files.forEach((file) => { - fs.readFile(file.file, 'utf8', (err, data) => { - if (err) { - throw err - } - - const integrity = sriToolbox.generate({ - algorithms: ['sha384'] - }, data) - - console.log(`${file.configPropertyName}: ${integrity}`) - - sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile) - }) -}) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/lint-vars.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/lint-vars.js deleted file mode 100644 index 21dc5569..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/lint-vars.js +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to find unused Sass variables. - * - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -'use strict' - -const fs = require('fs') -const path = require('path') -const glob = require('glob') - -// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 -function regExpQuote(str) { - return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&') -} - -let globalSuccess = true - -function findUnusedVars(dir) { - if (!(fs.existsSync(dir) && fs.statSync(dir).isDirectory())) { - console.log(`"${dir}": Not a valid directory!`) - process.exit(1) - } - - console.log(`Finding unused variables in "${dir}"...`) - - // A variable to handle success/failure message in this function - let unusedVarsFound = false - - // Array of all Sass files' content - const sassFiles = glob.sync(path.join(dir, '**/*.scss')) - // String of all Sass files' content - let sassFilesString = '' - - sassFiles.forEach((file) => { - sassFilesString += fs.readFileSync(file, 'utf8') - }) - - // Array of all Sass variables - const variables = sassFilesString.match(/(^\$[a-zA-Z0-9_-]+[^:])/gm) - - console.log(`Found ${variables.length} total variables.`) - - // Loop through each variable - variables.forEach((variable) => { - const re = new RegExp(regExpQuote(variable), 'g') - const count = (sassFilesString.match(re) || []).length - - if (count === 1) { - console.log(`Variable "${variable}" is not being used.`) - unusedVarsFound = true - globalSuccess = false - } - }) - - if (unusedVarsFound === false) { - console.log(`No unused variables found in "${dir}".`) - } -} - -function main(args) { - if (args.length < 1) { - console.log('Wrong arguments!') - console.log('Usage: lint-vars.js folder [, folder2...]') - process.exit(1) - } - - args.forEach((arg) => { - findUnusedVars(arg) - }) - - if (globalSuccess === false) { - process.exit(1) - } -} - -// The first and second args are: path/to/node script.js -main(process.argv.slice(2)) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/postcss.config.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/postcss.config.js deleted file mode 100644 index 157291ff..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/postcss.config.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -module.exports = (ctx) => ({ - map: ctx.file.dirname.includes('examples') ? false : { - inline: false, - annotation: true, - sourcesContent: true - }, - plugins: { - autoprefixer: { - cascade: false - } - } -}) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/rollup.config.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/rollup.config.js deleted file mode 100644 index c97e3761..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/rollup.config.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict' - -const path = require('path') -const babel = require('rollup-plugin-babel') -const resolve = require('rollup-plugin-node-resolve') - -const pkg = require(path.resolve(__dirname, '../package.json')) -const BUNDLE = process.env.BUNDLE === 'true' -const year = new Date().getFullYear() - -let fileDest = 'bootstrap.js' -const external = ['jquery', 'popper.js'] -const plugins = [ - babel({ - exclude: 'node_modules/**', // Only transpile our source code - externalHelpersWhitelist: [ // Include only required helpers - 'defineProperties', - 'createClass', - 'inheritsLoose', - 'extends' - ] - }) -] -const globals = { - jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode - 'popper.js': 'Popper' -} - -if (BUNDLE) { - fileDest = 'bootstrap.bundle.js' - // Remove last entry in external array to bundle Popper - external.pop() - delete globals['popper.js'] - plugins.push(resolve()) -} - -module.exports = { - input: path.resolve(__dirname, '../js/src/index.js'), - output: { - banner: `/*! - * Bootstrap v${pkg.version} (${pkg.homepage}) - * Copyright 2011-${year} ${pkg.author} - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */`, - file: path.resolve(__dirname, `../dist/js/${fileDest}`), - format: 'umd', - globals, - name: 'bootstrap' - }, - external, - plugins -} diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/sauce_browsers.json b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/sauce_browsers.json deleted file mode 100644 index b112d9c5..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/sauce_browsers.json +++ /dev/null @@ -1,65 +0,0 @@ -[ - { - "browserName": "safari", - "platform": "OS X 10.11", - "version": "latest" - }, - { - "browserName": "chrome", - "platform": "OS X 10.11", - "version": "latest" - }, - { - "browserName": "firefox", - "platform": "OS X 10.11", - "version": "latest" - }, - { - "browserName": "MicrosoftEdge", - "platform": "Windows 10", - "version": "latest" - }, - { - "browserName": "internet explorer", - "version": "11", - "platform": "Windows 8.1" - }, - { - "browserName": "internet explorer", - "version": "10", - "platform": "Windows 8" - }, - { - "browserName": "chrome", - "platform": "Windows 10", - "version": "latest" - }, - { - "browserName": "firefox", - "platform": "Windows 10", - "version": "latest" - }, - { - "browserName": "iphone", - "deviceName": "iPhone Simulator", - "platformName": "OS X 10.11", - "version": "9.3" - }, - { - "browserName": "chrome", - "platform": "Linux", - "version": "latest" - }, - { - "browserName": "firefox", - "platform": "Linux", - "version": "latest" - }, - { - "platform": "Linux", - "browserName": "android", - "deviceName": "Android Emulator", - "version": "latest", - "deviceType": "phone" - } -] diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/saucelabs-unit-test.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/saucelabs-unit-test.js deleted file mode 100644 index 95b68345..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/saucelabs-unit-test.js +++ /dev/null @@ -1,110 +0,0 @@ -/*! - * Script to run our Sauce Labs tests. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/* -Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator -Mac Opera is not currently supported by Sauce Labs -Win Opera 15+ is not currently supported by Sauce Labs -iOS Chrome is not currently supported by Sauce Labs -*/ - -'use strict' - -const path = require('path') -const JSUnitSaucelabs = require('jsunitsaucelabs') - -const jsUnitSaucelabs = new JSUnitSaucelabs({ - username: process.env.SAUCE_USERNAME, - password: process.env.SAUCE_ACCESS_KEY, - build: process.env.TRAVIS_JOB_ID -}) - -const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed' -const browsersFile = require(path.resolve(__dirname, './sauce_browsers.json')) -let jobsDone = 0 -let jobsSucceeded = 0 - -const waitingCallback = (error, body, id) => { - if (error) { - console.error(error) - process.exit(1) - } - - if (typeof body !== 'undefined') { - if (!body.completed) { - setTimeout(() => { - jsUnitSaucelabs.getStatus(id, (error, body) => { - waitingCallback(error, body, id) - }) - }, 2000) - } else { - const test = body['js tests'][0] - let passed = false - let errorStr = false - - if (test.result !== null) { - if (typeof test.result === 'string' && test.result === 'Test exceeded maximum duration') { - errorStr = test.result - } else { - passed = test.result.total === test.result.passed - } - } - - console.log(`Tested ${testURL}`) - console.log(`Platform: ${test.platform.join(', ')}`) - console.log(`Passed: ${passed.toString()}`) - console.log(`URL: ${test.url}\n`) - if (errorStr) { - console.error(errorStr) - } - - if (passed) { - jobsSucceeded++ - } - jobsDone++ - - // Exit - if (jobsDone === browsersFile.length - 1) { - jsUnitSaucelabs.stop() - if (jobsDone > jobsSucceeded) { - const failedTest = jobsDone - jobsSucceeded - throw new Error(`Some test(s) failed (${failedTest})`) - } - - console.log('All tests passed') - process.exit(0) - } - } - } -} - -jsUnitSaucelabs.on('tunnelCreated', () => { - browsersFile.forEach((tmpBrowser) => { - const browsersPlatform = typeof tmpBrowser.platform === 'undefined' ? tmpBrowser.platformName : tmpBrowser.platform - const browsersArray = [browsersPlatform, tmpBrowser.browserName, tmpBrowser.version] - - jsUnitSaucelabs.start([browsersArray], testURL, 'qunit', (error, success) => { - if (typeof success !== 'undefined') { - const taskIds = success['js tests'] - - if (!taskIds || taskIds.length === 0) { - throw new Error('Error starting tests through Sauce Labs API') - } - - taskIds.forEach((id) => { - jsUnitSaucelabs.getStatus(id, (error, body) => { - waitingCallback(error, body, id) - }) - }) - } else { - console.error(error) - } - }) - }) -}) - -jsUnitSaucelabs.initTunnel() diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/ship.sh b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/ship.sh deleted file mode 100644 index d252cd38..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/ship.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash -# -# Usage -# --------------- -# 1. Clone second version of Bootstrap in sibling directory named `bs-docs`. -# 2. Within `bs-docs` copy, switch to `gh-pages` branch. -# 3. Pull latest, re-bundle, re-npm. -# 4. Run script. - -red=$'\e[1;31m' -green=$'\e[1;32m' -blue=$'\e[1;34m' -magenta=$'\e[1;35m' -cyan=$'\e[1;36m' -end=$'\e[0m' - -# Get current version from package.json -current_version=$(node -p "require('./package.json').version") - -if [[ $# -lt 1 ]]; then - printf "\n${red}⚠️ Shipping aborted. You must specify a version.\n${end}" - exit 1 -fi - -# Pulling latest changes, just to be sure -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Pulling latest changes...${end}" -printf "\n${magenta}=======================================================\n\n${end}" -git pull origin v4-dev - -# Update version number -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Updating version number...${end}" -printf "\n${magenta}=======================================================\n${end}" -npm run release-version $current_version $1 - -# Compile latest CSS and JS -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Compile latest CSS and JS...${end}" -printf "\n${magenta}=======================================================\n${end}" -npm run dist - -# Generate the SRI hashes -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Generate the SRI hashes...${end}" -printf "\n${magenta}=======================================================\n${end}" -npm run release-sri - -# Compress the dist files -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Compressing the dist files...${end}" -printf "\n${magenta}=======================================================\n${end}" -npm run release-zip - -# Compile the docs -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Compile hosted documentation...${end}" -printf "\n${magenta}=======================================================\n${end}" -npm run docs-github - -# Copy the contents of the built docs site over to `bs-docs` repo -printf "\n${magenta}=======================================================${end}" -printf "\n${magenta}Copy it over...${end}" -printf "\n${magenta}=======================================================\n${end}" -cp -rf _gh_pages/. ../bs-docs/ -printf "\nDone!\n" - -printf "\n${green}=======================================================${end}" -printf "\n${green}Success, $1 is ready to review and publish.${end}" -printf "\n${green}=======================================================\n\n${end}" diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/upload-preview.sh b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/upload-preview.sh deleted file mode 100644 index 08edc351..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/upload-preview.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Upload built docs to preview.twbsapps.com - -# Add build metadata to version -sed -i "/^current_version:/ s/\$/+pr.${TRAVIS_COMMIT}/" _config.yml -bundle exec jekyll build --destination "$TRAVIS_COMMIT" --baseurl "/c/${TRAVIS_COMMIT}" - -openssl aes-256-cbc -K $encrypted_2b749c8e6327_key -iv $encrypted_2b749c8e6327_iv -in build/gcp-key.json.enc -out build/gcp-key.json -d -gcloud auth activate-service-account "$GCP_SERVICE_ACCOUNT" --key-file build/gcp-key.json &> /dev/null || (echo 'GCP login failed!'; exit 1) - -echo "Uploading to http://preview.twbsapps.com/c/${TRAVIS_COMMIT} ..." -time gsutil -q -m cp -z html,css,js,svg -r "./${TRAVIS_COMMIT}" gs://preview.twbsapps.com/c/ -echo 'Done.' diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/vnu-jar.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/vnu-jar.js deleted file mode 100644 index 9a1d9fa1..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/build/vnu-jar.js +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env node - -/*! - * Script to run vnu-jar if Java is available. - * Copyright 2017-2018 The Bootstrap Authors - * Copyright 2017-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -'use strict' - -const childProcess = require('child_process') -const vnu = require('vnu-jar') - -childProcess.exec('java -version', (error, stdout, stderr) => { - if (error) { - console.error('Skipping vnu-jar test; Java is missing.') - return - } - - const is32bitJava = !stderr.match(/64-Bit/) - - // vnu-jar accepts multiple ignores joined with a `|`. - // Also note that the ignores are regular expressions. - const ignores = [ - // "autocomplete" is included in
      ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",u="out",d={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},p="fade",g="show",m=".tooltip-inner",_=".arrow",v="hover",E="focus",y="click",b="manual",T=function(){function s(t,e){if("undefined"==typeof Ot)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var T=s.prototype;return T.enable=function(){this._isEnabled=!0},T.disable=function(){this._isEnabled=!1},T.toggleEnabled=function(){this._isEnabled=!this._isEnabled},T.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(g))return void this._leave(null,this);this._enter(null,this)}},T.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},T.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var r=this.getTipElement(),o=k.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(p);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(a);this.addAttachmentClass(l);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Ot(this.element,r,{placement:l,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:_},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(g),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var h=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===u&&e._leave(null,e)};k.supportsTransitionEnd()&&t(this.tip).hasClass(p)?t(this.tip).one(k.TRANSITION_END,h).emulateTransitionEnd(s._TRANSITION_DURATION):h()}},T.hide=function(e){var n=this,i=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),o=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(i).removeClass(g),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[E]=!1,this._activeTrigger[v]=!1,k.supportsTransitionEnd()&&t(this.tip).hasClass(p)?t(i).one(k.TRANSITION_END,o).emulateTransitionEnd(150):o(),this._hoverState="")},T.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},T.isWithContent=function(){return Boolean(this.getTitle())},T.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},T.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},T.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(p+" "+g)},T.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},T.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},T._getAttachment=function(t){return c[t.toUpperCase()]},T._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==b){var i=n===v?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===v?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(r,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},T._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},T._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?E:v]=!0),t(n.getTipElement()).hasClass(g)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},T._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?E:v]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=u,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===u&&n.hide()},n.config.delay.hide):n.hide())},T._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},T._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),k.typeCheckConfig(e,n,this.constructor.DefaultType),n},T._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},T._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},T._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},T._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(p),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},s._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),r="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new s(this,r),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},i(s,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return h}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return d}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return l}}]),s}();return t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=s,T._jQueryInterface},T}(e),Pt=function(t){var e="popover",n="bs.popover",o="."+n,s=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},Lt.Default,{placement:"right",trigger:"click",content:"",template:''}),c=r({},Lt.DefaultType,{content:"(string|element|function)"}),h="fade",f="show",u=".popover-header",d=".popover-body",p={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g=function(r){var s,g;function m(){return r.apply(this,arguments)||this}g=r,(s=m).prototype=Object.create(g.prototype),s.prototype.constructor=s,s.__proto__=g;var _=m.prototype;return _.isWithContent=function(){return this.getTitle()||this._getContent()},_.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},_.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},_.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(u),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(h+" "+f)},_._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},_._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},m._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),r="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new m(this,r),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},i(m,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return c}}]),m}(Lt);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=s,g._jQueryInterface},g}(e),xt=function(t){var e="scrollspy",n="bs.scrollspy",o="."+n,s=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},c={ACTIVATE:"activate"+o,SCROLL:"scroll"+o,LOAD_DATA_API:"load"+o+".data-api"},h="dropdown-item",f="active",u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",p="position",g=function(){function s(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(c.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=s.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:p,i="auto"===this._config.method?n:this._config.method,r=i===p?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,o=k.getSelectorFromElement(e);if(o&&(n=t(o)[0]),n){var s=n.getBoundingClientRect();if(s.width||s.height)return[t(n)[i]().top+r,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(o),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=k.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return k.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=k,t.Alert=L,t.Button=P,t.Carousel=x,t.Collapse=R,t.Dropdown=Nt,t.Modal=kt,t.Popover=Pt,t.Scrollspy=xt,t.Tab=Rt,t.Tooltip=Lt,Object.defineProperty(t,"__esModule",{value:!0})}); -//# sourceMappingURL=bootstrap.bundle.min.js.map \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/dist/js/bootstrap.bundle.min.js.map b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/dist/js/bootstrap.bundle.min.js.map deleted file mode 100644 index c234ff2c..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/dist/js/bootstrap.bundle.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../rollupPluginBabelHelpers","../../node_modules/popper.js/dist/esm/popper.js","../../js/src/util.js","../../js/src/alert.js","../../js/src/button.js","../../js/src/carousel.js","../../js/src/collapse.js","../../js/src/dropdown.js","../../js/src/modal.js","../../js/src/tooltip.js","../../js/src/popover.js","../../js/src/scrollspy.js","../../js/src/tab.js","../../js/src/index.js"],"names":["_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","Constructor","protoProps","staticProps","prototype","_extends","assign","arguments","source","hasOwnProperty","call","apply","this","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","Event","ClassName","Alert","DATA_API_KEY","Selector","Button","Util","transition","transitionEndEmulator","duration","called","one","TRANSITION_END","triggerTransitionEnd","_this","prefix","Math","random","document","getElementById","element","selector","getAttribute","charAt","escapeSelector","substr","replace","find","err","offsetHeight","trigger","end","Boolean","obj","nodeType","componentName","config","configTypes","property","expectedTypes","value","valueType","isElement","toString","match","toLowerCase","RegExp","test","Error","toUpperCase","window","QUnit","fn","emulateTransitionEnd","supportsTransitionEnd","event","special","is","handleObj","handler","_element","close","rootElement","_getRootElement","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","getSelectorFromElement","parent","closest","closeEvent","CLOSE","removeClass","hasClass","_destroyElement","detach","CLOSED","remove","_jQueryInterface","each","$element","data","_handleDismiss","alertInstance","preventDefault","on","CLICK_DATA_API","noConflict","toggle","triggerChangeEvent","addAriaPressed","input","type","checked","activeElement","hasAttribute","classList","contains","focus","setAttribute","toggleClass","button","FOCUS_BLUR_DATA_API","Carousel","Default","DefaultType","Direction","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","_config","_getConfig","_indicatorsElement","INDICATORS","_addEventListeners","next","_slide","nextWhenVisible","hidden","css","prev","pause","NEXT_PREV","cycle","interval","setInterval","visibilityState","bind","to","index","ACTIVE_ITEM","activeIndex","_getItemIndex","SLID","direction","off","typeCheckConfig","keyboard","KEYDOWN","_this2","_keydown","MOUSEENTER","MOUSELEAVE","documentElement","TOUCHEND","setTimeout","tagName","which","makeArray","ITEM","indexOf","_getItemByDirection","isNextDirection","isPrevDirection","lastItemIndex","wrap","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","slideEvent","SLIDE","_setActiveIndicatorElement","ACTIVE","nextIndicator","children","addClass","directionalClassName","orderClassName","activeElementIndex","nextElement","nextElementIndex","isCycling","slidEvent","reflow","_this3","action","slide","TypeError","_dataApiClickHandler","slideIndex","DATA_SLIDE","LOAD_DATA_API","DATA_RIDE","$carousel","Collapse","Dimension","_isTransitioning","_triggerArray","id","tabToggles","DATA_TOGGLE","elem","filter","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","hide","show","actives","activesData","ACTIVES","not","startEvent","SHOW","dimension","_getDimension","style","attr","setTransitioning","complete","SHOWN","scrollSize","slice","HIDE","getBoundingClientRect","HIDDEN","isTransitioning","jquery","_getTargetFromElement","triggerArray","isOpen","$this","currentTarget","$trigger","$target","isBrowser","longerTimeoutBrowsers","timeoutDuration","navigator","userAgent","debounce","Promise","resolve","then","scheduled","isFunction","functionToCheck","getStyleComputedProperty","getComputedStyle","getParentNode","nodeName","parentNode","host","getScrollParent","body","ownerDocument","_getStyleComputedProp","overflow","overflowX","overflowY","getOffsetParent","offsetParent","getRoot","node","findCommonOffsetParent","element1","element2","order","compareDocumentPosition","Node","DOCUMENT_POSITION_FOLLOWING","start","range","createRange","setStart","setEnd","commonAncestorContainer","firstElementChild","element1root","getScroll","upperSide","undefined","html","scrollingElement","getBordersSize","styles","axis","sideA","sideB","parseFloat","isIE10","isIE10$1","appVersion","getSize","computedStyle","max","getWindowSizes","height","width","classCallCheck","instance","createClass","defineProperties","getClientRect","offsets","right","left","bottom","top","rect","scrollTop","scrollLeft","result","sizes","clientWidth","clientHeight","horizScrollbar","offsetWidth","vertScrollbar","getOffsetRectRelativeToArbitraryNode","isHTML","childrenRect","parentRect","scrollParent","borderTopWidth","borderLeftWidth","marginTop","marginLeft","subtract","modifier","includeScroll","getBoundaries","popper","reference","padding","boundariesElement","relativeOffset","boundaries","innerWidth","innerHeight","boundariesNode","isFixed","_getWindowSizes","computeAutoPlacement","placement","refRect","rects","sortedAreas","keys","map","area","_ref","sort","a","b","filteredAreas","_ref2","computedPlacement","variation","split","getReferenceOffsets","state","getOuterSizes","x","marginBottom","y","marginRight","getOppositePlacement","hash","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","arr","check","Array","runModifiers","modifiers","ends","prop","findIndex","cur","forEach","console","warn","enabled","isModifierEnabled","modifierName","some","name","getSupportedPropertyName","prefixes","upperProp","toCheck","getWindow","defaultView","setupEventListeners","options","updateBound","addEventListener","passive","scrollElement","attachToScrollParents","callback","scrollParents","isBody","eventsEnabled","disableEventListeners","cancelAnimationFrame","scheduleUpdate","removeEventListener","isNumeric","n","isNaN","isFinite","setStyles","unit","isModifierRequired","requestingName","requestedName","requesting","isRequired","_requesting","requested","placements","validPlacements","clockwise","counter","concat","reverse","BEHAVIORS","FLIP","CLOCKWISE","COUNTERCLOCKWISE","parseOffset","offset","basePlacement","useHeight","fragments","frag","trim","divider","search","splitRegex","ops","op","mergeWithPrevious","reduce","str","toValue","index2","Defaults","removeOnDestroy","onCreate","onUpdate","shift","shiftvariation","_data$offsets","isVertical","side","shiftOffsets","preventOverflow","priority","primary","escapeWithReference","secondary","min","keepTogether","floor","opSide","arrow","_data$offsets$arrow","arrowElement","querySelector","len","sideCapitalized","altSide","arrowElementSize","center","popperMarginSide","popperBorderSide","sideValue","round","flip","flipped","originalPlacement","placementOpposite","flipOrder","behavior","step","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariation","flipVariations","inner","subtractLength","bound","attributes","computeStyle","legacyGpuAccelerationOption","gpuAcceleration","offsetParentRect","position","prefixedProperty","willChange","invertTop","invertLeft","x-placement","arrowStyles","applyStyle","removeAttribute","onLoad","modifierOptions","Popper","requestAnimationFrame","update","isDestroyed","isCreated","enableEventListeners","removeChild","Utils","global","PopperUtils","Dropdown","REGEXP_KEYDOWN","ARROW_UP_KEYCODE","AttachmentMap","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","disabled","_getParentFromElement","isActive","_clearMenus","showEvent","boundary","_getPopperConfig","noop","destroy","CLICK","stopPropagation","constructor","_getPlacement","$parentDropdown","offsetConf","toggles","context","dropdownMenu","hideEvent","_dataApiKeydownHandler","items","get","KEYDOWN_DATA_API","KEYUP_DATA_API","e","Modal","_dialog","DIALOG","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_originalBodyPadding","_scrollbarWidth","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","CLICK_DISMISS","DATA_DISMISS","MOUSEDOWN_DISMISS","MOUSEUP_DISMISS","_showBackdrop","_showElement","FOCUSIN","_hideModal","handleUpdate","ELEMENT_NODE","appendChild","display","_enforceFocus","shownEvent","transitionComplete","_this4","has","KEYDOWN_DISMISS","RESIZE","_this6","_resetAdjustments","_resetScrollbar","_this7","_removeBackdrop","animate","backdrop","doAnimate","createElement","className","appendTo","_this8","callbackRemove","isModalOverflowing","scrollHeight","paddingLeft","paddingRight","_getScrollbarWidth","FIXED_CONTENT","actualPadding","calculatedPadding","_this9","STICKY_CONTENT","actualMargin","calculatedMargin","NAVBAR_TOGGLER","margin","scrollDiv","scrollbarWidth","Tooltip","BSCLS_PREFIX_REGEX","HoverState","Trigger","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","enable","disable","toggleEnabled","dataKey","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","isWithContent","isInTheDom","tipId","getUID","setContent","animation","attachment","_getAttachment","addAttachmentClass","container","INSERTED","fallbackPlacement","_handlePopperPlacementChange","_fixTransition","prevHoverState","_TRANSITION_DURATION","_cleanTipClass","getTitle","CLASS_PREFIX","template","$tip","setElementContent","content","empty","append","text","title","eventIn","eventOut","FOCUSOUT","_fixTitle","titleType","delay","tabClass","join","initConfigAnimation","Popover","subClass","superClass","create","__proto__","_getContent","ScrollSpy","OffsetMethod","_scrollElement","NAV_LINKS","LIST_ITEMS","DROPDOWN_ITEMS","_offsets","_targets","_activeTarget","_scrollHeight","SCROLL","_process","refresh","autoMethod","offsetMethod","method","offsetBase","_getScrollTop","_getScrollHeight","targetSelector","targetBCR","item","pageYOffset","_getOffsetHeight","maxScroll","_activate","_clear","queries","$link","DROPDOWN","DROPDOWN_TOGGLE","parents","NAV_LIST_GROUP","NAV_ITEMS","ACTIVATE","scrollSpys","DATA_SPY","$spy","Tab","previous","listElement","itemSelector","hiddenEvent","active","_transitionComplete","dropdownChild","dropdownElement","version"],"mappings":";;;;;kOAEA,SAASA,EAAkBC,EAAQC,GACjC,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CACrC,IAAIE,EAAaH,EAAMC,GACvBE,EAAWC,WAAaD,EAAWC,aAAc,EACjDD,EAAWE,cAAe,EACtB,UAAWF,IAAYA,EAAWG,UAAW,GACjDC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAIlD,SAASO,EAAaC,EAAaC,EAAYC,GAG7C,OAFID,GAAYd,EAAkBa,EAAYG,UAAWF,GACrDC,GAAaf,EAAkBa,EAAaE,GACzCF,EAGT,SAASI,IAeP,OAdAA,EAAWR,OAAOS,QAAU,SAAUjB,GACpC,IAAK,IAAIE,EAAI,EAAGA,EAAIgB,UAAUf,OAAQD,IAAK,CACzC,IAAIiB,EAASD,UAAUhB,GAEvB,IAAK,IAAIQ,KAAOS,EACVX,OAAOO,UAAUK,eAAeC,KAAKF,EAAQT,KAC/CV,EAAOU,GAAOS,EAAOT,IAK3B,OAAOV,IAGOsB,MAAMC,KAA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1BlB,UACCqE,GAAGvF,EAAMwF,eAAgBpF,EAAsB,SAAUmD,KAClD+B,mBACFN,iBAAiBxF,KAAKG,EAAED,MAAO,YASrC0D,GAAF,IAAasqB,EAAI1oB,mBACf5B,GAAF,IAAWrE,YAAc2uB,IACvBtqB,GAAF,IAAWqC,WAAa,oBACpBrC,GAAF,IAAarD,EACN2tB,EAAI1oB,kBAGN0oB,EAzPI,CA0PV/tB,IChPH,SAAEA,MACiB,oBAANA,QACH,IAAI8L,UAAU,sGAGhB0iB,EAAUxuB,EAAEyD,GAAG+K,OAAOoI,MAAM,KAAK,GAAGA,MAAM,QAO5C4X,EAAQ,GALI,GAKYA,EAAQ,GAJnB,GAFA,IAMoCA,EAAQ,IAJ5C,IAI+DA,EAAQ,IAAmBA,EAAQ,GAHlG,GAGmHA,EAAQ,IAF3H,QAGT,IAAInrB,MAAM,+EAbpB,CAeGrD","sourcesContent":["export { _createClass as createClass, _extends as extends, _inheritsLoose as inheritsLoose };\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.12.9\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\nvar timeoutDuration = 0;\nfor (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n timeoutDuration = 1;\n break;\n }\n}\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var css = getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n // NOTE: 1 DOM access here\n var offsetParent = element && element.offsetParent;\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n if (element) {\n return element.ownerDocument.documentElement;\n }\n\n return document.documentElement;\n }\n\n // .offsetParent will return the closest TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);\n}\n\n/**\n * Tells if you are running Internet Explorer 10\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean} isIE10\n */\nvar isIE10 = undefined;\n\nvar isIE10$1 = function () {\n if (isIE10 === undefined) {\n isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1;\n }\n return isIE10;\n};\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);\n}\n\nfunction getWindowSizes() {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE10$1() && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n if (isIE10$1()) {\n try {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } catch (err) {}\n } else {\n rect = element.getBoundingClientRect();\n }\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};\n var width = sizes.width || element.clientWidth || result.right - result.left;\n var height = sizes.height || element.clientHeight || result.bottom - result.top;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var isIE10 = isIE10$1();\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth, 10);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);\n\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop, 10);\n var marginLeft = parseFloat(styles.marginLeft, 10);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = getScroll(html);\n var scrollLeft = getScroll(html, 'left');\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n return isFixed(getParentNode(element));\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n // NOTE: 1 DOM access here\n var boundaries = { top: 0, left: 0 };\n var offsetParent = findCommonOffsetParent(popper, reference);\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n boundaries.left += padding;\n boundaries.top += padding;\n boundaries.right -= padding;\n boundaries.bottom -= padding;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var commonOffsetParent = findCommonOffsetParent(popper, reference);\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var styles = getComputedStyle(element);\n var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);\n var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
      \n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n data.offsets.popper.position = 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length - 1; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroy the popper\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.left = '';\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicity asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger onUpdate callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper.\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n // floor sides to avoid blurry text\n var offsets = {\n left: Math.floor(popper.left),\n top: Math.floor(popper.top),\n bottom: Math.floor(popper.bottom),\n right: Math.floor(popper.right)\n };\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n top = -offsetParentRect.height + offsets.bottom;\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n left = -offsetParentRect.width + offsets.right;\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.
      \n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjuction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.
      \n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.
      \n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-right` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
      \n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.
      \n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
      \n * It will read the variation of the `placement` property.
      \n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unitless, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.
      \n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the height.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.
      \n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
      \n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * An scenario exists where the reference itself is not within the boundaries.
      \n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
      \n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper this makes sure the popper has always a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier, can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near eachothers\n * without leaving any gap between the two. Expecially useful when the arrow is\n * enabled and you want to assure it to point to its reference element.\n * It cares only about the first axis, you can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjuction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations).\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position,\n * the popper will never be placed outside of the defined boundaries\n * (except if keepTogether is enabled)\n */\n boundariesElement: 'viewport'\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3d transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties.\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define you own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3d transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties.\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the informations used by Popper.js\n * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements.\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.
      \n * These can be overriden using the `options` argument of Popper.js.
      \n * To override an option, simply pass as 3rd argument an object with the same\n * structure of this object, example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Whether events (resize, scroll) are initially enabled\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.
      \n * By default, is set to no-op.
      \n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated, this callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.
      \n * By default, is set to no-op.
      \n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Create a new Popper.js instance\n * @class Popper\n * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper.\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedule an update, it will run on the next UI update available\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.
      \n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\nexport default Popper;\n//# sourceMappingURL=popper.js.map\n","import $ from 'jquery'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Util = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\n let transition = false\n\n const MAX_UID = 1000000\n\n // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n function toType(obj) {\n return {}.toString.call(obj).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()\n }\n\n function getSpecialTransitionEndEvent() {\n return {\n bindType: transition.end,\n delegateType: transition.end,\n handle(event) {\n if ($(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n }\n return undefined // eslint-disable-line no-undefined\n }\n }\n }\n\n function transitionEndTest() {\n if (typeof window !== 'undefined' && window.QUnit) {\n return false\n }\n\n return {\n end: 'transitionend'\n }\n }\n\n function transitionEndEmulator(duration) {\n let called = false\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true\n })\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this)\n }\n }, duration)\n\n return this\n }\n\n function setTransitionEndSupport() {\n transition = transitionEndTest()\n\n $.fn.emulateTransitionEnd = transitionEndEmulator\n\n if (Util.supportsTransitionEnd()) {\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n }\n }\n\n function escapeId(selector) {\n // We escape IDs in case of special selectors (selector = '#myId:something')\n // $.escapeSelector does not exist in jQuery < 3\n selector = typeof $.escapeSelector === 'function' ? $.escapeSelector(selector).substr(1)\n : selector.replace(/(:|\\.|\\[|\\]|,|=|@)/g, '\\\\$1')\n\n return selector\n }\n\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n const Util = {\n\n TRANSITION_END: 'bsTransitionEnd',\n\n getUID(prefix) {\n do {\n // eslint-disable-next-line no-bitwise\n prefix += ~~(Math.random() * MAX_UID) // \"~~\" acts like a faster Math.floor() here\n } while (document.getElementById(prefix))\n return prefix\n },\n\n getSelectorFromElement(element) {\n let selector = element.getAttribute('data-target')\n if (!selector || selector === '#') {\n selector = element.getAttribute('href') || ''\n }\n\n // If it's an ID\n if (selector.charAt(0) === '#') {\n selector = escapeId(selector)\n }\n\n try {\n const $selector = $(document).find(selector)\n return $selector.length > 0 ? selector : null\n } catch (err) {\n return null\n }\n },\n\n reflow(element) {\n return element.offsetHeight\n },\n\n triggerTransitionEnd(element) {\n $(element).trigger(transition.end)\n },\n\n supportsTransitionEnd() {\n return Boolean(transition)\n },\n\n isElement(obj) {\n return (obj[0] || obj).nodeType\n },\n\n typeCheckConfig(componentName, config, configTypes) {\n for (const property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && Util.isElement(value)\n ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n }\n }\n }\n }\n\n setTransitionEndSupport()\n\n return Util\n})($)\n\nexport default Util\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Alert = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'alert'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.alert'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Selector = {\n DISMISS : '[data-dismiss=\"alert\"]'\n }\n\n const Event = {\n CLOSE : `close${EVENT_KEY}`,\n CLOSED : `closed${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n ALERT : 'alert',\n FADE : 'fade',\n SHOW : 'show'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Alert {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n close(element) {\n element = element || this._element\n\n const rootElement = this._getRootElement(element)\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _getRootElement(element) {\n const selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n if (!parent) {\n parent = $(element).closest(`.${ClassName.ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n const closeEvent = $.Event(Event.CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(ClassName.SHOW)\n\n if (!Util.supportsTransitionEnd() ||\n !$(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element)\n return\n }\n\n $(element)\n .one(Util.TRANSITION_END, (event) => this._destroyElement(element, event))\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(Event.CLOSED)\n .remove()\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(\n Event.CLICK_DATA_API,\n Selector.DISMISS,\n Alert._handleDismiss(new Alert())\n )\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Alert._jQueryInterface\n $.fn[NAME].Constructor = Alert\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n }\n\n return Alert\n})($)\n\nexport default Alert\n","import $ from 'jquery'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Button = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'button'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.button'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const ClassName = {\n ACTIVE : 'active',\n BUTTON : 'btn',\n FOCUS : 'focus'\n }\n\n const Selector = {\n DATA_TOGGLE_CARROT : '[data-toggle^=\"button\"]',\n DATA_TOGGLE : '[data-toggle=\"buttons\"]',\n INPUT : 'input',\n ACTIVE : '.active',\n BUTTON : '.btn'\n }\n\n const Event = {\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` +\n `blur${EVENT_KEY}${DATA_API_KEY}`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Button {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n toggle() {\n let triggerChangeEvent = true\n let addAriaPressed = true\n const rootElement = $(this._element).closest(\n Selector.DATA_TOGGLE\n )[0]\n\n if (rootElement) {\n const input = $(this._element).find(Selector.INPUT)[0]\n\n if (input) {\n if (input.type === 'radio') {\n if (input.checked &&\n $(this._element).hasClass(ClassName.ACTIVE)) {\n triggerChangeEvent = false\n } else {\n const activeElement = $(rootElement).find(Selector.ACTIVE)[0]\n\n if (activeElement) {\n $(activeElement).removeClass(ClassName.ACTIVE)\n }\n }\n }\n\n if (triggerChangeEvent) {\n if (input.hasAttribute('disabled') ||\n rootElement.hasAttribute('disabled') ||\n input.classList.contains('disabled') ||\n rootElement.classList.contains('disabled')) {\n return\n }\n input.checked = !$(this._element).hasClass(ClassName.ACTIVE)\n $(input).trigger('change')\n }\n\n input.focus()\n addAriaPressed = false\n }\n }\n\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed',\n !$(this._element).hasClass(ClassName.ACTIVE))\n }\n\n if (triggerChangeEvent) {\n $(this._element).toggleClass(ClassName.ACTIVE)\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n event.preventDefault()\n\n let button = event.target\n\n if (!$(button).hasClass(ClassName.BUTTON)) {\n button = $(button).closest(Selector.BUTTON)\n }\n\n Button._jQueryInterface.call($(button), 'toggle')\n })\n .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n const button = $(event.target).closest(Selector.BUTTON)[0]\n $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Button._jQueryInterface\n $.fn[NAME].Constructor = Button\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Button._jQueryInterface\n }\n\n return Button\n})($)\n\nexport default Button\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Carousel = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'carousel'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.carousel'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key\n const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key\n const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\n\n const Default = {\n interval : 5000,\n keyboard : true,\n slide : false,\n pause : 'hover',\n wrap : true\n }\n\n const DefaultType = {\n interval : '(number|boolean)',\n keyboard : 'boolean',\n slide : '(boolean|string)',\n pause : '(string|boolean)',\n wrap : 'boolean'\n }\n\n const Direction = {\n NEXT : 'next',\n PREV : 'prev',\n LEFT : 'left',\n RIGHT : 'right'\n }\n\n const Event = {\n SLIDE : `slide${EVENT_KEY}`,\n SLID : `slid${EVENT_KEY}`,\n KEYDOWN : `keydown${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`,\n TOUCHEND : `touchend${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'carousel-item-right',\n LEFT : 'carousel-item-left',\n NEXT : 'carousel-item-next',\n PREV : 'carousel-item-prev',\n ITEM : 'carousel-item'\n }\n\n const Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n NEXT_PREV : '.carousel-item-next, .carousel-item-prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel {\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n\n this._isPaused = false\n this._isSliding = false\n\n this.touchTimeout = null\n\n this._config = this._getConfig(config)\n this._element = $(element)[0]\n this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden &&\n ($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if ($(this._element).find(Selector.NEXT_PREV)[0] &&\n Util.supportsTransitionEnd()) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex\n ? Direction.NEXT\n : Direction.PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n $(this._element).off(EVENT_KEY)\n $.removeData(this._element, DATA_KEY)\n\n this._items = null\n this._config = null\n this._element = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on(Event.KEYDOWN, (event) => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n $(this._element)\n .on(Event.MOUSEENTER, (event) => this.pause(event))\n .on(Event.MOUSELEAVE, (event) => this.cycle(event))\n if ('ontouchstart' in document.documentElement) {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n $(this._element).on(Event.TOUCHEND, () => {\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n this.touchTimeout = setTimeout((event) => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n })\n }\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n switch (event.which) {\n case ARROW_LEFT_KEYCODE:\n event.preventDefault()\n this.prev()\n break\n case ARROW_RIGHT_KEYCODE:\n event.preventDefault()\n this.next()\n break\n default:\n }\n }\n\n _getItemIndex(element) {\n this._items = $.makeArray($(element).parent().find(Selector.ITEM))\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n const isNextDirection = direction === Direction.NEXT\n const isPrevDirection = direction === Direction.PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = isPrevDirection && activeIndex === 0 ||\n isNextDirection && activeIndex === lastItemIndex\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = direction === Direction.PREV ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1\n ? this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0])\n const slideEvent = $.Event(Event.SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n $(this._indicatorsElement)\n .find(Selector.ACTIVE)\n .removeClass(ClassName.ACTIVE)\n\n const nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(ClassName.ACTIVE)\n }\n }\n }\n\n _slide(direction, element) {\n const activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || activeElement &&\n this._getItemByDirection(direction, activeElement)\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n let directionalClassName\n let orderClassName\n let eventDirectionName\n\n if (direction === Direction.NEXT) {\n directionalClassName = ClassName.LEFT\n orderClassName = ClassName.NEXT\n eventDirectionName = Direction.LEFT\n } else {\n directionalClassName = ClassName.RIGHT\n orderClassName = ClassName.PREV\n eventDirectionName = Direction.RIGHT\n }\n\n if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n\n const slidEvent = $.Event(Event.SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n\n if (Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.SLIDE)) {\n $(nextElement).addClass(orderClassName)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(`${directionalClassName} ${orderClassName}`)\n .addClass(ClassName.ACTIVE)\n\n $(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n })\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n $(activeElement).removeClass(ClassName.ACTIVE)\n $(nextElement).addClass(ClassName.ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = {\n ...Default,\n ...$(this).data()\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n data[action]()\n } else if (_config.interval) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n const selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n const target = $(selector)[0]\n\n if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n return\n }\n\n const config = {\n ...$(target).data(),\n ...$(this).data()\n }\n const slideIndex = this.getAttribute('data-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_RIDE).each(function () {\n const $carousel = $(this)\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n })\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Carousel._jQueryInterface\n $.fn[NAME].Constructor = Carousel\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n }\n\n return Carousel\n})($)\n\nexport default Carousel\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Collapse = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'collapse'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.collapse'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n toggle : true,\n parent : ''\n }\n\n const DefaultType = {\n toggle : 'boolean',\n parent : '(string|element)'\n }\n\n const Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SHOW : 'show',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n }\n\n const Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n }\n\n const Selector = {\n ACTIVES : '.show, .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse {\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = $.makeArray($(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n const tabToggles = $(Selector.DATA_TOGGLE)\n for (let i = 0; i < tabToggles.length; i++) {\n const elem = tabToggles[i]\n const selector = Util.getSelectorFromElement(elem)\n if (selector !== null && $(selector).filter(element).length > 0) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle() {\n if ($(this._element).hasClass(ClassName.SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = $.makeArray(\n $(this._parent)\n .find(Selector.ACTIVES)\n .filter(`[data-parent=\"${this._config.parent}\"]`)\n )\n if (actives.length === 0) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).not(this._selector).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n const dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length > 0) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n const startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.SHOW)\n\n if (this._triggerArray.length > 0) {\n for (let i = 0; i < this._triggerArray.length; i++) {\n const trigger = this._triggerArray[i]\n const selector = Util.getSelectorFromElement(trigger)\n if (selector !== null) {\n const $elem = $(selector)\n if (!$elem.hasClass(ClassName.SHOW)) {\n $(trigger).addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n const hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent = null\n if (Util.isElement(this._config.parent)) {\n parent = this._config.parent\n\n // It's a jQuery object\n if (typeof this._config.parent.jquery !== 'undefined') {\n parent = this._config.parent[0]\n }\n } else {\n parent = $(this._config.parent)[0]\n }\n\n const selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n $(parent).find(selector).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n const isOpen = $(element).hasClass(ClassName.SHOW)\n\n if (triggerArray.length > 0) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n }\n\n // Static\n\n static _getTargetFromElement(element) {\n const selector = Util.getSelectorFromElement(element)\n return selector ? $(selector)[0] : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n const _config = {\n ...Default,\n ...$this.data(),\n ...typeof config === 'object' && config\n }\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n // preventDefault only for
      elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault()\n }\n\n const $trigger = $(this)\n const selector = Util.getSelectorFromElement(this)\n $(selector).each(function () {\n const $target = $(this)\n const data = $target.data(DATA_KEY)\n const config = data ? 'toggle' : $trigger.data()\n Collapse._jQueryInterface.call($target, config)\n })\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n }\n\n return Collapse\n})($)\n\nexport default Collapse\n","import $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Dropdown = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'dropdown'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key\n const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key\n const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\n const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\n const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\n const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`,\n KEYUP_DATA_API : `keyup${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DISABLED : 'disabled',\n SHOW : 'show',\n DROPUP : 'dropup',\n DROPRIGHT : 'dropright',\n DROPLEFT : 'dropleft',\n MENURIGHT : 'dropdown-menu-right',\n MENULEFT : 'dropdown-menu-left',\n POSITION_STATIC : 'position-static'\n }\n\n const Selector = {\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n MENU : '.dropdown-menu',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '.dropdown-menu .dropdown-item:not(.disabled)'\n }\n\n const AttachmentMap = {\n TOP : 'top-start',\n TOPEND : 'top-end',\n BOTTOM : 'bottom-start',\n BOTTOMEND : 'bottom-end',\n RIGHT : 'right-start',\n RIGHTEND : 'right-end',\n LEFT : 'left-start',\n LEFTEND : 'left-end'\n }\n\n const Default = {\n offset : 0,\n flip : true,\n boundary : 'scrollParent'\n }\n\n const DefaultType = {\n offset : '(number|string|function)',\n flip : 'boolean',\n boundary : '(string|element)'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown {\n constructor(element, config) {\n this._element = element\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this._element)\n const isActive = $(this._menu).hasClass(ClassName.SHOW)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return\n }\n\n // Disable totally Popper.js for Dropdown in Navbar\n if (!this._inNavbar) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)')\n }\n let element = this._element\n // For dropup with alignment we use the parent as popper container\n if ($(parent).hasClass(ClassName.DROPUP)) {\n if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {\n element = parent\n }\n }\n // If boundary is not `scrollParent`, then set position to `static`\n // to allow the menu to \"escape\" the scroll parent's boundaries\n // https://github.com/twbs/bootstrap/issues/24251\n if (this._config.boundary !== 'scrollParent') {\n $(parent).addClass(ClassName.POSITION_STATIC)\n }\n this._popper = new Popper(element, this._menu, this._getPopperConfig())\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n $(parent).closest(Selector.NAVBAR_NAV).length === 0) {\n $('body').children().on('mouseover', null, $.noop)\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n $(this._menu).toggleClass(ClassName.SHOW)\n $(parent)\n .toggleClass(ClassName.SHOW)\n .trigger($.Event(Event.SHOWN, relatedTarget))\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n this._menu = null\n if (this._popper !== null) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, (event) => {\n event.preventDefault()\n event.stopPropagation()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...$(this._element).data(),\n ...config\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getMenuElement() {\n if (!this._menu) {\n const parent = Dropdown._getParentFromElement(this._element)\n this._menu = $(parent).find(Selector.MENU)[0]\n }\n return this._menu\n }\n\n _getPlacement() {\n const $parentDropdown = $(this._element).parent()\n let placement = AttachmentMap.BOTTOM\n\n // Handle dropup\n if ($parentDropdown.hasClass(ClassName.DROPUP)) {\n placement = AttachmentMap.TOP\n if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.TOPEND\n }\n } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {\n placement = AttachmentMap.RIGHT\n } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {\n placement = AttachmentMap.LEFT\n } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.BOTTOMEND\n }\n return placement\n }\n\n _detectNavbar() {\n return $(this._element).closest('.navbar').length > 0\n }\n\n _getPopperConfig() {\n const offsetConf = {}\n if (typeof this._config.offset === 'function') {\n offsetConf.fn = (data) => {\n data.offsets = {\n ...data.offsets,\n ...this._config.offset(data.offsets) || {}\n }\n return data\n }\n } else {\n offsetConf.offset = this._config.offset\n }\n const popperConfig = {\n placement: this._getPlacement(),\n modifiers: {\n offset: offsetConf,\n flip: {\n enabled: this._config.flip\n },\n preventOverflow: {\n boundariesElement: this._config.boundary\n }\n }\n }\n\n return popperConfig\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||\n event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n return\n }\n\n const toggles = $.makeArray($(Selector.DATA_TOGGLE))\n for (let i = 0; i < toggles.length; i++) {\n const parent = Dropdown._getParentFromElement(toggles[i])\n const context = $(toggles[i]).data(DATA_KEY)\n const relatedTarget = {\n relatedTarget: toggles[i]\n }\n\n if (!context) {\n continue\n }\n\n const dropdownMenu = context._menu\n if (!$(parent).hasClass(ClassName.SHOW)) {\n continue\n }\n\n if (event && (event.type === 'click' &&\n /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&\n $.contains(parent, event.target)) {\n continue\n }\n\n const hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $('body').children().off('mouseover', null, $.noop)\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(dropdownMenu).removeClass(ClassName.SHOW)\n $(parent)\n .removeClass(ClassName.SHOW)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n const selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n return parent || element.parentNode\n }\n\n // eslint-disable-next-line complexity\n static _dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName)\n ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&\n (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||\n $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this)\n const isActive = $(parent).hasClass(ClassName.SHOW)\n\n if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) ||\n isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n if (event.which === ESCAPE_KEYCODE) {\n const toggle = $(parent).find(Selector.DATA_TOGGLE)[0]\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n const items = $(parent).find(Selector.VISIBLE_ITEMS).get()\n\n if (items.length === 0) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up\n index--\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler)\n .on(`${Event.CLICK_DATA_API} ${Event.KEYUP_DATA_API}`, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n event.stopPropagation()\n Dropdown._jQueryInterface.call($(this), 'toggle')\n })\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n})($, Popper)\n\nexport default Dropdown\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.modal'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\n const Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n }\n\n const DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n SHOW : 'show'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n STICKY_CONTENT : '.sticky-top',\n NAVBAR_TOGGLER : '.navbar-toggler'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isTransitioning || this._isShown) {\n return\n }\n\n if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {\n this._isTransitioning = true\n }\n\n const showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n this._adjustDialog()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n (event) => this.hide(event)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (this._isTransitioning || !this._isShown) {\n return\n }\n\n const hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n const transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)\n\n if (transition) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.SHOW)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n if (transition) {\n $(this._element)\n .one(Util.TRANSITION_END, (event) => this._hideModal(event))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n $(window, document, this._element, this._backdrop).off(EVENT_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._scrollbarWidth = null\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n this._isTransitioning = false\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // Guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n $(this._element).has(event.target).length === 0) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === ESCAPE_KEYCODE) {\n event.preventDefault()\n this.hide()\n }\n })\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, (event) => this.handleUpdate(event))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._isTransitioning = false\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n const animate = $(this._element).hasClass(ClassName.FADE)\n ? ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n const doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.SHOW)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.SHOW)\n\n const callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n } else if (callback) {\n callback()\n }\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect()\n this._isBodyOverflowing = rect.left + rect.right < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n\n // Adjust fixed content padding\n $(Selector.FIXED_CONTENT).each((index, element) => {\n const actualPadding = $(element)[0].style.paddingRight\n const calculatedPadding = $(element).css('padding-right')\n $(element).data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n })\n\n // Adjust sticky content margin\n $(Selector.STICKY_CONTENT).each((index, element) => {\n const actualMargin = $(element)[0].style.marginRight\n const calculatedMargin = $(element).css('margin-right')\n $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)\n })\n\n // Adjust navbar-toggler margin\n $(Selector.NAVBAR_TOGGLER).each((index, element) => {\n const actualMargin = $(element)[0].style.marginRight\n const calculatedMargin = $(element).css('margin-right')\n $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) + this._scrollbarWidth}px`)\n })\n\n // Adjust body padding\n const actualPadding = document.body.style.paddingRight\n const calculatedPadding = $('body').css('padding-right')\n $('body').data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n }\n }\n\n _resetScrollbar() {\n // Restore fixed content padding\n $(Selector.FIXED_CONTENT).each((index, element) => {\n const padding = $(element).data('padding-right')\n if (typeof padding !== 'undefined') {\n $(element).css('padding-right', padding).removeData('padding-right')\n }\n })\n\n // Restore sticky content and navbar-toggler margin\n $(`${Selector.STICKY_CONTENT}, ${Selector.NAVBAR_TOGGLER}`).each((index, element) => {\n const margin = $(element).data('margin-right')\n if (typeof margin !== 'undefined') {\n $(element).css('margin-right', margin).removeData('margin-right')\n }\n })\n\n // Restore body padding\n const padding = $('body').data('padding-right')\n if (typeof padding !== 'undefined') {\n $('body').css('padding-right', padding).removeData('padding-right')\n }\n }\n\n _getScrollbarWidth() { // thx d.walsh\n const scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n // Static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = {\n ...Modal.Default,\n ...$(this).data(),\n ...typeof config === 'object' && config\n }\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n const selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n const config = $(target).data(DATA_KEY)\n ? 'toggle' : {\n ...$(target).data(),\n ...$(this).data()\n }\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault()\n }\n\n const $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // Only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n})($)\n\nexport default Modal\n","import $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tooltip = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tooltip'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.tooltip'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n const CLASS_PREFIX = 'bs-tooltip'\n const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\n const DefaultType = {\n animation : 'boolean',\n template : 'string',\n title : '(string|element|function)',\n trigger : 'string',\n delay : '(number|object)',\n html : 'boolean',\n selector : '(string|boolean)',\n placement : '(string|function)',\n offset : '(number|string)',\n container : '(string|element|boolean)',\n fallbackPlacement : '(string|array)',\n boundary : '(string|element)'\n }\n\n const AttachmentMap = {\n AUTO : 'auto',\n TOP : 'top',\n RIGHT : 'right',\n BOTTOM : 'bottom',\n LEFT : 'left'\n }\n\n const Default = {\n animation : true,\n template : '
      ' +\n '
      ' +\n '
      ',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : 0,\n container : false,\n fallbackPlacement : 'flip',\n boundary : 'scrollParent'\n }\n\n const HoverState = {\n SHOW : 'show',\n OUT : 'out'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n const ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n }\n\n const Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner',\n ARROW : '.arrow'\n }\n\n const Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip {\n constructor(element, config) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)')\n }\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n $(this.element).closest('.modal').off('hide.bs.modal')\n\n if (this.tip) {\n $(this.tip).remove()\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n this._popper = null\n this.element = null\n this.config = null\n this.tip = null\n }\n\n show() {\n if ($(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n const showEvent = $.Event(this.constructor.Event.SHOW)\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n const isInTheDom = $.contains(\n this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n const placement = typeof this.config.placement === 'function'\n ? this.config.placement.call(this, tip, this.element)\n : this.config.placement\n\n const attachment = this._getAttachment(placement)\n this.addAttachmentClass(attachment)\n\n const container = this.config.container === false ? document.body : $(this.config.container)\n\n $(tip).data(this.constructor.DATA_KEY, this)\n\n if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n $(tip).appendTo(container)\n }\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._popper = new Popper(this.element, tip, {\n placement: attachment,\n modifiers: {\n offset: {\n offset: this.config.offset\n },\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: Selector.ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: (data) => {\n if (data.originalPlacement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n },\n onUpdate: (data) => {\n this._handlePopperPlacementChange(data)\n }\n })\n\n $(tip).addClass(ClassName.SHOW)\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n $('body').children().on('mouseover', null, $.noop)\n }\n\n const complete = () => {\n if (this.config.animation) {\n this._fixTransition()\n }\n const prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(Tooltip._TRANSITION_DURATION)\n } else {\n complete()\n }\n }\n }\n\n hide(callback) {\n const tip = this.getTipElement()\n const hideEvent = $.Event(this.constructor.Event.HIDE)\n const complete = () => {\n if (this._hoverState !== HoverState.SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $('body').children().off('mouseover', null, $.noop)\n }\n\n this._activeTrigger[Trigger.CLICK] = false\n this._activeTrigger[Trigger.FOCUS] = false\n this._activeTrigger[Trigger.HOVER] = false\n\n if (Util.supportsTransitionEnd() &&\n $(this.tip).hasClass(ClassName.FADE)) {\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle())\n $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n setElementContent($element, content) {\n const html = this.config.html\n if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n // Content is a DOM node or a jQuery\n if (html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content)\n }\n } else {\n $element.text($(content).text())\n }\n } else {\n $element[html ? 'html' : 'text'](content)\n }\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function'\n ? this.config.title.call(this.element)\n : this.config.title\n }\n\n return title\n }\n\n // Private\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n (event) => this.toggle(event)\n )\n } else if (trigger !== Trigger.MANUAL) {\n const eventIn = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSEENTER\n : this.constructor.Event.FOCUSIN\n const eventOut = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSELEAVE\n : this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n (event) => this._enter(event)\n )\n .on(\n eventOut,\n this.config.selector,\n (event) => this._leave(event)\n )\n }\n\n $(this.element).closest('.modal').on(\n 'hide.bs.modal',\n () => this.hide()\n )\n })\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const titleType = typeof this.element.getAttribute('data-original-title')\n if (this.element.getAttribute('title') ||\n titleType !== 'string') {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n const dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.SHOW) ||\n context._hoverState === HoverState.SHOW) {\n context._hoverState = HoverState.SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.SHOW\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n const dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...$(this.element).data(),\n ...config\n }\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n _handlePopperPlacementChange(data) {\n this._cleanTipClass()\n this.addAttachmentClass(this._getAttachment(data.placement))\n }\n\n _fixTransition() {\n const tip = this.getTipElement()\n const initConfigAnimation = this.config.animation\n if (tip.getAttribute('x-placement') !== null) {\n return\n }\n $(tip).removeClass(ClassName.FADE)\n this.config.animation = false\n this.hide()\n this.show()\n this.config.animation = initConfigAnimation\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tooltip._jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n }\n\n return Tooltip\n})($, Popper)\n\nexport default Tooltip\n","import $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Popover = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'popover'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.popover'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const CLASS_PREFIX = 'bs-popover'\n const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\n const Default = {\n ...Tooltip.Default,\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '
      ' +\n '
      ' +\n '

      ' +\n '
      '\n }\n\n const DefaultType = {\n ...Tooltip.DefaultType,\n content : '(string|element|function)'\n }\n\n const ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n }\n\n const Selector = {\n TITLE : '.popover-header',\n CONTENT : '.popover-body'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n\n // We use append for html objects to maintain js events\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this.element)\n }\n this.setElementContent($tip.find(Selector.CONTENT), content)\n\n $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n // Private\n\n _getContent() {\n return this.element.getAttribute('data-content') ||\n this.config.content\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Popover._jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n }\n\n return Popover\n})($)\n\nexport default Popover\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst ScrollSpy = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'scrollspy'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.scrollspy'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n offset : 10,\n method : 'auto',\n target : ''\n }\n\n const DefaultType = {\n offset : 'number',\n method : 'string',\n target : '(string|element)'\n }\n\n const Event = {\n ACTIVATE : `activate${EVENT_KEY}`,\n SCROLL : `scroll${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DROPDOWN_ITEM : 'dropdown-item',\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active'\n }\n\n const Selector = {\n DATA_SPY : '[data-spy=\"scroll\"]',\n ACTIVE : '.active',\n NAV_LIST_GROUP : '.nav, .list-group',\n NAV_LINKS : '.nav-link',\n NAV_ITEMS : '.nav-item',\n LIST_ITEMS : '.list-group-item',\n DROPDOWN : '.dropdown',\n DROPDOWN_ITEMS : '.dropdown-item',\n DROPDOWN_TOGGLE : '.dropdown-toggle'\n }\n\n const OffsetMethod = {\n OFFSET : 'offset',\n POSITION : 'position'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class ScrollSpy {\n constructor(element, config) {\n this._element = element\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${Selector.NAV_LINKS},` +\n `${this._config.target} ${Selector.LIST_ITEMS},` +\n `${this._config.target} ${Selector.DROPDOWN_ITEMS}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n $(this._scrollElement).on(Event.SCROLL, (event) => this._process(event))\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window\n ? OffsetMethod.OFFSET : OffsetMethod.POSITION\n\n const offsetMethod = this._config.method === 'auto'\n ? autoMethod : this._config.method\n\n const offsetBase = offsetMethod === OffsetMethod.POSITION\n ? this._getScrollTop() : 0\n\n this._offsets = []\n this._targets = []\n\n this._scrollHeight = this._getScrollHeight()\n\n const targets = $.makeArray($(this._selector))\n\n targets\n .map((element) => {\n let target\n const targetSelector = Util.getSelectorFromElement(element)\n\n if (targetSelector) {\n target = $(targetSelector)[0]\n }\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n // TODO (fat): remove sketch reliance on jQuery position/offset\n return [\n $(target)[offsetMethod]().top + offsetBase,\n targetSelector\n ]\n }\n }\n return null\n })\n .filter((item) => item)\n .sort((a, b) => a[0] - b[0])\n .forEach((item) => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._scrollElement).off(EVENT_KEY)\n\n this._element = null\n this._scrollElement = null\n this._config = null\n this._selector = null\n this._offsets = null\n this._targets = null\n this._activeTarget = null\n this._scrollHeight = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n\n if (typeof config.target !== 'string') {\n let id = $(config.target).attr('id')\n if (!id) {\n id = Util.getUID(NAME)\n $(config.target).attr('id', id)\n }\n config.target = `#${id}`\n }\n\n Util.typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window\n ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window\n ? window.innerHeight : this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset +\n scrollHeight -\n this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' ||\n scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n let queries = this._selector.split(',')\n // eslint-disable-next-line arrow-body-style\n queries = queries.map((selector) => {\n return `${selector}[data-target=\"${target}\"],` +\n `${selector}[href=\"${target}\"]`\n })\n\n const $link = $(queries.join(','))\n\n if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {\n $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n $link.addClass(ClassName.ACTIVE)\n } else {\n // Set triggered link as active\n $link.addClass(ClassName.ACTIVE)\n // Set triggered links parents as active\n // With both
      ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",d="out",_={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g="fade",p="show",m=".tooltip-inner",v=".arrow",E="hover",T="focus",y="click",C="manual",I=function(){function a(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var I=a.prototype;return I.enable=function(){this._isEnabled=!0},I.disable=function(){this._isEnabled=!1},I.toggleEnabled=function(){this._isEnabled=!this._isEnabled},I.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},I.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},I.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),o=P.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(g);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d&&e._leave(null,e)};P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(this.tip).one(P.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},I.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,this._activeTrigger[E]=!1,P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(i).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},I.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},I.isWithContent=function(){return Boolean(this.getTitle())},I.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},I.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},I.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(g+" "+p)},I.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},I.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},I._getAttachment=function(t){return c[t.toUpperCase()]},I._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==C){var i=n===E?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===E?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},I._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},I._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T:E]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},I._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T:E]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d&&n.hide()},n.config.delay.hide):n.hide())},I._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},I._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},I._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},I._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},I._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},I._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),x=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},U.Default,{placement:"right",trigger:"click",content:"",template:''}),h=r({},U.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",d=".popover-body",_={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},g=function(r){var o,g;function p(){return r.apply(this,arguments)||this}g=r,(o=p).prototype=Object.create(g.prototype),o.prototype.constructor=o,o.__proto__=g;var m=p.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(c+" "+u)},m._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},m._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},p._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new p(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(p,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),p}(U);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),K=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,o=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},c="dropdown-item",u="active",f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",_="position",g=function(){function o(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.LIST_ITEMS+","+this._config.target+" "+f.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=o.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:_,i="auto"===this._config.method?n:this._config.method,s=i===_?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=P.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=P.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return P.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=P,t.Alert=L,t.Button=R,t.Carousel=j,t.Collapse=H,t.Dropdown=W,t.Modal=M,t.Popover=x,t.Scrollspy=K,t.Tab=V,t.Tooltip=U,Object.defineProperty(t,"__esModule",{value:!0})}); -//# sourceMappingURL=bootstrap.min.js.map \ No newline at end of file diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/dist/js/bootstrap.min.js.map b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/dist/js/bootstrap.min.js.map deleted file mode 100644 index a2100fa3..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/dist/js/bootstrap.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../rollupPluginBabelHelpers","../../js/src/util.js","../../js/src/alert.js","../../js/src/button.js","../../js/src/carousel.js","../../js/src/collapse.js","../../js/src/dropdown.js","../../js/src/modal.js","../../js/src/tooltip.js","../../js/src/popover.js","../../js/src/scrollspy.js","../../js/src/tab.js","../../js/src/index.js"],"names":["_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","Constructor","protoProps","staticProps","prototype","_extends","assign","arguments","source","hasOwnProperty","call","apply","this","$","NAME","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","Event","ClassName","Alert","DATA_API_KEY","Selector","Button","Util","transition","transitionEndEmulator","duration","called","one","TRANSITION_END","triggerTransitionEnd","_this","prefix","Math","random","document","getElementById","element","selector","getAttribute","charAt","escapeSelector","substr","replace","find","err","offsetHeight","trigger","end","Boolean","obj","nodeType","componentName","config","configTypes","property","expectedTypes","value","valueType","isElement","toString","match","toLowerCase","RegExp","test","Error","toUpperCase","window","QUnit","fn","emulateTransitionEnd","supportsTransitionEnd","event","special","is","handleObj","handler","_element","close","rootElement","_getRootElement","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","getSelectorFromElement","parent","closest","closeEvent","CLOSE","removeClass","hasClass","_destroyElement","detach","CLOSED","remove","_jQueryInterface","each","$element","data","_handleDismiss","alertInstance","preventDefault","on","CLICK_DATA_API","noConflict","toggle","triggerChangeEvent","addAriaPressed","input","type","checked","activeElement","hasAttribute","classList","contains","focus","setAttribute","toggleClass","button","FOCUS_BLUR_DATA_API","Carousel","Default","DefaultType","Direction","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","_config","_getConfig","_indicatorsElement","INDICATORS","_addEventListeners","next","_slide","nextWhenVisible","hidden","css","prev","pause","NEXT_PREV","cycle","interval","setInterval","visibilityState","bind","to","index","ACTIVE_ITEM","activeIndex","_getItemIndex","SLID","direction","off","typeCheckConfig","keyboard","KEYDOWN","_this2","_keydown","MOUSEENTER","MOUSELEAVE","documentElement","TOUCHEND","setTimeout","tagName","which","makeArray","ITEM","indexOf","_getItemByDirection","isNextDirection","isPrevDirection","lastItemIndex","wrap","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","slideEvent","SLIDE","_setActiveIndicatorElement","ACTIVE","nextIndicator","children","addClass","directionalClassName","orderClassName","activeElementIndex","nextElement","nextElementIndex","isCycling","slidEvent","reflow","_this3","action","slide","TypeError","_dataApiClickHandler","slideIndex","DATA_SLIDE","LOAD_DATA_API","DATA_RIDE","$carousel","Collapse","Dimension","_isTransitioning","_triggerArray","id","tabToggles","DATA_TOGGLE","elem","filter","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","hide","show","actives","activesData","ACTIVES","not","startEvent","SHOW","dimension","_getDimension","style","attr","setTransitioning","complete","SHOWN","scrollSize","slice","HIDE","getBoundingClientRect","HIDDEN","isTransitioning","jquery","_getTargetFromElement","triggerArray","isOpen","$this","currentTarget","$trigger","$target","Dropdown","REGEXP_KEYDOWN","ARROW_UP_KEYCODE","AttachmentMap","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","disabled","_getParentFromElement","isActive","_clearMenus","showEvent","Popper","boundary","_getPopperConfig","noop","destroy","update","scheduleUpdate","CLICK","stopPropagation","constructor","_getPlacement","$parentDropdown","placement","offsetConf","offset","offsets","flip","toggles","context","dropdownMenu","hideEvent","parentNode","_dataApiKeydownHandler","items","get","KEYDOWN_DATA_API","KEYUP_DATA_API","e","Modal","_dialog","DIALOG","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_originalBodyPadding","_scrollbarWidth","_checkScrollbar","_setScrollbar","_adjustDialog","body","_setEscapeEvent","_setResizeEvent","CLICK_DISMISS","DATA_DISMISS","MOUSEDOWN_DISMISS","MOUSEUP_DISMISS","_showBackdrop","_showElement","FOCUSIN","_hideModal","handleUpdate","Node","ELEMENT_NODE","appendChild","display","removeAttribute","scrollTop","_enforceFocus","shownEvent","transitionComplete","_this4","has","KEYDOWN_DISMISS","RESIZE","_this6","_resetAdjustments","_resetScrollbar","_this7","_removeBackdrop","callback","animate","backdrop","doAnimate","createElement","className","appendTo","_this8","callbackRemove","isModalOverflowing","scrollHeight","clientHeight","paddingLeft","paddingRight","rect","left","right","innerWidth","_getScrollbarWidth","FIXED_CONTENT","actualPadding","calculatedPadding","parseFloat","_this9","STICKY_CONTENT","actualMargin","marginRight","calculatedMargin","NAVBAR_TOGGLER","padding","margin","scrollDiv","scrollbarWidth","width","clientWidth","removeChild","Tooltip","BSCLS_PREFIX_REGEX","HoverState","Trigger","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","enable","disable","toggleEnabled","dataKey","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","isWithContent","isInTheDom","ownerDocument","tipId","getUID","setContent","animation","attachment","_getAttachment","addAttachmentClass","container","INSERTED","fallbackPlacement","originalPlacement","_handlePopperPlacementChange","_fixTransition","prevHoverState","_TRANSITION_DURATION","_cleanTipClass","getTitle","CLASS_PREFIX","template","$tip","setElementContent","content","html","empty","append","text","title","split","forEach","eventIn","eventOut","FOCUSOUT","_fixTitle","titleType","delay","tabClass","join","initConfigAnimation","Popover","subClass","superClass","create","__proto__","_getContent","ScrollSpy","OffsetMethod","_scrollElement","NAV_LINKS","LIST_ITEMS","DROPDOWN_ITEMS","_offsets","_targets","_activeTarget","_scrollHeight","SCROLL","_process","refresh","autoMethod","offsetMethod","method","offsetBase","_getScrollTop","_getScrollHeight","map","targetSelector","targetBCR","height","top","item","sort","a","b","pageYOffset","max","_getOffsetHeight","innerHeight","maxScroll","_activate","_clear","queries","$link","DROPDOWN","DROPDOWN_TOGGLE","parents","NAV_LIST_GROUP","NAV_ITEMS","ACTIVATE","scrollSpys","DATA_SPY","$spy","Tab","previous","listElement","itemSelector","nodeName","hiddenEvent","active","_transitionComplete","dropdownChild","dropdownElement","version"],"mappings":";;;;;8QAEA,SAASA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IAAWqC,WAAa,oBACpBrC,GAAF,IAAarD,EACNqd,EAAIpY,kBAGNoY,EAzPI,CA0PVzd,IChPH,SAAEA,MACiB,oBAANA,QACH,IAAI8L,UAAU,sGAGhBqS,EAAUne,EAAEyD,GAAG+K,OAAOkL,MAAM,KAAK,GAAGA,MAAM,QAO5CyE,EAAQ,GALI,GAKYA,EAAQ,GAJnB,GAFA,IAMoCA,EAAQ,IAJ5C,IAI+DA,EAAQ,IAAmBA,EAAQ,GAHlG,GAGmHA,EAAQ,IAF3H,QAGT,IAAI9a,MAAM,+EAbpB,CAeGrD","sourcesContent":["export { _createClass as createClass, _extends as extends, _inheritsLoose as inheritsLoose };\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import $ from 'jquery'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Util = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\n let transition = false\n\n const MAX_UID = 1000000\n\n // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n function toType(obj) {\n return {}.toString.call(obj).match(/\\s([a-zA-Z]+)/)[1].toLowerCase()\n }\n\n function getSpecialTransitionEndEvent() {\n return {\n bindType: transition.end,\n delegateType: transition.end,\n handle(event) {\n if ($(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n }\n return undefined // eslint-disable-line no-undefined\n }\n }\n }\n\n function transitionEndTest() {\n if (typeof window !== 'undefined' && window.QUnit) {\n return false\n }\n\n return {\n end: 'transitionend'\n }\n }\n\n function transitionEndEmulator(duration) {\n let called = false\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true\n })\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this)\n }\n }, duration)\n\n return this\n }\n\n function setTransitionEndSupport() {\n transition = transitionEndTest()\n\n $.fn.emulateTransitionEnd = transitionEndEmulator\n\n if (Util.supportsTransitionEnd()) {\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n }\n }\n\n function escapeId(selector) {\n // We escape IDs in case of special selectors (selector = '#myId:something')\n // $.escapeSelector does not exist in jQuery < 3\n selector = typeof $.escapeSelector === 'function' ? $.escapeSelector(selector).substr(1)\n : selector.replace(/(:|\\.|\\[|\\]|,|=|@)/g, '\\\\$1')\n\n return selector\n }\n\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n const Util = {\n\n TRANSITION_END: 'bsTransitionEnd',\n\n getUID(prefix) {\n do {\n // eslint-disable-next-line no-bitwise\n prefix += ~~(Math.random() * MAX_UID) // \"~~\" acts like a faster Math.floor() here\n } while (document.getElementById(prefix))\n return prefix\n },\n\n getSelectorFromElement(element) {\n let selector = element.getAttribute('data-target')\n if (!selector || selector === '#') {\n selector = element.getAttribute('href') || ''\n }\n\n // If it's an ID\n if (selector.charAt(0) === '#') {\n selector = escapeId(selector)\n }\n\n try {\n const $selector = $(document).find(selector)\n return $selector.length > 0 ? selector : null\n } catch (err) {\n return null\n }\n },\n\n reflow(element) {\n return element.offsetHeight\n },\n\n triggerTransitionEnd(element) {\n $(element).trigger(transition.end)\n },\n\n supportsTransitionEnd() {\n return Boolean(transition)\n },\n\n isElement(obj) {\n return (obj[0] || obj).nodeType\n },\n\n typeCheckConfig(componentName, config, configTypes) {\n for (const property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && Util.isElement(value)\n ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n }\n }\n }\n }\n\n setTransitionEndSupport()\n\n return Util\n})($)\n\nexport default Util\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Alert = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'alert'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.alert'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Selector = {\n DISMISS : '[data-dismiss=\"alert\"]'\n }\n\n const Event = {\n CLOSE : `close${EVENT_KEY}`,\n CLOSED : `closed${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n ALERT : 'alert',\n FADE : 'fade',\n SHOW : 'show'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Alert {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n close(element) {\n element = element || this._element\n\n const rootElement = this._getRootElement(element)\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _getRootElement(element) {\n const selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n if (!parent) {\n parent = $(element).closest(`.${ClassName.ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n const closeEvent = $.Event(Event.CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(ClassName.SHOW)\n\n if (!Util.supportsTransitionEnd() ||\n !$(element).hasClass(ClassName.FADE)) {\n this._destroyElement(element)\n return\n }\n\n $(element)\n .one(Util.TRANSITION_END, (event) => this._destroyElement(element, event))\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(Event.CLOSED)\n .remove()\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(\n Event.CLICK_DATA_API,\n Selector.DISMISS,\n Alert._handleDismiss(new Alert())\n )\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Alert._jQueryInterface\n $.fn[NAME].Constructor = Alert\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n }\n\n return Alert\n})($)\n\nexport default Alert\n","import $ from 'jquery'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Button = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'button'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.button'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const ClassName = {\n ACTIVE : 'active',\n BUTTON : 'btn',\n FOCUS : 'focus'\n }\n\n const Selector = {\n DATA_TOGGLE_CARROT : '[data-toggle^=\"button\"]',\n DATA_TOGGLE : '[data-toggle=\"buttons\"]',\n INPUT : 'input',\n ACTIVE : '.active',\n BUTTON : '.btn'\n }\n\n const Event = {\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` +\n `blur${EVENT_KEY}${DATA_API_KEY}`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Button {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n toggle() {\n let triggerChangeEvent = true\n let addAriaPressed = true\n const rootElement = $(this._element).closest(\n Selector.DATA_TOGGLE\n )[0]\n\n if (rootElement) {\n const input = $(this._element).find(Selector.INPUT)[0]\n\n if (input) {\n if (input.type === 'radio') {\n if (input.checked &&\n $(this._element).hasClass(ClassName.ACTIVE)) {\n triggerChangeEvent = false\n } else {\n const activeElement = $(rootElement).find(Selector.ACTIVE)[0]\n\n if (activeElement) {\n $(activeElement).removeClass(ClassName.ACTIVE)\n }\n }\n }\n\n if (triggerChangeEvent) {\n if (input.hasAttribute('disabled') ||\n rootElement.hasAttribute('disabled') ||\n input.classList.contains('disabled') ||\n rootElement.classList.contains('disabled')) {\n return\n }\n input.checked = !$(this._element).hasClass(ClassName.ACTIVE)\n $(input).trigger('change')\n }\n\n input.focus()\n addAriaPressed = false\n }\n }\n\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed',\n !$(this._element).hasClass(ClassName.ACTIVE))\n }\n\n if (triggerChangeEvent) {\n $(this._element).toggleClass(ClassName.ACTIVE)\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n $(this).data(DATA_KEY, data)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n event.preventDefault()\n\n let button = event.target\n\n if (!$(button).hasClass(ClassName.BUTTON)) {\n button = $(button).closest(Selector.BUTTON)\n }\n\n Button._jQueryInterface.call($(button), 'toggle')\n })\n .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {\n const button = $(event.target).closest(Selector.BUTTON)[0]\n $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Button._jQueryInterface\n $.fn[NAME].Constructor = Button\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Button._jQueryInterface\n }\n\n return Button\n})($)\n\nexport default Button\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Carousel = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'carousel'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.carousel'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key\n const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key\n const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\n\n const Default = {\n interval : 5000,\n keyboard : true,\n slide : false,\n pause : 'hover',\n wrap : true\n }\n\n const DefaultType = {\n interval : '(number|boolean)',\n keyboard : 'boolean',\n slide : '(boolean|string)',\n pause : '(string|boolean)',\n wrap : 'boolean'\n }\n\n const Direction = {\n NEXT : 'next',\n PREV : 'prev',\n LEFT : 'left',\n RIGHT : 'right'\n }\n\n const Event = {\n SLIDE : `slide${EVENT_KEY}`,\n SLID : `slid${EVENT_KEY}`,\n KEYDOWN : `keydown${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`,\n TOUCHEND : `touchend${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'carousel-item-right',\n LEFT : 'carousel-item-left',\n NEXT : 'carousel-item-next',\n PREV : 'carousel-item-prev',\n ITEM : 'carousel-item'\n }\n\n const Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n NEXT_PREV : '.carousel-item-next, .carousel-item-prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel {\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n\n this._isPaused = false\n this._isSliding = false\n\n this.touchTimeout = null\n\n this._config = this._getConfig(config)\n this._element = $(element)[0]\n this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden &&\n ($(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden')) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if ($(this._element).find(Selector.NEXT_PREV)[0] &&\n Util.supportsTransitionEnd()) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex\n ? Direction.NEXT\n : Direction.PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n $(this._element).off(EVENT_KEY)\n $.removeData(this._element, DATA_KEY)\n\n this._items = null\n this._config = null\n this._element = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on(Event.KEYDOWN, (event) => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n $(this._element)\n .on(Event.MOUSEENTER, (event) => this.pause(event))\n .on(Event.MOUSELEAVE, (event) => this.cycle(event))\n if ('ontouchstart' in document.documentElement) {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n $(this._element).on(Event.TOUCHEND, () => {\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n this.touchTimeout = setTimeout((event) => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n })\n }\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n switch (event.which) {\n case ARROW_LEFT_KEYCODE:\n event.preventDefault()\n this.prev()\n break\n case ARROW_RIGHT_KEYCODE:\n event.preventDefault()\n this.next()\n break\n default:\n }\n }\n\n _getItemIndex(element) {\n this._items = $.makeArray($(element).parent().find(Selector.ITEM))\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n const isNextDirection = direction === Direction.NEXT\n const isPrevDirection = direction === Direction.PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = isPrevDirection && activeIndex === 0 ||\n isNextDirection && activeIndex === lastItemIndex\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = direction === Direction.PREV ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1\n ? this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0])\n const slideEvent = $.Event(Event.SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n $(this._indicatorsElement)\n .find(Selector.ACTIVE)\n .removeClass(ClassName.ACTIVE)\n\n const nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(ClassName.ACTIVE)\n }\n }\n }\n\n _slide(direction, element) {\n const activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || activeElement &&\n this._getItemByDirection(direction, activeElement)\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n let directionalClassName\n let orderClassName\n let eventDirectionName\n\n if (direction === Direction.NEXT) {\n directionalClassName = ClassName.LEFT\n orderClassName = ClassName.NEXT\n eventDirectionName = Direction.LEFT\n } else {\n directionalClassName = ClassName.RIGHT\n orderClassName = ClassName.PREV\n eventDirectionName = Direction.RIGHT\n }\n\n if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n\n const slidEvent = $.Event(Event.SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n\n if (Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.SLIDE)) {\n $(nextElement).addClass(orderClassName)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(`${directionalClassName} ${orderClassName}`)\n .addClass(ClassName.ACTIVE)\n\n $(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n })\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n $(activeElement).removeClass(ClassName.ACTIVE)\n $(nextElement).addClass(ClassName.ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = {\n ...Default,\n ...$(this).data()\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n data[action]()\n } else if (_config.interval) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n const selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n const target = $(selector)[0]\n\n if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n return\n }\n\n const config = {\n ...$(target).data(),\n ...$(this).data()\n }\n const slideIndex = this.getAttribute('data-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)\n\n $(window).on(Event.LOAD_DATA_API, () => {\n $(Selector.DATA_RIDE).each(function () {\n const $carousel = $(this)\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n })\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Carousel._jQueryInterface\n $.fn[NAME].Constructor = Carousel\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n }\n\n return Carousel\n})($)\n\nexport default Carousel\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Collapse = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'collapse'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.collapse'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n toggle : true,\n parent : ''\n }\n\n const DefaultType = {\n toggle : 'boolean',\n parent : '(string|element)'\n }\n\n const Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SHOW : 'show',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n }\n\n const Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n }\n\n const Selector = {\n ACTIVES : '.show, .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse {\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = $.makeArray($(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n const tabToggles = $(Selector.DATA_TOGGLE)\n for (let i = 0; i < tabToggles.length; i++) {\n const elem = tabToggles[i]\n const selector = Util.getSelectorFromElement(elem)\n if (selector !== null && $(selector).filter(element).length > 0) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle() {\n if ($(this._element).hasClass(ClassName.SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = $.makeArray(\n $(this._parent)\n .find(Selector.ACTIVES)\n .filter(`[data-parent=\"${this._config.parent}\"]`)\n )\n if (actives.length === 0) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).not(this._selector).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n const dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length > 0) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n const startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.SHOW)\n\n if (this._triggerArray.length > 0) {\n for (let i = 0; i < this._triggerArray.length; i++) {\n const trigger = this._triggerArray[i]\n const selector = Util.getSelectorFromElement(trigger)\n if (selector !== null) {\n const $elem = $(selector)\n if (!$elem.hasClass(ClassName.SHOW)) {\n $(trigger).addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n if (!Util.supportsTransitionEnd()) {\n complete()\n return\n }\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n const hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent = null\n if (Util.isElement(this._config.parent)) {\n parent = this._config.parent\n\n // It's a jQuery object\n if (typeof this._config.parent.jquery !== 'undefined') {\n parent = this._config.parent[0]\n }\n } else {\n parent = $(this._config.parent)[0]\n }\n\n const selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n $(parent).find(selector).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (element) {\n const isOpen = $(element).hasClass(ClassName.SHOW)\n\n if (triggerArray.length > 0) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n }\n\n // Static\n\n static _getTargetFromElement(element) {\n const selector = Util.getSelectorFromElement(element)\n return selector ? $(selector)[0] : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n const _config = {\n ...Default,\n ...$this.data(),\n ...typeof config === 'object' && config\n }\n\n if (!data && _config.toggle && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault()\n }\n\n const $trigger = $(this)\n const selector = Util.getSelectorFromElement(this)\n $(selector).each(function () {\n const $target = $(this)\n const data = $target.data(DATA_KEY)\n const config = data ? 'toggle' : $trigger.data()\n Collapse._jQueryInterface.call($target, config)\n })\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Collapse._jQueryInterface\n $.fn[NAME].Constructor = Collapse\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n }\n\n return Collapse\n})($)\n\nexport default Collapse\n","import $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Dropdown = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'dropdown'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.dropdown'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key\n const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key\n const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\n const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\n const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\n const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,\n KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`,\n KEYUP_DATA_API : `keyup${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DISABLED : 'disabled',\n SHOW : 'show',\n DROPUP : 'dropup',\n DROPRIGHT : 'dropright',\n DROPLEFT : 'dropleft',\n MENURIGHT : 'dropdown-menu-right',\n MENULEFT : 'dropdown-menu-left',\n POSITION_STATIC : 'position-static'\n }\n\n const Selector = {\n DATA_TOGGLE : '[data-toggle=\"dropdown\"]',\n FORM_CHILD : '.dropdown form',\n MENU : '.dropdown-menu',\n NAVBAR_NAV : '.navbar-nav',\n VISIBLE_ITEMS : '.dropdown-menu .dropdown-item:not(.disabled)'\n }\n\n const AttachmentMap = {\n TOP : 'top-start',\n TOPEND : 'top-end',\n BOTTOM : 'bottom-start',\n BOTTOMEND : 'bottom-end',\n RIGHT : 'right-start',\n RIGHTEND : 'right-end',\n LEFT : 'left-start',\n LEFTEND : 'left-end'\n }\n\n const Default = {\n offset : 0,\n flip : true,\n boundary : 'scrollParent'\n }\n\n const DefaultType = {\n offset : '(number|string|function)',\n flip : 'boolean',\n boundary : '(string|element)'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown {\n constructor(element, config) {\n this._element = element\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this._element)\n const isActive = $(this._menu).hasClass(ClassName.SHOW)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const showEvent = $.Event(Event.SHOW, relatedTarget)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return\n }\n\n // Disable totally Popper.js for Dropdown in Navbar\n if (!this._inNavbar) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)')\n }\n let element = this._element\n // For dropup with alignment we use the parent as popper container\n if ($(parent).hasClass(ClassName.DROPUP)) {\n if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {\n element = parent\n }\n }\n // If boundary is not `scrollParent`, then set position to `static`\n // to allow the menu to \"escape\" the scroll parent's boundaries\n // https://github.com/twbs/bootstrap/issues/24251\n if (this._config.boundary !== 'scrollParent') {\n $(parent).addClass(ClassName.POSITION_STATIC)\n }\n this._popper = new Popper(element, this._menu, this._getPopperConfig())\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n $(parent).closest(Selector.NAVBAR_NAV).length === 0) {\n $('body').children().on('mouseover', null, $.noop)\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n $(this._menu).toggleClass(ClassName.SHOW)\n $(parent)\n .toggleClass(ClassName.SHOW)\n .trigger($.Event(Event.SHOWN, relatedTarget))\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n this._menu = null\n if (this._popper !== null) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Private\n\n _addEventListeners() {\n $(this._element).on(Event.CLICK, (event) => {\n event.preventDefault()\n event.stopPropagation()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...$(this._element).data(),\n ...config\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getMenuElement() {\n if (!this._menu) {\n const parent = Dropdown._getParentFromElement(this._element)\n this._menu = $(parent).find(Selector.MENU)[0]\n }\n return this._menu\n }\n\n _getPlacement() {\n const $parentDropdown = $(this._element).parent()\n let placement = AttachmentMap.BOTTOM\n\n // Handle dropup\n if ($parentDropdown.hasClass(ClassName.DROPUP)) {\n placement = AttachmentMap.TOP\n if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.TOPEND\n }\n } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) {\n placement = AttachmentMap.RIGHT\n } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) {\n placement = AttachmentMap.LEFT\n } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) {\n placement = AttachmentMap.BOTTOMEND\n }\n return placement\n }\n\n _detectNavbar() {\n return $(this._element).closest('.navbar').length > 0\n }\n\n _getPopperConfig() {\n const offsetConf = {}\n if (typeof this._config.offset === 'function') {\n offsetConf.fn = (data) => {\n data.offsets = {\n ...data.offsets,\n ...this._config.offset(data.offsets) || {}\n }\n return data\n }\n } else {\n offsetConf.offset = this._config.offset\n }\n const popperConfig = {\n placement: this._getPlacement(),\n modifiers: {\n offset: offsetConf,\n flip: {\n enabled: this._config.flip\n },\n preventOverflow: {\n boundariesElement: this._config.boundary\n }\n }\n }\n\n return popperConfig\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||\n event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n return\n }\n\n const toggles = $.makeArray($(Selector.DATA_TOGGLE))\n for (let i = 0; i < toggles.length; i++) {\n const parent = Dropdown._getParentFromElement(toggles[i])\n const context = $(toggles[i]).data(DATA_KEY)\n const relatedTarget = {\n relatedTarget: toggles[i]\n }\n\n if (!context) {\n continue\n }\n\n const dropdownMenu = context._menu\n if (!$(parent).hasClass(ClassName.SHOW)) {\n continue\n }\n\n if (event && (event.type === 'click' &&\n /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&\n $.contains(parent, event.target)) {\n continue\n }\n\n const hideEvent = $.Event(Event.HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $('body').children().off('mouseover', null, $.noop)\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n $(dropdownMenu).removeClass(ClassName.SHOW)\n $(parent)\n .removeClass(ClassName.SHOW)\n .trigger($.Event(Event.HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n const selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = $(selector)[0]\n }\n\n return parent || element.parentNode\n }\n\n // eslint-disable-next-line complexity\n static _dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName)\n ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&\n (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||\n $(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this)\n const isActive = $(parent).hasClass(ClassName.SHOW)\n\n if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) ||\n isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n if (event.which === ESCAPE_KEYCODE) {\n const toggle = $(parent).find(Selector.DATA_TOGGLE)[0]\n $(toggle).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n const items = $(parent).find(Selector.VISIBLE_ITEMS).get()\n\n if (items.length === 0) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up\n index--\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler)\n .on(`${Event.CLICK_DATA_API} ${Event.KEYUP_DATA_API}`, Dropdown._clearMenus)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n event.stopPropagation()\n Dropdown._jQueryInterface.call($(this), 'toggle')\n })\n .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {\n e.stopPropagation()\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Dropdown._jQueryInterface\n $.fn[NAME].Constructor = Dropdown\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n }\n\n return Dropdown\n})($, Popper)\n\nexport default Dropdown\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.modal'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\n const Default = {\n backdrop : true,\n keyboard : true,\n focus : true,\n show : true\n }\n\n const DefaultType = {\n backdrop : '(boolean|string)',\n keyboard : 'boolean',\n focus : 'boolean',\n show : 'boolean'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n RESIZE : `resize${EVENT_KEY}`,\n CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,\n KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,\n MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,\n MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure',\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n SHOW : 'show'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n STICKY_CONTENT : '.sticky-top',\n NAVBAR_TOGGLER : '.navbar-toggler'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isTransitioning || this._isShown) {\n return\n }\n\n if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {\n this._isTransitioning = true\n }\n\n const showEvent = $.Event(Event.SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n this._adjustDialog()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.CLICK_DISMISS,\n Selector.DATA_DISMISS,\n (event) => this.hide(event)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {\n $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (this._isTransitioning || !this._isShown) {\n return\n }\n\n const hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n const transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)\n\n if (transition) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.SHOW)\n\n $(this._element).off(Event.CLICK_DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN_DISMISS)\n\n if (transition) {\n $(this._element)\n .one(Util.TRANSITION_END, (event) => this._hideModal(event))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n $(window, document, this._element, this._backdrop).off(EVENT_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._scrollbarWidth = null\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const shownEvent = $.Event(Event.SHOWN, {\n relatedTarget\n })\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n this._isTransitioning = false\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // Guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (document !== event.target &&\n this._element !== event.target &&\n $(this._element).has(event.target).length === 0) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {\n if (event.which === ESCAPE_KEYCODE) {\n event.preventDefault()\n this.hide()\n }\n })\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, (event) => this.handleUpdate(event))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._isTransitioning = false\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n const animate = $(this._element).hasClass(ClassName.FADE)\n ? ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n const doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(Event.CLICK_DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.SHOW)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.SHOW)\n\n const callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n } else if (callback) {\n callback()\n }\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect()\n this._isBodyOverflowing = rect.left + rect.right < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n\n // Adjust fixed content padding\n $(Selector.FIXED_CONTENT).each((index, element) => {\n const actualPadding = $(element)[0].style.paddingRight\n const calculatedPadding = $(element).css('padding-right')\n $(element).data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n })\n\n // Adjust sticky content margin\n $(Selector.STICKY_CONTENT).each((index, element) => {\n const actualMargin = $(element)[0].style.marginRight\n const calculatedMargin = $(element).css('margin-right')\n $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)\n })\n\n // Adjust navbar-toggler margin\n $(Selector.NAVBAR_TOGGLER).each((index, element) => {\n const actualMargin = $(element)[0].style.marginRight\n const calculatedMargin = $(element).css('margin-right')\n $(element).data('margin-right', actualMargin).css('margin-right', `${parseFloat(calculatedMargin) + this._scrollbarWidth}px`)\n })\n\n // Adjust body padding\n const actualPadding = document.body.style.paddingRight\n const calculatedPadding = $('body').css('padding-right')\n $('body').data('padding-right', actualPadding).css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n }\n }\n\n _resetScrollbar() {\n // Restore fixed content padding\n $(Selector.FIXED_CONTENT).each((index, element) => {\n const padding = $(element).data('padding-right')\n if (typeof padding !== 'undefined') {\n $(element).css('padding-right', padding).removeData('padding-right')\n }\n })\n\n // Restore sticky content and navbar-toggler margin\n $(`${Selector.STICKY_CONTENT}, ${Selector.NAVBAR_TOGGLER}`).each((index, element) => {\n const margin = $(element).data('margin-right')\n if (typeof margin !== 'undefined') {\n $(element).css('margin-right', margin).removeData('margin-right')\n }\n })\n\n // Restore body padding\n const padding = $('body').data('padding-right')\n if (typeof padding !== 'undefined') {\n $('body').css('padding-right', padding).removeData('padding-right')\n }\n }\n\n _getScrollbarWidth() { // thx d.walsh\n const scrollDiv = document.createElement('div')\n scrollDiv.className = ClassName.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n // Static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = {\n ...Modal.Default,\n ...$(this).data(),\n ...typeof config === 'object' && config\n }\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n let target\n const selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n const config = $(target).data(DATA_KEY)\n ? 'toggle' : {\n ...$(target).data(),\n ...$(this).data()\n }\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault()\n }\n\n const $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // Only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n})($)\n\nexport default Modal\n","import $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tooltip = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tooltip'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.tooltip'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n const CLASS_PREFIX = 'bs-tooltip'\n const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\n const DefaultType = {\n animation : 'boolean',\n template : 'string',\n title : '(string|element|function)',\n trigger : 'string',\n delay : '(number|object)',\n html : 'boolean',\n selector : '(string|boolean)',\n placement : '(string|function)',\n offset : '(number|string)',\n container : '(string|element|boolean)',\n fallbackPlacement : '(string|array)',\n boundary : '(string|element)'\n }\n\n const AttachmentMap = {\n AUTO : 'auto',\n TOP : 'top',\n RIGHT : 'right',\n BOTTOM : 'bottom',\n LEFT : 'left'\n }\n\n const Default = {\n animation : true,\n template : '
      ' +\n '
      ' +\n '
      ',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : 0,\n container : false,\n fallbackPlacement : 'flip',\n boundary : 'scrollParent'\n }\n\n const HoverState = {\n SHOW : 'show',\n OUT : 'out'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n const ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n }\n\n const Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner',\n ARROW : '.arrow'\n }\n\n const Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip {\n constructor(element, config) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)')\n }\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n $(this.element).closest('.modal').off('hide.bs.modal')\n\n if (this.tip) {\n $(this.tip).remove()\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n this._popper = null\n this.element = null\n this.config = null\n this.tip = null\n }\n\n show() {\n if ($(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n const showEvent = $.Event(this.constructor.Event.SHOW)\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n const isInTheDom = $.contains(\n this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n const placement = typeof this.config.placement === 'function'\n ? this.config.placement.call(this, tip, this.element)\n : this.config.placement\n\n const attachment = this._getAttachment(placement)\n this.addAttachmentClass(attachment)\n\n const container = this.config.container === false ? document.body : $(this.config.container)\n\n $(tip).data(this.constructor.DATA_KEY, this)\n\n if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n $(tip).appendTo(container)\n }\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._popper = new Popper(this.element, tip, {\n placement: attachment,\n modifiers: {\n offset: {\n offset: this.config.offset\n },\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: Selector.ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: (data) => {\n if (data.originalPlacement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n },\n onUpdate: (data) => {\n this._handlePopperPlacementChange(data)\n }\n })\n\n $(tip).addClass(ClassName.SHOW)\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n $('body').children().on('mouseover', null, $.noop)\n }\n\n const complete = () => {\n if (this.config.animation) {\n this._fixTransition()\n }\n const prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(Tooltip._TRANSITION_DURATION)\n } else {\n complete()\n }\n }\n }\n\n hide(callback) {\n const tip = this.getTipElement()\n const hideEvent = $.Event(this.constructor.Event.HIDE)\n const complete = () => {\n if (this._hoverState !== HoverState.SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $('body').children().off('mouseover', null, $.noop)\n }\n\n this._activeTrigger[Trigger.CLICK] = false\n this._activeTrigger[Trigger.FOCUS] = false\n this._activeTrigger[Trigger.HOVER] = false\n\n if (Util.supportsTransitionEnd() &&\n $(this.tip).hasClass(ClassName.FADE)) {\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle())\n $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n setElementContent($element, content) {\n const html = this.config.html\n if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n // Content is a DOM node or a jQuery\n if (html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content)\n }\n } else {\n $element.text($(content).text())\n }\n } else {\n $element[html ? 'html' : 'text'](content)\n }\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function'\n ? this.config.title.call(this.element)\n : this.config.title\n }\n\n return title\n }\n\n // Private\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n (event) => this.toggle(event)\n )\n } else if (trigger !== Trigger.MANUAL) {\n const eventIn = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSEENTER\n : this.constructor.Event.FOCUSIN\n const eventOut = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSELEAVE\n : this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n (event) => this._enter(event)\n )\n .on(\n eventOut,\n this.config.selector,\n (event) => this._leave(event)\n )\n }\n\n $(this.element).closest('.modal').on(\n 'hide.bs.modal',\n () => this.hide()\n )\n })\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const titleType = typeof this.element.getAttribute('data-original-title')\n if (this.element.getAttribute('title') ||\n titleType !== 'string') {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n const dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.SHOW) ||\n context._hoverState === HoverState.SHOW) {\n context._hoverState = HoverState.SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.SHOW\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n const dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...$(this.element).data(),\n ...config\n }\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n _handlePopperPlacementChange(data) {\n this._cleanTipClass()\n this.addAttachmentClass(this._getAttachment(data.placement))\n }\n\n _fixTransition() {\n const tip = this.getTipElement()\n const initConfigAnimation = this.config.animation\n if (tip.getAttribute('x-placement') !== null) {\n return\n }\n $(tip).removeClass(ClassName.FADE)\n this.config.animation = false\n this.hide()\n this.show()\n this.config.animation = initConfigAnimation\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tooltip._jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n }\n\n return Tooltip\n})($, Popper)\n\nexport default Tooltip\n","import $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Popover = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'popover'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.popover'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const CLASS_PREFIX = 'bs-popover'\n const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\n const Default = {\n ...Tooltip.Default,\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '
      ' +\n '
      ' +\n '

      ' +\n '
      '\n }\n\n const DefaultType = {\n ...Tooltip.DefaultType,\n content : '(string|element|function)'\n }\n\n const ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n }\n\n const Selector = {\n TITLE : '.popover-header',\n CONTENT : '.popover-body'\n }\n\n const Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n\n // We use append for html objects to maintain js events\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this.element)\n }\n this.setElementContent($tip.find(Selector.CONTENT), content)\n\n $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n // Private\n\n _getContent() {\n return this.element.getAttribute('data-content') ||\n this.config.content\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n }\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Popover._jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n }\n\n return Popover\n})($)\n\nexport default Popover\n","import $ from 'jquery'\nimport Util from './util'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst ScrollSpy = (($) => {\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'scrollspy'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.scrollspy'\n const EVENT_KEY = `.${DATA_KEY}`\n const DATA_API_KEY = '.data-api'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n offset : 10,\n method : 'auto',\n target : ''\n }\n\n const DefaultType = {\n offset : 'number',\n method : 'string',\n target : '(string|element)'\n }\n\n const Event = {\n ACTIVATE : `activate${EVENT_KEY}`,\n SCROLL : `scroll${EVENT_KEY}`,\n LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`\n }\n\n const ClassName = {\n DROPDOWN_ITEM : 'dropdown-item',\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active'\n }\n\n const Selector = {\n DATA_SPY : '[data-spy=\"scroll\"]',\n ACTIVE : '.active',\n NAV_LIST_GROUP : '.nav, .list-group',\n NAV_LINKS : '.nav-link',\n NAV_ITEMS : '.nav-item',\n LIST_ITEMS : '.list-group-item',\n DROPDOWN : '.dropdown',\n DROPDOWN_ITEMS : '.dropdown-item',\n DROPDOWN_TOGGLE : '.dropdown-toggle'\n }\n\n const OffsetMethod = {\n OFFSET : 'offset',\n POSITION : 'position'\n }\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class ScrollSpy {\n constructor(element, config) {\n this._element = element\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${Selector.NAV_LINKS},` +\n `${this._config.target} ${Selector.LIST_ITEMS},` +\n `${this._config.target} ${Selector.DROPDOWN_ITEMS}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n $(this._scrollElement).on(Event.SCROLL, (event) => this._process(event))\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window\n ? OffsetMethod.OFFSET : OffsetMethod.POSITION\n\n const offsetMethod = this._config.method === 'auto'\n ? autoMethod : this._config.method\n\n const offsetBase = offsetMethod === OffsetMethod.POSITION\n ? this._getScrollTop() : 0\n\n this._offsets = []\n this._targets = []\n\n this._scrollHeight = this._getScrollHeight()\n\n const targets = $.makeArray($(this._selector))\n\n targets\n .map((element) => {\n let target\n const targetSelector = Util.getSelectorFromElement(element)\n\n if (targetSelector) {\n target = $(targetSelector)[0]\n }\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n // TODO (fat): remove sketch reliance on jQuery position/offset\n return [\n $(target)[offsetMethod]().top + offsetBase,\n targetSelector\n ]\n }\n }\n return null\n })\n .filter((item) => item)\n .sort((a, b) => a[0] - b[0])\n .forEach((item) => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._scrollElement).off(EVENT_KEY)\n\n this._element = null\n this._scrollElement = null\n this._config = null\n this._selector = null\n this._offsets = null\n this._targets = null\n this._activeTarget = null\n this._scrollHeight = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n\n if (typeof config.target !== 'string') {\n let id = $(config.target).attr('id')\n if (!id) {\n id = Util.getUID(NAME)\n $(config.target).attr('id', id)\n }\n config.target = `#${id}`\n }\n\n Util.typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window\n ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window\n ? window.innerHeight : this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset +\n scrollHeight -\n this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' ||\n scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n let queries = this._selector.split(',')\n // eslint-disable-next-line arrow-body-style\n queries = queries.map((selector) => {\n return `${selector}[data-target=\"${target}\"],` +\n `${selector}[href=\"${target}\"]`\n })\n\n const $link = $(queries.join(','))\n\n if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {\n $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)\n $link.addClass(ClassName.ACTIVE)\n } else {\n // Set triggered link as active\n $link.addClass(ClassName.ACTIVE)\n // Set triggered links parents as active\n // With both
        and
      ' - - var $dropdown = $(dropdownHTML) - .appendTo('#qunit-fixture') - .find('[data-toggle="dropdown"]') - .bootstrapDropdown() - - var $textarea = $('#textarea') - - $dropdown - .parent('.dropdown') - .one('shown.bs.dropdown', function () { - assert.ok(true, 'shown was fired') - - // Key space - $textarea.trigger('focus').trigger($.Event('keydown', { - which: 32 - })) - assert.ok($dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is shown') - assert.ok($(document.activeElement).is($textarea), 'textarea is still focused') - - // Key escape - $textarea.trigger('focus').trigger($.Event('keydown', { - which: 27 - })) - assert.ok(!$dropdown.parent('.dropdown').hasClass('show'), 'dropdown menu is not shown') - - $dropdown - .parent('.dropdown') - .one('shown.bs.dropdown', function () { - // Key down - $textarea.trigger('focus').trigger($.Event('keydown', { - which: 40 - })) - assert.ok(document.activeElement === $('#item1')[0], 'item1 is focused') - - $dropdown - .parent('.dropdown') - .one('shown.bs.dropdown', function () { - // Key up - $textarea.trigger('focus').trigger($.Event('keydown', { - which: 38 - })) - assert.ok(document.activeElement === $('#item1')[0], 'item1 is focused') - done() - }).bootstrapDropdown('toggle') - $textarea.trigger('click') - }) - $textarea.trigger('click') - }) - $textarea.trigger('click') - }) -}) diff --git a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/js/tests/unit/modal.js b/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/js/tests/unit/modal.js deleted file mode 100644 index c8b321a7..00000000 --- a/src/votingapp/windows/VotingApp/VotingWeb/bower_components/bootstrap/js/tests/unit/modal.js +++ /dev/null @@ -1,697 +0,0 @@ -$(function () { - 'use strict' - - QUnit.module('modal plugin') - - QUnit.test('should be defined on jquery object', function (assert) { - assert.expect(1) - assert.ok($(document.body).modal, 'modal method is defined') - }) - - QUnit.module('modal', { - before: function () { - // Enable the scrollbar measurer - $('').appendTo('head') - // Function to calculate the scrollbar width which is then compared to the padding or margin changes - $.fn.getScrollbarWidth = function () { - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - document.body.appendChild(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - document.body.removeChild(scrollDiv) - return scrollbarWidth - } - // Simulate scrollbars in PhantomJS - $('html').css('padding-right', '16px') - }, - beforeEach: function () { - // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode - $.fn.bootstrapModal = $.fn.modal.noConflict() - }, - afterEach: function () { - $('.modal-backdrop, #modal-test').remove() - $(document.body).removeClass('modal-open') - $.fn.modal = $.fn.bootstrapModal - delete $.fn.bootstrapModal - } - }) - - QUnit.test('should provide no conflict', function (assert) { - assert.expect(1) - assert.strictEqual(typeof $.fn.modal, 'undefined', 'modal was set back to undefined (orig value)') - }) - - QUnit.test('should throw explicit error on undefined method', function (assert) { - assert.expect(1) - var $el = $('