Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-material

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-material - npm Package Compare versions

Comparing version 1.1.0-rc4-master-06e7e99 to 1.1.0

angular-material.scss

2

bower.json
{
"name": "angular-material",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "ignore": [],

@@ -5,8 +5,8 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.autocomplete');
goog.require('ng.material.components.icon');
goog.require('ng.material.components.virtualRepeat');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.autocomplete');
goog.require('ngmaterial.components.icon');
goog.require('ngmaterial.components.virtualRepeat');
goog.require('ngmaterial.core');
/**

@@ -35,4 +35,5 @@ * @ngdoc module

function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming, $window,
$animate, $rootElement, $attrs, $q) {
//-- private variables
$animate, $rootElement, $attrs, $q, $log) {
// Internal Variables.
var ctrl = this,

@@ -48,8 +49,9 @@ itemParts = $scope.itemsExpr.split(/ in /i),

fetchesInProgress = 0,
enableWrapScroll = null;
enableWrapScroll = null,
inputModelCtrl = null;
//-- public variables with handlers
// Public Exported Variables with handlers
defineProperty('hidden', handleHiddenChange, true);
//-- public variables
// Public Exported Variables
ctrl.scope = $scope;

@@ -69,3 +71,3 @@ ctrl.parent = $scope.$parent;

//-- public methods
// Public Exported Methods
ctrl.keydown = keydown;

@@ -84,2 +86,3 @@ ctrl.blur = blur;

ctrl.loadingIsVisible = loadingIsVisible;
ctrl.positionDropdown = positionDropdown;

@@ -94,3 +97,3 @@ return init();

function init () {
$mdUtil.initOptionalProperties($scope, $attrs, { searchText: null, selectedItem: null });
$mdUtil.initOptionalProperties($scope, $attrs, { searchText: '', selectedItem: null });
$mdTheming($element);

@@ -106,2 +109,8 @@ configureWatchers();

function updateModelValidators() {
if (!$scope.requireMatch || !inputModelCtrl) return;
inputModelCtrl.$setValidity('md-require-match', !!$scope.selectedItem);
}
/**

@@ -218,3 +227,3 @@ * Calculates the dropdown's position and applies the new styles to the menu element

if ( elements ){
var items = 'ul scroller scrollContainer input'.split(' ');
var items = ['ul', 'scroller', 'scrollContainer', 'input'];
angular.forEach(items, function(key){

@@ -232,4 +241,4 @@ elements.$[key].remove();

main: $element[0],
scrollContainer: $element[0].getElementsByClassName('md-virtual-repeat-container')[0],
scroller: $element[0].getElementsByClassName('md-virtual-repeat-scroller')[0],
scrollContainer: $element[0].querySelector('.md-virtual-repeat-container'),
scroller: $element[0].querySelector('.md-virtual-repeat-scroller'),
ul: $element.find('ul')[0],

@@ -240,5 +249,8 @@ input: $element.find('input')[0],

};
elements.li = elements.ul.getElementsByTagName('li');
elements.snap = getSnapTarget();
elements.$ = getAngularElements(elements);
inputModelCtrl = elements.$.input.controller('ngModel');
}

@@ -314,3 +326,3 @@

element.off('touchmove', preventDefault);
}
};
}

@@ -329,3 +341,3 @@

function onListLeave () {
if (!hasFocus) elements.input.focus();
if (!hasFocus && !ctrl.hidden) elements.input.focus();
noBlur = false;

@@ -348,2 +360,5 @@ ctrl.hidden = shouldHide();

function selectedItemChange (selectedItem, previousSelectedItem) {
updateModelValidators();
if (selectedItem) {

@@ -354,2 +369,11 @@ getDisplayValue(selectedItem).then(function (val) {

});
} else if (previousSelectedItem && $scope.searchText) {
getDisplayValue(previousSelectedItem).then(function(displayValue) {
// Clear the searchText, when the selectedItem is set to null.
// Do not clear the searchText, when the searchText isn't matching with the previous
// selected item.
if (displayValue.toString().toLowerCase() === $scope.searchText.toLowerCase()) {
$scope.searchText = '';
}
});
}

@@ -412,5 +436,8 @@

ctrl.index = getDefaultIndex();
// do nothing on init
if (searchText === previousSearchText) return;
updateModelValidators();
getDisplayValue($scope.selectedItem).then(function (val) {

@@ -462,3 +489,3 @@ // clear selected item if search text no longer matches it

*/
function focus () {
function focus($event) {
hasFocus = true;

@@ -508,9 +535,19 @@ //-- if searchText is null, let's force it to be a string

case $mdConstant.KEY_CODE.ESCAPE:
event.preventDefault(); // Prevent browser from always clearing input
if (!shouldProcessEscape()) return;
event.stopPropagation();
event.preventDefault();
if ($scope.searchText) clearValue();
// Force the component to blur if they hit escape
doBlur(true);
clearSelectedItem();
if ($scope.searchText && hasEscapeOption('clear')) {
clearSearchText();
}
// Manually hide (needed for mdNotFound support)
ctrl.hidden = true;
if (hasEscapeOption('blur')) {
// Force the component to blur if they hit escape
doBlur(true);
}
break;

@@ -537,4 +574,11 @@ default:

function getDisplayValue (item) {
return $q.when(getItemText(item) || item);
return $q.when(getItemText(item) || item).then(function(itemText) {
if (itemText && !angular.isString(itemText)) {
$log.warn('md-autocomplete: Could not resolve display value to a string. ' +
'Please check the `md-item-text` attribute.');
}
return itemText;
});
/**

@@ -596,2 +640,18 @@ * Getter function to invoke user-defined expression (in the directive)

/**
* Determines if the escape keydown should be processed
* @returns {boolean}
*/
function shouldProcessEscape() {
return hasEscapeOption('blur') || !ctrl.hidden || ctrl.loading || hasEscapeOption('clear') && $scope.searchText;
}
/**
* Determines if an escape option is set
* @returns {boolean}
*/
function hasEscapeOption(option) {
return !$scope.escapeOptions || $scope.escapeOptions.toLowerCase().indexOf(option) !== -1;
}
/**
* Determines if the menu should be shown.

@@ -685,17 +745,39 @@ * @returns {boolean}

function clearValue () {
clearSelectedItem();
clearSearchText();
}
/**
* Clears the selected item
*/
function clearSelectedItem () {
// Reset our variables
ctrl.index = 0;
ctrl.matches = [];
}
/**
* Clears the searchText value
*/
function clearSearchText () {
// Set the loading to true so we don't see flashes of content.
// The flashing will only occour when an async request is running.
// The flashing will only occur when an async request is running.
// So the loading process will stop when the results had been retrieved.
setLoading(true);
// Reset our variables
ctrl.index = 0;
ctrl.matches = [];
$scope.searchText = '';
// Per http://www.w3schools.com/jsref/event_oninput.asp
// Normally, triggering the change / input event is unnecessary, because the browser detects it properly.
// But some browsers are not detecting it properly, which means that we have to trigger the event.
// Using the `input` is not working properly, because for example IE11 is not supporting the `input` event.
// The `change` event is a good alternative and is supported by all supported browsers.
var eventObj = document.createEvent('CustomEvent');
eventObj.initCustomEvent('input', true, true, { value: $scope.searchText });
eventObj.initCustomEvent('change', true, true, { value: '' });
elements.input.dispatchEvent(eventObj);
// For some reason, firing the above event resets the value of $scope.searchText if
// $scope.searchText has a space character at the end, so we blank it one more time and then
// focus.
elements.input.blur();
$scope.searchText = '';
elements.input.focus();

@@ -714,3 +796,3 @@ }

if (isList) handleResults(items);
if (isList) onResultsRetrieved(items);
else if (isPromise) handleAsyncResults(items);

@@ -727,3 +809,3 @@

items
.then(handleResults)
.then(onResultsRetrieved)
.finally(function(){

@@ -737,17 +819,12 @@ if (--fetchesInProgress === 0) {

function handleResults (matches) {
cache[ term ] = matches;
if ((searchText || '') !== ($scope.searchText || '')) return; //-- just cache the results if old request
function onResultsRetrieved(matches) {
cache[term] = matches;
ctrl.matches = matches;
ctrl.hidden = shouldHide();
// Just cache the results if the request is now outdated.
// The request becomes outdated, when the new searchText has changed during the result fetching.
if ((searchText || '') !== ($scope.searchText || '')) {
return;
}
// If loading is in progress, then we'll end the progress. This is needed for example,
// when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.
if (ctrl.loading) setLoading(false);
if ($scope.selectOnMatch) selectItemOnMatch();
updateMessages();
positionDropdown();
handleResults(matches);
}

@@ -818,8 +895,9 @@ }

function handleQuery () {
var searchText = $scope.searchText || '',
term = searchText.toLowerCase();
//-- if results are cached, pull in cached results
if (!$scope.noCache && cache[ term ]) {
ctrl.matches = cache[ term ];
updateMessages();
var searchText = $scope.searchText || '';
var term = searchText.toLowerCase();
// If caching is enabled and the current searchText is stored in the cache
if (!$scope.noCache && cache[term]) {
// The results should be handled as same as a normal un-cached request does.
handleResults(cache[term]);
} else {

@@ -833,2 +911,20 @@ fetchResults(searchText);

/**
* Handles the retrieved results by showing them in the autocompletes dropdown.
* @param results Retrieved results
*/
function handleResults(results) {
ctrl.matches = results;
ctrl.hidden = shouldHide();
// If loading is in progress, then we'll end the progress. This is needed for example,
// when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.
if (ctrl.loading) setLoading(false);
if ($scope.selectOnMatch) selectItemOnMatch();
updateMessages();
positionDropdown();
}
/**
* If there is only one matching item and the search text matches its display value exactly,

@@ -853,3 +949,3 @@ * automatically select that item. Note: This function is only called if the user uses the

}
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$mdUtil", "$mdConstant", "$mdTheming", "$window", "$animate", "$rootElement", "$attrs", "$q"];
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$mdUtil", "$mdConstant", "$mdTheming", "$window", "$animate", "$rootElement", "$attrs", "$q", "$log"];

@@ -877,2 +973,4 @@ angular

*
* To reset the displayed value you must clear both values for `md-search-text` and `md-selected-item`.
*
* ### Validation

@@ -891,3 +989,9 @@ *

*
* ### Notes
* The `md-autocomplete` uses the the [VirtualRepeat](/api/directive/mdVirtualRepeatContainer)
* directive for displaying the results inside of the dropdown.<br/>
* > When encountering issues regarding the item template please take a look at the
* [VirtualRepeatContainer](/api/directive/mdVirtualRepeatContainer) documentation.
*
*
* @param {expression} md-items An expression in the format of `item in items` to iterate over

@@ -905,2 +1009,4 @@ * matches for your search.

* @param {boolean=} ng-disabled Determines whether or not to disable the input field
* @param {boolean=} md-require-match When set to true, the autocomplete will add a validator,
* which will evaluate to false, when no item is currently selected.
* @param {number=} md-min-length Specifies the minimum length of text before autocomplete will

@@ -914,3 +1020,4 @@ * make suggestions

* @param {boolean=} md-no-asterisk When present, asterisk will not be appended to the floating label
* @param {boolean=} md-autoselect If true, the first item will be selected by default
* @param {boolean=} md-autoselect If set to true, the first item will be automatically selected
* in the dropdown upon open.
* @param {string=} md-menu-class This will be applied to the dropdown menu for styling

@@ -927,5 +1034,8 @@ * @param {string=} md-floating-label This will add a floating label to autocomplete and wrap it in

* @param {boolean=} md-select-on-match When set, autocomplete will automatically select exact
* the item if the search text is an exact match
* the item if the search text is an exact match. <br/><br/>
* Exact match means that there is only one match showing up.
* @param {boolean=} md-match-case-insensitive When set and using `md-select-on-match`, autocomplete
* will select on case-insensitive match
* @param {string=} md-escape-options Override escape key logic. Default is `blur clear`.<br/>
* Options: `blur | clear`, `none`
*

@@ -987,3 +1097,3 @@ * @usage

function MdAutocomplete () {
function MdAutocomplete ($$mdSvgRegistry) {

@@ -1003,2 +1113,3 @@ return {

noCache: '=?mdNoCache',
requireMatch: '=?mdRequireMatch',
selectOnMatch: '=?mdSelectOnMatch',

@@ -1014,3 +1125,4 @@ matchInsensitive: '=?mdMatchCaseInsensitive',

menuClass: '@?mdMenuClass',
inputId: '@?mdInputId'
inputId: '@?mdInputId',
escapeOptions: '@?mdEscapeOptions'
},

@@ -1039,3 +1151,2 @@ link: function(scope, element, attrs, controller) {

<md-autocomplete-wrap\
layout="row"\
ng-class="{ \'md-whiteframe-z1\': !floatingLabel, \'md-menu-showing\': !$mdAutocompleteCtrl.hidden }">\

@@ -1070,3 +1181,3 @@ ' + getInputElement() + '\

<aria-status\
class="_md-visually-hidden"\
class="md-visually-hidden"\
role="status"\

@@ -1097,3 +1208,3 @@ aria-live="assertive">\

return '\
<md-input-container flex ng-if="floatingLabel">\
<md-input-container ng-if="floatingLabel">\
<label>{{floatingLabel}}</label>\

@@ -1111,6 +1222,7 @@ <input type="search"\

ng-model="$mdAutocompleteCtrl.scope.searchText"\
ng-model-options="{ allowInvalid: true }"\
ng-keydown="$mdAutocompleteCtrl.keydown($event)"\
ng-blur="$mdAutocompleteCtrl.blur()"\
' + (attr.mdNoAsterisk != null ? 'md-no-asterisk="' + attr.mdNoAsterisk + '"' : '') + '\
ng-focus="$mdAutocompleteCtrl.focus()"\
ng-focus="$mdAutocompleteCtrl.focus($event)"\
aria-owns="ul-{{$mdAutocompleteCtrl.id}}"\

@@ -1128,3 +1240,3 @@ ' + (attr.mdSelectOnFocus != null ? 'md-select-on-focus=""' : '') + '\

return '\
<input flex type="search"\
<input type="search"\
' + (tabindex != null ? 'tabindex="' + tabindex + '"' : '') + '\

@@ -1141,3 +1253,3 @@ id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}"\

ng-blur="$mdAutocompleteCtrl.blur()"\
ng-focus="$mdAutocompleteCtrl.focus()"\
ng-focus="$mdAutocompleteCtrl.focus($event)"\
placeholder="{{placeholder}}"\

@@ -1156,5 +1268,5 @@ aria-owns="ul-{{$mdAutocompleteCtrl.id}}"\

ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled"\
ng-click="$mdAutocompleteCtrl.clear()">\
<md-icon md-svg-icon="md-close"></md-icon>\
<span class="_md-visually-hidden">Clear</span>\
ng-click="$mdAutocompleteCtrl.clear($event)">\
<md-icon md-svg-src="' + $$mdSvgRegistry.mdClose + '"></md-icon>\
<span class="md-visually-hidden">Clear</span>\
</button>\

@@ -1167,2 +1279,3 @@ ';

}
MdAutocomplete.$inject = ["$$mdSvgRegistry"];

@@ -1263,3 +1376,3 @@ angular

if (text === null || state.unsafeText !== prevState.unsafeText) {
text = angular.element('<div>').text(state.unsafeText).html()
text = angular.element('<div>').text(state.unsafeText).html();
}

@@ -1276,11 +1389,10 @@ if (regex === null || state.term !== prevState.term) {

function sanitize (term) {
return term && term.replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g, '\\$&');
return term && term.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g, '\\$&');
}
function getRegExp (text, flags) {
var str = '';
if (flags.indexOf('^') >= 1) str += '^';
str += text;
if (flags.indexOf('$') >= 1) str += '$';
return new RegExp(sanitize(str), flags.replace(/[\$\^]/g, ''));
var startFlag = '', endFlag = '';
if (flags.indexOf('^') >= 0) startFlag = '^';
if (flags.indexOf('$') >= 0) endFlag = '$';
return new RegExp(startFlag + sanitize(text) + endFlag, flags.replace(/[\$\^]/g, ''));
}

@@ -1339,2 +1451,2 @@ }

ng.material.components.autocomplete = angular.module("material.components.autocomplete");
ngmaterial.components.autocomplete = angular.module("material.components.autocomplete");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdAutocompleteCtrl(e,t,n,o,i,l,a,r,c,u){function m(){n.initOptionalProperties(e,c,{searchText:null,selectedItem:null}),i(t),h(),n.nextTick(function(){f(),s(),p(),t.on("focus",p)})}function d(){function o(){var e=0,n=t.find("md-input-container");if(n.length){var o=n.find("input");e=n.prop("offsetHeight"),e-=o.prop("offsetTop"),e-=o.prop("offsetHeight"),e+=n.prop("offsetTop")}return e}function i(){var e=ce.scrollContainer.getBoundingClientRect(),t={};e.right>u.right-MENU_PADDING&&(t.left=a.right-e.width+"px"),ce.$.scrollContainer.css(t)}if(!ce)return n.nextTick(d,!1,e);var l,a=ce.wrap.getBoundingClientRect(),r=ce.snap.getBoundingClientRect(),u=ce.root.getBoundingClientRect(),m=r.bottom-u.top,s=u.bottom-r.top,p=a.left-u.left,h=a.width,g=o();c.mdFloatingLabel&&(p+=INPUT_PADDING,h-=2*INPUT_PADDING),l={left:p+"px",minWidth:h+"px",maxWidth:Math.max(a.right-u.left,u.right-a.left)-MENU_PADDING+"px"},m>s&&u.height-a.bottom-MENU_PADDING<MAX_HEIGHT?(l.top="auto",l.bottom=s+"px",l.maxHeight=Math.min(MAX_HEIGHT,a.top-u.top-MENU_PADDING)+"px"):(l.top=m-g+"px",l.bottom="auto",l.maxHeight=Math.min(MAX_HEIGHT,u.bottom+n.scrollTop()-a.bottom-MENU_PADDING)+"px"),ce.$.scrollContainer.css(l),n.nextTick(i,!1)}function s(){ce.$.root.length&&(i(ce.$.scrollContainer),ce.$.scrollContainer.detach(),ce.$.root.append(ce.$.scrollContainer),a.pin&&a.pin(ce.$.scrollContainer,r))}function p(){e.autofocus&&ce.input.focus()}function h(){var t=parseInt(e.delay,10)||0;c.$observe("disabled",function(e){le.isDisabled=n.parseAttributeBoolean(e,!1)}),c.$observe("required",function(e){le.isRequired=n.parseAttributeBoolean(e,!1)}),c.$observe("readonly",function(e){le.isReadonly=n.parseAttributeBoolean(e,!1)}),e.$watch("searchText",t?n.debounce(y,t):y),e.$watch("selectedItem",I),angular.element(l).on("resize",d),e.$on("$destroy",g)}function g(){if(le.hidden||n.enableScrolling(),angular.element(l).off("resize",d),ce){var e="ul scroller scrollContainer input".split(" ");angular.forEach(e,function(e){ce.$[e].remove()})}}function f(){ce={main:t[0],scrollContainer:t[0].getElementsByClassName("md-virtual-repeat-container")[0],scroller:t[0].getElementsByClassName("md-virtual-repeat-scroller")[0],ul:t.find("ul")[0],input:t.find("input")[0],wrap:t.find("md-autocomplete-wrap")[0],root:document.body},ce.li=ce.ul.getElementsByTagName("li"),ce.snap=$(),ce.$=x(ce)}function $(){for(var e=t;e.length;e=e.parent())if(angular.isDefined(e.attr("md-autocomplete-snap")))return e[0];return ce.wrap}function x(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=angular.element(e[n]));return t}function C(t,o){!t&&o?(d(),ce&&n.nextTick(function(){n.disableScrollAround(ce.ul),ge=v(angular.element(ce.wrap))},!1,e)):t&&!o&&n.nextTick(function(){n.enableScrolling(),ge&&(ge(),ge=null)},!1,e)}function v(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}function A(){me=!0}function b(){se||ce.input.focus(),me=!1,le.hidden=G()}function T(){ce.input.focus()}function I(t,n){t&&L(t).then(function(o){e.searchText=o,w(t,n)}),t!==n&&M()}function M(){angular.isFunction(e.itemChange)&&e.itemChange(O(e.selectedItem))}function E(){angular.isFunction(e.textChange)&&e.textChange()}function w(e,t){de.forEach(function(n){n(e,t)})}function D(e){-1==de.indexOf(e)&&de.push(e)}function N(e){var t=de.indexOf(e);-1!=t&&de.splice(t,1)}function y(t,n){le.index=S(),t!==n&&L(e.selectedItem).then(function(o){t!==o&&(e.selectedItem=null,t!==n&&E(),j()?oe():(le.matches=[],F(!1),J()))})}function H(){se=!1,me||(le.hidden=G())}function k(e){e&&(me=!1,se=!1),ce.input.blur()}function _(){se=!0,angular.isString(e.searchText)||(e.searchText=""),le.hidden=G(),le.hidden||oe()}function P(t){switch(t.keyCode){case o.KEY_CODE.DOWN_ARROW:if(le.loading)return;t.stopPropagation(),t.preventDefault(),le.index=Math.min(le.index+1,le.matches.length-1),Z(),J();break;case o.KEY_CODE.UP_ARROW:if(le.loading)return;t.stopPropagation(),t.preventDefault(),le.index=le.index<0?le.matches.length-1:Math.max(0,le.index-1),Z(),J();break;case o.KEY_CODE.TAB:if(b(),le.hidden||le.loading||le.index<0||le.matches.length<1)return;Y(le.index);break;case o.KEY_CODE.ENTER:if(le.hidden||le.loading||le.index<0||le.matches.length<1)return;if(B())return;t.stopPropagation(),t.preventDefault(),Y(le.index);break;case o.KEY_CODE.ESCAPE:t.stopPropagation(),t.preventDefault(),e.searchText&&z(),k(!0)}}function R(){return angular.isNumber(e.minLength)?e.minLength:1}function L(t){function n(t){return t&&e.itemText?e.itemText(O(t)):null}return u.when(n(t)||t)}function O(e){if(e){var t={};return le.itemName&&(t[le.itemName]=e),t}}function S(){return e.autoselect?0:-1}function F(e){le.loading!=e&&(le.loading=e),le.hidden=G()}function G(){return le.loading&&!q()?!0:B()?!0:se?!U():!0}function U(){return j()&&q()||ne()}function q(){return!!le.matches.length}function B(){return!!le.scope.selectedItem}function V(){return le.loading&&!B()}function W(){return L(le.matches[le.index])}function j(){return(e.searchText||"").length>=R()}function K(e,t,n){Object.defineProperty(le,e,{get:function(){return n},set:function(e){var o=n;n=e,t(e,o)}})}function Y(t){n.nextTick(function(){L(le.matches[t]).then(function(e){var t=ce.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=le.matches[t],F(!1)})},!1)}function z(){F(!0),le.index=0,le.matches=[],e.searchText="";var t=document.createEvent("CustomEvent");t.initCustomEvent("input",!0,!0,{value:e.searchText}),ce.input.dispatchEvent(t),ce.input.focus()}function X(t){function o(t){t&&(t=u.when(t),he++,F(!0),n.nextTick(function(){t.then(i)["finally"](function(){0===--he&&F(!1)})},!0,e))}function i(n){ue[a]=n,(t||"")===(e.searchText||"")&&(le.matches=n,le.hidden=G(),le.loading&&F(!1),e.selectOnMatch&&ie(),J(),d())}var l=e.$parent.$eval(re),a=t.toLowerCase(),r=angular.isArray(l),c=!!l.then;r?i(l):c&&o(l)}function J(){W().then(function(e){le.messages=[Q(),e]})}function Q(){if(pe===le.matches.length)return"";switch(pe=le.matches.length,le.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+le.matches.length+" matches available."}}function Z(){if(ce.li[0]){var e=ce.li[0].offsetHeight,t=e*le.index,n=t+e,o=ce.scroller.clientHeight,i=ce.scroller.scrollTop;i>t?te(t):n>i+o&&te(n-o)}}function ee(){return 0!==he}function te(e){ce.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function ne(){var e=(le.scope.searchText||"").length;return le.hasNotFound&&!q()&&(!le.loading||ee())&&e>=R()&&(se||me)&&!B()}function oe(){var t=e.searchText||"",n=t.toLowerCase();!e.noCache&&ue[n]?(le.matches=ue[n],J()):X(t),le.hidden=G()}function ie(){var t=e.searchText,n=le.matches,o=n[0];1===n.length&&L(o).then(function(n){var o=t==n;e.matchInsensitive&&!o&&(o=t.toLowerCase()==n.toLowerCase()),o&&Y(0)})}var le=this,ae=e.itemsExpr.split(/ in /i),re=ae[1],ce=null,ue={},me=!1,de=[],se=!1,pe=0,he=0,ge=null;return K("hidden",C,!0),le.scope=e,le.parent=e.$parent,le.itemName=ae[0],le.matches=[],le.loading=!1,le.hidden=!0,le.index=null,le.messages=[],le.id=n.nextUid(),le.isDisabled=null,le.isRequired=null,le.isReadonly=null,le.hasNotFound=!1,le.keydown=P,le.blur=H,le.focus=_,le.clear=z,le.select=Y,le.listEnter=A,le.listLeave=b,le.mouseUp=T,le.getCurrentDisplayValue=W,le.registerSelectedItemWatcher=D,le.unregisterSelectedItemWatcher=N,le.notFoundVisible=ne,le.loadingIsVisible=V,m()}function MdAutocomplete(){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId"},link:function(e,t,n,o){o.hasNotFound=!!t.attr("md-has-not-found")},template:function(e,t){function n(){var t=e.find("md-item-template").detach(),n=t.length?t.html():e.html();return t.length||e.empty(),"<md-autocomplete-parent-scope md-autocomplete-replace>"+n+"</md-autocomplete-parent-scope>"}function o(){var t=e.find("md-not-found").detach(),n=t.length?t.html():"";return n?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>'+n+"</li>":""}function i(){return t.mdFloatingLabel?' <md-input-container flex ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" '+(null!=c?'tabindex="'+c+'"':"")+' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" '+(null!=t.mdNoAsterisk?'md-no-asterisk="'+t.mdNoAsterisk+'"':"")+' ng-focus="$mdAutocompleteCtrl.focus()" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=t.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>'+r+"</div> </md-input-container>":' <input flex type="search" '+(null!=c?'tabindex="'+c+'"':"")+' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" ng-focus="$mdAutocompleteCtrl.focus()" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=t.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" tabindex="-1" ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled" ng-click="$mdAutocompleteCtrl.clear()"> <md-icon md-svg-icon="md-close"></md-icon> <span class="_md-visually-hidden">Clear</span> </button> '}var l=o(),a=n(),r=e.html(),c=t.tabindex;return l&&e.attr("md-has-not-found",!0),e.attr("tabindex","-1")," <md-autocomplete-wrap layout=\"row\" ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\"> "+i()+' <md-progress-linear class="'+(t.mdFloatingLabel?"md-inline":"")+'" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-min="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select($index)" md-extra-name="$mdAutocompleteCtrl.itemName"> '+a+" </li>"+l+' </ul> </md-virtual-repeat-container> </md-autocomplete-wrap> <aria-status class="_md-visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p> </aria-status>'}}}function MdAutocompleteItemScopeDirective(e,t){function n(e,n,o){return function(e,n,i){function l(n,o){c[o]=e[n],e.$watch(n,function(e){t.nextTick(function(){c[o]=e})})}function a(){var t=!1,n=!1;e.$watch(function(){n||t||(t=!0,e.$$postDigest(function(){n||c.$digest(),t=n=!1}))}),c.$watch(function(){n=!0})}var r=e.$mdAutocompleteCtrl,c=r.parent.$new(),u=r.itemName;l("$index","$index"),l("item",u),a(),o(c,function(e){n.after(e)})}}return{restrict:"AE",compile:n,terminal:!0,transclude:"element"}}function MdHighlightCtrl(e,t,n){function o(o,i){var a=null,r=null,c=n.mdHighlightFlags||"",u=e.$watch(function(e){return{term:o(e),unsafeText:i(e)}},function(e,n){null!==a&&e.unsafeText===n.unsafeText||(a=angular.element("<div>").text(e.unsafeText).html()),null!==r&&e.term===n.term||(r=l(e.term,c)),t.html(a.replace(r,'<span class="highlight">$&</span>'))},!0);t.on("$destroy",u)}function i(e){return e&&e.replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g,"\\$&")}function l(e,t){var n="";return t.indexOf("^")>=1&&(n+="^"),n+=e,t.indexOf("$")>=1&&(n+="$"),new RegExp(i(n),t.replace(/[\$\^]/g,""))}this.init=o}function MdHighlight(e,t){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(n,o){var i=t(o.mdHighlightText),l=e(n.html());return function(e,t,n,o){o.init(i,l)}}}}goog.provide("ng.material.components.autocomplete"),goog.require("ng.material.components.icon"),goog.require("ng.material.components.virtualRepeat"),goog.require("ng.material.core"),angular.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),angular.module("material.components.autocomplete").controller("MdAutocompleteCtrl",MdAutocompleteCtrl);var ITEM_HEIGHT=41,MAX_HEIGHT=5.5*ITEM_HEIGHT,MENU_PADDING=8,INPUT_PADDING=2;MdAutocompleteCtrl.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q"],angular.module("material.components.autocomplete").directive("mdAutocomplete",MdAutocomplete),angular.module("material.components.autocomplete").directive("mdAutocompleteParentScope",MdAutocompleteItemScopeDirective),MdAutocompleteItemScopeDirective.$inject=["$compile","$mdUtil"],angular.module("material.components.autocomplete").controller("MdHighlightCtrl",MdHighlightCtrl),MdHighlightCtrl.$inject=["$scope","$element","$attrs"],angular.module("material.components.autocomplete").directive("mdHighlightText",MdHighlight),MdHighlight.$inject=["$interpolate","$parse"],ng.material.components.autocomplete=angular.module("material.components.autocomplete");
function MdAutocompleteCtrl(e,t,n,o,i,l,a,r,c,u,m){function d(){n.initOptionalProperties(e,c,{searchText:"",selectedItem:null}),i(t),f(),n.nextTick(function(){x(),h(),g(),t.on("focus",g)})}function s(){e.requireMatch&&Te&&Te.$setValidity("md-require-match",!!e.selectedItem)}function p(){function o(){var e=0,n=t.find("md-input-container");if(n.length){var o=n.find("input");e=n.prop("offsetHeight"),e-=o.prop("offsetTop"),e-=o.prop("offsetHeight"),e+=n.prop("offsetTop")}return e}function i(){var e=ge.scrollContainer.getBoundingClientRect(),t={};e.right>u.right-MENU_PADDING&&(t.left=a.right-e.width+"px"),ge.$.scrollContainer.css(t)}if(!ge)return n.nextTick(p,!1,e);var l,a=ge.wrap.getBoundingClientRect(),r=ge.snap.getBoundingClientRect(),u=ge.root.getBoundingClientRect(),m=r.bottom-u.top,d=u.bottom-r.top,s=a.left-u.left,h=a.width,g=o();c.mdFloatingLabel&&(s+=INPUT_PADDING,h-=2*INPUT_PADDING),l={left:s+"px",minWidth:h+"px",maxWidth:Math.max(a.right-u.left,u.right-a.left)-MENU_PADDING+"px"},m>d&&u.height-a.bottom-MENU_PADDING<MAX_HEIGHT?(l.top="auto",l.bottom=d+"px",l.maxHeight=Math.min(MAX_HEIGHT,a.top-u.top-MENU_PADDING)+"px"):(l.top=m-g+"px",l.bottom="auto",l.maxHeight=Math.min(MAX_HEIGHT,u.bottom+n.scrollTop()-a.bottom-MENU_PADDING)+"px"),ge.$.scrollContainer.css(l),n.nextTick(i,!1)}function h(){ge.$.root.length&&(i(ge.$.scrollContainer),ge.$.scrollContainer.detach(),ge.$.root.append(ge.$.scrollContainer),a.pin&&a.pin(ge.$.scrollContainer,r))}function g(){e.autofocus&&ge.input.focus()}function f(){var t=parseInt(e.delay,10)||0;c.$observe("disabled",function(e){se.isDisabled=n.parseAttributeBoolean(e,!1)}),c.$observe("required",function(e){se.isRequired=n.parseAttributeBoolean(e,!1)}),c.$observe("readonly",function(e){se.isReadonly=n.parseAttributeBoolean(e,!1)}),e.$watch("searchText",t?n.debounce(k,t):k),e.$watch("selectedItem",w),angular.element(l).on("resize",p),e.$on("$destroy",$)}function $(){if(se.hidden||n.enableScrolling(),angular.element(l).off("resize",p),ge){var e=["ul","scroller","scrollContainer","input"];angular.forEach(e,function(e){ge.$[e].remove()})}}function x(){ge={main:t[0],scrollContainer:t[0].querySelector(".md-virtual-repeat-container"),scroller:t[0].querySelector(".md-virtual-repeat-scroller"),ul:t.find("ul")[0],input:t.find("input")[0],wrap:t.find("md-autocomplete-wrap")[0],root:document.body},ge.li=ge.ul.getElementsByTagName("li"),ge.snap=C(),ge.$=v(ge),Te=ge.$.input.controller("ngModel")}function C(){for(var e=t;e.length;e=e.parent())if(angular.isDefined(e.attr("md-autocomplete-snap")))return e[0];return ge.wrap}function v(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=angular.element(e[n]));return t}function A(t,o){!t&&o?(p(),ge&&n.nextTick(function(){n.disableScrollAround(ge.ul),be=b(angular.element(ge.wrap))},!1,e)):t&&!o&&n.nextTick(function(){n.enableScrolling(),be&&(be(),be=null)},!1,e)}function b(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}function T(){$e=!0}function I(){Ce||se.hidden||ge.input.focus(),$e=!1,se.hidden=U()}function M(){ge.input.focus()}function w(t,n){s(),t?_(t).then(function(o){e.searchText=o,y(t,n)}):n&&e.searchText&&_(n).then(function(t){t.toString().toLowerCase()===e.searchText.toLowerCase()&&(e.searchText="")}),t!==n&&E()}function E(){angular.isFunction(e.itemChange)&&e.itemChange(q(e.selectedItem))}function D(){angular.isFunction(e.textChange)&&e.textChange()}function y(e,t){xe.forEach(function(n){n(e,t)})}function N(e){xe.indexOf(e)==-1&&xe.push(e)}function H(e){var t=xe.indexOf(e);t!=-1&&xe.splice(t,1)}function k(t,n){se.index=F(),t!==n&&(s(),_(e.selectedItem).then(function(o){t!==o&&(e.selectedItem=null,t!==n&&D(),X()?ue():(se.matches=[],G(!1),oe()))}))}function O(){Ce=!1,$e||(se.hidden=U())}function S(e){e&&($e=!1,Ce=!1),ge.input.blur()}function L(t){Ce=!0,angular.isString(e.searchText)||(e.searchText=""),se.hidden=U(),se.hidden||ue()}function P(t){switch(t.keyCode){case o.KEY_CODE.DOWN_ARROW:if(se.loading)return;t.stopPropagation(),t.preventDefault(),se.index=Math.min(se.index+1,se.matches.length-1),le(),oe();break;case o.KEY_CODE.UP_ARROW:if(se.loading)return;t.stopPropagation(),t.preventDefault(),se.index=se.index<0?se.matches.length-1:Math.max(0,se.index-1),le(),oe();break;case o.KEY_CODE.TAB:if(I(),se.hidden||se.loading||se.index<0||se.matches.length<1)return;Q(se.index);break;case o.KEY_CODE.ENTER:if(se.hidden||se.loading||se.index<0||se.matches.length<1)return;if(K())return;t.stopPropagation(),t.preventDefault(),Q(se.index);break;case o.KEY_CODE.ESCAPE:if(t.preventDefault(),!V())return;t.stopPropagation(),ee(),e.searchText&&B("clear")&&te(),se.hidden=!0,B("blur")&&S(!0)}}function R(){return angular.isNumber(e.minLength)?e.minLength:1}function _(t){function n(t){return t&&e.itemText?e.itemText(q(t)):null}return u.when(n(t)||t).then(function(e){return e&&!angular.isString(e)&&m.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e})}function q(e){if(e){var t={};return se.itemName&&(t[se.itemName]=e),t}}function F(){return e.autoselect?0:-1}function G(e){se.loading!=e&&(se.loading=e),se.hidden=U()}function U(){return!(!se.loading||j())||(!!K()||(!Ce||!W()))}function V(){return B("blur")||!se.hidden||se.loading||B("clear")&&e.searchText}function B(t){return!e.escapeOptions||e.escapeOptions.toLowerCase().indexOf(t)!==-1}function W(){return X()&&j()||ce()}function j(){return!!se.matches.length}function K(){return!!se.scope.selectedItem}function Y(){return se.loading&&!K()}function z(){return _(se.matches[se.index])}function X(){return(e.searchText||"").length>=R()}function J(e,t,n){Object.defineProperty(se,e,{get:function(){return n},set:function(e){var o=n;n=e,t(e,o)}})}function Q(t){n.nextTick(function(){_(se.matches[t]).then(function(e){var t=ge.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=se.matches[t],G(!1)})},!1)}function Z(){ee(),te()}function ee(){se.index=0,se.matches=[]}function te(){G(!0),e.searchText="";var t=document.createEvent("CustomEvent");t.initCustomEvent("change",!0,!0,{value:""}),ge.input.dispatchEvent(t),ge.input.blur(),e.searchText="",ge.input.focus()}function ne(t){function o(t){t&&(t=u.when(t),Ae++,G(!0),n.nextTick(function(){t.then(i)["finally"](function(){0===--Ae&&G(!1)})},!0,e))}function i(n){fe[a]=n,(t||"")===(e.searchText||"")&&me(n)}var l=e.$parent.$eval(he),a=t.toLowerCase(),r=angular.isArray(l),c=!!l.then;r?i(l):c&&o(l)}function oe(){z().then(function(e){se.messages=[ie(),e]})}function ie(){if(ve===se.matches.length)return"";switch(ve=se.matches.length,se.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+se.matches.length+" matches available."}}function le(){if(ge.li[0]){var e=ge.li[0].offsetHeight,t=e*se.index,n=t+e,o=ge.scroller.clientHeight,i=ge.scroller.scrollTop;t<i?re(t):n>i+o&&re(n-o)}}function ae(){return 0!==Ae}function re(e){ge.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function ce(){var e=(se.scope.searchText||"").length;return se.hasNotFound&&!j()&&(!se.loading||ae())&&e>=R()&&(Ce||$e)&&!K()}function ue(){var t=e.searchText||"",n=t.toLowerCase();!e.noCache&&fe[n]?me(fe[n]):ne(t),se.hidden=U()}function me(t){se.matches=t,se.hidden=U(),se.loading&&G(!1),e.selectOnMatch&&de(),oe(),p()}function de(){var t=e.searchText,n=se.matches,o=n[0];1===n.length&&_(o).then(function(n){var o=t==n;e.matchInsensitive&&!o&&(o=t.toLowerCase()==n.toLowerCase()),o&&Q(0)})}var se=this,pe=e.itemsExpr.split(/ in /i),he=pe[1],ge=null,fe={},$e=!1,xe=[],Ce=!1,ve=0,Ae=0,be=null,Te=null;return J("hidden",A,!0),se.scope=e,se.parent=e.$parent,se.itemName=pe[0],se.matches=[],se.loading=!1,se.hidden=!0,se.index=null,se.messages=[],se.id=n.nextUid(),se.isDisabled=null,se.isRequired=null,se.isReadonly=null,se.hasNotFound=!1,se.keydown=P,se.blur=O,se.focus=L,se.clear=Z,se.select=Q,se.listEnter=T,se.listLeave=I,se.mouseUp=M,se.getCurrentDisplayValue=z,se.registerSelectedItemWatcher=N,se.unregisterSelectedItemWatcher=H,se.notFoundVisible=ce,se.loadingIsVisible=Y,se.positionDropdown=p,d()}function MdAutocomplete(e){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions"},link:function(e,t,n,o){o.hasNotFound=!!t.attr("md-has-not-found")},template:function(t,n){function o(){var e=t.find("md-item-template").detach(),n=e.length?e.html():t.html();return e.length||t.empty(),"<md-autocomplete-parent-scope md-autocomplete-replace>"+n+"</md-autocomplete-parent-scope>"}function i(){var e=t.find("md-not-found").detach(),n=e.length?e.html():"";return n?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>'+n+"</li>":""}function l(){return n.mdFloatingLabel?' <md-input-container ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" '+(null!=u?'tabindex="'+u+'"':"")+' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-model-options="{ allowInvalid: true }" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" '+(null!=n.mdNoAsterisk?'md-no-asterisk="'+n.mdNoAsterisk+'"':"")+' ng-focus="$mdAutocompleteCtrl.focus($event)" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=n.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>'+c+"</div> </md-input-container>":' <input type="search" '+(null!=u?'tabindex="'+u+'"':"")+' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" ng-focus="$mdAutocompleteCtrl.focus($event)" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=n.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" tabindex="-1" ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled" ng-click="$mdAutocompleteCtrl.clear($event)"> <md-icon md-svg-src="'+e.mdClose+'"></md-icon> <span class="md-visually-hidden">Clear</span> </button> '}var a=i(),r=o(),c=t.html(),u=n.tabindex;return a&&t.attr("md-has-not-found",!0),t.attr("tabindex","-1")," <md-autocomplete-wrap ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\"> "+l()+' <md-progress-linear class="'+(n.mdFloatingLabel?"md-inline":"")+'" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-min="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select($index)" md-extra-name="$mdAutocompleteCtrl.itemName"> '+r+" </li>"+a+' </ul> </md-virtual-repeat-container> </md-autocomplete-wrap> <aria-status class="md-visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p> </aria-status>'}}}function MdAutocompleteItemScopeDirective(e,t){function n(e,n,o){return function(e,n,i){function l(n,o){c[o]=e[n],e.$watch(n,function(e){t.nextTick(function(){c[o]=e})})}function a(){var t=!1,n=!1;e.$watch(function(){n||t||(t=!0,e.$$postDigest(function(){n||c.$digest(),t=n=!1}))}),c.$watch(function(){n=!0})}var r=e.$mdAutocompleteCtrl,c=r.parent.$new(),u=r.itemName;l("$index","$index"),l("item",u),a(),o(c,function(e){n.after(e)})}}return{restrict:"AE",compile:n,terminal:!0,transclude:"element"}}function MdHighlightCtrl(e,t,n){function o(o,i){var a=null,r=null,c=n.mdHighlightFlags||"",u=e.$watch(function(e){return{term:o(e),unsafeText:i(e)}},function(e,n){null!==a&&e.unsafeText===n.unsafeText||(a=angular.element("<div>").text(e.unsafeText).html()),null!==r&&e.term===n.term||(r=l(e.term,c)),t.html(a.replace(r,'<span class="highlight">$&</span>'))},!0);t.on("$destroy",u)}function i(e){return e&&e.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g,"\\$&")}function l(e,t){var n="",o="";return t.indexOf("^")>=0&&(n="^"),t.indexOf("$")>=0&&(o="$"),new RegExp(n+i(e)+o,t.replace(/[\$\^]/g,""))}this.init=o}function MdHighlight(e,t){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(n,o){var i=t(o.mdHighlightText),l=e(n.html());return function(e,t,n,o){o.init(i,l)}}}}goog.provide("ngmaterial.components.autocomplete"),goog.require("ngmaterial.components.icon"),goog.require("ngmaterial.components.virtualRepeat"),goog.require("ngmaterial.core"),angular.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),angular.module("material.components.autocomplete").controller("MdAutocompleteCtrl",MdAutocompleteCtrl);var ITEM_HEIGHT=41,MAX_HEIGHT=5.5*ITEM_HEIGHT,MENU_PADDING=8,INPUT_PADDING=2;MdAutocompleteCtrl.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log"],angular.module("material.components.autocomplete").directive("mdAutocomplete",MdAutocomplete),MdAutocomplete.$inject=["$$mdSvgRegistry"],angular.module("material.components.autocomplete").directive("mdAutocompleteParentScope",MdAutocompleteItemScopeDirective),MdAutocompleteItemScopeDirective.$inject=["$compile","$mdUtil"],angular.module("material.components.autocomplete").controller("MdHighlightCtrl",MdHighlightCtrl),MdHighlightCtrl.$inject=["$scope","$element","$attrs"],angular.module("material.components.autocomplete").directive("mdHighlightText",MdHighlight),MdHighlight.$inject=["$interpolate","$parse"],ngmaterial.components.autocomplete=angular.module("material.components.autocomplete");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.backdrop');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.backdrop');
goog.require('ngmaterial.core');
/*

@@ -32,3 +32,3 @@ * @ngdoc module

.directive('mdBackdrop', ["$mdTheming", "$mdUtil", "$animate", "$rootElement", "$window", "$log", "$$rAF", "$document", function BackdropDirective($mdTheming, $mdUtil, $animate, $rootElement, $window, $log, $$rAF, $document) {
var ERROR_CSS_POSITION = "<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";
var ERROR_CSS_POSITION = '<md-backdrop> may not work properly in a scrolled, static-positioned parent container.';

@@ -44,11 +44,21 @@ return {

$$rAF(function () {
var bodyStyles;
$$rAF(function() {
// If body scrolling has been disabled using mdUtil.disableBodyScroll(),
// adjust the 'backdrop' height to account for the fixed 'body' top offset.
// Note that this can be pretty expensive and is better done inside the $$rAF.
var body = $window.getComputedStyle($document[0].body);
if (body.position == 'fixed') {
var hViewport = parseInt(body.height, 10) + Math.abs(parseInt(body.top, 10));
element.css({
height: hViewport + 'px'
bodyStyles = $window.getComputedStyle($document[0].body);
if (bodyStyles.position === 'fixed') {
var resizeHandler = $mdUtil.debounce(function(){
bodyStyles = $window.getComputedStyle($document[0].body);
resize();
}, 60, null, false);
resize();
angular.element($window).on('resize', resizeHandler);
scope.$on('$destroy', function() {
angular.element($window).off('resize', resizeHandler);
});

@@ -59,19 +69,18 @@ }

// so let's wait until $animate is done...
var parent = element.parent()[0];
if (parent) {
var parent = element.parent();
if ( parent.nodeName == 'BODY' ) {
element.css({position : 'fixed'});
if (parent.length) {
if (parent[0].nodeName === 'BODY') {
element.css('position', 'fixed');
}
var styles = $window.getComputedStyle(parent);
if (styles.position == 'static') {
var styles = $window.getComputedStyle(parent[0]);
if (styles.position === 'static') {
// backdrop uses position:absolute and will not work properly with parent position:static (default)
$log.warn(ERROR_CSS_POSITION);
}
}
// Only inherit the parent if the backdrop has a parent.
if (element.parent().length) {
$mdTheming.inherit(element, element.parent());
// Only inherit the parent if the backdrop has a parent.
$mdTheming.inherit(element, parent);
}

@@ -81,8 +90,5 @@ });

function resize() {
var hViewport = parseInt(body.height, 10) + Math.abs(parseInt(body.top, 10));
element.css({
height: hViewport + 'px'
});
var viewportHeight = parseInt(bodyStyles.height, 10) + Math.abs(parseInt(bodyStyles.top, 10));
element.css('height', viewportHeight + 'px');
}
}

@@ -92,2 +98,2 @@

ng.material.components.backdrop = angular.module("material.components.backdrop");
ngmaterial.components.backdrop = angular.module("material.components.backdrop");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
goog.provide("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(e,t,o,n,a,r,i,p){function c(t,c,m){o.pin&&o.pin(c,n),i(function(){var t=a.getComputedStyle(p[0].body);if("fixed"==t.position){var o=parseInt(t.height,10)+Math.abs(parseInt(t.top,10));c.css({height:o+"px"})}var n=c.parent()[0];if(n){"BODY"==n.nodeName&&c.css({position:"fixed"});var i=a.getComputedStyle(n);"static"==i.position&&r.warn(d)}c.parent().length&&e.inherit(c,c.parent())})}var d="<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";return{restrict:"E",link:c}}]),ng.material.components.backdrop=angular.module("material.components.backdrop");
goog.provide("ngmaterial.components.backdrop"),goog.require("ngmaterial.core"),angular.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(e,o,n,t,r,a,i,c){function d(d,l,m){function s(){var e=parseInt(u.height,10)+Math.abs(parseInt(u.top,10));l.css("height",e+"px")}n.pin&&n.pin(l,t);var u;i(function(){if(u=r.getComputedStyle(c[0].body),"fixed"===u.position){var n=o.debounce(function(){u=r.getComputedStyle(c[0].body),s()},60,null,!1);s(),angular.element(r).on("resize",n),d.$on("$destroy",function(){angular.element(r).off("resize",n)})}var t=l.parent();if(t.length){"BODY"===t[0].nodeName&&l.css("position","fixed");var i=r.getComputedStyle(t[0]);"static"===i.position&&a.warn(p),e.inherit(l,t)}})}var p="<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";return{restrict:"E",link:d}}]),ngmaterial.components.backdrop=angular.module("material.components.backdrop");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.bottomSheet');
goog.require('ng.material.components.backdrop');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.bottomSheet');
goog.require('ngmaterial.components.backdrop');
goog.require('ngmaterial.core');
/**

@@ -146,3 +146,3 @@ * @ngdoc module

bottomSheetDefaults.$inject = ["$animate", "$mdConstant", "$mdUtil", "$mdTheming", "$mdBottomSheet", "$rootElement", "$mdGesture"];
bottomSheetDefaults.$inject = ["$animate", "$mdConstant", "$mdUtil", "$mdTheming", "$mdBottomSheet", "$rootElement", "$mdGesture", "$log"];
return $$interimElementProvider('$mdBottomSheet')

@@ -155,3 +155,4 @@ .setDefaults({

/* ngInject */
function bottomSheetDefaults($animate, $mdConstant, $mdUtil, $mdTheming, $mdBottomSheet, $rootElement, $mdGesture) {
function bottomSheetDefaults($animate, $mdConstant, $mdUtil, $mdTheming, $mdBottomSheet, $rootElement,
$mdGesture, $log) {
var backdrop;

@@ -177,5 +178,12 @@

// Once the md-bottom-sheet has `ng-cloak` applied on his template the opening animation will not work properly.
// This is a very common problem, so we have to notify the developer about this.
if (element.hasClass('ng-cloak')) {
var message = '$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.';
$log.warn( message, element[0] );
}
if (!options.disableBackdrop) {
// Add a backdrop that will close on click
backdrop = $mdUtil.createBackdrop(scope, "_md-bottom-sheet-backdrop md-opaque");
backdrop = $mdUtil.createBackdrop(scope, "md-bottom-sheet-backdrop md-opaque");

@@ -213,3 +221,3 @@ // Prevent mouse focus on backdrop; ONLY programatic focus allowed.

element[0].querySelector('a') ||
element[0].querySelector('[ng-click]')
element[0].querySelector($mdUtil.prefixer('ng-click', true))
) || backdrop;

@@ -298,2 +306,2 @@

ng.material.components.bottomSheet = angular.module("material.components.bottomSheet");
ngmaterial.components.bottomSheet = angular.module("material.components.bottomSheet");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdBottomSheetDirective(e){return{restrict:"E",link:function(t,o){o.addClass("_md"),t.$on("$destroy",function(){e.destroy()})}}}function MdBottomSheetProvider(e){function t(e,t,r,a,i,c,l){function d(o,n,l,d){n=r.extractElementByName(n,"md-bottom-sheet"),n.attr("tabindex","-1"),l.disableBackdrop||(u=r.createBackdrop(o,"_md-bottom-sheet-backdrop md-opaque"),u[0].tabIndex=-1,l.clickOutsideToClose&&u.on("click",function(){r.nextTick(i.cancel,!0)}),a.inherit(u,l.parent),e.enter(u,l.parent,null));var m=new s(n,l.parent);return l.bottomSheet=m,a.inherit(m.element,l.parent),l.disableParentScroll&&(l.restoreScroll=r.disableScrollAround(m.element,l.parent)),e.enter(m.element,l.parent,u).then(function(){var e=r.findFocusTarget(n)||angular.element(n[0].querySelector("button")||n[0].querySelector("a")||n[0].querySelector("[ng-click]"))||u;l.escapeToClose&&(l.rootElementKeyupCallback=function(e){e.keyCode===t.KEY_CODE.ESCAPE&&r.nextTick(i.cancel,!0)},c.on("keyup",l.rootElementKeyupCallback),e&&e.focus())})}function m(t,o,n){var r=n.bottomSheet;return n.disableBackdrop||e.leave(u),e.leave(r.element).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),r.cleanup()})}function s(e,a){function c(o){e.css(t.CSS.TRANSITION_DURATION,"0ms")}function d(o){var r=o.pointer.distanceY;5>r&&(r=Math.max(-n,r/2)),e.css(t.CSS.TRANSFORM,"translate3d(0,"+(n+r)+"px,0)")}function m(n){if(n.pointer.distanceY>0&&(n.pointer.distanceY>20||Math.abs(n.pointer.velocityY)>o)){var a=e.prop("offsetHeight")-n.pointer.distanceY,c=Math.min(a/n.pointer.velocityY*.75,500);e.css(t.CSS.TRANSITION_DURATION,c+"ms"),r.nextTick(i.cancel,!0)}else e.css(t.CSS.TRANSITION_DURATION,""),e.css(t.CSS.TRANSFORM,"")}var s=l.register(a,"drag",{horizontal:!1});return a.on("$md.dragstart",c).on("$md.drag",d).on("$md.dragend",m),{element:e,cleanup:function(){s(),a.off("$md.dragstart",c),a.off("$md.drag",d),a.off("$md.dragend",m)}}}var u;return{themable:!0,onShow:d,onRemove:m,disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}var o=.5,n=80;return t.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:t})}goog.provide("ng.material.components.bottomSheet"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",MdBottomSheetDirective).provider("$mdBottomSheet",MdBottomSheetProvider),MdBottomSheetDirective.$inject=["$mdBottomSheet"],MdBottomSheetProvider.$inject=["$$interimElementProvider"],ng.material.components.bottomSheet=angular.module("material.components.bottomSheet");
function MdBottomSheetDirective(e){return{restrict:"E",link:function(t,o){o.addClass("_md"),t.$on("$destroy",function(){e.destroy()})}}}function MdBottomSheetProvider(e){function t(e,t,r,a,i,c,l,m){function d(o,n,l,d){if(n=r.extractElementByName(n,"md-bottom-sheet"),n.attr("tabindex","-1"),n.hasClass("ng-cloak")){var s="$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.";m.warn(s,n[0])}l.disableBackdrop||(S=r.createBackdrop(o,"md-bottom-sheet-backdrop md-opaque"),S[0].tabIndex=-1,l.clickOutsideToClose&&S.on("click",function(){r.nextTick(i.cancel,!0)}),a.inherit(S,l.parent),e.enter(S,l.parent,null));var p=new u(n,l.parent);return l.bottomSheet=p,a.inherit(p.element,l.parent),l.disableParentScroll&&(l.restoreScroll=r.disableScrollAround(p.element,l.parent)),e.enter(p.element,l.parent,S).then(function(){var e=r.findFocusTarget(n)||angular.element(n[0].querySelector("button")||n[0].querySelector("a")||n[0].querySelector(r.prefixer("ng-click",!0)))||S;l.escapeToClose&&(l.rootElementKeyupCallback=function(e){e.keyCode===t.KEY_CODE.ESCAPE&&r.nextTick(i.cancel,!0)},c.on("keyup",l.rootElementKeyupCallback),e&&e.focus())})}function s(t,o,n){var r=n.bottomSheet;return n.disableBackdrop||e.leave(S),e.leave(r.element).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),r.cleanup()})}function u(e,a){function c(o){e.css(t.CSS.TRANSITION_DURATION,"0ms")}function m(o){var r=o.pointer.distanceY;r<5&&(r=Math.max(-n,r/2)),e.css(t.CSS.TRANSFORM,"translate3d(0,"+(n+r)+"px,0)")}function d(n){if(n.pointer.distanceY>0&&(n.pointer.distanceY>20||Math.abs(n.pointer.velocityY)>o)){var a=e.prop("offsetHeight")-n.pointer.distanceY,c=Math.min(a/n.pointer.velocityY*.75,500);e.css(t.CSS.TRANSITION_DURATION,c+"ms"),r.nextTick(i.cancel,!0)}else e.css(t.CSS.TRANSITION_DURATION,""),e.css(t.CSS.TRANSFORM,"")}var s=l.register(a,"drag",{horizontal:!1});return a.on("$md.dragstart",c).on("$md.drag",m).on("$md.dragend",d),{element:e,cleanup:function(){s(),a.off("$md.dragstart",c),a.off("$md.drag",m),a.off("$md.dragend",d)}}}var S;return{themable:!0,onShow:d,onRemove:s,disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}var o=.5,n=80;return t.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:t})}goog.provide("ngmaterial.components.bottomSheet"),goog.require("ngmaterial.components.backdrop"),goog.require("ngmaterial.core"),angular.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",MdBottomSheetDirective).provider("$mdBottomSheet",MdBottomSheetProvider),MdBottomSheetDirective.$inject=["$mdBottomSheet"],MdBottomSheetProvider.$inject=["$$interimElementProvider"],ngmaterial.components.bottomSheet=angular.module("material.components.bottomSheet");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.button');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.button');
goog.require('ngmaterial.core');
/**

@@ -66,4 +66,26 @@ * @ngdoc module

*
* Developers can also change the color palette of the button, by using the following classes
* - `md-primary`
* - `md-accent`
* - `md-warn`
*
* See for example
*
* <hljs lang="html">
* <md-button class="md-primary">Primary Button</md-button>
* </hljs>
*
* Button can be also raised, which means that they will use the current color palette to fill the button.
*
* <hljs lang="html">
* <md-button class="md-accent md-raised">Raised and Accent Button</md-button>
* </hljs>
*
* It is also possible to disable the focus effect on the button, by using the following markup.
*
* <hljs lang="html">
* <md-button class="md-no-focus">No Focus Style</md-button>
* </hljs>
*
* @param {boolean=} md-no-ink If present, disable ripple ink effects.
* @param {boolean=} md-no-focus-style If present, disable focus style on button
* @param {expression=} ng-disabled En/Disable based on the expression

@@ -134,3 +156,3 @@ * @param {string=} md-ripple-size Overrides the default ripple size logic. Options: `full`, `partial`, `auto`

// Use async expect to support possible bindings in the button label
$mdAria.expectWithText(element, 'aria-label');
$mdAria.expectWithoutText(element, 'aria-label');

@@ -153,3 +175,3 @@ // For anchor elements, we have to set tabindex manually when the

if (!angular.isDefined(attr.mdNoFocusStyle)) {
if (!element.hasClass('md-no-focus')) {
// restrict focus styles to the keyboard

@@ -172,2 +194,3 @@ scope.mouseActive = false;

}
}

@@ -178,2 +201,2 @@

ng.material.components.button = angular.module("material.components.button");
ngmaterial.components.button = angular.module("material.components.button");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdAnchorDirective(e){return{restrict:"E",link:function(t,n){e(n)}}}function MdButtonDirective(e,t,n,i){function o(e){return angular.isDefined(e.href)||angular.isDefined(e.ngHref)||angular.isDefined(e.ngLink)||angular.isDefined(e.uiSref)}function r(e,t){if(o(t))return'<a class="md-button" ng-transclude></a>';var n="undefined"==typeof t.type?"button":t.type;return'<button class="md-button" type="'+n+'" ng-transclude></button>'}function u(r,u,a){t(u),e.attach(r,u),n.expectWithText(u,"aria-label"),o(a)&&angular.isDefined(a.ngDisabled)&&r.$watch(a.ngDisabled,function(e){u.attr("tabindex",e?-1:0)}),u.on("click",function(e){a.disabled===!0&&(e.preventDefault(),e.stopImmediatePropagation())}),angular.isDefined(a.mdNoFocusStyle)||(r.mouseActive=!1,u.on("mousedown",function(){r.mouseActive=!0,i(function(){r.mouseActive=!1},100)}).on("focus",function(){r.mouseActive===!1&&u.addClass("md-focused")}).on("blur",function(e){u.removeClass("md-focused")}))}return{restrict:"EA",replace:!0,transclude:!0,template:r,link:u}}goog.provide("ng.material.components.button"),goog.require("ng.material.core"),angular.module("material.components.button",["material.core"]).directive("mdButton",MdButtonDirective).directive("a",MdAnchorDirective),MdAnchorDirective.$inject=["$mdTheming"],MdButtonDirective.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"],ng.material.components.button=angular.module("material.components.button");
function MdAnchorDirective(t){return{restrict:"E",link:function(e,n){t(n)}}}function MdButtonDirective(t,e,n,i){function o(t){return angular.isDefined(t.href)||angular.isDefined(t.ngHref)||angular.isDefined(t.ngLink)||angular.isDefined(t.uiSref)}function u(t,e){if(o(e))return'<a class="md-button" ng-transclude></a>';var n="undefined"==typeof e.type?"button":e.type;return'<button class="md-button" type="'+n+'" ng-transclude></button>'}function a(u,a,r){e(a),t.attach(u,a),n.expectWithoutText(a,"aria-label"),o(r)&&angular.isDefined(r.ngDisabled)&&u.$watch(r.ngDisabled,function(t){a.attr("tabindex",t?-1:0)}),a.on("click",function(t){r.disabled===!0&&(t.preventDefault(),t.stopImmediatePropagation())}),a.hasClass("md-no-focus")||(u.mouseActive=!1,a.on("mousedown",function(){u.mouseActive=!0,i(function(){u.mouseActive=!1},100)}).on("focus",function(){u.mouseActive===!1&&a.addClass("md-focused")}).on("blur",function(t){a.removeClass("md-focused")}))}return{restrict:"EA",replace:!0,transclude:!0,template:u,link:a}}goog.provide("ngmaterial.components.button"),goog.require("ngmaterial.core"),angular.module("material.components.button",["material.core"]).directive("mdButton",MdButtonDirective).directive("a",MdAnchorDirective),MdAnchorDirective.$inject=["$mdTheming"],MdButtonDirective.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"],ngmaterial.components.button=angular.module("material.components.button");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.card');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.card');
goog.require('ngmaterial.core');
/**

@@ -33,3 +33,4 @@ * @ngdoc module

*
* An image included as a direct descendant will fill the card's width, while the `<md-card-content>`
* An image included as a direct descendant will fill the card's width. If you want to avoid this,
* you can add the `md-image-no-fill` class to the parent element. The `<md-card-content>`
* container will wrap text content and provide padding. An `<md-card-footer>` element can be

@@ -143,2 +144,2 @@ * optionally included to put content flush against the bottom edge of the card.

ng.material.components.card = angular.module("material.components.card");
ngmaterial.components.card = angular.module("material.components.card");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdCardDirective(e){return{restrict:"E",link:function(r,a,i){a.addClass("_md"),e(a)}}}goog.provide("ng.material.components.card"),goog.require("ng.material.core"),angular.module("material.components.card",["material.core"]).directive("mdCard",mdCardDirective),mdCardDirective.$inject=["$mdTheming"],ng.material.components.card=angular.module("material.components.card");
function mdCardDirective(e){return{restrict:"E",link:function(r,a,i){a.addClass("_md"),e(a)}}}goog.provide("ngmaterial.components.card"),goog.require("ngmaterial.core"),angular.module("material.components.card",["material.core"]).directive("mdCard",mdCardDirective),mdCardDirective.$inject=["$mdTheming"],ngmaterial.components.card=angular.module("material.components.card");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.checkbox');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.checkbox');
goog.require('ngmaterial.core');
/**

@@ -43,4 +43,7 @@ * @ngdoc module

* If falsy expression is passed in it just looks like a normal unchecked checkbox.
* The indeterminate, checked, and unchecked states are mutually exclusive. A box cannot be in any two states at the same time.
* When a checkbox is indeterminate that overrides any checked/unchecked rendering logic.
* The indeterminate, checked, and unchecked states are mutually exclusive. A box cannot be in any two states at the same time.
* Adding the 'md-indeterminate' attribute overrides any checked/unchecked rendering logic.
* When using the 'md-indeterminate' attribute use 'ng-checked' to define rendering logic instead of using 'ng-model'.
* @param {expression=} ng-checked If this expression evaluates as truthy, the 'md-checked' css class is added to the checkbox and it
* will appear checked.
*

@@ -66,3 +69,2 @@ * @usage

inputDirective = inputDirective[0];
var CHECKED_CSS = 'md-checked';

@@ -75,6 +77,6 @@ return {

template:
'<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="_md-icon"></div>' +
'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="md-icon"></div>' +
'</div>' +
'<div ng-transclude class="_md-label"></div>',
'<div ng-transclude class="md-label"></div>',
compile: compile

@@ -88,28 +90,31 @@ };

function compile (tElement, tAttrs) {
var container = tElement.children();
var mdIndeterminateStateEnabled = tAttrs.hasOwnProperty('mdIndeterminate');
tAttrs.$set('tabindex', tAttrs.tabindex || '0');
tAttrs.$set('type', 'checkbox');
tAttrs.$set('role', tAttrs.type);
tAttrs.type = 'checkbox';
tAttrs.tabindex = tAttrs.tabindex || '0';
tElement.attr('role', tAttrs.type);
return {
pre: function(scope, element) {
// Attach a click handler during preLink, in order to immediately stop propagation
// (especially for ng-click) when the checkbox is disabled.
element.on('click', function(e) {
if (this.hasAttribute('disabled')) {
e.stopImmediatePropagation();
}
});
},
post: postLink
};
// Attach a click handler in compile in order to immediately stop propagation
// (especially for ng-click) when the checkbox is disabled.
tElement.on('click', function(event) {
if (this.hasAttribute('disabled')) {
event.stopImmediatePropagation();
}
});
// Redirect focus events to the root element, because IE11 is always focusing the container element instead
// of the md-checkbox element. This causes issues when using ngModelOptions: `updateOnBlur`
container.on('focus', function() {
tElement.focus();
});
return function postLink(scope, element, attr, ngModelCtrl) {
function postLink(scope, element, attr, ngModelCtrl) {
var isIndeterminate;
ngModelCtrl = ngModelCtrl || $mdUtil.fakeNgModel();
$mdTheming(element);
if (mdIndeterminateStateEnabled) {
// Redirect focus events to the root element, because IE11 is always focusing the container element instead
// of the md-checkbox element. This causes issues when using ngModelOptions: `updateOnBlur`
element.children().on('focus', function() {
element.focus();
});
if ($mdUtil.parseAttributeBoolean(attr.mdIndeterminate)) {
setIndeterminateState();

@@ -121,4 +126,4 @@ scope.$watch(attr.mdIndeterminate, setIndeterminateState);

scope.$watch(
scope.$eval.bind(scope, attr.ngChecked),
ngModelCtrl.$setViewValue.bind(ngModelCtrl)
scope.$eval.bind(scope, attr.ngChecked),
ngModelCtrl.$setViewValue.bind(ngModelCtrl)
);

@@ -176,7 +181,3 @@ }

ev.preventDefault();
if (!element.hasClass('md-focused')) {
element.addClass('md-focused');
}
element.addClass('md-focused');
listener(ev);

@@ -187,3 +188,5 @@ }

function listener(ev) {
if (element[0].hasAttribute('disabled')) {
// skipToggle boolean is used by the switch directive to prevent the click event
// when releasing the drag. There will be always a click if releasing the drag over the checkbox
if (element[0].hasAttribute('disabled') || scope.skipToggle) {
return;

@@ -196,3 +199,3 @@ }

ngModelCtrl.$setViewValue( viewValue, ev && ev.type);
ngModelCtrl.$setViewValue(viewValue, ev && ev.type);
ngModelCtrl.$render();

@@ -203,7 +206,4 @@ });

function render() {
if(ngModelCtrl.$viewValue && !isIndeterminate) {
element.addClass(CHECKED_CSS);
} else {
element.removeClass(CHECKED_CSS);
}
// Cast the $viewValue to a boolean since it could be undefined
element.toggleClass('md-checked', !!ngModelCtrl.$viewValue && !isIndeterminate);
}

@@ -218,3 +218,3 @@

}
};
}
}

@@ -224,2 +224,2 @@ }

ng.material.components.checkbox = angular.module("material.components.checkbox");
ngmaterial.components.checkbox = angular.module("material.components.checkbox");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdCheckboxDirective(e,n,t,i,c,o){function a(a,r){var s=a.children(),l=r.hasOwnProperty("mdIndeterminate");return r.type="checkbox",r.tabindex=r.tabindex||"0",a.attr("role",r.type),a.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()}),s.on("focus",function(){a.focus()}),function(a,r,s,u){function m(e,n,t){s[e]&&a.$watch(s[e],function(e){t[e]&&r.attr(n,t[e])})}function h(e){var n=e.which||e.keyCode;n!==t.KEY_CODE.SPACE&&n!==t.KEY_CODE.ENTER||(e.preventDefault(),r.hasClass("md-focused")||r.addClass("md-focused"),v(e))}function v(e){r[0].hasAttribute("disabled")||a.$apply(function(){var n=s.ngChecked?s.checked:!u.$viewValue;u.$setViewValue(n,e&&e.type),u.$render()})}function f(){u.$viewValue&&!b?r.addClass(d):r.removeClass(d)}function p(e){b=e!==!1,b&&r.attr("aria-checked","mixed"),r.toggleClass("md-indeterminate",b)}var b;u=u||c.fakeNgModel(),i(r),l&&(p(),a.$watch(s.mdIndeterminate,p)),s.ngChecked&&a.$watch(a.$eval.bind(a,s.ngChecked),u.$setViewValue.bind(u)),m("ngDisabled","tabindex",{"true":"-1","false":s.tabindex}),n.expectWithText(r,"aria-label"),e.link.pre(a,{on:angular.noop,0:{}},s,[u]),a.mouseActive=!1,r.on("click",v).on("keypress",h).on("mousedown",function(){a.mouseActive=!0,o(function(){a.mouseActive=!1},100)}).on("focus",function(){a.mouseActive===!1&&r.addClass("md-focused")}).on("blur",function(){r.removeClass("md-focused")}),u.$render=f}}e=e[0];var d="md-checked";return{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox><div class="_md-icon"></div></div><div ng-transclude class="_md-label"></div>',compile:a}}goog.provide("ng.material.components.checkbox"),goog.require("ng.material.core"),angular.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",MdCheckboxDirective),MdCheckboxDirective.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"],ng.material.components.checkbox=angular.module("material.components.checkbox");
function MdCheckboxDirective(e,t,n,i,o,c){function a(a,d){function r(a,d,r,l){function s(e,t,n){r[e]&&a.$watch(r[e],function(e){n[e]&&d.attr(t,n[e])})}function u(e){var t=e.which||e.keyCode;t!==n.KEY_CODE.SPACE&&t!==n.KEY_CODE.ENTER||(e.preventDefault(),d.addClass("md-focused"),m(e))}function m(e){d[0].hasAttribute("disabled")||a.skipToggle||a.$apply(function(){var t=r.ngChecked?r.checked:!l.$viewValue;l.$setViewValue(t,e&&e.type),l.$render()})}function p(){d.toggleClass("md-checked",!!l.$viewValue&&!f)}function h(e){f=e!==!1,f&&d.attr("aria-checked","mixed"),d.toggleClass("md-indeterminate",f)}var f;l=l||o.fakeNgModel(),i(d),d.children().on("focus",function(){d.focus()}),o.parseAttributeBoolean(r.mdIndeterminate)&&(h(),a.$watch(r.mdIndeterminate,h)),r.ngChecked&&a.$watch(a.$eval.bind(a,r.ngChecked),l.$setViewValue.bind(l)),s("ngDisabled","tabindex",{"true":"-1","false":r.tabindex}),t.expectWithText(d,"aria-label"),e.link.pre(a,{on:angular.noop,0:{}},r,[l]),a.mouseActive=!1,d.on("click",m).on("keypress",u).on("mousedown",function(){a.mouseActive=!0,c(function(){a.mouseActive=!1},100)}).on("focus",function(){a.mouseActive===!1&&d.addClass("md-focused")}).on("blur",function(){d.removeClass("md-focused")}),l.$render=p}return d.$set("tabindex",d.tabindex||"0"),d.$set("type","checkbox"),d.$set("role",d.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:r}}return e=e[0],{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:a}}goog.provide("ngmaterial.components.checkbox"),goog.require("ngmaterial.core"),angular.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",MdCheckboxDirective),MdCheckboxDirective.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"],ngmaterial.components.checkbox=angular.module("material.components.checkbox");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.chips');
goog.require('ng.material.components.autocomplete');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.chips');
goog.require('ngmaterial.components.autocomplete');
goog.require('ngmaterial.core');
/**

@@ -101,3 +101,3 @@ * @ngdoc module

MdChipCtrl.prototype.getChipContent = function() {
var chipContents = this.$element[0].getElementsByClassName('_md-chip-content');
var chipContents = this.$element[0].getElementsByClassName('md-chip-content');
return angular.element(chipContents[0]);

@@ -242,3 +242,3 @@ };

var DELETE_HINT_TEMPLATE = '\
<span ng-if="!$mdChipsCtrl.readonly" class="_md-visually-hidden">\
<span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden">\
{{$mdChipsCtrl.deleteHint}}\

@@ -278,3 +278,3 @@ </span>';

.element(element[0]
.querySelector('._md-chip-content'))
.querySelector('.md-chip-content'))
.on('blur', function () {

@@ -297,12 +297,19 @@ chipsController.resetSelectedChip();

* @name mdChipRemove
* @restrict A
* @module material.components.chips
*
* @description
* `<md-chip-remove>`
* Designates an element to be used as the delete button for a chip. This
* element is passed as a child of the `md-chips` element.
* Designates an element to be used as the delete button for a chip. <br/>
* This element is passed as a child of the `md-chips` element.
*
* The designated button will be just appended to the chip and removes the given chip on click.<br/>
* By default the button is not being styled by the `md-chips` component.
*
* @usage
* <hljs lang="html">
* <md-chips><button md-chip-remove>DEL</button></md-chips>
* <md-chips>
* <button md-chip-remove="">
* <md-icon md-svg-icon="md-close"></md-icon>
* </button>
* </md-chips>
* </hljs>

@@ -315,3 +322,2 @@ */

*
* @param $compile
* @param $timeout

@@ -448,12 +454,2 @@ * @returns {{restrict: string, require: string[], link: Function, scope: boolean}}

/**
* Whether to use the onAppend expression to transform the chip buffer
* before appending it to the list.
* @type {boolean}
*
*
* @deprecated Will remove in 1.0.
*/
this.useOnAppend = false;
/**
* Whether to use the transformChip expression to transform the chip buffer

@@ -482,3 +478,2 @@ * before appending it to the list.

*/
this.useOnSelect = false;
}

@@ -502,6 +497,15 @@ MdChipsCtrl.$inject = ["$scope", "$mdConstant", "$log", "$element", "$timeout", "$mdUtil"];

if (event.keyCode === this.$mdConstant.KEY_CODE.BACKSPACE) {
if (chipBuffer) return;
// Only select and focus the previous chip, if the current caret position of the
// input element is at the beginning.
if (this.getCursorPosition(event.target) !== 0) {
return;
}
event.preventDefault();
event.stopPropagation();
if (this.items.length) this.selectAndFocusChipSafe(this.items.length - 1);
if (this.items.length) {
this.selectAndFocusChipSafe(this.items.length - 1);
}
return;

@@ -528,3 +532,25 @@ }

/**
* Returns the cursor position of the specified input element.
* @param element HTMLInputElement
* @returns {Number} Cursor Position of the input.
*/
MdChipsCtrl.prototype.getCursorPosition = function(element) {
/*
* Figure out whether the current input for the chips buffer is valid for using
* the selectionStart / end property to retrieve the cursor position.
* Some browsers do not allow the use of those attributes, on different input types.
*/
try {
if (element.selectionStart === element.selectionEnd) {
return element.selectionStart;
}
} catch (e) {
if (!element.value) {
return 0;
}
}
};
/**

@@ -547,3 +573,3 @@ * Updates the content of the chip at given index

*/
MdChipsCtrl.prototype.isEditingChip = function(){
MdChipsCtrl.prototype.isEditingChip = function() {
return !!this.$element[0].getElementsByClassName('_md-chip-editing').length;

@@ -553,2 +579,12 @@ };

MdChipsCtrl.prototype.isRemovable = function() {
// Return false if we have static chips
if (!this.ngModelCtrl) {
return false;
}
return this.readonly ? this.removable :
angular.isDefined(this.removable) ? this.removable : true;
};
/**

@@ -568,2 +604,4 @@ * Handles the keydown event on the chip elements: backspace removes the selected chip, arrow

event.preventDefault();
// Cancel the delete action only after the event cancel. Otherwise the page will go back.
if (!this.isRemovable()) return;
this.removeAndSelectAdjacentChip(this.selectedChip);

@@ -677,21 +715,2 @@ break;

/**
* Sets whether to use the md-on-append expression. This expression is
* bound to scope and controller in {@code MdChipsDirective} as
* {@code onAppend}. Due to the nature of directive scope bindings, the
* controller cannot know on its own/from the scope whether an expression was
* actually provided.
*
* @deprecated
*
* TODO: Remove deprecated md-on-append functionality in 1.0
*/
MdChipsCtrl.prototype.useOnAppendExpression = function() {
this.$log.warn("md-on-append is deprecated; please use md-transform-chip or md-on-add instead");
if (!this.useTransformChip || !this.transformChip) {
this.useTransformChip = true;
this.transformChip = this.onAppend;
}
};
/**
* Sets whether to use the md-transform-chip expression. This expression is

@@ -852,3 +871,3 @@ * bound to scope and controller in {@code MdChipsDirective} as

MdChipsCtrl.prototype.focusChip = function(index) {
this.$element[0].querySelector('md-chip[index="' + index + '"] ._md-chip-content').focus();
this.$element[0].querySelector('md-chip[index="' + index + '"] .md-chip-content').focus();
};

@@ -998,7 +1017,28 @@

*
* <span style="font-size:.8em;text-align:center">
* Warning: This component is a WORK IN PROGRESS. If you use it now,
* it will probably break on you in the future.
* </span>
* <span style="font-size:.8em;text-align:center">
* Warning: This component is a WORK IN PROGRESS. If you use it now,
* it will probably break on you in the future.
* </span>
*
* Sometimes developers want to limit the amount of possible chips.<br/>
* You can specify the maximum amount of chips by using the following markup.
*
* <hljs lang="html">
* <md-chips
* ng-model="myItems"
* placeholder="Add an item"
* md-max-chips="5">
* </md-chips>
* </hljs>
*
* In some cases, you have an autocomplete inside of the `md-chips`.<br/>
* When the maximum amount of chips has been reached, you can also disable the autocomplete selection.<br/>
* Here is an example markup.
*
* <hljs lang="html">
* <md-chips ng-model="myItems" md-max-chips="5">
* <md-autocomplete ng-hide="myItems.length > 5" ...></md-autocomplete>
* </md-chips>
* </hljs>
*
* @param {string=|object=} ng-model A model to bind the list of items to

@@ -1008,5 +1048,8 @@ * @param {string=} placeholder Placeholder text that will be forwarded to the input.

* displayed when there is at least one item in the list
* @param {boolean=} md-removable Enables or disables the deletion of chips through the
* removal icon or the Delete/Backspace key. Defaults to true.
* @param {boolean=} readonly Disables list manipulation (deleting or adding list items), hiding
* the input and delete buttons. If no `ng-model` is provided, the chips will automatically be
* marked as readonly.
* marked as readonly.<br/><br/>
* When `md-removable` is not defined, the `md-remove` behavior will be overwritten and disabled.
* @param {string=} md-enable-chip-edit Set this to "true" to enable editing of chip contents. The user can

@@ -1068,3 +1111,5 @@ * go into edit mode with pressing "space", "enter", or double clicking on the chip. Chip edit is only

ng-keydown="$mdChipsCtrl.chipKeydown($event)"\
ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"\
ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \
\'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly,\
\'md-removable\': $mdChipsCtrl.isRemovable() }"\
class="md-chips">\

@@ -1074,3 +1119,3 @@ <md-chip ng-repeat="$chip in $mdChipsCtrl.items"\

ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}">\
<div class="_md-chip-content"\
<div class="md-chip-content"\
tabindex="-1"\

@@ -1081,9 +1126,8 @@ aria-hidden="true"\

md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div>\
<div ng-if="!$mdChipsCtrl.readonly"\
class="_md-chip-remove-container"\
<div ng-if="$mdChipsCtrl.isRemovable()"\
class="md-chip-remove-container"\
md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div>\
</md-chip>\
<div class="_md-chip-input-container">\
<div ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"\
md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div>\
<div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl">\
<div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div>\
</div>\

@@ -1101,3 +1145,2 @@ </md-chips-wrap>';

ng-blur="$mdChipsCtrl.onInputBlur()"\
ng-trim="false"\
ng-keydown="$mdChipsCtrl.inputKeydown($event)">';

@@ -1110,4 +1153,4 @@

<button\
class="_md-chip-remove"\
ng-if="!$mdChipsCtrl.readonly"\
class="md-chip-remove"\
ng-if="$mdChipsCtrl.isRemovable()"\
ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)"\

@@ -1117,4 +1160,4 @@ type="button"\

tabindex="-1">\
<md-icon md-svg-icon="md-close"></md-icon>\
<span class="_md-visually-hidden">\
<md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon>\
<span class="md-visually-hidden">\
{{$mdChipsCtrl.deleteButtonLabel}}\

@@ -1127,3 +1170,3 @@ </span>\

*/
function MdChips ($mdTheming, $mdUtil, $compile, $log, $timeout) {
function MdChips ($mdTheming, $mdUtil, $compile, $log, $timeout, $$mdSvgRegistry) {
// Run our templates through $mdUtil.processTemplate() to allow custom start/end symbols

@@ -1149,2 +1192,3 @@ var templates = getTemplates();

readonly: '=readonly',
removable: '=mdRemovable',
placeholder: '@',

@@ -1201,5 +1245,13 @@ mdEnableChipEdit: '@',

var chipRemoveSelector = $mdUtil
.prefixer()
.buildList('md-chip-remove')
.map(function(attr) {
return 'md-chips>*[' + attr + ']';
})
.join(',');
// Set the chip remove, chip contents and chip input templates. The link function will put
// them on the scope for transclusion later.
var chipRemoveTemplate = getTemplateByQuery('md-chips>*[md-chip-remove]') || templates.remove,
var chipRemoveTemplate = getTemplateByQuery(chipRemoveSelector) || templates.remove,
chipContentsTemplate = chipTemplate || templates.default,

@@ -1239,2 +1291,4 @@ chipInputTemplate = getTemplateByQuery('md-chips>md-autocomplete')

mdChipsCtrl.mdCloseIcon = $$mdSvgRegistry.mdClose;
element

@@ -1315,3 +1369,3 @@ .attr({ 'aria-hidden': true, tabindex: -1 })

}
MdChips.$inject = ["$mdTheming", "$mdUtil", "$compile", "$log", "$timeout"];
MdChips.$inject = ["$mdTheming", "$mdUtil", "$compile", "$log", "$timeout", "$$mdSvgRegistry"];

@@ -1489,2 +1543,2 @@ angular

ng.material.components.chips = angular.module("material.components.chips");
ngmaterial.components.chips = angular.module("material.components.chips");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdChipCtrl(t,e,i,n,s){this.$scope=t,this.$element=e,this.$mdConstant=i,this.$timeout=n,this.$mdUtil=s,this.isEditting=!1,this.parentController=void 0,this.enableChipEdit=!1}function MdChip(t,e){function i(i,s){return i.append(e.processTemplate(n)),function(e,i,n,s){var o=s.shift(),r=s.shift();t(i),o&&(r.init(o),angular.element(i[0].querySelector("._md-chip-content")).on("blur",function(){o.resetSelectedChip(),o.$scope.$applyAsync()}))}}var n=e.processTemplate(DELETE_HINT_TEMPLATE);return{restrict:"E",require:["^?mdChips","mdChip"],compile:i,controller:"MdChipCtrl"}}function MdChipRemove(t){function e(e,i,n,s){i.on("click",function(t){e.$apply(function(){s.removeChip(e.$$replacedScope.$index)})}),t(function(){i.attr({tabindex:-1,"aria-hidden":!0}),i.find("button").attr("tabindex","-1")})}return{restrict:"A",require:"^mdChips",scope:!1,link:e}}function MdChipTransclude(t){function e(e,i,n){var s=e.$parent.$mdChipsCtrl,o=s.parent.$new(!1,s.parent);o.$$replacedScope=e,o.$chip=e.$chip,o.$index=e.$index,o.$mdChipsCtrl=s;var r=s.$scope.$eval(n.mdChipTransclude);i.html(r),t(i.contents())(o)}return{restrict:"EA",terminal:!0,link:e,scope:!1}}function MdChipsCtrl(t,e,i,n,s,o){this.$timeout=s,this.$mdConstant=e,this.$scope=t,this.parent=t.$parent,this.$log=i,this.$element=n,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.hasAutocomplete=!1,this.enableChipEdit=o.parseAttributeBoolean(this.mdEnableChipEdit),this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useOnAppend=!1,this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1,this.useOnSelect=!1}function MdChips(t,e,i,n,s){function o(o,r){function p(t){if(r.ngModel){var e=d[0].querySelector(t);return e&&e.outerHTML}}var d=r.$mdUserTemplate;r.$mdUserTemplate=null;var l=p("md-chips>md-chip-template"),c=p("md-chips>*[md-chip-remove]")||h.remove,a=l||h["default"],C=p("md-chips>md-autocomplete")||p("md-chips>input")||h.input,m=d.find("md-chip");return d[0].querySelector("md-chip-template>*[md-chip-remove]")&&n.warn("invalid placement of md-chip-remove within md-chip-template."),function(n,o,p,d){e.initOptionalProperties(n,r),t(o);var u=d[0];if(l&&(u.enableChipEdit=!1),u.chipContentsTemplate=a,u.chipRemoveTemplate=c,u.chipInputTemplate=C,o.attr({"aria-hidden":!0,tabindex:-1}).on("focus",function(){u.onFocus()}),r.ngModel&&(u.configureNgModel(o.controller("ngModel")),p.mdTransformChip&&u.useTransformChipExpression(),p.mdOnAppend&&u.useOnAppendExpression(),p.mdOnAdd&&u.useOnAddExpression(),p.mdOnRemove&&u.useOnRemoveExpression(),p.mdOnSelect&&u.useOnSelectExpression(),C!=h.input&&n.$watch("$mdChipsCtrl.readonly",function(t){t||e.nextTick(function(){0===C.indexOf("<md-autocomplete")&&u.configureAutocomplete(o.find("md-autocomplete").controller("mdAutocomplete")),u.configureUserInput(o.find("input"))})}),e.nextTick(function(){var t=o.find("input");t&&t.toggleClass("md-input",!0)})),m.length>0){var f=i(m.clone())(n.$parent);s(function(){o.find("md-chips-wrap").prepend(f)})}}}function r(){return{chips:e.processTemplate(MD_CHIPS_TEMPLATE),input:e.processTemplate(CHIP_INPUT_TEMPLATE),"default":e.processTemplate(CHIP_DEFAULT_TEMPLATE),remove:e.processTemplate(CHIP_REMOVE_TEMPLATE)}}var h=r();return{template:function(t,e){return e.$mdUserTemplate=t.clone(),h.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:o,scope:{readonly:"=readonly",placeholder:"@",mdEnableChipEdit:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch"}}}function MdContactChipsCtrl(){this.selectedItem=null,this.searchText=""}function MdContactChips(t,e){function i(i,n){return function(i,s,o,r){e.initOptionalProperties(i,n),t(s),s.attr("tabindex","-1")}}return{template:function(t,e){return MD_CONTACT_CHIPS_TEMPLATE},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:i,scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",highlightFlags:"@?mdHighlightFlags"}}}goog.provide("ng.material.components.chips"),goog.require("ng.material.components.autocomplete"),goog.require("ng.material.core"),angular.module("material.components.chips",["material.core","material.components.autocomplete"]),angular.module("material.components.chips").controller("MdChipCtrl",MdChipCtrl),MdChipCtrl.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],MdChipCtrl.prototype.init=function(t){this.parentController=t,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},MdChipCtrl.prototype.getChipContent=function(){var t=this.$element[0].getElementsByClassName("_md-chip-content");return angular.element(t[0])},MdChipCtrl.prototype.getContentElement=function(){return angular.element(this.getChipContent().children()[0])},MdChipCtrl.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},MdChipCtrl.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var t=this.getChipIndex(),e=this.getContentElement().text();e?(this.parentController.updateChipContents(t,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===t&&this.parentController.focusChip(t)}.bind(this))):this.parentController.removeChipAndFocusInput(t)}},MdChipCtrl.prototype.selectNodeContents=function(t){var e,i;document.body.createTextRange?(e=document.body.createTextRange(),e.moveToElementText(t),e.select()):window.getSelection&&(i=window.getSelection(),e=document.createRange(),e.selectNodeContents(t),i.removeAllRanges(),i.addRange(e))},MdChipCtrl.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},MdChipCtrl.prototype.chipKeyDown=function(t){this.isEditting||t.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&t.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&t.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(t.preventDefault(),this.goOutOfEditMode()):(t.preventDefault(),this.goInEditMode())},MdChipCtrl.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()},angular.module("material.components.chips").directive("mdChip",MdChip);var DELETE_HINT_TEMPLATE=' <span ng-if="!$mdChipsCtrl.readonly" class="_md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>';MdChip.$inject=["$mdTheming","$mdUtil"],angular.module("material.components.chips").directive("mdChipRemove",MdChipRemove),MdChipRemove.$inject=["$timeout"],angular.module("material.components.chips").directive("mdChipTransclude",MdChipTransclude),MdChipTransclude.$inject=["$compile"],angular.module("material.components.chips").controller("MdChipsCtrl",MdChipsCtrl),MdChipsCtrl.$inject=["$scope","$mdConstant","$log","$element","$timeout","$mdUtil"],MdChipsCtrl.prototype.inputKeydown=function(t){var e=this.getChipBuffer();if(!(this.hasAutocomplete&&t.isDefaultPrevented&&t.isDefaultPrevented())){if(t.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(e)return;return t.preventDefault(),t.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),-1!==this.separatorKeys.indexOf(t.keyCode)){if(this.hasAutocomplete&&this.requireMatch||!e)return;if(t.preventDefault(),this.hasMaxChipsReached())return;this.appendChip(e.trim()),this.resetChipBuffer()}}},MdChipsCtrl.prototype.updateChipContents=function(t,e){t>=0&&t<this.items.length&&(this.items[t]=e,this.ngModelCtrl.$setDirty())},MdChipsCtrl.prototype.isEditingChip=function(){return!!this.$element[0].getElementsByClassName("_md-chip-editing").length},MdChipsCtrl.prototype.chipKeydown=function(t){if(!this.getChipBuffer()&&!this.isEditingChip())switch(t.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;t.preventDefault(),this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:t.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:t.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;t.preventDefault(),this.onFocus()}},MdChipsCtrl.prototype.getPlaceholder=function(){var t=this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder);return t?this.secondaryPlaceholder:this.placeholder},MdChipsCtrl.prototype.removeAndSelectAdjacentChip=function(t){var e=this.getAdjacentChipIndex(t);this.removeChip(t),this.$timeout(angular.bind(this,function(){this.selectAndFocusChipSafe(e)}))},MdChipsCtrl.prototype.resetSelectedChip=function(){this.selectedChip=-1},MdChipsCtrl.prototype.getAdjacentChipIndex=function(t){var e=this.items.length-1;return 0==e?-1:t==e?t-1:t},MdChipsCtrl.prototype.appendChip=function(t){if(this.useTransformChip&&this.transformChip){var e=this.transformChip({$chip:t});angular.isDefined(e)&&(t=e)}if(angular.isObject(t)){var i=this.items.some(function(e){return angular.equals(t,e)});if(i)return}if(!(null==t||this.items.indexOf(t)+1)){var n=this.items.push(t);this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:n})}},MdChipsCtrl.prototype.useOnAppendExpression=function(){this.$log.warn("md-on-append is deprecated; please use md-transform-chip or md-on-add instead"),this.useTransformChip&&this.transformChip||(this.useTransformChip=!0,this.transformChip=this.onAppend)},MdChipsCtrl.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},MdChipsCtrl.prototype.useOnAddExpression=function(){this.useOnAdd=!0},MdChipsCtrl.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},MdChipsCtrl.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},MdChipsCtrl.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},MdChipsCtrl.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},MdChipsCtrl.prototype.hasMaxChipsReached=function(){return angular.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),this.maxChips>0&&this.items.length>=this.maxChips},MdChipsCtrl.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached())},MdChipsCtrl.prototype.removeChip=function(t){var e=this.items.splice(t,1);this.ngModelCtrl.$setDirty(),this.validateModel(),e&&e.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:e[0],$index:t})},MdChipsCtrl.prototype.removeChipAndFocusInput=function(t){this.removeChip(t),this.onFocus()},MdChipsCtrl.prototype.selectAndFocusChipSafe=function(t){return this.items.length?t===this.items.length?this.onFocus():(t=Math.max(t,0),t=Math.min(t,this.items.length-1),this.selectChip(t),void this.focusChip(t)):(this.selectChip(-1),void this.onFocus())},MdChipsCtrl.prototype.selectChip=function(t){t>=-1&&t<=this.items.length?(this.selectedChip=t,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[this.selectedChip]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},MdChipsCtrl.prototype.selectAndFocusChip=function(t){this.selectChip(t),-1!=t&&this.focusChip(t)},MdChipsCtrl.prototype.focusChip=function(t){this.$element[0].querySelector('md-chip[index="'+t+'"] ._md-chip-content').focus()},MdChipsCtrl.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){e.items=e.ngModelCtrl.$viewValue}},MdChipsCtrl.prototype.onFocus=function(){var t=this.$element[0].querySelector("input");t&&t.focus(),this.resetSelectedChip()},MdChipsCtrl.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},MdChipsCtrl.prototype.onInputBlur=function(){this.inputHasFocus=!1},MdChipsCtrl.prototype.configureUserInput=function(t){this.userInputElement=t;var e=t.controller("ngModel");e!=this.ngModelCtrl&&(this.userInputNgModelCtrl=e);var i=this.$scope,n=this,s=function(t,e){i.$evalAsync(angular.bind(n,e,t))};t.attr({tabindex:0}).on("keydown",function(t){s(t,n.inputKeydown)}).on("focus",function(t){s(t,n.onInputFocus)}).on("blur",function(t){s(t,n.onInputBlur)})},MdChipsCtrl.prototype.configureAutocomplete=function(t){t&&(this.hasAutocomplete=!0,t.registerSelectedItemWatcher(angular.bind(this,function(t){if(t){if(this.hasMaxChipsReached())return;this.appendChip(t),this.resetChipBuffer()}})),this.$element.find("input").on("focus",angular.bind(this,this.onInputFocus)).on("blur",angular.bind(this,this.onInputBlur)))},MdChipsCtrl.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0},angular.module("material.components.chips").directive("mdChips",MdChips);var MD_CHIPS_TEMPLATE=' <md-chips-wrap ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="_md-chip-content" tabindex="-1" aria-hidden="true" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="!$mdChipsCtrl.readonly" class="_md-chip-remove-container" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="_md-chip-input-container"> <div ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl" md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',CHIP_INPUT_TEMPLATE=' <input class="md-input" tabindex="0" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" aria-label="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-trim="false" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',CHIP_DEFAULT_TEMPLATE=" <span>{{$chip}}</span>",CHIP_REMOVE_TEMPLATE=' <button class="_md-chip-remove" ng-if="!$mdChipsCtrl.readonly" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" aria-hidden="true" tabindex="-1"> <md-icon md-svg-icon="md-close"></md-icon> <span class="_md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>';MdChips.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout"],angular.module("material.components.chips").controller("MdContactChipsCtrl",MdContactChipsCtrl),MdContactChipsCtrl.prototype.queryContact=function(t){var e=this.contactQuery({$query:t});return this.filterSelected?e.filter(angular.bind(this,this.filterSelectedContacts)):e},MdContactChipsCtrl.prototype.itemName=function(t){return t[this.contactName]},MdContactChipsCtrl.prototype.filterSelectedContacts=function(t){return-1==this.contacts.indexOf(t)},angular.module("material.components.chips").directive("mdContactChips",MdContactChips);var MD_CONTACT_CHIPS_TEMPLATE=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';MdContactChips.$inject=["$mdTheming","$mdUtil"],ng.material.components.chips=angular.module("material.components.chips");
function MdChipCtrl(t,e,i,n,s){this.$scope=t,this.$element=e,this.$mdConstant=i,this.$timeout=n,this.$mdUtil=s,this.isEditting=!1,this.parentController=void 0,this.enableChipEdit=!1}function MdChip(t,e){function i(i,s){return i.append(e.processTemplate(n)),function(e,i,n,s){var o=s.shift(),r=s.shift();t(i),o&&(r.init(o),angular.element(i[0].querySelector(".md-chip-content")).on("blur",function(){o.resetSelectedChip(),o.$scope.$applyAsync()}))}}var n=e.processTemplate(DELETE_HINT_TEMPLATE);return{restrict:"E",require:["^?mdChips","mdChip"],compile:i,controller:"MdChipCtrl"}}function MdChipRemove(t){function e(e,i,n,s){i.on("click",function(t){e.$apply(function(){s.removeChip(e.$$replacedScope.$index)})}),t(function(){i.attr({tabindex:-1,"aria-hidden":!0}),i.find("button").attr("tabindex","-1")})}return{restrict:"A",require:"^mdChips",scope:!1,link:e}}function MdChipTransclude(t){function e(e,i,n){var s=e.$parent.$mdChipsCtrl,o=s.parent.$new(!1,s.parent);o.$$replacedScope=e,o.$chip=e.$chip,o.$index=e.$index,o.$mdChipsCtrl=s;var r=s.$scope.$eval(n.mdChipTransclude);i.html(r),t(i.contents())(o)}return{restrict:"EA",terminal:!0,link:e,scope:!1}}function MdChipsCtrl(t,e,i,n,s,o){this.$timeout=s,this.$mdConstant=e,this.$scope=t,this.parent=t.$parent,this.$log=i,this.$element=n,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.hasAutocomplete=!1,this.enableChipEdit=o.parseAttributeBoolean(this.mdEnableChipEdit),this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1}function MdChips(t,e,i,n,s,o){function r(r,h){function l(t){if(h.ngModel){var e=d[0].querySelector(t);return e&&e.outerHTML}}var d=h.$mdUserTemplate;h.$mdUserTemplate=null;var c=l("md-chips>md-chip-template"),a=e.prefixer().buildList("md-chip-remove").map(function(t){return"md-chips>*["+t+"]"}).join(","),C=l(a)||p.remove,m=c||p["default"],u=l("md-chips>md-autocomplete")||l("md-chips>input")||p.input,f=d.find("md-chip");return d[0].querySelector("md-chip-template>*[md-chip-remove]")&&n.warn("invalid placement of md-chip-remove within md-chip-template."),function(n,r,l,d){e.initOptionalProperties(n,h),t(r);var a=d[0];if(c&&(a.enableChipEdit=!1),a.chipContentsTemplate=m,a.chipRemoveTemplate=C,a.chipInputTemplate=u,a.mdCloseIcon=o.mdClose,r.attr({"aria-hidden":!0,tabindex:-1}).on("focus",function(){a.onFocus()}),h.ngModel&&(a.configureNgModel(r.controller("ngModel")),l.mdTransformChip&&a.useTransformChipExpression(),l.mdOnAppend&&a.useOnAppendExpression(),l.mdOnAdd&&a.useOnAddExpression(),l.mdOnRemove&&a.useOnRemoveExpression(),l.mdOnSelect&&a.useOnSelectExpression(),u!=p.input&&n.$watch("$mdChipsCtrl.readonly",function(t){t||e.nextTick(function(){0===u.indexOf("<md-autocomplete")&&a.configureAutocomplete(r.find("md-autocomplete").controller("mdAutocomplete")),a.configureUserInput(r.find("input"))})}),e.nextTick(function(){var t=r.find("input");t&&t.toggleClass("md-input",!0)})),f.length>0){var g=i(f.clone())(n.$parent);s(function(){r.find("md-chips-wrap").prepend(g)})}}}function h(){return{chips:e.processTemplate(MD_CHIPS_TEMPLATE),input:e.processTemplate(CHIP_INPUT_TEMPLATE),"default":e.processTemplate(CHIP_DEFAULT_TEMPLATE),remove:e.processTemplate(CHIP_REMOVE_TEMPLATE)}}var p=h();return{template:function(t,e){return e.$mdUserTemplate=t.clone(),p.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:r,scope:{readonly:"=readonly",removable:"=mdRemovable",placeholder:"@",mdEnableChipEdit:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch"}}}function MdContactChipsCtrl(){this.selectedItem=null,this.searchText=""}function MdContactChips(t,e){function i(i,n){return function(i,s,o,r){e.initOptionalProperties(i,n),t(s),s.attr("tabindex","-1")}}return{template:function(t,e){return MD_CONTACT_CHIPS_TEMPLATE},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:i,scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",highlightFlags:"@?mdHighlightFlags"}}}goog.provide("ngmaterial.components.chips"),goog.require("ngmaterial.components.autocomplete"),goog.require("ngmaterial.core"),angular.module("material.components.chips",["material.core","material.components.autocomplete"]),angular.module("material.components.chips").controller("MdChipCtrl",MdChipCtrl),MdChipCtrl.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],MdChipCtrl.prototype.init=function(t){this.parentController=t,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},MdChipCtrl.prototype.getChipContent=function(){var t=this.$element[0].getElementsByClassName("md-chip-content");return angular.element(t[0])},MdChipCtrl.prototype.getContentElement=function(){return angular.element(this.getChipContent().children()[0])},MdChipCtrl.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},MdChipCtrl.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var t=this.getChipIndex(),e=this.getContentElement().text();e?(this.parentController.updateChipContents(t,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===t&&this.parentController.focusChip(t)}.bind(this))):this.parentController.removeChipAndFocusInput(t)}},MdChipCtrl.prototype.selectNodeContents=function(t){var e,i;document.body.createTextRange?(e=document.body.createTextRange(),e.moveToElementText(t),e.select()):window.getSelection&&(i=window.getSelection(),e=document.createRange(),e.selectNodeContents(t),i.removeAllRanges(),i.addRange(e))},MdChipCtrl.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},MdChipCtrl.prototype.chipKeyDown=function(t){this.isEditting||t.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&t.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&t.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(t.preventDefault(),this.goOutOfEditMode()):(t.preventDefault(),this.goInEditMode())},MdChipCtrl.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()},angular.module("material.components.chips").directive("mdChip",MdChip);var DELETE_HINT_TEMPLATE=' <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>';MdChip.$inject=["$mdTheming","$mdUtil"],angular.module("material.components.chips").directive("mdChipRemove",MdChipRemove),MdChipRemove.$inject=["$timeout"],angular.module("material.components.chips").directive("mdChipTransclude",MdChipTransclude),MdChipTransclude.$inject=["$compile"],angular.module("material.components.chips").controller("MdChipsCtrl",MdChipsCtrl),MdChipsCtrl.$inject=["$scope","$mdConstant","$log","$element","$timeout","$mdUtil"],MdChipsCtrl.prototype.inputKeydown=function(t){var e=this.getChipBuffer();if(!(this.hasAutocomplete&&t.isDefaultPrevented&&t.isDefaultPrevented())){if(t.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(0!==this.getCursorPosition(t.target))return;return t.preventDefault(),t.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),this.separatorKeys.indexOf(t.keyCode)!==-1){if(this.hasAutocomplete&&this.requireMatch||!e)return;if(t.preventDefault(),this.hasMaxChipsReached())return;this.appendChip(e.trim()),this.resetChipBuffer()}}},MdChipsCtrl.prototype.getCursorPosition=function(t){try{if(t.selectionStart===t.selectionEnd)return t.selectionStart}catch(e){if(!t.value)return 0}},MdChipsCtrl.prototype.updateChipContents=function(t,e){t>=0&&t<this.items.length&&(this.items[t]=e,this.ngModelCtrl.$setDirty())},MdChipsCtrl.prototype.isEditingChip=function(){return!!this.$element[0].getElementsByClassName("_md-chip-editing").length},MdChipsCtrl.prototype.isRemovable=function(){return!!this.ngModelCtrl&&(this.readonly?this.removable:!angular.isDefined(this.removable)||this.removable)},MdChipsCtrl.prototype.chipKeydown=function(t){if(!this.getChipBuffer()&&!this.isEditingChip())switch(t.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;if(t.preventDefault(),!this.isRemovable())return;this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:t.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:t.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;t.preventDefault(),this.onFocus()}},MdChipsCtrl.prototype.getPlaceholder=function(){var t=this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder);return t?this.secondaryPlaceholder:this.placeholder},MdChipsCtrl.prototype.removeAndSelectAdjacentChip=function(t){var e=this.getAdjacentChipIndex(t);this.removeChip(t),this.$timeout(angular.bind(this,function(){this.selectAndFocusChipSafe(e)}))},MdChipsCtrl.prototype.resetSelectedChip=function(){this.selectedChip=-1},MdChipsCtrl.prototype.getAdjacentChipIndex=function(t){var e=this.items.length-1;return 0==e?-1:t==e?t-1:t},MdChipsCtrl.prototype.appendChip=function(t){if(this.useTransformChip&&this.transformChip){var e=this.transformChip({$chip:t});angular.isDefined(e)&&(t=e)}if(angular.isObject(t)){var i=this.items.some(function(e){return angular.equals(t,e)});if(i)return}if(!(null==t||this.items.indexOf(t)+1)){var n=this.items.push(t);this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:n})}},MdChipsCtrl.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},MdChipsCtrl.prototype.useOnAddExpression=function(){this.useOnAdd=!0},MdChipsCtrl.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},MdChipsCtrl.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},MdChipsCtrl.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},MdChipsCtrl.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},MdChipsCtrl.prototype.hasMaxChipsReached=function(){return angular.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),this.maxChips>0&&this.items.length>=this.maxChips},MdChipsCtrl.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached())},MdChipsCtrl.prototype.removeChip=function(t){var e=this.items.splice(t,1);this.ngModelCtrl.$setDirty(),this.validateModel(),e&&e.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:e[0],$index:t})},MdChipsCtrl.prototype.removeChipAndFocusInput=function(t){this.removeChip(t),this.onFocus()},MdChipsCtrl.prototype.selectAndFocusChipSafe=function(t){return this.items.length?t===this.items.length?this.onFocus():(t=Math.max(t,0),t=Math.min(t,this.items.length-1),this.selectChip(t),void this.focusChip(t)):(this.selectChip(-1),void this.onFocus())},MdChipsCtrl.prototype.selectChip=function(t){t>=-1&&t<=this.items.length?(this.selectedChip=t,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[this.selectedChip]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},MdChipsCtrl.prototype.selectAndFocusChip=function(t){this.selectChip(t),t!=-1&&this.focusChip(t)},MdChipsCtrl.prototype.focusChip=function(t){this.$element[0].querySelector('md-chip[index="'+t+'"] .md-chip-content').focus()},MdChipsCtrl.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){e.items=e.ngModelCtrl.$viewValue}},MdChipsCtrl.prototype.onFocus=function(){var t=this.$element[0].querySelector("input");t&&t.focus(),this.resetSelectedChip()},MdChipsCtrl.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},MdChipsCtrl.prototype.onInputBlur=function(){this.inputHasFocus=!1},MdChipsCtrl.prototype.configureUserInput=function(t){this.userInputElement=t;var e=t.controller("ngModel");e!=this.ngModelCtrl&&(this.userInputNgModelCtrl=e);var i=this.$scope,n=this,s=function(t,e){i.$evalAsync(angular.bind(n,e,t))};t.attr({tabindex:0}).on("keydown",function(t){s(t,n.inputKeydown)}).on("focus",function(t){s(t,n.onInputFocus)}).on("blur",function(t){s(t,n.onInputBlur)})},MdChipsCtrl.prototype.configureAutocomplete=function(t){t&&(this.hasAutocomplete=!0,t.registerSelectedItemWatcher(angular.bind(this,function(t){if(t){if(this.hasMaxChipsReached())return;this.appendChip(t),this.resetChipBuffer()}})),this.$element.find("input").on("focus",angular.bind(this,this.onInputFocus)).on("blur",angular.bind(this,this.onInputBlur)))},MdChipsCtrl.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0},angular.module("material.components.chips").directive("mdChips",MdChips);var MD_CHIPS_TEMPLATE=' <md-chips-wrap ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly, \'md-removable\': $mdChipsCtrl.isRemovable() }" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="md-chip-content" tabindex="-1" aria-hidden="true" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="$mdChipsCtrl.isRemovable()" class="md-chip-remove-container" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"> <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',CHIP_INPUT_TEMPLATE=' <input class="md-input" tabindex="0" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" aria-label="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',CHIP_DEFAULT_TEMPLATE=" <span>{{$chip}}</span>",CHIP_REMOVE_TEMPLATE=' <button class="md-chip-remove" ng-if="$mdChipsCtrl.isRemovable()" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" aria-hidden="true" tabindex="-1"> <md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon> <span class="md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>';MdChips.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],angular.module("material.components.chips").controller("MdContactChipsCtrl",MdContactChipsCtrl),MdContactChipsCtrl.prototype.queryContact=function(t){var e=this.contactQuery({$query:t});return this.filterSelected?e.filter(angular.bind(this,this.filterSelectedContacts)):e},MdContactChipsCtrl.prototype.itemName=function(t){return t[this.contactName]},MdContactChipsCtrl.prototype.filterSelectedContacts=function(t){return this.contacts.indexOf(t)==-1},angular.module("material.components.chips").directive("mdContactChips",MdContactChips);var MD_CONTACT_CHIPS_TEMPLATE=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';MdContactChips.$inject=["$mdTheming","$mdUtil"],ngmaterial.components.chips=angular.module("material.components.chips");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.colors');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.colors');
goog.require('ngmaterial.core');
(function () {

@@ -70,3 +70,3 @@ "use strict";

* @description
* Convert the color expression into an object with scope-interpolated values
* Gets a color json object, keys are css properties and values are string of the wanted color
* Then calculate the rgba() values based on the theme color parts

@@ -84,3 +84,3 @@ *

* link: function (scope, elem) {
* $mdColors.applyThemeColors(elem, scope, {color: 'red'});
* $mdColors.applyThemeColors(elem, {color: 'red'});
* }

@@ -93,4 +93,6 @@ * }

try {
// Assign the calculate RGBA color values directly as inline CSS
element.css(interpolateColors(colorExpression));
if (colorExpression) {
// Assign the calculate RGBA color values directly as inline CSS
element.css(interpolateColors(colorExpression));
}
} catch (e) {

@@ -139,3 +141,3 @@ $log.error(e.message);

return $mdUtil.supplant('rgba( {0}, {1}, {2}, {3} )',
return $mdUtil.supplant('rgba({0}, {1}, {2}, {3})',
[rgbValues[0], rgbValues[1], rgbValues[2], rgbValues[3] || color.opacity]

@@ -295,3 +297,13 @@ );

var lastColors = {};
var parseColors = function (theme) {
if (typeof theme !== 'string') {
theme = '';
}
if (!attrs.mdColors) {
attrs.mdColors = '{}';
}
/**

@@ -328,5 +340,23 @@ * Json.parse() does not work because the keys are not quoted;

cleanElement(colors);
return colors;
};
var cleanElement = function (colors) {
if (!angular.equals(colors, lastColors)) {
var keys = Object.keys(lastColors);
if (lastColors.background && !keys['color']) {
keys.push('color');
}
keys.forEach(function (key) {
element.css(key, '');
});
}
lastColors = colors;
};
/**

@@ -343,3 +373,3 @@ * Registering for mgTheme changes and asking mdTheme controller run our callback whenever a theme changes

scope.$on('destroy', function () {
scope.$on('$destroy', function () {
unregisterChanges();

@@ -388,2 +418,2 @@ });

ng.material.components.colors = angular.module("material.components.colors");
ngmaterial.components.colors = angular.module("material.components.colors");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
goog.provide("ng.material.components.colors"),goog.require("ng.material.core"),function(){"use strict";function e(e,r,o){function t(e,r){try{e.css(s(r))}catch(n){o.error(n.message)}}function a(e){var r=u(e);return l(r)}function l(o,n){n=n||!1;var t=e.PALETTES[o.palette][o.hue];return t=n?t.contrast:t.value,r.supplant("rgba( {0}, {1}, {2}, {3} )",[t[0],t[1],t[2],t[3]||o.opacity])}function s(e){var r={},o=e.hasOwnProperty("color");return angular.forEach(e,function(e,n){var t=u(e),a=n.indexOf("background")>-1;r[n]=l(t),a&&!o&&(r.color=l(t,!0))}),r}function i(r){return angular.isDefined(e.THEMES[r.split("-")[0]])}function u(r){var o=r.split("-"),n=angular.isDefined(e.THEMES[o[0]]),t=n?o.splice(0,1)[0]:e.defaultTheme();return{theme:t,palette:c(o,t),hue:m(o,t),opacity:o[2]||1}}function c(o,t){var a=o.length>1&&-1!==n.indexOf(o[1]),l=o[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(a&&(l=o[0]+"-"+o.splice(1,1)),-1===n.indexOf(l)){var s=e.THEMES[t].colors[l];if(!s)throw new Error(r.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:l}));l=s.name}return l}function m(o,n){var t=e.THEMES[n].colors;if("hue"===o[1]){var a=parseInt(o.splice(2,1)[0],10);if(1>a||a>3)throw new Error(r.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:a}));if(o[1]="hue-"+a,!(o[0]in t))throw new Error(r.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(t).join(", "),usedTheme:o[0]}));return t[o[0]].hues[o[1]]}return o[1]||t[o[0]in t?o[0]:"primary"].hues["default"]}return n=n||Object.keys(e.PALETTES),{applyThemeColors:t,getThemeColor:a,hasTheme:i}}function r(e,r,n,t){return{restrict:"A",require:["^?mdTheme"],compile:function(a,l){function s(){var e=l.mdColors,n=e.indexOf("::")>-1,t=n?!0:o.test(l.mdColors);l.mdColors=e.replace("::","");var a=angular.isDefined(l.mdColorsWatch);return n||t?!1:a?r.parseAttributeBoolean(l.mdColorsWatch):!0}var i=s();return function(r,o,a,l){var s=l[0],u=function(o){var n=t(a.mdColors)(r);return s&&Object.keys(n).forEach(function(r){var t=n[r];e.hasTheme(t)||(n[r]=(o||s.$mdTheme)+"-"+t)}),n},c=angular.noop;s&&(c=s.registerChanges(function(r){e.applyThemeColors(o,u(r))})),r.$on("destroy",function(){c()});try{i?r.$watch(u,angular.bind(this,e.applyThemeColors,o),!0):e.applyThemeColors(o,u())}catch(m){n.error(m.message)}}}}}var o=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,n=void 0;angular.module("material.components.colors",["material.core"]).directive("mdColors",r).service("$mdColors",e),e.$inject=["$mdTheming","$mdUtil","$log"],r.$inject=["$mdColors","$mdUtil","$log","$parse"]}(),ng.material.components.colors=angular.module("material.components.colors");
goog.provide("ngmaterial.components.colors"),goog.require("ngmaterial.core"),function(){"use strict";function e(e,r,o){function t(e,r){try{r&&e.css(l(r))}catch(n){o.error(n.message)}}function a(e){var r=u(e);return s(r)}function s(o,n){n=n||!1;var t=e.PALETTES[o.palette][o.hue];return t=n?t.contrast:t.value,r.supplant("rgba({0}, {1}, {2}, {3})",[t[0],t[1],t[2],t[3]||o.opacity])}function l(e){var r={},o=e.hasOwnProperty("color");return angular.forEach(e,function(e,n){var t=u(e),a=n.indexOf("background")>-1;r[n]=s(t),a&&!o&&(r.color=s(t,!0))}),r}function i(r){return angular.isDefined(e.THEMES[r.split("-")[0]])}function u(r){var o=r.split("-"),n=angular.isDefined(e.THEMES[o[0]]),t=n?o.splice(0,1)[0]:e.defaultTheme();return{theme:t,palette:c(o,t),hue:m(o,t),opacity:o[2]||1}}function c(o,t){var a=o.length>1&&n.indexOf(o[1])!==-1,s=o[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(a&&(s=o[0]+"-"+o.splice(1,1)),n.indexOf(s)===-1){var l=e.THEMES[t].colors[s];if(!l)throw new Error(r.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:s}));s=l.name}return s}function m(o,n){var t=e.THEMES[n].colors;if("hue"===o[1]){var a=parseInt(o.splice(2,1)[0],10);if(a<1||a>3)throw new Error(r.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:a}));if(o[1]="hue-"+a,!(o[0]in t))throw new Error(r.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(t).join(", "),usedTheme:o[0]}));return t[o[0]].hues[o[1]]}return o[1]||t[o[0]in t?o[0]:"primary"].hues["default"]}return n=n||Object.keys(e.PALETTES),{applyThemeColors:t,getThemeColor:a,hasTheme:i}}function r(e,r,n,t){return{restrict:"A",require:["^?mdTheme"],compile:function(a,s){function l(){var e=s.mdColors,n=e.indexOf("::")>-1,t=!!n||o.test(s.mdColors);s.mdColors=e.replace("::","");var a=angular.isDefined(s.mdColorsWatch);return!n&&!t&&(!a||r.parseAttributeBoolean(s.mdColorsWatch))}var i=l();return function(r,o,a,s){var l=s[0],u={},c=function(o){"string"!=typeof o&&(o=""),a.mdColors||(a.mdColors="{}");var n=t(a.mdColors)(r);return l&&Object.keys(n).forEach(function(r){var t=n[r];e.hasTheme(t)||(n[r]=(o||l.$mdTheme)+"-"+t)}),m(n),n},m=function(e){if(!angular.equals(e,u)){var r=Object.keys(u);u.background&&!r.color&&r.push("color"),r.forEach(function(e){o.css(e,"")})}u=e},h=angular.noop;l&&(h=l.registerChanges(function(r){e.applyThemeColors(o,c(r))})),r.$on("$destroy",function(){h()});try{i?r.$watch(c,angular.bind(this,e.applyThemeColors,o),!0):e.applyThemeColors(o,c())}catch(d){n.error(d.message)}}}}}var o=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,n=void 0;angular.module("material.components.colors",["material.core"]).directive("mdColors",r).service("$mdColors",e),e.$inject=["$mdTheming","$mdUtil","$log"],r.$inject=["$mdColors","$mdUtil","$log","$parse"]}(),ngmaterial.components.colors=angular.module("material.components.colors");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.content');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.content');
goog.require('ngmaterial.core');
/**

@@ -44,2 +44,9 @@ * @ngdoc module

*
* Additionally, we now also offer the `md-no-flicker` class which can be applied to any element
* and uses a Webkit-specific filter of `blur(0px)` that forces GPU rendering of all elements
* inside (which eliminates the flicker on iOS devices).
*
* _<b>Note:</b> Forcing an element to render on the GPU can have unintended side-effects, especially
* related to the z-index of elements. Please use with caution and only on the elements needed._
*
* @usage

@@ -54,3 +61,2 @@ *

* </hljs>
*
*/

@@ -99,2 +105,2 @@

ng.material.components.content = angular.module("material.components.content");
ngmaterial.components.content = angular.module("material.components.content");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdContentDirective(e){function o(e,o){this.$scope=e,this.$element=o}return{restrict:"E",controller:["$scope","$element",o],link:function(o,t){t.addClass("_md"),e(t),o.$broadcast("$mdContentLoaded",t),iosScrollFix(t[0])}}}function iosScrollFix(e){angular.element(e).on("$md.pressdown",function(o){"t"===o.pointer.type&&(o.$materialScrollFixed||(o.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}goog.provide("ng.material.components.content"),goog.require("ng.material.core"),angular.module("material.components.content",["material.core"]).directive("mdContent",mdContentDirective),mdContentDirective.$inject=["$mdTheming"],ng.material.components.content=angular.module("material.components.content");
function mdContentDirective(e){function o(e,o){this.$scope=e,this.$element=o}return{restrict:"E",controller:["$scope","$element",o],link:function(o,t){t.addClass("_md"),e(t),o.$broadcast("$mdContentLoaded",t),iosScrollFix(t[0])}}}function iosScrollFix(e){angular.element(e).on("$md.pressdown",function(o){"t"===o.pointer.type&&(o.$materialScrollFixed||(o.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}goog.provide("ngmaterial.components.content"),goog.require("ngmaterial.core"),angular.module("material.components.content",["material.core"]).directive("mdContent",mdContentDirective),mdContentDirective.$inject=["$mdTheming"],ngmaterial.components.content=angular.module("material.components.content");

@@ -5,4 +5,5 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
goog.provide("ng.material.components.datepicker"),goog.require("ng.material.components.icon"),goog.require("ng.material.components.virtualRepeat"),goog.require("ng.material.core"),function(){"use strict";function t(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(n-a)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody role="rowgroup" md-virtual-repeat="i in ctrl.items" md-calendar-month md-month-offset="$index" class="md-calendar-month" md-start-index="ctrl.getSelectedMonthIndex()" md-item-size="'+a+'"></tbody></table></md-virtual-repeat-container></div>',scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter"},require:["ngModel","mdCalendar"],controller:e,controllerAs:"ctrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.configureNgModel(i)}}}function e(t,e,a,n,i,r,l,d,o,c,h){if(l(t),this.items={length:2e3},this.maxDate&&this.minDate){var u=d.getMonthDistance(this.minDate,this.maxDate)+1;u=Math.max(u,1),u+=1,this.items.length=u}if(this.$animate=n,this.$q=i,this.$mdInkRipple=c,this.$mdUtil=h,this.keyCode=r.KEY_CODE,this.dateUtil=d,this.dateLocale=o,this.$element=t,this.$scope=a,this.calendarElement=t[0].querySelector(".md-calendar"),this.calendarScroller=t[0].querySelector(".md-virtual-repeat-scroller"),this.today=this.dateUtil.createDateAtMidnight(),this.firstRenderableDate=this.dateUtil.incrementMonths(this.today,-this.items.length/2),this.minDate&&this.minDate>this.firstRenderableDate)this.firstRenderableDate=this.minDate;else if(this.maxDate){this.items.length-2;this.firstRenderableDate=this.dateUtil.incrementMonths(this.maxDate,-(this.items.length-2))}this.id=s++,this.ngModelCtrl=null,this.selectedDate=null,this.displayDate=null,this.focusDate=null,this.isInitialized=!1,this.isMonthTransitionInProgress=!1,e.tabindex||t.attr("tabindex","-1");var m=this;this.cellClickHandler=function(){var t=this;this.hasAttribute("data-timestamp")&&a.$apply(function(){var e=Number(t.getAttribute("data-timestamp"));m.setNgModelValue(m.dateUtil.createDateAtMidnight(e))})},this.attachCalendarEventListeners()}angular.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]).directive("mdCalendar",t);var a=265,n=45,i="md-calendar-selected-date",r="md-focus",s=0;e.$inject=["$element","$attrs","$scope","$animate","$q","$mdConstant","$mdTheming","$$mdDateUtil","$mdDateLocale","$mdInkRipple","$mdUtil"],e.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){e.changeSelectedDate(e.ngModelCtrl.$viewValue)}},e.prototype.buildInitialCalendarDisplay=function(){this.buildWeekHeader(),this.hideVerticalScrollbar(),this.displayDate=this.selectedDate||this.today,this.isInitialized=!0},e.prototype.hideVerticalScrollbar=function(){var t=this.$element[0],e=t.querySelector(".md-calendar-scroll-mask"),a=this.calendarScroller,n=t.querySelector(".md-calendar-day-header").clientWidth,i=a.offsetWidth-a.clientWidth;e.style.width=n+"px",a.style.width=n+i+"px",a.style.paddingRight=i+"px"},e.prototype.attachCalendarEventListeners=function(){this.$element.on("keydown",angular.bind(this,this.handleKeyEvent))},e.prototype.handleKeyEvent=function(t){var e=this;this.$scope.$apply(function(){if(t.which==e.keyCode.ESCAPE||t.which==e.keyCode.TAB)return e.$scope.$emit("md-calendar-close"),void(t.which==e.keyCode.TAB&&t.preventDefault());if(t.which===e.keyCode.ENTER)return e.setNgModelValue(e.displayDate),void t.preventDefault();var a=e.getFocusDateFromKeyEvent(t);a&&(a=e.boundDateByMinAndMax(a),t.preventDefault(),t.stopPropagation(),e.changeDisplayDate(a).then(function(){e.focus(a)}))})},e.prototype.getFocusDateFromKeyEvent=function(t){var e=this.dateUtil,a=this.keyCode;switch(t.which){case a.RIGHT_ARROW:return e.incrementDays(this.displayDate,1);case a.LEFT_ARROW:return e.incrementDays(this.displayDate,-1);case a.DOWN_ARROW:return t.metaKey?e.incrementMonths(this.displayDate,1):e.incrementDays(this.displayDate,7);case a.UP_ARROW:return t.metaKey?e.incrementMonths(this.displayDate,-1):e.incrementDays(this.displayDate,-7);case a.PAGE_DOWN:return e.incrementMonths(this.displayDate,1);case a.PAGE_UP:return e.incrementMonths(this.displayDate,-1);case a.HOME:return e.getFirstDateOfMonth(this.displayDate);case a.END:return e.getLastDateOfMonth(this.displayDate);default:return null}},e.prototype.getSelectedMonthIndex=function(){return this.dateUtil.getMonthDistance(this.firstRenderableDate,this.selectedDate||this.today)},e.prototype.scrollToMonth=function(t){if(this.dateUtil.isValidDate(t)){var e=this.dateUtil.getMonthDistance(this.firstRenderableDate,t);this.calendarScroller.scrollTop=e*a}},e.prototype.setNgModelValue=function(t){this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render()},e.prototype.focus=function(t){var e=t||this.selectedDate||this.today,a=this.calendarElement.querySelector(".md-focus");a&&a.classList.remove(r);var n=this.getDateId(e),i=document.getElementById(n);i?(i.classList.add(r),i.focus()):this.focusDate=e},e.prototype.boundDateByMinAndMax=function(t){var e=t;return this.minDate&&t<this.minDate&&(e=new Date(this.minDate.getTime())),this.maxDate&&t>this.maxDate&&(e=new Date(this.maxDate.getTime())),e},e.prototype.changeSelectedDate=function(t){var e=this,a=this.selectedDate;this.selectedDate=t,this.changeDisplayDate(t).then(function(){if(a){var n=document.getElementById(e.getDateId(a));n&&(n.classList.remove(i),n.setAttribute("aria-selected","false"))}if(t){var r=document.getElementById(e.getDateId(t));r&&(r.classList.add(i),r.setAttribute("aria-selected","true"))}})},e.prototype.changeDisplayDate=function(t){if(!this.isInitialized)return this.buildInitialCalendarDisplay(),this.$q.when();if(!this.dateUtil.isValidDate(t)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var e=this.animateDateChange(t);this.displayDate=t;var a=this;return e.then(function(){a.isMonthTransitionInProgress=!1}),e},e.prototype.animateDateChange=function(t){return this.scrollToMonth(t),this.$q.when()},e.prototype.buildWeekHeader=function(){for(var t=this.dateLocale.firstDayOfWeek,e=this.dateLocale.shortDays,a=document.createElement("tr"),n=0;7>n;n++){var i=document.createElement("th");i.textContent=e[(n+t)%7],a.appendChild(i)}this.$element.find("thead").append(a)},e.prototype.getDateId=function(t){return["md",this.id,t.getFullYear(),t.getMonth(),t.getDate()].join("-")}}(),function(){"use strict";function t(){return{require:["^^mdCalendar","mdCalendarMonth"],scope:{offset:"=mdMonthOffset"},controller:e,controllerAs:"mdMonthCtrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.calendarCtrl=i,r.generateContent(),t.$watch(function(){return r.offset},function(t,e){t!=e&&r.generateContent()})}}}function e(t,e,a){this.dateUtil=e,this.dateLocale=a,this.$element=t,this.calendarCtrl=null,this.offset,this.focusAfterAppend=null}angular.module("material.components.datepicker").directive("mdCalendarMonth",t);var a="md-calendar-date-today",n="md-calendar-selected-date",i="md-focus";e.$inject=["$element","$$mdDateUtil","$mdDateLocale"],e.prototype.generateContent=function(){var t=this.calendarCtrl,e=this.dateUtil.incrementMonths(t.firstRenderableDate,this.offset);this.$element.empty(),this.$element.append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(i),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},e.prototype.buildDateCell=function(t){var e=this.calendarCtrl,i=document.createElement("td");if(i.tabIndex=-1,i.classList.add("md-calendar-date"),i.setAttribute("role","gridcell"),t){i.setAttribute("tabindex","-1"),i.setAttribute("aria-label",this.dateLocale.longDateFormatter(t)),i.id=e.getDateId(t),i.setAttribute("data-timestamp",t.getTime()),this.dateUtil.isSameDay(t,e.today)&&i.classList.add(a),this.dateUtil.isValidDate(e.selectedDate)&&this.dateUtil.isSameDay(t,e.selectedDate)&&(i.classList.add(n),i.setAttribute("aria-selected","true"));var r=this.dateLocale.dates[t.getDate()];if(this.isDateEnabled(t)){var s=document.createElement("span");i.appendChild(s),s.classList.add("md-calendar-date-selection-indicator"),s.textContent=r,i.addEventListener("click",e.cellClickHandler),e.focusDate&&this.dateUtil.isSameDay(t,e.focusDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=r}return i},e.prototype.isDateEnabled=function(t){return this.dateUtil.isDateWithinRange(t,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!angular.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(t))},e.prototype.buildDateRow=function(t){var e=document.createElement("tr");return e.setAttribute("role","row"),e.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(t)),e},e.prototype.buildCalendarForMonth=function(t){var e=this.dateUtil.isValidDate(t)?t:new Date,a=this.dateUtil.getFirstDateOfMonth(e),n=this.getLocaleDay_(a),i=this.dateUtil.getNumberOfDaysInMonth(e),r=document.createDocumentFragment(),s=1,l=this.buildDateRow(s);r.appendChild(l);var d=this.offset===this.calendarCtrl.items.length-1,o=0,c=document.createElement("td");if(c.classList.add("md-calendar-month-label"),this.calendarCtrl.maxDate&&a>this.calendarCtrl.maxDate&&c.classList.add("md-calendar-month-label-disabled"),c.textContent=this.dateLocale.monthHeaderFormatter(e),2>=n){c.setAttribute("colspan","7");var h=this.buildDateRow();if(h.appendChild(c),r.insertBefore(h,l),d)return r}else o=2,c.setAttribute("colspan","2"),l.appendChild(c);for(var u=o;n>u;u++)l.appendChild(this.buildDateCell());for(var m=n,p=a,f=1;i>=f;f++){if(7===m){if(d)return r;m=0,s++,l=this.buildDateRow(s),r.appendChild(l)}p.setDate(f);var D=this.buildDateCell(p);l.appendChild(D),m++}for(;l.childNodes.length<7;)l.appendChild(this.buildDateCell());for(;r.childNodes.length<6;){for(var g=this.buildDateRow(),u=0;7>u;u++)g.appendChild(this.buildDateCell());r.appendChild(g)}return r},e.prototype.getLocaleDay_=function(t){return(t.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){"use strict";angular.module("material.components.datepicker").config(["$provide",function(t){function e(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}e.prototype.$get=function(t){function e(t){if(!t)return"";var e=t.toLocaleTimeString(),a=t;return 0!=t.getHours()||-1===e.indexOf("11:")&&-1===e.indexOf("23:")||(a=new Date(t.getFullYear(),t.getMonth(),t.getDate(),1,0,0)),a.toLocaleDateString()}function a(t){return new Date(t)}function n(t){t=t.trim();var e=/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;return e.test(t)}function i(t){return u.shortMonths[t.getMonth()]+" "+t.getFullYear()}function r(t){return"Week "+t}function s(t){return[u.days[t.getDay()],u.months[t.getMonth()],u.dates[t.getDate()],t.getFullYear()].join(" ")}for(var l=t.DATETIME_FORMATS.DAY.map(function(t){return t[0]}),d=Array(32),o=1;31>=o;o++)d[o]=o;var c="Calendar",h="Open calendar",u={months:this.months||t.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||t.DATETIME_FORMATS.SHORTMONTH,days:this.days||t.DATETIME_FORMATS.DAY,shortDays:this.shortDays||l,dates:this.dates||d,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||e,parseDate:this.parseDate||a,isDateComplete:this.isDateComplete||n,monthHeaderFormatter:this.monthHeaderFormatter||i,weekNumberFormatter:this.weekNumberFormatter||r,longDateFormatter:this.longDateFormatter||s,msgCalendar:this.msgCalendar||c,msgOpenCalendar:this.msgOpenCalendar||h};return u},e.prototype.$get.$inject=["$locale"],t.provider("$mdDateLocale",new e)}])}(),function(){"use strict";function t(){return{template:'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" md-svg-icon="md-calendar"></md-icon></md-button><div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"><md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button></div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-min-date="ctrl.minDate" md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>',require:["ngModel","mdDatepicker","?^mdInputContainer"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",dateFilter:"=mdDateFilter"},controller:e,controllerAs:"ctrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1],s=n[2];if(s)throw Error("md-datepicker should not be placed inside md-input-container.");r.configureNgModel(i)}}}function e(t,e,a,n,i,r,s,l,d,o,c,h){this.$compile=n,this.$timeout=i,this.$window=r,this.dateLocale=o,this.dateUtil=c,this.$mdConstant=s,this.$mdUtil=d,this.$$rAF=h,this.documentElement=angular.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=e[0].querySelector("input"),this.ngInputElement=angular.element(this.inputElement),this.inputContainer=e[0].querySelector(".md-datepicker-input-container"),this.calendarPane=e[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=e[0].querySelector(".md-datepicker-button"),this.inputMask=e[0].querySelector(".md-datepicker-input-mask-opaque"),this.$element=e,this.$attrs=a,this.$scope=t,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(e[0].disabled||angular.isString(a.disabled)),this.isCalendarOpen=!1,this.calendarPaneOpenedFrom=null,this.calendarPane.id="md-date-pane"+d.nextUid(),l(e),this.bodyClickHandler=angular.bind(this,this.handleBodyClick),this.windowResizeHandler=d.debounce(angular.bind(this,this.closeCalendarPane),100),a.tabindex||e.attr("tabindex","-1"),this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners();var u=this;t.$on("$destroy",function(){u.detachCalendarPane()})}angular.module("material.components.datepicker").directive("mdDatepicker",t);var a=3,n="md-datepicker-invalid",i=500,r=368,s=360;e.$inject=["$scope","$element","$attrs","$compile","$timeout","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF"],e.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){var t=e.ngModelCtrl.$viewValue;if(t&&!(t instanceof Date))throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: "+typeof t);e.date=t,e.inputElement.value=e.dateLocale.formatDate(t),e.resizeInputElement(),e.updateErrorState()}},e.prototype.attachChangeListeners=function(){var t=this;t.$scope.$on("md-calendar-change",function(e,a){t.ngModelCtrl.$setViewValue(a),t.date=a,t.inputElement.value=t.dateLocale.formatDate(a),t.closeCalendarPane(),t.resizeInputElement(),t.updateErrorState()}),t.ngInputElement.on("input",angular.bind(t,t.resizeInputElement)),t.ngInputElement.on("input",t.$mdUtil.debounce(t.handleInputEvent,i,t))},e.prototype.attachInteractionListeners=function(){var t=this,e=this.$scope,a=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(n){n.altKey&&n.keyCode==a.DOWN_ARROW&&(t.openCalendarPane(n),e.$digest())}),e.$on("md-calendar-close",function(){t.closeCalendarPane()})},e.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},e.prototype.setDisabled=function(t){this.isDisabled=t,this.inputElement.disabled=t,this.calendarButton.disabled=t},e.prototype.updateErrorState=function(t){var e=t||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(e)){if(e=this.dateUtil.createDateAtMidnight(e),this.dateUtil.isValidDate(this.minDate)){var a=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",e>=a)}if(this.dateUtil.isValidDate(this.maxDate)){var i=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",i>=e)}angular.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(e))}else this.ngModelCtrl.$setValidity("valid",null==e);this.ngModelCtrl.$valid||this.inputContainer.classList.add(n)},e.prototype.clearErrorState=function(){this.inputContainer.classList.remove(n),["mindate","maxdate","filtered","valid"].forEach(function(t){this.ngModelCtrl.$setValidity(t,!0)},this)},e.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+a},e.prototype.handleInputEvent=function(){var t=this.inputElement.value,e=t?this.dateLocale.parseDate(t):null;this.dateUtil.setDateTimeToMidnight(e);var a=""==t||this.dateUtil.isValidDate(e)&&this.dateLocale.isDateComplete(t)&&this.isDateEnabled(e);a&&(this.ngModelCtrl.$setViewValue(e),this.date=e),this.updateErrorState(e)},e.prototype.isDateEnabled=function(t){return this.dateUtil.isDateWithinRange(t,this.minDate,this.maxDate)&&(!angular.isFunction(this.dateFilter)||this.dateFilter(t))},e.prototype.attachCalendarPane=function(){var t=this.calendarPane;t.style.transform="",this.$element.addClass("md-datepicker-open");var e=this.inputContainer.getBoundingClientRect(),a=document.body.getBoundingClientRect(),n=e.top-a.top,i=e.left-a.left,l=a.top<0&&0==document.body.scrollTop?-a.top:document.body.scrollTop,d=a.left<0&&0==document.body.scrollLeft?-a.left:document.body.scrollLeft,o=l+this.$window.innerHeight,c=d+this.$window.innerWidth;if(i+s>c){if(c-s>0)i=c-s;else{i=d;var h=this.$window.innerWidth/s;t.style.transform="scale("+h+")"}t.classList.add("md-datepicker-pos-adjusted")}n+r>o&&o-r>l&&(n=o-r,t.classList.add("md-datepicker-pos-adjusted")),t.style.left=i+"px",t.style.top=n+"px",document.body.appendChild(t),this.inputMask.style.left=e.width+"px",this.$$rAF(function(){t.classList.add("md-pane-open")})},e.prototype.detachCalendarPane=function(){this.$element.removeClass("md-datepicker-open"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},e.prototype.openCalendarPane=function(t){if(!this.isCalendarOpen&&!this.isDisabled){this.isCalendarOpen=!0,this.calendarPaneOpenedFrom=t.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar();var e=this;this.$mdUtil.nextTick(function(){e.documentElement.on("click touchstart",e.bodyClickHandler)},!1),window.addEventListener("resize",this.windowResizeHandler)}},e.prototype.closeCalendarPane=function(){this.isCalendarOpen&&(this.detachCalendarPane(),this.isCalendarOpen=!1,this.calendarPaneOpenedFrom.focus(),this.calendarPaneOpenedFrom=null,this.ngModelCtrl.$setTouched(),this.documentElement.off("click touchstart",this.bodyClickHandler),window.removeEventListener("resize",this.windowResizeHandler))},e.prototype.getCalendarCtrl=function(){return angular.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},e.prototype.focusCalendar=function(){var t=this;this.$mdUtil.nextTick(function(){t.getCalendarCtrl().focus()},!1)},e.prototype.setFocused=function(t){t||this.ngModelCtrl.$setTouched(),this.isFocused=t},e.prototype.handleBodyClick=function(t){if(this.isCalendarOpen){var e=this.$mdUtil.getClosest(t.target,"md-calendar");e||this.closeCalendarPane(),this.$scope.$digest()}}}(),function(){"use strict";angular.module("material.components.datepicker").factory("$$mdDateUtil",function(){function t(t){return new Date(t.getFullYear(),t.getMonth(),1)}function e(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function a(t){return new Date(t.getFullYear(),t.getMonth()+1,1)}function n(t){return new Date(t.getFullYear(),t.getMonth()-1,1)}function i(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function r(t,e){return t.getDate()==e.getDate()&&i(t,e)}function s(t,e){var n=a(t);return i(n,e)}function l(t,e){var a=n(t);return i(e,a)}function d(t,e){return D((t.getTime()+e.getTime())/2)}function o(e){var a=t(e);return Math.floor((a.getDay()+e.getDate()-1)/7)}function c(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function h(t,a){var n=new Date(t.getFullYear(),t.getMonth()+a,1),i=e(n);return i<t.getDate()?n.setDate(i):n.setDate(t.getDate()),n}function u(t,e){return 12*(e.getFullYear()-t.getFullYear())+(e.getMonth()-t.getMonth())}function m(t){return new Date(t.getFullYear(),t.getMonth(),e(t))}function p(t){return null!=t&&t.getTime&&!isNaN(t.getTime())}function f(t){p(t)&&t.setHours(0,0,0,0)}function D(t){var e;return e=angular.isUndefined(t)?new Date:new Date(t),f(e),e}function g(t,e,a){var n=D(t),i=p(e)?D(e):null,r=p(a)?D(a):null;return(!i||n>=i)&&(!r||r>=n)}return{getFirstDateOfMonth:t,getNumberOfDaysInMonth:e,getDateInNextMonth:a,getDateInPreviousMonth:n,isInNextMonth:s,isInPreviousMonth:l,getDateMidpoint:d,isSameMonthAndYear:i,getWeekOfMonth:o,incrementDays:c,incrementMonths:h,getLastDateOfMonth:m,isSameDay:r,getMonthDistance:u,isValidDate:p,setDateTimeToMidnight:f,createDateAtMidnight:D,isDateWithinRange:g}})}(),ng.material.components.datepicker=angular.module("material.components.datepicker");
goog.provide("ngmaterial.components.datepicker"),goog.require("ngmaterial.components.icon"),goog.require("ngmaterial.components.virtualRepeat"),goog.require("ngmaterial.core"),angular.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){"use strict";function e(){return{template:function(e,t){var a=t.hasOwnProperty("ngIf")?"":'ng-if="calendarCtrl.isInitialized"',n='<div ng-switch="calendarCtrl.currentView" '+a+'><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>';return n},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:t,controllerAs:"calendarCtrl",bindToController:!0,link:function(e,t,a,n){var i=n[0],r=n[1];r.configureNgModel(i)}}}function t(e,t,a,i,r,l,s,d){l(e),this.$element=e,this.$scope=t,this.dateUtil=a,this.$mdUtil=i,this.keyCode=r.KEY_CODE,this.$$rAF=s,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.currentView=this._currentView||"month",this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=n++,this.displayDate=null,this.selectedDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,d.tabindex||e.attr("tabindex","-1"),e.on("keydown",angular.bind(this,this.handleKeyEvent))}angular.module("material.components.datepicker").directive("mdCalendar",e);var a=340,n=0;t.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs"],t.prototype.configureNgModel=function(e){var t=this;t.ngModelCtrl=e,t.$mdUtil.nextTick(function(){t.isInitialized=!0}),e.$render=function(){var e=this.$viewValue;t.$scope.$broadcast("md-calendar-parent-changed",e),t.selectedDate||(t.selectedDate=e),t.displayDate||(t.displayDate=t.selectedDate||t.today)}},t.prototype.setNgModelValue=function(e){var t=this.dateUtil.createDateAtMidnight(e);return this.focus(t),this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render(),t},t.prototype.setCurrentView=function(e,t){var a=this;a.$mdUtil.nextTick(function(){a.currentView=e,t&&(a.displayDate=angular.isDate(t)?t:new Date(t))})},t.prototype.focus=function(e){if(this.dateUtil.isValidDate(e)){var t=this.$element[0].querySelector(".md-focus");t&&t.classList.remove(this.FOCUSED_DATE_CLASS);var a=this.getDateId(e,this.currentView),n=document.getElementById(a);n&&(n.classList.add(this.FOCUSED_DATE_CLASS),n.focus(),this.displayDate=e)}else{var i=this.$element[0].querySelector("[ng-switch]");i&&i.focus()}},t.prototype.getActionFromKeyEvent=function(e){var t=this.keyCode;switch(e.which){case t.ENTER:return"select";case t.RIGHT_ARROW:return"move-right";case t.LEFT_ARROW:return"move-left";case t.DOWN_ARROW:return e.metaKey?"move-page-down":"move-row-down";case t.UP_ARROW:return e.metaKey?"move-page-up":"move-row-up";case t.PAGE_DOWN:return"move-page-down";case t.PAGE_UP:return"move-page-up";case t.HOME:return"start";case t.END:return"end";default:return null}},t.prototype.handleKeyEvent=function(e){var t=this;this.$scope.$apply(function(){if(e.which==t.keyCode.ESCAPE||e.which==t.keyCode.TAB)return t.$scope.$emit("md-calendar-close"),void(e.which==t.keyCode.TAB&&e.preventDefault());var a=t.getActionFromKeyEvent(e);a&&(e.preventDefault(),e.stopPropagation(),t.$scope.$broadcast("md-calendar-parent-action",a))})},t.prototype.hideVerticalScrollbar=function(e){function t(){var t=n.width||a,i=n.scrollbarWidth,l=e.calendarScroller;r.style.width=t+"px",l.style.width=t+i+"px",l.style.paddingRight=i+"px"}var n=this,i=e.$element[0],r=i.querySelector(".md-calendar-scroll-mask");n.width>0?t():n.$$rAF(function(){var a=e.calendarScroller;n.scrollbarWidth=a.offsetWidth-a.clientWidth,n.width=i.querySelector("table").offsetWidth,t()})},t.prototype.getDateId=function(e,t){if(!t)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,t,e.getFullYear(),e.getMonth(),e.getDate()].join("-")},t.prototype.updateVirtualRepeat=function(){var e=this.$scope,t=e.$on("$md-resize-enable",function(){e.$$phase||e.$apply(),t()})}}(),function(){"use strict";function e(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(n-a)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="'+a+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarMonth"],controller:t,controllerAs:"monthCtrl",bindToController:!0,link:function(e,t,a,n){var i=n[0],r=n[1];r.initialize(i)}}}function t(e,t,a,n,i,r){this.$element=e,this.$scope=t,this.$animate=a,this.$q=n,this.dateUtil=i,this.dateLocale=r,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.firstRenderableDate=null,this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var l=this;this.cellClickHandler=function(){var e=i.getTimestampFromNode(this);l.$scope.$apply(function(){l.calendarCtrl.setNgModelValue(e)})},this.headerClickHandler=function(){l.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}angular.module("material.components.datepicker").directive("mdCalendarMonth",e);var a=265,n=45;t.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],t.prototype.initialize=function(e){var t=e.minDate,a=e.maxDate;if(this.calendarCtrl=e,this.items={length:2e3},a&&t){var n=this.dateUtil.getMonthDistance(t,a)+1;n=Math.max(n,1),n+=1,this.items.length=n}if(this.firstRenderableDate=this.dateUtil.incrementMonths(e.today,-this.items.length/2),t&&t>this.firstRenderableDate)this.firstRenderableDate=t;else if(a){this.items.length-2;this.firstRenderableDate=this.dateUtil.incrementMonths(a,-(this.items.length-2))}this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},t.prototype.getSelectedMonthIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getMonthDistance(this.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},t.prototype.changeSelectedDate=function(e){var t=this,a=t.calendarCtrl,n=a.selectedDate;a.selectedDate=e,this.changeDisplayDate(e).then(function(){var t=a.SELECTED_DATE_CLASS,i="month";if(n){var r=document.getElementById(a.getDateId(n,i));r&&(r.classList.remove(t),r.setAttribute("aria-selected","false"))}if(e){var l=document.getElementById(a.getDateId(e,i));l&&(l.classList.add(t),l.setAttribute("aria-selected","true"))}})},t.prototype.changeDisplayDate=function(e){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(e)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var t=this.animateDateChange(e);this.calendarCtrl.displayDate=e;var a=this;return t.then(function(){a.isMonthTransitionInProgress=!1}),t},t.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getMonthDistance(this.firstRenderableDate,e);this.calendarScroller.scrollTop=t*a}return this.$q.when()},t.prototype.buildWeekHeader=function(){for(var e=this.dateLocale.firstDayOfWeek,t=this.dateLocale.shortDays,a=document.createElement("tr"),n=0;n<7;n++){var i=document.createElement("th");i.textContent=t[(n+e)%7],a.appendChild(i)}this.$element.find("thead").append(a)},t.prototype.attachScopeListeners=function(){var e=this;e.$scope.$on("md-calendar-parent-changed",function(t,a){e.changeSelectedDate(a)}),e.$scope.$on("md-calendar-parent-action",angular.bind(this,this.handleKeyEvent))},t.prototype.handleKeyEvent=function(e,t){var a=this.calendarCtrl,n=a.displayDate;if("select"===t)a.setNgModelValue(n);else{var i=null,r=this.dateUtil;switch(t){case"move-right":i=r.incrementDays(n,1);break;case"move-left":i=r.incrementDays(n,-1);break;case"move-page-down":i=r.incrementMonths(n,1);break;case"move-page-up":i=r.incrementMonths(n,-1);break;case"move-row-down":i=r.incrementDays(n,7);break;case"move-row-up":i=r.incrementDays(n,-7);break;case"start":i=r.getFirstDateOfMonth(n);break;case"end":i=r.getLastDateOfMonth(n)}i&&(i=this.dateUtil.clampDate(i,a.minDate,a.maxDate),this.changeDisplayDate(i).then(function(){a.focus(i)}))}}}(),function(){"use strict";function e(e,a){var n=e('<md-icon md-svg-src="'+a.mdTabsArrow+'"></md-icon>')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:t,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,t,a,i){var r=i[0],l=i[1],s=i[2];s.calendarCtrl=r,s.monthCtrl=l,s.arrowIcon=n.cloneNode(!0),s.generateContent(),e.$watch(function(){return s.offset},function(e,t){e!==t&&s.generateContent()})}}}function t(e,t,a){this.$element=e,this.dateUtil=t,this.dateLocale=a,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}angular.module("material.components.datepicker").directive("mdCalendarMonthBody",e),e.$inject=["$compile","$$mdSvgRegistry"],t.$inject=["$element","$$mdDateUtil","$mdDateLocale"],t.prototype.generateContent=function(){var e=this.dateUtil.incrementMonths(this.monthCtrl.firstRenderableDate,this.offset);this.$element.empty(),this.$element.append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},t.prototype.buildDateCell=function(e){var t=this.monthCtrl,a=this.calendarCtrl,n=document.createElement("td");if(n.tabIndex=-1,n.classList.add("md-calendar-date"),n.setAttribute("role","gridcell"),e){n.setAttribute("tabindex","-1"),n.setAttribute("aria-label",this.dateLocale.longDateFormatter(e)),n.id=a.getDateId(e,"month"),n.setAttribute("data-timestamp",e.getTime()),this.dateUtil.isSameDay(e,a.today)&&n.classList.add(a.TODAY_CLASS),this.dateUtil.isValidDate(a.selectedDate)&&this.dateUtil.isSameDay(e,a.selectedDate)&&(n.classList.add(a.SELECTED_DATE_CLASS),n.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[e.getDate()];if(this.isDateEnabled(e)){var r=document.createElement("span");r.classList.add("md-calendar-date-selection-indicator"),r.textContent=i,n.appendChild(r),n.addEventListener("click",t.cellClickHandler),a.displayDate&&this.dateUtil.isSameDay(e,a.displayDate)&&(this.focusAfterAppend=n)}else n.classList.add("md-calendar-date-disabled"),n.textContent=i}return n},t.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!angular.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(e))},t.prototype.buildDateRow=function(e){var t=document.createElement("tr");return t.setAttribute("role","row"),t.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(e)),t},t.prototype.buildCalendarForMonth=function(e){var t=this.dateUtil.isValidDate(e)?e:new Date,a=this.dateUtil.getFirstDateOfMonth(t),n=this.getLocaleDay_(a),i=this.dateUtil.getNumberOfDaysInMonth(t),r=document.createDocumentFragment(),l=1,s=this.buildDateRow(l);r.appendChild(s);var d=this.offset===this.monthCtrl.items.length-1,o=0,c=document.createElement("td"),h=document.createElement("span");if(h.textContent=this.dateLocale.monthHeaderFormatter(t),c.appendChild(h),c.classList.add("md-calendar-month-label"),this.calendarCtrl.maxDate&&a>this.calendarCtrl.maxDate?c.classList.add("md-calendar-month-label-disabled"):(c.addEventListener("click",this.monthCtrl.headerClickHandler),c.setAttribute("data-timestamp",a.getTime()),c.setAttribute("aria-label",this.dateLocale.monthFormatter(t)),c.appendChild(this.arrowIcon.cloneNode(!0))),n<=2){c.setAttribute("colspan","7");var u=this.buildDateRow();if(u.appendChild(c),r.insertBefore(u,s),d)return r}else o=3,c.setAttribute("colspan","3"),s.appendChild(c);for(var m=o;m<n;m++)s.appendChild(this.buildDateCell());for(var p=n,f=a,g=1;g<=i;g++){if(7===p){if(d)return r;p=0,l++,s=this.buildDateRow(l),r.appendChild(s)}f.setDate(g);var D=this.buildDateCell(f);s.appendChild(D),p++}for(;s.childNodes.length<7;)s.appendChild(this.buildDateCell());for(;r.childNodes.length<6;){for(var C=this.buildDateRow(),v=0;v<7;v++)C.appendChild(this.buildDateCell());r.appendChild(C)}return r},t.prototype.getLocaleDay_=function(e){return(e.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){"use strict";function e(){return{template:'<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="'+a+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarYear"],controller:t,controllerAs:"yearCtrl",bindToController:!0,link:function(e,t,a,n){var i=n[0],r=n[1];r.initialize(i)}}}function t(e,t,a,n,i){this.$element=e,this.$scope=t,this.$animate=a,this.$q=n,this.dateUtil=i,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.firstRenderableDate=null,this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var r=this;this.cellClickHandler=function(){r.calendarCtrl.setCurrentView("month",i.getTimestampFromNode(this))}}angular.module("material.components.datepicker").directive("mdCalendarYear",e);var a=88;t.$inject=["$element","$scope","$animate","$q","$$mdDateUtil"],t.prototype.initialize=function(e){var t=e.minDate,a=e.maxDate;if(this.calendarCtrl=e,this.items={length:400},this.firstRenderableDate=this.dateUtil.incrementYears(e.today,-(this.items.length/2)),t&&t>this.firstRenderableDate?this.firstRenderableDate=t:a&&(this.firstRenderableDate=this.dateUtil.incrementMonths(a,-(this.items.length-1))),a&&t){var n=this.dateUtil.getYearDistance(this.firstRenderableDate,a)+1;this.items.length=Math.max(n,1)}this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},t.prototype.getFocusedYearIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getYearDistance(this.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},t.prototype.changeDate=function(e){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(e)&&!this.isMonthTransitionInProgress){var t=this,a=this.animateDateChange(e);return t.isMonthTransitionInProgress=!0,t.calendarCtrl.displayDate=e,a.then(function(){t.isMonthTransitionInProgress=!1})}},t.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getYearDistance(this.firstRenderableDate,e);this.calendarScroller.scrollTop=t*a}return this.$q.when()},t.prototype.handleKeyEvent=function(e,t){var a=this.calendarCtrl,n=a.displayDate;if("select"===t)this.changeDate(n).then(function(){a.setCurrentView("month",n),a.focus(n)});else{var i=null,r=this.dateUtil;switch(t){case"move-right":i=r.incrementMonths(n,1);break;case"move-left":i=r.incrementMonths(n,-1);break;case"move-row-down":i=r.incrementMonths(n,6);break;case"move-row-up":i=r.incrementMonths(n,-6)}if(i){var l=a.minDate?r.incrementMonths(r.getFirstDateOfMonth(a.minDate),1):null,s=a.maxDate?r.getFirstDateOfMonth(a.maxDate):null;i=r.getFirstDateOfMonth(this.dateUtil.clampDate(i,l,s)),this.changeDate(i).then(function(){a.focus(i)})}}},t.prototype.attachScopeListeners=function(){var e=this;e.$scope.$on("md-calendar-parent-changed",function(t,a){e.changeDate(a)}),e.$scope.$on("md-calendar-parent-action",angular.bind(e,e.handleKeyEvent))}}(),function(){"use strict";function e(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:t,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(e,t,a,n){var i=n[0],r=n[1],l=n[2];l.calendarCtrl=i,l.yearCtrl=r,l.generateContent(),e.$watch(function(){return l.offset},function(e,t){e!=t&&l.generateContent()})}}}function t(e,t,a){this.$element=e,this.dateUtil=t,this.dateLocale=a,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}angular.module("material.components.datepicker").directive("mdCalendarYearBody",e),t.$inject=["$element","$$mdDateUtil","$mdDateLocale"],t.prototype.generateContent=function(){var e=this.dateUtil.incrementYears(this.yearCtrl.firstRenderableDate,this.offset);this.$element.empty(),this.$element.append(this.buildCalendarForYear(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},t.prototype.buildMonthCell=function(e,t){var a=this.calendarCtrl,n=this.yearCtrl,i=this.buildBlankCell(),r=new Date(e,t,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(r)),i.id=a.getDateId(r,"year"),i.setAttribute("data-timestamp",r.getTime()),this.dateUtil.isSameMonthAndYear(r,a.today)&&i.classList.add(a.TODAY_CLASS),this.dateUtil.isValidDate(a.selectedDate)&&this.dateUtil.isSameMonthAndYear(r,a.selectedDate)&&(i.classList.add(a.SELECTED_DATE_CLASS),i.setAttribute("aria-selected","true"));var l=this.dateLocale.shortMonths[t];if(this.dateUtil.isMonthWithinRange(r,a.minDate,a.maxDate)){var s=document.createElement("span");s.classList.add("md-calendar-date-selection-indicator"),s.textContent=l,i.appendChild(s),i.addEventListener("click",n.cellClickHandler),a.displayDate&&this.dateUtil.isSameMonthAndYear(r,a.displayDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=l;return i},t.prototype.buildBlankCell=function(){var e=document.createElement("td");return e.tabIndex=-1,e.classList.add("md-calendar-date"),e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e},t.prototype.buildCalendarForYear=function(e){var t,a=e.getFullYear(),n=document.createDocumentFragment(),i=document.createElement("tr"),r=document.createElement("td");for(r.className="md-calendar-month-label",r.textContent=a,i.appendChild(r),t=0;t<6;t++)i.appendChild(this.buildMonthCell(a,t));n.appendChild(i);var l=document.createElement("tr");for(l.appendChild(this.buildBlankCell()),t=6;t<12;t++)l.appendChild(this.buildMonthCell(a,t));return n.appendChild(l),n}}(),function(){"use strict";angular.module("material.components.datepicker").config(["$provide",function(e){function t(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}t.prototype.$get=function(e,t){function a(e){if(!e)return"";var a=e.toLocaleTimeString(),n=e;return 0!=e.getHours()||a.indexOf("11:")===-1&&a.indexOf("23:")===-1||(n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),1,0,0)),t("date")(n,"M/d/yyyy")}function n(e){return new Date(e)}function i(e){e=e.trim();var t=/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;return t.test(e)}function r(e){return p.shortMonths[e.getMonth()]+" "+e.getFullYear()}function l(e){return p.months[e.getMonth()]+" "+e.getFullYear()}function s(e){return"Week "+e}function d(e){return[p.days[e.getDay()],p.months[e.getMonth()],p.dates[e.getDate()],e.getFullYear()].join(" ")}for(var o=e.DATETIME_FORMATS.SHORTDAY.map(function(e){return e.substring(0,1)}),c=Array(32),h=1;h<=31;h++)c[h]=h;var u="Calendar",m="Open calendar",p={months:this.months||e.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||e.DATETIME_FORMATS.SHORTMONTH,days:this.days||e.DATETIME_FORMATS.DAY,shortDays:this.shortDays||o,dates:this.dates||c,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||a,parseDate:this.parseDate||n,isDateComplete:this.isDateComplete||i,monthHeaderFormatter:this.monthHeaderFormatter||r,monthFormatter:this.monthFormatter||l,weekNumberFormatter:this.weekNumberFormatter||s,longDateFormatter:this.longDateFormatter||d,msgCalendar:this.msgCalendar||u,msgOpenCalendar:this.msgOpenCalendar||m};return p},t.prototype.$get.$inject=["$locale","$filter"],e.provider("$mdDateLocale",new t)}])}(),function(){"use strict";angular.module("material.components.datepicker").factory("$$mdDateUtil",function(){function e(e){return new Date(e.getFullYear(),e.getMonth(),1)}function t(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function a(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function n(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function i(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function r(e,t){return e.getDate()==t.getDate()&&i(e,t)}function l(e,t){var n=a(e);return i(n,t)}function s(e,t){var a=n(e);return i(t,a)}function d(e,t){return g((e.getTime()+t.getTime())/2)}function o(t){var a=e(t);return Math.floor((a.getDay()+t.getDate()-1)/7)}function c(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function h(e,a){var n=new Date(e.getFullYear(),e.getMonth()+a,1),i=t(n);return i<e.getDate()?n.setDate(i):n.setDate(e.getDate()),n}function u(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())}function m(e){return new Date(e.getFullYear(),e.getMonth(),t(e))}function p(e){return null!=e&&e.getTime&&!isNaN(e.getTime())}function f(e){p(e)&&e.setHours(0,0,0,0)}function g(e){var t;return t=angular.isUndefined(e)?new Date:new Date(e),f(t),t}function D(e,t,a){var n=g(e),i=p(t)?g(t):null,r=p(a)?g(a):null;return(!i||i<=n)&&(!r||r>=n)}function C(e,t){return h(e,12*t)}function v(e,t){return t.getFullYear()-e.getFullYear()}function y(e,t,a){var n=e;return t&&e<t&&(n=new Date(t.getTime())),a&&e>a&&(n=new Date(a.getTime())),n}function $(e){if(e&&e.hasAttribute("data-timestamp"))return Number(e.getAttribute("data-timestamp"))}function b(e,t,a){var n=e.getMonth(),i=e.getFullYear();return(!t||t.getFullYear()<i||t.getMonth()<=n)&&(!a||a.getFullYear()>i||a.getMonth()>=n)}return{getFirstDateOfMonth:e,getNumberOfDaysInMonth:t,getDateInNextMonth:a,getDateInPreviousMonth:n,isInNextMonth:l,isInPreviousMonth:s,getDateMidpoint:d,isSameMonthAndYear:i,getWeekOfMonth:o,incrementDays:c,incrementMonths:h,getLastDateOfMonth:m,isSameDay:r,getMonthDistance:u,isValidDate:p,setDateTimeToMidnight:f,createDateAtMidnight:g,isDateWithinRange:D,incrementYears:C,getYearDistance:v,clampDate:y,getTimestampFromNode:$,isMonthWithinRange:b}})}(),function(){"use strict";function e(e,a,n){return{template:function(t,a){var n=a.mdHideIcons,i="all"===n||"calendar"===n?"":'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="'+e.mdCalendar+'"></md-icon></md-button>',r="all"===n||"triangle"===n?"":'<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>';return""+i+'<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)">'+r+'</div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}"md-min-date="ctrl.minDate"md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>'},require:["ngModel","mdDatepicker","?^mdInputContainer","?^form"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",currentView:"@mdCurrentView",dateFilter:"=mdDateFilter",isOpen:"=?mdIsOpen",debounceInterval:"=mdDebounceInterval"},controller:t,controllerAs:"ctrl",bindToController:!0,link:function(e,t,i,s){var d=s[0],o=s[1],c=s[2],h=s[3],u=a.parseAttributeBoolean(i.mdNoAsterisk);if(o.configureNgModel(d,c),c){var m=t[0].querySelector(".md-errors-spacer");m&&t.after(angular.element("<div>").append(m)),c.setHasPlaceholder(i.mdPlaceholder),c.input=t,c.element.addClass(r).toggleClass(l,"calendar"!==i.mdHideIcons&&"all"!==i.mdHideIcons),c.label?u||i.$observe("required",function(e){c.label.toggleClass("md-required",!!e)}):n.expect(t,"aria-label",i.mdPlaceholder),e.$watch(c.isErrorGetter||function(){return d.$invalid&&(d.$touched||h&&h.$submitted)},c.setInvalid)}else if(h)var p=e.$watch(function(){return h.$submitted},function(e){e&&(o.updateErrorState(),p())})}}}function t(e,t,a,n,i,r,l,s,d,o,c){this.$window=n,this.dateLocale=s,this.dateUtil=d,this.$mdConstant=i,this.$mdUtil=l,this.$$rAF=o,this.documentElement=angular.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=t[0].querySelector("input"),this.ngInputElement=angular.element(this.inputElement),this.inputContainer=t[0].querySelector(".md-datepicker-input-container"),this.calendarPane=t[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=t[0].querySelector(".md-datepicker-button"),this.inputMask=t[0].querySelector(".md-datepicker-input-mask-opaque"),this.$element=t,this.$attrs=a,this.$scope=e,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(t[0].disabled||angular.isString(a.disabled)),this.isCalendarOpen=!1,this.openOnFocus=a.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPane.id="md-date-pane"+l.nextUid(),this.bodyClickHandler=angular.bind(this,this.handleBodyClick),this.windowEventName=c.isIos||c.isAndroid?"orientationchange":"resize",this.windowEventHandler=l.debounce(angular.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=angular.bind(this,this.handleWindowBlur),a.tabindex||t.attr("tabindex","-1"),r(t),r(angular.element(this.calendarPane)),this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners();var h=this;e.$on("$destroy",function(){h.detachCalendarPane()}),a.mdIsOpen&&e.$watch("ctrl.isOpen",function(e){e?h.openCalendarPane({target:h.inputElement}):h.closeCalendarPane()})}angular.module("material.components.datepicker").directive("mdDatepicker",e),e.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria"];var a=3,n="md-datepicker-invalid",i="md-datepicker-open",r="_md-datepicker-floating-label",l="_md-datepicker-has-calendar-icon",s=500,d=368,o=360;t.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$mdGesture"],t.prototype.configureNgModel=function(e,t){this.ngModelCtrl=e,this.mdInputContainer=t;var a=this;e.$render=function(){var e=a.ngModelCtrl.$viewValue;if(e&&!(e instanceof Date))throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: "+typeof e);a.date=e,a.inputElement.value=a.dateLocale.formatDate(e),a.mdInputContainer&&a.mdInputContainer.setHasValue(!!e),a.resizeInputElement(),a.updateErrorState()},e.$viewChangeListeners.unshift(angular.bind(this,this.updateErrorState))},t.prototype.attachChangeListeners=function(){var e=this;e.$scope.$on("md-calendar-change",function(t,a){e.ngModelCtrl.$setViewValue(a),e.date=a,e.inputElement.value=e.dateLocale.formatDate(a),e.mdInputContainer&&e.mdInputContainer.setHasValue(!!a),e.closeCalendarPane(),e.resizeInputElement(),e.updateErrorState()}),e.ngInputElement.on("input",angular.bind(e,e.resizeInputElement));var t=angular.isDefined(this.debounceInterval)?this.debounceInterval:s;e.ngInputElement.on("input",e.$mdUtil.debounce(e.handleInputEvent,t,e))},t.prototype.attachInteractionListeners=function(){var e=this,t=this.$scope,a=this.$mdConstant.KEY_CODE;e.ngInputElement.on("keydown",function(n){n.altKey&&n.keyCode==a.DOWN_ARROW&&(e.openCalendarPane(n),t.$digest())}),e.openOnFocus&&(e.ngInputElement.on("focus",angular.bind(e,e.openCalendarPane)),angular.element(e.$window).on("blur",e.windowBlurHandler),t.$on("$destroy",function(){angular.element(e.$window).off("blur",e.windowBlurHandler)})),t.$on("md-calendar-close",function(){e.closeCalendarPane()})},t.prototype.installPropertyInterceptors=function(){var e=this;if(this.$attrs.ngDisabled){var t=this.$scope.$parent;t&&t.$watch(this.$attrs.ngDisabled,function(t){e.setDisabled(t)})}Object.defineProperty(this,"placeholder",{get:function(){return e.inputElement.placeholder},set:function(t){e.inputElement.placeholder=t||""}})},t.prototype.setDisabled=function(e){this.isDisabled=e,this.inputElement.disabled=e,this.calendarButton&&(this.calendarButton.disabled=e)},t.prototype.updateErrorState=function(e){var t=e||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(t)){if(t=this.dateUtil.createDateAtMidnight(t),this.dateUtil.isValidDate(this.minDate)){var a=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",t>=a)}if(this.dateUtil.isValidDate(this.maxDate)){var i=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",t<=i)}angular.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(t))}else this.ngModelCtrl.$setValidity("valid",null==t);this.ngModelCtrl.$valid||this.inputContainer.classList.add(n)},t.prototype.clearErrorState=function(){this.inputContainer.classList.remove(n),["mindate","maxdate","filtered","valid"].forEach(function(e){this.ngModelCtrl.$setValidity(e,!0)},this)},t.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+a},t.prototype.handleInputEvent=function(){var e=this.inputElement.value,t=e?this.dateLocale.parseDate(e):null;this.dateUtil.setDateTimeToMidnight(t);var a=""==e||this.dateUtil.isValidDate(t)&&this.dateLocale.isDateComplete(e)&&this.isDateEnabled(t);a&&(this.ngModelCtrl.$setViewValue(t),this.date=t),this.updateErrorState(t)},t.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.minDate,this.maxDate)&&(!angular.isFunction(this.dateFilter)||this.dateFilter(e))},t.prototype.attachCalendarPane=function(){var e=this.calendarPane,t=document.body;e.style.transform="",this.$element.addClass(i),this.mdInputContainer&&this.mdInputContainer.element.addClass(i),angular.element(t).addClass("md-datepicker-is-showing");var a=this.inputContainer.getBoundingClientRect(),n=t.getBoundingClientRect(),r=a.top-n.top,l=a.left-n.left,s=n.top<0&&0==document.body.scrollTop?-n.top:document.body.scrollTop,c=n.left<0&&0==document.body.scrollLeft?-n.left:document.body.scrollLeft,h=s+this.$window.innerHeight,u=c+this.$window.innerWidth;if(l+o>u){if(u-o>0)l=u-o;else{l=c;var m=this.$window.innerWidth/o;e.style.transform="scale("+m+")"}e.classList.add("md-datepicker-pos-adjusted")}r+d>h&&h-d>s&&(r=h-d,e.classList.add("md-datepicker-pos-adjusted")),e.style.left=l+"px",e.style.top=r+"px",document.body.appendChild(e),this.inputMask.style.left=a.width+"px",this.$$rAF(function(){e.classList.add("md-pane-open")})},t.prototype.detachCalendarPane=function(){this.$element.removeClass(i),this.mdInputContainer&&this.mdInputContainer.element.removeClass(i),angular.element(document.body).removeClass("md-datepicker-is-showing"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane);
},t.prototype.openCalendarPane=function(e){if(!this.isCalendarOpen&&!this.isDisabled&&!this.inputFocusedOnWindowBlur){this.isCalendarOpen=this.isOpen=!0,this.calendarPaneOpenedFrom=e.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar(),this.evalAttr("ngFocus");var t=this;this.$mdUtil.nextTick(function(){t.documentElement.on("click touchstart",t.bodyClickHandler)},!1),window.addEventListener(this.windowEventName,this.windowEventHandler)}},t.prototype.closeCalendarPane=function(){function e(){t.isCalendarOpen=t.isOpen=!1}if(this.isCalendarOpen){var t=this;t.detachCalendarPane(),t.ngModelCtrl.$setTouched(),t.evalAttr("ngBlur"),t.documentElement.off("click touchstart",t.bodyClickHandler),window.removeEventListener(t.windowEventName,t.windowEventHandler),t.calendarPaneOpenedFrom.focus(),t.calendarPaneOpenedFrom=null,t.openOnFocus?t.$mdUtil.nextTick(e):e()}},t.prototype.getCalendarCtrl=function(){return angular.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},t.prototype.focusCalendar=function(){var e=this;this.$mdUtil.nextTick(function(){e.getCalendarCtrl().focus()},!1)},t.prototype.setFocused=function(e){e||this.ngModelCtrl.$setTouched(),this.openOnFocus||this.evalAttr(e?"ngFocus":"ngBlur"),this.isFocused=e},t.prototype.handleBodyClick=function(e){if(this.isCalendarOpen){var t=this.$mdUtil.getClosest(e.target,"md-calendar");t||this.closeCalendarPane(),this.$scope.$digest()}},t.prototype.handleWindowBlur=function(){this.inputFocusedOnWindowBlur=document.activeElement===this.inputElement},t.prototype.evalAttr=function(e){this.$attrs[e]&&this.$scope.$parent.$eval(this.$attrs[e])}}(),ngmaterial.components.datepicker=angular.module("material.components.datepicker");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.dialog');
goog.require('ng.material.components.backdrop');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.dialog');
goog.require('ngmaterial.components.backdrop');
goog.require('ngmaterial.core');
/**

@@ -214,2 +214,65 @@ * @ngdoc module

*
* ### Pre-Rendered Dialogs
* By using the `contentElement` option, it is possible to use an already existing element in the DOM.
*
* <hljs lang="js">
* $scope.showPrerenderedDialog = function() {
* $mdDialog.show({
* contentElement: '#myStaticDialog',
* parent: angular.element(document.body)
* });
* };
* </hljs>
*
* When using a string as value, `$mdDialog` will automatically query the DOM for the specified CSS selector.
*
* <hljs lang="html">
* <div style="visibility: hidden">
* <div class="md-dialog-container" id="myStaticDialog">
* <md-dialog>
* This is a pre-rendered dialog.
* </md-dialog>
* </div>
* </div>
* </hljs>
*
* **Notice**: It is important, to use the `.md-dialog-container` as the content element, otherwise the dialog
* will not show up.
*
* It also possible to use a DOM element for the `contentElement` option.
* - `contentElement: document.querySelector('#myStaticDialog')`
* - `contentElement: angular.element(TEMPLATE)`
*
* When using a `template` as content element, it will be not compiled upon open.
* This allows you to compile the element yourself and use it each time the dialog opens.
*
* ### Custom Presets
* Developers are also able to create their own preset, which can be easily used without repeating
* their options each time.
*
* <hljs lang="js">
* $mdDialogProvider.addPreset('testPreset', {
* options: function() {
* return {
* template:
* '<md-dialog>' +
* 'This is a custom preset' +
* '</md-dialog>',
* controllerAs: 'dialog',
* bindToController: true,
* clickOutsideToClose: true,
* escapeToClose: true
* };
* }
* });
* </hljs>
*
* After you created your preset at config phase, you can easily access it.
*
* <hljs lang="js">
* $mdDialog.show(
* $mdDialog.testPreset()
* );
* </hljs>
*
* ### JavaScript: promise API syntax, custom dialog template

@@ -402,2 +465,3 @@ * <hljs lang="js">

* - $mdDialogPreset#placeholder(string) - Sets the placeholder text for the input.
* - $mdDialogPreset#initialValue(string) - Sets the initial value for the prompt input.
* - $mdDialogPreset#ok(string) - Sets the prompt "Okay" button text.

@@ -426,2 +490,7 @@ * - $mdDialogPreset#cancel(string) - Sets the prompt "Cancel" button text.

* This template should **never** be constructed with any kind of user input or user data.
* - `contentElement` - `{string|Element}`: Instead of using a template, which will be compiled each time a
* dialog opens, you can also use a DOM element.<br/>
* * When specifying an element, which is present on the DOM, `$mdDialog` will temporary fetch the element into
* the dialog and restores it at the old DOM position upon close.
* * When specifying a string, the string be used as a CSS selector, to lookup for the element in the DOM.
* - `autoWrap` - `{boolean=}`: Whether or not to automatically wrap the template with a

@@ -466,8 +535,9 @@ * `<md-dialog>` tag if one is not provided. Defaults to true. Can be disabled if you provide a

* to the root element of the application.
* - `onShowing` `{function=} Callback function used to announce the show() action is
* - `onShowing` - `function(scope, element)`: Callback function used to announce the show() action is
* starting.
* - `onComplete` `{function=}`: Callback function used to announce when the show() action is
* - `onComplete` - `function(scope, element)`: Callback function used to announce when the show() action is
* finished.
* - `onRemoving` `{function=}`: Callback function used to announce the close/hide() action is
* starting. This allows developers to run custom animations in parallel the close animations.
* - `onRemoving` - `function(element, removePromise)`: Callback function used to announce the
* close/hide() action is starting. This allows developers to run custom animations
* in parallel the close animations.
* - `fullscreen` `{boolean=}`: An option to apply `.md-dialog-fullscreen` class on open.

@@ -506,8 +576,8 @@ * @returns {promise} A promise that can be resolved with `$mdDialog.hide()` or

advancedDialogOptions.$inject = ["$mdDialog", "$mdTheming", "$mdConstant"];
dialogDefaultOptions.$inject = ["$mdDialog", "$mdAria", "$mdUtil", "$mdConstant", "$animate", "$document", "$window", "$rootElement", "$log", "$injector"];
advancedDialogOptions.$inject = ["$mdDialog", "$mdConstant"];
dialogDefaultOptions.$inject = ["$mdDialog", "$mdAria", "$mdUtil", "$mdConstant", "$animate", "$document", "$window", "$rootElement", "$log", "$injector", "$mdTheming"];
return $$interimElementProvider('$mdDialog')
.setDefaults({
methods: ['disableParentScroll', 'hasBackdrop', 'clickOutsideToClose', 'escapeToClose',
'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen'],
'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen', 'contentElement'],
options: dialogDefaultOptions

@@ -526,3 +596,3 @@ })

.addPreset('prompt', {
methods: ['title', 'htmlContent', 'textContent', 'content', 'placeholder', 'ariaLabel',
methods: ['title', 'htmlContent', 'textContent', 'initialValue', 'content', 'placeholder', 'ariaLabel',
'ok', 'cancel', 'theme', 'css'],

@@ -533,3 +603,3 @@ options: advancedDialogOptions

/* ngInject */
function advancedDialogOptions($mdDialog, $mdTheming, $mdConstant) {
function advancedDialogOptions($mdDialog, $mdConstant) {
return {

@@ -540,9 +610,10 @@ template: [

' <h2 class="md-title">{{ dialog.title }}</h2>',
' <div ng-if="::dialog.mdHtmlContent" class="_md-dialog-content-body" ',
' <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ',
' ng-bind-html="::dialog.mdHtmlContent"></div>',
' <div ng-if="::!dialog.mdHtmlContent" class="_md-dialog-content-body">',
' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">',
' <p>{{::dialog.mdTextContent}}</p>',
' </div>',
' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',
' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">',
' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" ' +
' placeholder="{{::dialog.placeholder}}">',
' </md-input-container>',

@@ -562,4 +633,10 @@ ' </md-dialog-content>',

controller: function mdDialogCtrl() {
var isPrompt = this.$type == 'prompt';
if (isPrompt && this.initialValue) {
this.result = this.initialValue;
}
this.hide = function() {
$mdDialog.hide(this.$type === 'prompt' ? this.result : true);
$mdDialog.hide(isPrompt ? this.result : true);
};

@@ -577,3 +654,2 @@ this.abort = function() {

bindToController: true,
theme: $mdTheming.defaultTheme()
};

@@ -583,6 +659,9 @@ }

/* ngInject */
function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document, $window, $rootElement, $log, $injector) {
function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document, $window, $rootElement,
$log, $injector, $mdTheming) {
return {
hasBackdrop: true,
isolateScope: true,
onCompiling: beforeCompile,
onShow: onShow,

@@ -594,2 +673,3 @@ onShowing: beforeShow,

targetEvent: null,
contentElement: null,
closeTo: null,

@@ -621,3 +701,11 @@ openFrom: null,

function beforeCompile(options) {
// Automatically apply the theme, if the user didn't specify a theme explicitly.
// Those option changes need to be done, before the compilation has started, because otherwise
// the option changes will be not available in the $mdCompilers locales.
detectTheming(options);
}
function beforeShow(scope, element, options, controller) {
if (controller) {

@@ -642,9 +730,41 @@ controller.mdHtmlContent = controller.htmlContent || options.htmlContent || '';

if (options.contentElement) {
var contentEl = options.contentElement;
if (angular.isString(contentEl)) {
contentEl = document.querySelector(contentEl);
options.elementInsertionSibling = contentEl.nextElementSibling;
options.elementInsertionParent = contentEl.parentNode;
} else {
contentEl = contentEl[0] || contentEl;
// When the element is not visible in the DOM, then we can treat is as same
// as a normal dialog would do. Removing it at close etc.
// ---
// When the element is visible in the DOM, then we restore it at close of the dialog.
if (document.contains(contentEl)) {
options.elementInsertionSibling = contentEl.nextElementSibling;
options.elementInsertionParent = contentEl.parentNode;
}
}
options.elementInsertionEntry = contentEl;
element = angular.element(contentEl);
}
var dialogElement = element.find('md-dialog');
// Once a dialog has `ng-cloak` applied on his template the dialog animation will not work properly.
// This is a very common problem, so we have to notify the developer about this.
if (dialogElement.hasClass('ng-cloak')) {
var message = '$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.';
$log.warn( message, element[0] );
}
captureParentAndFromToElements(options);
configureAria(element.find('md-dialog'), options);
configureAria(dialogElement, options);
showBackdrop(scope, element, options);
activateListeners(element, options);
return dialogPopIn(element, options)
.then(function() {
activateListeners(element, options);
lockScreenReader(element, options);

@@ -720,2 +840,22 @@ warnDeprecatedActions();

function removeContentElement() {
if (!options.contentElement) return;
options.reverseContainerStretch();
if (!options.elementInsertionParent) {
// When the contentElement has no parent, then it's a virtual DOM element, which should
// be removed at close, as same as normal templates inside of a dialog.
options.elementInsertionEntry.parentNode.removeChild(options.elementInsertionEntry);
} else if (!options.elementInsertionSibling) {
// When the contentElement doesn't have any sibling, then it can be simply appended to the
// parent, because it plays no role, which index it had before.
options.elementInsertionParent.appendChild(options.elementInsertionEntry);
} else {
// When the contentElement has a sibling, which marks the previous position of the contentElement
// in the DOM, we insert it correctly before the sibling, to have the same index as before.
options.elementInsertionParent.insertBefore(options.elementInsertionEntry, options.elementInsertionSibling);
}
}
/**

@@ -726,3 +866,8 @@ * Detach the element

angular.element($document[0].body).removeClass('md-dialog-is-showing');
element.remove();
// Only remove the element, if it's not provided through the contentElement option.
if (!options.contentElement) {
element.remove();
} else {
removeContentElement();
}

@@ -733,2 +878,18 @@ if (!options.$destroy) options.origin.focus();

function detectTheming(options) {
// Only detect the theming, if the developer didn't specify the theme specifically.
if (options.theme) return;
options.theme = $mdTheming.defaultTheme();
if (options.targetEvent && options.targetEvent.target) {
var targetEl = angular.element(options.targetEvent.target);
// Once the user specifies a targetEvent, we will automatically try to find the correct
// nested theme.
options.theme = (targetEl.controller('mdTheme') || {}).$mdTheme || options.theme;
}
}
/**

@@ -754,2 +915,3 @@ * Capture originator/trigger/from/to element information (if available)

/**

@@ -798,3 +960,3 @@ * Identify the bounding RECT for the target element

var window = angular.element($window);
var onWindowResize = $mdUtil.debounce(function(){
var onWindowResize = $mdUtil.debounce(function() {
stretchDialogContainerToViewport(element, options);

@@ -898,3 +1060,3 @@ }, 60);

if (options.hasBackdrop) {
options.backdrop = $mdUtil.createBackdrop(scope, "_md-dialog-backdrop md-opaque");
options.backdrop = $mdUtil.createBackdrop(scope, "md-dialog-backdrop md-opaque");
$animate.enter(options.backdrop, options.parent);

@@ -961,3 +1123,3 @@ }

topFocusTrap = document.createElement('div');
topFocusTrap.classList.add('_md-dialog-focus-trap');
topFocusTrap.classList.add('md-dialog-focus-trap');
topFocusTrap.tabIndex = 0;

@@ -1030,2 +1192,7 @@

var previousStyles = {
top: container.css('top'),
height: container.css('height')
};
container.css({

@@ -1036,3 +1203,8 @@ top: (isFixed ? $mdUtil.scrollTop(options.parent) : 0) + 'px',

return container;
return function() {
// Reverts the modified styles back to the previous values.
// This is needed for contentElements, which should have the same styles after close
// as before.
container.css(previousStyles);
};
}

@@ -1046,3 +1218,3 @@

options.parent.append(container);
stretchDialogContainerToViewport(container, options);
options.reverseContainerStretch = stretchDialogContainerToViewport(container, options);

@@ -1052,3 +1224,3 @@ var dialogEl = container.find('md-dialog');

var buildTranslateToOrigin = animator.calculateZoomToOrigin;
var translateOptions = {transitionInClass: '_md-transition-in', transitionOutClass: '_md-transition-out'};
var translateOptions = {transitionInClass: 'md-transition-in', transitionOutClass: 'md-transition-out'};
var from = animator.toTransformCss(buildTranslateToOrigin(dialogEl, options.openFrom || options.origin));

@@ -1064,3 +1236,3 @@ var to = animator.toTransformCss(""); // defaults to center display (or parent or $rootElement)

.then(function(animateReversal) {
// Build a reversal translate function synched to this translation...
// Build a reversal translate function synced to this translation...
options.reverseAnimate = function() {

@@ -1071,3 +1243,3 @@ delete options.reverseAnimate;

// Using the opposite classes to create a close animation to the closeTo element
translateOptions = {transitionInClass: '_md-transition-out', transitionOutClass: '_md-transition-in'};
translateOptions = {transitionInClass: 'md-transition-out', transitionOutClass: 'md-transition-in'};
from = to;

@@ -1081,3 +1253,3 @@ to = animator.toTransformCss(buildTranslateToOrigin(dialogEl, options.closeTo));

return animateReversal(
animator.toTransformCss(
to = animator.toTransformCss(
// in case the origin element has moved or is hidden,

@@ -1090,2 +1262,12 @@ // let's recalculate the translateCSS

};
// Builds a function, which clears the animations / transforms of the dialog element.
// Required for contentElements, which should not have the the animation styling after
// the dialog is closed.
options.clearAnimate = function() {
delete options.clearAnimate;
return animator
.translate3d(dialogEl, to, animator.toTransformCss(''), {});
};
return true;

@@ -1099,3 +1281,9 @@ });

function dialogPopOut(container, options) {
return options.reverseAnimate();
return options.reverseAnimate().then(function() {
if (options.contentElement) {
// When we use a contentElement, we want the element to be the same as before.
// That means, that we have to clear all the animation properties, like transform.
options.clearAnimate();
}
});
}

@@ -1116,2 +1304,2 @@

ng.material.components.dialog = angular.module("material.components.dialog");
ngmaterial.components.dialog = angular.module("material.components.dialog");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdDialogDirective(e,t,n){return{restrict:"E",link:function(o,a){a.addClass("_md"),t(a),e(function(){function e(){a.toggleClass("md-content-overflow",i.scrollHeight>i.clientHeight)}var t,i=a[0].querySelector("md-dialog-content");i&&(t=i.getElementsByTagName("img"),e(),angular.element(t).on("load",e)),o.$on("$destroy",function(){n.destroy(a)})})}}}function MdDialogProvider(e){function t(e,t,n){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',' <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">',' <h2 class="md-title">{{ dialog.title }}</h2>',' <div ng-if="::dialog.mdHtmlContent" class="_md-dialog-content-body" ',' ng-bind-html="::dialog.mdHtmlContent"></div>',' <div ng-if="::!dialog.mdHtmlContent" class="_md-dialog-content-body">'," <p>{{::dialog.mdTextContent}}</p>"," </div>",' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">'," </md-input-container>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary">'," {{ dialog.cancel }}"," </md-button>",' <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type===\'alert\'">'," {{ dialog.ok }}"," </md-button>"," </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:function(){this.hide=function(){e.hide("prompt"===this.$type?this.result:!0)},this.abort=function(){e.cancel()},this.keypress=function(t){t.keyCode===n.KEY_CODE.ENTER&&e.hide(this.result)}},controllerAs:"dialog",bindToController:!0,theme:t.defaultTheme()}}function n(e,t,n,i,r,l,d,c,s,u){function m(e,t,n,o){if(o){if(o.mdHtmlContent=o.htmlContent||n.htmlContent||"",o.mdTextContent=o.textContent||n.textContent||o.content||n.content||"",o.mdHtmlContent&&!u.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(o.mdHtmlContent&&o.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}}function g(e,t,o,a){function i(){t[0].querySelector(".md-actions")&&s.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>.")}function r(){function e(){var e=t[0].querySelector(".dialog-close");if(!e){var n=t[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=n[n.length-1]}return angular.element(e)}if(o.focusOnOpen){var a=n.findFocusTarget(t)||e();a.focus()}}return angular.element(l[0].body).addClass("md-dialog-is-showing"),f(o),C(t.find("md-dialog"),o),v(e,t,o),y(t,o).then(function(){h(t,o),b(t,o),i(),r()})}function p(e,t,n){function i(){return $(t,n)}function r(){angular.element(l[0].body).removeClass("md-dialog-is-showing"),t.remove(),n.$destroy||n.origin.focus()}return n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),o&&o.parentNode&&o.parentNode.removeChild(o),a&&a.parentNode&&a.parentNode.removeChild(a),n.$destroy?r():i().then(r)}function f(e){function t(e,t){var n=angular.element(e||{});if(n&&n.length){var o={top:0,left:0,height:0,width:0},a=angular.isFunction(n[0].getBoundingClientRect);return angular.extend(t||{},{element:a?n:void 0,bounds:a?n[0].getBoundingClientRect():angular.extend({},o,n[0]),focus:angular.bind(n,n.focus)})}}function n(e,t){return angular.isString(e)&&(e=l[0].querySelector(e)),angular.element(e||t)}e.origin=angular.extend({element:null,bounds:null,focus:angular.noop},e.origin||{}),e.parent=n(e.parent,c),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin))}function h(t,o){var a=angular.element(d),r=n.debounce(function(){k(t,o)},60),l=[],c=function(){var t="alert"==o.$type?e.hide:e.cancel;n.nextTick(t,!0)};if(o.escapeToClose){var s=o.parent,u=function(e){e.keyCode===i.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),c())};t.on("keydown",u),s.on("keydown",u),l.push(function(){t.off("keydown",u),s.off("keydown",u)})}if(a.on("resize",r),l.push(function(){a.off("resize",r)}),o.clickOutsideToClose){var m,g=t,p=function(e){m=e.target},f=function(e){m===g[0]&&e.target===g[0]&&(e.stopPropagation(),e.preventDefault(),c())};g.on("mousedown",p),g.on("mouseup",f),l.push(function(){g.off("mousedown",p),g.off("mouseup",f)})}o.deactivateListeners=function(){l.forEach(function(e){e()}),o.deactivateListeners=null}}function v(e,t,o){o.disableParentScroll&&(o.restoreScroll=n.disableScrollAround(t,o.parent)),o.hasBackdrop&&(o.backdrop=n.createBackdrop(e,"_md-dialog-backdrop md-opaque"),r.enter(o.backdrop,o.parent)),o.hideBackdrop=function(e){o.backdrop&&(e?o.backdrop.remove():r.leave(o.backdrop)),o.disableParentScroll&&(o.restoreScroll(),delete o.restoreScroll),o.hideBackdrop=null}}function C(e,i){var r="alert"===i.$type?"alertdialog":"dialog",l=e.find("md-dialog-content"),d=e.attr("id"),c="dialogContent_"+(d||n.nextUid());e.attr({role:r,tabIndex:"-1"}),0===l.length&&(l=e,d&&(c=d)),l.attr("id",c),e.attr("aria-describedby",c),i.ariaLabel?t.expect(e,"aria-label",i.ariaLabel):t.expectAsync(e,"aria-label",function(){var e=l.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")}),o=document.createElement("div"),o.classList.add("_md-dialog-focus-trap"),o.tabIndex=0,a=o.cloneNode(!1);var s=function(){e.focus()};o.addEventListener("focus",s),a.addEventListener("focus",s),e[0].parentNode.insertBefore(o,e[0]),e.after(a)}function b(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,a=0;a<t.length;a++)e===t[a]||T(t[a],["SCRIPT","STYLE"])||t[a].setAttribute("aria-hidden",o);n(e=e.parentNode)}}var o=!0;n(e[0]),t.unlockScreenReader=function(){o=!1,n(e[0]),t.unlockScreenReader=null}}function k(e,t){var o="fixed"==d.getComputedStyle(l[0].body).position,a=t.backdrop?d.getComputedStyle(t.backdrop[0]):null,i=a?Math.min(l[0].body.clientHeight,Math.ceil(Math.abs(parseInt(a.height,10)))):0;return e.css({top:(o?n.scrollTop(t.parent):0)+"px",height:i?i+"px":"100%"}),e}function y(e,t){t.parent.append(e),k(e,t);var o=e.find("md-dialog"),a=n.dom.animator,i=a.calculateZoomToOrigin,r={transitionInClass:"_md-transition-in",transitionOutClass:"_md-transition-out"},l=a.toTransformCss(i(o,t.openFrom||t.origin)),d=a.toTransformCss("");return t.fullscreen&&o.addClass("md-dialog-fullscreen"),a.translate3d(o,l,d,r).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(r={transitionInClass:"_md-transition-out",transitionOutClass:"_md-transition-in"},l=d,d=a.toTransformCss(i(o,t.closeTo)),a.translate3d(o,l,d,r)):e(a.toTransformCss(i(o,t.origin)))},!0})}function $(e,t){return t.reverseAnimate()}function T(e,t){return-1!==t.indexOf(e.nodeName)?!0:void 0}return{hasBackdrop:!0,isolateScope:!0,onShow:g,onShowing:m,onRemove:p,clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){function n(e){return t.autoWrap&&!/<\/md-dialog>/g.test(e)?"<md-dialog>"+(e||"")+"</md-dialog>":e||""}return'<div class="md-dialog-container" tabindex="-1">'+n(e)+"</div>"}}}var o,a;return t.$inject=["$mdDialog","$mdTheming","$mdConstant"],n.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen"],options:n}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:t})}goog.provide("ng.material.components.dialog"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",MdDialogDirective).provider("$mdDialog",MdDialogProvider),MdDialogDirective.$inject=["$$rAF","$mdTheming","$mdDialog"],MdDialogProvider.$inject=["$$interimElementProvider"],ng.material.components.dialog=angular.module("material.components.dialog");
function MdDialogDirective(e,t,n){return{restrict:"E",link:function(o,i){i.addClass("_md"),t(i),e(function(){function e(){i.toggleClass("md-content-overflow",a.scrollHeight>a.clientHeight)}var t,a=i[0].querySelector("md-dialog-content");a&&(t=a.getElementsByTagName("img"),e(),angular.element(t).on("load",e)),o.$on("$destroy",function(){n.destroy(i)})})}}}function MdDialogProvider(e){function t(e,t){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',' <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">',' <h2 class="md-title">{{ dialog.title }}</h2>',' <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ',' ng-bind-html="::dialog.mdHtmlContent"></div>',' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">'," <p>{{::dialog.mdTextContent}}</p>"," </div>",' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">'," </md-input-container>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary">'," {{ dialog.cancel }}"," </md-button>",' <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type===\'alert\'">'," {{ dialog.ok }}"," </md-button>"," </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:function(){var n="prompt"==this.$type;n&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){e.hide(!n||this.result)},this.abort=function(){e.cancel()},this.keypress=function(n){n.keyCode===t.KEY_CODE.ENTER&&e.hide(this.result)}},controllerAs:"dialog",bindToController:!0}}function n(e,t,n,a,r,l,d,s,c,m,u){function g(e){v(e)}function f(e,t,n,o){if(o){if(o.mdHtmlContent=o.htmlContent||n.htmlContent||"",o.mdTextContent=o.textContent||n.textContent||o.content||n.content||"",o.mdHtmlContent&&!m.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(o.mdHtmlContent&&o.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}}function p(e,t,o,i){function a(){t[0].querySelector(".md-actions")&&c.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>.")}function r(){function e(){var e=t[0].querySelector(".dialog-close");if(!e){var n=t[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=n[n.length-1]}return angular.element(e)}if(o.focusOnOpen){var i=n.findFocusTarget(t)||e();i.focus()}}if(angular.element(l[0].body).addClass("md-dialog-is-showing"),o.contentElement){var d=o.contentElement;angular.isString(d)?(d=document.querySelector(d),o.elementInsertionSibling=d.nextElementSibling,o.elementInsertionParent=d.parentNode):(d=d[0]||d,document.contains(d)&&(o.elementInsertionSibling=d.nextElementSibling,o.elementInsertionParent=d.parentNode)),o.elementInsertionEntry=d,t=angular.element(d)}var s=t.find("md-dialog");if(s.hasClass("ng-cloak")){var m="$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.";c.warn(m,t[0])}return C(o),k(s,o),y(e,t,o),b(t,o),S(t,o).then(function(){$(t,o),a(),r()})}function h(e,t,n){function a(){return T(t,n)}function r(){n.contentElement&&(n.reverseContainerStretch(),n.elementInsertionParent?n.elementInsertionSibling?n.elementInsertionParent.insertBefore(n.elementInsertionEntry,n.elementInsertionSibling):n.elementInsertionParent.appendChild(n.elementInsertionEntry):n.elementInsertionEntry.parentNode.removeChild(n.elementInsertionEntry))}function d(){angular.element(l[0].body).removeClass("md-dialog-is-showing"),n.contentElement?r():t.remove(),n.$destroy||n.origin.focus()}return n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),o&&o.parentNode&&o.parentNode.removeChild(o),i&&i.parentNode&&i.parentNode.removeChild(i),n.$destroy?d():a().then(d)}function v(e){if(!e.theme&&(e.theme=u.defaultTheme(),e.targetEvent&&e.targetEvent.target)){var t=angular.element(e.targetEvent.target);e.theme=(t.controller("mdTheme")||{}).$mdTheme||e.theme}}function C(e){function t(e,t){var n=angular.element(e||{});if(n&&n.length){var o={top:0,left:0,height:0,width:0},i=angular.isFunction(n[0].getBoundingClientRect);return angular.extend(t||{},{element:i?n:void 0,bounds:i?n[0].getBoundingClientRect():angular.extend({},o,n[0]),focus:angular.bind(n,n.focus)})}}function n(e,t){return angular.isString(e)&&(e=l[0].querySelector(e)),angular.element(e||t)}e.origin=angular.extend({element:null,bounds:null,focus:angular.noop},e.origin||{}),e.parent=n(e.parent,s),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin))}function b(t,o){var i=angular.element(d),r=n.debounce(function(){E(t,o)},60),l=[],s=function(){var t="alert"==o.$type?e.hide:e.cancel;n.nextTick(t,!0)};if(o.escapeToClose){var c=o.parent,m=function(e){e.keyCode===a.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),s())};t.on("keydown",m),c.on("keydown",m),l.push(function(){t.off("keydown",m),c.off("keydown",m)})}if(i.on("resize",r),l.push(function(){i.off("resize",r)}),o.clickOutsideToClose){var u,g=t,f=function(e){u=e.target},p=function(e){u===g[0]&&e.target===g[0]&&(e.stopPropagation(),e.preventDefault(),s())};g.on("mousedown",f),g.on("mouseup",p),l.push(function(){g.off("mousedown",f),g.off("mouseup",p)})}o.deactivateListeners=function(){l.forEach(function(e){e()}),o.deactivateListeners=null}}function y(e,t,o){o.disableParentScroll&&(o.restoreScroll=n.disableScrollAround(t,o.parent)),o.hasBackdrop&&(o.backdrop=n.createBackdrop(e,"md-dialog-backdrop md-opaque"),r.enter(o.backdrop,o.parent)),o.hideBackdrop=function(e){o.backdrop&&(e?o.backdrop.remove():r.leave(o.backdrop)),o.disableParentScroll&&(o.restoreScroll(),delete o.restoreScroll),o.hideBackdrop=null}}function k(e,a){var r="alert"===a.$type?"alertdialog":"dialog",l=e.find("md-dialog-content"),d=e.attr("id"),s="dialogContent_"+(d||n.nextUid());e.attr({role:r,tabIndex:"-1"}),0===l.length&&(l=e,d&&(s=d)),l.attr("id",s),e.attr("aria-describedby",s),a.ariaLabel?t.expect(e,"aria-label",a.ariaLabel):t.expectAsync(e,"aria-label",function(){var e=l.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")}),o=document.createElement("div"),o.classList.add("md-dialog-focus-trap"),o.tabIndex=0,i=o.cloneNode(!1);var c=function(){e.focus()};o.addEventListener("focus",c),i.addEventListener("focus",c),e[0].parentNode.insertBefore(o,e[0]),e.after(i)}function $(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,i=0;i<t.length;i++)e===t[i]||x(t[i],["SCRIPT","STYLE"])||t[i].setAttribute("aria-hidden",o);n(e=e.parentNode)}}var o=!0;n(e[0]),t.unlockScreenReader=function(){o=!1,n(e[0]),t.unlockScreenReader=null}}function E(e,t){var o="fixed"==d.getComputedStyle(l[0].body).position,i=t.backdrop?d.getComputedStyle(t.backdrop[0]):null,a=i?Math.min(l[0].body.clientHeight,Math.ceil(Math.abs(parseInt(i.height,10)))):0,r={top:e.css("top"),height:e.css("height")};return e.css({top:(o?n.scrollTop(t.parent):0)+"px",height:a?a+"px":"100%"}),function(){e.css(r)}}function S(e,t){t.parent.append(e),t.reverseContainerStretch=E(e,t);var o=e.find("md-dialog"),i=n.dom.animator,a=i.calculateZoomToOrigin,r={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},l=i.toTransformCss(a(o,t.openFrom||t.origin)),d=i.toTransformCss("");return t.fullscreen&&o.addClass("md-dialog-fullscreen"),i.translate3d(o,l,d,r).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(r={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},l=d,d=i.toTransformCss(a(o,t.closeTo)),i.translate3d(o,l,d,r)):e(d=i.toTransformCss(a(o,t.origin)))},t.clearAnimate=function(){return delete t.clearAnimate,i.translate3d(o,d,i.toTransformCss(""),{})},!0})}function T(e,t){return t.reverseAnimate().then(function(){t.contentElement&&t.clearAnimate()})}function x(e,t){if(t.indexOf(e.nodeName)!==-1)return!0}return{hasBackdrop:!0,isolateScope:!0,onCompiling:g,onShow:p,onShowing:f,onRemove:h,clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,contentElement:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){function n(e){return t.autoWrap&&!/<\/md-dialog>/g.test(e)?"<md-dialog>"+(e||"")+"</md-dialog>":e||""}return'<div class="md-dialog-container" tabindex="-1">'+n(e)+"</div>"}}}var o,i;return t.$inject=["$mdDialog","$mdConstant"],n.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","contentElement"],options:n}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:t})}goog.provide("ngmaterial.components.dialog"),goog.require("ngmaterial.components.backdrop"),goog.require("ngmaterial.core"),angular.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",MdDialogDirective).provider("$mdDialog",MdDialogProvider),MdDialogDirective.$inject=["$$rAF","$mdTheming","$mdDialog"],MdDialogProvider.$inject=["$$interimElementProvider"],ngmaterial.components.dialog=angular.module("material.components.dialog");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.divider');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.divider');
goog.require('ngmaterial.core');
/**

@@ -46,2 +46,2 @@ * @ngdoc module

ng.material.components.divider = angular.module("material.components.divider");
ngmaterial.components.divider = angular.module("material.components.divider");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdDividerDirective(e){return{restrict:"E",link:e}}goog.provide("ng.material.components.divider"),goog.require("ng.material.core"),angular.module("material.components.divider",["material.core"]).directive("mdDivider",MdDividerDirective),MdDividerDirective.$inject=["$mdTheming"],ng.material.components.divider=angular.module("material.components.divider");
function MdDividerDirective(e){return{restrict:"E",link:e}}goog.provide("ngmaterial.components.divider"),goog.require("ngmaterial.core"),angular.module("material.components.divider",["material.core"]).directive("mdDivider",MdDividerDirective),MdDividerDirective.$inject=["$mdTheming"],ngmaterial.components.divider=angular.module("material.components.divider");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.fabActions');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.fabActions');
goog.require('ngmaterial.core');
(function() {

@@ -36,3 +36,3 @@ 'use strict';

*/
function MdFabActionsDirective() {
function MdFabActionsDirective($mdUtil) {
return {

@@ -46,8 +46,4 @@ restrict: 'E',

var hasNgRepeat = false;
var hasNgRepeat = $mdUtil.prefixer().hasAttribute(children, 'ng-repeat');
angular.forEach(['', 'data-', 'x-'], function(prefix) {
hasNgRepeat = hasNgRepeat || (children.attr(prefix + 'ng-repeat') ? true : false);
});
// Support both ng-repeat and static content

@@ -63,5 +59,6 @@ if (hasNgRepeat) {

}
MdFabActionsDirective.$inject = ["$mdUtil"];
})();
ng.material.components.fabActions = angular.module("material.components.fabActions");
ngmaterial.components.fabActions = angular.module("material.components.fabActions");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
goog.provide("ng.material.components.fabActions"),goog.require("ng.material.core"),function(){"use strict";function a(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(a,t){var e=a.children(),n=!1;angular.forEach(["","data-","x-"],function(a){n=n||!!e.attr(a+"ng-repeat")}),n?e.addClass("md-fab-action-item"):e.wrap('<div class="md-fab-action-item">')}}}angular.module("material.components.fabActions",["material.core"]).directive("mdFabActions",a)}(),ng.material.components.fabActions=angular.module("material.components.fabActions");
goog.provide("ngmaterial.components.fabActions"),goog.require("ngmaterial.core"),function(){"use strict";function a(a){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(e,t){var i=e.children(),n=a.prefixer().hasAttribute(i,"ng-repeat");n?i.addClass("md-fab-action-item"):i.wrap('<div class="md-fab-action-item">')}}}angular.module("material.components.fabActions",["material.core"]).directive("mdFabActions",a),a.$inject=["$mdUtil"]}(),ngmaterial.components.fabActions=angular.module("material.components.fabActions");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.fabShared');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.fabShared');
goog.require('ngmaterial.core');
(function() {

@@ -56,3 +56,3 @@ 'use strict';

// Add an animations waiting class so we know not to run
$element.addClass('_md-animations-waiting');
$element.addClass('md-animations-waiting');
}

@@ -157,3 +157,3 @@

// Remove the waiting class
$element.removeClass('_md-animations-waiting');
$element.removeClass('md-animations-waiting');
});

@@ -329,3 +329,2 @@ }

'material.components.fabShared',
'material.components.fabTrigger',
'material.components.fabActions'

@@ -436,3 +435,3 @@ ])

// Don't run if we are still waiting and we are not ready
if (element.hasClass('_md-animations-waiting') && !element.hasClass('_md-animations-ready')) {
if (element.hasClass('md-animations-waiting') && !element.hasClass('_md-animations-ready')) {
return;

@@ -569,2 +568,2 @@ }

ng.material.components.fabShared = angular.module("material.components.fabShared");
ngmaterial.components.fabShared = angular.module("material.components.fabShared");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
goog.provide("ng.material.components.fabShared"),goog.require("ng.material.core"),function(){"use strict";function n(n,e,t,a,i,r){function o(){I.direction=I.direction||"down",I.isOpen=I.isOpen||!1,s(),e.addClass("_md-animations-waiting")}function c(){var t=["click","focusin","focusout"];angular.forEach(t,function(n){e.on(n,l)}),n.$on("$destroy",function(){angular.forEach(t,function(n){e.off(n,l)}),m()})}function l(n){"click"==n.type&&x(n),"focusout"!=n.type||k||(k=r(function(){I.close()},100,!1)),"focusin"==n.type&&k&&(r.cancel(k),k=null)}function s(){I.currentActionIndex=-1}function u(){n.$watch("vm.direction",function(n,a){t.removeClass(e,"md-"+a),t.addClass(e,"md-"+n),s()});var a,i;n.$watch("vm.isOpen",function(n){s(),a&&i||(a=$(),i=D()),n?f():m();var r=n?"md-is-open":"",o=n?"":"md-is-open";a.attr("aria-haspopup",!0),a.attr("aria-expanded",n),i.attr("aria-hidden",!n),t.setClass(e,r,o)})}function d(){e[0].scrollHeight>0?t.addClass(e,"_md-animations-ready").then(function(){e.removeClass("_md-animations-waiting")}):10>_&&(r(d,100),_+=1)}function f(){e.on("keydown",p),a.nextTick(function(){angular.element(document).on("click touchend",g)})}function m(){e.off("keydown",p),angular.element(document).off("click touchend",g)}function g(n){if(n.target){var e=a.getClosest(n.target,"md-fab-trigger"),t=a.getClosest(n.target,"md-fab-actions");e||t||I.close()}}function p(n){switch(n.which){case i.KEY_CODE.ESCAPE:return I.close(),n.preventDefault(),!1;case i.KEY_CODE.LEFT_ARROW:return y(n),!1;case i.KEY_CODE.UP_ARROW:return A(n),!1;case i.KEY_CODE.RIGHT_ARROW:return O(n),!1;case i.KEY_CODE.DOWN_ARROW:return S(n),!1}}function h(n){b(n,-1)}function v(n){b(n,1)}function b(n,e){var t=C();I.currentActionIndex=I.currentActionIndex+e,I.currentActionIndex=Math.min(t.length-1,I.currentActionIndex),I.currentActionIndex=Math.max(0,I.currentActionIndex);var a=angular.element(t[I.currentActionIndex]).children()[0];angular.element(a).attr("tabindex",0),a.focus(),n.preventDefault(),n.stopImmediatePropagation()}function C(){var n=D()[0].querySelectorAll(".md-fab-action-item");return angular.forEach(n,function(n){angular.element(angular.element(n).children()[0]).attr("tabindex",-1)}),n}function y(n){"left"===I.direction?v(n):h(n)}function A(n){"down"===I.direction?h(n):v(n)}function O(n){"left"===I.direction?h(n):v(n)}function S(n){"up"===I.direction?h(n):v(n)}function w(n){return a.getClosest(n,"md-fab-trigger")}function E(n){return a.getClosest(n,"md-fab-actions")}function x(n){w(n.target)&&I.toggle(),E(n.target)&&I.close()}function $(){return e.find("md-fab-trigger")}function D(){return e.find("md-fab-actions")}var I=this;I.open=function(){n.$evalAsync("vm.isOpen = true")},I.close=function(){n.$evalAsync("vm.isOpen = false"),e.find("md-fab-trigger")[0].focus()},I.toggle=function(){n.$evalAsync("vm.isOpen = !vm.isOpen")},o(),c(),u();var _=0;d();var k}angular.module("material.components.fabShared",["material.core"]).controller("MdFabController",n),n.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"]}(),function(){"use strict";function n(){function n(n,e){e.prepend('<div class="_md-css-variables"></div>')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:n}}function e(n){function e(e){n(e,a,!1)}function t(n){if(!n.hasClass("_md-animations-waiting")||n.hasClass("_md-animations-ready")){var e=n[0],t=n.controller("mdFabSpeedDial"),a=e.querySelectorAll(".md-fab-action-item"),i=e.querySelector("md-fab-trigger"),r=e.querySelector("._md-css-variables"),o=parseInt(window.getComputedStyle(r).zIndex);angular.forEach(a,function(n,e){var t=n.style;t.transform=t.webkitTransform="",t.transitionDelay="",t.opacity=1,t.zIndex=a.length-e+o}),i.style.zIndex=o+a.length+1,t.isOpen||angular.forEach(a,function(n,e){var a,r,o=n.style,c=(i.clientHeight-n.clientHeight)/2,l=(i.clientWidth-n.clientWidth)/2;switch(t.direction){case"up":a=n.scrollHeight*(e+1)+c,r="Y";break;case"down":a=-(n.scrollHeight*(e+1)+c),r="Y";break;case"left":a=n.scrollWidth*(e+1)+l,r="X";break;case"right":a=-(n.scrollWidth*(e+1)+l),r="X"}var s="translate"+r+"("+a+"px)";o.transform=o.webkitTransform=s})}}return{addClass:function(n,a,i){n.hasClass("md-fling")?(t(n),e(i)):i()},removeClass:function(n,a,i){t(n),e(i)}}}function t(n){function e(e){n(e,a,!1)}function t(n){var e=n[0],t=n.controller("mdFabSpeedDial"),a=e.querySelectorAll(".md-fab-action-item"),r=e.querySelector("._md-css-variables"),o=parseInt(window.getComputedStyle(r).zIndex);angular.forEach(a,function(n,e){var r=n.style,c=e*i;r.opacity=t.isOpen?1:0,r.transform=r.webkitTransform=t.isOpen?"scale(1)":"scale(0)",r.transitionDelay=(t.isOpen?c:a.length-c)+"ms",r.zIndex=a.length-e+o})}var i=65;return{addClass:function(n,a,i){t(n),e(i)},removeClass:function(n,a,i){t(n),e(i)}}}var a=300;angular.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabSpeedDial",n).animation(".md-fling",e).animation(".md-scale",t).service("mdFabSpeedDialFlingAnimation",e).service("mdFabSpeedDialScaleAnimation",t),e.$inject=["$timeout"],t.$inject=["$timeout"]}(),ng.material.components.fabShared=angular.module("material.components.fabShared");
goog.provide("ngmaterial.components.fabShared"),goog.require("ngmaterial.core"),function(){"use strict";function n(n,e,t,a,i,o){function r(){I.direction=I.direction||"down",I.isOpen=I.isOpen||!1,s(),e.addClass("md-animations-waiting")}function c(){var t=["click","focusin","focusout"];angular.forEach(t,function(n){e.on(n,l)}),n.$on("$destroy",function(){angular.forEach(t,function(n){e.off(n,l)}),m()})}function l(n){"click"==n.type&&x(n),"focusout"!=n.type||_||(_=o(function(){I.close()},100,!1)),"focusin"==n.type&&_&&(o.cancel(_),_=null)}function s(){I.currentActionIndex=-1}function u(){n.$watch("vm.direction",function(n,a){t.removeClass(e,"md-"+a),t.addClass(e,"md-"+n),s()});var a,i;n.$watch("vm.isOpen",function(n){s(),a&&i||(a=$(),i=D()),n?f():m();var o=n?"md-is-open":"",r=n?"":"md-is-open";a.attr("aria-haspopup",!0),a.attr("aria-expanded",n),i.attr("aria-hidden",!n),t.setClass(e,o,r)})}function d(){e[0].scrollHeight>0?t.addClass(e,"_md-animations-ready").then(function(){e.removeClass("md-animations-waiting")}):k<10&&(o(d,100),k+=1)}function f(){e.on("keydown",p),a.nextTick(function(){angular.element(document).on("click touchend",g)})}function m(){e.off("keydown",p),angular.element(document).off("click touchend",g)}function g(n){if(n.target){var e=a.getClosest(n.target,"md-fab-trigger"),t=a.getClosest(n.target,"md-fab-actions");e||t||I.close()}}function p(n){switch(n.which){case i.KEY_CODE.ESCAPE:return I.close(),n.preventDefault(),!1;case i.KEY_CODE.LEFT_ARROW:return y(n),!1;case i.KEY_CODE.UP_ARROW:return A(n),!1;case i.KEY_CODE.RIGHT_ARROW:return O(n),!1;case i.KEY_CODE.DOWN_ARROW:return S(n),!1}}function h(n){b(n,-1)}function v(n){b(n,1)}function b(n,e){var t=C();I.currentActionIndex=I.currentActionIndex+e,I.currentActionIndex=Math.min(t.length-1,I.currentActionIndex),I.currentActionIndex=Math.max(0,I.currentActionIndex);var a=angular.element(t[I.currentActionIndex]).children()[0];angular.element(a).attr("tabindex",0),a.focus(),n.preventDefault(),n.stopImmediatePropagation()}function C(){var n=D()[0].querySelectorAll(".md-fab-action-item");return angular.forEach(n,function(n){angular.element(angular.element(n).children()[0]).attr("tabindex",-1)}),n}function y(n){"left"===I.direction?v(n):h(n)}function A(n){"down"===I.direction?h(n):v(n)}function O(n){"left"===I.direction?h(n):v(n)}function S(n){"up"===I.direction?h(n):v(n)}function w(n){return a.getClosest(n,"md-fab-trigger")}function E(n){return a.getClosest(n,"md-fab-actions")}function x(n){w(n.target)&&I.toggle(),E(n.target)&&I.close()}function $(){return e.find("md-fab-trigger")}function D(){return e.find("md-fab-actions")}var I=this;I.open=function(){n.$evalAsync("vm.isOpen = true")},I.close=function(){n.$evalAsync("vm.isOpen = false"),e.find("md-fab-trigger")[0].focus()},I.toggle=function(){n.$evalAsync("vm.isOpen = !vm.isOpen")},r(),c(),u();var k=0;d();var _}angular.module("material.components.fabShared",["material.core"]).controller("MdFabController",n),n.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"]}(),function(){"use strict";function n(){function n(n,e){e.prepend('<div class="_md-css-variables"></div>')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:n}}function e(n){function e(e){n(e,a,!1)}function t(n){if(!n.hasClass("md-animations-waiting")||n.hasClass("_md-animations-ready")){var e=n[0],t=n.controller("mdFabSpeedDial"),a=e.querySelectorAll(".md-fab-action-item"),i=e.querySelector("md-fab-trigger"),o=e.querySelector("._md-css-variables"),r=parseInt(window.getComputedStyle(o).zIndex);angular.forEach(a,function(n,e){var t=n.style;t.transform=t.webkitTransform="",t.transitionDelay="",t.opacity=1,t.zIndex=a.length-e+r}),i.style.zIndex=r+a.length+1,t.isOpen||angular.forEach(a,function(n,e){var a,o,r=n.style,c=(i.clientHeight-n.clientHeight)/2,l=(i.clientWidth-n.clientWidth)/2;switch(t.direction){case"up":a=n.scrollHeight*(e+1)+c,o="Y";break;case"down":a=-(n.scrollHeight*(e+1)+c),o="Y";break;case"left":a=n.scrollWidth*(e+1)+l,o="X";break;case"right":a=-(n.scrollWidth*(e+1)+l),o="X"}var s="translate"+o+"("+a+"px)";r.transform=r.webkitTransform=s})}}return{addClass:function(n,a,i){n.hasClass("md-fling")?(t(n),e(i)):i()},removeClass:function(n,a,i){t(n),e(i)}}}function t(n){function e(e){n(e,a,!1)}function t(n){var e=n[0],t=n.controller("mdFabSpeedDial"),a=e.querySelectorAll(".md-fab-action-item"),o=e.querySelector("._md-css-variables"),r=parseInt(window.getComputedStyle(o).zIndex);angular.forEach(a,function(n,e){var o=n.style,c=e*i;o.opacity=t.isOpen?1:0,o.transform=o.webkitTransform=t.isOpen?"scale(1)":"scale(0)",o.transitionDelay=(t.isOpen?c:a.length-c)+"ms",o.zIndex=a.length-e+r})}var i=65;return{addClass:function(n,a,i){t(n),e(i)},removeClass:function(n,a,i){t(n),e(i)}}}var a=300;angular.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",n).animation(".md-fling",e).animation(".md-scale",t).service("mdFabSpeedDialFlingAnimation",e).service("mdFabSpeedDialScaleAnimation",t),e.$inject=["$timeout"],t.$inject=["$timeout"]}(),ngmaterial.components.fabShared=angular.module("material.components.fabShared");

@@ -5,9 +5,8 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.fabToolbar');
goog.require('ng.material.components.fabActions');
goog.require('ng.material.components.fabShared');
goog.require('ng.material.components.fabTrigger');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.fabToolbar');
goog.require('ngmaterial.components.fabActions');
goog.require('ngmaterial.components.fabShared');
goog.require('ngmaterial.core');
(function() {

@@ -25,3 +24,2 @@ 'use strict';

'material.components.fabShared',
'material.components.fabTrigger',
'material.components.fabActions'

@@ -92,4 +90,4 @@ ])

transclude: true,
template: '<div class="_md-fab-toolbar-wrapper">' +
' <div class="_md-fab-toolbar-content" ng-transclude></div>' +
template: '<div class="md-fab-toolbar-wrapper">' +
' <div class="md-fab-toolbar-content" ng-transclude></div>' +
'</div>',

@@ -115,3 +113,3 @@

element.find('md-fab-trigger').find('button')
.prepend('<div class="_md-fab-toolbar-background"></div>');
.prepend('<div class="md-fab-toolbar-background"></div>');
}

@@ -132,3 +130,3 @@ }

// Grab the relevant child elements
var backgroundElement = el.querySelector('._md-fab-toolbar-background');
var backgroundElement = el.querySelector('.md-fab-toolbar-background');
var triggerElement = el.querySelector('md-fab-trigger button');

@@ -216,2 +214,2 @@ var toolbarElement = el.querySelector('md-toolbar');

ng.material.components.fabToolbar = angular.module("material.components.fabToolbar");
ngmaterial.components.fabToolbar = angular.module("material.components.fabToolbar");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
goog.provide("ng.material.components.fabToolbar"),goog.require("ng.material.components.fabActions"),goog.require("ng.material.components.fabShared"),goog.require("ng.material.components.fabTrigger"),goog.require("ng.material.core"),function(){"use strict";function t(){function t(t,e,o){e.addClass("md-fab-toolbar"),e.find("md-fab-trigger").find("button").prepend('<div class="_md-fab-toolbar-background"></div>')}return{restrict:"E",transclude:!0,template:'<div class="_md-fab-toolbar-wrapper"> <div class="_md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:t}}function e(){function t(t,e,o){if(e){var r=t[0],a=t.controller("mdFabToolbar"),n=r.querySelector("._md-fab-toolbar-background"),l=r.querySelector("md-fab-trigger button"),i=r.querySelector("md-toolbar"),s=r.querySelector("md-fab-trigger button md-icon"),d=t.find("md-fab-actions").children();if(l&&n){var m=window.getComputedStyle(l).getPropertyValue("background-color"),c=r.offsetWidth,f=(r.offsetHeight,2*(c/l.offsetWidth));n.style.backgroundColor=m,n.style.borderRadius=c+"px",a.isOpen?(i.style.pointerEvents="inherit",n.style.width=l.offsetWidth+"px",n.style.height=l.offsetHeight+"px",n.style.transform="scale("+f+")",n.style.transitionDelay="0ms",s&&(s.style.transitionDelay=".3s"),angular.forEach(d,function(t,e){t.style.transitionDelay=25*(d.length-e)+"ms"})):(i.style.pointerEvents="none",n.style.transform="scale(1)",n.style.top="0",t.hasClass("md-right")&&(n.style.left="0",n.style.right=null),t.hasClass("md-left")&&(n.style.right="0",n.style.left=null),n.style.transitionDelay="200ms",s&&(s.style.transitionDelay="0ms"),angular.forEach(d,function(t,e){t.style.transitionDelay=200+25*e+"ms"}))}}}return{addClass:function(e,o,r){t(e,o,r),r()},removeClass:function(e,o,r){t(e,o,r),r()}}}angular.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabToolbar",t).animation(".md-fab-toolbar",e).service("mdFabToolbarAnimation",e)}(),ng.material.components.fabToolbar=angular.module("material.components.fabToolbar");
goog.provide("ngmaterial.components.fabToolbar"),goog.require("ngmaterial.components.fabActions"),goog.require("ngmaterial.components.fabShared"),goog.require("ngmaterial.core"),function(){"use strict";function t(){function t(t,e,o){e.addClass("md-fab-toolbar"),e.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:t}}function e(){function t(t,e,o){if(e){var a=t[0],r=t.controller("mdFabToolbar"),n=a.querySelector(".md-fab-toolbar-background"),l=a.querySelector("md-fab-trigger button"),i=a.querySelector("md-toolbar"),s=a.querySelector("md-fab-trigger button md-icon"),d=t.find("md-fab-actions").children();if(l&&n){var c=window.getComputedStyle(l).getPropertyValue("background-color"),m=a.offsetWidth,f=(a.offsetHeight,2*(m/l.offsetWidth));n.style.backgroundColor=c,n.style.borderRadius=m+"px",r.isOpen?(i.style.pointerEvents="inherit",n.style.width=l.offsetWidth+"px",n.style.height=l.offsetHeight+"px",n.style.transform="scale("+f+")",n.style.transitionDelay="0ms",s&&(s.style.transitionDelay=".3s"),angular.forEach(d,function(t,e){t.style.transitionDelay=25*(d.length-e)+"ms"})):(i.style.pointerEvents="none",n.style.transform="scale(1)",n.style.top="0",t.hasClass("md-right")&&(n.style.left="0",n.style.right=null),t.hasClass("md-left")&&(n.style.right="0",n.style.left=null),n.style.transitionDelay="200ms",s&&(s.style.transitionDelay="0ms"),angular.forEach(d,function(t,e){t.style.transitionDelay=200+25*e+"ms"}))}}}return{addClass:function(e,o,a){t(e,o,a),a()},removeClass:function(e,o,a){t(e,o,a),a()}}}angular.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",t).animation(".md-fab-toolbar",e).service("mdFabToolbarAnimation",e)}(),ngmaterial.components.fabToolbar=angular.module("material.components.fabToolbar");

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-26a5fb8
*/

@@ -8,0 +8,0 @@ goog.provide('ng.material.components.fabTrigger');

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-26a5fb8
*/
goog.provide("ng.material.components.fabTrigger"),goog.require("ng.material.core"),function(){"use strict";function r(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"]}}angular.module("material.components.fabTrigger",["material.core"]).directive("mdFabTrigger",r)}(),ng.material.components.fabTrigger=angular.module("material.components.fabTrigger");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.gridList');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.gridList');
goog.require('ngmaterial.core');
/**

@@ -775,2 +775,2 @@ * @ngdoc module

ng.material.components.gridList = angular.module("material.components.gridList");
ngmaterial.components.gridList = angular.module("material.components.gridList");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function GridListDirective(t,e,i,r){function n(n,o,a,u){function l(){for(var t in e.MEDIA)r(t),r.getQuery(e.MEDIA[t]).addListener(G);return r.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],a,d)}function s(){u.layoutDelegate=angular.noop,T();for(var t in e.MEDIA)r.getQuery(e.MEDIA[t]).removeListener(G)}function d(t){null==t?u.invalidateLayout():r(t)&&u.invalidateLayout()}function c(t){var e=p(),r={tileSpans:h(e),colCount:v(),rowMode:$(),rowHeight:w(),gutter:y()};if(t||!angular.equals(r,D)){var a=i(r.colCount,r.tileSpans,e).map(function(t,i){return{grid:{element:o,style:m(r.colCount,i,r.gutter,r.rowMode,r.rowHeight)},tiles:t.map(function(t,n){return{element:angular.element(e[n]),style:g(t.position,t.spans,r.colCount,i,r.gutter,r.rowMode,r.rowHeight)}})}}).reflow().performance();n.mdOnLayout({$event:{performance:a}}),D=r}}function f(t){return b+t+I}function g(t,e,i,r,n,o,a){var u=1/i*100,l=(i-1)/i,s=C({share:u,gutterShare:l,gutter:n}),d={left:x({unit:s,offset:t.col,gutter:n}),width:M({unit:s,span:e.col,gutter:n}),paddingTop:"",marginTop:"",top:"",height:""};switch(o){case"fixed":d.top=x({unit:a,offset:t.row,gutter:n}),d.height=M({unit:a,span:e.row,gutter:n});break;case"ratio":var c=u/a,f=C({share:c,gutterShare:l,gutter:n});d.paddingTop=M({unit:f,span:e.row,gutter:n}),d.marginTop=x({unit:f,offset:t.row,gutter:n});break;case"fit":var g=(r-1)/r,c=1/r*100,f=C({share:c,gutterShare:g,gutter:n});d.top=x({unit:f,offset:t.row,gutter:n}),d.height=M({unit:f,span:e.row,gutter:n})}return d}function m(t,e,i,r,n){var o={};switch(r){case"fixed":o.height=M({unit:n,span:e,gutter:i}),o.paddingBottom="";break;case"ratio":var a=1===t?0:(t-1)/t,u=1/t*100,l=u*(1/n),s=C({share:l,gutterShare:a,gutter:i});o.height="",o.paddingBottom=M({unit:s,span:e,gutter:i});break;case"fit":}return o}function p(){return[].filter.call(o.children(),function(t){return"MD-GRID-TILE"==t.tagName&&!t.$$mdDestroyed})}function h(t){return[].map.call(t,function(t){var e=angular.element(t).controller("mdGridTile");return{row:parseInt(r.getResponsiveAttribute(e.$attrs,"md-rowspan"),10)||1,col:parseInt(r.getResponsiveAttribute(e.$attrs,"md-colspan"),10)||1}})}function v(){var t=parseInt(r.getResponsiveAttribute(a,"md-cols"),10);if(isNaN(t))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return t}function y(){return L(r.getResponsiveAttribute(a,"md-gutter")||1)}function w(){var t=r.getResponsiveAttribute(a,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";switch($()){case"fixed":return L(t);case"ratio":var e=t.split(":");return parseFloat(e[0])/parseFloat(e[1]);case"fit":return 0}}function $(){var t=r.getResponsiveAttribute(a,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";return"fit"==t?"fit":-1!==t.indexOf(":")?"ratio":"fixed"}function L(t){return/\D$/.test(t)?t:t+"px"}o.addClass("_md"),o.attr("role","list"),u.layoutDelegate=c;var G=angular.bind(u,u.invalidateLayout),T=l();n.$on("$destroy",s);var D,b=t.startSymbol(),I=t.endSymbol(),C=t(f("share")+"% - ("+f("gutter")+" * "+f("gutterShare")+")"),x=t("calc(("+f("unit")+" + "+f("gutter")+") * "+f("offset")+")"),M=t("calc(("+f("unit")+") * "+f("span")+" + ("+f("span")+" - 1) * "+f("gutter")+")")}return{restrict:"E",controller:GridListController,scope:{mdOnLayout:"&"},link:n}}function GridListController(t){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=t.nextTick,this.layoutDelegate=angular.noop}function GridLayoutFactory(t){function e(e,i){var o,a,u,l,s,d;return l=t.time(function(){a=r(e,i)}),o={layoutInfo:function(){return a},map:function(e){return s=t.time(function(){var t=o.layoutInfo();u=e(t.positioning,t.rowCount)}),o},reflow:function(e){return d=t.time(function(){var t=e||n;t(u.grid,u.tiles)}),o},performance:function(){return{tileCount:i.length,layoutTime:l,mapTime:s,reflowTime:d,totalTime:l+s+d}}}}function i(t,e){t.element.css(t.style),e.forEach(function(t){t.element.css(t.style)})}function r(t,e){function i(e,i){if(e.col>t)throw"md-grid-list: Tile at position "+i+" has a colspan ("+e.col+") that exceeds the column count ("+t+")";for(var a=0,d=0;d-a<e.col;)u>=t?r():(a=s.indexOf(0,u),-1!==a&&-1!==(d=o(a+1))?u=d+1:(a=d=0,r()));return n(a,e.col,e.row),u=a+e.col,{col:a,row:l}}function r(){u=0,l++,n(0,t,-1)}function n(t,e,i){for(var r=t;t+e>r;r++)s[r]=Math.max(s[r]+i,0)}function o(t){var e;for(e=t;e<s.length;e++)if(0!==s[e])return e;return e===s.length?e:void 0}function a(){for(var e=[],i=0;t>i;i++)e.push(0);return e}var u=0,l=0,s=a();return{positioning:e.map(function(t,e){return{spans:t,position:i(t,e)}}),rowCount:l+Math.max.apply(Math,s)}}var n=i;return e.animateWith=function(t){n=angular.isFunction(t)?t:i},e}function GridTileDirective(t){function e(e,i,r,n){i.attr("role","listitem");var o=t.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,angular.bind(n,n.invalidateLayout));n.invalidateTiles(),e.$on("$destroy",function(){i[0].$$mdDestroyed=!0,o(),n.invalidateLayout()}),angular.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(t,e){t!==e&&n.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(t){this.$attrs=t}],link:e}}function GridTileCaptionDirective(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}goog.provide("ng.material.components.gridList"),goog.require("ng.material.core"),angular.module("material.components.gridList",["material.core"]).directive("mdGridList",GridListDirective).directive("mdGridTile",GridTileDirective).directive("mdGridTileFooter",GridTileCaptionDirective).directive("mdGridTileHeader",GridTileCaptionDirective).factory("$mdGridLayout",GridLayoutFactory),GridListDirective.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],GridListController.$inject=["$mdUtil"],GridListController.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(angular.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},GridLayoutFactory.$inject=["$mdUtil"],GridTileDirective.$inject=["$mdMedia"],ng.material.components.gridList=angular.module("material.components.gridList");
function GridListDirective(t,e,i,r){function n(n,o,a,u){function l(){for(var t in e.MEDIA)r(t),r.getQuery(e.MEDIA[t]).addListener(G);return r.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],a,d)}function s(){u.layoutDelegate=angular.noop,T();for(var t in e.MEDIA)r.getQuery(e.MEDIA[t]).removeListener(G)}function d(t){null==t?u.invalidateLayout():r(t)&&u.invalidateLayout()}function c(t){var e=p(),r={tileSpans:h(e),colCount:v(),rowMode:$(),rowHeight:w(),gutter:y()};if(t||!angular.equals(r,D)){var a=i(r.colCount,r.tileSpans,e).map(function(t,i){return{grid:{element:o,style:m(r.colCount,i,r.gutter,r.rowMode,r.rowHeight)},tiles:t.map(function(t,n){return{element:angular.element(e[n]),style:g(t.position,t.spans,r.colCount,i,r.gutter,r.rowMode,r.rowHeight)}})}}).reflow().performance();n.mdOnLayout({$event:{performance:a}}),D=r}}function f(t){return b+t+I}function g(t,e,i,r,n,o,a){var u=1/i*100,l=(i-1)/i,s=C({share:u,gutterShare:l,gutter:n}),d={left:x({unit:s,offset:t.col,gutter:n}),width:M({unit:s,span:e.col,gutter:n}),paddingTop:"",marginTop:"",top:"",height:""};switch(o){case"fixed":d.top=x({unit:a,offset:t.row,gutter:n}),d.height=M({unit:a,span:e.row,gutter:n});break;case"ratio":var c=u/a,f=C({share:c,gutterShare:l,gutter:n});d.paddingTop=M({unit:f,span:e.row,gutter:n}),d.marginTop=x({unit:f,offset:t.row,gutter:n});break;case"fit":var g=(r-1)/r,c=1/r*100,f=C({share:c,gutterShare:g,gutter:n});d.top=x({unit:f,offset:t.row,gutter:n}),d.height=M({unit:f,span:e.row,gutter:n})}return d}function m(t,e,i,r,n){var o={};switch(r){case"fixed":o.height=M({unit:n,span:e,gutter:i}),o.paddingBottom="";break;case"ratio":var a=1===t?0:(t-1)/t,u=1/t*100,l=u*(1/n),s=C({share:l,gutterShare:a,gutter:i});o.height="",o.paddingBottom=M({unit:s,span:e,gutter:i});break;case"fit":}return o}function p(){return[].filter.call(o.children(),function(t){return"MD-GRID-TILE"==t.tagName&&!t.$$mdDestroyed})}function h(t){return[].map.call(t,function(t){var e=angular.element(t).controller("mdGridTile");return{row:parseInt(r.getResponsiveAttribute(e.$attrs,"md-rowspan"),10)||1,col:parseInt(r.getResponsiveAttribute(e.$attrs,"md-colspan"),10)||1}})}function v(){var t=parseInt(r.getResponsiveAttribute(a,"md-cols"),10);if(isNaN(t))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return t}function y(){return L(r.getResponsiveAttribute(a,"md-gutter")||1)}function w(){var t=r.getResponsiveAttribute(a,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";switch($()){case"fixed":return L(t);case"ratio":var e=t.split(":");return parseFloat(e[0])/parseFloat(e[1]);case"fit":return 0}}function $(){var t=r.getResponsiveAttribute(a,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";return"fit"==t?"fit":t.indexOf(":")!==-1?"ratio":"fixed"}function L(t){return/\D$/.test(t)?t:t+"px"}o.addClass("_md"),o.attr("role","list"),u.layoutDelegate=c;var G=angular.bind(u,u.invalidateLayout),T=l();n.$on("$destroy",s);var D,b=t.startSymbol(),I=t.endSymbol(),C=t(f("share")+"% - ("+f("gutter")+" * "+f("gutterShare")+")"),x=t("calc(("+f("unit")+" + "+f("gutter")+") * "+f("offset")+")"),M=t("calc(("+f("unit")+") * "+f("span")+" + ("+f("span")+" - 1) * "+f("gutter")+")")}return{restrict:"E",controller:GridListController,scope:{mdOnLayout:"&"},link:n}}function GridListController(t){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=t.nextTick,this.layoutDelegate=angular.noop}function GridLayoutFactory(t){function e(e,i){var o,a,u,l,s,d;return l=t.time(function(){a=r(e,i)}),o={layoutInfo:function(){return a},map:function(e){return s=t.time(function(){var t=o.layoutInfo();u=e(t.positioning,t.rowCount)}),o},reflow:function(e){return d=t.time(function(){var t=e||n;t(u.grid,u.tiles)}),o},performance:function(){return{tileCount:i.length,layoutTime:l,mapTime:s,reflowTime:d,totalTime:l+s+d}}}}function i(t,e){t.element.css(t.style),e.forEach(function(t){t.element.css(t.style)})}function r(t,e){function i(e,i){if(e.col>t)throw"md-grid-list: Tile at position "+i+" has a colspan ("+e.col+") that exceeds the column count ("+t+")";for(var a=0,d=0;d-a<e.col;)u>=t?r():(a=s.indexOf(0,u),a!==-1&&(d=o(a+1))!==-1?u=d+1:(a=d=0,r()));return n(a,e.col,e.row),u=a+e.col,{col:a,row:l}}function r(){u=0,l++,n(0,t,-1)}function n(t,e,i){for(var r=t;r<t+e;r++)s[r]=Math.max(s[r]+i,0)}function o(t){var e;for(e=t;e<s.length;e++)if(0!==s[e])return e;if(e===s.length)return e}function a(){for(var e=[],i=0;i<t;i++)e.push(0);return e}var u=0,l=0,s=a();return{positioning:e.map(function(t,e){return{spans:t,position:i(t,e)}}),rowCount:l+Math.max.apply(Math,s)}}var n=i;return e.animateWith=function(t){n=angular.isFunction(t)?t:i},e}function GridTileDirective(t){function e(e,i,r,n){i.attr("role","listitem");var o=t.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,angular.bind(n,n.invalidateLayout));n.invalidateTiles(),e.$on("$destroy",function(){i[0].$$mdDestroyed=!0,o(),n.invalidateLayout()}),angular.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(t,e){t!==e&&n.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(t){this.$attrs=t}],link:e}}function GridTileCaptionDirective(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}goog.provide("ngmaterial.components.gridList"),goog.require("ngmaterial.core"),angular.module("material.components.gridList",["material.core"]).directive("mdGridList",GridListDirective).directive("mdGridTile",GridTileDirective).directive("mdGridTileFooter",GridTileCaptionDirective).directive("mdGridTileHeader",GridTileCaptionDirective).factory("$mdGridLayout",GridLayoutFactory),GridListDirective.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],GridListController.$inject=["$mdUtil"],GridListController.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(angular.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},GridLayoutFactory.$inject=["$mdUtil"],GridTileDirective.$inject=["$mdMedia"],ngmaterial.components.gridList=angular.module("material.components.gridList");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.icon');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.icon');
goog.require('ngmaterial.core');
/**

@@ -205,5 +205,10 @@ * @ngdoc module

$mdTheming(element);
var lastFontIcon = attr.mdFontIcon;
var lastFontSet = $mdIcon.fontSet(attr.mdFontSet);
prepareForFontIcon();
attr.$observe('mdFontIcon', fontIconChanged);
attr.$observe('mdFontSet', fontIconChanged);
// Keep track of the content of the svg src so we can compare against it later to see if the

@@ -237,9 +242,2 @@ // attribute is static (and thus safe).

attr.$observe(attrName, function(attrVal) {
// If using svg-src and the value is static (i.e., is exactly equal to the compile-time
// `md-svg-src` value), then it is implicitly trusted.
if (!isInlineSvg(attrVal) && attrVal === originalSvgSrc) {
attrVal = $sce.trustAsUrl(attrVal);
}
element.empty();

@@ -249,5 +247,5 @@ if (attrVal) {

.then(function(svg) {
element.empty();
element.append(svg);
});
element.empty();
element.append(svg);
});
}

@@ -274,21 +272,40 @@

}
element.addClass($mdIcon.fontSet(attr.mdFontSet));
element.addClass(lastFontSet);
}
}
}
/**
* Gets whether the given svg src is an inline ("data:" style) SVG.
* @param {string} svgSrc The svg src.
* @returns {boolean} Whether the src is an inline SVG.
*/
function isInlineSvg(svgSrc) {
var dataUrlRegex = /^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;
return dataUrlRegex.test(svgSrc);
function fontIconChanged() {
if (!attr.mdSvgIcon && !attr.mdSvgSrc) {
if (attr.mdFontIcon) {
element.removeClass(lastFontIcon);
element.addClass(attr.mdFontIcon);
lastFontIcon = attr.mdFontIcon;
}
var fontSet = $mdIcon.fontSet(attr.mdFontSet);
if (lastFontSet !== fontSet) {
element.removeClass(lastFontSet);
element.addClass(fontSet);
lastFontSet = fontSet;
}
}
}
}
}
angular
.module('material.components.icon')
.provider('$mdIcon', MdIconProvider);
angular
.module('material.components.icon')
.constant('$$mdSvgRegistry', {
'mdTabsArrow': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=',
'mdClose': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=',
'mdCancel': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==',
'mdMenu': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+',
'mdToggleArrow': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==',
'mdCalendar': 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg=='
})
.provider('$mdIcon', MdIconProvider);

@@ -312,2 +329,19 @@ /**

*
* The `$templateRequest` service expects the icons source to be loaded over trusted URLs.<br/>
* This means, when loading icons from an external URL, you have to trust the URL in the `$sceDelegateProvider`.
*
* <hljs lang="js">
* app.config(function($sceDelegateProvider) {
* $sceDelegateProvider.resourceUrlWhitelist([
* // Adding 'self' to the whitelist, will allow requests from the current origin.
* 'self',
* // Using double asterisks here, will allow all URLs to load.
* // We recommend to only specify the given domain you want to allow.
* '**'
* ]);
* });
* </hljs>
*
* Read more about the [$sceDelegateProvider](https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider).
*
* **Notice:** Most font-icons libraries do not support ligatures (for example `fontawesome`).<br/>

@@ -610,46 +644,3 @@ * In such cases you are not able to use the icon's ligature name - Like so:

preloadIcons: function($templateCache) {
var iconProvider = this;
var svgRegistry = [
{
id: 'md-tabs-arrow',
url: 'md-tabs-arrow.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g></svg>'
},
{
id: 'md-close',
url: 'md-close.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z"/></g></svg>'
},
{
id: 'md-cancel',
url: 'md-cancel.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm5 13.59l-1.41 1.41-3.59-3.59-3.59 3.59-1.41-1.41 3.59-3.59-3.59-3.59 1.41-1.41 3.59 3.59 3.59-3.59 1.41 1.41-3.59 3.59 3.59 3.59z"/></g></svg>'
},
{
id: 'md-menu',
url: 'md-menu.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" /></svg>'
},
{
id: 'md-toggle-arrow',
url: 'md-toggle-arrow-svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 48 48"><path d="M24 16l-12 12 2.83 2.83 9.17-9.17 9.17 9.17 2.83-2.83z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>'
},
{
id: 'md-calendar',
url: 'md-calendar.svg',
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg>'
}
];
svgRegistry.forEach(function(asset) {
iconProvider.icon(asset.id, asset.url);
$templateCache.put(asset.url, asset.svg);
});
},
$get: ['$templateRequest', '$q', '$log', '$templateCache', '$mdUtil', '$sce', function($templateRequest, $q, $log, $templateCache, $mdUtil, $sce) {
this.preloadIcons($templateCache);
$get: ['$templateRequest', '$q', '$log', '$mdUtil', '$sce', function($templateRequest, $q, $log, $mdUtil, $sce) {
return MdIconService(config, $templateRequest, $q, $log, $mdUtil, $sce);

@@ -685,3 +676,3 @@ }]

* created from the SVG markup in the SVG data file. If an error occurs (e.g. the icon cannot be found) the promise
* will get rejected.
* will get rejected.
*

@@ -715,2 +706,3 @@ * @usage

var iconCache = {};
var svgCache = {};
var urlRegex = /[-\w@:%\+.~#?&//=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&//=]*)?/i;

@@ -827,3 +819,3 @@ var dataUrlRegex = /^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;

var icon = set.querySelector('#' + iconName);
return !icon ? announceIdNotFound(id) : new Icon(icon, iconSetConfig);
return icon ? new Icon(icon, iconSetConfig) : announceIdNotFound(id);
}

@@ -863,4 +855,6 @@

extractSvg = function(response) {
var svg = angular.element('<div>').append(response).find('svg')[0];
resolve(svg);
if (!svgCache[url]) {
svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');
}
resolve(svgCache[url]);
};

@@ -889,3 +883,3 @@

if (el && el.tagName != 'svg') {
el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(el)[0];
el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(el.cloneNode(true))[0];
}

@@ -933,2 +927,2 @@

ng.material.components.icon = angular.module("material.components.icon");
ngmaterial.components.icon = angular.module("material.components.icon");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdIconDirective(t,e,n,i){function r(r,a,c){function u(){var t=a.parent();return t.attr("aria-label")||t.text()?!0:!(!t.parent().attr("aria-label")&&!t.parent().text())}function s(){c.mdSvgIcon||c.mdSvgSrc||(c.mdFontIcon&&a.addClass("md-font "+c.mdFontIcon),a.addClass(t.fontSet(c.mdFontSet)))}e(a),s();var l=a[0].getAttribute(c.$attr.mdSvgSrc),d=c.alt||c.mdFontIcon||c.mdSvgIcon||a.text(),g=c.$normalize(c.$attr.mdSvgIcon||c.$attr.mdSvgSrc||"");c["aria-label"]||(""===d||u()?a.text()||n.expect(a,"aria-hidden","true"):(n.expect(a,"aria-label",d),n.expect(a,"role","img"))),g&&c.$observe(g,function(e){o(e)||e!==l||(e=i.trustAsUrl(e)),a.empty(),e&&t(e).then(function(t){a.empty(),a.append(t)})})}function o(t){var e=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return e.test(t)}return{restrict:"E",link:r}}function MdIconProvider(){}function ConfigurationItem(t,e){this.url=t,this.viewBoxSize=e||config.defaultViewBoxSize}function MdIconService(t,e,n,i,r,o){function a(e){if(e=e||"",angular.isString(e)||(e=o.getTrustedUrl(e)),p[e])return n.when(u(p[e]));if(x.test(e)||w.test(e))return g(e).then(s(e));-1==e.indexOf(":")&&(e="$default:"+e);var i=t[e]?l:d;return i(e).then(s(e))}function c(e){var n=angular.isUndefined(e)||!(e&&e.length);if(n)return t.defaultFontSet;var i=e;return angular.forEach(t.fontSets,function(t){t.alias==e&&(i=t.fontSet||i)}),i}function u(t){var e=t.clone(),n="_cache"+r.nextUid();return e.id&&(e.id+=n),angular.forEach(e.querySelectorAll("[id]"),function(t){t.id+=n}),e}function s(e){return function(n){return p[e]=f(n)?n:new v(n,t[e]),p[e].clone()}}function l(e){var n=t[e];return g(n.url).then(function(t){return new v(t,n)})}function d(e){function r(t){var n=e.slice(e.lastIndexOf(":")+1),i=t.querySelector("#"+n);return i?new v(i,c):o(e)}function o(t){var e="icon "+t+" not found";return i.warn(e),n.reject(e||t)}var a=e.substring(0,e.lastIndexOf(":"))||"$default",c=t[a];return c?g(c.url).then(r):o(e)}function g(t){function r(t){var e=w.exec(t),i=/base64/i.test(t),r=i?window.atob(e[2]):e[2];return n.when(angular.element(r)[0])}function o(t){return n(function(n,r){var o=function(t){var e=angular.isString(t)?t:t.message||t.data||t.statusText;i.warn(e),r(t)},a=function(t){var e=angular.element("<div>").append(t).find("svg")[0];n(e)};e(t,!0).then(a,o)})}return w.test(t)?r(t):o(t)}function f(t){return angular.isDefined(t.element)&&angular.isDefined(t.config)}function v(t,e){t&&"svg"!=t.tagName&&(t=angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(t)[0]),t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=t,this.config=e,this.prepare()}function m(){var e=this.config?this.config.viewBoxSize:t.defaultViewBoxSize;angular.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+e+" "+e,focusable:!1},function(t,e){this.element.setAttribute(e,t)},this)}function h(){return this.element.cloneNode(!0)}var p={},x=/[-\w@:%\+.~#?&\/\/=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&\/\/=]*)?/i,w=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return v.prototype={clone:h,prepare:m},a.fontSet=c,a}goog.provide("ng.material.components.icon"),goog.require("ng.material.core"),angular.module("material.components.icon",["material.core"]),angular.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",mdIconDirective]),angular.module("material.components.icon").provider("$mdIcon",MdIconProvider);var config={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};MdIconProvider.prototype={icon:function(t,e,n){return-1==t.indexOf(":")&&(t="$default:"+t),config[t]=new ConfigurationItem(e,n),this},iconSet:function(t,e,n){return config[t]=new ConfigurationItem(e,n),this},defaultIconSet:function(t,e){var n="$default";return config[n]||(config[n]=new ConfigurationItem(t,e)),config[n].viewBoxSize=e||config.defaultViewBoxSize,this},defaultViewBoxSize:function(t){return config.defaultViewBoxSize=t,this},fontSet:function(t,e){return config.fontSets.push({alias:t,fontSet:e||t}),this},defaultFontSet:function(t){return config.defaultFontSet=t?t:"",this},defaultIconSize:function(t){return config.defaultIconSize=t,this},preloadIcons:function(t){var e=this,n=[{id:"md-tabs-arrow",url:"md-tabs-arrow.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g></svg>'},{id:"md-close",url:"md-close.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z"/></g></svg>'},{id:"md-cancel",url:"md-cancel.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm5 13.59l-1.41 1.41-3.59-3.59-3.59 3.59-1.41-1.41 3.59-3.59-3.59-3.59 1.41-1.41 3.59 3.59 3.59-3.59 1.41 1.41-3.59 3.59 3.59 3.59z"/></g></svg>'},{id:"md-menu",url:"md-menu.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" /></svg>'},{id:"md-toggle-arrow",url:"md-toggle-arrow-svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 48 48"><path d="M24 16l-12 12 2.83 2.83 9.17-9.17 9.17 9.17 2.83-2.83z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>'},{id:"md-calendar",url:"md-calendar.svg",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg>'}];n.forEach(function(n){e.icon(n.id,n.url),t.put(n.url,n.svg)})},$get:["$templateRequest","$q","$log","$templateCache","$mdUtil","$sce",function(t,e,n,i,r,o){return this.preloadIcons(i),MdIconService(config,t,e,n,r,o)}]},MdIconService.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"],ng.material.components.icon=angular.module("material.components.icon");
function mdIconDirective(e,t,n,i){function o(i,o,a){function r(){var e=o.parent();return!(!e.attr("aria-label")&&!e.text())||!(!e.parent().attr("aria-label")&&!e.parent().text())}function u(){a.mdSvgIcon||a.mdSvgSrc||(a.mdFontIcon&&o.addClass("md-font "+a.mdFontIcon),o.addClass(I))}function c(){if(!a.mdSvgIcon&&!a.mdSvgSrc){a.mdFontIcon&&(o.removeClass(g),o.addClass(a.mdFontIcon),g=a.mdFontIcon);var t=e.fontSet(a.mdFontSet);I!==t&&(o.removeClass(I),o.addClass(t),I=t)}}t(o);var g=a.mdFontIcon,I=e.fontSet(a.mdFontSet);u(),a.$observe("mdFontIcon",c),a.$observe("mdFontSet",c);var d=(o[0].getAttribute(a.$attr.mdSvgSrc),a.alt||a.mdFontIcon||a.mdSvgIcon||o.text()),l=a.$normalize(a.$attr.mdSvgIcon||a.$attr.mdSvgSrc||"");a["aria-label"]||(""===d||r()?o.text()||n.expect(o,"aria-hidden","true"):(n.expect(o,"aria-label",d),n.expect(o,"role","img"))),l&&a.$observe(l,function(t){o.empty(),t&&e(t).then(function(e){o.empty(),o.append(e)})})}return{restrict:"E",link:o}}function MdIconProvider(){}function ConfigurationItem(e,t){this.url=e,this.viewBoxSize=t||config.defaultViewBoxSize}function MdIconService(e,t,n,i,o,a){function r(t){if(t=t||"",angular.isString(t)||(t=a.getTrustedUrl(t)),M[t])return n.when(c(M[t]));if(v.test(t)||j.test(t))return l(t).then(g(t));t.indexOf(":")==-1&&(t="$default:"+t);var i=e[t]?I:d;return i(t).then(g(t))}function u(t){var n=angular.isUndefined(t)||!(t&&t.length);if(n)return e.defaultFontSet;var i=t;return angular.forEach(e.fontSets,function(e){e.alias==t&&(i=e.fontSet||i)}),i}function c(e){var t=e.clone(),n="_cache"+o.nextUid();return t.id&&(t.id+=n),angular.forEach(t.querySelectorAll("[id]"),function(e){e.id+=n}),t}function g(t){return function(n){return M[t]=m(n)?n:new s(n,e[t]),M[t].clone()}}function I(t){var n=e[t];return l(n.url).then(function(e){return new s(e,n)})}function d(t){function o(e){var n=t.slice(t.lastIndexOf(":")+1),i=e.querySelector("#"+n);return i?new s(i,u):a(t)}function a(e){var t="icon "+e+" not found";return i.warn(t),n.reject(t||e)}var r=t.substring(0,t.lastIndexOf(":"))||"$default",u=e[r];return u?l(u.url).then(o):a(t)}function l(e){function o(e){var t=j.exec(e),i=/base64/i.test(e),o=i?window.atob(t[2]):t[2];return n.when(angular.element(o)[0])}function a(e){return n(function(n,o){var a=function(e){var t=angular.isString(e)?e:e.message||e.data||e.statusText;i.warn(t),o(e)},r=function(t){x[e]||(x[e]=angular.element("<div>").append(t)[0].querySelector("svg")),n(x[e])};t(e,!0).then(r,a)})}return j.test(e)?o(e):a(e)}function m(e){return angular.isDefined(e.element)&&angular.isDefined(e.config)}function s(e,t){e&&"svg"!=e.tagName&&(e=angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(e.cloneNode(!0))[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=t,this.prepare()}function f(){var t=this.config?this.config.viewBoxSize:e.defaultViewBoxSize;angular.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+t+" "+t,focusable:!1},function(e,t){this.element.setAttribute(t,e)},this)}function S(){return this.element.cloneNode(!0)}var M={},x={},v=/[-\w@:%\+.~#?&\/\/=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&\/\/=]*)?/i,j=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return s.prototype={clone:S,prepare:f},r.fontSet=u,r}goog.provide("ngmaterial.components.icon"),goog.require("ngmaterial.core"),angular.module("material.components.icon",["material.core"]),angular.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",mdIconDirective]),angular.module("material.components.icon").constant("$$mdSvgRegistry",{mdTabsArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=",mdClose:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=",mdCancel:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==",mdMenu:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+",mdToggleArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==",mdCalendar:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg=="}).provider("$mdIcon",MdIconProvider);var config={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};MdIconProvider.prototype={icon:function(e,t,n){return e.indexOf(":")==-1&&(e="$default:"+e),config[e]=new ConfigurationItem(t,n),this},iconSet:function(e,t,n){return config[e]=new ConfigurationItem(t,n),this},defaultIconSet:function(e,t){var n="$default";return config[n]||(config[n]=new ConfigurationItem(e,t)),config[n].viewBoxSize=t||config.defaultViewBoxSize,this},defaultViewBoxSize:function(e){return config.defaultViewBoxSize=e,this},fontSet:function(e,t){return config.fontSets.push({alias:e,fontSet:t||e}),this},defaultFontSet:function(e){return config.defaultFontSet=e?e:"",this},defaultIconSize:function(e){return config.defaultIconSize=e,this},$get:["$templateRequest","$q","$log","$mdUtil","$sce",function(e,t,n,i,o){return MdIconService(config,e,t,n,i,o)}]},MdIconService.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"],ngmaterial.components.icon=angular.module("material.components.icon");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.input');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.input');
goog.require('ngmaterial.core');
/**

@@ -14,3 +14,2 @@ * @ngdoc module

*/
angular.module('material.components.input', [

@@ -32,4 +31,9 @@ 'material.core'

.animation('.md-input-messages-animation', ngMessagesAnimation)
.animation('.md-input-message-animation', ngMessageAnimation);
.animation('.md-input-message-animation', ngMessageAnimation)
// Register a service for each animation so that we can easily inject them into unit tests
.service('mdInputInvalidAnimation', mdInputInvalidMessagesAnimation)
.service('mdInputMessagesAnimation', ngMessagesAnimation)
.service('mdInputMessageAnimation', ngMessageAnimation);
/**

@@ -53,2 +57,6 @@ * @ngdoc directive

*
* <b>Note:</b> When using `ngMessages` with your input element, make sure the message and container elements
* are *block* elements, otherwise animations applied to the messages will not look as intended. Either use a `div` and
* apply the `ng-message` and `ng-messages` classes respectively, or use the `md-block` class on your element.
*
* @param md-is-error {expression=} When the given expression evaluates to true, the input container

@@ -154,3 +162,3 @@ * will go into error state. Defaults to erroring if the input has been touched and is invalid.

link: function(scope, element, attr, containerCtrl) {
if (!containerCtrl || attr.mdNoFloat || element.hasClass('_md-container-ignore')) return;
if (!containerCtrl || attr.mdNoFloat || element.hasClass('md-container-ignore')) return;

@@ -175,2 +183,6 @@ containerCtrl.label = element;

*
* When the input is required and uses a floating label, then the label will automatically contain
* an asterisk (`*`).<br/>
* This behavior can be disabled by using the `md-no-asterisk` attribute.
*
* @param {number=} md-maxlength The maximum number of characters allowed in this input. If this is

@@ -188,3 +200,5 @@ * specified, a character counter will be shown underneath the input.<br/><br/>

* @param md-no-autogrow {boolean=} When present, textareas will not grow automatically.
* @param md-no-asterisk {boolean=} When present, asterisk will not be appended to required inputs label
* @param md-no-asterisk {boolean=} When present, an asterisk will not be appended to the inputs floating label
* @param md-no-resize {boolean=} Disables the textarea resize handle.
* @param {number=} max-rows The maximum amount of rows for a textarea.
* @param md-detect-hidden {boolean=} When present, textareas will be sized properly when they are

@@ -217,3 +231,3 @@ * revealed after being hidden. This is off by default for performance reasons because it

* <input name="favoriteColor" ng-model="favoriteColor" required>
* <div ng-messages="userForm.lastName.$error">
* <div ng-messages="colorForm.favoriteColor.$error">
* <div ng-message="required">This is required!</div>

@@ -276,8 +290,23 @@ * </div>

*
*
* <h3>Textarea directive</h3>
* The `textarea` element within a `md-input-container` has the following specific behavior:
* - By default the `textarea` grows as the user types. This can be disabled via the `md-no-autogrow`
* attribute.
* - If a `textarea` has the `rows` attribute, it will treat the `rows` as the minimum height and will
* continue growing as the user types. For example a textarea with `rows="3"` will be 3 lines of text
* high initially. If no rows are specified, the directive defaults to 1.
* - The textarea's height gets set on initialization, as well as while the user is typing. In certain situations
* (e.g. while animating) the directive might have been initialized, before the element got it's final height. In
* those cases, you can trigger a resize manually by broadcasting a `md-resize-textarea` event on the scope.
* - If you wan't a `textarea` to stop growing at a certain point, you can specify the `max-rows` attribute.
* - The textarea's bottom border acts as a handle which users can drag, in order to resize the element vertically.
* Once the user has resized a `textarea`, the autogrowing functionality becomes disabled. If you don't want a
* `textarea` to be resizeable by the user, you can add the `md-no-resize` attribute.
*/
function inputTextareaDirective($mdUtil, $window, $mdAria, $timeout) {
function inputTextareaDirective($mdUtil, $window, $mdAria, $timeout, $mdGesture) {
return {
restrict: 'E',
require: ['^?mdInputContainer', '?ngModel'],
require: ['^?mdInputContainer', '?ngModel', '?^form'],
link: postLink

@@ -291,4 +320,6 @@ };

var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel();
var parentForm = ctrls[2];
var isReadonly = angular.isDefined(attr.readonly);
var mdNoAsterisk = $mdUtil.parseAttributeBoolean(attr.mdNoAsterisk);
var tagName = element[0].tagName.toLowerCase();

@@ -301,3 +332,7 @@

} else if (containerCtrl.input) {
throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!");
if (containerCtrl.input[0].contains(element[0])) {
return;
} else {
throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!");
}
}

@@ -313,3 +348,3 @@ containerCtrl.input = element;

if (!containerCtrl.label) {
$mdAria.expect(element, 'aria-label', element.attr('placeholder'));
$mdAria.expect(element, 'aria-label', attr.placeholder);
}

@@ -322,3 +357,9 @@

if (element[0].tagName.toLowerCase() === 'textarea') {
// This works around a Webkit issue where number inputs, placed in a flexbox, that have
// a `min` and `max` will collapse to about 1/3 of their proper width. Please check #7349
// for more info. Also note that we don't override the `step` if the user has specified it,
// in order to prevent some unexpected behaviour.
if (tagName === 'input' && attr.type === 'number' && attr.min && attr.max && !attr.step) {
element.attr('step', 'any');
} else if (tagName === 'textarea') {
setupTextarea();

@@ -335,14 +376,13 @@ }

var isErrorGetter = containerCtrl.isErrorGetter || function() {
return ngModelCtrl.$invalid && (ngModelCtrl.$touched || isParentFormSubmitted());
return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (parentForm && parentForm.$submitted));
};
var isParentFormSubmitted = function () {
var parent = $mdUtil.getClosest(element, 'form');
var form = parent ? angular.element(parent).controller('form') : null;
scope.$watch(isErrorGetter, containerCtrl.setInvalid);
return form ? form.$submitted : false;
};
// When the developer uses the ngValue directive for the input, we have to observe the attribute, because
// Angular's ngValue directive is just setting the `value` attribute.
if (attr.ngValue) {
attr.$observe('value', inputCheckValue);
}
scope.$watch(isErrorGetter, containerCtrl.setInvalid);
ngModelCtrl.$parsers.push(ngModelPipelineCheckValue);

@@ -368,5 +408,2 @@ ngModelCtrl.$formatters.push(ngModelPipelineCheckValue);

//ngModelCtrl.$setTouched();
//if( ngModelCtrl.$invalid ) containerCtrl.setInvalid();
scope.$on('$destroy', function() {

@@ -378,5 +415,3 @@ containerCtrl.setFocused(false);

/**
*
*/
/** Gets run through ngModel's pipeline and set the `has-value` class on the container. */
function ngModelPipelineCheckValue(arg) {

@@ -404,9 +439,13 @@ containerCtrl.setHasValue(!ngModelCtrl.$isEmpty(arg));

function setupTextarea() {
if (attr.hasOwnProperty('mdNoAutogrow')) {
return;
}
var isAutogrowing = !attr.hasOwnProperty('mdNoAutogrow');
attachResizeHandle();
if (!isAutogrowing) return;
// Can't check if height was or not explicity set,
// so rows attribute will take precedence if present
var minRows = attr.hasOwnProperty('rows') ? parseInt(attr.rows) : NaN;
var maxRows = attr.hasOwnProperty('maxRows') ? parseInt(attr.maxRows) : NaN;
var scopeResizeListener = scope.$on('md-resize-textarea', growTextarea);
var lineHeight = null;

@@ -421,55 +460,59 @@ var node = element[0];

// We can hook into Angular's pipeline, instead of registering a new listener.
// Note that we should use `$parsers`, as opposed to `$viewChangeListeners` which
// was used before, because `$viewChangeListeners` don't fire if the input is
// invalid.
// We could leverage ngModel's $parsers here, however it
// isn't reliable, because Angular trims the input by default,
// which means that growTextarea won't fire when newlines and
// spaces are added.
element.on('input', growTextarea);
// We should still use the $formatters, because they fire when
// the value was changed from outside the textarea.
if (hasNgModel) {
ngModelCtrl.$formatters.unshift(pipelineListener);
ngModelCtrl.$parsers.unshift(pipelineListener);
} else {
// Note that it's safe to use the `input` event since we're not supporting IE9 and below.
element.on('input', growTextarea);
ngModelCtrl.$formatters.push(formattersListener);
}
if (!minRows) {
element
.attr('rows', 1)
.on('scroll', onScroll);
element.attr('rows', 1);
}
angular.element($window).on('resize', growTextarea);
scope.$on('$destroy', disableAutogrow);
scope.$on('$destroy', function() {
angular.element($window).off('resize', growTextarea);
});
function growTextarea() {
// temporarily disables element's flex so its height 'runs free'
element
.addClass('md-no-flex')
.attr('rows', 1);
.attr('rows', 1)
.css('height', 'auto')
.addClass('md-no-flex');
if (minRows) {
if (!lineHeight) {
node.style.minHeight = 0;
lineHeight = element.prop('clientHeight');
node.style.minHeight = null;
}
var height = getHeight();
var newRows = Math.round( Math.round(getHeight() / lineHeight) );
var rowsToSet = Math.min(newRows, minRows);
if (!lineHeight) {
// offsetHeight includes padding which can throw off our value
var originalPadding = element[0].style.padding || '';
lineHeight = element.css('padding', 0).prop('offsetHeight');
element[0].style.padding = originalPadding;
}
element
.css('height', lineHeight * rowsToSet + 'px')
.attr('rows', rowsToSet)
.toggleClass('_md-textarea-scrollable', newRows >= minRows);
if (minRows && lineHeight) {
height = Math.max(height, lineHeight * minRows);
}
} else {
element.css('height', 'auto');
node.scrollTop = 0;
var height = getHeight();
if (height) element.css('height', height + 'px');
if (maxRows && lineHeight) {
var maxHeight = lineHeight * maxRows;
if (maxHeight < height) {
element.attr('md-no-autogrow', '');
height = maxHeight;
} else {
element.removeAttr('md-no-autogrow');
}
}
element.removeClass('md-no-flex');
if (lineHeight) {
element.attr('rows', Math.round(height / lineHeight));
}
element
.css('height', height + 'px')
.removeClass('md-no-flex');
}

@@ -480,18 +523,89 @@

var line = node.scrollHeight - offsetHeight;
return offsetHeight + (line > 0 ? line : 0);
return offsetHeight + Math.max(line, 0);
}
function onScroll(e) {
node.scrollTop = 0;
// for smooth new line adding
var line = node.scrollHeight - node.offsetHeight;
var height = node.offsetHeight + line;
node.style.height = height + 'px';
function formattersListener(value) {
$mdUtil.nextTick(growTextarea);
return value;
}
function pipelineListener(value) {
growTextarea();
return value;
function disableAutogrow() {
if (!isAutogrowing) return;
isAutogrowing = false;
angular.element($window).off('resize', growTextarea);
scopeResizeListener && scopeResizeListener();
element
.attr('md-no-autogrow', '')
.off('input', growTextarea);
if (hasNgModel) {
var listenerIndex = ngModelCtrl.$formatters.indexOf(formattersListener);
if (listenerIndex > -1) {
ngModelCtrl.$formatters.splice(listenerIndex, 1);
}
}
}
function attachResizeHandle() {
if (attr.hasOwnProperty('mdNoResize')) return;
var handle = angular.element('<div class="md-resize-handle"></div>');
var isDragging = false;
var dragStart = null;
var startHeight = 0;
var container = containerCtrl.element;
var dragGestureHandler = $mdGesture.register(handle, 'drag', { horizontal: false });
element.after(handle);
handle.on('mousedown', onMouseDown);
container
.on('$md.dragstart', onDragStart)
.on('$md.drag', onDrag)
.on('$md.dragend', onDragEnd);
scope.$on('$destroy', function() {
handle
.off('mousedown', onMouseDown)
.remove();
container
.off('$md.dragstart', onDragStart)
.off('$md.drag', onDrag)
.off('$md.dragend', onDragEnd);
dragGestureHandler();
handle = null;
container = null;
dragGestureHandler = null;
});
function onMouseDown(ev) {
ev.preventDefault();
isDragging = true;
dragStart = ev.clientY;
startHeight = parseFloat(element.css('height')) || element.prop('offsetHeight');
}
function onDragStart(ev) {
if (!isDragging) return;
ev.preventDefault();
disableAutogrow();
container.addClass('md-input-resized');
}
function onDrag(ev) {
if (!isDragging) return;
element.css('height', startHeight + (ev.pointer.y - dragStart) - $mdUtil.scrollTop() + 'px');
}
function onDragEnd(ev) {
if (!isDragging) return;
isDragging = false;
container.removeClass('md-input-resized');
}
}
// Attach a watcher to detect when the textarea gets shown.

@@ -524,3 +638,3 @@ if (attr.hasOwnProperty('mdDetectHidden')) {

}
inputTextareaDirective.$inject = ["$mdUtil", "$window", "$mdAria", "$timeout"];
inputTextareaDirective.$inject = ["$mdUtil", "$window", "$mdAria", "$timeout", "$mdGesture"];

@@ -587,3 +701,3 @@ function mdMaxlengthDirective($animate, $mdUtil) {

// which does not have a length property.
charCountEl.text(String(element.val() || value || '').length + '/' + maxlength);
charCountEl.text(String(element.val() || value || '').length + ' / ' + maxlength);
return value;

@@ -595,3 +709,3 @@ }

function placeholderDirective($log) {
function placeholderDirective($compile) {
return {

@@ -601,6 +715,13 @@ restrict: 'A',

priority: 200,
link: postLink
link: {
// Note that we need to do this in the pre-link, as opposed to the post link, if we want to
// support data bindings in the placeholder. This is necessary, because we have a case where
// we transfer the placeholder value to the `<label>` and we remove it from the original `<input>`.
// If we did this in the post-link, Angular would have set up the observers already and would be
// re-adding the attribute, even though we removed it from the element.
pre: preLink
}
};
function postLink(scope, element, attr, inputContainer) {
function preLink(scope, element, attr, inputContainer) {
// If there is no input container, just return

@@ -610,6 +731,6 @@ if (!inputContainer) return;

var label = inputContainer.element.find('label');
var hasNoFloat = angular.isDefined(inputContainer.element.attr('md-no-float'));
var noFloat = inputContainer.element.attr('md-no-float');
// If we have a label, or they specify the md-no-float attribute, just return
if ((label && label.length) || hasNoFloat) {
if ((label && label.length) || noFloat === '' || scope.$eval(noFloat)) {
// Add a placeholder class so we can target it in the CSS

@@ -620,16 +741,25 @@ inputContainer.setHasPlaceholder(true);

// Otherwise, grab/remove the placeholder
var placeholderText = attr.placeholder;
element.removeAttr('placeholder');
// md-select handles placeholders on it's own
if (element[0].nodeName != 'MD-SELECT') {
// Move the placeholder expression to the label
var newLabel = angular.element('<label ng-click="delegateClick()" tabindex="-1">' + attr.placeholder + '</label>');
// And add the placeholder text as a separate label
if (inputContainer.input && inputContainer.input[0].nodeName != 'MD-SELECT') {
var placeholder = '<label ng-click="delegateClick()">' + placeholderText + '</label>';
// Note that we unset it via `attr`, in order to get Angular
// to remove any observers that it might have set up. Otherwise
// the attribute will be added on the next digest.
attr.$set('placeholder', null);
inputContainer.element.addClass('md-icon-float');
inputContainer.element.prepend(placeholder);
// We need to compile the label manually in case it has any bindings.
// A gotcha here is that we first add the element to the DOM and we compile
// it later. This is necessary, because if we compile the element beforehand,
// it won't be able to find the `mdInputContainer` controller.
inputContainer.element
.addClass('md-icon-float')
.prepend(newLabel);
$compile(newLabel)(scope);
}
}
}
placeholderDirective.$inject = ["$log"];
placeholderDirective.$inject = ["$compile"];

@@ -800,12 +930,10 @@ /**

function mdInputInvalidMessagesAnimation($q, $animateCss) {
var $$AnimateRunner, $animateCss, $mdUtil;
function mdInputInvalidMessagesAnimation($$AnimateRunner, $animateCss, $mdUtil) {
saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);
return {
addClass: function(element, className, done) {
var messages = getMessagesElement(element);
if (className == "md-input-invalid" && messages.hasClass('md-auto-hide')) {
showInputMessages(element, $animateCss, $q).finally(done);
} else {
done();
}
showInputMessages(element, done);
}

@@ -816,12 +944,14 @@

}
mdInputInvalidMessagesAnimation.$inject = ["$q", "$animateCss"];
mdInputInvalidMessagesAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"];
function ngMessagesAnimation($q, $animateCss) {
function ngMessagesAnimation($$AnimateRunner, $animateCss, $mdUtil) {
saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);
return {
enter: function(element, done) {
showInputMessages(element, $animateCss, $q).finally(done);
showInputMessages(element, done);
},
leave: function(element, done) {
hideInputMessages(element, $animateCss, $q).finally(done);
hideInputMessages(element, done);
},

@@ -831,3 +961,3 @@

if (className == "ng-hide") {
hideInputMessages(element, $animateCss, $q).finally(done);
hideInputMessages(element, done);
} else {

@@ -840,3 +970,3 @@ done();

if (className == "ng-hide") {
showInputMessages(element, $animateCss, $q).finally(done);
showInputMessages(element, done);
} else {

@@ -848,26 +978,20 @@ done();

}
ngMessagesAnimation.$inject = ["$q", "$animateCss"];
ngMessagesAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"];
function ngMessageAnimation($animateCss) {
function ngMessageAnimation($$AnimateRunner, $animateCss, $mdUtil) {
saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);
return {
enter: function(element, done) {
var messages = getMessagesElement(element);
// If we have the md-auto-hide class, the md-input-invalid animation will fire, so we can skip
if (messages.hasClass('md-auto-hide')) {
done();
return;
}
return showMessage(element, $animateCss);
return showMessage(element);
},
leave: function(element, done) {
return hideMessage(element, $animateCss);
return hideMessage(element);
}
}
}
ngMessageAnimation.$inject = ["$animateCss"];
ngMessageAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"];
function showInputMessages(element, $animateCss, $q) {
function showInputMessages(element, done) {
var animators = [], animator;

@@ -877,3 +1001,3 @@ var messages = getMessagesElement(element);

angular.forEach(messages.children(), function(child) {
animator = showMessage(angular.element(child), $animateCss);
animator = showMessage(angular.element(child));

@@ -883,6 +1007,6 @@ animators.push(animator.start());

return $q.all(animators);
$$AnimateRunner.all(animators, done);
}
function hideInputMessages(element, $animateCss, $q) {
function hideInputMessages(element, done) {
var animators = [], animator;

@@ -892,3 +1016,3 @@ var messages = getMessagesElement(element);

angular.forEach(messages.children(), function(child) {
animator = hideMessage(angular.element(child), $animateCss);
animator = hideMessage(angular.element(child));

@@ -898,8 +1022,20 @@ animators.push(animator.start());

return $q.all(animators);
$$AnimateRunner.all(animators, done);
}
function showMessage(element, $animateCss) {
var height = element[0].offsetHeight;
function showMessage(element) {
var height = parseInt(window.getComputedStyle(element[0]).height);
var topMargin = parseInt(window.getComputedStyle(element[0]).marginTop);
var messages = getMessagesElement(element);
var container = getInputElement(element);
// Check to see if the message is already visible so we can skip
var alreadyVisible = (topMargin > -height);
// If we have the md-auto-hide class, the md-input-invalid animation will fire, so we can skip
if (alreadyVisible || (messages.hasClass('md-auto-hide') && !container.hasClass('md-input-invalid'))) {
return $animateCss(element, {});
}
return $animateCss(element, {

@@ -914,5 +1050,6 @@ event: 'enter',

function hideMessage(element, $animateCss) {
function hideMessage(element) {
var height = element[0].offsetHeight;
var styles = window.getComputedStyle(element[0]);
//var styles = { opacity: element.css('opacity') };

@@ -941,7 +1078,19 @@ // If we are already hidden, just return an empty animation

function getMessagesElement(element) {
var input = getInputElement(element);
// If we are a ng-message element, we need to traverse up the DOM tree
if (element.hasClass('md-input-message-animation')) {
return angular.element($mdUtil.getClosest(element, function(node) {
return node.classList.contains('md-input-messages-animation');
}));
}
return angular.element(input[0].querySelector('.md-input-messages-animation'));
// Otherwise, we can traverse down
return angular.element(element[0].querySelector('.md-input-messages-animation'));
}
ng.material.components.input = angular.module("material.components.input");
function saveSharedServices(_$$AnimateRunner_, _$animateCss_, _$mdUtil_) {
$$AnimateRunner = _$$AnimateRunner_;
$animateCss = _$animateCss_;
$mdUtil = _$mdUtil_;
}
ngmaterial.components.input = angular.module("material.components.input");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdInputContainerDirective(e,t){function n(t,n){e(n);var i=n[0].querySelector(a),r=n[0].querySelector(o);i&&n.addClass("md-icon-left"),r&&n.addClass("md-icon-right")}function i(e,n,i,r){var a=this;a.isErrorGetter=i.mdIsError&&t(i.mdIsError),a.delegateClick=function(){a.input.focus()},a.element=n,a.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},a.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},a.setHasPlaceholder=function(e){n.toggleClass("md-input-has-placeholder",!!e)},a.setInvalid=function(e){e?r.addClass(n,"md-input-invalid"):r.removeClass(n,"md-input-invalid")},e.$watch(function(){return a.label&&a.input},function(e){e&&!a.label.attr("for")&&a.label.attr("for",a.input.attr("id"))})}var r=["INPUT","TEXTAREA","SELECT","MD-SELECT"],a=r.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),o=r.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return i.$inject=["$scope","$element","$attrs","$animate"],{restrict:"E",link:n,controller:i}}function labelDirective(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,i){!i||n.mdNoFloat||t.hasClass("_md-container-ignore")||(i.label=t,e.$on("$destroy",function(){i.label=null}))}}}function inputTextareaDirective(e,t,n,i){function r(r,a,o,s){function u(e){return m.setHasValue(!f.$isEmpty(e)),e}function l(){m.label&&o.$observe("required",function(e){m.label.toggleClass("md-required",e&&!v)})}function c(){m.setHasValue(a.val().length>0||(a[0].validity||{}).badInput)}function d(){function n(){if(a.addClass("md-no-flex").attr("rows",1),c){d||(m.style.minHeight=0,d=a.prop("clientHeight"),m.style.minHeight=null);var e=Math.round(Math.round(s()/d)),t=Math.min(e,c);a.css("height",d*t+"px").attr("rows",t).toggleClass("_md-textarea-scrollable",e>=c)}else{a.css("height","auto"),m.scrollTop=0;var n=s();n&&a.css("height",n+"px")}a.removeClass("md-no-flex")}function s(){var e=m.offsetHeight,t=m.scrollHeight-e;return e+(t>0?t:0)}function u(e){m.scrollTop=0;var t=m.scrollHeight-m.offsetHeight,n=m.offsetHeight+t;m.style.height=n+"px"}function l(e){return n(),e}if(!o.hasOwnProperty("mdNoAutogrow")){var c=o.hasOwnProperty("rows")?parseInt(o.rows):NaN,d=null,m=a[0];if(i(function(){e.nextTick(n)},10,!1),g?(f.$formatters.unshift(l),f.$parsers.unshift(l)):a.on("input",n),c||a.attr("rows",1).on("scroll",u),angular.element(t).on("resize",n),r.$on("$destroy",function(){angular.element(t).off("resize",n)}),o.hasOwnProperty("mdDetectHidden")){var p=function(){var e=!1;return function(){var t=0===m.offsetHeight;t===!1&&e===!0&&n(),e=t}}();r.$watch(function(){return e.nextTick(p,!1),!0})}}}var m=s[0],g=!!s[1],f=s[1]||e.fakeNgModel(),p=angular.isDefined(o.readonly),v=e.parseAttributeBoolean(o.mdNoAsterisk);if(m){if("hidden"===o.type)return void a.attr("aria-hidden","true");if(m.input)throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!");m.input=a,l();var h=angular.element('<div class="md-errors-spacer">');a.after(h),m.label||n.expect(a,"aria-label",a.attr("placeholder")),a.addClass("md-input"),a.attr("id")||a.attr("id","input_"+e.nextUid()),"textarea"===a[0].tagName.toLowerCase()&&d(),g||c();var $=m.isErrorGetter||function(){return f.$invalid&&(f.$touched||M())},M=function(){var t=e.getClosest(a,"form"),n=t?angular.element(t).controller("form"):null;return n?n.$submitted:!1};r.$watch($,m.setInvalid),f.$parsers.push(u),f.$formatters.push(u),a.on("input",c),p||a.on("focus",function(t){e.nextTick(function(){m.setFocused(!0)})}).on("blur",function(t){e.nextTick(function(){m.setFocused(!1),c()})}),r.$on("$destroy",function(){m.setFocused(!1),m.setHasValue(!1),m.input=null})}}return{restrict:"E",require:["^?mdInputContainer","?ngModel"],link:r}}function mdMaxlengthDirective(e,t){function n(n,i,r,a){function o(e){return u.parent?(u.text(String(i.val()||e||"").length+"/"+s),e):e}var s,u,l,c=a[0],d=a[1];t.nextTick(function(){l=angular.element(d.element[0].querySelector(".md-errors-spacer")),u=angular.element('<div class="md-char-counter">'),l.append(u),r.$set("ngTrim","false"),c.$formatters.push(o),c.$viewChangeListeners.push(o),i.on("input keydown keyup",function(){o()}),n.$watch(r.mdMaxlength,function(t){s=t,angular.isNumber(t)&&t>0?(u.parent().length||e.enter(u,l),o()):e.leave(u)}),c.$validators["md-maxlength"]=function(e,t){return!angular.isNumber(s)||0>s?!0:(e||i.val()||t||"").length<=s}})}return{restrict:"A",require:["ngModel","^mdInputContainer"],link:n}}function placeholderDirective(e){function t(e,t,n,i){if(i){var r=i.element.find("label"),a=angular.isDefined(i.element.attr("md-no-float"));if(r&&r.length||a)return void i.setHasPlaceholder(!0);var o=n.placeholder;if(t.removeAttr("placeholder"),i.input&&"MD-SELECT"!=i.input[0].nodeName){var s='<label ng-click="delegateClick()">'+o+"</label>";i.element.addClass("md-icon-float"),i.element.prepend(s)}}}return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:t}}function mdSelectOnFocusDirective(e){function t(t,n,i){function r(){o=!0,e(function(){n[0].select(),o=!1},1,!1)}function a(e){o&&e.preventDefault()}if("INPUT"===n[0].nodeName||"TEXTAREA"===n[0].nodeName){var o=!1;n.on("focus",r).on("mouseup",a),t.$on("$destroy",function(){n.off("focus",r).off("mouseup",a)})}}return{restrict:"A",link:t}}function ngMessagesDirective(){function e(e,n,i,r){r&&(n.toggleClass("md-input-messages-animation",!0),n.toggleClass("md-auto-hide",!0),("false"==i.mdAutoHide||t(i))&&n.toggleClass("md-auto-hide",!1))}function t(e){return visibilityDirectives.some(function(t){return e[t]})}return{restrict:"EA",link:e,require:"^^?mdInputContainer"}}function ngMessageDirective(e){function t(t){function n(){for(var e=t[0];e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}function i(t){return!!e.getClosest(t,"md-input-container")}function r(e){e.toggleClass("md-input-message-animation",!0)}if(i(t))r(t);else if(n())return function(e,n){i(n)&&r(t)}}return{restrict:"EA",compile:t,priority:100}}function mdInputInvalidMessagesAnimation(e,t){return{addClass:function(n,i,r){var a=getMessagesElement(n);"md-input-invalid"==i&&a.hasClass("md-auto-hide")?showInputMessages(n,t,e)["finally"](r):r()}}}function ngMessagesAnimation(e,t){return{enter:function(n,i){showInputMessages(n,t,e)["finally"](i)},leave:function(n,i){hideInputMessages(n,t,e)["finally"](i)},addClass:function(n,i,r){"ng-hide"==i?hideInputMessages(n,t,e)["finally"](r):r()},removeClass:function(n,i,r){"ng-hide"==i?showInputMessages(n,t,e)["finally"](r):r()}}}function ngMessageAnimation(e){return{enter:function(t,n){var i=getMessagesElement(t);return i.hasClass("md-auto-hide")?void n():showMessage(t,e)},leave:function(t,n){return hideMessage(t,e)}}}function showInputMessages(e,t,n){var i,r=[],a=getMessagesElement(e);return angular.forEach(a.children(),function(e){i=showMessage(angular.element(e),t),r.push(i.start())}),n.all(r)}function hideInputMessages(e,t,n){var i,r=[],a=getMessagesElement(e);return angular.forEach(a.children(),function(e){i=hideMessage(angular.element(e),t),r.push(i.start())}),n.all(r)}function showMessage(e,t){var n=e[0].offsetHeight;return t(e,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-n+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function hideMessage(e,t){var n=e[0].offsetHeight,i=window.getComputedStyle(e[0]);return 0==i.opacity?t(e,{}):t(e,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-n+"px"},duration:.3})}function getInputElement(e){var t=e.controller("mdInputContainer");return t.element}function getMessagesElement(e){var t=getInputElement(e);return angular.element(t[0].querySelector(".md-input-messages-animation"))}goog.provide("ng.material.components.input"),goog.require("ng.material.core"),angular.module("material.components.input",["material.core"]).directive("mdInputContainer",mdInputContainerDirective).directive("label",labelDirective).directive("input",inputTextareaDirective).directive("textarea",inputTextareaDirective).directive("mdMaxlength",mdMaxlengthDirective).directive("placeholder",placeholderDirective).directive("ngMessages",ngMessagesDirective).directive("ngMessage",ngMessageDirective).directive("ngMessageExp",ngMessageDirective).directive("mdSelectOnFocus",mdSelectOnFocusDirective).animation(".md-input-invalid",mdInputInvalidMessagesAnimation).animation(".md-input-messages-animation",ngMessagesAnimation).animation(".md-input-message-animation",ngMessageAnimation),mdInputContainerDirective.$inject=["$mdTheming","$parse"],inputTextareaDirective.$inject=["$mdUtil","$window","$mdAria","$timeout"],mdMaxlengthDirective.$inject=["$animate","$mdUtil"],placeholderDirective.$inject=["$log"],mdSelectOnFocusDirective.$inject=["$timeout"];var visibilityDirectives=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];ngMessageDirective.$inject=["$mdUtil"],mdInputInvalidMessagesAnimation.$inject=["$q","$animateCss"],ngMessagesAnimation.$inject=["$q","$animateCss"],ngMessageAnimation.$inject=["$animateCss"],ng.material.components.input=angular.module("material.components.input");
function mdInputContainerDirective(e,n){function t(n,t){e(t);var i=t[0].querySelector(r),a=t[0].querySelector(s);i&&t.addClass("md-icon-left"),a&&t.addClass("md-icon-right")}function i(e,t,i,a){var r=this;r.isErrorGetter=i.mdIsError&&n(i.mdIsError),r.delegateClick=function(){r.input.focus()},r.element=t,r.setFocused=function(e){t.toggleClass("md-input-focused",!!e)},r.setHasValue=function(e){t.toggleClass("md-input-has-value",!!e)},r.setHasPlaceholder=function(e){t.toggleClass("md-input-has-placeholder",!!e)},r.setInvalid=function(e){e?a.addClass(t,"md-input-invalid"):a.removeClass(t,"md-input-invalid")},e.$watch(function(){return r.label&&r.input},function(e){e&&!r.label.attr("for")&&r.label.attr("for",r.input.attr("id"))})}var a=["INPUT","TEXTAREA","SELECT","MD-SELECT"],r=a.reduce(function(e,n){return e.concat(["md-icon ~ "+n,".md-icon ~ "+n])},[]).join(","),s=a.reduce(function(e,n){return e.concat([n+" ~ md-icon",n+" ~ .md-icon"])},[]).join(",");return i.$inject=["$scope","$element","$attrs","$animate"],{restrict:"E",link:t,controller:i}}function labelDirective(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,n,t,i){!i||t.mdNoFloat||n.hasClass("md-container-ignore")||(i.label=n,e.$on("$destroy",function(){i.label=null}))}}}function inputTextareaDirective(e,n,t,i,a){function r(r,s,o,u){function l(e){return g.setHasValue(!p.$isEmpty(e)),e}function c(){g.label&&o.$observe("required",function(e){g.label.toggleClass("md-required",e&&!$)})}function d(){g.setHasValue(s.val().length>0||(s[0].validity||{}).badInput)}function m(){function t(){s.attr("rows",1).css("height","auto").addClass("md-no-flex");var e=u();if(!C){var n=s[0].style.padding||"";C=s.css("padding",0).prop("offsetHeight"),s[0].style.padding=n}if(v&&C&&(e=Math.max(e,C*v)),h&&C){var t=C*h;t<e?(s.attr("md-no-autogrow",""),e=t):s.removeAttr("md-no-autogrow")}C&&s.attr("rows",Math.round(e/C)),s.css("height",e+"px").removeClass("md-no-flex")}function u(){var e=M.offsetHeight,n=M.scrollHeight-e;return e+Math.max(n,0)}function l(n){return e.nextTick(t),n}function c(){if(m&&(m=!1,angular.element(n).off("resize",t),$&&$(),s.attr("md-no-autogrow","").off("input",t),f)){var e=p.$formatters.indexOf(l);e>-1&&p.$formatters.splice(e,1)}}function d(){function n(e){e.preventDefault(),d=!0,m=e.clientY,f=parseFloat(s.css("height"))||s.prop("offsetHeight")}function t(e){d&&(e.preventDefault(),c(),p.addClass("md-input-resized"))}function i(n){d&&s.css("height",f+(n.pointer.y-m)-e.scrollTop()+"px")}function u(e){d&&(d=!1,p.removeClass("md-input-resized"))}if(!o.hasOwnProperty("mdNoResize")){var l=angular.element('<div class="md-resize-handle"></div>'),d=!1,m=null,f=0,p=g.element,v=a.register(l,"drag",{horizontal:!1});s.after(l),l.on("mousedown",n),p.on("$md.dragstart",t).on("$md.drag",i).on("$md.dragend",u),r.$on("$destroy",function(){l.off("mousedown",n).remove(),p.off("$md.dragstart",t).off("$md.drag",i).off("$md.dragend",u),v(),l=null,p=null,v=null})}}var m=!o.hasOwnProperty("mdNoAutogrow");if(d(),m){var v=o.hasOwnProperty("rows")?parseInt(o.rows):NaN,h=o.hasOwnProperty("maxRows")?parseInt(o.maxRows):NaN,$=r.$on("md-resize-textarea",t),C=null,M=s[0];if(i(function(){e.nextTick(t)},10,!1),s.on("input",t),f&&p.$formatters.push(l),v||s.attr("rows",1),angular.element(n).on("resize",t),r.$on("$destroy",c),o.hasOwnProperty("mdDetectHidden")){var w=function(){var e=!1;return function(){var n=0===M.offsetHeight;n===!1&&e===!0&&t(),e=n}}();r.$watch(function(){return e.nextTick(w,!1),!0})}}}var g=u[0],f=!!u[1],p=u[1]||e.fakeNgModel(),v=u[2],h=angular.isDefined(o.readonly),$=e.parseAttributeBoolean(o.mdNoAsterisk),C=s[0].tagName.toLowerCase();if(g){if("hidden"===o.type)return void s.attr("aria-hidden","true");if(g.input){if(g.input[0].contains(s[0]))return;throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!")}g.input=s,c();var M=angular.element('<div class="md-errors-spacer">');s.after(M),g.label||t.expect(s,"aria-label",o.placeholder),s.addClass("md-input"),s.attr("id")||s.attr("id","input_"+e.nextUid()),"input"===C&&"number"===o.type&&o.min&&o.max&&!o.step?s.attr("step","any"):"textarea"===C&&m(),f||d();var w=g.isErrorGetter||function(){return p.$invalid&&(p.$touched||v&&v.$submitted)};r.$watch(w,g.setInvalid),o.ngValue&&o.$observe("value",d),p.$parsers.push(l),p.$formatters.push(l),s.on("input",d),h||s.on("focus",function(n){e.nextTick(function(){g.setFocused(!0)})}).on("blur",function(n){e.nextTick(function(){g.setFocused(!1),d()})}),r.$on("$destroy",function(){g.setFocused(!1),g.setHasValue(!1),g.input=null})}}return{restrict:"E",require:["^?mdInputContainer","?ngModel","?^form"],link:r}}function mdMaxlengthDirective(e,n){function t(t,i,a,r){function s(e){return u.parent?(u.text(String(i.val()||e||"").length+" / "+o),e):e}var o,u,l,c=r[0],d=r[1];n.nextTick(function(){l=angular.element(d.element[0].querySelector(".md-errors-spacer")),u=angular.element('<div class="md-char-counter">'),l.append(u),a.$set("ngTrim","false"),c.$formatters.push(s),c.$viewChangeListeners.push(s),i.on("input keydown keyup",function(){s()}),t.$watch(a.mdMaxlength,function(n){o=n,angular.isNumber(n)&&n>0?(u.parent().length||e.enter(u,l),s()):e.leave(u)}),c.$validators["md-maxlength"]=function(e,n){return!angular.isNumber(o)||o<0||(e||i.val()||n||"").length<=o}})}return{restrict:"A",require:["ngModel","^mdInputContainer"],link:t}}function placeholderDirective(e){function n(n,t,i,a){if(a){var r=a.element.find("label"),s=a.element.attr("md-no-float");if(r&&r.length||""===s||n.$eval(s))return void a.setHasPlaceholder(!0);if("MD-SELECT"!=t[0].nodeName){var o=angular.element('<label ng-click="delegateClick()" tabindex="-1">'+i.placeholder+"</label>");i.$set("placeholder",null),a.element.addClass("md-icon-float").prepend(o),e(o)(n)}}}return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:{pre:n}}}function mdSelectOnFocusDirective(e){function n(n,t,i){function a(){s=!0,e(function(){t[0].select(),s=!1},1,!1)}function r(e){s&&e.preventDefault()}if("INPUT"===t[0].nodeName||"TEXTAREA"===t[0].nodeName){var s=!1;t.on("focus",a).on("mouseup",r),n.$on("$destroy",function(){t.off("focus",a).off("mouseup",r)})}}return{restrict:"A",link:n}}function ngMessagesDirective(){function e(e,t,i,a){a&&(t.toggleClass("md-input-messages-animation",!0),t.toggleClass("md-auto-hide",!0),("false"==i.mdAutoHide||n(i))&&t.toggleClass("md-auto-hide",!1))}function n(e){return visibilityDirectives.some(function(n){return e[n]})}return{restrict:"EA",link:e,require:"^^?mdInputContainer"}}function ngMessageDirective(e){function n(n){function t(){for(var e=n[0];e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}function i(n){return!!e.getClosest(n,"md-input-container")}function a(e){e.toggleClass("md-input-message-animation",!0)}if(i(n))a(n);else if(t())return function(e,t){i(t)&&a(n)}}return{restrict:"EA",compile:n,priority:100}}function mdInputInvalidMessagesAnimation(e,n,t){return saveSharedServices(e,n,t),{addClass:function(e,n,t){showInputMessages(e,t)}}}function ngMessagesAnimation(e,n,t){return saveSharedServices(e,n,t),{enter:function(e,n){showInputMessages(e,n)},leave:function(e,n){hideInputMessages(e,n)},addClass:function(e,n,t){"ng-hide"==n?hideInputMessages(e,t):t()},removeClass:function(e,n,t){"ng-hide"==n?showInputMessages(e,t):t()}}}function ngMessageAnimation(e,n,t){return saveSharedServices(e,n,t),{enter:function(e,n){return showMessage(e)},leave:function(e,n){return hideMessage(e)}}}function showInputMessages(e,n){var t,i=[],a=getMessagesElement(e);angular.forEach(a.children(),function(e){t=showMessage(angular.element(e)),i.push(t.start())}),$$AnimateRunner.all(i,n)}function hideInputMessages(e,n){var t,i=[],a=getMessagesElement(e);angular.forEach(a.children(),function(e){t=hideMessage(angular.element(e)),i.push(t.start())}),$$AnimateRunner.all(i,n)}function showMessage(e){var n=parseInt(window.getComputedStyle(e[0]).height),t=parseInt(window.getComputedStyle(e[0]).marginTop),i=getMessagesElement(e),a=getInputElement(e),r=t>-n;return r||i.hasClass("md-auto-hide")&&!a.hasClass("md-input-invalid")?$animateCss(e,{}):$animateCss(e,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-n+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function hideMessage(e){var n=e[0].offsetHeight,t=window.getComputedStyle(e[0]);return 0==t.opacity?$animateCss(e,{}):$animateCss(e,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-n+"px"},duration:.3})}function getInputElement(e){var n=e.controller("mdInputContainer");return n.element}function getMessagesElement(e){return e.hasClass("md-input-message-animation")?angular.element($mdUtil.getClosest(e,function(e){return e.classList.contains("md-input-messages-animation")})):angular.element(e[0].querySelector(".md-input-messages-animation"))}function saveSharedServices(e,n,t){$$AnimateRunner=e,$animateCss=n,$mdUtil=t}goog.provide("ngmaterial.components.input"),goog.require("ngmaterial.core"),angular.module("material.components.input",["material.core"]).directive("mdInputContainer",mdInputContainerDirective).directive("label",labelDirective).directive("input",inputTextareaDirective).directive("textarea",inputTextareaDirective).directive("mdMaxlength",mdMaxlengthDirective).directive("placeholder",placeholderDirective).directive("ngMessages",ngMessagesDirective).directive("ngMessage",ngMessageDirective).directive("ngMessageExp",ngMessageDirective).directive("mdSelectOnFocus",mdSelectOnFocusDirective).animation(".md-input-invalid",mdInputInvalidMessagesAnimation).animation(".md-input-messages-animation",ngMessagesAnimation).animation(".md-input-message-animation",ngMessageAnimation).service("mdInputInvalidAnimation",mdInputInvalidMessagesAnimation).service("mdInputMessagesAnimation",ngMessagesAnimation).service("mdInputMessageAnimation",ngMessageAnimation),mdInputContainerDirective.$inject=["$mdTheming","$parse"],inputTextareaDirective.$inject=["$mdUtil","$window","$mdAria","$timeout","$mdGesture"],mdMaxlengthDirective.$inject=["$animate","$mdUtil"],placeholderDirective.$inject=["$compile"],mdSelectOnFocusDirective.$inject=["$timeout"];var visibilityDirectives=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];ngMessageDirective.$inject=["$mdUtil"];var $$AnimateRunner,$animateCss,$mdUtil;mdInputInvalidMessagesAnimation.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],ngMessagesAnimation.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],ngMessageAnimation.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],ngmaterial.components.input=angular.module("material.components.input");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.list');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.list');
goog.require('ngmaterial.core');
/**

@@ -65,34 +65,168 @@ * @ngdoc module

* @description
* The `<md-list-item>` directive is a container intended for row items in a `<md-list>` container.
* The `md-2-line` and `md-3-line` classes can be added to a `<md-list-item>`
* to increase the height with 22px and 40px respectively.
* A `md-list-item` element can be used to represent some information in a row.<br/>
*
* ## CSS
* `.md-avatar` - class for image avatars
* @usage
* ### Single Row Item
* <hljs lang="html">
* <md-list-item>
* <span>Single Row Item</span>
* </md-list-item>
* </hljs>
*
* `.md-avatar-icon` - class for icon avatars
* ### Multiple Lines
* By using the following markup, you will be able to have two lines inside of one `md-list-item`.
*
* `.md-offset` - on content without an avatar
* <hljs lang="html">
* <md-list-item class="md-2-line">
* <div class="md-list-item-text" layout="column">
* <p>First Line</p>
* <p>Second Line</p>
* </div>
* </md-list-item>
* </hljs>
*
* @usage
* It is also possible to have three lines inside of one list item.
*
* <hljs lang="html">
* <md-list>
* <md-list-item>
* <img class="md-avatar" ng-src="path/to/img"/>
* <span>Item content in list</span>
* </md-list-item>
* <md-list-item>
* <md-icon class="md-avatar-icon" md-svg-icon="communication:phone"></md-icon>
* <span>Item content in list</span>
* </md-list-item>
* </md-list>
* <md-list-item class="md-3-line">
* <div class="md-list-item-text" layout="column">
* <p>First Line</p>
* <p>Second Line</p>
* <p>Third Line</p>
* </div>
* </md-list-item>
* </hljs>
*
* _**Note:** We automatically apply special styling when the inner contents are wrapped inside
* of a `<md-button>` tag. This styling is automatically ignored for `class="md-secondary"` buttons
* and you can include a class of `class="md-exclude"` if you need to use a non-secondary button
* that is inside the list, but does not wrap the contents._
* ### Secondary Items
* Secondary items are elements which will be aligned at the end of the `md-list-item`.
*
* <hljs lang="html">
* <md-list-item>
* <span>Single Row Item</span>
* <md-button class="md-secondary">
* Secondary Button
* </md-button>
* </md-list-item>
* </hljs>
*
* It also possible to have multiple secondary items inside of one `md-list-item`.
*
* <hljs lang="html">
* <md-list-item>
* <span>Single Row Item</span>
* <md-button class="md-secondary">First Button</md-button>
* <md-button class="md-secondary">Second Button</md-button>
* </md-list-item>
* </hljs>
*
* ### Proxy Item
* Proxies are elements, which will execute their specific action on click<br/>
* Currently supported proxy items are
* - `md-checkbox` (Toggle)
* - `md-switch` (Toggle)
* - `md-menu` (Open)
*
* This means, when using a supported proxy item inside of `md-list-item`, the list item will
* become clickable and executes the associated action of the proxy element on click.
*
* <hljs lang="html">
* <md-list-item>
* <span>First Line</span>
* <md-checkbox class="md-secondary"></md-checkbox>
* </md-list-item>
* </hljs>
*
* The `md-checkbox` element will be automatically detected as a proxy element and will toggle on click.
*
* <hljs lang="html">
* <md-list-item>
* <span>First Line</span>
* <md-switch class="md-secondary"></md-switch>
* </md-list-item>
* </hljs>
*
* The recognized `md-switch` will toggle its state, when the user clicks on the `md-list-item`.
*
* It is also possible to have a `md-menu` inside of a `md-list-item`.
* <hljs lang="html">
* <md-list-item>
* <p>Click anywhere to fire the secondary action</p>
* <md-menu class="md-secondary">
* <md-button class="md-icon-button">
* <md-icon md-svg-icon="communication:message"></md-icon>
* </md-button>
* <md-menu-content width="4">
* <md-menu-item>
* <md-button>
* Redial
* </md-button>
* </md-menu-item>
* <md-menu-item>
* <md-button>
* Check voicemail
* </md-button>
* </md-menu-item>
* <md-menu-divider></md-menu-divider>
* <md-menu-item>
* <md-button>
* Notifications
* </md-button>
* </md-menu-item>
* </md-menu-content>
* </md-menu>
* </md-list-item>
* </hljs>
*
* The menu will automatically open, when the users clicks on the `md-list-item`.<br/>
*
* If the developer didn't specify any position mode on the menu, the `md-list-item` will automatically detect the
* position mode and applies it to the `md-menu`.
*
* ### Avatars
* Sometimes you may want to have some avatars inside of the `md-list-item `.<br/>
* You are able to create a optimized icon for the list item, by applying the `.md-avatar` class on the `<img>` element.
*
* <hljs lang="html">
* <md-list-item>
* <img src="my-avatar.png" class="md-avatar">
* <span>Alan Turing</span>
* </hljs>
*
* When using `<md-icon>` for an avater, you have to use the `.md-avatar-icon` class.
* <hljs lang="html">
* <md-list-item>
* <md-icon class="md-avatar-icon" md-svg-icon="avatars:timothy"></md-icon>
* <span>Timothy Kopra</span>
* </md-list-item>
* </hljs>
*
* In cases, you have a `md-list-item`, which doesn't have any avatar,
* but you want to align it with the other avatar items, you have to use the `.md-offset` class.
*
* <hljs lang="html">
* <md-list-item class="md-offset">
* <span>Jon Doe</span>
* </md-list-item>
* </hljs>
*
* ### DOM modification
* The `md-list-item` component automatically detects if the list item should be clickable.
*
* ---
* If the `md-list-item` is clickable, we wrap all content inside of a `<div>` and create
* an overlaying button, which will will execute the given actions (like `ng-href`, `ng-click`)
*
* We create an overlaying button, instead of wrapping all content inside of the button,
* because otherwise some elements may not be clickable inside of the button.
*
* ---
* When using a secondary item inside of your list item, the `md-list-item` component will automatically create
* a secondary container at the end of the `md-list-item`, which contains all secondary items.
*
* The secondary item container is not static, because otherwise the overflow will not work properly on the
* list item.
*
*/
function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
var proxiedTypes = ['md-checkbox', 'md-switch'];
var proxiedTypes = ['md-checkbox', 'md-switch', 'md-menu'];
return {

@@ -111,3 +245,3 @@ restrict: 'E',

if (tAttrs.ngClick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {
if (tAttrs.ngClick || tAttrs.ngDblclick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {
wrapIn('button');

@@ -124,8 +258,12 @@ } else {

} else if (!tEl[0].querySelector('md-button:not(.md-secondary):not(.md-exclude)')) {
tEl.addClass('_md-no-proxy');
tEl.addClass('md-no-proxy');
}
}
wrapSecondaryItems();
setupToggleAria();
if (hasProxiedElement && proxyElement.nodeName === "MD-MENU") {
setupProxiedMenu();
}

@@ -147,12 +285,41 @@ function setupToggleAria() {

function setupProxiedMenu() {
var menuEl = angular.element(proxyElement);
var isEndAligned = menuEl.parent().hasClass('md-secondary-container') ||
proxyElement.parentNode.firstElementChild !== proxyElement;
var xAxisPosition = 'left';
if (isEndAligned) {
// When the proxy item is aligned at the end of the list, we have to set the origin to the end.
xAxisPosition = 'right';
}
// Set the position mode / origin of the proxied menu.
if (!menuEl.attr('md-position-mode')) {
menuEl.attr('md-position-mode', xAxisPosition + ' target');
}
// Apply menu open binding to menu button
var menuOpenButton = menuEl.children().eq(0);
if (!hasClickEvent(menuOpenButton[0])) {
menuOpenButton.attr('ng-click', '$mdOpenMenu($event)');
}
if (!menuOpenButton.attr('aria-label')) {
menuOpenButton.attr('aria-label', 'Open List Menu');
}
}
function wrapIn(type) {
if (type == 'div') {
itemContainer = angular.element('<div class="_md-no-style _md-list-item-inner">');
itemContainer = angular.element('<div class="md-no-style md-list-item-inner">');
itemContainer.append(tEl.contents());
tEl.addClass('_md-proxy-focus');
tEl.addClass('md-proxy-focus');
} else {
// Element which holds the default list-item content.
itemContainer = angular.element(
'<div class="md-button _md-no-style">'+
' <div class="_md-list-item-inner"></div>'+
'<div class="md-button md-no-style">'+
' <div class="md-list-item-inner"></div>'+
'</div>'

@@ -163,12 +330,20 @@ );

var buttonWrap = angular.element(
'<md-button class="_md-no-style"></md-button>'
'<md-button class="md-no-style"></md-button>'
);
buttonWrap[0].setAttribute('aria-label', tEl[0].textContent);
copyAttributes(tEl[0], buttonWrap[0]);
// We allow developers to specify the `md-no-focus` class, to disable the focus style
// on the button executor. Once more classes should be forwarded, we should probably make the
// class forward more generic.
if (tEl.hasClass('md-no-focus')) {
buttonWrap.addClass('md-no-focus');
}
// Append the button wrap before our list-item content, because it will overlay in relative.
itemContainer.prepend(buttonWrap);
itemContainer.children().eq(1).append(tEl.contents());
tEl.addClass('_md-button-wrap');

@@ -182,3 +357,3 @@ }

function wrapSecondaryItems() {
var secondaryItemsWrapper = angular.element('<div class="_md-secondary-container">');
var secondaryItemsWrapper = angular.element('<div class="md-secondary-container">');

@@ -189,6 +364,2 @@ angular.forEach(secondaryItems, function(secondaryItem) {

// Since the secondary item container is static we need to fill the remaing space.
var spaceFiller = angular.element('<div class="flex"></div>');
itemContainer.append(spaceFiller);
itemContainer.append(secondaryItemsWrapper);

@@ -198,8 +369,17 @@ }

function wrapSecondaryItem(secondaryItem, container) {
// If the current secondary item is not a button, but contains a ng-click attribute,
// the secondary item will be automatically wrapped inside of a button.
if (secondaryItem && !isButton(secondaryItem) && secondaryItem.hasAttribute('ng-click')) {
$mdAria.expect(secondaryItem, 'aria-label');
var buttonWrapper = angular.element('<md-button class="md-secondary md-icon-button">');
copyAttributes(secondaryItem, buttonWrapper[0]);
// Copy the attributes from the secondary item to the generated button.
// We also support some additional attributes from the secondary item,
// because some developers may use a ngIf, ngHide, ngShow on their item.
copyAttributes(secondaryItem, buttonWrapper[0], ['ng-if', 'ng-hide', 'ng-show']);
secondaryItem.setAttribute('tabindex', '-1');
buttonWrapper.append(secondaryItem);
secondaryItem = buttonWrapper[0];

@@ -218,10 +398,24 @@ }

function copyAttributes(item, wrapper) {
var copiedAttrs = ['ng-if', 'ng-click', 'aria-label', 'ng-disabled',
'ui-sref', 'href', 'ng-href', 'target', 'ng-attr-ui-sref', 'ui-sref-opts'];
/**
* Copies attributes from a source element to the destination element
* By default the function will copy the most necessary attributes, supported
* by the button executor for clickable list items.
* @param source Element with the specified attributes
* @param destination Element which will retrieve the attributes
* @param extraAttrs Additional attributes, which will be copied over.
*/
function copyAttributes(source, destination, extraAttrs) {
var copiedAttrs = $mdUtil.prefixer([
'ng-if', 'ng-click', 'ng-dblclick', 'aria-label', 'ng-disabled', 'ui-sref',
'href', 'ng-href', 'target', 'ng-attr-ui-sref', 'ui-sref-opts'
]);
if (extraAttrs) {
copiedAttrs = copiedAttrs.concat($mdUtil.prefixer(extraAttrs));
}
angular.forEach(copiedAttrs, function(attr) {
if (item.hasAttribute(attr)) {
wrapper.setAttribute(attr, item.getAttribute(attr));
item.removeAttribute(attr);
if (source.hasAttribute(attr)) {
destination.setAttribute(attr, source.getAttribute(attr));
source.removeAttribute(attr);
}

@@ -253,3 +447,3 @@ });

$element.addClass('_md'); // private md component indicator for styling
var proxies = [],

@@ -264,3 +458,3 @@ firstElement = $element[0].firstElementChild,

if ($element.hasClass('_md-proxy-focus') && proxies.length) {
if ($element.hasClass('md-proxy-focus') && proxies.length) {
angular.forEach(proxies, function(proxy) {

@@ -301,2 +495,3 @@ proxy = angular.element(proxy);

}
function computeClickable() {

@@ -307,3 +502,3 @@ if (proxies.length == 1 || hasClick) {

if (!hasClick) {
ctrl.attachRipple($scope, angular.element($element[0].querySelector('._md-no-style')));
ctrl.attachRipple($scope, angular.element($element[0].querySelector('.md-no-style')));
}

@@ -313,2 +508,21 @@ }

function isEventFromControl(event) {
var forbiddenControls = ['md-slider'];
// If there is no path property in the event, then we can assume that the event was not bubbled.
if (!event.path) {
return forbiddenControls.indexOf(event.target.tagName.toLowerCase()) !== -1;
}
// We iterate the event path up and check for a possible component.
// Our maximum index to search, is the list item root.
var maxPath = event.path.indexOf($element.children()[0]);
for (var i = 0; i < maxPath; i++) {
if (forbiddenControls.indexOf(event.path[i].tagName.toLowerCase()) !== -1) {
return true;
}
}
}
var clickChildKeypressListener = function(e) {

@@ -336,2 +550,6 @@ if (e.target.nodeName != 'INPUT' && e.target.nodeName != 'TEXTAREA' && !e.target.isContentEditable) {

$element.children().eq(0).on('click', function(e) {
// When the event is coming from an control and it should not trigger the proxied element
// then we are skipping.
if (isEventFromControl(e)) return;
var parentButton = $mdUtil.getClosest(e.target, 'BUTTON');

@@ -341,2 +559,5 @@ if (!parentButton && clickChild.contains(e.target)) {

if (e.target !== proxy && !proxy.contains(e.target)) {
if (proxy.nodeName === 'MD-MENU') {
proxy = proxy.children[0];
}
angular.element(proxy).triggerHandler('click');

@@ -376,2 +597,2 @@ }

ng.material.components.list = angular.module("material.components.list");
ngmaterial.components.list = angular.module("material.components.list");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdListDirective(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function mdListItemDirective(e,t,n,r){var i=["md-checkbox","md-switch"];return{restrict:"E",controller:"MdListController",compile:function(a,o){function l(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=a.find(t)[0])&&!e.hasAttribute("aria-label")){var i=a.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}function s(e){if("div"==e)C=angular.element('<div class="_md-no-style _md-list-item-inner">'),C.append(a.contents()),a.addClass("_md-proxy-focus");else{C=angular.element('<div class="md-button _md-no-style"> <div class="_md-list-item-inner"></div></div>');var t=angular.element('<md-button class="_md-no-style"></md-button>');t[0].setAttribute("aria-label",a[0].textContent),u(a[0],t[0]),C.prepend(t),C.children().eq(1).append(a.contents()),a.addClass("_md-button-wrap")}a[0].setAttribute("tabindex","-1"),a.append(C)}function c(){var e=angular.element('<div class="_md-secondary-container">');angular.forEach(h,function(t){d(t,e)});var t=angular.element('<div class="flex"></div>');C.append(t),C.append(e)}function d(t,n){if(t&&!f(t)&&t.hasAttribute("ng-click")){e.expect(t,"aria-label");var r=angular.element('<md-button class="md-secondary md-icon-button">');u(t,r[0]),t.setAttribute("tabindex","-1"),r.append(t),t=r[0]}t&&(!g(t)||!o.ngClick&&m(t))&&angular.element(t).removeClass("md-secondary"),a.addClass("md-with-secondary"),n.append(t)}function u(e,t){var n=["ng-if","ng-click","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"];angular.forEach(n,function(n){e.hasAttribute(n)&&(t.setAttribute(n,e.getAttribute(n)),e.removeAttribute(n))})}function m(e){return-1!=i.indexOf(e.nodeName.toLowerCase())}function f(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"==t||"BUTTON"==t}function g(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===o.$normalize(t[n].name))return!0;return!1}function v(e,a,o,l){function s(){u&&u.children&&!v&&angular.forEach(i,function(e){angular.forEach(u.querySelectorAll(e+":not(.md-secondary)"),function(e){d.push(e)})})}function c(){(1==d.length||v)&&(a.addClass("md-clickable"),v||l.attachRipple(e,angular.element(a[0].querySelector("._md-no-style"))))}a.addClass("_md");var d=[],u=a[0].firstElementChild,m=a.hasClass("_md-button-wrap"),f=m?u.firstElementChild:u,v=f&&g(f);s(),c(),a.hasClass("_md-proxy-focus")&&d.length&&angular.forEach(d,function(t){t=angular.element(t),e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,r(function(){e.mouseActive=!1},100)}).on("focus",function(){e.mouseActive===!1&&a.addClass("md-focused"),t.on("blur",function n(){a.removeClass("md-focused"),t.off("blur",n)})})});var p=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var n=e.which||e.keyCode;n==t.KEY_CODE.SPACE&&f&&(f.click(),e.preventDefault(),e.stopPropagation())}};v||d.length||f&&f.addEventListener("keypress",p),a.off("click"),a.off("keypress"),1==d.length&&f&&a.children().eq(0).on("click",function(e){var t=n.getClosest(e.target,"BUTTON");!t&&f.contains(e.target)&&angular.forEach(d,function(t){e.target===t||t.contains(e.target)||angular.element(t).triggerHandler("click")})}),e.$on("$destroy",function(){f&&f.removeEventListener("keypress",p)})}var p,b,h=a[0].querySelectorAll(".md-secondary"),C=a;if(a[0].setAttribute("role","listitem"),o.ngClick||o.ngHref||o.href||o.uiSref||o.ngAttrUiSref)s("button");else{for(var y,A=0;y=i[A];++A)if(b=a[0].querySelector(y)){p=!0;break}p?s("div"):a[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)")||a.addClass("_md-no-proxy")}return c(),l(),v}}}function MdListController(e,t,n){function r(e,t){var r={};n.attach(e,t,r)}var i=this;i.attachRipple=r}goog.provide("ng.material.components.list"),goog.require("ng.material.core"),angular.module("material.components.list",["material.core"]).controller("MdListController",MdListController).directive("mdList",mdListDirective).directive("mdListItem",mdListItemDirective),mdListDirective.$inject=["$mdTheming"],mdListItemDirective.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],MdListController.$inject=["$scope","$element","$mdListInkRipple"],ng.material.components.list=angular.module("material.components.list");
function mdListDirective(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function mdListItemDirective(e,t,n,r){var a=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(i,o){function l(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=i.find(t)[0])&&!e.hasAttribute("aria-label")){var a=i.find("p")[0];if(!a)return;e.setAttribute("aria-label","Toggle "+a.textContent)}}function s(){var e=angular.element(b),t=e.parent().hasClass("md-secondary-container")||b.parentNode.firstElementChild!==b,n="left";t&&(n="right"),e.attr("md-position-mode")||e.attr("md-position-mode",n+" target");var r=e.children().eq(0);p(r[0])||r.attr("ng-click","$mdOpenMenu($event)"),r.attr("aria-label")||r.attr("aria-label","Open List Menu")}function d(e){if("div"==e)y=angular.element('<div class="md-no-style md-list-item-inner">'),y.append(i.contents()),i.addClass("md-proxy-focus");else{y=angular.element('<div class="md-button md-no-style"> <div class="md-list-item-inner"></div></div>');var t=angular.element('<md-button class="md-no-style"></md-button>');t[0].setAttribute("aria-label",i[0].textContent),m(i[0],t[0]),i.hasClass("md-no-focus")&&t.addClass("md-no-focus"),y.prepend(t),y.children().eq(1).append(i.contents()),i.addClass("_md-button-wrap")}i[0].setAttribute("tabindex","-1"),i.append(y)}function c(){var e=angular.element('<div class="md-secondary-container">');angular.forEach(C,function(t){u(t,e)}),y.append(e)}function u(t,n){if(t&&!g(t)&&t.hasAttribute("ng-click")){e.expect(t,"aria-label");var r=angular.element('<md-button class="md-secondary md-icon-button">');m(t,r[0],["ng-if","ng-hide","ng-show"]),t.setAttribute("tabindex","-1"),r.append(t),t=r[0]}t&&(!p(t)||!o.ngClick&&f(t))&&angular.element(t).removeClass("md-secondary"),i.addClass("md-with-secondary"),n.append(t)}function m(e,t,r){var a=n.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"]);r&&(a=a.concat(n.prefixer(r))),angular.forEach(a,function(n){e.hasAttribute(n)&&(t.setAttribute(n,e.getAttribute(n)),e.removeAttribute(n))})}function f(e){return a.indexOf(e.nodeName.toLowerCase())!=-1}function g(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"==t||"BUTTON"==t}function p(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===o.$normalize(t[n].name))return!0;return!1}function v(e,i,o,l){function s(){m&&m.children&&!v&&angular.forEach(a,function(e){angular.forEach(m.querySelectorAll(e+":not(.md-secondary)"),function(e){u.push(e)})})}function d(){(1==u.length||v)&&(i.addClass("md-clickable"),v||l.attachRipple(e,angular.element(i[0].querySelector(".md-no-style"))))}function c(e){var t=["md-slider"];if(!e.path)return t.indexOf(e.target.tagName.toLowerCase())!==-1;for(var n=e.path.indexOf(i.children()[0]),r=0;r<n;r++)if(t.indexOf(e.path[r].tagName.toLowerCase())!==-1)return!0}i.addClass("_md");var u=[],m=i[0].firstElementChild,f=i.hasClass("_md-button-wrap"),g=f?m.firstElementChild:m,v=g&&p(g);s(),d(),i.hasClass("md-proxy-focus")&&u.length&&angular.forEach(u,function(t){t=angular.element(t),e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,r(function(){e.mouseActive=!1},100)}).on("focus",function(){e.mouseActive===!1&&i.addClass("md-focused"),t.on("blur",function n(){i.removeClass("md-focused"),t.off("blur",n)})})});var h=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var n=e.which||e.keyCode;n==t.KEY_CODE.SPACE&&g&&(g.click(),e.preventDefault(),e.stopPropagation())}};v||u.length||g&&g.addEventListener("keypress",h),i.off("click"),i.off("keypress"),1==u.length&&g&&i.children().eq(0).on("click",function(e){if(!c(e)){var t=n.getClosest(e.target,"BUTTON");!t&&g.contains(e.target)&&angular.forEach(u,function(t){e.target===t||t.contains(e.target)||("MD-MENU"===t.nodeName&&(t=t.children[0]),angular.element(t).triggerHandler("click"))})}}),e.$on("$destroy",function(){g&&g.removeEventListener("keypress",h)})}var h,b,C=i[0].querySelectorAll(".md-secondary"),y=i;if(i[0].setAttribute("role","listitem"),o.ngClick||o.ngDblclick||o.ngHref||o.href||o.uiSref||o.ngAttrUiSref)d("button");else{for(var A,k=0;A=a[k];++k)if(b=i[0].querySelector(A)){h=!0;break}h?d("div"):i[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)")||i.addClass("md-no-proxy")}return c(),l(),h&&"MD-MENU"===b.nodeName&&s(),v}}}function MdListController(e,t,n){function r(e,t){var r={};n.attach(e,t,r)}var a=this;a.attachRipple=r}goog.provide("ngmaterial.components.list"),goog.require("ngmaterial.core"),angular.module("material.components.list",["material.core"]).controller("MdListController",MdListController).directive("mdList",mdListDirective).directive("mdListItem",mdListItemDirective),mdListDirective.$inject=["$mdTheming"],mdListItemDirective.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],MdListController.$inject=["$scope","$element","$mdListInkRipple"],ngmaterial.components.list=angular.module("material.components.list");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.menu');
goog.require('ng.material.components.backdrop');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.menu');
goog.require('ngmaterial.components.backdrop');
goog.require('ngmaterial.core');
/**

@@ -32,2 +32,3 @@ * @ngdoc module

var prefixer = $mdUtil.prefixer();
var menuContainer;

@@ -46,4 +47,5 @@ var self = this;

menuContainer = setMenuContainer;
// Default element for ARIA attributes has the ngClick or ngMouseenter expression
triggerElement = $element[0].querySelector('[ng-click],[ng-mouseenter]');
triggerElement = $element[0].querySelector(prefixer.buildSelector(['ng-click', 'ng-mouseenter']));
triggerElement.setAttribute('aria-expanded', 'false');

@@ -67,3 +69,7 @@

$scope.$on('$destroy', this.disableHoverListener);
$scope.$on('$destroy', angular.bind(this, function() {
this.disableHoverListener();
$mdMenu.destroy();
}));
menuContainer.on('$destroy', function() {

@@ -167,9 +173,9 @@ $mdMenu.destroy();

menuContainer.attr('aria-hidden', 'false');
$element[0].classList.add('_md-open');
$element[0].classList.add('md-open');
angular.forEach(self.nestedMenus, function(el) {
el.classList.remove('_md-open');
el.classList.remove('md-open');
});
} else {
menuContainer.attr('aria-hidden', 'true');
$element[0].classList.remove('_md-open');
$element[0].classList.remove('md-open');
}

@@ -180,3 +186,5 @@ $scope.$mdMenuIsOpen = self.isOpen;

this.focusMenuContainer = function focusMenuContainer() {
var focusTarget = menuContainer[0].querySelector('[md-menu-focus-target]');
var focusTarget = menuContainer[0]
.querySelector(prefixer.buildSelector(['md-menu-focus-target', 'md-autofocus']));
if (!focusTarget) focusTarget = menuContainer[0].querySelector('.md-button');

@@ -361,3 +369,18 @@ focusTarget.focus();

* </hljs>
*
* ### Auto Focus
* By default, when a menu opens, `md-menu` focuses the first button in the menu content.
*
* But sometimes you would like to focus another specific menu item instead of the first.<br/>
* This can be done by applying the `md-autofocus` directive on the given element.
*
* <hljs lang="html">
* <md-menu-item>
* <md-button md-autofocus ng-click="doSomething()">
* Auto Focus
* </md-button>
* </md-menu-item>
* </hljs>
*
*
* ### Preventing close

@@ -420,4 +443,7 @@ *

var triggerElement = templateElement.children()[0];
if (!triggerElement.hasAttribute('ng-click')) {
triggerElement = triggerElement.querySelector('[ng-click],[ng-mouseenter]') || triggerElement;
var prefixer = $mdUtil.prefixer();
if (!prefixer.hasAttribute(triggerElement, 'ng-click')) {
triggerElement = triggerElement
.querySelector(prefixer.buildSelector(['ng-click', 'ng-mouseenter'])) || triggerElement;
}

@@ -456,3 +482,3 @@ if (triggerElement && (

// Move everything into a md-menu-container and pass it to the controller
var menuContainer = angular.element( '<div class="_md _md-open-menu-container md-whiteframe-z2"></div>');
var menuContainer = angular.element( '<div class="_md md-open-menu-container md-whiteframe-z2"></div>');
var menuContents = element.children()[1];

@@ -505,2 +531,3 @@

function menuDefaultOptions($mdUtil, $mdTheming, $mdConstant, $document, $window, $q, $$rAF, $animateCss, $animate) {
var prefixer = $mdUtil.prefixer();
var animator = $mdUtil.dom.animator;

@@ -537,3 +564,3 @@

if (options.hasBackdrop) {
options.backdrop = $mdUtil.createBackdrop(scope, "_md-menu-backdrop _md-click-catcher");
options.backdrop = $mdUtil.createBackdrop(scope, "md-menu-backdrop md-click-catcher");

@@ -557,3 +584,3 @@ $animate.enter(options.backdrop, $document[0].body);

function onRemove(scope, element, opts) {
opts.cleanupInteraction();
opts.cleanupInteraction && opts.cleanupInteraction();
opts.cleanupResizing();

@@ -572,3 +599,3 @@ opts.hideBackdrop();

function animateRemoval() {
return $animateCss(element, {addClass: '_md-leave'}).start();
return $animateCss(element, {addClass: 'md-leave'}).start();
}

@@ -580,3 +607,3 @@

function detachAndClean() {
element.removeClass('_md-active');
element.removeClass('md-active');
detachElement(element, opts);

@@ -620,3 +647,3 @@ opts.alreadyOpen = false;

element.removeClass('_md-leave');
element.removeClass('md-leave');

@@ -626,3 +653,3 @@ // Animate the menu scaling, and opacity [from its position origin (default == top-left)]

$animateCss(element, {
addClass: '_md-active',
addClass: 'md-active',
from: animator.toCss(position),

@@ -686,3 +713,3 @@ to: animator.toCss({transform: ''})

function activateInteraction() {
element.addClass('_md-clickable');
element.addClass('md-clickable');

@@ -700,3 +727,5 @@ // close on backdrop click

// kick off initial focus in the menu on the first element
var focusTarget = opts.menuContentEl[0].querySelector('[md-menu-focus-target]');
var focusTarget = opts.menuContentEl[0]
.querySelector(prefixer.buildSelector(['md-menu-focus-target', 'md-autofocus']));
if ( !focusTarget ) {

@@ -711,3 +740,3 @@ var firstChild = opts.menuContentEl[0].firstElementChild;

return function cleanupInteraction() {
element.removeClass('_md-clickable');
element.removeClass('md-clickable');
if (opts.backdrop) opts.backdrop.off('click', onBackdropClick);

@@ -798,10 +827,9 @@ opts.menuContentEl.off('keydown', onMenuKeyDown);

if (!target) return false;
for (var i = 0, attr; attr = attrs[i]; ++i) {
var altForms = [attr, 'data-' + attr, 'x-' + attr];
for (var j = 0, rawAttr; rawAttr = altForms[j]; ++j) {
if (target.hasAttribute(rawAttr)) {
return true;
}
if (prefixer.hasAttribute(target, attr)) {
return true;
}
}
return false;

@@ -811,9 +839,2 @@ }

opts.menuContentEl[0].addEventListener('click', captureClickListener, true);
return function cleanupInteraction() {
element.removeClass('_md-clickable');
opts.menuContentEl.off('keydown');
opts.menuContentEl[0].removeEventListener('click', captureClickListener, true);
};
}

@@ -890,3 +911,3 @@ }

var originNode = opts.target[0].querySelector('[md-menu-origin]') || opts.target[0],
var originNode = opts.target[0].querySelector(prefixer.buildSelector('md-menu-origin')) || opts.target[0],
originNodeRect = originNode.getBoundingClientRect();

@@ -909,3 +930,3 @@

alignTarget = alignTarget.firstElementChild || alignTarget;
alignTarget = alignTarget.querySelector('[md-menu-align-target]') || alignTarget;
alignTarget = alignTarget.querySelector(prefixer.buildSelector('md-menu-align-target')) || alignTarget;
alignTargetRect = alignTarget.getBoundingClientRect();

@@ -938,3 +959,3 @@

var rtl = ($mdUtil.bidi() == 'rtl');
switch (positionMode.left) {

@@ -958,4 +979,13 @@ case 'target':

break;
case 'right':
if (rtl) {
position.left = originNodeRect.right - originNodeRect.width;
transformOrigin += 'left';
} else {
position.left = originNodeRect.right - openMenuNodeRect.width;
transformOrigin += 'right';
}
break;
case 'left':
if(rtl) {
if (rtl) {
position.left = originNodeRect.right - openMenuNodeRect.width;

@@ -1020,2 +1050,2 @@ transformOrigin += 'right';

ng.material.components.menu = angular.module("material.components.menu");
ngmaterial.components.menu = angular.module("material.components.menu");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MenuController(e,t,n,r,o,a,i,l){var s,u,d=this;this.nestLevel=parseInt(t.mdNestLevel,10)||0,this.init=function(t,a){a=a||{},s=t,u=n[0].querySelector("[ng-click],[ng-mouseenter]"),u.setAttribute("aria-expanded","false"),this.isInMenuBar=a.isInMenuBar,this.nestedMenus=o.nodesToArray(s[0].querySelectorAll(".md-nested-menu")),s.on("$mdInterimElementRemove",function(){d.isOpen=!1,o.nextTick(function(){d.onIsOpenChanged(d.isOpen)})}),o.nextTick(function(){d.onIsOpenChanged(d.isOpen)});var i="menu_container_"+o.nextUid();s.attr("id",i),angular.element(u).attr({"aria-owns":i,"aria-haspopup":"true"}),r.$on("$destroy",this.disableHoverListener),s.on("$destroy",function(){e.destroy()})};var c,m,f=[];this.enableHoverListener=function(){f.push(i.$on("$mdMenuOpen",function(e,t){s[0].contains(t[0])&&(d.currentlyOpenMenu=t.controller("mdMenu"),d.isAlreadyOpening=!1,d.currentlyOpenMenu.registerContainerProxy(d.triggerContainerProxy.bind(d)))})),f.push(i.$on("$mdMenuClose",function(e,t){s[0].contains(t[0])&&(d.currentlyOpenMenu=void 0)})),m=angular.element(o.nodesToArray(s[0].children[0].children)),m.on("mouseenter",d.handleMenuItemHover),m.on("mouseleave",d.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;f.length;)f.shift()();m&&m.off("mouseenter",d.handleMenuItemHover),m&&m.off("mouseleave",d.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!d.isAlreadyOpening){var t=e.target.querySelector("md-menu")||o.getClosest(e.target,"MD-MENU");c=a(function(){if(t&&(t=angular.element(t).controller("mdMenu")),d.currentlyOpenMenu&&d.currentlyOpenMenu!=t){var e=d.nestLevel+1;d.currentlyOpenMenu.close(!0,{closeTo:e}),d.isAlreadyOpening=!!t,t&&t.open()}else t&&!t.isOpen&&t.open&&(d.isAlreadyOpening=!!t,t&&t.open())},t?100:250);var n=e.currentTarget.querySelector(".md-button:not([disabled])");n&&n.focus()}},this.handleMenuItemMouseLeave=function(){c&&(a.cancel(c),c=void 0)},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),d.isOpen||(d.enableHoverListener(),d.isOpen=!0,o.nextTick(function(){d.onIsOpenChanged(d.isOpen)}),u=u||(t?t.target:n[0]),u.setAttribute("aria-expanded","true"),r.$emit("$mdMenuOpen",n),e.show({scope:r,mdMenuCtrl:d,nestLevel:d.nestLevel,element:s,target:u,preserveElement:!0,parent:"body"})["finally"](function(){u.setAttribute("aria-expanded","false"),d.disableHoverListener()}))},r.$mdOpenMenu=this.open,this.onIsOpenChanged=function(e){e?(s.attr("aria-hidden","false"),n[0].classList.add("_md-open"),angular.forEach(d.nestedMenus,function(e){e.classList.remove("_md-open")})):(s.attr("aria-hidden","true"),n[0].classList.remove("_md-open")),r.$mdMenuIsOpen=d.isOpen},this.focusMenuContainer=function(){var e=s[0].querySelector("[md-menu-focus-target]");e||(e=s[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return d.isOpen?e.destroy():l.when(!1)},this.close=function(t,a){if(d.isOpen){d.isOpen=!1,o.nextTick(function(){d.onIsOpenChanged(d.isOpen)});var i=angular.extend({},a,{skipFocus:t});if(r.$emit("$mdMenuClose",n,i),e.hide(null,a),!t){var l=d.restoreFocusTo||n.find("button")[0];l instanceof angular.element&&(l=l[0]),l&&l.focus()}}},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}function MenuDirective(e){function t(t){t.addClass("md-menu");var o=t.children()[0];if(o.hasAttribute("ng-click")||(o=o.querySelector("[ng-click],[ng-mouseenter]")||o),!o||"MD-BUTTON"!=o.nodeName&&"BUTTON"!=o.nodeName||o.hasAttribute("type")||o.setAttribute("type","button"),2!=t.children().length)throw Error(r+"Expected two children elements.");o&&o.setAttribute("aria-haspopup","true");var a=t[0].querySelectorAll("md-menu"),i=parseInt(t[0].getAttribute("md-nest-level"),10)||0;return a&&angular.forEach(e.nodesToArray(a),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",i+1)}),n}function n(e,t,n,r){var o=r[0],a=void 0!=r[1],i=angular.element('<div class="_md _md-open-menu-container md-whiteframe-z2"></div>'),l=t.children()[1];t.addClass("_md"),l.hasAttribute("role")||l.setAttribute("role","menu"),i.append(l),t.on("$destroy",function(){i.remove()}),t.append(i),i[0].style.display="none",o.init(i,{isInMenuBar:a})}var r="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:t}}function MenuProvider(e){function t(e,t,o,a,i,l,s,u,d){function c(t,n,r){return r.nestLevel?angular.noop:(r.disableParentScroll&&!e.getClosest(r.target,"MD-DIALOG")?r.restoreScroll=e.disableScrollAround(r.element,r.parent):r.disableParentScroll=!1,r.hasBackdrop&&(r.backdrop=e.createBackdrop(t,"_md-menu-backdrop _md-click-catcher"),d.enter(r.backdrop,a[0].body)),function(){r.backdrop&&r.backdrop.remove(),r.disableParentScroll&&r.restoreScroll()})}function m(e,t,n){function r(){return u(t,{addClass:"_md-leave"}).start()}function o(){t.removeClass("_md-active"),h(t,n),n.alreadyOpen=!1}return n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():r().then(o)}function f(n,r,a){function d(){return a.parent.append(r),r[0].style.display="",l(function(e){var t=v(r,a);r.removeClass("_md-leave"),u(r,{addClass:"_md-active",from:M.toCss(t),to:M.toCss({transform:""})}).start().then(e)})}function m(){if(!a.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");angular.extend(a,{alreadyOpen:!1,isRemoved:!1,target:angular.element(a.target),parent:angular.element(a.parent),menuContentEl:angular.element(r[0].querySelector("md-menu-content"))})}function f(){var e=function(e,t){return s.throttle(function(){if(!a.isRemoved){var n=v(e,t);e.css(M.toCss(n))}})}(r,a);return i.addEventListener("resize",e),i.addEventListener("orientationchange",e),function(){i.removeEventListener("resize",e),i.removeEventListener("orientationchange",e)}}function g(){function t(t){var n;switch(t.keyCode){case o.KEY_CODE.ESCAPE:a.mdMenuCtrl.close(!1,{closeAll:!0}),n=!0;break;case o.KEY_CODE.UP_ARROW:p(t,a.menuContentEl,a,-1)||a.nestLevel||a.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.DOWN_ARROW:p(t,a.menuContentEl,a,1)||a.nestLevel||a.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.LEFT_ARROW:a.nestLevel?a.mdMenuCtrl.close():a.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.RIGHT_ARROW:var r=e.getClosest(t.target,"MD-MENU");r&&r!=a.parent[0]?t.target.click():a.mdMenuCtrl.triggerContainerProxy(t),n=!0}n&&(t.preventDefault(),t.stopImmediatePropagation())}function i(e){e.preventDefault(),e.stopPropagation(),n.$apply(function(){a.mdMenuCtrl.close(!0,{closeAll:!0})})}function l(t){function r(){n.$apply(function(){a.mdMenuCtrl.close(!0,{closeAll:!0})})}function o(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)for(var o,a=[n,"data-"+n,"x-"+n],i=0;o=a[i];++i)if(e.hasAttribute(o))return!0;return!1}var i=t.target;do{if(i==a.menuContentEl[0])return;if((o(i,["ng-click","ng-href","ui-sref"])||"BUTTON"==i.nodeName||"MD-BUTTON"==i.nodeName)&&!o(i,["md-prevent-menu-close"])){var l=e.getClosest(i,"MD-MENU");i.hasAttribute("disabled")||l&&l!=a.parent[0]||r();break}}while(i=i.parentNode)}r.addClass("_md-clickable"),a.backdrop&&a.backdrop.on("click",i),a.menuContentEl.on("keydown",t),a.menuContentEl[0].addEventListener("click",l,!0);var s=a.menuContentEl[0].querySelector("[md-menu-focus-target]");if(!s){var u=a.menuContentEl[0].firstElementChild;s=u&&(u.querySelector(".md-button:not([disabled])")||u.firstElementChild)}return s&&s.focus(),function(){r.removeClass("_md-clickable"),a.backdrop&&a.backdrop.off("click",i),a.menuContentEl.off("keydown",t),a.menuContentEl[0].removeEventListener("click",l,!0)}}return m(a),t.inherit(a.menuContentEl,a.target),a.cleanupResizing=f(),a.hideBackdrop=c(n,r,a),d().then(function(e){return a.alreadyOpen=!0,a.cleanupInteraction=g(),e})}function p(t,n,r,o){for(var a,i=e.getClosest(t.target,"MD-MENU-ITEM"),l=e.nodesToArray(n[0].children),s=l.indexOf(i),u=s+o;u>=0&&u<l.length;u+=o){var d=l[u].querySelector(".md-button");if(a=g(d))break}return a}function g(e){return e&&-1!=e.getAttribute("tabindex")?(e.focus(),a[0].activeElement==e):void 0}function h(e,t){t.preserveElement?n(e).style.display="none":n(e).parentNode===n(t.parent)&&n(t.parent).removeChild(n(e))}function v(t,n){function o(e){e.top=Math.max(Math.min(e.top,v.bottom-u.offsetHeight),v.top),e.left=Math.max(Math.min(e.left,v.right-u.offsetWidth),v.left)}function l(){for(var e=0;e<d.children.length;++e)if("none"!=i.getComputedStyle(d.children[e]).display)return d.children[e]}var s,u=t[0],d=t[0].firstElementChild,c=d.getBoundingClientRect(),m=a[0].body,f=m.getBoundingClientRect(),p=i.getComputedStyle(d),g=n.target[0].querySelector("[md-menu-origin]")||n.target[0],h=g.getBoundingClientRect(),v={left:f.left+r,top:Math.max(f.top,0)+r,bottom:Math.max(f.bottom,Math.max(f.top,0)+f.height)-r,right:f.right-r},M={top:0,left:0,right:0,bottom:0},C={top:0,left:0,right:0,bottom:0},y=n.mdMenuCtrl.positionMode();"target"!=y.top&&"target"!=y.left&&"target-right"!=y.left||(s=l(),s&&(s=s.firstElementChild||s,s=s.querySelector("[md-menu-align-target]")||s,M=s.getBoundingClientRect(),C={top:parseFloat(u.style.top||0),left:parseFloat(u.style.left||0)}));var b={},E="top ";switch(y.top){case"target":b.top=C.top+h.top-M.top;break;case"cascade":b.top=h.top-parseFloat(p.paddingTop)-g.style.top;break;case"bottom":b.top=h.top+h.height;break;default:throw new Error('Invalid target mode "'+y.top+'" specified for md-menu on Y axis.')}var O="rtl"==e.bidi();switch(y.left){case"target":b.left=C.left+h.left-M.left,E+=O?"right":"left";break;case"target-left":b.left=h.left,E+="left";break;case"target-right":b.left=h.right-c.width+(c.right-M.right),E+="right";break;case"cascade":var k=O?h.left-c.width<v.left:h.right+c.width<v.right;b.left=k?h.right-g.style.left:h.left-g.style.left-c.width,E+=k?"left":"right";break;case"left":O?(b.left=h.right-c.width,E+="right"):(b.left=h.left,E+="left");break;default:throw new Error('Invalid target mode "'+y.left+'" specified for md-menu on X axis.')}var $=n.mdMenuCtrl.offsets();b.top+=$.top,b.left+=$.left,o(b);var A=Math.round(100*Math.min(h.width/u.offsetWidth,1))/100,x=Math.round(100*Math.min(h.height/u.offsetHeight,1))/100;return{top:Math.round(b.top),left:Math.round(b.left),transform:n.alreadyOpen?void 0:e.supplant("scale({0},{1})",[A,x]),transformOrigin:E}}var M=e.dom.animator;return{parent:"body",onShow:f,onRemove:m,hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0}}function n(e){return e instanceof angular.element&&(e=e[0]),e}var r=8;return t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"],e("$mdMenu").setDefaults({methods:["target"],options:t})}goog.provide("ng.material.components.menu"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.menu",["material.core","material.components.backdrop"]),angular.module("material.components.menu").controller("mdMenuCtrl",MenuController),MenuController.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q"],angular.module("material.components.menu").directive("mdMenu",MenuDirective),MenuDirective.$inject=["$mdUtil"],angular.module("material.components.menu").provider("$mdMenu",MenuProvider),MenuProvider.$inject=["$$interimElementProvider"],ng.material.components.menu=angular.module("material.components.menu");
function MenuController(e,t,n,r,o,i,a,l){var s,u,d=o.prefixer(),c=this;this.nestLevel=parseInt(t.mdNestLevel,10)||0,this.init=function(t,i){i=i||{},s=t,u=n[0].querySelector(d.buildSelector(["ng-click","ng-mouseenter"])),u.setAttribute("aria-expanded","false"),this.isInMenuBar=i.isInMenuBar,this.nestedMenus=o.nodesToArray(s[0].querySelectorAll(".md-nested-menu")),s.on("$mdInterimElementRemove",function(){c.isOpen=!1,o.nextTick(function(){c.onIsOpenChanged(c.isOpen)})}),o.nextTick(function(){c.onIsOpenChanged(c.isOpen)});var a="menu_container_"+o.nextUid();s.attr("id",a),angular.element(u).attr({"aria-owns":a,"aria-haspopup":"true"}),r.$on("$destroy",angular.bind(this,function(){this.disableHoverListener(),e.destroy()})),s.on("$destroy",function(){e.destroy()})};var m,f,p=[];this.enableHoverListener=function(){p.push(a.$on("$mdMenuOpen",function(e,t){s[0].contains(t[0])&&(c.currentlyOpenMenu=t.controller("mdMenu"),c.isAlreadyOpening=!1,c.currentlyOpenMenu.registerContainerProxy(c.triggerContainerProxy.bind(c)))})),p.push(a.$on("$mdMenuClose",function(e,t){s[0].contains(t[0])&&(c.currentlyOpenMenu=void 0)})),f=angular.element(o.nodesToArray(s[0].children[0].children)),f.on("mouseenter",c.handleMenuItemHover),f.on("mouseleave",c.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;p.length;)p.shift()();f&&f.off("mouseenter",c.handleMenuItemHover),f&&f.off("mouseleave",c.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!c.isAlreadyOpening){var t=e.target.querySelector("md-menu")||o.getClosest(e.target,"MD-MENU");m=i(function(){if(t&&(t=angular.element(t).controller("mdMenu")),c.currentlyOpenMenu&&c.currentlyOpenMenu!=t){var e=c.nestLevel+1;c.currentlyOpenMenu.close(!0,{closeTo:e}),c.isAlreadyOpening=!!t,t&&t.open()}else t&&!t.isOpen&&t.open&&(c.isAlreadyOpening=!!t,t&&t.open())},t?100:250);var n=e.currentTarget.querySelector(".md-button:not([disabled])");n&&n.focus()}},this.handleMenuItemMouseLeave=function(){m&&(i.cancel(m),m=void 0)},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),c.isOpen||(c.enableHoverListener(),c.isOpen=!0,o.nextTick(function(){c.onIsOpenChanged(c.isOpen)}),u=u||(t?t.target:n[0]),u.setAttribute("aria-expanded","true"),r.$emit("$mdMenuOpen",n),e.show({scope:r,mdMenuCtrl:c,nestLevel:c.nestLevel,element:s,target:u,preserveElement:!0,parent:"body"})["finally"](function(){u.setAttribute("aria-expanded","false"),c.disableHoverListener()}))},r.$mdOpenMenu=this.open,this.onIsOpenChanged=function(e){e?(s.attr("aria-hidden","false"),n[0].classList.add("md-open"),angular.forEach(c.nestedMenus,function(e){e.classList.remove("md-open")})):(s.attr("aria-hidden","true"),n[0].classList.remove("md-open")),r.$mdMenuIsOpen=c.isOpen},this.focusMenuContainer=function(){var e=s[0].querySelector(d.buildSelector(["md-menu-focus-target","md-autofocus"]));e||(e=s[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return c.isOpen?e.destroy():l.when(!1)},this.close=function(t,i){if(c.isOpen){c.isOpen=!1,o.nextTick(function(){c.onIsOpenChanged(c.isOpen)});var a=angular.extend({},i,{skipFocus:t});if(r.$emit("$mdMenuClose",n,a),e.hide(null,i),!t){var l=c.restoreFocusTo||n.find("button")[0];l instanceof angular.element&&(l=l[0]),l&&l.focus()}}},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}function MenuDirective(e){function t(t){t.addClass("md-menu");var o=t.children()[0],i=e.prefixer();if(i.hasAttribute(o,"ng-click")||(o=o.querySelector(i.buildSelector(["ng-click","ng-mouseenter"]))||o),!o||"MD-BUTTON"!=o.nodeName&&"BUTTON"!=o.nodeName||o.hasAttribute("type")||o.setAttribute("type","button"),2!=t.children().length)throw Error(r+"Expected two children elements.");o&&o.setAttribute("aria-haspopup","true");var a=t[0].querySelectorAll("md-menu"),l=parseInt(t[0].getAttribute("md-nest-level"),10)||0;return a&&angular.forEach(e.nodesToArray(a),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",l+1)}),n}function n(e,t,n,r){var o=r[0],i=void 0!=r[1],a=angular.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'),l=t.children()[1];t.addClass("_md"),l.hasAttribute("role")||l.setAttribute("role","menu"),a.append(l),t.on("$destroy",function(){a.remove()}),t.append(a),a[0].style.display="none",o.init(a,{isInMenuBar:i})}var r="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:t}}function MenuProvider(e){function t(e,t,o,i,a,l,s,u,d){function c(t,n,r){return r.nestLevel?angular.noop:(r.disableParentScroll&&!e.getClosest(r.target,"MD-DIALOG")?r.restoreScroll=e.disableScrollAround(r.element,r.parent):r.disableParentScroll=!1,r.hasBackdrop&&(r.backdrop=e.createBackdrop(t,"md-menu-backdrop md-click-catcher"),d.enter(r.backdrop,i[0].body)),function(){r.backdrop&&r.backdrop.remove(),r.disableParentScroll&&r.restoreScroll()})}function m(e,t,n){function r(){return u(t,{addClass:"md-leave"}).start()}function o(){t.removeClass("md-active"),g(t,n),n.alreadyOpen=!1}return n.cleanupInteraction&&n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():r().then(o)}function f(n,r,i){function d(){return i.parent.append(r),r[0].style.display="",l(function(e){var t=v(r,i);r.removeClass("md-leave"),u(r,{addClass:"md-active",from:b.toCss(t),to:b.toCss({transform:""})}).start().then(e)})}function m(){if(!i.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");angular.extend(i,{alreadyOpen:!1,isRemoved:!1,target:angular.element(i.target),parent:angular.element(i.parent),menuContentEl:angular.element(r[0].querySelector("md-menu-content"))})}function f(){var e=function(e,t){return s.throttle(function(){if(!i.isRemoved){var n=v(e,t);e.css(b.toCss(n))}})}(r,i);return a.addEventListener("resize",e),a.addEventListener("orientationchange",e),function(){a.removeEventListener("resize",e),a.removeEventListener("orientationchange",e)}}function h(){function t(t){var n;switch(t.keyCode){case o.KEY_CODE.ESCAPE:i.mdMenuCtrl.close(!1,{closeAll:!0}),n=!0;break;case o.KEY_CODE.UP_ARROW:p(t,i.menuContentEl,i,-1)||i.nestLevel||i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.DOWN_ARROW:p(t,i.menuContentEl,i,1)||i.nestLevel||i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.LEFT_ARROW:i.nestLevel?i.mdMenuCtrl.close():i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case o.KEY_CODE.RIGHT_ARROW:var r=e.getClosest(t.target,"MD-MENU");r&&r!=i.parent[0]?t.target.click():i.mdMenuCtrl.triggerContainerProxy(t),n=!0}n&&(t.preventDefault(),t.stopImmediatePropagation())}function a(e){e.preventDefault(),e.stopPropagation(),n.$apply(function(){i.mdMenuCtrl.close(!0,{closeAll:!0})})}function l(t){function r(){n.$apply(function(){i.mdMenuCtrl.close(!0,{closeAll:!0})})}function o(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)if(M.hasAttribute(e,n))return!0;return!1}var a=t.target;do{if(a==i.menuContentEl[0])return;if((o(a,["ng-click","ng-href","ui-sref"])||"BUTTON"==a.nodeName||"MD-BUTTON"==a.nodeName)&&!o(a,["md-prevent-menu-close"])){var l=e.getClosest(a,"MD-MENU");a.hasAttribute("disabled")||l&&l!=i.parent[0]||r();break}}while(a=a.parentNode)}r.addClass("md-clickable"),i.backdrop&&i.backdrop.on("click",a),i.menuContentEl.on("keydown",t),i.menuContentEl[0].addEventListener("click",l,!0);var s=i.menuContentEl[0].querySelector(M.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!s){var u=i.menuContentEl[0].firstElementChild;s=u&&(u.querySelector(".md-button:not([disabled])")||u.firstElementChild)}return s&&s.focus(),function(){r.removeClass("md-clickable"),i.backdrop&&i.backdrop.off("click",a),i.menuContentEl.off("keydown",t),i.menuContentEl[0].removeEventListener("click",l,!0)}}return m(i),t.inherit(i.menuContentEl,i.target),i.cleanupResizing=f(),i.hideBackdrop=c(n,r,i),d().then(function(e){return i.alreadyOpen=!0,i.cleanupInteraction=h(),e})}function p(t,n,r,o){for(var i,a=e.getClosest(t.target,"MD-MENU-ITEM"),l=e.nodesToArray(n[0].children),s=l.indexOf(a),u=s+o;u>=0&&u<l.length;u+=o){var d=l[u].querySelector(".md-button");if(i=h(d))break}return i}function h(e){if(e&&e.getAttribute("tabindex")!=-1)return e.focus(),i[0].activeElement==e}function g(e,t){t.preserveElement?n(e).style.display="none":n(e).parentNode===n(t.parent)&&n(t.parent).removeChild(n(e))}function v(t,n){function o(e){e.top=Math.max(Math.min(e.top,v.bottom-u.offsetHeight),v.top),e.left=Math.max(Math.min(e.left,v.right-u.offsetWidth),v.left)}function l(){for(var e=0;e<d.children.length;++e)if("none"!=a.getComputedStyle(d.children[e]).display)return d.children[e]}var s,u=t[0],d=t[0].firstElementChild,c=d.getBoundingClientRect(),m=i[0].body,f=m.getBoundingClientRect(),p=a.getComputedStyle(d),h=n.target[0].querySelector(M.buildSelector("md-menu-origin"))||n.target[0],g=h.getBoundingClientRect(),v={left:f.left+r,top:Math.max(f.top,0)+r,bottom:Math.max(f.bottom,Math.max(f.top,0)+f.height)-r,right:f.right-r},b={top:0,left:0,right:0,bottom:0},C={top:0,left:0,right:0,bottom:0},y=n.mdMenuCtrl.positionMode();"target"!=y.top&&"target"!=y.left&&"target-right"!=y.left||(s=l(),s&&(s=s.firstElementChild||s,s=s.querySelector(M.buildSelector("md-menu-align-target"))||s,b=s.getBoundingClientRect(),C={top:parseFloat(u.style.top||0),left:parseFloat(u.style.left||0)}));var k={},E="top ";switch(y.top){case"target":k.top=C.top+g.top-b.top;break;case"cascade":k.top=g.top-parseFloat(p.paddingTop)-h.style.top;break;case"bottom":k.top=g.top+g.height;break;default:throw new Error('Invalid target mode "'+y.top+'" specified for md-menu on Y axis.')}var O="rtl"==e.bidi();switch(y.left){case"target":k.left=C.left+g.left-b.left,E+=O?"right":"left";break;case"target-left":k.left=g.left,E+="left";break;case"target-right":k.left=g.right-c.width+(c.right-b.right),E+="right";break;case"cascade":var $=O?g.left-c.width<v.left:g.right+c.width<v.right;k.left=$?g.right-h.style.left:g.left-h.style.left-c.width,E+=$?"left":"right";break;case"right":O?(k.left=g.right-g.width,E+="left"):(k.left=g.right-c.width,E+="right");break;case"left":O?(k.left=g.right-c.width,E+="right"):(k.left=g.left,E+="left");break;default:throw new Error('Invalid target mode "'+y.left+'" specified for md-menu on X axis.')}var A=n.mdMenuCtrl.offsets();k.top+=A.top,k.left+=A.left,o(k);var x=Math.round(100*Math.min(g.width/u.offsetWidth,1))/100,S=Math.round(100*Math.min(g.height/u.offsetHeight,1))/100;return{top:Math.round(k.top),left:Math.round(k.left),transform:n.alreadyOpen?void 0:e.supplant("scale({0},{1})",[x,S]),transformOrigin:E}}var M=e.prefixer(),b=e.dom.animator;return{parent:"body",onShow:f,onRemove:m,hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0}}function n(e){return e instanceof angular.element&&(e=e[0]),e}var r=8;return t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"],e("$mdMenu").setDefaults({methods:["target"],options:t})}goog.provide("ngmaterial.components.menu"),goog.require("ngmaterial.components.backdrop"),goog.require("ngmaterial.core"),angular.module("material.components.menu",["material.core","material.components.backdrop"]),angular.module("material.components.menu").controller("mdMenuCtrl",MenuController),MenuController.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q"],angular.module("material.components.menu").directive("mdMenu",MenuDirective),MenuDirective.$inject=["$mdUtil"],angular.module("material.components.menu").provider("$mdMenu",MenuProvider),MenuProvider.$inject=["$$interimElementProvider"],ngmaterial.components.menu=angular.module("material.components.menu");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.menuBar');
goog.require('ng.material.components.menu');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.menuBar');
goog.require('ngmaterial.components.menu');
goog.require('ngmaterial.core');
/**

@@ -60,4 +60,4 @@ * @ngdoc module

if (self.getMenus().indexOf(el[0]) != -1) {
$element[0].classList.add('_md-open');
el[0].classList.add('_md-open');
$element[0].classList.add('md-open');
el[0].classList.add('md-open');
self.currentlyOpenMenu = el.controller('mdMenu');

@@ -72,4 +72,4 @@ self.currentlyOpenMenu.registerContainerProxy(self.handleKeyDown);

if (rootMenus.indexOf(el[0]) != -1) {
$element[0].classList.remove('_md-open');
el[0].classList.remove('_md-open');
$element[0].classList.remove('md-open');
el[0].classList.remove('md-open');
}

@@ -102,4 +102,4 @@

MenuBarController.prototype.setKeyboardMode = function(enabled) {
if (enabled) this.$element[0].classList.add('_md-keyboard-mode');
else this.$element[0].classList.remove('_md-keyboard-mode');
if (enabled) this.$element[0].classList.add('md-keyboard-mode');
else this.$element[0].classList.remove('md-keyboard-mode');
};

@@ -259,3 +259,3 @@

for (var i = 0; i < menus.length; ++i) {
if (menus[i].classList.contains('_md-open')) return i;
if (menus[i].classList.contains('md-open')) return i;
}

@@ -382,7 +382,10 @@ return -1;

menuEl.setAttribute('md-position-mode', 'left bottom');
menuEl.querySelector('button,a').setAttribute('role', 'menuitem');
// Since we're in the compile function and actual `md-buttons` are not compiled yet,
// we need to query for possible `md-buttons` as well.
menuEl.querySelector('button, a, md-button').setAttribute('role', 'menuitem');
}
var contentEls = $mdUtil.nodesToArray(menuEl.querySelectorAll('md-menu-content'));
angular.forEach(contentEls, function(contentEl) {
contentEl.classList.add('_md-menu-bar-menu');
contentEl.classList.add('md-menu-bar-menu');
contentEl.classList.add('md-dense');

@@ -396,2 +399,9 @@ if (!contentEl.hasAttribute('width')) {

// Mark the child menu items that they're inside a menu bar. This is necessary,
// because mnMenuItem has special behaviour during compilation, depending on
// whether it is inside a mdMenuBar. We can usually figure this out via the DOM,
// however if a directive that uses documentFragment is applied to the child (e.g. ngRepeat),
// the element won't have a parent and won't compile properly.
templateEl.find('md-menu-item').addClass('md-in-menu-bar');
return function postLink(scope, el, attr, ctrl) {

@@ -537,8 +547,14 @@ el.addClass('_md'); // private md component indicator for styling

/* ngInject */
function MenuItemDirective() {
function MenuItemDirective($mdUtil) {
return {
controller: 'MenuItemController',
require: ['mdMenuItem', '?ngModel'],
priority: 210, // ensure that our post link runs after ngAria
compile: function(templateEl, templateAttrs) {
if (templateAttrs.type == 'checkbox' || templateAttrs.type == 'radio') {
var type = templateAttrs.type;
var inMenuBarClass = 'md-in-menu-bar';
// Note: This allows us to show the `check` icon for the md-menu-bar items.
// The `md-in-menu-bar` class is set by the mdMenuBar directive.
if ((type == 'checkbox' || type == 'radio') && templateEl.hasClass(inMenuBarClass)) {
var text = templateEl[0].textContent;

@@ -552,9 +568,9 @@ var buttonEl = angular.element('<md-button type="button"></md-button>');

templateEl.append(buttonEl);
templateEl[0].classList.add('md-indent');
templateEl.addClass('md-indent').removeClass(inMenuBarClass);
setDefault('role', (templateAttrs.type == 'checkbox') ? 'menuitemcheckbox' : 'menuitemradio', buttonEl);
angular.forEach(['ng-disabled'], moveAttrToButton);
setDefault('role', type == 'checkbox' ? 'menuitemcheckbox' : 'menuitemradio', buttonEl);
moveAttrToButton('ng-disabled');
} else {
setDefault('role', 'menuitem', templateEl[0].querySelector('md-button,button,a'));
setDefault('role', 'menuitem', templateEl[0].querySelector('md-button, button, a'));
}

@@ -579,14 +595,18 @@

function moveAttrToButton(attr) {
if (templateEl[0].hasAttribute(attr)) {
var val = templateEl[0].getAttribute(attr);
buttonEl[0].setAttribute(attr, val);
templateEl[0].removeAttribute(attr);
}
function moveAttrToButton(attribute) {
var attributes = $mdUtil.prefixer(attribute);
angular.forEach(attributes, function(attr) {
if (templateEl[0].hasAttribute(attr)) {
var val = templateEl[0].getAttribute(attr);
buttonEl[0].setAttribute(attr, val);
templateEl[0].removeAttribute(attr);
}
});
}
},
controller: 'MenuItemController'
}
};
}
MenuItemDirective.$inject = ["$mdUtil"];
ng.material.components.menuBar = angular.module("material.components.menuBar");
ngmaterial.components.menuBar = angular.module("material.components.menuBar");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MenuBarController(e,t,n,o,r,i,a,l){this.$element=n,this.$attrs=o,this.$mdConstant=r,this.$mdUtil=a,this.$document=i,this.$scope=e,this.$rootScope=t,this.$timeout=l;var u=this;angular.forEach(BOUND_MENU_METHODS,function(e){u[e]=angular.bind(u,u[e])})}function MenuBarDirective(e,t){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(n,o){return o.ariaRole||n[0].setAttribute("role","menubar"),angular.forEach(n[0].children,function(t){if("MD-MENU"==t.nodeName){t.hasAttribute("md-position-mode")||(t.setAttribute("md-position-mode","left bottom"),t.querySelector("button,a").setAttribute("role","menuitem"));var n=e.nodesToArray(t.querySelectorAll("md-menu-content"));angular.forEach(n,function(e){e.classList.add("_md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),function(e,n,o,r){n.addClass("_md"),t(e,n),r.init()}}}}function MenuDividerDirective(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}function MenuItemController(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}function MenuItemDirective(){return{require:["mdMenuItem","?ngModel"],priority:210,compile:function(e,t){function n(t,n,o){o=o||e,o instanceof angular.element&&(o=o[0]),o.hasAttribute(t)||o.setAttribute(t,n)}function o(t){if(e[0].hasAttribute(t)){var n=e[0].getAttribute(t);i[0].setAttribute(t,n),e[0].removeAttribute(t)}}if("checkbox"==t.type||"radio"==t.type){var r=e[0].textContent,i=angular.element('<md-button type="button"></md-button>');i.html(r),i.attr("tabindex","0"),e.html(""),e.append(angular.element('<md-icon md-svg-icon="check"></md-icon>')),e.append(i),e[0].classList.add("md-indent"),n("role","checkbox"==t.type?"menuitemcheckbox":"menuitemradio",i),angular.forEach(["ng-disabled"],o)}else n("role","menuitem",e[0].querySelector("md-button,button,a"));return function(e,t,n,o){var r=o[0],i=o[1];r.init(i)}},controller:"MenuItemController"}}goog.provide("ng.material.components.menuBar"),goog.require("ng.material.components.menu"),goog.require("ng.material.core"),angular.module("material.components.menuBar",["material.core","material.components.menu"]),angular.module("material.components.menuBar").controller("MenuBarController",MenuBarController);var BOUND_MENU_METHODS=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];MenuBarController.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],MenuBarController.prototype.init=function(){var e=this.$element,t=this.$mdUtil,n=this.$scope,o=this,r=[];e.on("keydown",this.handleKeyDown),this.parentToolbar=t.getClosest(e,"MD-TOOLBAR"),r.push(this.$rootScope.$on("$mdMenuOpen",function(t,n){-1!=o.getMenus().indexOf(n[0])&&(e[0].classList.add("_md-open"),n[0].classList.add("_md-open"),o.currentlyOpenMenu=n.controller("mdMenu"),o.currentlyOpenMenu.registerContainerProxy(o.handleKeyDown),o.enableOpenOnHover())})),r.push(this.$rootScope.$on("$mdMenuClose",function(n,r,i){var a=o.getMenus();if(-1!=a.indexOf(r[0])&&(e[0].classList.remove("_md-open"),r[0].classList.remove("_md-open")),e[0].contains(r[0])){for(var l=r[0];l&&-1==a.indexOf(l);)l=t.getClosest(l,"MD-MENU",!0);l&&(i.skipFocus||l.querySelector("button:not([disabled])").focus(),o.currentlyOpenMenu=void 0,o.disableOpenOnHover(),o.setKeyboardMode(!0))}})),n.$on("$destroy",function(){for(;r.length;)r.shift()()}),this.setKeyboardMode(!0)},MenuBarController.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("_md-keyboard-mode"):this.$element[0].classList.remove("_md-keyboard-mode")},MenuBarController.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){this.openOnHoverEnabled=!0;var e;(e=this.parentToolbar)&&(e.dataset.mdRestoreStyle=e.getAttribute("style"),e.style.position="relative",e.style.zIndex=100),angular.element(this.getMenus()).on("mouseenter",this.handleMenuHover)}},MenuBarController.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},MenuBarController.prototype.disableOpenOnHover=function(){if(this.openOnHoverEnabled){this.openOnHoverEnabled=!1;var e;(e=this.parentToolbar)&&(e.style.cssText=e.dataset.mdRestoreStyle||""),angular.element(this.getMenus()).off("mouseenter",this.handleMenuHover)}},MenuBarController.prototype.scheduleOpenHoveredMenu=function(e){var t=angular.element(e.currentTarget),n=t.controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(n)},MenuBarController.prototype.scheduleOpenMenu=function(e){var t=this,n=this.$timeout;e!=t.currentlyOpenMenu&&(n.cancel(t.pendingMenuOpen),t.pendingMenuOpen=n(function(){t.pendingMenuOpen=void 0,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},MenuBarController.prototype.handleKeyDown=function(e){var t=this.$mdConstant.KEY_CODE,n=this.currentlyOpenMenu,o=n&&n.isOpen;this.setKeyboardMode(!0);var r,i,a;switch(e.keyCode){case t.DOWN_ARROW:n?n.focusMenuContainer():this.openFocusedMenu(),r=!0;break;case t.UP_ARROW:n&&n.close(),r=!0;break;case t.LEFT_ARROW:i=this.focusMenu(-1),o&&(a=angular.element(i).controller("mdMenu"),this.scheduleOpenMenu(a)),r=!0;break;case t.RIGHT_ARROW:i=this.focusMenu(1),o&&(a=angular.element(i).controller("mdMenu"),this.scheduleOpenMenu(a)),r=!0}r&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},MenuBarController.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();-1==n&&(n=this.getOpenMenuIndex());var o=!1;return-1==n?(n=0,o=!0):(0>e&&n>0||e>0&&n<t.length-e)&&(n+=e,o=!0),o?(t[n].querySelector("button").focus(),t[n]):void 0},MenuBarController.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&angular.element(e).controller("mdMenu").open()},MenuBarController.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},MenuBarController.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},MenuBarController.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil,t=e.getClosest(this.$document[0].activeElement,"MD-MENU");if(!t)return-1;var n=this.getMenus().indexOf(t);return n},MenuBarController.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("_md-open"))return t;return-1},angular.module("material.components.menuBar").directive("mdMenuBar",MenuBarDirective),MenuBarDirective.$inject=["$mdUtil","$mdTheming"],angular.module("material.components.menuBar").directive("mdMenuDivider",MenuDividerDirective),angular.module("material.components.menuBar").controller("MenuItemController",MenuItemController),MenuItemController.$inject=["$scope","$element","$attrs"],MenuItemController.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},MenuItemController.prototype.clearNgAria=function(){var e=this.$element[0],t=["role","tabindex","aria-invalid","aria-checked"];angular.forEach(t,function(t){e.removeAttribute(t)})},MenuItemController.prototype.initClickListeners=function(){function e(){if("radio"==a){var e=i.ngValue?r.$eval(i.ngValue):i.value;return o.$modelValue==e}return o.$modelValue}function t(e){e?u.off("click",s):u.on("click",s)}var n=this,o=this.ngModel,r=this.$scope,i=this.$attrs,a=(this.$element,this.mode);this.handleClick=angular.bind(this,this.handleClick);var l=this.iconEl,u=angular.element(this.buttonEl),s=this.handleClick;i.$observe("disabled",t),t(i.disabled),o.$render=function(){n.clearNgAria(),e()?(l.style.display="",u.attr("aria-checked","true")):(l.style.display="none",u.attr("aria-checked","false"))},r.$$postDigest(o.$render)},MenuItemController.prototype.handleClick=function(e){var t,n=this.mode,o=this.ngModel,r=this.$attrs;"checkbox"==n?t=!o.$modelValue:"radio"==n&&(t=r.ngValue?this.$scope.$eval(r.ngValue):r.value),o.$setViewValue(t),o.$render()},angular.module("material.components.menuBar").directive("mdMenuItem",MenuItemDirective),ng.material.components.menuBar=angular.module("material.components.menuBar");
function MenuBarController(e,t,n,r,o,i,a,l){this.$element=n,this.$attrs=r,this.$mdConstant=o,this.$mdUtil=a,this.$document=i,this.$scope=e,this.$rootScope=t,this.$timeout=l;var u=this;angular.forEach(BOUND_MENU_METHODS,function(e){u[e]=angular.bind(u,u[e])})}function MenuBarDirective(e,t){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(n,r){return r.ariaRole||n[0].setAttribute("role","menubar"),angular.forEach(n[0].children,function(t){if("MD-MENU"==t.nodeName){t.hasAttribute("md-position-mode")||(t.setAttribute("md-position-mode","left bottom"),t.querySelector("button, a, md-button").setAttribute("role","menuitem"));var n=e.nodesToArray(t.querySelectorAll("md-menu-content"));angular.forEach(n,function(e){e.classList.add("md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),n.find("md-menu-item").addClass("md-in-menu-bar"),function(e,n,r,o){n.addClass("_md"),t(e,n),o.init()}}}}function MenuDividerDirective(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}function MenuItemController(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}function MenuItemDirective(e){return{controller:"MenuItemController",require:["mdMenuItem","?ngModel"],priority:210,compile:function(t,n){function r(e,n,r){r=r||t,r instanceof angular.element&&(r=r[0]),r.hasAttribute(e)||r.setAttribute(e,n)}function o(n){var r=e.prefixer(n);angular.forEach(r,function(e){if(t[0].hasAttribute(e)){var n=t[0].getAttribute(e);u[0].setAttribute(e,n),t[0].removeAttribute(e)}})}var i=n.type,a="md-in-menu-bar";if("checkbox"!=i&&"radio"!=i||!t.hasClass(a))r("role","menuitem",t[0].querySelector("md-button, button, a"));else{var l=t[0].textContent,u=angular.element('<md-button type="button"></md-button>');u.html(l),u.attr("tabindex","0"),t.html(""),t.append(angular.element('<md-icon md-svg-icon="check"></md-icon>')),t.append(u),t.addClass("md-indent").removeClass(a),r("role","checkbox"==i?"menuitemcheckbox":"menuitemradio",u),o("ng-disabled")}return function(e,t,n,r){var o=r[0],i=r[1];o.init(i)}}}}goog.provide("ngmaterial.components.menuBar"),goog.require("ngmaterial.components.menu"),goog.require("ngmaterial.core"),angular.module("material.components.menuBar",["material.core","material.components.menu"]),angular.module("material.components.menuBar").controller("MenuBarController",MenuBarController);var BOUND_MENU_METHODS=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];MenuBarController.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],MenuBarController.prototype.init=function(){var e=this.$element,t=this.$mdUtil,n=this.$scope,r=this,o=[];e.on("keydown",this.handleKeyDown),this.parentToolbar=t.getClosest(e,"MD-TOOLBAR"),o.push(this.$rootScope.$on("$mdMenuOpen",function(t,n){r.getMenus().indexOf(n[0])!=-1&&(e[0].classList.add("md-open"),n[0].classList.add("md-open"),r.currentlyOpenMenu=n.controller("mdMenu"),r.currentlyOpenMenu.registerContainerProxy(r.handleKeyDown),r.enableOpenOnHover())})),o.push(this.$rootScope.$on("$mdMenuClose",function(n,o,i){var a=r.getMenus();if(a.indexOf(o[0])!=-1&&(e[0].classList.remove("md-open"),o[0].classList.remove("md-open")),e[0].contains(o[0])){for(var l=o[0];l&&a.indexOf(l)==-1;)l=t.getClosest(l,"MD-MENU",!0);l&&(i.skipFocus||l.querySelector("button:not([disabled])").focus(),r.currentlyOpenMenu=void 0,r.disableOpenOnHover(),r.setKeyboardMode(!0))}})),n.$on("$destroy",function(){for(;o.length;)o.shift()()}),this.setKeyboardMode(!0)},MenuBarController.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("md-keyboard-mode"):this.$element[0].classList.remove("md-keyboard-mode")},MenuBarController.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){this.openOnHoverEnabled=!0;var e;(e=this.parentToolbar)&&(e.dataset.mdRestoreStyle=e.getAttribute("style"),e.style.position="relative",e.style.zIndex=100),angular.element(this.getMenus()).on("mouseenter",this.handleMenuHover)}},MenuBarController.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},MenuBarController.prototype.disableOpenOnHover=function(){if(this.openOnHoverEnabled){this.openOnHoverEnabled=!1;var e;(e=this.parentToolbar)&&(e.style.cssText=e.dataset.mdRestoreStyle||""),angular.element(this.getMenus()).off("mouseenter",this.handleMenuHover)}},MenuBarController.prototype.scheduleOpenHoveredMenu=function(e){var t=angular.element(e.currentTarget),n=t.controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(n)},MenuBarController.prototype.scheduleOpenMenu=function(e){var t=this,n=this.$timeout;e!=t.currentlyOpenMenu&&(n.cancel(t.pendingMenuOpen),t.pendingMenuOpen=n(function(){t.pendingMenuOpen=void 0,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},MenuBarController.prototype.handleKeyDown=function(e){var t=this.$mdConstant.KEY_CODE,n=this.currentlyOpenMenu,r=n&&n.isOpen;this.setKeyboardMode(!0);var o,i,a;switch(e.keyCode){case t.DOWN_ARROW:n?n.focusMenuContainer():this.openFocusedMenu(),o=!0;break;case t.UP_ARROW:n&&n.close(),o=!0;break;case t.LEFT_ARROW:i=this.focusMenu(-1),r&&(a=angular.element(i).controller("mdMenu"),this.scheduleOpenMenu(a)),o=!0;break;case t.RIGHT_ARROW:i=this.focusMenu(1),r&&(a=angular.element(i).controller("mdMenu"),this.scheduleOpenMenu(a)),o=!0}o&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},MenuBarController.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();n==-1&&(n=this.getOpenMenuIndex());var r=!1;if(n==-1?(n=0,r=!0):(e<0&&n>0||e>0&&n<t.length-e)&&(n+=e,r=!0),r)return t[n].querySelector("button").focus(),t[n]},MenuBarController.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&angular.element(e).controller("mdMenu").open()},MenuBarController.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},MenuBarController.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},MenuBarController.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil,t=e.getClosest(this.$document[0].activeElement,"MD-MENU");if(!t)return-1;var n=this.getMenus().indexOf(t);return n},MenuBarController.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("md-open"))return t;return-1},angular.module("material.components.menuBar").directive("mdMenuBar",MenuBarDirective),MenuBarDirective.$inject=["$mdUtil","$mdTheming"],angular.module("material.components.menuBar").directive("mdMenuDivider",MenuDividerDirective),angular.module("material.components.menuBar").controller("MenuItemController",MenuItemController),MenuItemController.$inject=["$scope","$element","$attrs"],MenuItemController.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},MenuItemController.prototype.clearNgAria=function(){var e=this.$element[0],t=["role","tabindex","aria-invalid","aria-checked"];angular.forEach(t,function(t){e.removeAttribute(t)})},MenuItemController.prototype.initClickListeners=function(){function e(){if("radio"==a){var e=i.ngValue?o.$eval(i.ngValue):i.value;return r.$modelValue==e}return r.$modelValue}function t(e){e?u.off("click",s):u.on("click",s)}var n=this,r=this.ngModel,o=this.$scope,i=this.$attrs,a=(this.$element,this.mode);this.handleClick=angular.bind(this,this.handleClick);var l=this.iconEl,u=angular.element(this.buttonEl),s=this.handleClick;i.$observe("disabled",t),t(i.disabled),r.$render=function(){n.clearNgAria(),e()?(l.style.display="",u.attr("aria-checked","true")):(l.style.display="none",u.attr("aria-checked","false"))},o.$$postDigest(r.$render)},MenuItemController.prototype.handleClick=function(e){var t,n=this.mode,r=this.ngModel,o=this.$attrs;"checkbox"==n?t=!r.$modelValue:"radio"==n&&(t=o.ngValue?this.$scope.$eval(o.ngValue):o.value),r.$setViewValue(t),r.$render()},angular.module("material.components.menuBar").directive("mdMenuItem",MenuItemDirective),MenuItemDirective.$inject=["$mdUtil"],ngmaterial.components.menuBar=angular.module("material.components.menuBar");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.navBar');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.navBar');
goog.require('ngmaterial.core');
/**

@@ -118,3 +118,3 @@ * @ngdoc module

'<nav role="navigation">' +
'<ul class="_md-nav-bar-list" layout="row" ng-transclude role="listbox"' +
'<ul class="_md-nav-bar-list" ng-transclude role="listbox"' +
'tabindex="0"' +

@@ -222,24 +222,22 @@ 'ng-focus="ctrl.onFocus()"' +

MdNavBarController.prototype._updateTabs = function(newValue, oldValue) {
var self = this;
var tabs = this._getTabs();
var oldIndex = -1;
var newIndex = -1;
var newTab = this._getTabByName(newValue);
var oldTab = this._getTabByName(oldValue);
var oldIndex;
if (oldValue) {
var oldTab = this._getTabByName(oldValue);
if (oldTab) {
oldTab.setSelected(false);
oldIndex = tabs.indexOf(oldTab);
}
if (oldTab) {
oldTab.setSelected(false);
oldIndex = tabs.indexOf(oldTab);
}
if (newValue) {
var tab = this._getTabByName(newValue);
if (tab) {
tab.setSelected(true);
var newIndex = tabs.indexOf(tab);
var self = this;
this._$timeout(function() {
self._updateInkBarStyles(tab, newIndex, oldIndex);
});
}
if (newTab) {
newTab.setSelected(true);
newIndex = tabs.indexOf(newTab);
}
this._$timeout(function() {
self._updateInkBarStyles(newTab, newIndex, oldIndex);
});
};

@@ -252,8 +250,13 @@

MdNavBarController.prototype._updateInkBarStyles = function(tab, newIndex, oldIndex) {
var tabEl = tab.getButtonEl();
var left = tabEl.offsetLeft;
this._inkbar.toggleClass('_md-left', newIndex < oldIndex)
.toggleClass('_md-right', newIndex > oldIndex);
this._inkbar.css({left: left + 'px', width: tabEl.offsetWidth + 'px'});
this._inkbar.css({display: newIndex < 0 ? 'none' : ''});
if(tab){
var tabEl = tab.getButtonEl();
var left = tabEl.offsetLeft;
this._inkbar.css({left: left + 'px', width: tabEl.offsetWidth + 'px'});
}
};

@@ -551,2 +554,2 @@

ng.material.components.navBar = angular.module("material.components.navBar");
ngmaterial.components.navBar = angular.module("material.components.navBar");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdNavBar(t){return{restrict:"E",transclude:!0,controller:MdNavBarController,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" layout="row" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>',link:function(e,n,a,r){r.navBarAriaLabel||t.expectAsync(n,"aria-label",angular.noop)}}}function MdNavBarController(t,e,n,a){this._$timeout=n,this._$scope=e,this._$mdConstant=a,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=t[0],this._inkbar;var r=this,o=this._$scope.$watch(function(){return r._navBarEl.querySelectorAll("._md-nav-button").length},function(t){t>0&&(r._initTabs(),o())})}function MdNavItem(t){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:MdNavItemController,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>',scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",name:"@"},link:function(e,n,a,r){var o=r[0],l=r[1];t(function(){o.name||(o.name=angular.element(n[0].querySelector("._md-nav-button-text")).text().trim());var t=angular.element(n[0].querySelector("._md-nav-button"));t.on("click",function(){l.mdSelectedNavItem=o.name,e.$apply()})})}}}function MdNavItemController(t){this._$element=t,this.mdNavClick,this.mdNavHref,this.name,this._selected=!1,this._focused=!1;var e=!!t.attr("md-nav-click"),n=!!t.attr("md-nav-href"),a=!!t.attr("md-nav-sref");if((e?1:0)+(n?1:0)+(a?1:0)>1)throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive")}goog.provide("ng.material.components.navBar"),goog.require("ng.material.core"),angular.module("material.components.navBar",["material.core"]).controller("MdNavBarController",MdNavBarController).directive("mdNavBar",MdNavBar).controller("MdNavItemController",MdNavItemController).directive("mdNavItem",MdNavItem),MdNavBar.$inject=["$mdAria"],MdNavBarController.$inject=["$element","$scope","$timeout","$mdConstant"],MdNavBarController.prototype._initTabs=function(){this._inkbar=angular.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]);var t=this;this._$timeout(function(){t._updateTabs(t.mdSelectedNavItem,void 0)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,n){t._$timeout(function(){t._updateTabs(e,n)})})},MdNavBarController.prototype._updateTabs=function(t,e){var n,a=this._getTabs();if(e){var r=this._getTabByName(e);r&&(r.setSelected(!1),n=a.indexOf(r))}if(t){var o=this._getTabByName(t);if(o){o.setSelected(!0);var l=a.indexOf(o),i=this;this._$timeout(function(){i._updateInkBarStyles(o,l,n)})}}},MdNavBarController.prototype._updateInkBarStyles=function(t,e,n){var a=t.getButtonEl(),r=a.offsetLeft;this._inkbar.toggleClass("_md-left",n>e).toggleClass("_md-right",e>n),this._inkbar.css({left:r+"px",width:a.offsetWidth+"px"})},MdNavBarController.prototype._getTabs=function(){var t=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item"));return t.map(function(t){return angular.element(t).controller("mdNavItem")})},MdNavBarController.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},MdNavBarController.prototype._getSelectedTab=function(){return this._findTab(function(t){return t.isSelected()})},MdNavBarController.prototype.getFocusedTab=function(){return this._findTab(function(t){return t.hasFocus()})},MdNavBarController.prototype._findTab=function(t){for(var e=this._getTabs(),n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},MdNavBarController.prototype.onFocus=function(){var t=this._getSelectedTab();t&&t.setFocused(!0)},MdNavBarController.prototype.onBlur=function(){var t=this.getFocusedTab();t&&t.setFocused(!1)},MdNavBarController.prototype._moveFocus=function(t,e){t.setFocused(!1),e.setFocused(!0)},MdNavBarController.prototype.onKeydown=function(t){var e=this._$mdConstant.KEY_CODE,n=this._getTabs(),a=this.getFocusedTab();if(a){var r=n.indexOf(a);switch(t.keyCode){case e.UP_ARROW:case e.LEFT_ARROW:r>0&&this._moveFocus(a,n[r-1]);break;case e.DOWN_ARROW:case e.RIGHT_ARROW:r<n.length-1&&this._moveFocus(a,n[r+1]);break;case e.SPACE:case e.ENTER:this._$timeout(function(){a.getButtonEl().click()})}}},MdNavItem.$inject=["$$rAF"],MdNavItemController.$inject=["$element"],MdNavItemController.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},MdNavItemController.prototype.getName=function(){return this.name},MdNavItemController.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},MdNavItemController.prototype.setSelected=function(t){this._selected=t},MdNavItemController.prototype.isSelected=function(){return this._selected},MdNavItemController.prototype.setFocused=function(t){this._focused=t},MdNavItemController.prototype.hasFocus=function(){return this._focused},ng.material.components.navBar=angular.module("material.components.navBar");
function MdNavBar(t){return{restrict:"E",transclude:!0,controller:MdNavBarController,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>',link:function(e,n,a,r){r.navBarAriaLabel||t.expectAsync(n,"aria-label",angular.noop)}}}function MdNavBarController(t,e,n,a){this._$timeout=n,this._$scope=e,this._$mdConstant=a,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=t[0],this._inkbar;var r=this,o=this._$scope.$watch(function(){return r._navBarEl.querySelectorAll("._md-nav-button").length},function(t){t>0&&(r._initTabs(),o())})}function MdNavItem(t){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:MdNavItemController,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>',scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",name:"@"},link:function(e,n,a,r){var o=r[0],l=r[1];t(function(){o.name||(o.name=angular.element(n[0].querySelector("._md-nav-button-text")).text().trim());var t=angular.element(n[0].querySelector("._md-nav-button"));t.on("click",function(){l.mdSelectedNavItem=o.name,e.$apply()})})}}}function MdNavItemController(t){this._$element=t,this.mdNavClick,this.mdNavHref,this.name,this._selected=!1,this._focused=!1;var e=!!t.attr("md-nav-click"),n=!!t.attr("md-nav-href"),a=!!t.attr("md-nav-sref");if((e?1:0)+(n?1:0)+(a?1:0)>1)throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive")}goog.provide("ngmaterial.components.navBar"),goog.require("ngmaterial.core"),angular.module("material.components.navBar",["material.core"]).controller("MdNavBarController",MdNavBarController).directive("mdNavBar",MdNavBar).controller("MdNavItemController",MdNavItemController).directive("mdNavItem",MdNavItem),MdNavBar.$inject=["$mdAria"],MdNavBarController.$inject=["$element","$scope","$timeout","$mdConstant"],MdNavBarController.prototype._initTabs=function(){this._inkbar=angular.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]);var t=this;this._$timeout(function(){t._updateTabs(t.mdSelectedNavItem,void 0)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,n){t._$timeout(function(){t._updateTabs(e,n)})})},MdNavBarController.prototype._updateTabs=function(t,e){var n=this,a=this._getTabs(),r=-1,o=-1,l=this._getTabByName(t),i=this._getTabByName(e);i&&(i.setSelected(!1),r=a.indexOf(i)),l&&(l.setSelected(!0),o=a.indexOf(l)),this._$timeout(function(){n._updateInkBarStyles(l,o,r)})},MdNavBarController.prototype._updateInkBarStyles=function(t,e,n){if(this._inkbar.toggleClass("_md-left",e<n).toggleClass("_md-right",e>n),this._inkbar.css({display:e<0?"none":""}),t){var a=t.getButtonEl(),r=a.offsetLeft;this._inkbar.css({left:r+"px",width:a.offsetWidth+"px"})}},MdNavBarController.prototype._getTabs=function(){var t=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item"));return t.map(function(t){return angular.element(t).controller("mdNavItem")})},MdNavBarController.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},MdNavBarController.prototype._getSelectedTab=function(){return this._findTab(function(t){return t.isSelected()})},MdNavBarController.prototype.getFocusedTab=function(){return this._findTab(function(t){return t.hasFocus()})},MdNavBarController.prototype._findTab=function(t){for(var e=this._getTabs(),n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},MdNavBarController.prototype.onFocus=function(){var t=this._getSelectedTab();t&&t.setFocused(!0)},MdNavBarController.prototype.onBlur=function(){var t=this.getFocusedTab();t&&t.setFocused(!1)},MdNavBarController.prototype._moveFocus=function(t,e){t.setFocused(!1),e.setFocused(!0)},MdNavBarController.prototype.onKeydown=function(t){var e=this._$mdConstant.KEY_CODE,n=this._getTabs(),a=this.getFocusedTab();if(a){var r=n.indexOf(a);switch(t.keyCode){case e.UP_ARROW:case e.LEFT_ARROW:r>0&&this._moveFocus(a,n[r-1]);break;case e.DOWN_ARROW:case e.RIGHT_ARROW:r<n.length-1&&this._moveFocus(a,n[r+1]);break;case e.SPACE:case e.ENTER:this._$timeout(function(){a.getButtonEl().click()})}}},MdNavItem.$inject=["$$rAF"],MdNavItemController.$inject=["$element"],MdNavItemController.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},MdNavItemController.prototype.getName=function(){return this.name},MdNavItemController.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},MdNavItemController.prototype.setSelected=function(t){this._selected=t},MdNavItemController.prototype.isSelected=function(){return this._selected},MdNavItemController.prototype.setFocused=function(t){this._focused=t},MdNavItemController.prototype.hasFocus=function(){return this._focused},ngmaterial.components.navBar=angular.module("material.components.navBar");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdPanelService(t,n,e,o){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,transformTemplate:angular.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:defaultZIndex},this._config={},this._$rootElement=t,this._$rootScope=n,this._$injector=e,this._$window=o,this.animation=MdPanelAnimation.animation,this.xPosition=MdPanelPosition.xPosition,this.yPosition=MdPanelPosition.yPosition}function MdPanelRef(t,n){this._$q=n.get("$q"),this._$mdCompiler=n.get("$mdCompiler"),this._$mdConstant=n.get("$mdConstant"),this._$mdUtil=n.get("$mdUtil"),this._$rootScope=n.get("$rootScope"),this._$animate=n.get("$animate"),this._$mdPanel=n.get("$mdPanel"),this._$log=n.get("$log"),this._$window=n.get("$window"),this._$$rAF=n.get("$$rAF"),this.id=t.id,this.isAttached=!1,this._config=t,this._panelContainer,this._panelEl,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null}function MdPanelPosition(t){this._$window=t,this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function MdPanelAnimation(t){this._$mdUtil=t.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass=""}function getElement(t){var n=angular.isString(t)?document.querySelector(t):t;return angular.element(n)}goog.provide("ng.material.components.panel"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.panel",["material.core","material.components.backdrop"]).service("$mdPanel",MdPanelService);var defaultZIndex=80,MD_PANEL_HIDDEN="_md-panel-hidden",FOCUS_TRAP_TEMPLATE=angular.element('<div class="_md-panel-focus-trap" tabindex="0"></div>');MdPanelService.$inject=["$rootElement","$rootScope","$injector","$window"],MdPanelService.prototype.create=function(t){var n=t||{};this._config={scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},angular.extend(this._config,this._defaultConfigOptions,n);var e="panel_"+this._$injector.get("$mdUtil").nextUid(),o=angular.extend({id:e},this._config);return new MdPanelRef(o,this._$injector)},MdPanelService.prototype.open=function(t){var n=this.create(t);return n.open().then(function(){return n})},MdPanelService.prototype.newPanelPosition=function(){return new MdPanelPosition(this._$window)},MdPanelService.prototype.newPanelAnimation=function(){return new MdPanelAnimation(this._$injector)},MdPanelService.prototype._wrapTemplate=function(t){var n=t||"";return'<div class="md-panel-outer-wrapper"> <div class="md-panel" style="left: -9999px;">'+n+"</div></div>"},MdPanelRef.prototype.open=function(){var t=this;return this._$q(function(n,e){var o=t._done(n,t),i=t._simpleBind(t.show,t);t.attach().then(i).then(o)["catch"](e)})},MdPanelRef.prototype.close=function(){var t=this;return this._$q(function(n,e){var o=t._done(n,t),i=t._simpleBind(t.detach,t);t.hide().then(i).then(o)["catch"](e)})},MdPanelRef.prototype.attach=function(){if(this.isAttached&&this._panelEl)return this._$q.when(this);var t=this;return this._$q(function(n,e){var o=t._done(n,t),i=t._config.onDomAdded||angular.noop,a=function(n){return t.isAttached=!0,t._addEventListeners(),n};t._$q.all([t._createBackdrop(),t._createPanel().then(a)["catch"](e)]).then(i).then(o)["catch"](e)})},MdPanelRef.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var t=this,n=t._config.onDomRemoved||angular.noop,e=function(){return t._removeEventListeners(),t._topFocusTrap&&t._topFocusTrap.parentNode&&t._topFocusTrap.parentNode.removeChild(t._topFocusTrap),t._bottomFocusTrap&&t._bottomFocusTrap.parentNode&&t._bottomFocusTrap.parentNode.removeChild(t._bottomFocusTrap),t._panelContainer.remove(),t.isAttached=!1,t._$q.when(t)};return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(o,i){var a=t._done(o,t);t._$q.all([e(),t._backdropRef?t._backdropRef.detach():!0]).then(n).then(a)["catch"](i)})},MdPanelRef.prototype.destroy=function(){this._config.locals=null},MdPanelRef.prototype.show=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(!this._panelContainer.hasClass(MD_PANEL_HIDDEN))return this._$q.when(this);var t=this,n=function(){return t.removeClass(MD_PANEL_HIDDEN),t._animateOpen()};return this._$q(function(e,o){var i=t._done(e,t),a=t._config.onOpenComplete||angular.noop;t._$q.all([t._backdropRef?t._backdropRef.show():t,n().then(function(){t._focusOnOpen()},o)]).then(a).then(i)["catch"](o)})},MdPanelRef.prototype.hide=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(this._panelContainer.hasClass(MD_PANEL_HIDDEN))return this._$q.when(this);var t=this;return this._$q(function(n,e){var o=t._done(n,t),i=t._config.onRemoving||angular.noop,a=function(){var n=t._config.origin;n&&getElement(n).focus()},s=function(){t.addClass(MD_PANEL_HIDDEN)};t._$q.all([t._backdropRef?t._backdropRef.hide():t,t._animateClose().then(i).then(s).then(a)["catch"](e)]).then(o,e)})},MdPanelRef.prototype.addClass=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this._panelContainer.hasClass(t)||this._panelContainer.addClass(t)},MdPanelRef.prototype.removeClass=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this._panelContainer.hasClass(t)&&this._panelContainer.removeClass(t)},MdPanelRef.prototype.toggleClass=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this._panelContainer.toggleClass(t)},MdPanelRef.prototype._createPanel=function(){var t=this;return this._$q(function(n,e){t._config.locals||(t._config.locals={}),t._config.locals.mdPanelRef=t,t._$mdCompiler.compile(t._config).then(function(o){t._panelContainer=o.link(t._config.scope),getElement(t._config.attachTo).append(t._panelContainer),t._config.disableParentScroll&&(t._restoreScroll=t._$mdUtil.disableScrollAround(null,t._panelContainer)),t._panelEl=angular.element(t._panelContainer[0].querySelector(".md-panel")),t._config.panelClass&&t._panelEl.addClass(t._config.panelClass),t._$animate.pin&&t._$animate.pin(t._panelContainer,getElement(t._config.attachTo)),t._configureTrapFocus(),t._addStyles().then(function(){n(t)},e)},e)})},MdPanelRef.prototype._addStyles=function(){var t=this;return this._$q(function(n){t._panelContainer.css("z-index",t._config.zIndex),t._panelEl.css("z-index",t._config.zIndex+1);var e=function(){t._panelEl.css("left",""),t._panelContainer.addClass(MD_PANEL_HIDDEN),n(t)};if(t._config.fullscreen)return t._panelEl.addClass("_md-panel-fullscreen"),void e();var o=t._config.position;return o?void t._$rootScope.$$postDigest(function(){t._updatePosition(!0),n(t)}):void e()})},MdPanelRef.prototype._updatePosition=function(t){var n=this._config.position;if(n){n._setPanelPosition(this._panelEl),t&&this._panelContainer.addClass(MD_PANEL_HIDDEN),this._panelEl.css("top",n.getTop()),this._panelEl.css("bottom",n.getBottom()),this._panelEl.css("left",n.getLeft()),this._panelEl.css("right",n.getRight());var e=this._$mdConstant.CSS.TRANSFORM;this._panelEl.css(e,n.getTransform())}},MdPanelRef.prototype._focusOnOpen=function(){if(this._config.focusOnOpen){var t=this;this._$rootScope.$$postDigest(function(){var n=t._$mdUtil.findFocusTarget(t._panelEl)||t._panelEl;n.focus()})}},MdPanelRef.prototype._createBackdrop=function(){if(this._config.hasBackdrop){if(!this._backdropRef){var t=this._$mdPanel.newPanelAnimation().openFrom(this._config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"}),n={animation:t,attachTo:this._config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this._config.zIndex-1};this._backdropRef=this._$mdPanel.create(n)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},MdPanelRef.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},MdPanelRef.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(t){t()}),this._removeListeners=null},MdPanelRef.prototype._configureEscapeToClose=function(){if(this._config.escapeToClose){var t=getElement(this._config.attachTo),n=this,e=function(t){t.keyCode===n._$mdConstant.KEY_CODE.ESCAPE&&(t.stopPropagation(),t.preventDefault(),n.close())};this._panelContainer.on("keydown",e),t.on("keydown",e),this._removeListeners.push(function(){n._panelContainer.off("keydown",e),t.off("keydown",e)})}},MdPanelRef.prototype._configureClickOutsideToClose=function(){if(this._config.clickOutsideToClose){var t,n=this._panelContainer,e=function(n){t=n.target},o=this,i=function(e){t===n[0]&&e.target===n[0]&&(e.stopPropagation(),e.preventDefault(),o.close())};n.on("mousedown",e),n.on("mouseup",i),this._removeListeners.push(function(){n.off("mousedown",e),n.off("mouseup",i)})}},MdPanelRef.prototype._configureScrollListener=function(){var t=angular.bind(this,this._updatePosition),n=this._$$rAF.throttle(t),e=this,o=function(){e._config.disableParentScroll||n()};this._$window.addEventListener("scroll",o,!0),this._removeListeners.push(function(){e._$window.removeEventListener("scroll",o,!0)})},MdPanelRef.prototype._configureTrapFocus=function(){if(this._panelEl.attr("tabIndex","-1"),this._config.trapFocus){var t=this._panelEl;this._topFocusTrap=FOCUS_TRAP_TEMPLATE.clone()[0],this._bottomFocusTrap=FOCUS_TRAP_TEMPLATE.clone()[0];var n=function(){t.focus()};this._topFocusTrap.addEventListener("focus",n),this._bottomFocusTrap.addEventListener("focus",n),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",n),this._bottomFocusTrap.removeEventListener("focus",n)},this)),t[0].parentNode.insertBefore(this._topFocusTrap,t[0]),t.after(this._bottomFocusTrap)}},MdPanelRef.prototype._animateOpen=function(){this.addClass("md-panel-is-showing");var t=this._config.animation;if(!t)return this.addClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(e){var o=n._done(e,n),i=function(){n._$log.warn("MdPanel Animations failed. Showing panel without animating."),o()};t.animateOpen(n._panelEl).then(o,i)})},MdPanelRef.prototype._animateClose=function(){var t=this._config.animation;if(!t)return this.removeClass("md-panel-is-showing"),this.removeClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(e){var o=function(){n.removeClass("md-panel-is-showing"),e(n)},i=function(){n._$log.warn("MdPanel Animations failed. Hiding panel without animating."),o()};t.animateClose(n._panelEl).then(o,i)})},MdPanelRef.prototype._simpleBind=function(t,n){return function(e){return t.apply(n,e)}},MdPanelRef.prototype._done=function(t,n){return function(){t(n)}},MdPanelPosition.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},MdPanelPosition.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},MdPanelPosition.prototype.absolute=function(){return this._absolute=!0,this},MdPanelPosition.prototype.top=function(t){return this._bottom="",this._top=t||"0",this},MdPanelPosition.prototype.bottom=function(t){return this._top="",this._bottom=t||"0",this},MdPanelPosition.prototype.left=function(t){return this._right="",this._left=t||"0",this},MdPanelPosition.prototype.right=function(t){return this._left="",this._right=t||"0",this},MdPanelPosition.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},MdPanelPosition.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},MdPanelPosition.prototype.center=function(){return this.centerHorizontally().centerVertically()},MdPanelPosition.prototype.relativeTo=function(t){return this._absolute=!1,this._relativeToEl=getElement(t),this},MdPanelPosition.prototype.addPanelPosition=function(t,n){if(!this._relativeToEl)throw new Error("addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(t),this._validateYPosition(n),this._positions.push({x:t,y:n}),this},MdPanelPosition.prototype._validateYPosition=function(t){if(null!=t){for(var n,e=Object.keys(MdPanelPosition.yPosition),o=[],i=0;n=e[i];i++){var a=MdPanelPosition.yPosition[n];if(o.push(a),a===t)return}throw new Error("Panel y position only accepts the following values:\n"+o.join(" | "))}},MdPanelPosition.prototype._validateXPosition=function(t){if(null!=t){for(var n,e=Object.keys(MdPanelPosition.xPosition),o=[],i=0;n=e[i];i++){var a=MdPanelPosition.xPosition[n];if(o.push(a),a===t)return}throw new Error("Panel x Position only accepts the following values:\n"+o.join(" | "))}},MdPanelPosition.prototype.withOffsetX=function(t){return this._translateX.push(t),this},MdPanelPosition.prototype.withOffsetY=function(t){return this._translateY.push(t),this},MdPanelPosition.prototype.getTop=function(){return this._top},MdPanelPosition.prototype.getBottom=function(){return this._bottom},MdPanelPosition.prototype.getLeft=function(){return this._left},MdPanelPosition.prototype.getRight=function(){return this._right},MdPanelPosition.prototype.getTransform=function(){var t=this._reduceTranslateValues("translateX",this._translateX),n=this._reduceTranslateValues("translateY",this._translateY);return(t+" "+n).trim()},MdPanelPosition.prototype._isOnscreen=function(t){var n=parseInt(this.getLeft()),e=parseInt(this.getTop()),o=n+t[0].offsetWidth,i=e+t[0].offsetHeight;return n>=0&&e>=0&&i<=this._$window.innerHeight&&o<=this._$window.innerWidth},MdPanelPosition.prototype.getActualPosition=function(){return this._actualPosition},MdPanelPosition.prototype._reduceTranslateValues=function(t,n){return n.map(function(n){return t+"("+n+")"}).join(" ")},MdPanelPosition.prototype._setPanelPosition=function(t){if(!this._absolute){if(this._actualPosition)return void this._calculatePanelPosition(t,this._actualPosition);for(var n=0;n<this._positions.length&&(this._actualPosition=this._positions[n],this._calculatePanelPosition(t,this._actualPosition),!this._isOnscreen(t));n++);}},MdPanelPosition.prototype._calculatePanelPosition=function(t,n){var e=t[0].getBoundingClientRect(),o=e.width,i=e.height,a=this._relativeToEl[0].getBoundingClientRect(),s=a.left,r=a.right,l=a.width;switch(n.x){case MdPanelPosition.xPosition.OFFSET_START:this._left=s-o+"px";break;case MdPanelPosition.xPosition.ALIGN_END:this._left=r-o+"px";break;case MdPanelPosition.xPosition.CENTER:var h=s+.5*l-.5*o;this._left=h+"px";break;case MdPanelPosition.xPosition.ALIGN_START:this._left=s+"px";break;case MdPanelPosition.xPosition.OFFSET_END:this._left=r+"px"}var c=a.top,p=a.bottom,_=a.height;switch(n.y){case MdPanelPosition.yPosition.ABOVE:this._top=c-i+"px";break;case MdPanelPosition.yPosition.ALIGN_BOTTOMS:this._top=p-i+"px";break;case MdPanelPosition.yPosition.CENTER:var d=c+.5*_-.5*i;this._top=d+"px";break;case MdPanelPosition.yPosition.ALIGN_TOPS:this._top=c+"px";break;case MdPanelPosition.yPosition.BELOW:this._top=p+"px"}},MdPanelAnimation.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},MdPanelAnimation.prototype.openFrom=function(t){return t=t.target?t.target:t,this._openFrom=this._getPanelAnimationTarget(t),this._closeTo||(this._closeTo=this._openFrom),this},MdPanelAnimation.prototype.closeTo=function(t){return this._closeTo=this._getPanelAnimationTarget(t),this},MdPanelAnimation.prototype._getPanelAnimationTarget=function(t){return angular.isDefined(t.top)||angular.isDefined(t.left)?{element:void 0,bounds:{top:t.top||0,left:t.left||0}}:this._getBoundingClientRect(getElement(t))},MdPanelAnimation.prototype.withAnimation=function(t){return this._animationClass=t,this},MdPanelAnimation.prototype.animateOpen=function(t){var n=this._$mdUtil.dom.animator;this._fixBounds(t);var e={},o=t[0].style.transform||"",i=n.toTransformCss(o),a=n.toTransformCss(o);switch(this._animationClass){case MdPanelAnimation.animation.SLIDE:t.css("opacity","1"),e={transitionInClass:"_md-panel-animate-enter"};var s=n.calculateSlideToOrigin(t,this._openFrom)||"";i=n.toTransformCss(s+" "+o);break;case MdPanelAnimation.animation.SCALE:e={transitionInClass:"_md-panel-animate-enter"};var r=n.calculateZoomToOrigin(t,this._openFrom)||"";i=n.toTransformCss(r+" "+o);break;case MdPanelAnimation.animation.FADE:e={transitionInClass:"_md-panel-animate-enter"};break;default:e=angular.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return n.translate3d(t,i,a,e)},MdPanelAnimation.prototype.animateClose=function(t){var n=this._$mdUtil.dom.animator,e={},o=t[0].style.transform||"",i=n.toTransformCss(o),a=n.toTransformCss(o);switch(this._animationClass){case MdPanelAnimation.animation.SLIDE:t.css("opacity","1"),e={transitionInClass:"_md-panel-animate-leave"};var s=n.calculateSlideToOrigin(t,this._closeTo)||"";a=n.toTransformCss(s+" "+o);break;case MdPanelAnimation.animation.SCALE:e={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var r=n.calculateZoomToOrigin(t,this._closeTo)||"";a=n.toTransformCss(r+" "+o);break;case MdPanelAnimation.animation.FADE:e={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:e=angular.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return n.translate3d(t,i,a,e)},MdPanelAnimation.prototype._fixBounds=function(t){var n=t[0].offsetWidth,e=t[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=e),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=n),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=e),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=n)},MdPanelAnimation.prototype._getBoundingClientRect=function(t){return t instanceof angular.element?{element:t,bounds:t[0].getBoundingClientRect()}:void 0},ng.material.components.panel=angular.module("material.components.panel");
function MdPanelService(t,n,o,e){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:angular.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:defaultZIndex},this._config={},this._$rootElement=t,this._$rootScope=n,this._$injector=o,this._$window=e,this.animation=MdPanelAnimation.animation,this.xPosition=MdPanelPosition.xPosition,this.yPosition=MdPanelPosition.yPosition}function MdPanelRef(t,n){this._$q=n.get("$q"),this._$mdCompiler=n.get("$mdCompiler"),this._$mdConstant=n.get("$mdConstant"),this._$mdUtil=n.get("$mdUtil"),this._$rootScope=n.get("$rootScope"),this._$animate=n.get("$animate"),this._$mdPanel=n.get("$mdPanel"),this._$log=n.get("$log"),this._$window=n.get("$window"),this._$$rAF=n.get("$$rAF"),this.id=t.id,this.config=t,this.isAttached=!1,this._panelContainer,this._panelEl,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null}function MdPanelPosition(t){this._$window=t.get("$window"),this._isRTL="rtl"===t.get("$mdUtil").bidi(),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function MdPanelAnimation(t){this._$mdUtil=t.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass=""}function getElement(t){var n=angular.isString(t)?document.querySelector(t):t;return angular.element(n)}goog.provide("ngmaterial.components.panel"),goog.require("ngmaterial.components.backdrop"),goog.require("ngmaterial.core"),angular.module("material.components.panel",["material.core","material.components.backdrop"]).service("$mdPanel",MdPanelService);var defaultZIndex=80,MD_PANEL_HIDDEN="_md-panel-hidden",FOCUS_TRAP_TEMPLATE=angular.element('<div class="_md-panel-focus-trap" tabindex="0"></div>');MdPanelService.$inject=["$rootElement","$rootScope","$injector","$window"],MdPanelService.prototype.create=function(t){var n=t||{};this._config={scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},angular.extend(this._config,this._defaultConfigOptions,n);var o="panel_"+this._$injector.get("$mdUtil").nextUid(),e=angular.extend({id:o},this._config);return new MdPanelRef(e,this._$injector)},MdPanelService.prototype.open=function(t){var n=this.create(t);return n.open().then(function(){return n})},MdPanelService.prototype.newPanelPosition=function(){return new MdPanelPosition(this._$injector)},MdPanelService.prototype.newPanelAnimation=function(){return new MdPanelAnimation(this._$injector)},MdPanelService.prototype._wrapTemplate=function(t){var n=t||"";return'<div class="md-panel-outer-wrapper"> <div class="md-panel" style="left: -9999px;">'+n+"</div></div>"},MdPanelRef.prototype.open=function(){var t=this;return this._$q(function(n,o){var e=t._done(n,t),i=t._simpleBind(t.show,t);t.attach().then(i).then(e)["catch"](o)})},MdPanelRef.prototype.close=function(){var t=this;return this._$q(function(n,o){var e=t._done(n,t),i=t._simpleBind(t.detach,t);t.hide().then(i).then(e)["catch"](o)})},MdPanelRef.prototype.attach=function(){if(this.isAttached&&this._panelEl)return this._$q.when(this);var t=this;return this._$q(function(n,o){var e=t._done(n,t),i=t.config.onDomAdded||angular.noop,s=function(n){return t.isAttached=!0,t._addEventListeners(),n};t._$q.all([t._createBackdrop(),t._createPanel().then(s)["catch"](o)]).then(i).then(e)["catch"](o)})},MdPanelRef.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var t=this,n=t.config.onDomRemoved||angular.noop,o=function(){return t._removeEventListeners(),t._topFocusTrap&&t._topFocusTrap.parentNode&&t._topFocusTrap.parentNode.removeChild(t._topFocusTrap),t._bottomFocusTrap&&t._bottomFocusTrap.parentNode&&t._bottomFocusTrap.parentNode.removeChild(t._bottomFocusTrap),t._panelContainer.remove(),t.isAttached=!1,t._$q.when(t)};return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(e,i){var s=t._done(e,t);t._$q.all([o(),!t._backdropRef||t._backdropRef.detach()]).then(n).then(s)["catch"](i)})},MdPanelRef.prototype.destroy=function(){this.config.scope.$destroy(),this.config.locals=null},MdPanelRef.prototype.show=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(!this._panelContainer.hasClass(MD_PANEL_HIDDEN))return this._$q.when(this);var t=this,n=function(){return t.removeClass(MD_PANEL_HIDDEN),t._animateOpen()};return this._$q(function(o,e){var i=t._done(o,t),s=t.config.onOpenComplete||angular.noop;t._$q.all([t._backdropRef?t._backdropRef.show():t,n().then(function(){t._focusOnOpen()},e)]).then(s).then(i)["catch"](e)})},MdPanelRef.prototype.hide=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(this._panelContainer.hasClass(MD_PANEL_HIDDEN))return this._$q.when(this);var t=this;return this._$q(function(n,o){var e=t._done(n,t),i=t.config.onRemoving||angular.noop,s=function(){var n=t.config.origin;n&&getElement(n).focus()},a=function(){t.addClass(MD_PANEL_HIDDEN)};t._$q.all([t._backdropRef?t._backdropRef.hide():t,t._animateClose().then(i).then(a).then(s)["catch"](o)]).then(e,o)})},MdPanelRef.prototype.addClass=function(t,n){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");n||this._panelContainer.hasClass(t)?n&&!this._panelEl.hasClass(t)&&this._panelEl.addClass(t):this._panelContainer.addClass(t)},MdPanelRef.prototype.removeClass=function(t,n){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");!n&&this._panelContainer.hasClass(t)?this._panelContainer.removeClass(t):n&&this._panelEl.hasClass(t)&&this._panelEl.removeClass(t)},MdPanelRef.prototype.toggleClass=function(t,n){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");n?this._panelEl.toggleClass(t):this._panelContainer.toggleClass(t)},MdPanelRef.prototype._createPanel=function(){var t=this;return this._$q(function(n,o){t.config.locals||(t.config.locals={}),t.config.locals.mdPanelRef=t,t._$mdCompiler.compile(t.config).then(function(e){t._panelContainer=e.link(t.config.scope),getElement(t.config.attachTo).append(t._panelContainer),t.config.disableParentScroll&&(t._restoreScroll=t._$mdUtil.disableScrollAround(null,t._panelContainer,{disableScrollMask:!0})),t._panelEl=angular.element(t._panelContainer[0].querySelector(".md-panel")),t.config.panelClass&&t._panelEl.addClass(t.config.panelClass),t.config.propagateContainerEvents&&t._panelContainer.css("pointer-events","none"),t._$animate.pin&&t._$animate.pin(t._panelContainer,getElement(t.config.attachTo)),t._configureTrapFocus(),t._addStyles().then(function(){n(t)},o)},o)})},MdPanelRef.prototype._addStyles=function(){var t=this;return this._$q(function(n){t._panelContainer.css("z-index",t.config.zIndex),t._panelEl.css("z-index",t.config.zIndex+1);var o=function(){t._panelEl.css("left",""),t._panelContainer.addClass(MD_PANEL_HIDDEN),n(t)};if(t.config.fullscreen)return t._panelEl.addClass("_md-panel-fullscreen"),void o();var e=t.config.position;return e?void t._$rootScope.$$postDigest(function(){t._updatePosition(!0),n(t)}):void o()})},MdPanelRef.prototype.updatePosition=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this.config.position=t,this._updatePosition()},MdPanelRef.prototype._updatePosition=function(t){var n=this.config.position;if(n){n._setPanelPosition(this._panelEl),t&&this._panelContainer.addClass(MD_PANEL_HIDDEN),this._panelEl.css(MdPanelPosition.absPosition.TOP,n.getTop()),this._panelEl.css(MdPanelPosition.absPosition.BOTTOM,n.getBottom()),this._panelEl.css(MdPanelPosition.absPosition.LEFT,n.getLeft()),this._panelEl.css(MdPanelPosition.absPosition.RIGHT,n.getRight());var o=this._$mdConstant.CSS.TRANSFORM;this._panelEl.css(o,n.getTransform())}},MdPanelRef.prototype._focusOnOpen=function(){if(this.config.focusOnOpen){var t=this;this._$rootScope.$$postDigest(function(){var n=t._$mdUtil.findFocusTarget(t._panelEl)||t._panelEl;n.focus()})}},MdPanelRef.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var t=this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"}),n={animation:t,attachTo:this.config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(n)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},MdPanelRef.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},MdPanelRef.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(t){t()}),this._removeListeners=[]},MdPanelRef.prototype._configureEscapeToClose=function(){if(this.config.escapeToClose){var t=getElement(this.config.attachTo),n=this,o=function(t){t.keyCode===n._$mdConstant.KEY_CODE.ESCAPE&&(t.stopPropagation(),t.preventDefault(),n.close())};this._panelContainer.on("keydown",o),t.on("keydown",o),this._removeListeners.push(function(){n._panelContainer.off("keydown",o),t.off("keydown",o)})}},MdPanelRef.prototype._configureClickOutsideToClose=function(){if(this.config.clickOutsideToClose){var t,n=this._panelContainer,o=function(n){t=n.target},e=this,i=function(o){t===n[0]&&o.target===n[0]&&(o.stopPropagation(),o.preventDefault(),e.close())};n.on("mousedown",o),n.on("mouseup",i),this._removeListeners.push(function(){n.off("mousedown",o),n.off("mouseup",i)})}},MdPanelRef.prototype._configureScrollListener=function(){var t=angular.bind(this,this._updatePosition),n=this._$$rAF.throttle(t),o=this,e=function(){o.config.disableParentScroll||n()};this._$window.addEventListener("scroll",e,!0),this._removeListeners.push(function(){o._$window.removeEventListener("scroll",e,!0)})},MdPanelRef.prototype._configureTrapFocus=function(){if(this._panelEl.attr("tabIndex","-1"),this.config.trapFocus){var t=this._panelEl;this._topFocusTrap=FOCUS_TRAP_TEMPLATE.clone()[0],this._bottomFocusTrap=FOCUS_TRAP_TEMPLATE.clone()[0];var n=function(){t.focus()};this._topFocusTrap.addEventListener("focus",n),this._bottomFocusTrap.addEventListener("focus",n),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",n),this._bottomFocusTrap.removeEventListener("focus",n)},this)),t[0].parentNode.insertBefore(this._topFocusTrap,t[0]),t.after(this._bottomFocusTrap)}},MdPanelRef.prototype._animateOpen=function(){this.addClass("md-panel-is-showing");var t=this.config.animation;if(!t)return this.addClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(o){var e=n._done(o,n),i=function(){n._$log.warn("MdPanel Animations failed. Showing panel without animating."),e()};t.animateOpen(n._panelEl).then(e,i)})},MdPanelRef.prototype._animateClose=function(){var t=this.config.animation;if(!t)return this.removeClass("md-panel-is-showing"),this.removeClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(o){var e=function(){n.removeClass("md-panel-is-showing"),o(n)},i=function(){n._$log.warn("MdPanel Animations failed. Hiding panel without animating."),e()};t.animateClose(n._panelEl).then(e,i)})},MdPanelRef.prototype._simpleBind=function(t,n){return function(o){return t.apply(n,o)}},MdPanelRef.prototype._done=function(t,n){return function(){t(n)}},MdPanelPosition.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},MdPanelPosition.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},MdPanelPosition.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},MdPanelPosition.prototype.absolute=function(){return this._absolute=!0,this},MdPanelPosition.prototype._setPosition=function(t,n){if(t===MdPanelPosition.absPosition.RIGHT||t===MdPanelPosition.absPosition.LEFT)this._left=this._right="";else{if(t!==MdPanelPosition.absPosition.BOTTOM&&t!==MdPanelPosition.absPosition.TOP){var o=Object.keys(MdPanelPosition.absPosition).join().toLowerCase();throw new Error("Position must be one of "+o+".")}this._top=this._bottom=""}return this["_"+t]=angular.isString(n)?n:"0",this},MdPanelPosition.prototype.top=function(t){return this._setPosition(MdPanelPosition.absPosition.TOP,t)},MdPanelPosition.prototype.bottom=function(t){return this._setPosition(MdPanelPosition.absPosition.BOTTOM,t)},MdPanelPosition.prototype.start=function(t){var n=this._isRTL?MdPanelPosition.absPosition.RIGHT:MdPanelPosition.absPosition.LEFT;return this._setPosition(n,t)},MdPanelPosition.prototype.end=function(t){var n=this._isRTL?MdPanelPosition.absPosition.LEFT:MdPanelPosition.absPosition.RIGHT;return this._setPosition(n,t)},MdPanelPosition.prototype.left=function(t){return this._setPosition(MdPanelPosition.absPosition.LEFT,t)},MdPanelPosition.prototype.right=function(t){return this._setPosition(MdPanelPosition.absPosition.RIGHT,t)},MdPanelPosition.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},MdPanelPosition.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},MdPanelPosition.prototype.center=function(){return this.centerHorizontally().centerVertically()},MdPanelPosition.prototype.relativeTo=function(t){return this._absolute=!1,this._relativeToEl=getElement(t),this},MdPanelPosition.prototype.addPanelPosition=function(t,n){if(!this._relativeToEl)throw new Error("addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(t),this._validateYPosition(n),this._positions.push({x:t,y:n}),this},MdPanelPosition.prototype._validateYPosition=function(t){if(null!=t){for(var n,o=Object.keys(MdPanelPosition.yPosition),e=[],i=0;n=o[i];i++){var s=MdPanelPosition.yPosition[n];if(e.push(s),s===t)return}throw new Error("Panel y position only accepts the following values:\n"+e.join(" | "))}},MdPanelPosition.prototype._validateXPosition=function(t){if(null!=t){for(var n,o=Object.keys(MdPanelPosition.xPosition),e=[],i=0;n=o[i];i++){var s=MdPanelPosition.xPosition[n];if(e.push(s),s===t)return}throw new Error("Panel x Position only accepts the following values:\n"+e.join(" | "))}},MdPanelPosition.prototype.withOffsetX=function(t){return this._translateX.push(t),this},MdPanelPosition.prototype.withOffsetY=function(t){return this._translateY.push(t),this},MdPanelPosition.prototype.getTop=function(){return this._top},MdPanelPosition.prototype.getBottom=function(){return this._bottom},MdPanelPosition.prototype.getLeft=function(){return this._left},MdPanelPosition.prototype.getRight=function(){return this._right},MdPanelPosition.prototype.getTransform=function(){var t=this._reduceTranslateValues("translateX",this._translateX),n=this._reduceTranslateValues("translateY",this._translateY);return(t+" "+n).trim()},MdPanelPosition.prototype._isOnscreen=function(t){var n=parseInt(this.getLeft()),o=parseInt(this.getTop()),e=n+t[0].offsetWidth,i=o+t[0].offsetHeight;return n>=0&&o>=0&&i<=this._$window.innerHeight&&e<=this._$window.innerWidth},MdPanelPosition.prototype.getActualPosition=function(){return this._actualPosition},MdPanelPosition.prototype._reduceTranslateValues=function(t,n){return n.map(function(n){return t+"("+n+")"}).join(" ")},MdPanelPosition.prototype._setPanelPosition=function(t){if(!this._absolute){if(this._actualPosition)return void this._calculatePanelPosition(t,this._actualPosition);for(var n=0;n<this._positions.length&&(this._actualPosition=this._positions[n],this._calculatePanelPosition(t,this._actualPosition),!this._isOnscreen(t));n++);}},MdPanelPosition.prototype._reverseXPosition=function(t){if(t!==MdPanelPosition.xPosition.CENTER){var n="start",o="end";return t.indexOf(n)>-1?t.replace(n,o):t.replace(o,n)}},MdPanelPosition.prototype._bidi=function(t){return this._isRTL?this._reverseXPosition(t):t},MdPanelPosition.prototype._calculatePanelPosition=function(t,n){var o=t[0].getBoundingClientRect(),e=o.width,i=o.height,s=this._relativeToEl[0].getBoundingClientRect(),a=s.left,r=s.right,l=s.width;switch(this._bidi(n.x)){case MdPanelPosition.xPosition.OFFSET_START:this._left=a-e+"px";break;case MdPanelPosition.xPosition.ALIGN_END:this._left=r-e+"px";break;case MdPanelPosition.xPosition.CENTER:var h=a+.5*l-.5*e;this._left=h+"px";break;case MdPanelPosition.xPosition.ALIGN_START:this._left=a+"px";break;case MdPanelPosition.xPosition.OFFSET_END:this._left=r+"px"}var c=s.top,p=s.bottom,d=s.height;switch(n.y){case MdPanelPosition.yPosition.ABOVE:this._top=c-i+"px";break;case MdPanelPosition.yPosition.ALIGN_BOTTOMS:this._top=p-i+"px";break;case MdPanelPosition.yPosition.CENTER:var _=c+.5*d-.5*i;this._top=_+"px";break;case MdPanelPosition.yPosition.ALIGN_TOPS:this._top=c+"px";break;case MdPanelPosition.yPosition.BELOW:this._top=p+"px"}},MdPanelAnimation.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},MdPanelAnimation.prototype.openFrom=function(t){return t=t.target?t.target:t,this._openFrom=this._getPanelAnimationTarget(t),this._closeTo||(this._closeTo=this._openFrom),this},MdPanelAnimation.prototype.closeTo=function(t){return this._closeTo=this._getPanelAnimationTarget(t),this},MdPanelAnimation.prototype._getPanelAnimationTarget=function(t){return angular.isDefined(t.top)||angular.isDefined(t.left)?{element:void 0,bounds:{top:t.top||0,left:t.left||0}}:this._getBoundingClientRect(getElement(t))},MdPanelAnimation.prototype.withAnimation=function(t){return this._animationClass=t,this},MdPanelAnimation.prototype.animateOpen=function(t){var n=this._$mdUtil.dom.animator;this._fixBounds(t);var o={},e=t[0].style.transform||"",i=n.toTransformCss(e),s=n.toTransformCss(e);switch(this._animationClass){case MdPanelAnimation.animation.SLIDE:t.css("opacity","1"),o={transitionInClass:"_md-panel-animate-enter"};var a=n.calculateSlideToOrigin(t,this._openFrom)||"";i=n.toTransformCss(a+" "+e);break;case MdPanelAnimation.animation.SCALE:o={transitionInClass:"_md-panel-animate-enter"};var r=n.calculateZoomToOrigin(t,this._openFrom)||"";i=n.toTransformCss(r+" "+e);break;case MdPanelAnimation.animation.FADE:o={transitionInClass:"_md-panel-animate-enter"};break;default:o=angular.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return n.translate3d(t,i,s,o)},MdPanelAnimation.prototype.animateClose=function(t){var n=this._$mdUtil.dom.animator,o={},e=t[0].style.transform||"",i=n.toTransformCss(e),s=n.toTransformCss(e);switch(this._animationClass){case MdPanelAnimation.animation.SLIDE:t.css("opacity","1"),o={transitionInClass:"_md-panel-animate-leave"};var a=n.calculateSlideToOrigin(t,this._closeTo)||"";s=n.toTransformCss(a+" "+e);break;case MdPanelAnimation.animation.SCALE:o={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var r=n.calculateZoomToOrigin(t,this._closeTo)||"";s=n.toTransformCss(r+" "+e);break;case MdPanelAnimation.animation.FADE:o={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:o=angular.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return n.translate3d(t,i,s,o)},MdPanelAnimation.prototype._fixBounds=function(t){var n=t[0].offsetWidth,o=t[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=o),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=n),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=o),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=n)},MdPanelAnimation.prototype._getBoundingClientRect=function(t){if(t instanceof angular.element)return{element:t,bounds:t[0].getBoundingClientRect()}},ngmaterial.components.panel=angular.module("material.components.panel");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.progressCircular');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.progressCircular');
goog.require('ngmaterial.core');
/**

@@ -79,3 +79,3 @@ * @ngdoc module

var DISABLED_CLASS = '_md-progress-circular-disabled';
var INDETERMINATE_CLASS = '_md-mode-indeterminate';
var INDETERMINATE_CLASS = 'md-mode-indeterminate';

@@ -461,2 +461,2 @@ return {

ng.material.components.progressCircular = angular.module("material.components.progressCircular");
ngmaterial.components.progressCircular = angular.module("material.components.progressCircular");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdProgressCircularDirective(e,r,a,n,t,i){function o(i,o,u){function v(a,t,o,u,d){var g=++y,v=n.now(),f=t-a,p=l(i.mdDiameter),h=p-m(p),M=o||r.easeFn,C=u||r.duration;t===a?F.attr("d",s(t,p,h,d)):P=c(function w(r){var t=e.Math.max(0,e.Math.min((r||n.now())-v,C));F.attr("d",s(M(t,a,f,C),p,h,d)),g===y&&C>t&&(P=c(w))})}function C(){v(b,A,r.easeFnIndeterminate,r.durationIndeterminate,q),q=(q+A)%100;var e=b;b=-A,A=-e}function w(){x||(x=t(C,r.durationIndeterminate+50,0,!1),C(),o.addClass(M).removeAttr("aria-valuenow"))}function $(){x&&(t.cancel(x),x=null,o.removeClass(M))}var P,x,I=o[0],D=angular.element(I.querySelector("svg")),F=angular.element(I.querySelector("path")),b=r.startIndeterminate,A=r.endIndeterminate,q=0,y=0;a(o),o.toggleClass(h,u.hasOwnProperty("disabled")),i.mdMode===p&&w(),i.$on("$destroy",function(){$(),P&&g(P)}),i.$watchGroup(["value","mdMode",function(){var e=I.disabled;return e===!0||e===!1?e:angular.isDefined(o.attr("disabled"))}],function(e,r){var a=e[1],n=e[2],t=r[2];if(n!==t&&o.toggleClass(h,!!n),n)$();else if(a!==f&&a!==p&&(a=p,u.$set("mdMode",a)),a===p)w();else{var i=d(e[0]);$(),o.attr("aria-valuenow",i),v(d(r[0]),i)}}),i.$watch("mdDiameter",function(e){var r=l(e),a=m(r),n=r/2+"px",t={width:r+"px",height:r+"px"};D[0].setAttribute("viewBox","0 0 "+r+" "+r),D.css(t).css("transform-origin",n+" "+n+" "+n),o.css(t),F.css("stroke-width",a+"px")})}function s(e,r,a,n){var t,i=3.5999,o=n||0,s=r/2,d=a/2,l=o*i,m=e*i,c=u(s,d,l),g=u(s,d,m+l),v=0>m?0:1;return t=0>m?m>=-180?0:1:180>=m?0:1,"M"+c+"A"+d+","+d+" 0 "+t+","+v+" "+g}function u(r,a,n){var t=(n-90)*v;return r+a*e.Math.cos(t)+","+(r+a*e.Math.sin(t))}function d(r){return e.Math.max(0,e.Math.min(r||0,100))}function l(e){var a=r.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*a),n}return a}function m(e){return r.strokeWidth/100*e}var c=e.requestAnimationFrame||angular.noop,g=e.cancelAnimationFrame||angular.noop,v=e.Math.PI/180,f="determinate",p="indeterminate",h="_md-progress-circular-disabled",M="_md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,r){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),angular.isUndefined(r.mdMode)){var a=angular.isDefined(r.value),n=a?f:p;r.$set("mdMode",n)}else r.$set("mdMode",r.mdMode.trim());return o}}}function MdProgressCircularProvider(){function e(e,r,a,n){return a*e/n+r}function r(e,r,a,n){var t=(e/=n)*e,i=t*e;return r+a*(6*i*t+-15*t*t+10*i)}var a={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:500,startIndeterminate:3,endIndeterminate:80,easeFnIndeterminate:r,easingPresets:{linearEase:e,materialEase:r}};return{configure:function(e){return a=angular.extend(a,e||{})},$get:function(){return a}}}goog.provide("ng.material.components.progressCircular"),goog.require("ng.material.core"),angular.module("material.components.progressCircular",["material.core"]),angular.module("material.components.progressCircular").directive("mdProgressCircular",MdProgressCircularDirective),MdProgressCircularDirective.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],angular.module("material.components.progressCircular").provider("$mdProgressCircular",MdProgressCircularProvider),ng.material.components.progressCircular=angular.module("material.components.progressCircular");
function MdProgressCircularDirective(e,r,a,n,t,i){function o(i,o,u){function v(a,t,o,u,d){var g=++y,v=n.now(),f=t-a,p=l(i.mdDiameter),h=p-m(p),M=o||r.easeFn,C=u||r.duration;t===a?F.attr("d",s(t,p,h,d)):P=c(function w(r){var t=e.Math.max(0,e.Math.min((r||n.now())-v,C));F.attr("d",s(M(t,a,f,C),p,h,d)),g===y&&t<C&&(P=c(w))})}function C(){v(b,A,r.easeFnIndeterminate,r.durationIndeterminate,q),q=(q+A)%100;var e=b;b=-A,A=-e}function w(){x||(x=t(C,r.durationIndeterminate+50,0,!1),C(),o.addClass(M).removeAttr("aria-valuenow"))}function $(){x&&(t.cancel(x),x=null,o.removeClass(M))}var P,x,I=o[0],D=angular.element(I.querySelector("svg")),F=angular.element(I.querySelector("path")),b=r.startIndeterminate,A=r.endIndeterminate,q=0,y=0;a(o),o.toggleClass(h,u.hasOwnProperty("disabled")),i.mdMode===p&&w(),i.$on("$destroy",function(){$(),P&&g(P)}),i.$watchGroup(["value","mdMode",function(){var e=I.disabled;return e===!0||e===!1?e:angular.isDefined(o.attr("disabled"))}],function(e,r){var a=e[1],n=e[2],t=r[2];if(n!==t&&o.toggleClass(h,!!n),n)$();else if(a!==f&&a!==p&&(a=p,u.$set("mdMode",a)),a===p)w();else{var i=d(e[0]);$(),o.attr("aria-valuenow",i),v(d(r[0]),i)}}),i.$watch("mdDiameter",function(e){var r=l(e),a=m(r),n=r/2+"px",t={width:r+"px",height:r+"px"};D[0].setAttribute("viewBox","0 0 "+r+" "+r),D.css(t).css("transform-origin",n+" "+n+" "+n),o.css(t),F.css("stroke-width",a+"px")})}function s(e,r,a,n){var t,i=3.5999,o=n||0,s=r/2,d=a/2,l=o*i,m=e*i,c=u(s,d,l),g=u(s,d,m+l),v=m<0?0:1;return t=m<0?m>=-180?0:1:m<=180?0:1,"M"+c+"A"+d+","+d+" 0 "+t+","+v+" "+g}function u(r,a,n){var t=(n-90)*v;return r+a*e.Math.cos(t)+","+(r+a*e.Math.sin(t))}function d(r){return e.Math.max(0,e.Math.min(r||0,100))}function l(e){var a=r.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*a),n}return a}function m(e){return r.strokeWidth/100*e}var c=e.requestAnimationFrame||angular.noop,g=e.cancelAnimationFrame||angular.noop,v=e.Math.PI/180,f="determinate",p="indeterminate",h="_md-progress-circular-disabled",M="md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,r){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),angular.isUndefined(r.mdMode)){var a=angular.isDefined(r.value),n=a?f:p;r.$set("mdMode",n)}else r.$set("mdMode",r.mdMode.trim());return o}}}function MdProgressCircularProvider(){function e(e,r,a,n){return a*e/n+r}function r(e,r,a,n){var t=(e/=n)*e,i=t*e;return r+a*(6*i*t+-15*t*t+10*i)}var a={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:500,startIndeterminate:3,endIndeterminate:80,easeFnIndeterminate:r,easingPresets:{linearEase:e,materialEase:r}};return{configure:function(e){return a=angular.extend(a,e||{})},$get:function(){return a}}}goog.provide("ngmaterial.components.progressCircular"),goog.require("ngmaterial.core"),angular.module("material.components.progressCircular",["material.core"]),angular.module("material.components.progressCircular").directive("mdProgressCircular",MdProgressCircularDirective),MdProgressCircularDirective.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],angular.module("material.components.progressCircular").provider("$mdProgressCircular",MdProgressCircularProvider),ngmaterial.components.progressCircular=angular.module("material.components.progressCircular");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.progressLinear');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.progressLinear');
goog.require('ngmaterial.core');
/**

@@ -78,6 +78,6 @@ * @ngdoc module

restrict: 'E',
template: '<div class="_md-container">' +
'<div class="_md-dashed"></div>' +
'<div class="_md-bar _md-bar1"></div>' +
'<div class="_md-bar _md-bar2"></div>' +
template: '<div class="md-container">' +
'<div class="md-dashed"></div>' +
'<div class="md-bar md-bar1"></div>' +
'<div class="md-bar md-bar2"></div>' +
'</div>',

@@ -100,5 +100,5 @@ compile: compile

var toVendorCSS = $mdUtil.dom.animator.toCss;
var bar1 = angular.element(element[0].querySelector('._md-bar1'));
var bar2 = angular.element(element[0].querySelector('._md-bar2'));
var container = angular.element(element[0].querySelector('._md-container'));
var bar1 = angular.element(element[0].querySelector('.md-bar1'));
var bar2 = angular.element(element[0].querySelector('.md-bar2'));
var container = angular.element(element[0].querySelector('.md-container'));

@@ -129,3 +129,3 @@ element

if (value === true || value === false) {
isDisabled = value;
isDisabled = !!value;
} else {

@@ -135,6 +135,7 @@ isDisabled = angular.isDefined(value);

element.toggleClass(DISABLED_CLASS, !!isDisabled);
element.toggleClass(DISABLED_CLASS, isDisabled);
container.toggleClass(lastMode, !isDisabled);
});
attr.$observe('mdMode',function(mode){
attr.$observe('mdMode', function(mode) {
if (lastMode) container.removeClass( lastMode );

@@ -147,6 +148,6 @@

case MODE_INDETERMINATE:
container.addClass( lastMode = "_md-mode-" + mode );
container.addClass( lastMode = "md-mode-" + mode );
break;
default:
container.addClass( lastMode = "_md-mode-" + MODE_INDETERMINATE );
container.addClass( lastMode = "md-mode-" + MODE_INDETERMINATE );
break;

@@ -168,3 +169,3 @@ }

element.attr("md-mode",mode);
element.attr("md-mode", mode);
attr.mdMode = mode;

@@ -219,2 +220,2 @@ }

ng.material.components.progressLinear = angular.module("material.components.progressLinear");
ngmaterial.components.progressLinear = angular.module("material.components.progressLinear");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdProgressLinearDirective(e,a,r){function n(e,a,r){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),t}function t(r,n,t){function c(){t.$observe("value",function(e){var a=i(e);n.attr("aria-valuenow",a),g()!=m&&v(M,a)}),t.$observe("mdBufferValue",function(e){v(_,i(e))}),t.$observe("disabled",function(e){b=e===!0||e===!1?e:angular.isDefined(e),n.toggleClass(l,!!b)}),t.$observe("mdMode",function(e){switch(f&&L.removeClass(f),e){case m:case d:case s:case o:L.addClass(f="_md-mode-"+e);break;default:L.addClass(f="_md-mode-"+o)}})}function u(){if(angular.isUndefined(t.mdMode)){var e=angular.isDefined(t.value),a=e?s:o;n.attr("md-mode",a),t.mdMode=a}}function g(){var e=(t.mdMode||"").trim();if(e)switch(e){case s:case o:case d:case m:break;default:e=o}return e}function v(e,r){if(!b&&g()){var n=a.supplant("translateX({0}%) scale({1},1)",[(r-100)/2,r/100]),t=p({transform:n});angular.element(e).css(t)}}e(n);var f,b=t.hasOwnProperty("disabled"),p=a.dom.animator.toCss,_=angular.element(n[0].querySelector("._md-bar1")),M=angular.element(n[0].querySelector("._md-bar2")),L=angular.element(n[0].querySelector("._md-container"));n.attr("md-mode",g()).toggleClass(l,b),u(),c()}function i(e){return Math.max(0,Math.min(e||0,100))}var s="determinate",o="indeterminate",d="buffer",m="query",l="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="_md-container"><div class="_md-dashed"></div><div class="_md-bar _md-bar1"></div><div class="_md-bar _md-bar2"></div></div>',compile:n}}goog.provide("ng.material.components.progressLinear"),goog.require("ng.material.core"),angular.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",MdProgressLinearDirective),MdProgressLinearDirective.$inject=["$mdTheming","$mdUtil","$log"],ng.material.components.progressLinear=angular.module("material.components.progressLinear");
function MdProgressLinearDirective(e,a,r){function n(e,a,r){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),t}function t(r,n,t){function c(){t.$observe("value",function(e){var a=i(e);n.attr("aria-valuenow",a),g()!=l&&v(L,a)}),t.$observe("mdBufferValue",function(e){v(M,i(e))}),t.$observe("disabled",function(e){b=e===!0||e===!1?!!e:angular.isDefined(e),n.toggleClass(m,b),$.toggleClass(f,!b)}),t.$observe("mdMode",function(e){switch(f&&$.removeClass(f),e){case l:case d:case s:case o:$.addClass(f="md-mode-"+e);break;default:$.addClass(f="md-mode-"+o)}})}function u(){if(angular.isUndefined(t.mdMode)){var e=angular.isDefined(t.value),a=e?s:o;n.attr("md-mode",a),t.mdMode=a}}function g(){var e=(t.mdMode||"").trim();if(e)switch(e){case s:case o:case d:case l:break;default:e=o}return e}function v(e,r){if(!b&&g()){var n=a.supplant("translateX({0}%) scale({1},1)",[(r-100)/2,r/100]),t=p({transform:n});angular.element(e).css(t)}}e(n);var f,b=t.hasOwnProperty("disabled"),p=a.dom.animator.toCss,M=angular.element(n[0].querySelector(".md-bar1")),L=angular.element(n[0].querySelector(".md-bar2")),$=angular.element(n[0].querySelector(".md-container"));n.attr("md-mode",g()).toggleClass(m,b),u(),c()}function i(e){return Math.max(0,Math.min(e||0,100))}var s="determinate",o="indeterminate",d="buffer",l="query",m="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:n}}goog.provide("ngmaterial.components.progressLinear"),goog.require("ngmaterial.core"),angular.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",MdProgressLinearDirective),MdProgressLinearDirective.$inject=["$mdTheming","$mdUtil","$log"],ngmaterial.components.progressLinear=angular.module("material.components.progressLinear");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.radioButton');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.radioButton');
goog.require('ngmaterial.core');
/**

@@ -81,18 +81,24 @@ * @ngdoc module

scope.mouseActive = false;
element.attr({
'role': 'radiogroup',
'tabIndex': element.attr('tabindex') || '0'
})
.on('keydown', keydownListener)
.on('mousedown', function(event) {
scope.mouseActive = true;
$timeout(function() {
scope.mouseActive = false;
}, 100);
})
.on('focus', function() {
if(scope.mouseActive === false) { rgCtrl.$element.addClass('md-focused'); }
})
.on('blur', function() { rgCtrl.$element.removeClass('md-focused'); });
element
.attr({
'role': 'radiogroup',
'tabIndex': element.attr('tabindex') || '0'
})
.on('keydown', keydownListener)
.on('mousedown', function(event) {
scope.mouseActive = true;
$timeout(function() {
scope.mouseActive = false;
}, 100);
})
.on('focus', function() {
if(scope.mouseActive === false) {
rgCtrl.$element.addClass('md-focused');
}
})
.on('blur', function() {
rgCtrl.$element.removeClass('md-focused');
});
/**

@@ -187,2 +193,5 @@ *

this.$element.attr('aria-activedescendant', radioId);
},
isDisabled: function() {
return this.$element[0].hasAttribute('disabled');
}

@@ -264,7 +273,7 @@ };

transclude: true,
template: '<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="_md-off"></div>' +
'<div class="_md-on"></div>' +
template: '<div class="md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="md-off"></div>' +
'<div class="md-on"></div>' +
'</div>' +
'<div ng-transclude class="_md-label"></div>',
'<div ng-transclude class="md-label"></div>',
link: link

@@ -284,5 +293,5 @@ };

*/
function initialize(controller) {
if ( !rgCtrl ) {
throw 'RadioGroupController not found.';
function initialize() {
if (!rgCtrl) {
throw 'RadioButton: No RadioGroupController could be found.';
}

@@ -304,3 +313,3 @@

function listener(ev) {
if (element[0].hasAttribute('disabled')) return;
if (element[0].hasAttribute('disabled') || rgCtrl.isDisabled()) return;

@@ -374,2 +383,2 @@ scope.$apply(function() {

ng.material.components.radioButton = angular.module("material.components.radioButton");
ngmaterial.components.radioButton = angular.module("material.components.radioButton");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdRadioGroupDirective(e,t,n,i){function r(r,o,a,d){function u(){o.hasClass("md-focused")||o.addClass("md-focused")}function c(n){var i=n.which||n.keyCode;if(i==t.KEY_CODE.ENTER||n.currentTarget==n.target)switch(i){case t.KEY_CODE.LEFT_ARROW:case t.KEY_CODE.UP_ARROW:n.preventDefault(),s.selectPrevious(),u();break;case t.KEY_CODE.RIGHT_ARROW:case t.KEY_CODE.DOWN_ARROW:n.preventDefault(),s.selectNext(),u();break;case t.KEY_CODE.ENTER:var r=angular.element(e.getClosest(o[0],"form"));r.length>0&&r.triggerHandler("submit")}}o.addClass("_md"),n(o);var s=d[0],l=d[1]||e.fakeNgModel();s.init(l),r.mouseActive=!1,o.attr({role:"radiogroup",tabIndex:o.attr("tabindex")||"0"}).on("keydown",c).on("mousedown",function(e){r.mouseActive=!0,i(function(){r.mouseActive=!1},100)}).on("focus",function(){r.mouseActive===!1&&s.$element.addClass("md-focused")}).on("blur",function(){s.$element.removeClass("md-focused")})}function o(e){this._radioButtonRenderFns=[],this.$element=e}function a(){return{init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=angular.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return d(this.$element,1)},selectPrevious:function(){return d(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)}}}function d(t,n){var i=e.iterator(t[0].querySelectorAll("md-radio-button"),!0);if(i.count()){var r=function(e){return!angular.element(e).attr("disabled")},o=t[0].querySelector("md-radio-button.md-checked"),a=i[0>n?"previous":"next"](o,r)||i.first();angular.element(a).triggerHandler("click")}}return o.prototype=a(),{restrict:"E",controller:["$element",o],require:["mdRadioGroup","?ngModel"],link:{pre:r}}}function mdRadioButtonDirective(e,t,n){function i(i,o,a,d){function u(e){if(!d)throw"RadioGroupController not found.";d.add(s),a.$observe("value",s),o.on("click",c).on("$destroy",function(){d.remove(s)})}function c(e){o[0].hasAttribute("disabled")||i.$apply(function(){d.setViewValue(a.value,e&&e.type)})}function s(){function e(e){"MD-RADIO-GROUP"!=o.parent()[0].nodeName&&o.parent()[e?"addClass":"removeClass"](r)}var t=d.getViewValue()==a.value;t!==m&&(m=t,o.attr("aria-checked",t),t?(e(!0),o.addClass(r),d.setActiveDescendant(o.attr("id"))):(e(!1),o.removeClass(r)))}function l(n,i){function r(){return a.id||"radio_"+t.nextUid()}i.ariaId=r(),n.attr({id:i.ariaId,role:"radio","aria-checked":"false"}),e.expectWithText(n,"aria-label")}var m;n(o),l(o,i),u()}var r="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox><div class="_md-off"></div><div class="_md-on"></div></div><div ng-transclude class="_md-label"></div>',link:i}}goog.provide("ng.material.components.radioButton"),goog.require("ng.material.core"),angular.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",mdRadioGroupDirective).directive("mdRadioButton",mdRadioButtonDirective),mdRadioGroupDirective.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],mdRadioButtonDirective.$inject=["$mdAria","$mdUtil","$mdTheming"],ng.material.components.radioButton=angular.module("material.components.radioButton");
function mdRadioGroupDirective(e,t,n,i){function r(r,o,a,d){function u(){o.hasClass("md-focused")||o.addClass("md-focused")}function c(n){var i=n.which||n.keyCode;if(i==t.KEY_CODE.ENTER||n.currentTarget==n.target)switch(i){case t.KEY_CODE.LEFT_ARROW:case t.KEY_CODE.UP_ARROW:n.preventDefault(),s.selectPrevious(),u();break;case t.KEY_CODE.RIGHT_ARROW:case t.KEY_CODE.DOWN_ARROW:n.preventDefault(),s.selectNext(),u();break;case t.KEY_CODE.ENTER:var r=angular.element(e.getClosest(o[0],"form"));r.length>0&&r.triggerHandler("submit")}}o.addClass("_md"),n(o);var s=d[0],l=d[1]||e.fakeNgModel();s.init(l),r.mouseActive=!1,o.attr({role:"radiogroup",tabIndex:o.attr("tabindex")||"0"}).on("keydown",c).on("mousedown",function(e){r.mouseActive=!0,i(function(){r.mouseActive=!1},100)}).on("focus",function(){r.mouseActive===!1&&s.$element.addClass("md-focused")}).on("blur",function(){s.$element.removeClass("md-focused")})}function o(e){this._radioButtonRenderFns=[],this.$element=e}function a(){return{init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=angular.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);t!==-1&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return d(this.$element,1)},selectPrevious:function(){return d(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}}}function d(t,n){var i=e.iterator(t[0].querySelectorAll("md-radio-button"),!0);if(i.count()){var r=function(e){return!angular.element(e).attr("disabled")},o=t[0].querySelector("md-radio-button.md-checked"),a=i[n<0?"previous":"next"](o,r)||i.first();angular.element(a).triggerHandler("click")}}return o.prototype=a(),{restrict:"E",controller:["$element",o],require:["mdRadioGroup","?ngModel"],link:{pre:r}}}function mdRadioButtonDirective(e,t,n){function i(i,o,a,d){function u(){if(!d)throw"RadioButton: No RadioGroupController could be found.";d.add(s),a.$observe("value",s),o.on("click",c).on("$destroy",function(){d.remove(s)})}function c(e){o[0].hasAttribute("disabled")||d.isDisabled()||i.$apply(function(){d.setViewValue(a.value,e&&e.type)})}function s(){function e(e){"MD-RADIO-GROUP"!=o.parent()[0].nodeName&&o.parent()[e?"addClass":"removeClass"](r)}var t=d.getViewValue()==a.value;t!==m&&(m=t,o.attr("aria-checked",t),t?(e(!0),o.addClass(r),d.setActiveDescendant(o.attr("id"))):(e(!1),o.removeClass(r)))}function l(n,i){function r(){return a.id||"radio_"+t.nextUid()}i.ariaId=r(),n.attr({id:i.ariaId,role:"radio","aria-checked":"false"}),e.expectWithText(n,"aria-label")}var m;n(o),l(o,i),u()}var r="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:i}}goog.provide("ngmaterial.components.radioButton"),goog.require("ngmaterial.core"),angular.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",mdRadioGroupDirective).directive("mdRadioButton",mdRadioButtonDirective),mdRadioGroupDirective.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],mdRadioButtonDirective.$inject=["$mdAria","$mdUtil","$mdTheming"],ngmaterial.components.radioButton=angular.module("material.components.radioButton");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.select');
goog.require('ng.material.components.backdrop');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.select');
goog.require('ngmaterial.components.backdrop');
goog.require('ngmaterial.core');
/**

@@ -26,3 +26,3 @@ * @ngdoc module

var CHECKBOX_SELECTION_INDICATOR =
angular.element('<div class="_md-container"><div class="_md-icon"></div></div>');
angular.element('<div class="md-container"><div class="md-icon"></div></div>');

@@ -48,2 +48,34 @@ angular.module('material.components.select', [

*
* When the select is required and uses a floating label, then the label will automatically contain
* an asterisk (`*`). This behavior can be disabled by using the `md-no-asterisk` attribute.
*
* By default, the select will display with an underline to match other form elements. This can be
* disabled by applying the `md-no-underline` CSS class.
*
* ### Option Params
*
* When applied, `md-option-empty` will mark the option as "empty" allowing the option to clear the
* select and put it back in it's default state. You may supply this attribute on any option you
* wish, however, it is automatically applied to an option whose `value` or `ng-value` are not
* defined.
*
* **Automatically Applied**
*
* - `<md-option>`
* - `<md-option value>`
* - `<md-option value="">`
* - `<md-option ng-value>`
* - `<md-option ng-value="">`
*
* **NOT Automatically Applied**
*
* - `<md-option ng-value="1">`
* - `<md-option ng-value="''">`
* - `<md-option ng-value="undefined">`
* - `<md-option value="undefined">` (this evaluates to the string `"undefined"`)
* - <code ng-non-bindable>&lt;md-option ng-value="{{someValueThatMightBeUndefined}}"&gt;</code>
*
* **Note:** A value of `undefined` ***is considered a valid value*** (and does not auto-apply this
* attribute) since you may wish this to be your "Not Available" or "None" option.
*
* @param {expression} ng-model The model!

@@ -57,5 +89,6 @@ * @param {boolean=} multiple Whether it's multiple.

* @param {string=} placeholder Placeholder hint text.
* @param md-no-asterisk {boolean=} When set to true, an asterisk will not be appended to the floating label.
* @param {string=} aria-label Optional label for accessibility. Only necessary if no placeholder or
* explicit label is present.
* @param {string=} md-container-class Class list to get applied to the `._md-select-menu-container`
* @param {string=} md-container-class Class list to get applied to the `.md-select-menu-container`
* element (for custom styling).

@@ -153,3 +186,6 @@ *

*/
function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $compile, $parse) {
function SelectDirective($mdSelect, $mdUtil, $mdConstant, $mdTheming, $mdAria, $compile, $parse) {
var keyCodes = $mdConstant.KEY_CODE;
var NAVIGATION_KEYS = [keyCodes.SPACE, keyCodes.ENTER, keyCodes.UP_ARROW, keyCodes.DOWN_ARROW];
return {

@@ -166,4 +202,4 @@ restrict: 'E',

var valueEl = angular.element('<md-select-value><span></span></md-select-value>');
valueEl.append('<span class="_md-select-icon" aria-hidden="true"></span>');
valueEl.addClass('_md-select-value');
valueEl.append('<span class="md-select-icon" aria-hidden="true"></span>');
valueEl.addClass('md-select-value');
if (!valueEl[0].hasAttribute('id')) {

@@ -188,3 +224,3 @@ valueEl.attr('id', 'select_value_label_' + $mdUtil.nextUid());

'<div>' +
' <md-progress-circular md-mode="indeterminate" ng-if="!$$loadingAsyncDone" md-diameter="25px"></md-progress-circular>' +
' <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular>' +
'</div>'

@@ -200,6 +236,5 @@ ));

if (attr.name) {
var autofillClone = angular.element('<select class="_md-visually-hidden">');
var autofillClone = angular.element('<select class="md-visually-hidden">');
autofillClone.attr({
'name': '.' + attr.name,
'ng-model': attr.ngModel,
'name': attr.name,
'aria-hidden': 'true',

@@ -216,2 +251,11 @@ 'tabindex': '-1'

// Adds an extra option that will hold the selected value for the
// cases where the select is a part of a non-angular form. This can be done with a ng-model,
// however if the `md-option` is being `ng-repeat`-ed, Angular seems to insert a similar
// `option` node, but with a value of `? string: <value> ?` which would then get submitted.
// This also goes around having to prepend a dot to the name attribute.
autofillClone.append(
'<option ng-value="' + attr.ngModel + '" selected></option>'
);
element.parent().append(autofillClone);

@@ -225,3 +269,3 @@ }

var selectTemplate = '' +
'<div class="_md-select-menu-container" aria-hidden="true">' +
'<div class="md-select-menu-container" aria-hidden="true">' +
'<md-select-menu {0}>{1}</md-select-menu>' +

@@ -249,7 +293,8 @@ '</div>';

var isReadonly = angular.isDefined(attr.readonly);
var disableAsterisk = $mdUtil.parseAttributeBoolean(attr.mdNoAsterisk);
if (containerCtrl) {
var isErrorGetter = containerCtrl.isErrorGetter || function() {
return ngModelCtrl.$invalid && ngModelCtrl.$touched;
};
return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (formCtrl && formCtrl.$submitted));
};

@@ -277,12 +322,2 @@ if (containerCtrl.input) {

if (attr.name && formCtrl) {
var selectEl = element.parent()[0].querySelector('select[name=".' + attr.name + '"]');
$mdUtil.nextTick(function() {
var controller = angular.element(selectEl).controller('ngModel');
if (controller) {
formCtrl.$removeControl(controller);
}
});
}
if (formCtrl && angular.isDefined(attr.multiple)) {

@@ -308,2 +343,9 @@ $mdUtil.nextTick(function() {

if (containerCtrl && containerCtrl.label) {
attr.$observe('required', function (value) {
// Toggle the md-required class on the input containers label, because the input container is automatically
// applying the asterisk indicator on the label.
containerCtrl.label.toggleClass('md-required', value && !disableAsterisk);
});
}

@@ -328,10 +370,10 @@ mdSelectCtrl.setLabelText = function(text) {

if (isPlaceholder) {
valueEl.addClass('_md-select-placeholder');
valueEl.addClass('md-select-placeholder');
if (containerCtrl && containerCtrl.label) {
containerCtrl.label.addClass('_md-placeholder');
containerCtrl.label.addClass('md-placeholder');
}
} else {
valueEl.removeClass('_md-select-placeholder');
valueEl.removeClass('md-select-placeholder');
if (containerCtrl && containerCtrl.label) {
containerCtrl.label.removeClass('_md-placeholder');
containerCtrl.label.removeClass('md-placeholder');
}

@@ -344,7 +386,5 @@ }

.on('focus', function(ev) {
// only set focus on if we don't currently have a selected value. This avoids the "bounce"
// on the label transition because the focus will immediately switch to the open menu.
if (containerCtrl && containerCtrl.element.hasClass('md-input-has-value')) {
containerCtrl.setFocused(true);
}
// Always focus the container (if we have one) so floating labels and other styles are
// applied properly
containerCtrl && containerCtrl.setFocused(true);
});

@@ -357,3 +397,3 @@

untouched = false;
if (selectScope.isOpen) {
if (selectScope._mdSelectIsOpen) {
event.stopImmediatePropagation();

@@ -363,3 +403,3 @@ }

if (selectScope.isOpen) return;
if (selectScope._mdSelectIsOpen) return;
containerCtrl && containerCtrl.setFocused(false);

@@ -501,3 +541,3 @@ inputCheckValue();

selectContainer = angular.element(
element[0].querySelector('._md-select-menu-container')
element[0].querySelector('.md-select-menu-container')
);

@@ -517,4 +557,3 @@ selectScope = scope;

function handleKeypress(e) {
var allowedCodes = [32, 13, 38, 40];
if (allowedCodes.indexOf(e.keyCode) != -1) {
if ($mdConstant.isNavigationKey(e)) {
// prevent page scrolling on interaction

@@ -524,6 +563,7 @@ e.preventDefault();

} else {
if (e.keyCode <= 90 && e.keyCode >= 31) {
if ($mdConstant.isInputKey(e) || $mdConstant.isNumPadKey(e)) {
e.preventDefault();
var node = selectMenuCtrl.optNodeForKeyboardSearch(e);
if (!node) return;
if (!node || node.hasAttribute('disabled')) return;
var optionCtrl = angular.element(node).controller('mdOption');

@@ -540,3 +580,3 @@ if (!selectMenuCtrl.isMultiple) {

function openSelect() {
selectScope.isOpen = true;
selectScope._mdSelectIsOpen = true;
element.attr('aria-expanded', 'true');

@@ -555,3 +595,3 @@

}).finally(function() {
selectScope.isOpen = false;
selectScope._mdSelectIsOpen = false;
element.focus();

@@ -562,8 +602,9 @@ element.attr('aria-expanded', 'false');

}
};
}
}
SelectDirective.$inject = ["$mdSelect", "$mdUtil", "$mdTheming", "$mdAria", "$compile", "$parse"];
SelectDirective.$inject = ["$mdSelect", "$mdUtil", "$mdConstant", "$mdTheming", "$mdAria", "$compile", "$parse"];
function SelectMenuDirective($parse, $mdUtil, $mdTheming) {
function SelectMenuDirective($parse, $mdUtil, $mdConstant, $mdTheming) {
// We want the scope to be set to 'false' so an isolated scope is not created

@@ -587,3 +628,3 @@ // which would interfere with the md-select-header's access to the

element.addClass('_md'); // private md component indicator for styling
$mdTheming(element);

@@ -682,2 +723,3 @@ element.on('click', clickListener);

var CLEAR_SEARCH_AFTER = 300;
self.optNodeForKeyboardSearch = function(e) {

@@ -691,3 +733,7 @@ clearSearchTimeout && clearTimeout(clearSearchTimeout);

}, CLEAR_SEARCH_AFTER);
searchStr += String.fromCharCode(e.keyCode);
// Support 1-9 on numpad
var keyCode = e.keyCode - ($mdConstant.isNumPadKey(e) ? 48 : 0);
searchStr += String.fromCharCode(keyCode);
var search = new RegExp('^' + searchStr, 'i');

@@ -712,2 +758,9 @@ if (!optNodes) {

// Setup a more robust version of isEmpty to ensure value is a valid option
self.ngModel.$isEmpty = function($viewValue) {
// We have to transform the viewValue into the hashKey, because otherwise the
// OptionCtrl may not exist. Developers may have specified a trackBy function.
return !self.options[self.hashGetter($viewValue)];
};
// Allow users to provide `ng-model="foo" ng-model-options="{trackBy: 'foo.id'}"` so

@@ -746,6 +799,23 @@ // that we can properly compare objects set on the model to the available options

mapFn = function(el) {
// If we do not have a `value` or `ng-value`, assume it is an empty option which clears the select
if (el.hasAttribute('md-option-empty')) {
return '';
}
var html = el.innerHTML;
// Remove the ripple container from the selected option, copying it would cause a CSP violation.
var rippleContainer = el.querySelector('.md-ripple-container');
return rippleContainer ? html.replace(rippleContainer.outerHTML, '') : html;
if (rippleContainer) {
html = html.replace(rippleContainer.outerHTML, '');
}
// Remove the checkbox container, because it will cause the label to wrap inside of the placeholder.
// It should be not displayed inside of the label element.
var checkboxContainer = el.querySelector('.md-container');
if (checkboxContainer) {
html = html.replace(checkboxContainer.outerHTML, '');
}
return html;
};

@@ -777,2 +847,3 @@ } else if (mode == 'aria') {

}
self.options[hashKey] = optionCtrl;

@@ -783,2 +854,11 @@

self.select(hashKey, optionCtrl.value);
// When the current $modelValue of the ngModel Controller is using the same hash as
// the current option, which will be added, then we can be sure, that the validation
// of the option has occurred before the option was added properly.
// This means, that we have to manually trigger a new validation of the current option.
if (angular.isDefined(self.ngModel.$modelValue) && self.hashGetter(self.ngModel.$modelValue) === hashKey) {
self.ngModel.$validate();
}
self.refreshViewValue();

@@ -845,3 +925,3 @@ }

}
SelectMenuDirective.$inject = ["$parse", "$mdUtil", "$mdTheming"];
SelectMenuDirective.$inject = ["$parse", "$mdUtil", "$mdConstant", "$mdTheming"];

@@ -860,8 +940,20 @@ function OptionDirective($mdButtonInkRipple, $mdUtil) {

// Manual transclusion to avoid the extra inner <span> that ng-transclude generates
element.append(angular.element('<div class="_md-text">').append(element.contents()));
element.append(angular.element('<div class="md-text">').append(element.contents()));
element.attr('tabindex', attr.tabindex || '0');
if (!hasDefinedValue(attr)) {
element.attr('md-option-empty', '');
}
return postLink;
}
function hasDefinedValue(attr) {
var value = attr.value;
var ngValue = attr.ngValue;
return value || ngValue;
}
function postLink(scope, element, attr, ctrls) {

@@ -872,3 +964,3 @@ var optionCtrl = ctrls[0];

if (selectCtrl.isMultiple) {
element.addClass('_md-checkbox-enabled');
element.addClass('md-checkbox-enabled');
element.prepend(CHECKBOX_SELECTION_INDICATOR.clone());

@@ -991,3 +1083,3 @@ }

}
labelElement.addClass('_md-container-ignore');
labelElement.addClass('md-container-ignore');
if (attrs.label) labelElement.text(attrs.label);

@@ -1014,4 +1106,5 @@ }

function selectDefaultOptions($mdSelect, $mdConstant, $mdUtil, $window, $q, $$rAF, $animateCss, $animate, $document) {
var ERRROR_TARGET_EXPECTED = "$mdSelect.show() expected a target element in options.target but got '{0}'!";
var ERROR_TARGET_EXPECTED = "$mdSelect.show() expected a target element in options.target but got '{0}'!";
var animator = $mdUtil.dom.animator;
var keyCodes = $mdConstant.KEY_CODE;

@@ -1047,3 +1140,3 @@ return {

function animateRemoval() {
return $animateCss(element, {addClass: '_md-leave'}).start();
return $animateCss(element, {addClass: 'md-leave'}).start();
}

@@ -1056,3 +1149,3 @@

element.removeClass('_md-active');
element.removeClass('md-active');
element.attr('aria-hidden', 'true');

@@ -1105,3 +1198,3 @@ element[0].style.display = 'none';

$animateCss(element, {removeClass: '_md-leave', duration: 0})
$animateCss(element, {removeClass: 'md-leave', duration: 0})
.start()

@@ -1132,3 +1225,3 @@ .then(positionAndFocusMenu)

$$rAF(function() {
element.addClass('_md-active');
element.addClass('md-active');
info.dropDown.element.css(animator.toCss({transform: ''}));

@@ -1159,3 +1252,3 @@

// Override duration to immediately show invisible backdrop
options.backdrop = $mdUtil.createBackdrop(scope, "_md-select-backdrop _md-click-catcher");
options.backdrop = $mdUtil.createBackdrop(scope, "md-select-backdrop md-click-catcher");
$animate.enter(options.backdrop, $document[0].body, null, {duration: 0});

@@ -1191,3 +1284,3 @@ }

if (!options.target) {
throw new Error($mdUtil.supplant(ERRROR_TARGET_EXPECTED, [options.target]));
throw new Error($mdUtil.supplant(ERROR_TARGET_EXPECTED, [options.target]));
}

@@ -1264,3 +1357,3 @@

element.addClass('_md-clickable');
element.addClass('md-clickable');

@@ -1280,3 +1373,3 @@ // Close on backdrop click

element.removeClass('_md-clickable');
element.removeClass('md-clickable');
opts.isRemoved = true;

@@ -1297,3 +1390,2 @@ };

function onMenuKeyDown(ev) {
var keyCodes = $mdConstant.KEY_CODE;
ev.preventDefault();

@@ -1327,3 +1419,3 @@ ev.stopPropagation();

default:
if (ev.keyCode >= 31 && ev.keyCode <= 90) {
if ($mdConstant.isInputKey(ev) || $mdConstant.isNumPadKey(ev)) {
var optNode = dropDown.controller('mdSelectMenu').optNodeForKeyboardSearch(ev);

@@ -1481,3 +1573,3 @@ opts.focusedNode = optNode || opts.focusedNode;

if (isScrollable) {
selectNode.classList.add('_md-overflow');
selectNode.classList.add('md-overflow');
}

@@ -1521,3 +1613,3 @@

var left, top, transformOrigin, minWidth;
var left, top, transformOrigin, minWidth, fontSize;
if (shouldOpenAroundTarget) {

@@ -1540,2 +1632,4 @@ left = targetRect.left;

minWidth = Math.min(targetRect.width + centeredRect.paddingLeft + centeredRect.paddingRight, maxWidth);
fontSize = window.getComputedStyle(targetNode)['font-size'];
}

@@ -1554,3 +1648,4 @@

top: Math.floor(clamp(bounds.top, top, bounds.bottom - containerRect.height)),
'min-width': minWidth
'min-width': minWidth,
'font-size': fontSize
}

@@ -1609,2 +1704,2 @@ },

ng.material.components.select = angular.module("material.components.select");
ngmaterial.components.select = angular.module("material.components.select");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function SelectDirective(e,t,n,r,i,a){function l(i,l){var o=angular.element("<md-select-value><span></span></md-select-value>");if(o.append('<span class="_md-select-icon" aria-hidden="true"></span>'),o.addClass("_md-select-value"),o[0].hasAttribute("id")||o.attr("id","select_value_label_"+t.nextUid()),i.find("md-content").length||i.append(angular.element("<md-content>").append(i.contents())),l.mdOnOpen&&(i.find("md-content").prepend(angular.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="!$$loadingAsyncDone" md-diameter="25px"></md-progress-circular></div>')),i.find("md-option").attr("ng-show","$$loadingAsyncDone")),l.name){var d=angular.element('<select class="_md-visually-hidden">');d.attr({name:"."+l.name,"ng-model":l.ngModel,"aria-hidden":"true",tabindex:"-1"});var c=i.find("md-option");angular.forEach(c,function(e){var t=angular.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?t.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&t.attr("value",e.getAttribute("value")),d.append(t)}),i.parent().append(d)}var s=t.parseAttributeBoolean(l.multiple),u=s?"multiple":"",p='<div class="_md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>';return p=t.supplant(p,[u,i.html()]),i.empty().append(o),i.append(p),l.tabindex||l.$set("tabindex",0),function(i,l,o,d){function c(){var e=l.attr("aria-label")||l.attr("placeholder");!e&&y&&y.label&&(e=y.label.text()),b=e,r.expect(l,"aria-label",e)}function u(){x&&(O=O||x.find("md-select-menu").controller("mdSelectMenu"),C.setLabelText(O.selectedLabels()))}function p(){if(b){var e=O.selectedLabels({mode:"aria"});l.attr("aria-label",e.length?b+": "+e:b)}}function f(){y&&y.setHasValue(O.selectedLabels().length>0||(l[0].validity||{}).badInput)}function m(){if(x=angular.element(l[0].querySelector("._md-select-menu-container")),D=i,o.mdContainerClass){var e=x[0].getAttribute("class")+" "+o.mdContainerClass;x[0].setAttribute("class",e)}O=x.find("md-select-menu").controller("mdSelectMenu"),O.init(E,o.ngModel),l.on("$destroy",function(){x.remove()})}function h(e){var t=[32,13,38,40];if(-1!=t.indexOf(e.keyCode))e.preventDefault(),g(e);else if(e.keyCode<=90&&e.keyCode>=31){e.preventDefault();var n=O.optNodeForKeyboardSearch(e);if(!n)return;var r=angular.element(n).controller("mdOption");O.isMultiple||O.deselect(Object.keys(O.selected)[0]),O.select(r.hashKey,r.value),O.refreshViewValue()}}function g(){D.isOpen=!0,l.attr("aria-expanded","true"),e.show({scope:D,preserveScope:!0,skipCompile:!0,element:x,target:l[0],selectCtrl:C,preserveElement:!0,hasBackdrop:!0,loadingAsync:o.mdOnOpen?i.$eval(o.mdOnOpen)||!0:!1})["finally"](function(){D.isOpen=!1,l.focus(),l.attr("aria-expanded","false"),E.$setTouched()})}var v,b,$=!0,y=d[0],C=d[1],E=d[2],k=d[3],M=l.find("md-select-value"),S=angular.isDefined(o.readonly);if(y){var w=y.isErrorGetter||function(){return E.$invalid&&E.$touched};if(y.input&&l.find("md-select-header").find("input")[0]!==y.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");y.input=l,y.label||r.expect(l,"aria-label",l.attr("placeholder")),i.$watch(w,y.setInvalid)}var x,D,O;if(m(),n(l),o.name&&k){var A=l.parent()[0].querySelector('select[name=".'+o.name+'"]');t.nextTick(function(){var e=angular.element(A).controller("ngModel");e&&k.$removeControl(e)})}k&&angular.isDefined(o.multiple)&&t.nextTick(function(){var e=E.$modelValue||E.$viewValue;e&&k.$setPristine()});var _=E.$render;E.$render=function(){_(),u(),p(),f()},o.$observe("placeholder",E.$render),C.setLabelText=function(e){if(C.setIsPlaceholder(!e),o.mdSelectedText)e=a(o.mdSelectedText)(i);else{var t=o.placeholder||(y&&y.label?y.label.text():"");e=e||t||""}var n=M.children().eq(0);n.html(e)},C.setIsPlaceholder=function(e){e?(M.addClass("_md-select-placeholder"),y&&y.label&&y.label.addClass("_md-placeholder")):(M.removeClass("_md-select-placeholder"),y&&y.label&&y.label.removeClass("_md-placeholder"))},S||(l.on("focus",function(e){y&&y.element.hasClass("md-input-has-value")&&y.setFocused(!0)}),l.on("blur",function(e){$&&($=!1,D.isOpen&&e.stopImmediatePropagation()),D.isOpen||(y&&y.setFocused(!1),f())})),C.triggerClose=function(){a(o.mdOnClose)(i)},i.$$postDigest(function(){c(),u(),p()}),i.$watch(function(){return O.selectedLabels()},u);var T;o.$observe("ngMultiple",function(e){T&&T();var t=a(e);T=i.$watch(function(){return t(i)},function(e,t){void 0===e&&void 0===t||(e?l.attr("multiple","multiple"):l.removeAttr("multiple"),l.attr("aria-multiselectable",e?"true":"false"),x&&(O.setMultiple(e),_=E.$render,E.$render=function(){_(),u(),p(),f()},E.$render()))})}),o.$observe("disabled",function(e){angular.isString(e)&&(e=!0),void 0!==v&&v===e||(v=e,e?l.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",g).off("keydown",h):l.attr({tabindex:o.tabindex,"aria-disabled":"false"}).on("click",g).on("keydown",h))}),o.hasOwnProperty("disabled")||o.hasOwnProperty("ngDisabled")||(l.attr({"aria-disabled":"false"}),l.on("click",g),l.on("keydown",h));var R={role:"listbox","aria-expanded":"false","aria-multiselectable":s&&!o.ngMultiple?"true":"false"};l[0].hasAttribute("id")||(R.id="select_"+t.nextUid());var I="select_container_"+t.nextUid();x.attr("id",I),R["aria-owns"]=I,l.attr(R),i.$on("$destroy",function(){e.destroy()["finally"](function(){y&&(y.setFocused(!1),y.setHasValue(!1),y.input=null),E.$setTouched()})})}}return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:l,controller:function(){}}}function SelectMenuDirective(e,t,n){function r(e,r,i,a){function l(e){13!=e.keyCode&&32!=e.keyCode||o(e)}function o(n){var r=t.getClosest(n.target,"md-option"),i=r&&angular.element(r).data("$mdOptionController");if(r&&i){if(r.hasAttribute("disabled"))return n.stopImmediatePropagation(),!1;var a=d.hashGetter(i.value),l=angular.isDefined(d.selected[a]);e.$apply(function(){d.isMultiple?l?d.deselect(a):d.select(a,i.value):l||(d.deselect(Object.keys(d.selected)[0]),d.select(a,i.value)),d.refreshViewValue()})}}var d=a[0];r.addClass("_md"),n(r),r.on("click",o),r.on("keypress",l)}function i(n,r,i){function a(){var e=o.ngModel.$modelValue||o.ngModel.$viewValue||[];if(angular.isArray(e)){var t=Object.keys(o.selected),n=e.map(o.hashGetter),r=t.filter(function(e){return-1===n.indexOf(e)});r.forEach(o.deselect),n.forEach(function(t,n){o.select(t,e[n])})}}function l(){var e=o.ngModel.$viewValue||o.ngModel.$modelValue;Object.keys(o.selected).forEach(o.deselect),o.select(o.hashGetter(e),e)}var o=this;o.isMultiple=angular.isDefined(r.multiple),o.selected={},o.options={},n.$watchCollection(function(){return o.options},function(){o.ngModel.$render()});var d,c;o.setMultiple=function(e){function t(e,t){return angular.isArray(e||t||[])}var r=o.ngModel;c=c||r.$isEmpty,o.isMultiple=e,d&&d(),o.isMultiple?(r.$validators["md-multiple"]=t,r.$render=a,n.$watchCollection(o.modelBinding,function(e){t(e)&&a(e),o.ngModel.$setPristine()}),r.$isEmpty=function(e){return!e||0===e.length}):(delete r.$validators["md-multiple"],r.$render=l)};var s,u,p,f="",m=300;o.optNodeForKeyboardSearch=function(e){s&&clearTimeout(s),s=setTimeout(function(){s=void 0,f="",p=void 0,u=void 0},m),f+=String.fromCharCode(e.keyCode);var t=new RegExp("^"+f,"i");u||(u=i.find("md-option"),p=new Array(u.length),angular.forEach(u,function(e,t){p[t]=e.textContent.trim()}));for(var n=0;n<p.length;++n)if(t.test(p[n]))return u[n]},o.init=function(t,r){if(o.ngModel=t,o.modelBinding=r,t.$options&&t.$options.trackBy){var i={},a=e(t.$options.trackBy);o.hashGetter=function(e,t){return i.$value=e,a(t||n,i)}}else o.hashGetter=function(e){return angular.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++selectNextId)):e};o.setMultiple(o.isMultiple)},o.selectedLabels=function(e){e=e||{};var n=e.mode||"html",r=t.nodesToArray(i[0].querySelectorAll("md-option[selected]"));if(r.length){var a;return"html"==n?a=function(e){var t=e.innerHTML,n=e.querySelector(".md-ripple-container");return n?t.replace(n.outerHTML,""):t}:"aria"==n&&(a=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),r.map(a).join(", ")}return""},o.select=function(e,t){var n=o.options[e];n&&n.setSelected(!0),o.selected[e]=t},o.deselect=function(e){var t=o.options[e];t&&t.setSelected(!1),delete o.selected[e]},o.addOption=function(e,t){if(angular.isDefined(o.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+t.value+'" found.');o.options[e]=t,angular.isDefined(o.selected[e])&&(o.select(e,t.value),o.refreshViewValue())},o.removeOption=function(e){delete o.options[e]},o.refreshViewValue=function(){var e,t=[];for(var n in o.selected)(e=o.options[n])?t.push(e.value):t.push(o.selected[n]);var r=o.ngModel.$options&&o.ngModel.$options.trackBy,i=o.isMultiple?t:t[0],a=o.ngModel.$modelValue;(r?angular.equals(a,i):a==i)||(o.ngModel.$setViewValue(i),o.ngModel.$render())}}return i.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu"],scope:!1,controller:i,link:{pre:r}}}function OptionDirective(e,t){function n(e,t){return e.append(angular.element('<div class="_md-text">').append(e.contents())),e.attr("tabindex",t.tabindex||"0"),r}function r(n,r,i,a){function l(e,t,r){if(!c.hashGetter)return void(r||n.$$postDigest(function(){l(e,t,!0)}));var i=c.hashGetter(t,n),a=c.hashGetter(e,n);d.hashKey=a,d.value=e,c.removeOption(i,d),c.addOption(a,d)}function o(){var e={role:"option","aria-selected":"false"};r[0].hasAttribute("id")||(e.id="select_option_"+t.nextUid()),r.attr(e)}var d=a[0],c=a[1];c.isMultiple&&(r.addClass("_md-checkbox-enabled"),r.prepend(CHECKBOX_SELECTION_INDICATOR.clone())),angular.isDefined(i.ngValue)?n.$watch(i.ngValue,l):angular.isDefined(i.value)?l(i.value):n.$watch(function(){return r.text().trim()},l),i.$observe("disabled",function(e){e?r.attr("tabindex","-1"):r.attr("tabindex","0")}),n.$$postDigest(function(){i.$observe("selected",function(e){angular.isDefined(e)&&("string"==typeof e&&(e=!0),e?(c.isMultiple||c.deselect(Object.keys(c.selected)[0]),c.select(d.hashKey,d.value)):c.deselect(d.hashKey),c.refreshViewValue())})}),e.attach(n,r),o(),n.$on("$destroy",function(){c.removeOption(d.hashKey,d)})}function i(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}return i.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:i,compile:n}}function OptgroupDirective(){function e(e,t){function n(){return e.parent().find("md-select-header").length}function r(){var n=e.find("label");n.length||(n=angular.element("<label>"),e.prepend(n)),n.addClass("_md-container-ignore"),t.label&&n.text(t.label)}n()||r()}return{restrict:"E",compile:e}}function SelectHeaderDirective(){return{restrict:"E"}}function SelectProvider(e){function t(e,t,l,o,d,c,s,u,p){function f(e,t,n){function r(){return s(t,{addClass:"_md-leave"}).start()}function i(){t.removeClass("_md-active"),t.attr("aria-hidden","true"),t[0].style.display="none",h(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}return n=n||{},n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?i():r().then(i)}function m(n,r,i){function a(e,t,n){return n.parent.append(t),d(function(e,n){try{s(t,{removeClass:"_md-leave",duration:0}).start().then(f).then(e)}catch(r){n(r)}})}function f(){return d(function(e){if(i.isRemoved)return d.reject(!1);var t=g(n,r,i);t.container.element.css(b.toCss(t.container.styles)),t.dropDown.element.css(b.toCss(t.dropDown.styles)),c(function(){r.addClass("_md-active"),t.dropDown.element.css(b.toCss({transform:""})),h(i.focusedNode),e()})})}function m(e,t,n){return n.disableParentScroll&&!l.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=l.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1,n.hasBackdrop&&(n.backdrop=l.createBackdrop(e,"_md-select-backdrop _md-click-catcher"),u.enter(n.backdrop,p[0].body,null,{duration:0})),function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll(),delete n.restoreScroll}}function h(e){e&&!e.hasAttribute("disabled")&&e.focus()}function $(e,t){var n=r.find("md-select-menu");if(!t.target)throw new Error(l.supplant(v,[t.target]));angular.extend(t,{isRemoved:!1,target:angular.element(t.target),parent:angular.element(t.parent),selectEl:n,contentEl:r.find("md-content"),optionNodes:n[0].getElementsByTagName("md-option")})}function y(){var e=function(e,t,n){return function(){if(!n.isRemoved){var r=g(e,t,n),i=r.container,a=r.dropDown;i.element.css(b.toCss(i.styles)),a.element.css(b.toCss(a.styles))}}}(n,r,i),t=angular.element(o);return t.on("resize",e),t.on("orientationchange",e),function(){t.off("resize",e),t.off("orientationchange",e)}}function C(){i.loadingAsync&&!i.isRemoved&&(n.$$loadingAsyncDone=!1,d.when(i.loadingAsync).then(function(){n.$$loadingAsyncDone=!0,delete i.loadingAsync}).then(function(){c(f)}))}function E(){function n(t){t.preventDefault(),t.stopPropagation(),i.restoreFocus=!1,l.nextTick(e.hide,!0)}function a(n){var r=t.KEY_CODE;switch(n.preventDefault(),n.stopPropagation(),n.keyCode){case r.UP_ARROW:return c();case r.DOWN_ARROW:return d();case r.SPACE:case r.ENTER:var a=l.getClosest(n.target,"md-option");a&&(u.triggerHandler({type:"click",target:a}),n.preventDefault()),s(n);break;case r.TAB:case r.ESCAPE:n.stopPropagation(),n.preventDefault(),i.restoreFocus=!0,l.nextTick(e.hide,!0);break;default:if(n.keyCode>=31&&n.keyCode<=90){var o=u.controller("mdSelectMenu").optNodeForKeyboardSearch(n);i.focusedNode=o||i.focusedNode,o&&o.focus()}}}function o(e){var t,n=l.nodesToArray(i.optionNodes),r=n.indexOf(i.focusedNode);do-1===r?r=0:"next"===e&&r<n.length-1?r++:"prev"===e&&r>0&&r--,t=n[r],t.hasAttribute("disabled")&&(t=void 0);while(!t&&r<n.length-1&&r>0);t&&t.focus(),i.focusedNode=t}function d(){o("next")}function c(){o("prev")}function s(t){function n(){var e=!1;if(t&&t.currentTarget.children.length>0){var n=t.currentTarget.children[0],r=n.scrollHeight>n.clientHeight;if(r&&n.children.length>0){var i=t.pageX-t.currentTarget.getBoundingClientRect().left;i>n.querySelector("md-option").offsetWidth&&(e=!0)}}return e}if(!(t&&"click"==t.type&&t.currentTarget!=u[0]||n())){var r=l.getClosest(t.target,"md-option");r&&r.hasAttribute&&!r.hasAttribute("disabled")&&(t.preventDefault(),t.stopPropagation(),p.isMultiple||(i.restoreFocus=!0,l.nextTick(function(){e.hide(p.ngModel.$viewValue)},!0)))}}if(!i.isRemoved){var u=i.selectEl,p=u.controller("mdSelectMenu")||{};return r.addClass("_md-clickable"),i.backdrop&&i.backdrop.on("click",n),u.on("keydown",a),u.on("click",s),function(){i.backdrop&&i.backdrop.off("click",n),u.off("keydown",a),u.off("click",s),r.removeClass("_md-clickable"),i.isRemoved=!0}}}return C(),$(n,i),i.hideBackdrop=m(n,r,i),a(n,r,i).then(function(e){return r.attr("aria-hidden","false"),i.alreadyOpen=!0,i.cleanupInteraction=E(),i.cleanupResizing=y(),e},i.hideBackdrop)}function h(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}function g(e,t,d){var c,s=t[0],u=d.target[0].children[0],f=p[0].body,m=d.selectEl[0],h=d.contentEl[0],g=f.getBoundingClientRect(),v=u.getBoundingClientRect(),b=!1,$={left:g.left+SELECT_EDGE_MARGIN,top:SELECT_EDGE_MARGIN,bottom:g.height-SELECT_EDGE_MARGIN,right:g.width-SELECT_EDGE_MARGIN-(l.floatingScrollbars()?16:0)},y={top:v.top-$.top,left:v.left-$.left,right:$.right-(v.left+v.width),bottom:$.bottom-(v.top+v.height)},C=g.width-2*SELECT_EDGE_MARGIN,E=m.querySelector("md-option[selected]"),k=m.getElementsByTagName("md-option"),M=m.getElementsByTagName("md-optgroup"),S=a(t,h),w=n(d.loadingAsync);c=w?h.firstElementChild||h:E?E:M.length?M[0]:k.length?k[0]:h.firstElementChild||h,h.offsetWidth>C?h.style["max-width"]=C+"px":h.style.maxWidth=null,b&&(h.style["min-width"]=v.width+"px"),S&&m.classList.add("_md-overflow");var x=c;"MD-OPTGROUP"===(x.tagName||"").toUpperCase()&&(x=k[0]||h.firstElementChild||h,c=x),d.focusedNode=x,s.style.display="block";var D=m.getBoundingClientRect(),O=i(c);if(c){var A=o.getComputedStyle(c);O.paddingLeft=parseInt(A.paddingLeft,10)||0,O.paddingRight=parseInt(A.paddingRight,10)||0}if(S){var _=h.offsetHeight/2;h.scrollTop=O.top+O.height/2-_,y.top<_?h.scrollTop=Math.min(O.top,h.scrollTop+_-y.top):y.bottom<_&&(h.scrollTop=Math.max(O.top+O.height-D.height,h.scrollTop-_+y.bottom))}var T,R,I,N;b?(T=v.left,R=v.top+v.height,I="50% 0",R+D.height>$.bottom&&(R=v.top-D.height,I="50% 100%")):(T=v.left+O.left-O.paddingLeft+2,R=Math.floor(v.top+v.height/2-O.height/2-O.top+h.scrollTop)+2,I=O.left+v.width/2+"px "+(O.top+O.height/2-h.scrollTop)+"px 0px",N=Math.min(v.width+O.paddingLeft+O.paddingRight,C));var L=s.getBoundingClientRect(),B=Math.round(100*Math.min(v.width/D.width,1))/100,P=Math.round(100*Math.min(v.height/D.height,1))/100;return{container:{element:angular.element(s),styles:{left:Math.floor(r($.left,T,$.right-L.width)),top:Math.floor(r($.top,R,$.bottom-L.height)),"min-width":N}},dropDown:{element:angular.element(m),styles:{transformOrigin:I,transform:d.alreadyOpen?"":l.supplant("scale({0},{1})",[B,P])}}}}var v="$mdSelect.show() expected a target element in options.target but got '{0}'!",b=l.dom.animator;return{parent:"body",themable:!0,onShow:m,onRemove:f,hasBackdrop:!0,disableParentScroll:!0}}function n(e){return e&&angular.isFunction(e.then)}function r(e,t,n){return Math.max(e,Math.min(t,n))}function i(e){return e?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}function a(e,t){var n=!1;try{var r=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=r}finally{}return n}return t.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],e("$mdSelect").setDefaults({methods:["target"],options:t})}goog.provide("ng.material.components.select"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core");var SELECT_EDGE_MARGIN=8,selectNextId=0,CHECKBOX_SELECTION_INDICATOR=angular.element('<div class="_md-container"><div class="_md-icon"></div></div>');angular.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",SelectDirective).directive("mdSelectMenu",SelectMenuDirective).directive("mdOption",OptionDirective).directive("mdOptgroup",OptgroupDirective).directive("mdSelectHeader",SelectHeaderDirective).provider("$mdSelect",SelectProvider),SelectDirective.$inject=["$mdSelect","$mdUtil","$mdTheming","$mdAria","$compile","$parse"],SelectMenuDirective.$inject=["$parse","$mdUtil","$mdTheming"],OptionDirective.$inject=["$mdButtonInkRipple","$mdUtil"],SelectProvider.$inject=["$$interimElementProvider"],ng.material.components.select=angular.module("material.components.select");
function SelectDirective(e,t,n,r,i,a,l){function o(a,o){var d=angular.element("<md-select-value><span></span></md-select-value>");if(d.append('<span class="md-select-icon" aria-hidden="true"></span>'),d.addClass("md-select-value"),d[0].hasAttribute("id")||d.attr("id","select_value_label_"+t.nextUid()),a.find("md-content").length||a.append(angular.element("<md-content>").append(a.contents())),o.mdOnOpen&&(a.find("md-content").prepend(angular.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),a.find("md-option").attr("ng-show","$$loadingAsyncDone")),o.name){var s=angular.element('<select class="md-visually-hidden">');s.attr({name:o.name,"aria-hidden":"true",tabindex:"-1"});var c=a.find("md-option");angular.forEach(c,function(e){var t=angular.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?t.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&t.attr("value",e.getAttribute("value")),s.append(t)}),s.append('<option ng-value="'+o.ngModel+'" selected></option>'),a.parent().append(s)}var u=t.parseAttributeBoolean(o.multiple),p=u?"multiple":"",f='<div class="md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>';return f=t.supplant(f,[p,a.html()]),a.empty().append(d),a.append(f),o.tabindex||o.$set("tabindex",0),function(a,o,d,s){function c(){var e=o.attr("aria-label")||o.attr("placeholder");!e&&C&&C.label&&(e=C.label.text()),$=e,i.expect(o,"aria-label",e)}function p(){x&&(T=T||x.find("md-select-menu").controller("mdSelectMenu"),E.setLabelText(T.selectedLabels()))}function f(){if($){var e=T.selectedLabels({mode:"aria"});o.attr("aria-label",e.length?$+": "+e:$)}}function m(){C&&C.setHasValue(T.selectedLabels().length>0||(o[0].validity||{}).badInput)}function h(){if(x=angular.element(o[0].querySelector(".md-select-menu-container")),O=a,d.mdContainerClass){var e=x[0].getAttribute("class")+" "+d.mdContainerClass;x[0].setAttribute("class",e)}T=x.find("md-select-menu").controller("mdSelectMenu"),T.init(S,d.ngModel),o.on("$destroy",function(){x.remove()})}function g(e){if(n.isNavigationKey(e))e.preventDefault(),v(e);else if(n.isInputKey(e)||n.isNumPadKey(e)){e.preventDefault();var t=T.optNodeForKeyboardSearch(e);if(!t||t.hasAttribute("disabled"))return;var r=angular.element(t).controller("mdOption");T.isMultiple||T.deselect(Object.keys(T.selected)[0]),T.select(r.hashKey,r.value),T.refreshViewValue()}}function v(){O._mdSelectIsOpen=!0,o.attr("aria-expanded","true"),e.show({scope:O,preserveScope:!0,skipCompile:!0,element:x,target:o[0],selectCtrl:E,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!d.mdOnOpen&&(a.$eval(d.mdOnOpen)||!0)})["finally"](function(){O._mdSelectIsOpen=!1,o.focus(),o.attr("aria-expanded","false"),S.$setTouched()})}var b,$,y=!0,C=s[0],E=s[1],S=s[2],M=s[3],w=o.find("md-select-value"),k=angular.isDefined(d.readonly),D=t.parseAttributeBoolean(d.mdNoAsterisk);if(C){var A=C.isErrorGetter||function(){return S.$invalid&&(S.$touched||M&&M.$submitted)};if(C.input&&o.find("md-select-header").find("input")[0]!==C.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");C.input=o,C.label||i.expect(o,"aria-label",o.attr("placeholder")),a.$watch(A,C.setInvalid)}var x,O,T;h(),r(o),M&&angular.isDefined(d.multiple)&&t.nextTick(function(){var e=S.$modelValue||S.$viewValue;e&&M.$setPristine()});var R=S.$render;S.$render=function(){R(),p(),f(),m()},d.$observe("placeholder",S.$render),C&&C.label&&d.$observe("required",function(e){C.label.toggleClass("md-required",e&&!D)}),E.setLabelText=function(e){if(E.setIsPlaceholder(!e),d.mdSelectedText)e=l(d.mdSelectedText)(a);else{var t=d.placeholder||(C&&C.label?C.label.text():"");e=e||t||""}var n=w.children().eq(0);n.html(e)},E.setIsPlaceholder=function(e){e?(w.addClass("md-select-placeholder"),C&&C.label&&C.label.addClass("md-placeholder")):(w.removeClass("md-select-placeholder"),C&&C.label&&C.label.removeClass("md-placeholder"))},k||(o.on("focus",function(e){C&&C.setFocused(!0)}),o.on("blur",function(e){y&&(y=!1,O._mdSelectIsOpen&&e.stopImmediatePropagation()),O._mdSelectIsOpen||(C&&C.setFocused(!1),m())})),E.triggerClose=function(){l(d.mdOnClose)(a)},a.$$postDigest(function(){c(),p(),f()}),a.$watch(function(){return T.selectedLabels()},p);var N;d.$observe("ngMultiple",function(e){N&&N();var t=l(e);N=a.$watch(function(){return t(a)},function(e,t){void 0===e&&void 0===t||(e?o.attr("multiple","multiple"):o.removeAttr("multiple"),o.attr("aria-multiselectable",e?"true":"false"),x&&(T.setMultiple(e),R=S.$render,S.$render=function(){R(),p(),f(),m()},S.$render()))})}),d.$observe("disabled",function(e){angular.isString(e)&&(e=!0),void 0!==b&&b===e||(b=e,e?o.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",v).off("keydown",g):o.attr({tabindex:d.tabindex,"aria-disabled":"false"}).on("click",v).on("keydown",g))}),d.hasOwnProperty("disabled")||d.hasOwnProperty("ngDisabled")||(o.attr({"aria-disabled":"false"}),o.on("click",v),o.on("keydown",g));var _={role:"listbox","aria-expanded":"false","aria-multiselectable":u&&!d.ngMultiple?"true":"false"};o[0].hasAttribute("id")||(_.id="select_"+t.nextUid());var I="select_container_"+t.nextUid();x.attr("id",I),_["aria-owns"]=I,o.attr(_),a.$on("$destroy",function(){e.destroy()["finally"](function(){C&&(C.setFocused(!1),C.setHasValue(!1),C.input=null),S.$setTouched()})})}}var d=n.KEY_CODE;[d.SPACE,d.ENTER,d.UP_ARROW,d.DOWN_ARROW];return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:o,controller:function(){}}}function SelectMenuDirective(e,t,n,r){function i(e,n,i,a){function l(e){13!=e.keyCode&&32!=e.keyCode||o(e)}function o(n){var r=t.getClosest(n.target,"md-option"),i=r&&angular.element(r).data("$mdOptionController");if(r&&i){if(r.hasAttribute("disabled"))return n.stopImmediatePropagation(),!1;var a=d.hashGetter(i.value),l=angular.isDefined(d.selected[a]);e.$apply(function(){d.isMultiple?l?d.deselect(a):d.select(a,i.value):l||(d.deselect(Object.keys(d.selected)[0]),d.select(a,i.value)),d.refreshViewValue()})}}var d=a[0];n.addClass("_md"),r(n),n.on("click",o),n.on("keypress",l)}function a(r,i,a){function l(){var e=d.ngModel.$modelValue||d.ngModel.$viewValue||[];if(angular.isArray(e)){var t=Object.keys(d.selected),n=e.map(d.hashGetter),r=t.filter(function(e){return n.indexOf(e)===-1});r.forEach(d.deselect),n.forEach(function(t,n){d.select(t,e[n])})}}function o(){var e=d.ngModel.$viewValue||d.ngModel.$modelValue;Object.keys(d.selected).forEach(d.deselect),d.select(d.hashGetter(e),e)}var d=this;d.isMultiple=angular.isDefined(i.multiple),d.selected={},d.options={},r.$watchCollection(function(){return d.options},function(){d.ngModel.$render()});var s,c;d.setMultiple=function(e){function t(e,t){return angular.isArray(e||t||[])}var n=d.ngModel;c=c||n.$isEmpty,d.isMultiple=e,s&&s(),d.isMultiple?(n.$validators["md-multiple"]=t,n.$render=l,r.$watchCollection(d.modelBinding,function(e){t(e)&&l(e),d.ngModel.$setPristine()}),n.$isEmpty=function(e){return!e||0===e.length}):(delete n.$validators["md-multiple"],n.$render=o)};var u,p,f,m="",h=300;d.optNodeForKeyboardSearch=function(e){u&&clearTimeout(u),u=setTimeout(function(){u=void 0,m="",f=void 0,p=void 0},h);var t=e.keyCode-(n.isNumPadKey(e)?48:0);m+=String.fromCharCode(t);var r=new RegExp("^"+m,"i");p||(p=a.find("md-option"),f=new Array(p.length),angular.forEach(p,function(e,t){f[t]=e.textContent.trim()}));for(var i=0;i<f.length;++i)if(r.test(f[i]))return p[i]},d.init=function(t,n){if(d.ngModel=t,d.modelBinding=n,d.ngModel.$isEmpty=function(e){return!d.options[d.hashGetter(e)]},t.$options&&t.$options.trackBy){var i={},a=e(t.$options.trackBy);d.hashGetter=function(e,t){return i.$value=e,a(t||r,i)}}else d.hashGetter=function(e){return angular.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++selectNextId)):e};d.setMultiple(d.isMultiple)},d.selectedLabels=function(e){e=e||{};var n=e.mode||"html",r=t.nodesToArray(a[0].querySelectorAll("md-option[selected]"));if(r.length){var i;return"html"==n?i=function(e){if(e.hasAttribute("md-option-empty"))return"";var t=e.innerHTML,n=e.querySelector(".md-ripple-container");n&&(t=t.replace(n.outerHTML,""));var r=e.querySelector(".md-container");return r&&(t=t.replace(r.outerHTML,"")),t}:"aria"==n&&(i=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),r.map(i).join(", ")}return""},d.select=function(e,t){var n=d.options[e];n&&n.setSelected(!0),d.selected[e]=t},d.deselect=function(e){var t=d.options[e];t&&t.setSelected(!1),delete d.selected[e]},d.addOption=function(e,t){if(angular.isDefined(d.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+t.value+'" found.');d.options[e]=t,angular.isDefined(d.selected[e])&&(d.select(e,t.value),angular.isDefined(d.ngModel.$modelValue)&&d.hashGetter(d.ngModel.$modelValue)===e&&d.ngModel.$validate(),d.refreshViewValue())},d.removeOption=function(e){delete d.options[e]},d.refreshViewValue=function(){var e,t=[];for(var n in d.selected)(e=d.options[n])?t.push(e.value):t.push(d.selected[n]);var r=d.ngModel.$options&&d.ngModel.$options.trackBy,i=d.isMultiple?t:t[0],a=d.ngModel.$modelValue;(r?angular.equals(a,i):a==i)||(d.ngModel.$setViewValue(i),d.ngModel.$render())}}return a.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu"],scope:!1,controller:a,link:{pre:i}}}function OptionDirective(e,t){function n(e,t){return e.append(angular.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",t.tabindex||"0"),r(t)||e.attr("md-option-empty",""),i}function r(e){var t=e.value,n=e.ngValue;return t||n}function i(n,r,i,a){function l(e,t,r){if(!s.hashGetter)return void(r||n.$$postDigest(function(){l(e,t,!0)}));var i=s.hashGetter(t,n),a=s.hashGetter(e,n);d.hashKey=a,d.value=e,s.removeOption(i,d),s.addOption(a,d)}function o(){var e={role:"option","aria-selected":"false"};r[0].hasAttribute("id")||(e.id="select_option_"+t.nextUid()),r.attr(e)}var d=a[0],s=a[1];s.isMultiple&&(r.addClass("md-checkbox-enabled"),r.prepend(CHECKBOX_SELECTION_INDICATOR.clone())),angular.isDefined(i.ngValue)?n.$watch(i.ngValue,l):angular.isDefined(i.value)?l(i.value):n.$watch(function(){return r.text().trim()},l),i.$observe("disabled",function(e){e?r.attr("tabindex","-1"):r.attr("tabindex","0")}),n.$$postDigest(function(){i.$observe("selected",function(e){angular.isDefined(e)&&("string"==typeof e&&(e=!0),e?(s.isMultiple||s.deselect(Object.keys(s.selected)[0]),s.select(d.hashKey,d.value)):s.deselect(d.hashKey),s.refreshViewValue())})}),e.attach(n,r),o(),n.$on("$destroy",function(){s.removeOption(d.hashKey,d)})}function a(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}return a.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:a,compile:n}}function OptgroupDirective(){function e(e,t){function n(){return e.parent().find("md-select-header").length}function r(){var n=e.find("label");n.length||(n=angular.element("<label>"),e.prepend(n)),n.addClass("md-container-ignore"),t.label&&n.text(t.label)}n()||r()}return{restrict:"E",compile:e}}function SelectHeaderDirective(){return{restrict:"E"}}function SelectProvider(e){function t(e,t,l,o,d,s,c,u,p){function f(e,t,n){function r(){return c(t,{addClass:"md-leave"}).start()}function i(){t.removeClass("md-active"),t.attr("aria-hidden","true"),t[0].style.display="none",h(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}return n=n||{},n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?i():r().then(i)}function m(n,r,i){function a(e,t,n){return n.parent.append(t),d(function(e,n){try{c(t,{removeClass:"md-leave",duration:0}).start().then(f).then(e)}catch(r){n(r)}})}function f(){return d(function(e){if(i.isRemoved)return d.reject(!1);var t=g(n,r,i);t.container.element.css(b.toCss(t.container.styles)),t.dropDown.element.css(b.toCss(t.dropDown.styles)),s(function(){r.addClass("md-active"),t.dropDown.element.css(b.toCss({transform:""})),h(i.focusedNode),e()})})}function m(e,t,n){return n.disableParentScroll&&!l.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=l.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1,n.hasBackdrop&&(n.backdrop=l.createBackdrop(e,"md-select-backdrop md-click-catcher"),u.enter(n.backdrop,p[0].body,null,{duration:0})),function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll(),delete n.restoreScroll}}function h(e){e&&!e.hasAttribute("disabled")&&e.focus()}function y(e,t){var n=r.find("md-select-menu");if(!t.target)throw new Error(l.supplant(v,[t.target]));angular.extend(t,{isRemoved:!1,target:angular.element(t.target),parent:angular.element(t.parent),selectEl:n,contentEl:r.find("md-content"),optionNodes:n[0].getElementsByTagName("md-option")})}function C(){var e=function(e,t,n){return function(){if(!n.isRemoved){var r=g(e,t,n),i=r.container,a=r.dropDown;i.element.css(b.toCss(i.styles)),a.element.css(b.toCss(a.styles))}}}(n,r,i),t=angular.element(o);return t.on("resize",e),t.on("orientationchange",e),function(){t.off("resize",e),t.off("orientationchange",e)}}function E(){i.loadingAsync&&!i.isRemoved&&(n.$$loadingAsyncDone=!1,d.when(i.loadingAsync).then(function(){n.$$loadingAsyncDone=!0,delete i.loadingAsync}).then(function(){s(f)}))}function S(){function n(t){t.preventDefault(),t.stopPropagation(),i.restoreFocus=!1,l.nextTick(e.hide,!0)}function a(n){switch(n.preventDefault(),n.stopPropagation(),n.keyCode){case $.UP_ARROW:return s();case $.DOWN_ARROW:return d();case $.SPACE:case $.ENTER:var r=l.getClosest(n.target,"md-option");r&&(u.triggerHandler({type:"click",target:r}),n.preventDefault()),c(n);break;case $.TAB:case $.ESCAPE:n.stopPropagation(),n.preventDefault(),i.restoreFocus=!0,l.nextTick(e.hide,!0);break;default:if(t.isInputKey(n)||t.isNumPadKey(n)){var a=u.controller("mdSelectMenu").optNodeForKeyboardSearch(n);i.focusedNode=a||i.focusedNode,a&&a.focus()}}}function o(e){var t,n=l.nodesToArray(i.optionNodes),r=n.indexOf(i.focusedNode);do r===-1?r=0:"next"===e&&r<n.length-1?r++:"prev"===e&&r>0&&r--,t=n[r],t.hasAttribute("disabled")&&(t=void 0);while(!t&&r<n.length-1&&r>0);t&&t.focus(),i.focusedNode=t}function d(){o("next")}function s(){o("prev")}function c(t){function n(){var e=!1;if(t&&t.currentTarget.children.length>0){var n=t.currentTarget.children[0],r=n.scrollHeight>n.clientHeight;if(r&&n.children.length>0){var i=t.pageX-t.currentTarget.getBoundingClientRect().left;i>n.querySelector("md-option").offsetWidth&&(e=!0)}}return e}if(!(t&&"click"==t.type&&t.currentTarget!=u[0]||n())){var r=l.getClosest(t.target,"md-option");r&&r.hasAttribute&&!r.hasAttribute("disabled")&&(t.preventDefault(),t.stopPropagation(),p.isMultiple||(i.restoreFocus=!0,l.nextTick(function(){e.hide(p.ngModel.$viewValue)},!0)))}}if(!i.isRemoved){var u=i.selectEl,p=u.controller("mdSelectMenu")||{};return r.addClass("md-clickable"),i.backdrop&&i.backdrop.on("click",n),u.on("keydown",a),u.on("click",c),function(){i.backdrop&&i.backdrop.off("click",n),u.off("keydown",a),u.off("click",c),r.removeClass("md-clickable"),i.isRemoved=!0}}}return E(),y(n,i),i.hideBackdrop=m(n,r,i),a(n,r,i).then(function(e){return r.attr("aria-hidden","false"),i.alreadyOpen=!0,i.cleanupInteraction=S(),i.cleanupResizing=C(),e},i.hideBackdrop)}function h(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}function g(e,t,d){var s,c=t[0],u=d.target[0].children[0],f=p[0].body,m=d.selectEl[0],h=d.contentEl[0],g=f.getBoundingClientRect(),v=u.getBoundingClientRect(),b=!1,$={left:g.left+SELECT_EDGE_MARGIN,top:SELECT_EDGE_MARGIN,bottom:g.height-SELECT_EDGE_MARGIN,right:g.width-SELECT_EDGE_MARGIN-(l.floatingScrollbars()?16:0)},y={top:v.top-$.top,left:v.left-$.left,right:$.right-(v.left+v.width),bottom:$.bottom-(v.top+v.height)},C=g.width-2*SELECT_EDGE_MARGIN,E=m.querySelector("md-option[selected]"),S=m.getElementsByTagName("md-option"),M=m.getElementsByTagName("md-optgroup"),w=a(t,h),k=n(d.loadingAsync);s=k?h.firstElementChild||h:E?E:M.length?M[0]:S.length?S[0]:h.firstElementChild||h,h.offsetWidth>C?h.style["max-width"]=C+"px":h.style.maxWidth=null,b&&(h.style["min-width"]=v.width+"px"),w&&m.classList.add("md-overflow");var D=s;"MD-OPTGROUP"===(D.tagName||"").toUpperCase()&&(D=S[0]||h.firstElementChild||h,s=D),d.focusedNode=D,c.style.display="block";var A=m.getBoundingClientRect(),x=i(s);if(s){var O=o.getComputedStyle(s);x.paddingLeft=parseInt(O.paddingLeft,10)||0,x.paddingRight=parseInt(O.paddingRight,10)||0}if(w){var T=h.offsetHeight/2;h.scrollTop=x.top+x.height/2-T,y.top<T?h.scrollTop=Math.min(x.top,h.scrollTop+T-y.top):y.bottom<T&&(h.scrollTop=Math.max(x.top+x.height-A.height,h.scrollTop-T+y.bottom))}var R,N,_,I,P;b?(R=v.left,N=v.top+v.height,_="50% 0",N+A.height>$.bottom&&(N=v.top-A.height,_="50% 100%")):(R=v.left+x.left-x.paddingLeft+2,N=Math.floor(v.top+v.height/2-x.height/2-x.top+h.scrollTop)+2,_=x.left+v.width/2+"px "+(x.top+x.height/2-h.scrollTop)+"px 0px",I=Math.min(v.width+x.paddingLeft+x.paddingRight,C),P=window.getComputedStyle(u)["font-size"]);var L=c.getBoundingClientRect(),V=Math.round(100*Math.min(v.width/A.width,1))/100,B=Math.round(100*Math.min(v.height/A.height,1))/100;return{container:{element:angular.element(c),styles:{left:Math.floor(r($.left,R,$.right-L.width)),top:Math.floor(r($.top,N,$.bottom-L.height)),"min-width":I,"font-size":P}},dropDown:{element:angular.element(m),styles:{transformOrigin:_,transform:d.alreadyOpen?"":l.supplant("scale({0},{1})",[V,B])}}}}var v="$mdSelect.show() expected a target element in options.target but got '{0}'!",b=l.dom.animator,$=t.KEY_CODE;return{parent:"body",themable:!0,onShow:m,onRemove:f,hasBackdrop:!0,disableParentScroll:!0}}function n(e){return e&&angular.isFunction(e.then)}function r(e,t,n){return Math.max(e,Math.min(t,n))}function i(e){return e?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}function a(e,t){var n=!1;try{var r=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=r}finally{}return n}return t.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],e("$mdSelect").setDefaults({methods:["target"],options:t})}goog.provide("ngmaterial.components.select"),goog.require("ngmaterial.components.backdrop"),goog.require("ngmaterial.core");var SELECT_EDGE_MARGIN=8,selectNextId=0,CHECKBOX_SELECTION_INDICATOR=angular.element('<div class="md-container"><div class="md-icon"></div></div>');angular.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",SelectDirective).directive("mdSelectMenu",SelectMenuDirective).directive("mdOption",OptionDirective).directive("mdOptgroup",OptgroupDirective).directive("mdSelectHeader",SelectHeaderDirective).provider("$mdSelect",SelectProvider),SelectDirective.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$compile","$parse"],SelectMenuDirective.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"],OptionDirective.$inject=["$mdButtonInkRipple","$mdUtil"],SelectProvider.$inject=["$$interimElementProvider"],ngmaterial.components.select=angular.module("material.components.select");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.showHide');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.showHide');
goog.require('ngmaterial.core');
/**

@@ -26,3 +26,3 @@ * @ngdoc module

function createDirective(name, targetValue) {
return ['$mdUtil', function($mdUtil) {
return ['$mdUtil', '$window', function($mdUtil, $window) {
return {

@@ -35,2 +35,6 @@ restrict: 'A',

var node = $element[0];
var cachedTransitionStyles = node.nodeType === $window.Node.ELEMENT_NODE ?
$window.getComputedStyle(node) : {};
$scope.$watch($attr[name], function(value) {

@@ -41,3 +45,8 @@ if (!!value === targetValue) {

});
$mdUtil.dom.animator.waitTransitionEnd($element).then(function() {
var opts = {
cachedTransitionStyles: cachedTransitionStyles
};
$mdUtil.dom.animator.waitTransitionEnd($element, opts).then(function() {
$scope.$broadcast('$md-resize');

@@ -52,2 +61,3 @@ });

}
ng.material.components.showHide = angular.module("material.components.showHide");
ngmaterial.components.showHide = angular.module("material.components.showHide");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function createDirective(e,i){return["$mdUtil",function(n){return{restrict:"A",multiElement:!0,link:function(t,o,r){var a=t.$on("$md-resize-enable",function(){a(),t.$watch(r[e],function(e){!!e===i&&(n.nextTick(function(){t.$broadcast("$md-resize")}),n.dom.animator.waitTransitionEnd(o).then(function(){t.$broadcast("$md-resize")}))})})}}}]}goog.provide("ng.material.components.showHide"),goog.require("ng.material.core"),angular.module("material.components.showHide",["material.core"]).directive("ngShow",createDirective("ngShow",!0)).directive("ngHide",createDirective("ngHide",!1)),ng.material.components.showHide=angular.module("material.components.showHide");
function createDirective(e,i){return["$mdUtil","$window",function(n,t){return{restrict:"A",multiElement:!0,link:function(o,r,a){var c=o.$on("$md-resize-enable",function(){c();var d=r[0],m=d.nodeType===t.Node.ELEMENT_NODE?t.getComputedStyle(d):{};o.$watch(a[e],function(e){if(!!e===i){n.nextTick(function(){o.$broadcast("$md-resize")});var t={cachedTransitionStyles:m};n.dom.animator.waitTransitionEnd(r,t).then(function(){o.$broadcast("$md-resize")})}})})}}}]}goog.provide("ngmaterial.components.showHide"),goog.require("ngmaterial.core"),angular.module("material.components.showHide",["material.core"]).directive("ngShow",createDirective("ngShow",!0)).directive("ngHide",createDirective("ngHide",!1)),ngmaterial.components.showHide=angular.module("material.components.showHide");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.sidenav');
goog.require('ng.material.components.backdrop');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.sidenav');
goog.require('ngmaterial.components.backdrop');
goog.require('ngmaterial.core');
/**

@@ -74,2 +74,7 @@ * @ngdoc module

* $mdSidenav(componentId).isLockedOpen();
* // On close callback to handle close, backdrop click or escape key pressed
* // Callback happens BEFORE the close action occurs.
* $mdSidenav(componentId).onClose(function () {
* $log.debug('closing');
* });
* </hljs>

@@ -117,2 +122,3 @@ */

close : rejectFn,
onClose : angular.noop,
then : function(callback) {

@@ -243,3 +249,3 @@ return waitForInstance(handle)

*
* The $mdMedia() servic e is exposed to the is-locked-open attribute, which
* The $mdMedia() service is exposed to the is-locked-open attribute, which
* can be given a media query or one of the `sm`, `gt-sm`, `md`, `gt-md`, `lg` or `gt-lg` presets.

@@ -260,3 +266,3 @@ * Examples:

compile: function(element) {
element.addClass('_md-closed');
element.addClass('md-closed');
element.attr('tabIndex', '-1');

@@ -274,2 +280,3 @@ return postLink;

var triggeringElement = null;
var previousContainerStyles;
var promise = $q.when(true);

@@ -289,3 +296,3 @@ var isLockedOpenParsed = $parse(attr.mdIsLockedOpen);

if (!angular.isDefined(attr.mdDisableBackdrop)) {
backdrop = $mdUtil.createBackdrop(scope, "_md-sidenav-backdrop md-opaque ng-enter");
backdrop = $mdUtil.createBackdrop(scope, "md-sidenav-backdrop md-opaque ng-enter");
}

@@ -323,8 +330,8 @@

if (isLocked === oldValue) {
element.toggleClass('_md-locked-open', !!isLocked);
element.toggleClass('md-locked-open', !!isLocked);
} else {
$animate[isLocked ? 'addClass' : 'removeClass'](element, '_md-locked-open');
$animate[isLocked ? 'addClass' : 'removeClass'](element, 'md-locked-open');
}
if (backdrop) {
backdrop.toggleClass('_md-locked-open', !!isLocked);
backdrop.toggleClass('md-locked-open', !!isLocked);
}

@@ -345,2 +352,4 @@ }

var restorePositioning = updateContainerPositions(parent, isOpen);
if ( isOpen ) {

@@ -354,14 +363,58 @@ // Capture upon opening..

return promise = $q.all([
isOpen && backdrop ? $animate.enter(backdrop, parent) :
backdrop ? $animate.leave(backdrop) : $q.when(true),
$animate[isOpen ? 'removeClass' : 'addClass'](element, '_md-closed')
])
.then(function() {
// Perform focus when animations are ALL done...
if (scope.isOpen) {
focusEl && focusEl.focus();
}
});
isOpen && backdrop ? $animate.enter(backdrop, parent) : backdrop ?
$animate.leave(backdrop) : $q.when(true),
$animate[isOpen ? 'removeClass' : 'addClass'](element, 'md-closed')
]).then(function() {
// Perform focus when animations are ALL done...
if (scope.isOpen) {
focusEl && focusEl.focus();
}
// Restores the positioning on the sidenav and backdrop.
restorePositioning && restorePositioning();
});
}
function updateContainerPositions(parent, willOpen) {
var drawerEl = element[0];
var scrollTop = parent[0].scrollTop;
if (willOpen && scrollTop) {
previousContainerStyles = {
top: drawerEl.style.top,
bottom: drawerEl.style.bottom,
height: drawerEl.style.height
};
// When the parent is scrolled down, then we want to be able to show the sidenav at the current scroll
// position. We're moving the sidenav down to the correct scroll position and apply the height of the
// parent, to increase the performance. Using 100% as height, will impact the performance heavily.
var positionStyle = {
top: scrollTop + 'px',
bottom: 'auto',
height: parent[0].clientHeight + 'px'
};
// Apply the new position styles to the sidenav and backdrop.
element.css(positionStyle);
backdrop.css(positionStyle);
}
// When the sidenav is closing and we have previous defined container styles,
// then we return a restore function, which resets the sidenav and backdrop.
if (!willOpen && previousContainerStyles) {
return function() {
drawerEl.style.top = previousContainerStyles.top;
drawerEl.style.bottom = previousContainerStyles.bottom;
drawerEl.style.height = previousContainerStyles.height;
backdrop[0].style.top = null;
backdrop[0].style.bottom = null;
backdrop[0].style.height = null;
previousContainerStyles = null;
}
}
}
/**

@@ -398,2 +451,4 @@ * Prevent parent scrolling (when the SideNav is open)

} else {
if (scope.isOpen && sidenavCtrl.onCloseCb) sidenavCtrl.onCloseCb();
return $q(function(resolve){

@@ -463,2 +518,8 @@ // Toggle value to force an async `updateIsOpen()` to run

// Synchronous setters
self.onClose = function (callback) {
self.onCloseCb = callback;
return self;
};
// Async actions

@@ -474,2 +535,2 @@ self.open = function() { return self.$toggleOpen( true ); };

ng.material.components.sidenav = angular.module("material.components.sidenav");
ngmaterial.components.sidenav = angular.module("material.components.sidenav");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function SidenavService(e,n,o,t){function r(e,t){var r=function(){return!1},i=function(){return o.when(n.supplant(d,[t||""]))};return angular.extend({isLockedOpen:r,isOpen:r,toggle:i,open:i,close:i,then:function(e){return a(t).then(e||angular.noop)}},e)}function i(o,r){var i=e.get(o);return i||r?i:void t.error(n.supplant(d,[o||""]))}function a(n){return e.when(n)["catch"](t.error)}var d="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",c={find:i,waitFor:a};return function(e,n){if(angular.isUndefined(e))return c;var o=n===!0,t=c.find(e,o);return!t&&o?c.waitFor(e):!t&&angular.isUndefined(n)?r(c,e):t}}function SidenavFocusDirective(){return{restrict:"A",require:"^mdSidenav",link:function(e,n,o,t){}}}function SidenavDirective(e,n,o,t,r,i,a,d,c,s){function u(i,u,l,m){function p(e,n){i.isLockedOpen=e,e===n?u.toggleClass("_md-locked-open",!!e):r[e?"addClass":"removeClass"](u,"_md-locked-open"),C&&C.toggleClass("_md-locked-open",!!e)}function v(e){var o=n.findFocusTarget(u)||n.findFocusTarget(u,"[md-sidenav-focus]")||u,t=u.parent();return t[e?"on":"off"]("keydown",$),C&&C[e?"on":"off"]("click",O),e&&(k=s[0].activeElement),f(e),h=c.all([e&&C?r.enter(C,t):C?r.leave(C):c.when(!0),r[e?"removeClass":"addClass"](u,"_md-closed")]).then(function(){i.isOpen&&o&&o.focus()})}function f(e){var n=u.parent();e&&!S?(S=n.css("overflow"),n.css("overflow","hidden")):angular.isDefined(S)&&(n.css("overflow",S),S=void 0)}function g(e){return i.isOpen==e?c.when(!0):c(function(o){i.isOpen=e,n.nextTick(function(){h.then(function(e){i.isOpen||(k&&k.focus(),k=null),o(e)})})})}function $(e){var n=e.keyCode===o.KEY_CODE.ESCAPE;return n?O(e):c.when(!0)}function O(e){return e.preventDefault(),m.close()}var S,C,k=null,h=c.when(!0),w=a(l.mdIsLockedOpen),D=function(){return w(i.$parent,{$media:function(n){return d.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),e(n)},$mdMedia:e})};angular.isDefined(l.mdDisableBackdrop)||(C=n.createBackdrop(i,"_md-sidenav-backdrop md-opaque ng-enter")),u.addClass("_md"),t(u),C&&t.inherit(C,u),u.on("$destroy",function(){C&&C.remove(),m.destroy()}),i.$on("$destroy",function(){C&&C.remove()}),i.$watch(D,p),i.$watch("isOpen",v),m.$toggleOpen=g}return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("_md-closed"),e.attr("tabIndex","-1"),u}}}function SidenavController(e,n,o,t,r){var i=this;i.isOpen=function(){return!!e.isOpen},i.isLockedOpen=function(){return!!e.isLockedOpen},i.open=function(){return i.$toggleOpen(!0)},i.close=function(){return i.$toggleOpen(!1)},i.toggle=function(){return i.$toggleOpen(!e.isOpen)},i.$toggleOpen=function(n){return r.when(e.isOpen=n)},i.destroy=t.register(i,o.mdComponentId)}goog.provide("ng.material.components.sidenav"),goog.require("ng.material.components.backdrop"),goog.require("ng.material.core"),angular.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",SidenavService).directive("mdSidenav",SidenavDirective).directive("mdSidenavFocus",SidenavFocusDirective).controller("$mdSidenavController",SidenavController),SidenavService.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],SidenavDirective.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$animate","$compile","$parse","$log","$q","$document"],SidenavController.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"],ng.material.components.sidenav=angular.module("material.components.sidenav");
function SidenavService(e,n,o,t){function i(e,t){var i=function(){return!1},r=function(){return o.when(n.supplant(d,[t||""]))};return angular.extend({isLockedOpen:i,isOpen:i,toggle:r,open:r,close:r,onClose:angular.noop,then:function(e){return a(t).then(e||angular.noop)}},e)}function r(o,i){var r=e.get(o);return r||i?r:void t.error(n.supplant(d,[o||""]))}function a(n){return e.when(n)["catch"](t.error)}var d="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",c={find:r,waitFor:a};return function(e,n){if(angular.isUndefined(e))return c;var o=n===!0,t=c.find(e,o);return!t&&o?c.waitFor(e):!t&&angular.isUndefined(n)?i(c,e):t}}function SidenavFocusDirective(){return{restrict:"A",require:"^mdSidenav",link:function(e,n,o,t){}}}function SidenavDirective(e,n,o,t,i,r,a,d,c,s){function l(r,l,u,p){function m(e,n){r.isLockedOpen=e,e===n?l.toggleClass("md-locked-open",!!e):i[e?"addClass":"removeClass"](l,"md-locked-open"),S&&S.toggleClass("md-locked-open",!!e)}function f(e){var o=n.findFocusTarget(l)||n.findFocusTarget(l,"[md-sidenav-focus]")||l,t=l.parent();t[e?"on":"off"]("keydown",h),S&&S[e?"on":"off"]("click",C);var a=v(t,e);return e&&(y=s[0].activeElement),g(e),w=c.all([e&&S?i.enter(S,t):S?i.leave(S):c.when(!0),i[e?"removeClass":"addClass"](l,"md-closed")]).then(function(){r.isOpen&&o&&o.focus(),a&&a()})}function v(e,n){var o=l[0],t=e[0].scrollTop;if(n&&t){k={top:o.style.top,bottom:o.style.bottom,height:o.style.height};var i={top:t+"px",bottom:"auto",height:e[0].clientHeight+"px"};l.css(i),S.css(i)}if(!n&&k)return function(){o.style.top=k.top,o.style.bottom=k.bottom,o.style.height=k.height,S[0].style.top=null,S[0].style.bottom=null,S[0].style.height=null,k=null}}function g(e){var n=l.parent();e&&!O?(O=n.css("overflow"),n.css("overflow","hidden")):angular.isDefined(O)&&(n.css("overflow",O),O=void 0)}function $(e){return r.isOpen==e?c.when(!0):(r.isOpen&&p.onCloseCb&&p.onCloseCb(),c(function(o){r.isOpen=e,n.nextTick(function(){w.then(function(e){r.isOpen||(y&&y.focus(),y=null),o(e)})})}))}function h(e){var n=e.keyCode===o.KEY_CODE.ESCAPE;return n?C(e):c.when(!0)}function C(e){return e.preventDefault(),p.close()}var O,S,k,y=null,w=c.when(!0),b=a(u.mdIsLockedOpen),D=function(){return b(r.$parent,{$media:function(n){return d.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),e(n)},$mdMedia:e})};angular.isDefined(u.mdDisableBackdrop)||(S=n.createBackdrop(r,"md-sidenav-backdrop md-opaque ng-enter")),l.addClass("_md"),t(l),S&&t.inherit(S,l),l.on("$destroy",function(){S&&S.remove(),p.destroy()}),r.$on("$destroy",function(){S&&S.remove()}),r.$watch(D,m),r.$watch("isOpen",f),p.$toggleOpen=$}return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed"),e.attr("tabIndex","-1"),l}}}function SidenavController(e,n,o,t,i){var r=this;r.isOpen=function(){return!!e.isOpen},r.isLockedOpen=function(){return!!e.isLockedOpen},r.onClose=function(e){return r.onCloseCb=e,r},r.open=function(){return r.$toggleOpen(!0)},r.close=function(){return r.$toggleOpen(!1)},r.toggle=function(){return r.$toggleOpen(!e.isOpen)},r.$toggleOpen=function(n){return i.when(e.isOpen=n)},r.destroy=t.register(r,o.mdComponentId)}goog.provide("ngmaterial.components.sidenav"),goog.require("ngmaterial.components.backdrop"),goog.require("ngmaterial.core"),angular.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",SidenavService).directive("mdSidenav",SidenavDirective).directive("mdSidenavFocus",SidenavFocusDirective).controller("$mdSidenavController",SidenavController),SidenavService.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],SidenavDirective.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$animate","$compile","$parse","$log","$q","$document"],SidenavController.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"],ngmaterial.components.sidenav=angular.module("material.components.sidenav");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.slider');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.slider');
goog.require('ngmaterial.core');
/**

@@ -39,2 +39,3 @@ * @ngdoc module

var slider = elem.find('md-slider');
if (!slider) {

@@ -83,15 +84,18 @@ return;

ctrl.fitInputWidthToTextLength = function (length) {
var input = element.find('md-input-container');
var computedStyle = getComputedStyle(input[0]);
var minWidth = parseInt(computedStyle['min-width']);
var padding = parseInt(computedStyle['padding']) * 2;
initialMaxWidth = initialMaxWidth || parseInt(computedStyle['max-width']);
var input = element[0].querySelector('md-input-container');
var newMaxWidth = Math.max(initialMaxWidth, minWidth + padding + (minWidth / 2 * length));
if (input) {
var computedStyle = getComputedStyle(input);
var minWidth = parseInt(computedStyle.minWidth);
var padding = parseInt(computedStyle.padding) * 2;
input.css('max-width', newMaxWidth + 'px');
initialMaxWidth = initialMaxWidth || parseInt(computedStyle.maxWidth);
var newMaxWidth = Math.max(initialMaxWidth, minWidth + padding + (minWidth / 2 * length));
input.style.maxWidth = newMaxWidth + 'px';
}
};
}
};
}
}
};
}

@@ -131,4 +135,10 @@

* </hljs>
* <h4>Invert Mode</h4>
* <hljs lang="html">
* <md-slider md-invert ng-model="myValue" step="10" min="10" max="130">
* </md-slider>
* </hljs>
*
* @param {boolean=} md-discrete Whether to enable discrete mode.
* @param {boolean=} md-invert Whether to enable invert mode.
* @param {number=} step The distance between values the user is allowed to pick. Default 1.

@@ -144,17 +154,17 @@ * @param {number=} min The minimum value the user is allowed to pick. Default 0.

template:
'<div class="_md-slider-wrapper">' +
'<div class="_md-slider-content">' +
'<div class="_md-track-container">' +
'<div class="_md-track"></div>' +
'<div class="_md-track _md-track-fill"></div>' +
'<div class="_md-track-ticks"></div>' +
'<div class="md-slider-wrapper">' +
'<div class="md-slider-content">' +
'<div class="md-track-container">' +
'<div class="md-track"></div>' +
'<div class="md-track md-track-fill"></div>' +
'<div class="md-track-ticks"></div>' +
'</div>' +
'<div class="_md-thumb-container">' +
'<div class="_md-thumb"></div>' +
'<div class="_md-focus-thumb"></div>' +
'<div class="_md-focus-ring"></div>' +
'<div class="_md-sign">' +
'<span class="_md-thumb-text"></span>' +
'<div class="md-thumb-container">' +
'<div class="md-thumb"></div>' +
'<div class="md-focus-thumb"></div>' +
'<div class="md-focus-ring"></div>' +
'<div class="md-sign">' +
'<span class="md-thumb-text"></span>' +
'</div>' +
'<div class="_md-disabled-thumb"></div>' +
'<div class="md-disabled-thumb"></div>' +
'</div>' +

@@ -171,3 +181,3 @@ '</div>' +

function compile (tElement, tAttrs) {
var wrapper = angular.element(tElement[0].getElementsByClassName('_md-slider-wrapper'));
var wrapper = angular.element(tElement[0].getElementsByClassName('md-slider-wrapper'));

@@ -206,10 +216,10 @@ var tabIndex = tAttrs.tabindex || 0;

var thumb = angular.element(element[0].querySelector('._md-thumb'));
var thumbText = angular.element(element[0].querySelector('._md-thumb-text'));
var thumb = angular.element(element[0].querySelector('.md-thumb'));
var thumbText = angular.element(element[0].querySelector('.md-thumb-text'));
var thumbContainer = thumb.parent();
var trackContainer = angular.element(element[0].querySelector('._md-track-container'));
var activeTrack = angular.element(element[0].querySelector('._md-track-fill'));
var tickContainer = angular.element(element[0].querySelector('._md-track-ticks'));
var wrapper = angular.element(element[0].getElementsByClassName('_md-slider-wrapper'));
var content = angular.element(element[0].getElementsByClassName('_md-slider-content'));
var trackContainer = angular.element(element[0].querySelector('.md-track-container'));
var activeTrack = angular.element(element[0].querySelector('.md-track-fill'));
var tickContainer = angular.element(element[0].querySelector('.md-track-ticks'));
var wrapper = angular.element(element[0].getElementsByClassName('md-slider-wrapper'));
var content = angular.element(element[0].getElementsByClassName('md-slider-content'));
var throttledRefreshDimensions = $mdUtil.throttle(refreshSliderDimensions, 5000);

@@ -221,2 +231,3 @@

var discrete = angular.isDefined(attr.mdDiscrete);
var invert = angular.isDefined(attr.mdInvert);
angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(0);

@@ -376,2 +387,3 @@ angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(100);

}
changeAmount = invert ? -changeAmount : changeAmount;
if (changeAmount) {

@@ -408,3 +420,3 @@ if (ev.metaKey || ev.ctrlKey || ev.altKey) {

wrapper.removeClass('md-focused');
element.removeClass('_md-active');
element.removeClass('md-active');
clearTicks();

@@ -426,3 +438,3 @@ }

var percent = (ngModelCtrl.$viewValue - min) / (max - min);
var percent = valueToPercent(ngModelCtrl.$viewValue);
scope.modelValue = ngModelCtrl.$viewValue;

@@ -466,8 +478,16 @@ element.attr('aria-valuenow', ngModelCtrl.$viewValue);

var thumbPosition = (percent * 100) + '%';
var activeTrackPercent = invert ? (1 - percent) * 100 + '%' : thumbPosition;
thumbContainer.css(vertical ? 'bottom' : 'left', thumbPosition);
activeTrack.css(vertical ? 'height' : 'width', thumbPosition);
if (vertical) {
thumbContainer.css('bottom', thumbPosition);
}
else {
$mdUtil.bidiProperty(thumbContainer, 'left', 'right', thumbPosition);
}
element.toggleClass('_md-min', percent === 0);
element.toggleClass('_md-max', percent === 1);
activeTrack.css(vertical ? 'height' : 'width', activeTrackPercent);
element.toggleClass((invert ? 'md-max' : 'md-min'), percent === 0);
element.toggleClass((invert ? 'md-min' : 'md-max'), percent === 1);
}

@@ -483,3 +503,3 @@

element.addClass('_md-active');
element.addClass('md-active');
element[0].focus();

@@ -498,3 +518,3 @@ refreshSliderDimensions();

element.removeClass('_md-dragging');
element.removeClass('md-dragging');

@@ -514,3 +534,3 @@ var exactVal = percentToValue( positionToPercent( vertical ? ev.pointer.y : ev.pointer.x ));

element.addClass('_md-dragging');
element.addClass('md-dragging');
setSliderFromEvent(ev);

@@ -576,2 +596,6 @@ }

if (!vertical && $mdUtil.bidi() === 'rtl') {
calc = 1 - calc;
}
return Math.max(0, Math.min(1, vertical ? 1 - calc : calc));

@@ -586,7 +610,9 @@ }

function percentToValue( percent ) {
return (min + percent * (max - min));
var adjustedPercent = invert ? (1 - percent) : percent;
return (min + adjustedPercent * (max - min));
}
function valueToPercent( val ) {
return (val - min)/(max - min);
var percent = (val - min) / (max - min);
return invert ? (1 - percent) : percent;
}

@@ -597,2 +623,2 @@ }

ng.material.components.slider = angular.module("material.components.slider");
ngmaterial.components.slider = angular.module("material.components.slider");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function SliderContainerDirective(){return{controller:function(){},compile:function(e){var t=e.find("md-slider");if(t){var n=t.attr("md-vertical");return void 0!==n&&e.attr("md-vertical",""),t.attr("flex")||t.attr("flex",""),function(e,t,n,a){function i(e){t.children().attr("disabled",e),t.find("input").attr("disabled",e)}t.addClass("_md");var r=angular.noop;n.disabled?i(!0):n.ngDisabled&&(r=e.$watch(n.ngDisabled,function(e){i(e)})),e.$on("$destroy",function(){r()});var o;a.fitInputWidthToTextLength=function(e){var n=t.find("md-input-container"),a=getComputedStyle(n[0]),i=parseInt(a["min-width"]),r=2*parseInt(a.padding);o=o||parseInt(a["max-width"]);var d=Math.max(o,i+r+i/2*e);n.css("max-width",d+"px")}}}}}}function SliderDirective(e,t,n,a,i,r,o,d,l,s){function u(e,t){var a=angular.element(e[0].getElementsByClassName("_md-slider-wrapper")),i=t.tabindex||0;return a.attr("tabindex",i),(t.disabled||t.ngDisabled)&&a.attr("tabindex",-1),a.attr("role","slider"),n.expect(e,"aria-label"),c}function c(n,u,c,m){function f(){_(),k()}function v(e){oe=parseFloat(e),u.attr("aria-valuemin",e),f()}function g(e){de=parseFloat(e),u.attr("aria-valuemax",e),f()}function p(e){le=parseFloat(e)}function h(e){se=E(parseInt(e),0,6)}function $(){u.attr("aria-disabled",!!U())}function w(){if(ae&&!U()&&!angular.isUndefined(le)){if(0>=le){var e="Slider step value must be greater than zero when in discrete mode";throw l.error(e),new Error(e)}var n=Math.floor((de-oe)/le);ue||(ue=angular.element("<canvas>").css("position","absolute"),X.append(ue),ce=ue[0].getContext("2d"));var a=C();!a||a.height||a.width||(_(),a=me),ue[0].width=a.width,ue[0].height=a.height;for(var i,r=0;n>=r;r++){var o=t.getComputedStyle(X[0]);ce.fillStyle=o.color||"black",i=Math.floor((ne?a.height:a.width)*(r/n)),ce.fillRect(ne?0:i-1,ne?i-1:0,ne?a.width:2,ne?2:a.height)}}}function b(){if(ue&&ce){var e=C();ce.clearRect(0,0,e.width,e.height)}}function _(){me=J[0].getBoundingClientRect()}function C(){return ee(),me}function x(e){if(!U()){var t;(ne?e.keyCode===i.KEY_CODE.DOWN_ARROW:e.keyCode===i.KEY_CODE.LEFT_ARROW)?t=-le:(ne?e.keyCode===i.KEY_CODE.UP_ARROW:e.keyCode===i.KEY_CODE.RIGHT_ARROW)&&(t=le),t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),n.$evalAsync(function(){V(B.$viewValue+t)}))}}function y(){w(),n.mouseActive=!0,Z.removeClass("md-focused"),s(function(){n.mouseActive=!1},100)}function D(){n.mouseActive===!1&&Z.addClass("md-focused")}function S(){Z.removeClass("md-focused"),u.removeClass("_md-active"),b()}function V(e){B.$setViewValue(E(M(e)))}function k(){isNaN(B.$viewValue)&&(B.$viewValue=B.$modelValue),B.$viewValue=E(B.$viewValue);var e=(B.$viewValue-oe)/(de-oe);n.modelValue=B.$viewValue,u.attr("aria-valuenow",B.$viewValue),A(e),j.text(B.$viewValue)}function E(e,t,n){return angular.isNumber(e)?(t=angular.isNumber(t)?t:oe,n=angular.isNumber(n)?n:de,Math.max(t,Math.min(n,e))):void 0}function M(e){if(angular.isNumber(e)){var t=Math.round((e-oe)/le)*le+oe;return t=Math.round(t*Math.pow(10,se))/Math.pow(10,se),Y&&Y.fitInputWidthToTextLength&&a.debounce(function(){Y.fitInputWidthToTextLength(t.toString().length)},100)(),t}}function A(e){e=L(e);var t=100*e+"%";H.css(ne?"bottom":"left",t),Q.css(ne?"height":"width",t),u.toggleClass("_md-min",0===e),u.toggleClass("_md-max",1===e)}function R(e){if(!U()){u.addClass("_md-active"),u[0].focus(),_();var t=P(F(ne?e.pointer.y:e.pointer.x)),a=E(M(t));n.$apply(function(){V(a),A(z(a))})}}function N(e){if(!U()){u.removeClass("_md-dragging");var t=P(F(ne?e.pointer.y:e.pointer.x)),a=E(M(t));n.$apply(function(){V(a),k()})}}function T(e){U()||(fe=!0,e.stopPropagation(),u.addClass("_md-dragging"),W(e))}function O(e){fe&&(e.stopPropagation(),W(e))}function I(e){fe&&(e.stopPropagation(),fe=!1)}function W(e){ae?K(ne?e.pointer.y:e.pointer.x):q(ne?e.pointer.y:e.pointer.x)}function q(e){n.$evalAsync(function(){V(P(F(e)))})}function K(e){var t=P(F(e)),n=E(M(t));A(F(e)),j.text(n)}function L(e){return Math.max(0,Math.min(e||0,1))}function F(e){var t=ne?me.top:me.left,n=ne?me.height:me.width,a=(e-t)/n;return Math.max(0,Math.min(1,ne?1-a:a))}function P(e){return oe+e*(de-oe)}function z(e){return(e-oe)/(de-oe)}r(u);var B=m[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},Y=m[1],U=(angular.element(a.getClosest(u,"_md-slider-container",!0)),c.ngDisabled?angular.bind(null,d(c.ngDisabled),n.$parent):function(){return u[0].hasAttribute("disabled")}),G=angular.element(u[0].querySelector("._md-thumb")),j=angular.element(u[0].querySelector("._md-thumb-text")),H=G.parent(),J=angular.element(u[0].querySelector("._md-track-container")),Q=angular.element(u[0].querySelector("._md-track-fill")),X=angular.element(u[0].querySelector("._md-track-ticks")),Z=angular.element(u[0].getElementsByClassName("_md-slider-wrapper")),ee=(angular.element(u[0].getElementsByClassName("_md-slider-content")),a.throttle(_,5e3)),te=3,ne=angular.isDefined(c.mdVertical),ae=angular.isDefined(c.mdDiscrete);angular.isDefined(c.min)?c.$observe("min",v):v(0),angular.isDefined(c.max)?c.$observe("max",g):g(100),angular.isDefined(c.step)?c.$observe("step",p):p(1),angular.isDefined(c.round)?c.$observe("round",h):h(te);var ie=angular.noop;c.ngDisabled&&(ie=n.$parent.$watch(c.ngDisabled,$)),o.register(Z,"drag",{horizontal:!ne}),n.mouseActive=!1,Z.on("keydown",x).on("mousedown",y).on("focus",D).on("blur",S).on("$md.pressdown",R).on("$md.pressup",N).on("$md.dragstart",T).on("$md.drag",O).on("$md.dragend",I),setTimeout(f,0);var re=e.throttle(f);angular.element(t).on("resize",re),n.$on("$destroy",function(){angular.element(t).off("resize",re)}),B.$render=k,B.$viewChangeListeners.push(k),B.$formatters.push(E),B.$formatters.push(M);var oe,de,le,se,ue,ce,me={};_();var fe=!1}return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="_md-slider-wrapper"><div class="_md-slider-content"><div class="_md-track-container"><div class="_md-track"></div><div class="_md-track _md-track-fill"></div><div class="_md-track-ticks"></div></div><div class="_md-thumb-container"><div class="_md-thumb"></div><div class="_md-focus-thumb"></div><div class="_md-focus-ring"></div><div class="_md-sign"><span class="_md-thumb-text"></span></div><div class="_md-disabled-thumb"></div></div></div></div>',compile:u}}goog.provide("ng.material.components.slider"),goog.require("ng.material.core"),angular.module("material.components.slider",["material.core"]).directive("mdSlider",SliderDirective).directive("mdSliderContainer",SliderContainerDirective),SliderDirective.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"],ng.material.components.slider=angular.module("material.components.slider");
function SliderContainerDirective(){return{controller:function(){},compile:function(e){var t=e.find("md-slider");if(t){var n=t.attr("md-vertical");return void 0!==n&&e.attr("md-vertical",""),t.attr("flex")||t.attr("flex",""),function(e,t,n,a){function i(e){t.children().attr("disabled",e),t.find("input").attr("disabled",e)}t.addClass("_md");var r=angular.noop;n.disabled?i(!0):n.ngDisabled&&(r=e.$watch(n.ngDisabled,function(e){i(e)})),e.$on("$destroy",function(){r()});var o;a.fitInputWidthToTextLength=function(e){var n=t[0].querySelector("md-input-container");if(n){var a=getComputedStyle(n),i=parseInt(a.minWidth),r=2*parseInt(a.padding);o=o||parseInt(a.maxWidth);var d=Math.max(o,i+r+i/2*e);n.style.maxWidth=d+"px"}}}}}}}function SliderDirective(e,t,n,a,i,r,o,d,l,s){function u(e,t){var a=angular.element(e[0].getElementsByClassName("md-slider-wrapper")),i=t.tabindex||0;return a.attr("tabindex",i),(t.disabled||t.ngDisabled)&&a.attr("tabindex",-1),a.attr("role","slider"),n.expect(e,"aria-label"),c}function c(n,u,c,m){function f(){C(),E()}function v(e){de=parseFloat(e),u.attr("aria-valuemin",e),f()}function g(e){le=parseFloat(e),u.attr("aria-valuemax",e),f()}function p(e){se=parseFloat(e)}function h(e){ue=M(parseInt(e),0,6)}function $(){u.attr("aria-disabled",!!U())}function b(){if(ae&&!U()&&!angular.isUndefined(se)){if(se<=0){var e="Slider step value must be greater than zero when in discrete mode";throw l.error(e),new Error(e)}var n=Math.floor((le-de)/se);ce||(ce=angular.element("<canvas>").css("position","absolute"),X.append(ce),me=ce[0].getContext("2d"));var a=y();!a||a.height||a.width||(C(),a=fe),ce[0].width=a.width,ce[0].height=a.height;for(var i,r=0;r<=n;r++){var o=t.getComputedStyle(X[0]);me.fillStyle=o.color||"black",i=Math.floor((ne?a.height:a.width)*(r/n)),me.fillRect(ne?0:i-1,ne?i-1:0,ne?a.width:2,ne?2:a.height)}}}function w(){if(ce&&me){var e=y();me.clearRect(0,0,e.width,e.height)}}function C(){fe=J[0].getBoundingClientRect()}function y(){return ee(),fe}function x(e){if(!U()){var t;(ne?e.keyCode===i.KEY_CODE.DOWN_ARROW:e.keyCode===i.KEY_CODE.LEFT_ARROW)?t=-se:(ne?e.keyCode===i.KEY_CODE.UP_ARROW:e.keyCode===i.KEY_CODE.RIGHT_ARROW)&&(t=se),t=ie?-t:t,t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),n.$evalAsync(function(){k(B.$viewValue+t)}))}}function D(){b(),n.mouseActive=!0,Z.removeClass("md-focused"),s(function(){n.mouseActive=!1},100)}function S(){n.mouseActive===!1&&Z.addClass("md-focused")}function V(){Z.removeClass("md-focused"),u.removeClass("md-active"),w()}function k(e){B.$setViewValue(M(A(e)))}function E(){isNaN(B.$viewValue)&&(B.$viewValue=B.$modelValue),B.$viewValue=M(B.$viewValue);var e=z(B.$viewValue);n.modelValue=B.$viewValue,u.attr("aria-valuenow",B.$viewValue),R(e),j.text(B.$viewValue)}function M(e,t,n){if(angular.isNumber(e))return t=angular.isNumber(t)?t:de,n=angular.isNumber(n)?n:le,Math.max(t,Math.min(n,e))}function A(e){if(angular.isNumber(e)){var t=Math.round((e-de)/se)*se+de;return t=Math.round(t*Math.pow(10,ue))/Math.pow(10,ue),Y&&Y.fitInputWidthToTextLength&&a.debounce(function(){Y.fitInputWidthToTextLength(t.toString().length)},100)(),t}}function R(e){e=L(e);var t=100*e+"%",n=ie?100*(1-e)+"%":t;ne?H.css("bottom",t):a.bidiProperty(H,"left","right",t),Q.css(ne?"height":"width",n),u.toggleClass(ie?"md-max":"md-min",0===e),u.toggleClass(ie?"md-min":"md-max",1===e)}function W(e){if(!U()){u.addClass("md-active"),u[0].focus(),C();var t=F(P(ne?e.pointer.y:e.pointer.x)),a=M(A(t));n.$apply(function(){k(a),R(z(a))})}}function N(e){if(!U()){u.removeClass("md-dragging");var t=F(P(ne?e.pointer.y:e.pointer.x)),a=M(A(t));n.$apply(function(){k(a),E()})}}function T(e){U()||(ve=!0,e.stopPropagation(),u.addClass("md-dragging"),O(e))}function _(e){ve&&(e.stopPropagation(),O(e))}function I(e){ve&&(e.stopPropagation(),ve=!1)}function O(e){ae?K(ne?e.pointer.y:e.pointer.x):q(ne?e.pointer.y:e.pointer.x)}function q(e){n.$evalAsync(function(){k(F(P(e)))})}function K(e){var t=F(P(e)),n=M(A(t));R(P(e)),j.text(n)}function L(e){return Math.max(0,Math.min(e||0,1))}function P(e){var t=ne?fe.top:fe.left,n=ne?fe.height:fe.width,i=(e-t)/n;return ne||"rtl"!==a.bidi()||(i=1-i),Math.max(0,Math.min(1,ne?1-i:i))}function F(e){var t=ie?1-e:e;return de+t*(le-de)}function z(e){var t=(e-de)/(le-de);return ie?1-t:t}r(u);var B=m[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},Y=m[1],U=(angular.element(a.getClosest(u,"_md-slider-container",!0)),c.ngDisabled?angular.bind(null,d(c.ngDisabled),n.$parent):function(){return u[0].hasAttribute("disabled")}),G=angular.element(u[0].querySelector(".md-thumb")),j=angular.element(u[0].querySelector(".md-thumb-text")),H=G.parent(),J=angular.element(u[0].querySelector(".md-track-container")),Q=angular.element(u[0].querySelector(".md-track-fill")),X=angular.element(u[0].querySelector(".md-track-ticks")),Z=angular.element(u[0].getElementsByClassName("md-slider-wrapper")),ee=(angular.element(u[0].getElementsByClassName("md-slider-content")),a.throttle(C,5e3)),te=3,ne=angular.isDefined(c.mdVertical),ae=angular.isDefined(c.mdDiscrete),ie=angular.isDefined(c.mdInvert);angular.isDefined(c.min)?c.$observe("min",v):v(0),angular.isDefined(c.max)?c.$observe("max",g):g(100),angular.isDefined(c.step)?c.$observe("step",p):p(1),angular.isDefined(c.round)?c.$observe("round",h):h(te);var re=angular.noop;c.ngDisabled&&(re=n.$parent.$watch(c.ngDisabled,$)),o.register(Z,"drag",{horizontal:!ne}),n.mouseActive=!1,Z.on("keydown",x).on("mousedown",D).on("focus",S).on("blur",V).on("$md.pressdown",W).on("$md.pressup",N).on("$md.dragstart",T).on("$md.drag",_).on("$md.dragend",I),setTimeout(f,0);var oe=e.throttle(f);angular.element(t).on("resize",oe),n.$on("$destroy",function(){angular.element(t).off("resize",oe)}),B.$render=E,B.$viewChangeListeners.push(E),B.$formatters.push(M),B.$formatters.push(A);var de,le,se,ue,ce,me,fe={};C();var ve=!1}return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="md-slider-wrapper"><div class="md-slider-content"><div class="md-track-container"><div class="md-track"></div><div class="md-track md-track-fill"></div><div class="md-track-ticks"></div></div><div class="md-thumb-container"><div class="md-thumb"></div><div class="md-focus-thumb"></div><div class="md-focus-ring"></div><div class="md-sign"><span class="md-thumb-text"></span></div><div class="md-disabled-thumb"></div></div></div></div>',compile:u}}goog.provide("ngmaterial.components.slider"),goog.require("ngmaterial.core"),angular.module("material.components.slider",["material.core"]).directive("mdSlider",SliderDirective).directive("mdSliderContainer",SliderContainerDirective),SliderDirective.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"],ngmaterial.components.slider=angular.module("material.components.slider");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.sticky');
goog.require('ng.material.components.content');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.sticky');
goog.require('ngmaterial.components.content');
goog.require('ngmaterial.core');
/**

@@ -33,2 +33,5 @@ * @ngdoc module

*
* Whenever the current browser supports stickiness natively, the `$mdSticky` service will just
* use the native browser stickiness.
*
* By default the `$mdSticky` service compiles the cloned element, when not specified through the `elementClone`

@@ -82,5 +85,5 @@ * parameter, in the same scope as the actual element lives.

*/
function MdSticky($document, $mdConstant, $$rAF, $mdUtil, $compile) {
function MdSticky($mdConstant, $$rAF, $mdUtil, $compile) {
var browserStickySupport = checkStickySupport();
var browserStickySupport = $mdUtil.checkStickySupport();

@@ -143,3 +146,3 @@ /**

function add(element, stickyClone) {
stickyClone.addClass('_md-sticky-clone');
stickyClone.addClass('md-sticky-clone');

@@ -331,20 +334,3 @@ var item = {

// Function to check for browser sticky support
function checkStickySupport($el) {
var stickyProp;
var testEl = angular.element('<div>');
$document[0].body.appendChild(testEl[0]);
var stickyProps = ['sticky', '-webkit-sticky'];
for (var i = 0; i < stickyProps.length; ++i) {
testEl.css({position: stickyProps[i], top: 0, 'z-index': 2});
if (testEl.css('position') == stickyProps[i]) {
stickyProp = stickyProps[i];
break;
}
}
testEl.remove();
return stickyProp;
}
// Android 4.4 don't accurately give scroll events.

@@ -381,4 +367,4 @@ // To fix this problem, we setup a fake scroll event. We say:

}
MdSticky.$inject = ["$document", "$mdConstant", "$$rAF", "$mdUtil", "$compile"];
MdSticky.$inject = ["$mdConstant", "$$rAF", "$mdUtil", "$compile"];
ng.material.components.sticky = angular.module("material.components.sticky");
ngmaterial.components.sticky = angular.module("material.components.sticky");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdSticky(t,e,n,r,o){function i(t){function o(t,e){e.addClass("_md-sticky-clone");var n={element:t,clone:e};return d.items.push(n),r.nextTick(function(){p.prepend(n.clone)}),m(),function(){d.items.forEach(function(e,n){e.element[0]===t[0]&&(d.items.splice(n,1),e.clone.remove())}),m()}}function i(){d.items.forEach(l),d.items=d.items.sort(function(t,e){return t.top<e.top?-1:1});for(var t,e=p.prop("scrollTop"),n=d.items.length-1;n>=0;n--)if(e>d.items[n].top){t=d.items[n];break}s(t)}function l(t){var e=t.element[0];for(t.top=0,t.left=0,t.right=0;e&&e!==p[0];)t.top+=e.offsetTop,t.left+=e.offsetLeft,e.offsetParent&&(t.right+=e.offsetParent.offsetWidth-e.offsetWidth-e.offsetLeft),e=e.offsetParent;t.height=t.element.prop("offsetHeight");var n=r.floatingScrollbars()?"0":void 0;r.bidi(t.clone,"margin-left",t.left,n),r.bidi(t.clone,"margin-right",n,t.right)}function a(){var t=p.prop("scrollTop"),e=t>(a.prevScrollTop||0);if(a.prevScrollTop=t,0===t)return void s(null);if(e){if(d.next&&d.next.top<=t)return void s(d.next);if(d.current&&d.next&&d.next.top-t<=d.next.height)return void u(d.current,t+(d.next.top-d.next.height-t))}if(!e){if(d.current&&d.prev&&t<d.current.top)return void s(d.prev);if(d.next&&d.current&&t>=d.next.top-d.current.height)return void u(d.current,t+(d.next.top-t-d.current.height))}d.current&&u(d.current,t)}function s(t){if(d.current!==t){d.current&&(u(d.current,null),f(d.current,null)),t&&f(t,"active"),d.current=t;var e=d.items.indexOf(t);d.next=d.items[e+1],d.prev=d.items[e-1],f(d.next,"next"),f(d.prev,"prev")}}function f(t,e){t&&t.state!==e&&(t.state&&(t.clone.attr("sticky-prev-state",t.state),t.element.attr("sticky-prev-state",t.state)),t.clone.attr("sticky-state",e),t.element.attr("sticky-state",e),t.state=e)}function u(t,n){t&&(null===n||void 0===n?t.translateY&&(t.translateY=null,t.clone.css(e.CSS.TRANSFORM,"")):(t.translateY=n,r.bidi(t.clone,e.CSS.TRANSFORM,"translate3d("+t.left+"px,"+n+"px,0)","translateY("+n+"px)")))}var p=t.$element,m=n.throttle(i);c(p),p.on("$scrollstart",m),p.on("$scroll",a);var d;return d={prev:null,current:null,next:null,items:[],add:o,refreshElements:i}}function l(e){var n,r=angular.element("<div>");t[0].body.appendChild(r[0]);for(var o=["sticky","-webkit-sticky"],i=0;i<o.length;++i)if(r.css({position:o[i],top:0,"z-index":2}),r.css("position")==o[i]){n=o[i];break}return r.remove(),n}function c(t){function e(){+r.now()-i>l?(o=!1,t.triggerHandler("$scrollend")):(t.triggerHandler("$scroll"),n.throttle(e))}var o,i,l=200;t.on("scroll touchmove",function(){o||(o=!0,n.throttle(e),t.triggerHandler("$scrollstart")),t.triggerHandler("$scroll"),i=+r.now()})}var a=l();return function(t,e,n){var r=e.controller("mdContent");if(r)if(a)e.css({position:a,top:0,"z-index":2});else{var l=r.$element.data("$$sticky");l||(l=i(r),r.$element.data("$$sticky",l));var c=n||o(e.clone())(t),s=l.add(e,c);t.$on("$destroy",s)}}}goog.provide("ng.material.components.sticky"),goog.require("ng.material.components.content"),goog.require("ng.material.core"),angular.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",MdSticky),MdSticky.$inject=["$document","$mdConstant","$$rAF","$mdUtil","$compile"],ng.material.components.sticky=angular.module("material.components.sticky");
function MdSticky(t,e,n,r){function o(r){function o(t,e){e.addClass("md-sticky-clone");var r={element:t,clone:e};return d.items.push(r),n.nextTick(function(){p.prepend(r.clone)}),m(),function(){d.items.forEach(function(e,n){e.element[0]===t[0]&&(d.items.splice(n,1),e.clone.remove())}),m()}}function l(){d.items.forEach(c),d.items=d.items.sort(function(t,e){return t.top<e.top?-1:1});for(var t,e=p.prop("scrollTop"),n=d.items.length-1;n>=0;n--)if(e>d.items[n].top){t=d.items[n];break}s(t)}function c(t){var e=t.element[0];for(t.top=0,t.left=0,t.right=0;e&&e!==p[0];)t.top+=e.offsetTop,t.left+=e.offsetLeft,e.offsetParent&&(t.right+=e.offsetParent.offsetWidth-e.offsetWidth-e.offsetLeft),e=e.offsetParent;t.height=t.element.prop("offsetHeight");var r=n.floatingScrollbars()?"0":void 0;n.bidi(t.clone,"margin-left",t.left,r),n.bidi(t.clone,"margin-right",r,t.right)}function a(){var t=p.prop("scrollTop"),e=t>(a.prevScrollTop||0);if(a.prevScrollTop=t,0===t)return void s(null);if(e){if(d.next&&d.next.top<=t)return void s(d.next);if(d.current&&d.next&&d.next.top-t<=d.next.height)return void u(d.current,t+(d.next.top-d.next.height-t))}if(!e){if(d.current&&d.prev&&t<d.current.top)return void s(d.prev);if(d.next&&d.current&&t>=d.next.top-d.current.height)return void u(d.current,t+(d.next.top-t-d.current.height))}d.current&&u(d.current,t)}function s(t){if(d.current!==t){d.current&&(u(d.current,null),f(d.current,null)),t&&f(t,"active"),d.current=t;var e=d.items.indexOf(t);d.next=d.items[e+1],d.prev=d.items[e-1],f(d.next,"next"),f(d.prev,"prev")}}function f(t,e){t&&t.state!==e&&(t.state&&(t.clone.attr("sticky-prev-state",t.state),t.element.attr("sticky-prev-state",t.state)),t.clone.attr("sticky-state",e),t.element.attr("sticky-state",e),t.state=e)}function u(e,r){e&&(null===r||void 0===r?e.translateY&&(e.translateY=null,e.clone.css(t.CSS.TRANSFORM,"")):(e.translateY=r,n.bidi(e.clone,t.CSS.TRANSFORM,"translate3d("+e.left+"px,"+r+"px,0)","translateY("+r+"px)")))}var p=r.$element,m=e.throttle(l);i(p),p.on("$scrollstart",m),p.on("$scroll",a);var d;return d={prev:null,current:null,next:null,items:[],add:o,refreshElements:l}}function i(t){function r(){+n.now()-i>l?(o=!1,t.triggerHandler("$scrollend")):(t.triggerHandler("$scroll"),e.throttle(r))}var o,i,l=200;t.on("scroll touchmove",function(){o||(o=!0,e.throttle(r),t.triggerHandler("$scrollstart")),t.triggerHandler("$scroll"),i=+n.now()})}var l=n.checkStickySupport();return function(t,e,n){var i=e.controller("mdContent");if(i)if(l)e.css({position:l,top:0,"z-index":2});else{var c=i.$element.data("$$sticky");c||(c=o(i),i.$element.data("$$sticky",c));var a=n||r(e.clone())(t),s=c.add(e,a);t.$on("$destroy",s)}}}goog.provide("ngmaterial.components.sticky"),goog.require("ngmaterial.components.content"),goog.require("ngmaterial.core"),angular.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",MdSticky),MdSticky.$inject=["$mdConstant","$$rAF","$mdUtil","$compile"],ngmaterial.components.sticky=angular.module("material.components.sticky");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.subheader');
goog.require('ng.material.components.sticky');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.subheader');
goog.require('ngmaterial.components.sticky');
goog.require('ngmaterial.core');
/**

@@ -44,6 +44,17 @@ * @ngdoc module

* @description
* The `<md-subheader>` directive is a subheader for a section. By default it is sticky.
* You can make it not sticky by applying the `md-no-sticky` class to the subheader.
* The `md-subheader` directive creates a sticky subheader for a section.
*
* Developers are able to disable the stickiness of the subheader by using the following markup
*
* <hljs lang="html">
* <md-subheader class="md-no-sticky">Not Sticky</md-subheader>
* </hljs>
*
* ### Notes
* - The `md-subheader` directive uses the [$mdSticky](/api/service/$mdSticky) service to make the
* subheader sticky.
*
* > Whenever the current browser doesn't support stickiness natively, the subheader
* will be compiled twice to create a sticky clone of the subheader.
*
* @usage

@@ -62,4 +73,4 @@ * <hljs lang="html">

'<div class="md-subheader _md">' +
' <div class="_md-subheader-inner">' +
' <div class="_md-subheader-content"></div>' +
' <div class="md-subheader-inner">' +
' <div class="md-subheader-content"></div>' +
' </div>' +

@@ -71,7 +82,11 @@ '</div>'

element.addClass('_md');
// Remove the ngRepeat attribute from the root element, because we don't want to compile
// the ngRepeat for the sticky clone again.
$mdUtil.prefixer().removeAttribute(element, 'ng-repeat');
var outerHTML = element[0].outerHTML;
function getContent(el) {
return angular.element(el[0].querySelector('._md-subheader-content'));
return angular.element(el[0].querySelector('.md-subheader-content'));
}

@@ -93,9 +108,13 @@

// DIV to ensure we have something $mdSticky can use
var wrapper = angular.element('<div class="_md-subheader-wrapper">' + outerHTML + '</div>');
var wrapper = $compile('<div class="md-subheader-wrapper">' + outerHTML + '</div>')(scope);
// Immediately append our transcluded clone into the wrapper.
// We don't have to recompile the element again, because the clone is already
// compiled in it's transclusion scope. If we recompile the outerHTML of the new clone, we would lose
// our ngIf's and other previous registered bindings / properties.
getContent(wrapper).append(clone);
// Delay initialization until after any `ng-if`/`ng-repeat`/etc has finished before
// attempting to create the clone
$mdUtil.nextTick(function() {
// Append our transcluded clone into the wrapper.
// We don't have to recompile the element again, because the clone is already
// compiled in it's transclusion scope. If we recompile the outerHTML of the new clone, we would lose
// our ngIf's and other previous registered bindings / properties.
getContent(wrapper).append(clone);
});

@@ -112,2 +131,2 @@ // Make the element sticky and provide the stickyClone our self, to avoid recompilation of the subheader

ng.material.components.subheader = angular.module("material.components.subheader");
ngmaterial.components.subheader = angular.module("material.components.subheader");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdSubheaderDirective(e,a,r,n){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md"> <div class="_md-subheader-inner"> <div class="_md-subheader-content"></div> </div></div>',link:function(a,n,d,t,i){function o(e){return angular.element(e[0].querySelector("._md-subheader-content"))}r(n),n.addClass("_md");var c=n[0].outerHTML;i(a,function(e){o(n).append(e)}),n.hasClass("md-no-sticky")||i(a,function(r){var d=angular.element('<div class="_md-subheader-wrapper">'+c+"</div>");o(d).append(r),e(a,n,d)})}}}goog.provide("ng.material.components.subheader"),goog.require("ng.material.components.sticky"),goog.require("ng.material.core"),angular.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",MdSubheaderDirective),MdSubheaderDirective.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil"],ng.material.components.subheader=angular.module("material.components.subheader");
function MdSubheaderDirective(e,r,a,n){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md"> <div class="md-subheader-inner"> <div class="md-subheader-content"></div> </div></div>',link:function(t,i,d,o,c){function m(e){return angular.element(e[0].querySelector(".md-subheader-content"))}a(i),i.addClass("_md"),n.prefixer().removeAttribute(i,"ng-repeat");var s=i[0].outerHTML;c(t,function(e){m(i).append(e)}),i.hasClass("md-no-sticky")||c(t,function(a){var d=r('<div class="md-subheader-wrapper">'+s+"</div>")(t);n.nextTick(function(){m(d).append(a)}),e(t,i,d)})}}}goog.provide("ngmaterial.components.subheader"),goog.require("ngmaterial.components.sticky"),goog.require("ngmaterial.core"),angular.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",MdSubheaderDirective),MdSubheaderDirective.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil"],ngmaterial.components.subheader=angular.module("material.components.subheader");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.swipe');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.swipe');
goog.require('ngmaterial.core');
/**

@@ -107,2 +107,2 @@ * @ngdoc module

ng.material.components.swipe = angular.module("material.components.swipe");
ngmaterial.components.swipe = angular.module("material.components.swipe");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function getDirective(e){function i(e){function i(i,r,o){var c=e(o[t]);r.on(n,function(e){i.$applyAsync(function(){c(i,{$event:e})})})}return{restrict:"A",link:i}}var t="md"+e,n="$md."+e.toLowerCase();return i.$inject=["$parse"],i}goog.provide("ng.material.components.swipe"),goog.require("ng.material.core"),angular.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",getDirective("SwipeLeft")).directive("mdSwipeRight",getDirective("SwipeRight")).directive("mdSwipeUp",getDirective("SwipeUp")).directive("mdSwipeDown",getDirective("SwipeDown")),ng.material.components.swipe=angular.module("material.components.swipe");
function getDirective(e){function i(e){function i(i,r,o){var c=e(o[t]);r.on(n,function(e){i.$applyAsync(function(){c(i,{$event:e})})})}return{restrict:"A",link:i}}var t="md"+e,n="$md."+e.toLowerCase();return i.$inject=["$parse"],i}goog.provide("ngmaterial.components.swipe"),goog.require("ngmaterial.core"),angular.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",getDirective("SwipeLeft")).directive("mdSwipeRight",getDirective("SwipeRight")).directive("mdSwipeUp",getDirective("SwipeUp")).directive("mdSwipeDown",getDirective("SwipeDown")),ngmaterial.components.swipe=angular.module("material.components.swipe");

@@ -5,9 +5,8 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.switch');
goog.require('ng.material.components.checkbox');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.switch');
goog.require('ngmaterial.components.checkbox');
goog.require('ngmaterial.core');
/**
* @private
* @ngdoc module

@@ -60,3 +59,3 @@ * @name material.components.switch

*/
function MdSwitch(mdCheckboxDirective, $mdUtil, $mdConstant, $parse, $$rAF, $mdGesture) {
function MdSwitch(mdCheckboxDirective, $mdUtil, $mdConstant, $parse, $$rAF, $mdGesture, $timeout) {
var checkboxDirective = mdCheckboxDirective[0];

@@ -69,9 +68,9 @@

template:
'<div class="_md-container">' +
'<div class="_md-bar"></div>' +
'<div class="_md-thumb-container">' +
'<div class="_md-thumb" md-ink-ripple md-ink-ripple-checkbox></div>' +
'<div class="md-container">' +
'<div class="md-bar"></div>' +
'<div class="md-thumb-container">' +
'<div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div>' +
'</div>'+
'</div>' +
'<div ng-transclude class="_md-label"></div>',
'<div ng-transclude class="md-label"></div>',
require: '?ngModel',

@@ -82,5 +81,5 @@ compile: mdSwitchCompile

function mdSwitchCompile(element, attr) {
var checkboxLink = checkboxDirective.compile(element, attr);
var checkboxLink = checkboxDirective.compile(element, attr).post;
// No transition on initial load.
element.addClass('_md-dragging');
element.addClass('md-dragging');

@@ -97,8 +96,8 @@ return function (scope, element, attr, ngModel) {

var thumbContainer = angular.element(element[0].querySelector('._md-thumb-container'));
var switchContainer = angular.element(element[0].querySelector('._md-container'));
var thumbContainer = angular.element(element[0].querySelector('.md-thumb-container'));
var switchContainer = angular.element(element[0].querySelector('.md-container'));
// no transition on initial load
$$rAF(function() {
element.removeClass('_md-dragging');
element.removeClass('md-dragging');
});

@@ -127,3 +126,3 @@

element.addClass('_md-dragging');
element.addClass('md-dragging');
drag = {width: thumbContainer.prop('offsetWidth')};

@@ -152,3 +151,3 @@ }

element.removeClass('_md-dragging');
element.removeClass('md-dragging');
thumbContainer.css($mdConstant.CSS.TRANSFORM, '');

@@ -158,3 +157,3 @@

// or if the drag distance is >50% of the total.
var isChanged = ngModel.$viewValue ? drag.translate > 0.5 : drag.translate < 0.5;
var isChanged = ngModel.$viewValue ? drag.translate < 0.5 : drag.translate > 0.5;
if (isChanged) {

@@ -164,2 +163,8 @@ applyModelValue(!ngModel.$viewValue);

drag = null;
// Wait for incoming mouse click
scope.skipToggle = true;
$timeout(function() {
scope.skipToggle = false;
}, 1);
}

@@ -179,4 +184,4 @@

}
MdSwitch.$inject = ["mdCheckboxDirective", "$mdUtil", "$mdConstant", "$parse", "$$rAF", "$mdGesture"];
MdSwitch.$inject = ["mdCheckboxDirective", "$mdUtil", "$mdConstant", "$parse", "$$rAF", "$mdGesture", "$timeout"];
ng.material.components.switch = angular.module("material.components.switch");
ngmaterial.components.switch = angular.module("material.components.switch");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdSwitch(e,t,a,n,i,r){function o(e,o){var c=d.compile(e,o);return e.addClass("_md-dragging"),function(e,o,d,l){function s(t){p&&p(e)||(t.stopPropagation(),o.addClass("_md-dragging"),f={width:v.prop("offsetWidth")})}function m(e){if(f){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/f.width,n=l.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),v.css(a.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),f.translate=n}}function g(e){if(f){e.stopPropagation(),o.removeClass("_md-dragging"),v.css(a.CSS.TRANSFORM,"");var t=l.$viewValue?f.translate>.5:f.translate<.5;t&&u(!l.$viewValue),f=null}}function u(t){e.$apply(function(){l.$setViewValue(t),l.$render()})}l=l||t.fakeNgModel();var p=null;null!=d.disabled?p=function(){return!0}:d.ngDisabled&&(p=n(d.ngDisabled));var v=angular.element(o[0].querySelector("._md-thumb-container")),h=angular.element(o[0].querySelector("._md-container"));i(function(){o.removeClass("_md-dragging")}),c(e,o,d,l),p&&e.$watch(p,function(e){o.attr("tabindex",e?-1:0)}),r.register(h,"drag"),h.on("$md.dragstart",s).on("$md.drag",m).on("$md.dragend",g);var f}}var d=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="_md-container"><div class="_md-bar"></div><div class="_md-thumb-container"><div class="_md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="_md-label"></div>',require:"?ngModel",compile:o}}goog.provide("ng.material.components.switch"),goog.require("ng.material.components.checkbox"),goog.require("ng.material.core"),angular.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",MdSwitch),MdSwitch.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture"],ng.material.components["switch"]=angular.module("material.components.switch");
function MdSwitch(e,t,n,a,i,r,o){function d(e,d){var l=c.compile(e,d).post;return e.addClass("md-dragging"),function(e,d,c,s){function m(t){v&&v(e)||(t.stopPropagation(),d.addClass("md-dragging"),$={width:h.prop("offsetWidth")})}function g(e){if($){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/$.width,a=s.$viewValue?1+t:t;a=Math.max(0,Math.min(1,a)),h.css(n.CSS.TRANSFORM,"translate3d("+100*a+"%,0,0)"),$.translate=a}}function u(t){if($){t.stopPropagation(),d.removeClass("md-dragging"),h.css(n.CSS.TRANSFORM,"");var a=s.$viewValue?$.translate<.5:$.translate>.5;a&&p(!s.$viewValue),$=null,e.skipToggle=!0,o(function(){e.skipToggle=!1},1)}}function p(t){e.$apply(function(){s.$setViewValue(t),s.$render()})}s=s||t.fakeNgModel();var v=null;null!=c.disabled?v=function(){return!0}:c.ngDisabled&&(v=a(c.ngDisabled));var h=angular.element(d[0].querySelector(".md-thumb-container")),f=angular.element(d[0].querySelector(".md-container"));i(function(){d.removeClass("md-dragging")}),l(e,d,c,s),v&&e.$watch(v,function(e){d.attr("tabindex",e?-1:0)}),r.register(f,"drag"),f.on("$md.dragstart",m).on("$md.drag",g).on("$md.dragend",u);var $}}var c=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:d}}goog.provide("ngmaterial.components.switch"),goog.require("ngmaterial.components.checkbox"),goog.require("ngmaterial.core"),angular.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",MdSwitch),MdSwitch.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture","$timeout"],ngmaterial.components["switch"]=angular.module("material.components.switch");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.tabs');
goog.require('ng.material.components.icon');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.tabs');
goog.require('ngmaterial.components.icon');
goog.require('ngmaterial.core');
/**

@@ -716,3 +716,7 @@ * @ngdoc module

var canvasWidth = $element.prop('clientWidth');
angular.forEach(getElements().dummies, function (tab) { canvasWidth -= tab.offsetWidth; });
angular.forEach(getElements().dummies, function (tab) {
canvasWidth -= tab.offsetWidth;
});
return canvasWidth < 0;

@@ -782,8 +786,13 @@ }

/**
* Calculates the width of the pagination wrapper by summing the widths of the dummy tabs.
* @returns {number}
*/
function calcPagingWidth () {
var width = 1;
return calcTabsWidth(getElements().dummies);
}
angular.forEach(getElements().dummies, function (element) {
function calcTabsWidth(tabs) {
var width = 0;
angular.forEach(tabs, function (tab) {
//-- Uses the larger value between `getBoundingClientRect().width` and `offsetWidth`. This

@@ -793,3 +802,3 @@ // prevents `offsetWidth` value from being rounded down and causing wrapping issues, but

// of a dialog)
width += Math.max(element.offsetWidth, element.getBoundingClientRect().width);
width += Math.max(tab.offsetWidth, tab.getBoundingClientRect().width);
});

@@ -960,2 +969,3 @@

}
if (!ctrl.tabs.length) return queue.push(ctrl.updateInkBarStyles);

@@ -965,2 +975,3 @@ // if the element is not visible, we will not be able to calculate sizes until it is

if (!$element.prop('offsetParent')) return handleResizeWhenVisible();
var index = ctrl.selectedIndex,

@@ -970,9 +981,11 @@ totalWidth = elements.paging.offsetWidth,

left = tab.offsetLeft,
right = totalWidth - left - tab.offsetWidth,
tabWidth;
right = totalWidth - left - tab.offsetWidth;
if (ctrl.shouldCenterTabs) {
tabWidth = Array.prototype.slice.call(elements.tabs).reduce(function (value, element) {
return value + element.offsetWidth;
}, 0);
if (totalWidth > tabWidth) $mdUtil.nextTick(updateInkBarStyles, false);
// We need to use the same calculate process as in the pagination wrapper, to avoid rounding deviations.
var tabWidth = calcTabsWidth(elements.tabs);
if (totalWidth > tabWidth) {
$mdUtil.nextTick(updateInkBarStyles, false);
}
}

@@ -1118,3 +1131,3 @@ updateInkBarClassName();

function MdTabs () {
function MdTabs ($$mdSvgRegistry) {
return {

@@ -1137,3 +1150,3 @@ scope: {

'ng-click="$mdTabsCtrl.previousPage()"> ' +
'<md-icon md-svg-icon="md-tabs-arrow"></md-icon> ' +
'<md-icon md-svg-src="'+ $$mdSvgRegistry.mdTabsArrow +'"></md-icon> ' +
'</md-prev-button> ' +

@@ -1148,3 +1161,3 @@ '<md-next-button ' +

'ng-click="$mdTabsCtrl.nextPage()"> ' +
'<md-icon md-svg-icon="md-tabs-arrow"></md-icon> ' +
'<md-icon md-svg-src="'+ $$mdSvgRegistry.mdTabsArrow +'"></md-icon> ' +
'</md-next-button> ' +

@@ -1185,3 +1198,3 @@ '<md-tabs-canvas ' +

'</md-pagination-wrapper> ' +
'<md-tabs-dummy-wrapper class="_md-visually-hidden md-dummy-wrapper"> ' +
'<md-tabs-dummy-wrapper class="md-visually-hidden md-dummy-wrapper"> ' +
'<md-dummy-tab ' +

@@ -1233,2 +1246,3 @@ 'class="md-tab" ' +

}
MdTabs.$inject = ["$$mdSvgRegistry"];

@@ -1258,4 +1272,12 @@ angular

});
var config = { childList: true, subtree: true };
var config = {
childList: true,
subtree: true,
// Per https://bugzilla.mozilla.org/show_bug.cgi?id=1138368, browsers will not fire
// the childList mutation, once a <span> element's innerText changes.
// The characterData of the <span> element will change.
characterData: true
};
observer.observe(element[0], config);

@@ -1315,2 +1337,2 @@

ng.material.components.tabs = angular.module("material.components.tabs");
ngmaterial.components.tabs = angular.module("material.components.tabs");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdTab(){function e(e,n,a,s){if(s){var r=s.getTabElementIndex(n),d=t(n,"md-tab-body").remove(),i=t(n,"md-tab-label").remove(),o=s.insertTab({scope:e,parent:e.$parent,index:r,element:n,template:d.html(),label:i.html()},r);e.select=e.select||angular.noop,e.deselect=e.deselect||angular.noop,e.$watch("active",function(e){e&&s.select(o.getIndex(),!0)}),e.$watch("disabled",function(){s.refreshIndex()}),e.$watch(function(){return s.getTabElementIndex(n)},function(e){o.index=e,s.updateTabOrder()}),e.$on("$destroy",function(){s.removeTab(o)})}}function t(e,t){for(var n=e[0].children,a=0,s=n.length;s>a;a++){var r=n[a];if(r.tagName===t.toUpperCase())return angular.element(r)}return angular.element()}return{require:"^?mdTabs",terminal:!0,compile:function(n,a){var s=t(n,"md-tab-label"),r=t(n,"md-tab-body");if(0==s.length&&(s=angular.element("<md-tab-label></md-tab-label>"),a.label?s.text(a.label):s.append(n.contents()),0==r.length)){var d=n.contents().detach();r=angular.element("<md-tab-body></md-tab-body>"),r.append(d)}return n.append(s),r.html()&&n.append(r),e},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}}}function MdTabItem(){return{require:"^?mdTabs",link:function(e,t,n,a){a&&a.attachRipple(e,t)}}}function MdTabLabel(){return{terminal:!0}}function MdTabScroll(e){return{restrict:"A",compile:function(t,n){var a=e(n.mdTabScroll,null,!0);return function(e,t){t.on("mousewheel",function(t){e.$apply(function(){a(e,{$event:t})})})}}}}function MdTabsController(e,t,n,a,s,r,d,i,o,c){function l(){ie.selectedIndex=ie.selectedIndex||0,b(),u(),m(),c(t),r.nextTick(function(){ce=R(),ne(),X(),ae(),ie.tabs[ie.selectedIndex]&&ie.tabs[ie.selectedIndex].scope.select(),me=!0,U()})}function b(){var e=i.$mdTabsTemplate,n=angular.element(t[0].querySelector("md-tab-data"));n.html(e),o(n.contents())(ie.parent),delete i.$mdTabsTemplate}function m(){angular.element(n).on("resize",D),e.$on("$destroy",g)}function u(){e.$watch("$mdTabsCtrl.selectedIndex",w)}function f(e,t){var n=i.$normalize("md-"+e);t&&z(e,t),i.$observe(n,function(t){ie[e]=t})}function p(e,t){function n(t){ie[e]="false"!==t}var a=i.$normalize("md-"+e);t&&z(e,t),i.hasOwnProperty(a)&&n(i[a]),i.$observe(a,n)}function g(){be=!0,angular.element(n).off("resize",D)}function h(e){var t=R();angular.element(t.wrapper).toggleClass("md-stretch-tabs",_()),ae()}function T(e){ie.shouldCenterTabs=H()}function x(e,t){if(e!==t){var n=R();angular.forEach(n.tabs,function(t){t.style.maxWidth=e+"px"}),r.nextTick(ie.updateInkBarStyles)}}function v(e,t){e!==t&&(ie.maxTabWidth=G(),ie.shouldCenterTabs=H(),r.nextTick(function(){ie.maxTabWidth=G(),X(ie.selectedIndex)}))}function $(e){t[e?"removeClass":"addClass"]("md-no-tab-content")}function C(t){var n=R(),s=ie.shouldCenterTabs?"":"-"+t+"px";angular.element(n.paging).css(a.CSS.TRANSFORM,"translate3d("+s+", 0, 0)"),e.$broadcast("$mdTabsPaginationChanged")}function I(e,t){e!==t&&R().tabs[e]&&(X(),V())}function w(t,n){t!==n&&(ie.selectedIndex=j(t),ie.lastSelectedIndex=n,ie.updateInkBarStyles(),ne(),X(t),e.$broadcast("$mdTabsChanged"),ie.tabs[n]&&ie.tabs[n].scope.deselect(),ie.tabs[t]&&ie.tabs[t].scope.select())}function k(e){var n=t[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(n,e[0])}function y(){y.watcher||(y.watcher=e.$watch(function(){r.nextTick(function(){y.watcher&&t.prop("offsetParent")&&(y.watcher(),y.watcher=null,D())},!1)}))}function S(e){switch(e.keyCode){case a.KEY_CODE.LEFT_ARROW:e.preventDefault(),Q(-1,!0);break;case a.KEY_CODE.RIGHT_ARROW:e.preventDefault(),Q(1,!0);break;case a.KEY_CODE.SPACE:case a.KEY_CODE.ENTER:e.preventDefault(),oe||P(ie.focusIndex)}ie.lastClick=!1}function P(e,t){oe||(ie.focusIndex=ie.selectedIndex=e),ie.lastClick=!0,t&&ie.noSelectClick||r.nextTick(function(){ie.tabs[e].element.triggerHandler("click")},!1)}function L(e){ie.shouldPaginate&&(e.preventDefault(),ie.offsetLeft=re(ie.offsetLeft-e.wheelDelta))}function M(){var e,t,n=R(),a=n.canvas.clientWidth,s=a+ie.offsetLeft;for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>s));e++);ie.offsetLeft=re(t.offsetLeft)}function W(){var e,t,n=R();for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>=ie.offsetLeft));e++);ie.offsetLeft=re(t.offsetLeft+t.offsetWidth-n.canvas.clientWidth)}function D(){ie.lastSelectedIndex=ie.selectedIndex,ie.offsetLeft=re(ie.offsetLeft),r.nextTick(function(){ie.updateInkBarStyles(),U()})}function E(e){angular.element(R().inkBar).toggleClass("ng-hide",e)}function A(e){t.toggleClass("md-dynamic-height",e)}function O(e){if(!be){var t=ie.selectedIndex,n=ie.tabs.splice(e.getIndex(),1)[0];te(),ie.selectedIndex===t&&(n.scope.deselect(),ie.tabs[ie.selectedIndex]&&ie.tabs[ie.selectedIndex].scope.select()),r.nextTick(function(){U(),ie.offsetLeft=re(ie.offsetLeft)})}}function B(e,t){var n=me,a={getIndex:function(){return ie.tabs.indexOf(s)},isActive:function(){return this.getIndex()===ie.selectedIndex},isLeft:function(){return this.getIndex()<ie.selectedIndex},isRight:function(){return this.getIndex()>ie.selectedIndex},shouldRender:function(){return!ie.noDisconnect||this.isActive()},hasFocus:function(){return!ie.lastClick&&ie.hasFocus&&this.getIndex()===ie.focusIndex},id:r.nextUid()},s=angular.extend(a,e);return angular.isDefined(t)?ie.tabs.splice(t,0,s):ie.tabs.push(s),Z(),ee(),r.nextTick(function(){U(),n&&ie.autoselect&&r.nextTick(function(){r.nextTick(function(){P(ie.tabs.indexOf(s))})})}),s}function R(){var e={},n=t[0];return e.wrapper=n.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.contents=n.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function q(){return ie.offsetLeft>0}function F(){var e=R(),t=e.tabs[e.tabs.length-1];return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+ie.offsetLeft}function _(){switch(ie.stretchTabs){case"always":return!0;case"never":return!1;default:return!ie.shouldPaginate&&n.matchMedia("(max-width: 600px)").matches}}function H(){return ie.centerTabs&&!ie.shouldPaginate}function N(){if(ie.noPagination||!me)return!1;var e=t.prop("clientWidth");return angular.forEach(R().dummies,function(t){e-=t.offsetWidth}),0>e}function j(e){if(-1===e)return-1;var t,n,a=Math.max(ie.tabs.length-e,e);for(t=0;a>=t;t++){if(n=ie.tabs[e+t],n&&n.scope.disabled!==!0)return n.getIndex();if(n=ie.tabs[e-t],n&&n.scope.disabled!==!0)return n.getIndex()}return e}function z(e,t,n){Object.defineProperty(ie,e,{get:function(){return n},set:function(e){var a=n;n=e,t&&t(e,a)}})}function U(){K(),ie.maxTabWidth=G(),ie.shouldPaginate=N()}function K(){var e=R();_()?angular.element(e.paging).css("width",""):angular.element(e.paging).css("width",Y()+"px")}function Y(){var e=1;return angular.forEach(R().dummies,function(t){e+=Math.max(t.offsetWidth,t.getBoundingClientRect().width)}),Math.ceil(e)}function G(){return t.prop("clientWidth")}function J(){var e=ie.tabs[ie.selectedIndex],t=ie.tabs[ie.focusIndex];ie.tabs=ie.tabs.sort(function(e,t){return e.index-t.index}),ie.selectedIndex=ie.tabs.indexOf(e),ie.focusIndex=ie.tabs.indexOf(t)}function Q(e,t){var n,a=t?"focusIndex":"selectedIndex",s=ie[a];for(n=s+e;ie.tabs[n]&&ie.tabs[n].scope.disabled;n+=e);ie.tabs[n]&&(ie[a]=n)}function V(){R().dummies[ie.focusIndex].focus()}function X(e){var t=R();if(null==e&&(e=ie.focusIndex),t.tabs[e]&&!ie.shouldCenterTabs){var n=t.tabs[e],a=n.offsetLeft,s=n.offsetWidth+a;ie.offsetLeft=Math.max(ie.offsetLeft,re(s-t.canvas.clientWidth+64)),ie.offsetLeft=Math.min(ie.offsetLeft,re(a))}}function Z(){le.forEach(function(e){r.nextTick(e)}),le=[]}function ee(){var e=!1;angular.forEach(ie.tabs,function(t){t.template&&(e=!0)}),ie.hasContent=e}function te(){ie.selectedIndex=j(ie.selectedIndex),ie.focusIndex=j(ie.focusIndex)}function ne(){if(!ie.dynamicHeight)return t.css("height","");if(!ie.tabs.length)return le.push(ne);var e=R(),n=e.contents[ie.selectedIndex],a=n?n.offsetHeight:0,s=e.wrapper.offsetHeight,i=a+s,o=t.prop("clientHeight");if(o!==i){"bottom"===t.attr("md-align-tabs")&&(o-=s,i-=s,void 0!==t.attr("md-border-bottom")&&++o),oe=!0;var c={height:o+"px"},l={height:i+"px"};t.css(c),d(t,{from:c,to:l,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){t.css({transition:"none",height:""}),r.nextTick(function(){t.css("transition","")}),oe=!1})}}function ae(){var e=R();if(!e.tabs[ie.selectedIndex])return void angular.element(e.inkBar).css({left:"auto",right:"auto"});if(!ie.tabs.length)return le.push(ie.updateInkBarStyles);if(!t.prop("offsetParent"))return y();var n,a=ie.selectedIndex,s=e.paging.offsetWidth,d=e.tabs[a],i=d.offsetLeft,o=s-i-d.offsetWidth;ie.shouldCenterTabs&&(n=Array.prototype.slice.call(e.tabs).reduce(function(e,t){return e+t.offsetWidth},0),s>n&&r.nextTick(ae,!1)),se(),angular.element(e.inkBar).css({left:i+"px",right:o+"px"})}function se(){var e=R(),t=ie.selectedIndex,n=ie.lastSelectedIndex,a=angular.element(e.inkBar);angular.isNumber(n)&&a.toggleClass("md-left",n>t).toggleClass("md-right",t>n)}function re(e){var t=R();if(!t.tabs.length||!ie.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],a=n.offsetLeft+n.offsetWidth;return e=Math.max(0,e),e=Math.min(a-t.canvas.clientWidth,e)}function de(e,t){var n=R(),a={colorElement:angular.element(n.inkBar)};s.attach(e,t,a)}var ie=this,oe=!1,ce=R(),le=[],be=!1,me=!1;f("stretchTabs",h),z("focusIndex",I,ie.selectedIndex||0),z("offsetLeft",C,0),z("hasContent",$,!1),z("maxTabWidth",x,G()),z("shouldPaginate",v,!1),p("noInkBar",E),p("dynamicHeight",A),p("noPagination"),p("swipeContent"),p("noDisconnect"),p("autoselect"),p("noSelectClick"),p("centerTabs",T,!1),p("enableDisconnect"),ie.scope=e,ie.parent=e.$parent,ie.tabs=[],ie.lastSelectedIndex=null,ie.hasFocus=!1,ie.lastClick=!0,ie.shouldCenterTabs=H(),ie.updatePagination=r.debounce(U,100),ie.redirectFocus=V,ie.attachRipple=de,ie.insertTab=B,ie.removeTab=O,ie.select=P,ie.scroll=L,ie.nextPage=M,ie.previousPage=W,ie.keydown=S,ie.canPageForward=F,ie.canPageBack=q,ie.refreshIndex=te,ie.incrementIndex=Q,ie.getTabElementIndex=k,ie.updateInkBarStyles=r.debounce(ae,100),ie.updateTabOrder=r.debounce(J,100),l()}function MdTabs(){return{scope:{selectedIndex:"=?mdSelected"},template:function(e,t){return t.$mdTabsTemplate=e.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-icon="md-tabs-arrow"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-icon="md-tabs-arrow"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper class="_md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{::tab.id}}" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="tab-content-{{::tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}function MdTabsDummyWrapper(e){return{require:"^?mdTabs",link:function(e,t,n,a){if(a){var s=new MutationObserver(function(e){a.updatePagination(),a.updateInkBarStyles()}),r={childList:!0,subtree:!0};s.observe(t[0],r),e.$on("$destroy",function(){s&&s.disconnect()})}}}}function MdTabsTemplate(e,t){function n(n,a,s,r){function d(){n.$watch("connected",function(e){e===!1?i():o()}),n.$on("$destroy",o)}function i(){r.enableDisconnect&&t.disconnectScope(c)}function o(){r.enableDisconnect&&t.reconnectScope(c)}if(r){var c=r.enableDisconnect?n.compileScope.$new():n.compileScope;return a.html(n.template),e(a.contents())(c),t.nextTick(d)}}return{restrict:"A",link:n,scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}goog.provide("ng.material.components.tabs"),goog.require("ng.material.components.icon"),goog.require("ng.material.core"),angular.module("material.components.tabs",["material.core","material.components.icon"]),angular.module("material.components.tabs").directive("mdTab",MdTab),angular.module("material.components.tabs").directive("mdTabItem",MdTabItem),angular.module("material.components.tabs").directive("mdTabLabel",MdTabLabel),angular.module("material.components.tabs").directive("mdTabScroll",MdTabScroll),MdTabScroll.$inject=["$parse"],angular.module("material.components.tabs").controller("MdTabsController",MdTabsController),MdTabsController.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming"],angular.module("material.components.tabs").directive("mdTabs",MdTabs),angular.module("material.components.tabs").directive("mdTabsDummyWrapper",MdTabsDummyWrapper),MdTabsDummyWrapper.$inject=["$mdUtil"],angular.module("material.components.tabs").directive("mdTabsTemplate",MdTabsTemplate),MdTabsTemplate.$inject=["$compile","$mdUtil"],ng.material.components.tabs=angular.module("material.components.tabs");
function MdTab(){function e(e,n,a,s){if(s){var r=s.getTabElementIndex(n),d=t(n,"md-tab-body").remove(),i=t(n,"md-tab-label").remove(),o=s.insertTab({scope:e,parent:e.$parent,index:r,element:n,template:d.html(),label:i.html()},r);e.select=e.select||angular.noop,e.deselect=e.deselect||angular.noop,e.$watch("active",function(e){e&&s.select(o.getIndex(),!0)}),e.$watch("disabled",function(){s.refreshIndex()}),e.$watch(function(){return s.getTabElementIndex(n)},function(e){o.index=e,s.updateTabOrder()}),e.$on("$destroy",function(){s.removeTab(o)})}}function t(e,t){for(var n=e[0].children,a=0,s=n.length;a<s;a++){var r=n[a];if(r.tagName===t.toUpperCase())return angular.element(r)}return angular.element()}return{require:"^?mdTabs",terminal:!0,compile:function(n,a){var s=t(n,"md-tab-label"),r=t(n,"md-tab-body");if(0==s.length&&(s=angular.element("<md-tab-label></md-tab-label>"),a.label?s.text(a.label):s.append(n.contents()),0==r.length)){var d=n.contents().detach();r=angular.element("<md-tab-body></md-tab-body>"),r.append(d)}return n.append(s),r.html()&&n.append(r),e},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}}}function MdTabItem(){return{require:"^?mdTabs",link:function(e,t,n,a){a&&a.attachRipple(e,t)}}}function MdTabLabel(){return{terminal:!0}}function MdTabScroll(e){return{restrict:"A",compile:function(t,n){var a=e(n.mdTabScroll,null,!0);return function(e,t){t.on("mousewheel",function(t){e.$apply(function(){a(e,{$event:t})})})}}}}function MdTabsController(e,t,n,a,s,r,d,i,o,c){function l(){oe.selectedIndex=oe.selectedIndex||0,b(),u(),m(),c(t),r.nextTick(function(){le=R(),ae(),Z(),se(),oe.tabs[oe.selectedIndex]&&oe.tabs[oe.selectedIndex].scope.select(),ue=!0,U()})}function b(){var e=i.$mdTabsTemplate,n=angular.element(t[0].querySelector("md-tab-data"));n.html(e),o(n.contents())(oe.parent),delete i.$mdTabsTemplate}function m(){angular.element(n).on("resize",D),e.$on("$destroy",g)}function u(){e.$watch("$mdTabsCtrl.selectedIndex",w)}function f(e,t){var n=i.$normalize("md-"+e);t&&z(e,t),i.$observe(n,function(t){oe[e]=t})}function p(e,t){function n(t){oe[e]="false"!==t}var a=i.$normalize("md-"+e);t&&z(e,t),i.hasOwnProperty(a)&&n(i[a]),i.$observe(a,n)}function g(){me=!0,angular.element(n).off("resize",D)}function h(e){var t=R();angular.element(t.wrapper).toggleClass("md-stretch-tabs",H()),se()}function T(e){oe.shouldCenterTabs=_()}function x(e,t){if(e!==t){var n=R();angular.forEach(n.tabs,function(t){t.style.maxWidth=e+"px"}),r.nextTick(oe.updateInkBarStyles)}}function v(e,t){e!==t&&(oe.maxTabWidth=J(),oe.shouldCenterTabs=_(),r.nextTick(function(){oe.maxTabWidth=J(),Z(oe.selectedIndex)}))}function $(e){t[e?"removeClass":"addClass"]("md-no-tab-content")}function C(t){var n=R(),s=oe.shouldCenterTabs?"":"-"+t+"px";angular.element(n.paging).css(a.CSS.TRANSFORM,"translate3d("+s+", 0, 0)"),e.$broadcast("$mdTabsPaginationChanged")}function I(e,t){e!==t&&R().tabs[e]&&(Z(),X())}function w(t,n){t!==n&&(oe.selectedIndex=N(t),oe.lastSelectedIndex=n,oe.updateInkBarStyles(),ae(),Z(t),e.$broadcast("$mdTabsChanged"),oe.tabs[n]&&oe.tabs[n].scope.deselect(),oe.tabs[t]&&oe.tabs[t].scope.select())}function k(e){var n=t[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(n,e[0])}function y(){y.watcher||(y.watcher=e.$watch(function(){r.nextTick(function(){y.watcher&&t.prop("offsetParent")&&(y.watcher(),y.watcher=null,D())},!1)}))}function S(e){switch(e.keyCode){case a.KEY_CODE.LEFT_ARROW:e.preventDefault(),V(-1,!0);break;case a.KEY_CODE.RIGHT_ARROW:e.preventDefault(),V(1,!0);break;case a.KEY_CODE.SPACE:case a.KEY_CODE.ENTER:e.preventDefault(),ce||P(oe.focusIndex)}oe.lastClick=!1}function P(e,t){ce||(oe.focusIndex=oe.selectedIndex=e),oe.lastClick=!0,t&&oe.noSelectClick||r.nextTick(function(){oe.tabs[e].element.triggerHandler("click")},!1)}function M(e){oe.shouldPaginate&&(e.preventDefault(),oe.offsetLeft=de(oe.offsetLeft-e.wheelDelta))}function L(){var e,t,n=R(),a=n.canvas.clientWidth,s=a+oe.offsetLeft;for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>s));e++);oe.offsetLeft=de(t.offsetLeft)}function W(){var e,t,n=R();for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>=oe.offsetLeft));e++);oe.offsetLeft=de(t.offsetLeft+t.offsetWidth-n.canvas.clientWidth)}function D(){oe.lastSelectedIndex=oe.selectedIndex,oe.offsetLeft=de(oe.offsetLeft),r.nextTick(function(){oe.updateInkBarStyles(),U()})}function E(e){angular.element(R().inkBar).toggleClass("ng-hide",e)}function A(e){t.toggleClass("md-dynamic-height",e)}function O(e){if(!me){var t=oe.selectedIndex,n=oe.tabs.splice(e.getIndex(),1)[0];ne(),oe.selectedIndex===t&&(n.scope.deselect(),oe.tabs[oe.selectedIndex]&&oe.tabs[oe.selectedIndex].scope.select()),r.nextTick(function(){U(),oe.offsetLeft=de(oe.offsetLeft)})}}function B(e,t){var n=ue,a={getIndex:function(){return oe.tabs.indexOf(s)},isActive:function(){return this.getIndex()===oe.selectedIndex},isLeft:function(){return this.getIndex()<oe.selectedIndex},isRight:function(){return this.getIndex()>oe.selectedIndex},shouldRender:function(){return!oe.noDisconnect||this.isActive()},hasFocus:function(){return!oe.lastClick&&oe.hasFocus&&this.getIndex()===oe.focusIndex},id:r.nextUid()},s=angular.extend(a,e);return angular.isDefined(t)?oe.tabs.splice(t,0,s):oe.tabs.push(s),ee(),te(),r.nextTick(function(){U(),n&&oe.autoselect&&r.nextTick(function(){r.nextTick(function(){P(oe.tabs.indexOf(s))})})}),s}function R(){var e={},n=t[0];return e.wrapper=n.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.contents=n.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function q(){return oe.offsetLeft>0}function F(){var e=R(),t=e.tabs[e.tabs.length-1];return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+oe.offsetLeft}function H(){switch(oe.stretchTabs){case"always":return!0;case"never":return!1;default:return!oe.shouldPaginate&&n.matchMedia("(max-width: 600px)").matches}}function _(){return oe.centerTabs&&!oe.shouldPaginate}function j(){if(oe.noPagination||!ue)return!1;var e=t.prop("clientWidth");return angular.forEach(R().dummies,function(t){e-=t.offsetWidth}),e<0}function N(e){if(e===-1)return-1;var t,n,a=Math.max(oe.tabs.length-e,e);for(t=0;t<=a;t++){if(n=oe.tabs[e+t],n&&n.scope.disabled!==!0)return n.getIndex();if(n=oe.tabs[e-t],n&&n.scope.disabled!==!0)return n.getIndex()}return e}function z(e,t,n){Object.defineProperty(oe,e,{get:function(){return n},set:function(e){var a=n;n=e,t&&t(e,a)}})}function U(){K(),oe.maxTabWidth=J(),oe.shouldPaginate=j()}function K(){var e=R();H()?angular.element(e.paging).css("width",""):angular.element(e.paging).css("width",Y()+"px")}function Y(){return G(R().dummies)}function G(e){var t=0;return angular.forEach(e,function(e){t+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(t)}function J(){return t.prop("clientWidth")}function Q(){var e=oe.tabs[oe.selectedIndex],t=oe.tabs[oe.focusIndex];oe.tabs=oe.tabs.sort(function(e,t){return e.index-t.index}),oe.selectedIndex=oe.tabs.indexOf(e),oe.focusIndex=oe.tabs.indexOf(t)}function V(e,t){var n,a=t?"focusIndex":"selectedIndex",s=oe[a];for(n=s+e;oe.tabs[n]&&oe.tabs[n].scope.disabled;n+=e);oe.tabs[n]&&(oe[a]=n)}function X(){R().dummies[oe.focusIndex].focus()}function Z(e){var t=R();if(null==e&&(e=oe.focusIndex),t.tabs[e]&&!oe.shouldCenterTabs){var n=t.tabs[e],a=n.offsetLeft,s=n.offsetWidth+a;oe.offsetLeft=Math.max(oe.offsetLeft,de(s-t.canvas.clientWidth+64)),oe.offsetLeft=Math.min(oe.offsetLeft,de(a))}}function ee(){be.forEach(function(e){r.nextTick(e)}),be=[]}function te(){var e=!1;angular.forEach(oe.tabs,function(t){t.template&&(e=!0)}),oe.hasContent=e}function ne(){oe.selectedIndex=N(oe.selectedIndex),oe.focusIndex=N(oe.focusIndex)}function ae(){if(!oe.dynamicHeight)return t.css("height","");if(!oe.tabs.length)return be.push(ae);var e=R(),n=e.contents[oe.selectedIndex],a=n?n.offsetHeight:0,s=e.wrapper.offsetHeight,i=a+s,o=t.prop("clientHeight");if(o!==i){"bottom"===t.attr("md-align-tabs")&&(o-=s,i-=s,void 0!==t.attr("md-border-bottom")&&++o),ce=!0;var c={height:o+"px"},l={height:i+"px"};t.css(c),d(t,{from:c,to:l,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){t.css({transition:"none",height:""}),r.nextTick(function(){t.css("transition","")}),ce=!1})}}function se(){var e=R();if(!e.tabs[oe.selectedIndex])return void angular.element(e.inkBar).css({left:"auto",right:"auto"});if(!oe.tabs.length)return be.push(oe.updateInkBarStyles);if(!t.prop("offsetParent"))return y();var n=oe.selectedIndex,a=e.paging.offsetWidth,s=e.tabs[n],d=s.offsetLeft,i=a-d-s.offsetWidth;if(oe.shouldCenterTabs){var o=G(e.tabs);a>o&&r.nextTick(se,!1)}re(),angular.element(e.inkBar).css({left:d+"px",right:i+"px"})}function re(){var e=R(),t=oe.selectedIndex,n=oe.lastSelectedIndex,a=angular.element(e.inkBar);angular.isNumber(n)&&a.toggleClass("md-left",t<n).toggleClass("md-right",t>n)}function de(e){var t=R();if(!t.tabs.length||!oe.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],a=n.offsetLeft+n.offsetWidth;return e=Math.max(0,e),e=Math.min(a-t.canvas.clientWidth,e)}function ie(e,t){var n=R(),a={colorElement:angular.element(n.inkBar)};s.attach(e,t,a)}var oe=this,ce=!1,le=R(),be=[],me=!1,ue=!1;f("stretchTabs",h),z("focusIndex",I,oe.selectedIndex||0),z("offsetLeft",C,0),z("hasContent",$,!1),z("maxTabWidth",x,J()),z("shouldPaginate",v,!1),p("noInkBar",E),p("dynamicHeight",A),p("noPagination"),p("swipeContent"),p("noDisconnect"),p("autoselect"),p("noSelectClick"),p("centerTabs",T,!1),p("enableDisconnect"),oe.scope=e,oe.parent=e.$parent,oe.tabs=[],oe.lastSelectedIndex=null,oe.hasFocus=!1,oe.lastClick=!0,oe.shouldCenterTabs=_(),oe.updatePagination=r.debounce(U,100),oe.redirectFocus=X,oe.attachRipple=ie,oe.insertTab=B,oe.removeTab=O,oe.select=P,oe.scroll=M,oe.nextPage=L,oe.previousPage=W,oe.keydown=S,oe.canPageForward=F,oe.canPageBack=q,oe.refreshIndex=ne,oe.incrementIndex=V,oe.getTabElementIndex=k,oe.updateInkBarStyles=r.debounce(se,100),oe.updateTabOrder=r.debounce(Q,100),l()}function MdTabs(e){return{scope:{selectedIndex:"=?mdSelected"},template:function(t,n){return n.$mdTabsTemplate=t.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{::tab.id}}" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="tab-content-{{::tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}function MdTabsDummyWrapper(e){return{require:"^?mdTabs",link:function(e,t,n,a){if(a){var s=new MutationObserver(function(e){a.updatePagination(),a.updateInkBarStyles()}),r={childList:!0,subtree:!0,characterData:!0};s.observe(t[0],r),e.$on("$destroy",function(){s&&s.disconnect()})}}}}function MdTabsTemplate(e,t){function n(n,a,s,r){function d(){n.$watch("connected",function(e){e===!1?i():o()}),n.$on("$destroy",o)}function i(){r.enableDisconnect&&t.disconnectScope(c)}function o(){r.enableDisconnect&&t.reconnectScope(c)}if(r){var c=r.enableDisconnect?n.compileScope.$new():n.compileScope;return a.html(n.template),e(a.contents())(c),t.nextTick(d)}}return{restrict:"A",link:n,scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}goog.provide("ngmaterial.components.tabs"),goog.require("ngmaterial.components.icon"),goog.require("ngmaterial.core"),angular.module("material.components.tabs",["material.core","material.components.icon"]),angular.module("material.components.tabs").directive("mdTab",MdTab),angular.module("material.components.tabs").directive("mdTabItem",MdTabItem),angular.module("material.components.tabs").directive("mdTabLabel",MdTabLabel),angular.module("material.components.tabs").directive("mdTabScroll",MdTabScroll),MdTabScroll.$inject=["$parse"],angular.module("material.components.tabs").controller("MdTabsController",MdTabsController),MdTabsController.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming"],angular.module("material.components.tabs").directive("mdTabs",MdTabs),MdTabs.$inject=["$$mdSvgRegistry"],angular.module("material.components.tabs").directive("mdTabsDummyWrapper",MdTabsDummyWrapper),MdTabsDummyWrapper.$inject=["$mdUtil"],angular.module("material.components.tabs").directive("mdTabsTemplate",MdTabsTemplate),MdTabsTemplate.$inject=["$compile","$mdUtil"],ngmaterial.components.tabs=angular.module("material.components.tabs");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.toast');
goog.require('ng.material.components.button');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.toast');
goog.require('ngmaterial.components.button');
goog.require('ngmaterial.core');
/**

@@ -58,7 +58,36 @@ * @ngdoc module

*
* ### Custom Presets
* Developers are also able to create their own preset, which can be easily used without repeating
* their options each time.
*
* <hljs lang="js">
* $mdToastProvider.addPreset('testPreset', {
* options: function() {
* return {
* template:
* '<md-toast>' +
* '<div class="md-toast-content">' +
* 'This is a custom preset' +
* '</div>' +
* '</md-toast>',
* controllerAs: 'toast',
* bindToController: true
* };
* }
* });
* </hljs>
*
* After you created your preset at config phase, you can easily access it.
*
* <hljs lang="js">
* $mdToast.show(
* $mdToast.testPreset()
* );
* </hljs>
*
* ## Parent container notes
*
* The toast is positioned using absolute positioning relative to it's first non-static parent
* The toast is positioned using absolute positioning relative to its first non-static parent
* container. Thus, if the requested parent container uses static positioning, we will temporarily
* set it's positioning to `relative` while the toast is visible and reset it when the toast is
* set its positioning to `relative` while the toast is visible and reset it when the toast is
* hidden.

@@ -170,2 +199,6 @@ *

* </tr>
* <tr>
* <td>`.toastClass(string)`</td>
* <td>Sets a class on the toast element</td>
* </tr>
* </tbody>

@@ -218,4 +251,7 @@ * </table>

* closed manually. Default: 3000.
* - `position` - `{string=}`: Where to place the toast. Available: any combination
* of 'bottom', 'left', 'top', 'right'. Default: 'bottom left'.
* - `position` - `{string=}`: Sets the position of the toast. <br/>
* Available: any combination of `'bottom'`, `'left'`, `'top'`, `'right'`, `'end'` and `'start'`.
* The properties `'end'` and `'start'` are dynamic and can be used for RTL support.<br/>
* Default combination: `'bottom left'`.
* - `toastClass` - `{string=}`: A class to set on the toast element.
* - `controller` - `{string=}`: The controller to associate with this toast.

@@ -282,3 +318,3 @@ * The controller will be injected the local `$mdToast.hide( )`, which is a function

.setDefaults({
methods: ['position', 'hideDelay', 'capsule', 'parent', 'position' ],
methods: ['position', 'hideDelay', 'capsule', 'parent', 'position', 'toastClass'],
options: toastDefaultOptions

@@ -294,3 +330,3 @@ })

' <div class="md-toast-content">' +
' <span flex class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true">' +
' <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true">' +
' {{ toast.content }}' +

@@ -344,2 +380,3 @@ ' </span>' +

onRemove: onRemove,
toastClass: '',
position: 'bottom left',

@@ -373,4 +410,5 @@ themable: true,

return templateRoot.outerHTML;
// We have to return the innerHTMl, because we do not want to have the `md-template` element to be
// the root element of our interimElement.
return templateRoot.innerHTML;
}

@@ -406,3 +444,3 @@

element.addClass('_md-' + swipe);
element.addClass('md-' + swipe);
$mdUtil.nextTick($mdToast.cancel);

@@ -412,2 +450,3 @@ };

element.addClass(options.toastClass);

@@ -423,9 +462,9 @@ // 'top left' -> 'md-top md-left'

element.on(SWIPE_EVENTS, options.onSwipe);
element.addClass(isSmScreen ? '_md-bottom' : options.position.split(' ').map(function(pos) {
return '_md-' + pos;
element.addClass(isSmScreen ? 'md-bottom' : options.position.split(' ').map(function(pos) {
return 'md-' + pos;
}).join(' '));
if (options.parent) options.parent.addClass('_md-toast-animating');
if (options.parent) options.parent.addClass('md-toast-animating');
return $animate.enter(element, options.parent).then(function() {
if (options.parent) options.parent.removeClass('_md-toast-animating');
if (options.parent) options.parent.removeClass('md-toast-animating');
});

@@ -436,3 +475,3 @@ }

element.off(SWIPE_EVENTS, options.onSwipe);
if (options.parent) options.parent.addClass('_md-toast-animating');
if (options.parent) options.parent.addClass('md-toast-animating');
if (options.openClass) options.parent.removeClass(options.openClass);

@@ -442,3 +481,3 @@

.then(function () {
if (options.parent) options.parent.removeClass('_md-toast-animating');
if (options.parent) options.parent.removeClass('md-toast-animating');
if ($mdUtil.hasComputedStyle(options.parent, 'position', 'static')) {

@@ -453,6 +492,6 @@ options.parent.css('position', '');

if (!$mdMedia('gt-xs')) {
return '_md-toast-open-bottom';
return 'md-toast-open-bottom';
}
return '_md-toast-open-' +
return 'md-toast-open-' +
(position.indexOf('top') > -1 ? 'top' : 'bottom');

@@ -465,2 +504,2 @@ }

ng.material.components.toast = angular.module("material.components.toast");
ngmaterial.components.toast = angular.module("material.components.toast");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdToastDirective(t){return{restrict:"E",link:function(e,n){n.addClass("_md"),e.$on("$destroy",function(){t.destroy()})}}}function MdToastProvider(t){function e(t){o=t}function n(t,e,n,a){function i(i,s,m){o=m.textContent||m.content;var l=!a("gt-sm");return s=n.extractElementByName(s,"md-toast",!0),m.element=s,m.onSwipe=function(t,o){var a=t.type.replace("$md.",""),i=a.replace("swipe","");"down"===i&&-1!=m.position.indexOf("top")&&!l||"up"===i&&(-1!=m.position.indexOf("bottom")||l)||("left"!==i&&"right"!==i||!l)&&(s.addClass("_md-"+a),n.nextTick(e.cancel))},m.openClass=r(m.position),m.parent.addClass(m.openClass),n.hasComputedStyle(m.parent,"position","static")&&m.parent.css("position","relative"),s.on(d,m.onSwipe),s.addClass(l?"_md-bottom":m.position.split(" ").map(function(t){return"_md-"+t}).join(" ")),m.parent&&m.parent.addClass("_md-toast-animating"),t.enter(s,m.parent).then(function(){m.parent&&m.parent.removeClass("_md-toast-animating")})}function s(e,o,a){return o.off(d,a.onSwipe),a.parent&&a.parent.addClass("_md-toast-animating"),a.openClass&&a.parent.removeClass(a.openClass),(1==a.$destroy?o.remove():t.leave(o)).then(function(){a.parent&&a.parent.removeClass("_md-toast-animating"),n.hasComputedStyle(a.parent,"position","static")&&a.parent.css("position","")})}function r(t){return a("gt-xs")?"_md-toast-open-"+(t.indexOf("top")>-1?"top":"bottom"):"_md-toast-open-bottom"}var d="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:i,onRemove:s,position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(t,e){var n=e.autoWrap&&t&&!/md-toast-content/g.test(t);if(n){var o=document.createElement("md-template");o.innerHTML=t;for(var a=0;a<o.children.length;a++)if("MD-TOAST"===o.children[a].nodeName){var i=angular.element('<div class="md-toast-content">');i.append(angular.element(o.children[a].childNodes)),o.children[a].appendChild(i[0])}return o.outerHTML}return t||""}}}var o,a="ok",i=t("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position"],options:n}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(t,e){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}"> <div class="md-toast-content"> <span flex class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true"> {{ toast.content }} </span> <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="highlightClasses"> {{ toast.action }} </md-button> </div></md-toast>',controller:["$scope",function(e){var n=this;n.highlightAction&&(e.highlightClasses=["md-highlight",n.highlightClass]),e.$watch(function(){return o},function(){n.content=o}),this.resolve=function(){t.hide(a)}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",e).addMethod("updateContent",e);return n.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"],i}goog.provide("ng.material.components.toast"),goog.require("ng.material.components.button"),goog.require("ng.material.core"),angular.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",MdToastDirective).provider("$mdToast",MdToastProvider),MdToastDirective.$inject=["$mdToast"],MdToastProvider.$inject=["$$interimElementProvider"],ng.material.components.toast=angular.module("material.components.toast");
function MdToastDirective(t){return{restrict:"E",link:function(e,n){n.addClass("_md"),e.$on("$destroy",function(){t.destroy()})}}}function MdToastProvider(t){function e(t){o=t}function n(t,e,n,a){function s(s,i,l){o=l.textContent||l.content;var m=!a("gt-sm");return i=n.extractElementByName(i,"md-toast",!0),l.element=i,l.onSwipe=function(t,o){var a=t.type.replace("$md.",""),s=a.replace("swipe","");"down"===s&&l.position.indexOf("top")!=-1&&!m||"up"===s&&(l.position.indexOf("bottom")!=-1||m)||("left"!==s&&"right"!==s||!m)&&(i.addClass("md-"+a),n.nextTick(e.cancel))},l.openClass=r(l.position),i.addClass(l.toastClass),l.parent.addClass(l.openClass),n.hasComputedStyle(l.parent,"position","static")&&l.parent.css("position","relative"),i.on(d,l.onSwipe),i.addClass(m?"md-bottom":l.position.split(" ").map(function(t){return"md-"+t}).join(" ")),l.parent&&l.parent.addClass("md-toast-animating"),t.enter(i,l.parent).then(function(){l.parent&&l.parent.removeClass("md-toast-animating")})}function i(e,o,a){return o.off(d,a.onSwipe),a.parent&&a.parent.addClass("md-toast-animating"),a.openClass&&a.parent.removeClass(a.openClass),(1==a.$destroy?o.remove():t.leave(o)).then(function(){a.parent&&a.parent.removeClass("md-toast-animating"),n.hasComputedStyle(a.parent,"position","static")&&a.parent.css("position","")})}function r(t){return a("gt-xs")?"md-toast-open-"+(t.indexOf("top")>-1?"top":"bottom"):"md-toast-open-bottom"}var d="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:s,onRemove:i,toastClass:"",position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(t,e){var n=e.autoWrap&&t&&!/md-toast-content/g.test(t);if(n){var o=document.createElement("md-template");o.innerHTML=t;for(var a=0;a<o.children.length;a++)if("MD-TOAST"===o.children[a].nodeName){var s=angular.element('<div class="md-toast-content">');s.append(angular.element(o.children[a].childNodes)),o.children[a].appendChild(s[0])}return o.innerHTML}return t||""}}}var o,a="ok",s=t("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:n}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(t,e){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}"> <div class="md-toast-content"> <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true"> {{ toast.content }} </span> <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="highlightClasses"> {{ toast.action }} </md-button> </div></md-toast>',controller:["$scope",function(e){var n=this;n.highlightAction&&(e.highlightClasses=["md-highlight",n.highlightClass]),e.$watch(function(){return o},function(){n.content=o}),this.resolve=function(){t.hide(a)}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",e).addMethod("updateContent",e);return n.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"],s}goog.provide("ngmaterial.components.toast"),goog.require("ngmaterial.components.button"),goog.require("ngmaterial.core"),angular.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",MdToastDirective).provider("$mdToast",MdToastProvider),MdToastDirective.$inject=["$mdToast"],MdToastProvider.$inject=["$$interimElementProvider"],ngmaterial.components.toast=angular.module("material.components.toast");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.toolbar');
goog.require('ng.material.components.content');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.toolbar');
goog.require('ngmaterial.components.content');
goog.require('ngmaterial.core');
/**

@@ -85,2 +85,6 @@ * @ngdoc module

$mdUtil.nextTick(function () {
element.addClass('_md-toolbar-transitions'); // adding toolbar transitions after digest
}, false);
if (angular.isDefined(attr.mdScrollShrink)) {

@@ -207,3 +211,3 @@ setupScrollShrink();

$$rAF(updateToolbarHeight);
$mdUtil.nextTick(updateToolbarHeight, false);

@@ -214,4 +218,4 @@ return function disableScrollShrink() {

$$rAF(updateToolbarHeight);
}
updateToolbarHeight();
};
}

@@ -248,2 +252,2 @@

ng.material.components.toolbar = angular.module("material.components.toolbar");
ngmaterial.components.toolbar = angular.module("material.components.toolbar");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function mdToolbarDirective(n,o,t,r,e){var a=angular.bind(null,t.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(l,i,m){function c(){function r(n){var o=i.parent().find("md-content");!f&&o.length&&c(null,o),n=l.$eval(n),n===!1?p():p=d()}function c(n,o){o&&i.parent()[0]===o.parent()[0]&&(f&&f.off("scroll",S),f=o,p=d())}function s(n){var r=n?n.target.scrollTop:$;b(),h=Math.min(g/v,Math.max(0,h+r-$)),i.css(o.CSS.TRANSFORM,a([-h*v])),f.css(o.CSS.TRANSFORM,a([(g-h)*v])),$=r,t.nextTick(function(){var n=i.hasClass("md-whiteframe-z1");n&&!h?e.removeClass(i,"md-whiteframe-z1"):!n&&h&&e.addClass(i,"md-whiteframe-z1")})}function d(){return f?(f.on("scroll",S),f.attr("scroll-shrink","true"),n(u),function(){f.off("scroll",S),f.attr("scroll-shrink","false"),n(u)}):angular.noop}function u(){g=i.prop("offsetHeight");var n=-g*v+"px";f.css({"margin-top":n,"margin-bottom":n}),s()}var g,f,p=angular.noop,h=0,$=0,v=m.mdShrinkSpeedFactor||.5,S=n.throttle(s),b=t.debounce(u,5e3);l.$on("$mdContentLoaded",c),m.$observe("mdScrollShrink",r),m.ngShow&&l.$watch(m.ngShow,u),m.ngHide&&l.$watch(m.ngHide,u),l.$on("$destroy",p)}i.addClass("_md"),r(i),angular.isDefined(m.mdScrollShrink)&&c()}}}goog.provide("ng.material.components.toolbar"),goog.require("ng.material.components.content"),goog.require("ng.material.core"),angular.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",mdToolbarDirective),mdToolbarDirective.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],ng.material.components.toolbar=angular.module("material.components.toolbar");
function mdToolbarDirective(n,o,t,a,r){var e=angular.bind(null,t.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(i,l,c){function m(){function a(n){var o=l.parent().find("md-content");!f&&o.length&&m(null,o),n=i.$eval(n),n===!1?p():p=d()}function m(n,o){o&&l.parent()[0]===o.parent()[0]&&(f&&f.off("scroll",S),f=o,p=d())}function s(n){var a=n?n.target.scrollTop:$;b(),h=Math.min(g/v,Math.max(0,h+a-$)),l.css(o.CSS.TRANSFORM,e([-h*v])),f.css(o.CSS.TRANSFORM,e([(g-h)*v])),$=a,t.nextTick(function(){var n=l.hasClass("md-whiteframe-z1");n&&!h?r.removeClass(l,"md-whiteframe-z1"):!n&&h&&r.addClass(l,"md-whiteframe-z1")})}function d(){return f?(f.on("scroll",S),f.attr("scroll-shrink","true"),t.nextTick(u,!1),function(){f.off("scroll",S),f.attr("scroll-shrink","false"),u()}):angular.noop}function u(){g=l.prop("offsetHeight");var n=-g*v+"px";f.css({"margin-top":n,"margin-bottom":n}),s()}var g,f,p=angular.noop,h=0,$=0,v=c.mdShrinkSpeedFactor||.5,S=n.throttle(s),b=t.debounce(u,5e3);i.$on("$mdContentLoaded",m),c.$observe("mdScrollShrink",a),c.ngShow&&i.$watch(c.ngShow,u),c.ngHide&&i.$watch(c.ngHide,u),i.$on("$destroy",p)}l.addClass("_md"),a(l),t.nextTick(function(){l.addClass("_md-toolbar-transitions")},!1),angular.isDefined(c.mdScrollShrink)&&m()}}}goog.provide("ngmaterial.components.toolbar"),goog.require("ngmaterial.components.content"),goog.require("ngmaterial.core"),angular.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",mdToolbarDirective),mdToolbarDirective.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],ngmaterial.components.toolbar=angular.module("material.components.toolbar");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.tooltip');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.tooltip');
goog.require('ngmaterial.core');
/**

@@ -40,3 +40,4 @@ * @ngdoc module

* @param {expression=} md-visible Boolean bound to whether the tooltip is currently visible.
* @param {number=} md-delay How many milliseconds to wait to show the tooltip after the user focuses, hovers, or touches the parent. Defaults to 0ms.
* @param {number=} md-delay How many milliseconds to wait to show the tooltip after the user focuses, hovers, or touches the
* parent. Defaults to 0ms on non-touch devices and 75ms on touch.
* @param {boolean=} md-autohide If present or provided with a boolean value, the tooltip will hide on mouse leave, regardless of focus

@@ -46,4 +47,7 @@ * @param {string=} md-direction Which direction would you like the tooltip to go? Supports left, right, top, and bottom. Defaults to bottom.

function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdTheming, $rootElement,
$animate, $q) {
$animate, $q, $interpolate) {
var ENTER_EVENTS = 'focus touchstart mouseenter';
var LEAVE_EVENTS = 'blur touchcancel mouseleave';
var SHOW_CLASS = 'md-show';
var TOOLTIP_SHOW_DELAY = 0;

@@ -55,4 +59,4 @@ var TOOLTIP_WINDOW_EDGE_SPACE = 8;

transclude: true,
priority:210, // Before ngAria
template: '<div class="_md-content _md" ng-transclude></div>',
priority: 210, // Before ngAria
template: '<div class="md-content _md" ng-transclude></div>',
scope: {

@@ -64,3 +68,9 @@ delay: '=?mdDelay',

},
link: postLink
compile: function(tElement, tAttr) {
if (!tAttr.mdDirection) {
tAttr.$set('mdDirection', 'bottom');
}
return postLink;
}
};

@@ -73,3 +83,3 @@

var parent = $mdUtil.getParentWithPointerEvents(element),
content = angular.element(element[0].getElementsByClassName('_md-content')[0]),
content = angular.element(element[0].getElementsByClassName('md-content')[0]),
tooltipParent = angular.element(document.body),

@@ -161,7 +171,18 @@ showTimeout = null,

});
// Updates the aria-label when the element text changes. This watch
// doesn't need to be set up if the element doesn't have any data
// bindings.
if (element.text().indexOf($interpolate.startSymbol()) > -1) {
scope.$watch(function() {
return element.text().trim();
}, addAriaLabel);
}
}
function addAriaLabel () {
if (!parent.attr('aria-label') && !parent.text().trim()) {
parent.attr('aria-label', element.text().trim());
function addAriaLabel (override) {
if ((override || !parent.attr('aria-label')) && !parent.text().trim()) {
var rawText = override || element.text().trim();
var interpolatedText = $interpolate(rawText)(parent.scope());
parent.attr('aria-label', interpolatedText);
}

@@ -216,4 +237,4 @@ }

parent
.off('focus mouseenter touchstart', enterHandler)
.off('blur mouseleave touchend touchcancel', leaveHandler)
.off(ENTER_EVENTS, enterHandler)
.off(LEAVE_EVENTS, leaveHandler)
.off('mousedown', mousedownHandler);

@@ -231,6 +252,16 @@

elementFocusedOnWindowBlur = false;
return;
} else if (!scope.visible) {
parent.on(LEAVE_EVENTS, leaveHandler);
setVisible(true);
// If the user is on a touch device, we should bind the tap away after
// the `touched` in order to prevent the tooltip being removed immediately.
if (e.type === 'touchstart') {
parent.one('touchend', function() {
$mdUtil.nextTick(function() {
$document.one('touchend', leaveHandler);
}, false);
});
}
}
parent.on('blur mouseleave touchend touchcancel', leaveHandler );
setVisible(true);
};

@@ -240,4 +271,3 @@ var leaveHandler = function () {

if (autohide || mouseActive || ($document[0].activeElement !== parent[0]) ) {
if (autohide || mouseActive || $document[0].activeElement !== parent[0]) {
// When a show timeout is currently in progress, then we have to cancel it.

@@ -251,4 +281,4 @@ // Otherwise the tooltip will remain showing without focus or hover.

parent.off('blur mouseleave touchend touchcancel', leaveHandler );
parent.triggerHandler("blur");
parent.off(LEAVE_EVENTS, leaveHandler);
parent.triggerHandler('blur');
setVisible(false);

@@ -264,3 +294,3 @@ }

parent.on('mousedown', mousedownHandler);
parent.on('focus mouseenter touchstart', enterHandler );
parent.on(ENTER_EVENTS, enterHandler);
}

@@ -314,4 +344,4 @@

angular.forEach([element, content], function (element) {
$animate.addClass(element, '_md-show');
$animate.addClass(content, SHOW_CLASS).then(function() {
element.addClass(SHOW_CLASS);
});

@@ -321,13 +351,6 @@ }

function hideTooltip() {
var promises = [];
angular.forEach([element, content], function (it) {
if (it.parent() && it.hasClass('_md-show')) {
promises.push($animate.removeClass(it, '_md-show'));
}
});
$q.all(promises)
.then(function () {
if (!scope.visible) element.detach();
});
$animate.removeClass(content, SHOW_CLASS).then(function(){
element.removeClass(SHOW_CLASS);
if (!scope.visible) element.detach();
});
}

@@ -388,4 +411,4 @@

}
MdTooltipDirective.$inject = ["$timeout", "$window", "$$rAF", "$document", "$mdUtil", "$mdTheming", "$rootElement", "$animate", "$q"];
MdTooltipDirective.$inject = ["$timeout", "$window", "$$rAF", "$document", "$mdUtil", "$mdTheming", "$rootElement", "$animate", "$q", "$interpolate"];
ng.material.components.tooltip = angular.module("material.components.tooltip");
ngmaterial.components.tooltip = angular.module("material.components.tooltip");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdTooltipDirective(t,e,o,i,n,r,a,l,c){function u(a,u,f){function h(){a.delay=a.delay||s}function m(){var t="center top";switch(a.direction){case"left":t="right center";break;case"right":t="left center";break;case"top":t="center bottom";break;case"bottom":t="center top"}W.css("transform-origin",t)}function v(t){t?y():E()}function p(){if(u[0]&&"MutationObserver"in e){var t=new MutationObserver(function(t){t.forEach(function(t){"md-visible"===t.attributeName&&(a.visibleWatcher||(a.visibleWatcher=a.$watch("visible",v))),"md-direction"===t.attributeName&&M(a.direction)})});t.observe(u[0],{attributes:!0}),f.hasOwnProperty("mdVisible")&&(a.visibleWatcher=a.$watch("visible",v))}else a.visibleWatcher=a.$watch("visible",v),a.$watch("direction",M);var o=function(){a.$destroy()};u.one("$destroy",o),q.one("$destroy",o),a.$on("$destroy",function(){$(!1),u.remove(),t&&t.disconnect()})}function b(){q.attr("aria-label")||q.text().trim()||q.attr("aria-label",u.text().trim())}function g(){u.detach(),u.attr("role","tooltip")}function w(){function o(){$(!1)}var r=!1;if(q[0]&&"MutationObserver"in e){var l=new MutationObserver(function(t){t.some(function(t){return"disabled"===t.attributeName&&q[0].disabled})&&n.nextTick(function(){$(!1)})});l.observe(q[0],{attributes:!0})}var c=function(){u=document.activeElement===q[0]},u=!1;angular.element(e).on("blur",c).on("resize",k),document.addEventListener("scroll",o,!0),a.$on("$destroy",function(){angular.element(e).off("blur",c).off("resize",k),q.off("focus mouseenter touchstart",s).off("blur mouseleave touchend touchcancel",d).off("mousedown",h),d(),document.removeEventListener("scroll",o,!0),l&&l.disconnect()});var s=function(t){return"focus"===t.type&&u?void(u=!1):(q.on("blur mouseleave touchend touchcancel",d),void $(!0))},d=function(){var e=a.hasOwnProperty("autohide")?a.autohide:f.hasOwnProperty("mdAutohide");(e||r||i[0].activeElement!==q[0])&&(T&&(t.cancel(T),$.queued=!1,T=null),q.off("blur mouseleave touchend touchcancel",d),q.triggerHandler("blur"),$(!1)),r=!1},h=function(){r=!0};q.on("mousedown",h),q.on("focus mouseenter touchstart",s)}function $(e){$.queued&&$.value===!!e||!$.queued&&a.visible===!!e||($.value=!!e,$.queued||(e?($.queued=!0,T=t(function(){a.visible=$.value,$.queued=!1,T=null,a.visibleWatcher||v(a.visible)},a.delay)):n.nextTick(function(){a.visible=!1,a.visibleWatcher||v(!1)})))}function y(){if(u[0].textContent.trim()){if(u.css({top:0,left:0}),O.append(u),n.hasComputedStyle(u,"display","none"))return a.visible=!1,void u.detach();M(),angular.forEach([u,W],function(t){l.addClass(t,"_md-show")})}}function E(){var t=[];angular.forEach([u,W],function(e){e.parent()&&e.hasClass("_md-show")&&t.push(l.removeClass(e,"_md-show"))}),c.all(t).then(function(){a.visible||u.detach()})}function M(){a.visible&&(m(),x())}function x(){function t(t){var e={left:t.left,top:t.top};return e.left=Math.min(e.left,O.prop("scrollWidth")-o.width-d),e.left=Math.max(e.left,d),e.top=Math.min(e.top,O.prop("scrollHeight")-o.height-d),e.top=Math.max(e.top,d),e}function e(t){return"left"===t?{left:i.left-o.width-d,top:i.top+i.height/2-o.height/2}:"right"===t?{left:i.left+i.width+d,top:i.top+i.height/2-o.height/2}:"top"===t?{left:i.left+i.width/2-o.width/2,top:i.top-o.height-d}:{left:i.left+i.width/2-o.width/2,top:i.top+i.height+d}}var o=n.offsetRect(u,O),i=n.offsetRect(q,O),r=e(a.direction),l=u.prop("offsetParent");a.direction?r=t(r):l&&r.top>l.scrollHeight-o.height-d&&(r=t(e("top"))),u.css({left:r.left+"px",top:r.top+"px"})}r(u);var q=n.getParentWithPointerEvents(u),W=angular.element(u[0].getElementsByClassName("_md-content")[0]),O=angular.element(document.body),T=null,k=o.throttle(function(){M()});l.pin&&l.pin(u,q),h(),g(),w(),m(),p(),b()}var s=0,d=8;return{restrict:"E",transclude:!0,priority:210,template:'<div class="_md-content _md" ng-transclude></div>',scope:{delay:"=?mdDelay",visible:"=?mdVisible",autohide:"=?mdAutohide",direction:"@?mdDirection"},link:u}}goog.provide("ng.material.components.tooltip"),goog.require("ng.material.core"),angular.module("material.components.tooltip",["material.core"]).directive("mdTooltip",MdTooltipDirective),MdTooltipDirective.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q"],ng.material.components.tooltip=angular.module("material.components.tooltip");
function MdTooltipDirective(t,e,i,o,n,r,a,c,l,u){function s(a,l,s){function v(){a.delay=a.delay||h}function b(){var t="center top";switch(a.direction){case"left":t="right center";break;case"right":t="left center";break;case"top":t="center bottom";break;case"bottom":t="center top"}C.css("transform-origin",t)}function g(t){t?E():q()}function $(){if(l[0]&&"MutationObserver"in e){var t=new MutationObserver(function(t){t.forEach(function(t){"md-visible"===t.attributeName&&(a.visibleWatcher||(a.visibleWatcher=a.$watch("visible",g))),"md-direction"===t.attributeName&&O(a.direction)})});t.observe(l[0],{attributes:!0}),s.hasOwnProperty("mdVisible")&&(a.visibleWatcher=a.$watch("visible",g))}else a.visibleWatcher=a.$watch("visible",g),a.$watch("direction",O);var i=function(){a.$destroy()};l.one("$destroy",i),W.one("$destroy",i),a.$on("$destroy",function(){M(!1),l.remove(),t&&t.disconnect()}),l.text().indexOf(u.startSymbol())>-1&&a.$watch(function(){return l.text().trim()},w)}function w(t){if((t||!W.attr("aria-label"))&&!W.text().trim()){var e=t||l.text().trim(),i=u(e)(W.scope());W.attr("aria-label",i)}}function y(){l.detach(),l.attr("role","tooltip")}function x(){function i(){M(!1)}var r=!1;if(W[0]&&"MutationObserver"in e){var c=new MutationObserver(function(t){t.some(function(t){return"disabled"===t.attributeName&&W[0].disabled})&&n.nextTick(function(){M(!1)})});c.observe(W[0],{attributes:!0})}var l=function(){u=document.activeElement===W[0]},u=!1;angular.element(e).on("blur",l).on("resize",P),document.addEventListener("scroll",i,!0),a.$on("$destroy",function(){angular.element(e).off("blur",l).off("resize",P),W.off(d,m).off(f,h).off("mousedown",p),h(),document.removeEventListener("scroll",i,!0),c&&c.disconnect()});var m=function(t){"focus"===t.type&&u?u=!1:a.visible||(W.on(f,h),M(!0),"touchstart"===t.type&&W.one("touchend",function(){n.nextTick(function(){o.one("touchend",h)},!1)}))},h=function(){var e=a.hasOwnProperty("autohide")?a.autohide:s.hasOwnProperty("mdAutohide");(e||r||o[0].activeElement!==W[0])&&(k&&(t.cancel(k),M.queued=!1,k=null),W.off(f,h),W.triggerHandler("blur"),M(!1)),r=!1},p=function(){r=!0};W.on("mousedown",p),W.on(d,m)}function M(e){M.queued&&M.value===!!e||!M.queued&&a.visible===!!e||(M.value=!!e,M.queued||(e?(M.queued=!0,k=t(function(){a.visible=M.value,M.queued=!1,k=null,a.visibleWatcher||g(a.visible)},a.delay)):n.nextTick(function(){a.visible=!1,a.visibleWatcher||g(!1)})))}function E(){if(l[0].textContent.trim()){if(l.css({top:0,left:0}),D.append(l),n.hasComputedStyle(l,"display","none"))return a.visible=!1,void l.detach();O(),c.addClass(C,m).then(function(){l.addClass(m)})}}function q(){c.removeClass(C,m).then(function(){l.removeClass(m),a.visible||l.detach()})}function O(){a.visible&&(b(),T())}function T(){function t(t){var e={left:t.left,top:t.top};return e.left=Math.min(e.left,D.prop("scrollWidth")-i.width-p),e.left=Math.max(e.left,p),e.top=Math.min(e.top,D.prop("scrollHeight")-i.height-p),e.top=Math.max(e.top,p),e}function e(t){return"left"===t?{left:o.left-i.width-p,top:o.top+o.height/2-i.height/2}:"right"===t?{left:o.left+o.width+p,top:o.top+o.height/2-i.height/2}:"top"===t?{left:o.left+o.width/2-i.width/2,top:o.top-i.height-p}:{left:o.left+o.width/2-i.width/2,top:o.top+o.height+p}}var i=n.offsetRect(l,D),o=n.offsetRect(W,D),r=e(a.direction),c=l.prop("offsetParent");a.direction?r=t(r):c&&r.top>c.scrollHeight-i.height-p&&(r=t(e("top"))),l.css({left:r.left+"px",top:r.top+"px"})}r(l);var W=n.getParentWithPointerEvents(l),C=angular.element(l[0].getElementsByClassName("md-content")[0]),D=angular.element(document.body),k=null,P=i.throttle(function(){O()});c.pin&&c.pin(l,W),v(),y(),x(),b(),$(),w()}var d="focus touchstart mouseenter",f="blur touchcancel mouseleave",m="md-show",h=0,p=8;return{restrict:"E",transclude:!0,priority:210,template:'<div class="md-content _md" ng-transclude></div>',scope:{delay:"=?mdDelay",visible:"=?mdVisible",autohide:"=?mdAutohide",direction:"@?mdDirection"},compile:function(t,e){return e.mdDirection||e.$set("mdDirection","bottom"),s}}}goog.provide("ngmaterial.components.tooltip"),goog.require("ngmaterial.core"),angular.module("material.components.tooltip",["material.core"]).directive("mdTooltip",MdTooltipDirective),MdTooltipDirective.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q","$interpolate"],ngmaterial.components.tooltip=angular.module("material.components.tooltip");

@@ -5,7 +5,7 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.virtualRepeat');
goog.require('ng.material.components.showHide');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.virtualRepeat');
goog.require('ngmaterial.components.showHide');
goog.require('ngmaterial.core');
/**

@@ -31,5 +31,18 @@ * @ngdoc module

*
* Virtual repeat is a limited substitute for ng-repeat that renders only
* enough dom nodes to fill the container and recycling them as the user scrolls.
* VirtualRepeat is a limited substitute for ng-repeat that renders only
* enough DOM nodes to fill the container and recycling them as the user scrolls.
*
* Once an element is not visible anymore, the VirtualRepeat recycles it and will reuse it for
* another visible item by replacing the previous dataset with the new one.
*
* **Common Issues**
* > When having one-time bindings inside of the view template, the VirtualRepeat will not properly
* > update the bindings for new items, since the view will be recycled.
*
* **Notes:**
* > The VirtualRepeat is a similar implementation to the Android
* [RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html)
*
*
*
* @usage

@@ -141,5 +154,5 @@ * <hljs lang="html">

this.scroller = $element[0].getElementsByClassName('md-virtual-repeat-scroller')[0];
this.sizer = this.scroller.getElementsByClassName('md-virtual-repeat-sizer')[0];
this.offsetter = this.scroller.getElementsByClassName('md-virtual-repeat-offsetter')[0];
this.scroller = $element[0].querySelector('.md-virtual-repeat-scroller');
this.sizer = this.scroller.querySelector('.md-virtual-repeat-sizer');
this.offsetter = this.scroller.querySelector('.md-virtual-repeat-offsetter');

@@ -630,2 +643,6 @@ // After the dom stablizes, measure the initial size of the container and

if (!this.itemSize) {
// Make sure to clean up watchers if we can (see #8178)
if(this.unwatchItemSize_ && this.unwatchItemSize_ !== angular.noop){
this.unwatchItemSize_();
}
this.unwatchItemSize_ = this.$scope.$watchCollection(

@@ -635,3 +652,3 @@ this.repeatListExpression,

if (items && items.length) {
this.$$rAF(angular.bind(this, this.readItemSize_));
this.readItemSize_();
}

@@ -699,6 +716,8 @@ }));

// If the number of items shrank, scroll up to the top.
// If the number of items shrank
if (this.items && itemsLength < this.items.length && this.container.getScrollOffset() !== 0) {
this.items = items;
var previousScrollOffset = this.container.getScrollOffset();
this.container.resetScroll();
this.container.scrollTo(previousScrollOffset);
return;

@@ -951,2 +970,2 @@ }

ng.material.components.virtualRepeat = angular.module("material.components.virtualRepeat");
ngmaterial.components.virtualRepeat = angular.module("material.components.virtualRepeat");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function VirtualRepeatContainerDirective(){return{controller:VirtualRepeatContainerController,template:virtualRepeatContainerTemplate,compile:function(t,e){t.addClass("md-virtual-repeat-container").addClass(e.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function virtualRepeatContainerTemplate(t){return'<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">'+t[0].innerHTML+"</div></div>"}function VirtualRepeatContainerController(t,e,i,r,s,n,o,a){this.$rootScope=r,this.$scope=n,this.$element=o,this.$attrs=a,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.$attrs.mdTopIndex?(this.bindTopIndex=i(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),angular.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,angular.bind(this,function(t){t!==this.topIndex&&this.scrollToIndex(t)}))):this.topIndex=0,this.scroller=o[0].getElementsByClassName("md-virtual-repeat-scroller")[0],this.sizer=this.scroller.getElementsByClassName("md-virtual-repeat-sizer")[0],this.offsetter=this.scroller.getElementsByClassName("md-virtual-repeat-offsetter")[0];var l=angular.bind(this,this.updateSize);t(angular.bind(this,function(){l();var t=e.debounce(l,10,null,!1),i=angular.element(s);this.size||t(),i.on("resize",t),n.$on("$destroy",function(){i.off("resize",t)}),n.$emit("$md-resize-enable"),n.$on("$md-resize",l)}))}function VirtualRepeatDirective(t){return{controller:VirtualRepeatController,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,i){var r=i.mdVirtualRepeat,s=r.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),n=s[1],o=t(s[2]),a=i.mdExtraName&&t(i.mdExtraName);return function(t,e,i,r,s){r[0].link_(r[1],s,n,o,a)}}}}function VirtualRepeatController(t,e,i,r,s,n,o,a){this.$scope=t,this.$element=e,this.$attrs=i,this.$browser=r,this.$document=s,this.$rootScope=n,this.$$rAF=o,this.onDemand=a.parseAttributeBoolean(i.mdOnDemand),this.browserCheckUrlChange=r.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=t.$eval(i.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=angular.noop,this.blocks={},this.pooledBlocks=[],t.$on("$destroy",angular.bind(this,this.cleanupBlocks_))}function VirtualRepeatModelArrayLike(t){if(!angular.isFunction(t.getItemAtIndex)||!angular.isFunction(t.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=t}function abstractMethod(){throw Error("Non-overridden abstract method called.")}goog.provide("ng.material.components.virtualRepeat"),goog.require("ng.material.components.showHide"),goog.require("ng.material.core"),angular.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",VirtualRepeatContainerDirective).directive("mdVirtualRepeat",VirtualRepeatDirective);var MAX_ELEMENT_SIZE=1533917,NUM_EXTRA=3;VirtualRepeatContainerController.$inject=["$$rAF","$mdUtil","$parse","$rootScope","$window","$scope","$element","$attrs"],VirtualRepeatContainerController.prototype.register=function(t){this.repeater=t,angular.element(this.scroller).on("scroll wheel touchmove touchend",angular.bind(this,this.handleScroll_))},VirtualRepeatContainerController.prototype.isHorizontal=function(){return this.horizontal},VirtualRepeatContainerController.prototype.getSize=function(){return this.size},VirtualRepeatContainerController.prototype.setSize_=function(t){var e=this.getDimensionName_();this.size=t,this.$element[0].style[e]=t+"px"},VirtualRepeatContainerController.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},VirtualRepeatContainerController.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},VirtualRepeatContainerController.prototype.getScrollSize=function(){return this.scrollSize},VirtualRepeatContainerController.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},VirtualRepeatContainerController.prototype.sizeScroller_=function(t){var e=this.getDimensionName_(),i=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",MAX_ELEMENT_SIZE>t)this.sizer.style[e]=t+"px";else{this.sizer.style[e]="auto",this.sizer.style[i]="auto";var r=Math.floor(t/MAX_ELEMENT_SIZE),s=document.createElement("div");s.style[e]="1533917px",s.style[i]="1px";for(var n=0;r>n;n++)this.sizer.appendChild(s.cloneNode(!1));s.style[e]=t-r*MAX_ELEMENT_SIZE+"px",this.sizer.appendChild(s)}},VirtualRepeatContainerController.prototype.autoShrink_=function(t){var e=Math.max(t,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&e!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var i=this.originalSize||this.size;if(!i||i>e)this.originalSize||(this.originalSize=this.size),this.setSize_(e);else if(null!==this.originalSize){this.unsetSize_();var r=this.originalSize;this.originalSize=null,r||this.updateSize(),this.setSize_(r||this.size)}this.repeater.containerUpdated()}},VirtualRepeatContainerController.prototype.setScrollSize=function(t){var e=t+this.offsetSize;this.scrollSize!==e&&(this.sizeScroller_(e),this.autoShrink_(e),this.scrollSize=e)},VirtualRepeatContainerController.prototype.getScrollOffset=function(){return this.scrollOffset},VirtualRepeatContainerController.prototype.scrollTo=function(t){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=t,this.handleScroll_()},VirtualRepeatContainerController.prototype.scrollToIndex=function(t){var e=this.repeater.getItemSize(),i=this.repeater.itemsLength;t>i&&(t=i-1),this.scrollTo(e*t)},VirtualRepeatContainerController.prototype.resetScroll=function(){this.scrollTo(0)},VirtualRepeatContainerController.prototype.handleScroll_=function(){var t=angular.element(document)[0],e="rtl"!=t.dir&&"rtl"!=t.body.dir;e||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var i=this.isHorizontal()?e?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(i===this.scrollOffset||i>this.scrollSize-this.size)){var r=this.repeater.getItemSize();if(r){var s=Math.max(0,Math.floor(i/r)-NUM_EXTRA),n=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||e?s*r:-(s*r))+"px)";if(this.scrollOffset=i,this.offsetter.style.webkitTransform=n,this.offsetter.style.transform=n,this.bindTopIndex){var o=Math.floor(i/r);o!==this.topIndex&&o<this.repeater.getItemCount()&&(this.topIndex=o,this.bindTopIndex.assign(this.$scope,o),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},VirtualRepeatDirective.$inject=["$parse"],VirtualRepeatController.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],VirtualRepeatController.Block,VirtualRepeatController.prototype.link_=function(t,e,i,r,s){this.container=t,this.transclude=e,this.repeatName=i,this.rawRepeatListExpression=r,this.extraName=s,this.sized=!1,this.repeatListExpression=angular.bind(this,this.repeatListExpression_),this.container.register(this)},VirtualRepeatController.prototype.cleanupBlocks_=function(){angular.forEach(this.pooledBlocks,function(t){t.element.remove()})},VirtualRepeatController.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var t=this.getBlock_(0);t.element[0].parentNode||this.parentNode.appendChild(t.element[0]),this.itemSize=t.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=t,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},VirtualRepeatController.prototype.repeatListExpression_=function(t){var e=this.rawRepeatListExpression(t);if(this.onDemand&&e){var i=new VirtualRepeatModelArrayLike(e);return i.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),i}return e},VirtualRepeatController.prototype.containerUpdated=function(){return this.itemSize?(this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,angular.bind(this,function(t,e){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(t,e)}))),this.updateIndexes_(),void((this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof VirtualRepeatModelArrayLike&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items)))):(this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,angular.bind(this,function(t){t&&t.length&&this.$$rAF(angular.bind(this,this.readItemSize_))})),void(this.$rootScope.$$phase||this.$scope.$digest()))},VirtualRepeatController.prototype.getItemSize=function(){return this.itemSize},VirtualRepeatController.prototype.getItemCount=function(){return this.itemsLength},VirtualRepeatController.prototype.virtualRepeatUpdate_=function(t,e){this.isVirtualRepeatUpdating_=!0;var i=t&&t.length||0,r=!1;if(this.items&&i<this.items.length&&0!==this.container.getScrollOffset())return this.items=t,void this.container.resetScroll();if(i!==this.itemsLength&&(r=!0,this.itemsLength=i),this.items=t,(t!==e||r)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,r&&this.container.setScrollSize(i*this.itemSize),this.isFirstRender){this.isFirstRender=!1;var s=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.container.scrollToIndex(s)}Object.keys(this.blocks).forEach(function(t){var e=parseInt(t,10);(e<this.newStartIndex||e>=this.newEndIndex)&&this.poolBlock_(e)},this),this.$browser.$$checkUrlChange=angular.noop;var n,o,a=[],l=[];for(n=this.newStartIndex;n<this.newEndIndex&&null==this.blocks[n];n++)o=this.getBlock_(n),this.updateBlock_(o,n),a.push(o);for(;null!=this.blocks[n];n++)this.updateBlock_(this.blocks[n],n);for(var h=n-1;n<this.newEndIndex;n++)o=this.getBlock_(n),this.updateBlock_(o,n),l.push(o);a.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(a),this.$element[0].nextSibling),l.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(l),this.blocks[h]&&this.blocks[h].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isVirtualRepeatUpdating_=!1},VirtualRepeatController.prototype.getBlock_=function(t){if(this.pooledBlocks.length)return this.pooledBlocks.pop();var e;return this.transclude(angular.bind(this,function(i,r){e={element:i,"new":!0,scope:r},this.updateScope_(r,t),this.parentNode.appendChild(i[0])})),e},VirtualRepeatController.prototype.updateBlock_=function(t,e){this.blocks[e]=t,(t["new"]||t.scope.$index!==e||t.scope[this.repeatName]!==this.items[e])&&(t["new"]=!1,this.updateScope_(t.scope,e),this.$rootScope.$$phase||t.scope.$digest())},VirtualRepeatController.prototype.updateScope_=function(t,e){t.$index=e,t[this.repeatName]=this.items&&this.items[e],this.extraName&&(t[this.extraName(this.$scope)]=this.items[e])},VirtualRepeatController.prototype.poolBlock_=function(t){this.pooledBlocks.push(this.blocks[t]),this.parentNode.removeChild(this.blocks[t].element[0]),delete this.blocks[t]},VirtualRepeatController.prototype.domFragmentFromBlocks_=function(t){var e=this.$document[0].createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element[0])}),e},VirtualRepeatController.prototype.updateIndexes_=function(){var t=this.items?this.items.length:0,e=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(t-e,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+e+NUM_EXTRA,this.newEndIndex=Math.min(t,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-NUM_EXTRA)},VirtualRepeatModelArrayLike.prototype.$$includeIndexes=function(t,e){for(var i=t;e>i;i++)this.hasOwnProperty(i)||(this[i]=this.model.getItemAtIndex(i));this.length=this.model.getLength()},ng.material.components.virtualRepeat=angular.module("material.components.virtualRepeat");
function VirtualRepeatContainerDirective(){return{controller:VirtualRepeatContainerController,template:virtualRepeatContainerTemplate,compile:function(t,e){t.addClass("md-virtual-repeat-container").addClass(e.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function virtualRepeatContainerTemplate(t){return'<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">'+t[0].innerHTML+"</div></div>"}function VirtualRepeatContainerController(t,e,i,r,s,n,o,a){this.$rootScope=r,this.$scope=n,this.$element=o,this.$attrs=a,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.$attrs.mdTopIndex?(this.bindTopIndex=i(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),angular.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,angular.bind(this,function(t){t!==this.topIndex&&this.scrollToIndex(t)}))):this.topIndex=0,this.scroller=o[0].querySelector(".md-virtual-repeat-scroller"),this.sizer=this.scroller.querySelector(".md-virtual-repeat-sizer"),this.offsetter=this.scroller.querySelector(".md-virtual-repeat-offsetter");var l=angular.bind(this,this.updateSize);t(angular.bind(this,function(){l();var t=e.debounce(l,10,null,!1),i=angular.element(s);this.size||t(),i.on("resize",t),n.$on("$destroy",function(){i.off("resize",t)}),n.$emit("$md-resize-enable"),n.$on("$md-resize",l)}))}function VirtualRepeatDirective(t){return{controller:VirtualRepeatController,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,i){var r=i.mdVirtualRepeat,s=r.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),n=s[1],o=t(s[2]),a=i.mdExtraName&&t(i.mdExtraName);return function(t,e,i,r,s){r[0].link_(r[1],s,n,o,a)}}}}function VirtualRepeatController(t,e,i,r,s,n,o,a){this.$scope=t,this.$element=e,this.$attrs=i,this.$browser=r,this.$document=s,this.$rootScope=n,this.$$rAF=o,this.onDemand=a.parseAttributeBoolean(i.mdOnDemand),this.browserCheckUrlChange=r.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=t.$eval(i.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=angular.noop,this.blocks={},this.pooledBlocks=[],t.$on("$destroy",angular.bind(this,this.cleanupBlocks_))}function VirtualRepeatModelArrayLike(t){if(!angular.isFunction(t.getItemAtIndex)||!angular.isFunction(t.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=t}function abstractMethod(){throw Error("Non-overridden abstract method called.")}goog.provide("ngmaterial.components.virtualRepeat"),goog.require("ngmaterial.components.showHide"),goog.require("ngmaterial.core"),angular.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",VirtualRepeatContainerDirective).directive("mdVirtualRepeat",VirtualRepeatDirective);var MAX_ELEMENT_SIZE=1533917,NUM_EXTRA=3;VirtualRepeatContainerController.$inject=["$$rAF","$mdUtil","$parse","$rootScope","$window","$scope","$element","$attrs"],VirtualRepeatContainerController.prototype.register=function(t){this.repeater=t,angular.element(this.scroller).on("scroll wheel touchmove touchend",angular.bind(this,this.handleScroll_))},VirtualRepeatContainerController.prototype.isHorizontal=function(){return this.horizontal},VirtualRepeatContainerController.prototype.getSize=function(){return this.size},VirtualRepeatContainerController.prototype.setSize_=function(t){var e=this.getDimensionName_();this.size=t,this.$element[0].style[e]=t+"px"},VirtualRepeatContainerController.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},VirtualRepeatContainerController.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},VirtualRepeatContainerController.prototype.getScrollSize=function(){return this.scrollSize},VirtualRepeatContainerController.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},VirtualRepeatContainerController.prototype.sizeScroller_=function(t){var e=this.getDimensionName_(),i=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",t<MAX_ELEMENT_SIZE)this.sizer.style[e]=t+"px";else{this.sizer.style[e]="auto",this.sizer.style[i]="auto";var r=Math.floor(t/MAX_ELEMENT_SIZE),s=document.createElement("div");s.style[e]="1533917px",s.style[i]="1px";for(var n=0;n<r;n++)this.sizer.appendChild(s.cloneNode(!1));s.style[e]=t-r*MAX_ELEMENT_SIZE+"px",this.sizer.appendChild(s)}},VirtualRepeatContainerController.prototype.autoShrink_=function(t){var e=Math.max(t,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&e!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var i=this.originalSize||this.size;if(!i||e<i)this.originalSize||(this.originalSize=this.size),this.setSize_(e);else if(null!==this.originalSize){this.unsetSize_();var r=this.originalSize;this.originalSize=null,r||this.updateSize(),this.setSize_(r||this.size)}this.repeater.containerUpdated()}},VirtualRepeatContainerController.prototype.setScrollSize=function(t){var e=t+this.offsetSize;this.scrollSize!==e&&(this.sizeScroller_(e),this.autoShrink_(e),this.scrollSize=e)},VirtualRepeatContainerController.prototype.getScrollOffset=function(){return this.scrollOffset},VirtualRepeatContainerController.prototype.scrollTo=function(t){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=t,this.handleScroll_()},VirtualRepeatContainerController.prototype.scrollToIndex=function(t){var e=this.repeater.getItemSize(),i=this.repeater.itemsLength;t>i&&(t=i-1),this.scrollTo(e*t)},VirtualRepeatContainerController.prototype.resetScroll=function(){this.scrollTo(0)},VirtualRepeatContainerController.prototype.handleScroll_=function(){var t=angular.element(document)[0],e="rtl"!=t.dir&&"rtl"!=t.body.dir;e||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var i=this.isHorizontal()?e?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(i===this.scrollOffset||i>this.scrollSize-this.size)){var r=this.repeater.getItemSize();if(r){var s=Math.max(0,Math.floor(i/r)-NUM_EXTRA),n=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||e?s*r:-(s*r))+"px)";if(this.scrollOffset=i,this.offsetter.style.webkitTransform=n,this.offsetter.style.transform=n,this.bindTopIndex){var o=Math.floor(i/r);o!==this.topIndex&&o<this.repeater.getItemCount()&&(this.topIndex=o,this.bindTopIndex.assign(this.$scope,o),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},VirtualRepeatDirective.$inject=["$parse"],VirtualRepeatController.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],VirtualRepeatController.Block,VirtualRepeatController.prototype.link_=function(t,e,i,r,s){this.container=t,this.transclude=e,this.repeatName=i,this.rawRepeatListExpression=r,this.extraName=s,this.sized=!1,this.repeatListExpression=angular.bind(this,this.repeatListExpression_),this.container.register(this)},VirtualRepeatController.prototype.cleanupBlocks_=function(){angular.forEach(this.pooledBlocks,function(t){t.element.remove()})},VirtualRepeatController.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var t=this.getBlock_(0);t.element[0].parentNode||this.parentNode.appendChild(t.element[0]),this.itemSize=t.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=t,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},VirtualRepeatController.prototype.repeatListExpression_=function(t){var e=this.rawRepeatListExpression(t);if(this.onDemand&&e){var i=new VirtualRepeatModelArrayLike(e);return i.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),i}return e},VirtualRepeatController.prototype.containerUpdated=function(){return this.itemSize?(this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,angular.bind(this,function(t,e){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(t,e)}))),this.updateIndexes_(),void((this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof VirtualRepeatModelArrayLike&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items)))):(this.unwatchItemSize_&&this.unwatchItemSize_!==angular.noop&&this.unwatchItemSize_(),this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,angular.bind(this,function(t){t&&t.length&&this.readItemSize_()})),void(this.$rootScope.$$phase||this.$scope.$digest()))},VirtualRepeatController.prototype.getItemSize=function(){return this.itemSize},VirtualRepeatController.prototype.getItemCount=function(){return this.itemsLength},VirtualRepeatController.prototype.virtualRepeatUpdate_=function(t,e){this.isVirtualRepeatUpdating_=!0;var i=t&&t.length||0,r=!1;if(this.items&&i<this.items.length&&0!==this.container.getScrollOffset()){this.items=t;var s=this.container.getScrollOffset();return this.container.resetScroll(),void this.container.scrollTo(s)}if(i!==this.itemsLength&&(r=!0,this.itemsLength=i),this.items=t,(t!==e||r)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,r&&this.container.setScrollSize(i*this.itemSize),this.isFirstRender){this.isFirstRender=!1;var n=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.container.scrollToIndex(n)}Object.keys(this.blocks).forEach(function(t){var e=parseInt(t,10);(e<this.newStartIndex||e>=this.newEndIndex)&&this.poolBlock_(e)},this),this.$browser.$$checkUrlChange=angular.noop;var o,a,l=[],h=[];for(o=this.newStartIndex;o<this.newEndIndex&&null==this.blocks[o];o++)a=this.getBlock_(o),this.updateBlock_(a,o),l.push(a);for(;null!=this.blocks[o];o++)this.updateBlock_(this.blocks[o],o);for(var p=o-1;o<this.newEndIndex;o++)a=this.getBlock_(o),this.updateBlock_(a,o),h.push(a);l.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(l),this.$element[0].nextSibling),h.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(h),this.blocks[p]&&this.blocks[p].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isVirtualRepeatUpdating_=!1},VirtualRepeatController.prototype.getBlock_=function(t){if(this.pooledBlocks.length)return this.pooledBlocks.pop();var e;return this.transclude(angular.bind(this,function(i,r){e={element:i,"new":!0,scope:r},this.updateScope_(r,t),this.parentNode.appendChild(i[0])})),e},VirtualRepeatController.prototype.updateBlock_=function(t,e){this.blocks[e]=t,(t["new"]||t.scope.$index!==e||t.scope[this.repeatName]!==this.items[e])&&(t["new"]=!1,this.updateScope_(t.scope,e),this.$rootScope.$$phase||t.scope.$digest())},VirtualRepeatController.prototype.updateScope_=function(t,e){t.$index=e,t[this.repeatName]=this.items&&this.items[e],this.extraName&&(t[this.extraName(this.$scope)]=this.items[e])},VirtualRepeatController.prototype.poolBlock_=function(t){this.pooledBlocks.push(this.blocks[t]),this.parentNode.removeChild(this.blocks[t].element[0]),delete this.blocks[t]},VirtualRepeatController.prototype.domFragmentFromBlocks_=function(t){var e=this.$document[0].createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element[0])}),e},VirtualRepeatController.prototype.updateIndexes_=function(){var t=this.items?this.items.length:0,e=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(t-e,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+e+NUM_EXTRA,this.newEndIndex=Math.min(t,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-NUM_EXTRA)},VirtualRepeatModelArrayLike.prototype.$$includeIndexes=function(t,e){for(var i=t;i<e;i++)this.hasOwnProperty(i)||(this[i]=this.model.getItemAtIndex(i));this.length=this.model.getLength()},ngmaterial.components.virtualRepeat=angular.module("material.components.virtualRepeat");

@@ -5,6 +5,6 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/
goog.provide('ng.material.components.whiteframe');
goog.require('ng.material.core');
goog.provide('ngmaterial.components.whiteframe');
goog.require('ngmaterial.core');
/**

@@ -22,3 +22,2 @@ * @ngdoc module

* @name mdWhiteframe
* @restrict A
*

@@ -28,3 +27,4 @@ * @description

*
* The attribute values needs to be a number between 1 and 24.
* The attribute values needs to be a number between 1 and 24 or -1.
* When set to -1 no style is applied.
*

@@ -41,4 +41,17 @@ * ### Notes

* </hljs>
*
* <hljs lang="html">
* <div md-whiteframe="-1">
* <span>No elevation shadow applied</span>
* </div>
* </hljs>
*
* <hljs lang="html">
* <div ng-init="elevation = 5" md-whiteframe="{{elevation}}">
* <span>Elevation of 5dp with an interpolated value</span>
* </div>
* </hljs>
*/
function MdWhiteframeDirective($log) {
var DISABLE_DP = -1;
var MIN_DP = 1;

@@ -49,3 +62,2 @@ var MAX_DP = 24;

return {
restrict: 'A',
link: postLink

@@ -55,10 +67,16 @@ };

function postLink(scope, element, attr) {
var elevation = parseInt(attr.mdWhiteframe, 10) || DEFAULT_DP;
var oldClass = '';
if (elevation > MAX_DP || elevation < MIN_DP) {
$log.warn('md-whiteframe attribute value is invalid. It should be a number between ' + MIN_DP + ' and ' + MAX_DP, element[0]);
elevation = DEFAULT_DP;
}
attr.$observe('mdWhiteframe', function(elevation) {
elevation = parseInt(elevation, 10) || DEFAULT_DP;
element.addClass('md-whiteframe-' + elevation + 'dp');
if (elevation != DISABLE_DP && (elevation > MAX_DP || elevation < MIN_DP)) {
$log.warn('md-whiteframe attribute value is invalid. It should be a number between ' + MIN_DP + ' and ' + MAX_DP, element[0]);
elevation = DEFAULT_DP;
}
var newClass = elevation == DISABLE_DP ? '' : 'md-whiteframe-' + elevation + 'dp';
attr.$updateClass(newClass, oldClass);
oldClass = newClass;
});
}

@@ -69,2 +87,2 @@ }

ng.material.components.whiteframe = angular.module("material.components.whiteframe");
ngmaterial.components.whiteframe = angular.module("material.components.whiteframe");

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
function MdWhiteframeDirective(e){function a(a,m,n){var o=parseInt(n.mdWhiteframe,10)||i;(o>t||r>o)&&(e.warn("md-whiteframe attribute value is invalid. It should be a number between "+r+" and "+t,m[0]),o=i),m.addClass("md-whiteframe-"+o+"dp")}var r=1,t=24,i=4;return{restrict:"A",link:a}}goog.provide("ng.material.components.whiteframe"),goog.require("ng.material.core"),angular.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",MdWhiteframeDirective),MdWhiteframeDirective.$inject=["$log"],ng.material.components.whiteframe=angular.module("material.components.whiteframe");
function MdWhiteframeDirective(e){function a(a,n,o){var d="";o.$observe("mdWhiteframe",function(a){a=parseInt(a,10)||m,a!=r&&(a>i||a<t)&&(e.warn("md-whiteframe attribute value is invalid. It should be a number between "+t+" and "+i,n[0]),a=m);var l=a==r?"":"md-whiteframe-"+a+"dp";o.$updateClass(l,d),d=l})}var r=-1,t=1,i=24,m=4;return{link:a}}goog.provide("ngmaterial.components.whiteframe"),goog.require("ngmaterial.core"),angular.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",MdWhiteframeDirective),MdWhiteframeDirective.$inject=["$log"],ngmaterial.components.whiteframe=angular.module("material.components.whiteframe");

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -34,4 +34,5 @@ (function( window, angular, undefined ){

function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming, $window,
$animate, $rootElement, $attrs, $q) {
//-- private variables
$animate, $rootElement, $attrs, $q, $log) {
// Internal Variables.
var ctrl = this,

@@ -47,8 +48,9 @@ itemParts = $scope.itemsExpr.split(/ in /i),

fetchesInProgress = 0,
enableWrapScroll = null;
enableWrapScroll = null,
inputModelCtrl = null;
//-- public variables with handlers
// Public Exported Variables with handlers
defineProperty('hidden', handleHiddenChange, true);
//-- public variables
// Public Exported Variables
ctrl.scope = $scope;

@@ -68,3 +70,3 @@ ctrl.parent = $scope.$parent;

//-- public methods
// Public Exported Methods
ctrl.keydown = keydown;

@@ -83,2 +85,3 @@ ctrl.blur = blur;

ctrl.loadingIsVisible = loadingIsVisible;
ctrl.positionDropdown = positionDropdown;

@@ -93,3 +96,3 @@ return init();

function init () {
$mdUtil.initOptionalProperties($scope, $attrs, { searchText: null, selectedItem: null });
$mdUtil.initOptionalProperties($scope, $attrs, { searchText: '', selectedItem: null });
$mdTheming($element);

@@ -105,2 +108,8 @@ configureWatchers();

function updateModelValidators() {
if (!$scope.requireMatch || !inputModelCtrl) return;
inputModelCtrl.$setValidity('md-require-match', !!$scope.selectedItem);
}
/**

@@ -217,3 +226,3 @@ * Calculates the dropdown's position and applies the new styles to the menu element

if ( elements ){
var items = 'ul scroller scrollContainer input'.split(' ');
var items = ['ul', 'scroller', 'scrollContainer', 'input'];
angular.forEach(items, function(key){

@@ -231,4 +240,4 @@ elements.$[key].remove();

main: $element[0],
scrollContainer: $element[0].getElementsByClassName('md-virtual-repeat-container')[0],
scroller: $element[0].getElementsByClassName('md-virtual-repeat-scroller')[0],
scrollContainer: $element[0].querySelector('.md-virtual-repeat-container'),
scroller: $element[0].querySelector('.md-virtual-repeat-scroller'),
ul: $element.find('ul')[0],

@@ -239,5 +248,8 @@ input: $element.find('input')[0],

};
elements.li = elements.ul.getElementsByTagName('li');
elements.snap = getSnapTarget();
elements.$ = getAngularElements(elements);
inputModelCtrl = elements.$.input.controller('ngModel');
}

@@ -313,3 +325,3 @@

element.off('touchmove', preventDefault);
}
};
}

@@ -328,3 +340,3 @@

function onListLeave () {
if (!hasFocus) elements.input.focus();
if (!hasFocus && !ctrl.hidden) elements.input.focus();
noBlur = false;

@@ -347,2 +359,5 @@ ctrl.hidden = shouldHide();

function selectedItemChange (selectedItem, previousSelectedItem) {
updateModelValidators();
if (selectedItem) {

@@ -353,2 +368,11 @@ getDisplayValue(selectedItem).then(function (val) {

});
} else if (previousSelectedItem && $scope.searchText) {
getDisplayValue(previousSelectedItem).then(function(displayValue) {
// Clear the searchText, when the selectedItem is set to null.
// Do not clear the searchText, when the searchText isn't matching with the previous
// selected item.
if (displayValue.toString().toLowerCase() === $scope.searchText.toLowerCase()) {
$scope.searchText = '';
}
});
}

@@ -411,5 +435,8 @@

ctrl.index = getDefaultIndex();
// do nothing on init
if (searchText === previousSearchText) return;
updateModelValidators();
getDisplayValue($scope.selectedItem).then(function (val) {

@@ -461,3 +488,3 @@ // clear selected item if search text no longer matches it

*/
function focus () {
function focus($event) {
hasFocus = true;

@@ -507,9 +534,19 @@ //-- if searchText is null, let's force it to be a string

case $mdConstant.KEY_CODE.ESCAPE:
event.preventDefault(); // Prevent browser from always clearing input
if (!shouldProcessEscape()) return;
event.stopPropagation();
event.preventDefault();
if ($scope.searchText) clearValue();
// Force the component to blur if they hit escape
doBlur(true);
clearSelectedItem();
if ($scope.searchText && hasEscapeOption('clear')) {
clearSearchText();
}
// Manually hide (needed for mdNotFound support)
ctrl.hidden = true;
if (hasEscapeOption('blur')) {
// Force the component to blur if they hit escape
doBlur(true);
}
break;

@@ -536,4 +573,11 @@ default:

function getDisplayValue (item) {
return $q.when(getItemText(item) || item);
return $q.when(getItemText(item) || item).then(function(itemText) {
if (itemText && !angular.isString(itemText)) {
$log.warn('md-autocomplete: Could not resolve display value to a string. ' +
'Please check the `md-item-text` attribute.');
}
return itemText;
});
/**

@@ -595,2 +639,18 @@ * Getter function to invoke user-defined expression (in the directive)

/**
* Determines if the escape keydown should be processed
* @returns {boolean}
*/
function shouldProcessEscape() {
return hasEscapeOption('blur') || !ctrl.hidden || ctrl.loading || hasEscapeOption('clear') && $scope.searchText;
}
/**
* Determines if an escape option is set
* @returns {boolean}
*/
function hasEscapeOption(option) {
return !$scope.escapeOptions || $scope.escapeOptions.toLowerCase().indexOf(option) !== -1;
}
/**
* Determines if the menu should be shown.

@@ -684,17 +744,39 @@ * @returns {boolean}

function clearValue () {
clearSelectedItem();
clearSearchText();
}
/**
* Clears the selected item
*/
function clearSelectedItem () {
// Reset our variables
ctrl.index = 0;
ctrl.matches = [];
}
/**
* Clears the searchText value
*/
function clearSearchText () {
// Set the loading to true so we don't see flashes of content.
// The flashing will only occour when an async request is running.
// The flashing will only occur when an async request is running.
// So the loading process will stop when the results had been retrieved.
setLoading(true);
// Reset our variables
ctrl.index = 0;
ctrl.matches = [];
$scope.searchText = '';
// Per http://www.w3schools.com/jsref/event_oninput.asp
// Normally, triggering the change / input event is unnecessary, because the browser detects it properly.
// But some browsers are not detecting it properly, which means that we have to trigger the event.
// Using the `input` is not working properly, because for example IE11 is not supporting the `input` event.
// The `change` event is a good alternative and is supported by all supported browsers.
var eventObj = document.createEvent('CustomEvent');
eventObj.initCustomEvent('input', true, true, { value: $scope.searchText });
eventObj.initCustomEvent('change', true, true, { value: '' });
elements.input.dispatchEvent(eventObj);
// For some reason, firing the above event resets the value of $scope.searchText if
// $scope.searchText has a space character at the end, so we blank it one more time and then
// focus.
elements.input.blur();
$scope.searchText = '';
elements.input.focus();

@@ -713,3 +795,3 @@ }

if (isList) handleResults(items);
if (isList) onResultsRetrieved(items);
else if (isPromise) handleAsyncResults(items);

@@ -726,3 +808,3 @@

items
.then(handleResults)
.then(onResultsRetrieved)
.finally(function(){

@@ -736,17 +818,12 @@ if (--fetchesInProgress === 0) {

function handleResults (matches) {
cache[ term ] = matches;
if ((searchText || '') !== ($scope.searchText || '')) return; //-- just cache the results if old request
function onResultsRetrieved(matches) {
cache[term] = matches;
ctrl.matches = matches;
ctrl.hidden = shouldHide();
// Just cache the results if the request is now outdated.
// The request becomes outdated, when the new searchText has changed during the result fetching.
if ((searchText || '') !== ($scope.searchText || '')) {
return;
}
// If loading is in progress, then we'll end the progress. This is needed for example,
// when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.
if (ctrl.loading) setLoading(false);
if ($scope.selectOnMatch) selectItemOnMatch();
updateMessages();
positionDropdown();
handleResults(matches);
}

@@ -817,8 +894,9 @@ }

function handleQuery () {
var searchText = $scope.searchText || '',
term = searchText.toLowerCase();
//-- if results are cached, pull in cached results
if (!$scope.noCache && cache[ term ]) {
ctrl.matches = cache[ term ];
updateMessages();
var searchText = $scope.searchText || '';
var term = searchText.toLowerCase();
// If caching is enabled and the current searchText is stored in the cache
if (!$scope.noCache && cache[term]) {
// The results should be handled as same as a normal un-cached request does.
handleResults(cache[term]);
} else {

@@ -832,2 +910,20 @@ fetchResults(searchText);

/**
* Handles the retrieved results by showing them in the autocompletes dropdown.
* @param results Retrieved results
*/
function handleResults(results) {
ctrl.matches = results;
ctrl.hidden = shouldHide();
// If loading is in progress, then we'll end the progress. This is needed for example,
// when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.
if (ctrl.loading) setLoading(false);
if ($scope.selectOnMatch) selectItemOnMatch();
updateMessages();
positionDropdown();
}
/**
* If there is only one matching item and the search text matches its display value exactly,

@@ -852,3 +948,3 @@ * automatically select that item. Note: This function is only called if the user uses the

}
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$mdUtil", "$mdConstant", "$mdTheming", "$window", "$animate", "$rootElement", "$attrs", "$q"];
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$mdUtil", "$mdConstant", "$mdTheming", "$window", "$animate", "$rootElement", "$attrs", "$q", "$log"];

@@ -876,2 +972,4 @@ angular

*
* To reset the displayed value you must clear both values for `md-search-text` and `md-selected-item`.
*
* ### Validation

@@ -890,3 +988,9 @@ *

*
* ### Notes
* The `md-autocomplete` uses the the [VirtualRepeat](/api/directive/mdVirtualRepeatContainer)
* directive for displaying the results inside of the dropdown.<br/>
* > When encountering issues regarding the item template please take a look at the
* [VirtualRepeatContainer](/api/directive/mdVirtualRepeatContainer) documentation.
*
*
* @param {expression} md-items An expression in the format of `item in items` to iterate over

@@ -904,2 +1008,4 @@ * matches for your search.

* @param {boolean=} ng-disabled Determines whether or not to disable the input field
* @param {boolean=} md-require-match When set to true, the autocomplete will add a validator,
* which will evaluate to false, when no item is currently selected.
* @param {number=} md-min-length Specifies the minimum length of text before autocomplete will

@@ -913,3 +1019,4 @@ * make suggestions

* @param {boolean=} md-no-asterisk When present, asterisk will not be appended to the floating label
* @param {boolean=} md-autoselect If true, the first item will be selected by default
* @param {boolean=} md-autoselect If set to true, the first item will be automatically selected
* in the dropdown upon open.
* @param {string=} md-menu-class This will be applied to the dropdown menu for styling

@@ -926,5 +1033,8 @@ * @param {string=} md-floating-label This will add a floating label to autocomplete and wrap it in

* @param {boolean=} md-select-on-match When set, autocomplete will automatically select exact
* the item if the search text is an exact match
* the item if the search text is an exact match. <br/><br/>
* Exact match means that there is only one match showing up.
* @param {boolean=} md-match-case-insensitive When set and using `md-select-on-match`, autocomplete
* will select on case-insensitive match
* @param {string=} md-escape-options Override escape key logic. Default is `blur clear`.<br/>
* Options: `blur | clear`, `none`
*

@@ -986,3 +1096,3 @@ * @usage

function MdAutocomplete () {
function MdAutocomplete ($$mdSvgRegistry) {

@@ -1002,2 +1112,3 @@ return {

noCache: '=?mdNoCache',
requireMatch: '=?mdRequireMatch',
selectOnMatch: '=?mdSelectOnMatch',

@@ -1013,3 +1124,4 @@ matchInsensitive: '=?mdMatchCaseInsensitive',

menuClass: '@?mdMenuClass',
inputId: '@?mdInputId'
inputId: '@?mdInputId',
escapeOptions: '@?mdEscapeOptions'
},

@@ -1038,3 +1150,2 @@ link: function(scope, element, attrs, controller) {

<md-autocomplete-wrap\
layout="row"\
ng-class="{ \'md-whiteframe-z1\': !floatingLabel, \'md-menu-showing\': !$mdAutocompleteCtrl.hidden }">\

@@ -1069,3 +1180,3 @@ ' + getInputElement() + '\

<aria-status\
class="_md-visually-hidden"\
class="md-visually-hidden"\
role="status"\

@@ -1096,3 +1207,3 @@ aria-live="assertive">\

return '\
<md-input-container flex ng-if="floatingLabel">\
<md-input-container ng-if="floatingLabel">\
<label>{{floatingLabel}}</label>\

@@ -1110,6 +1221,7 @@ <input type="search"\

ng-model="$mdAutocompleteCtrl.scope.searchText"\
ng-model-options="{ allowInvalid: true }"\
ng-keydown="$mdAutocompleteCtrl.keydown($event)"\
ng-blur="$mdAutocompleteCtrl.blur()"\
' + (attr.mdNoAsterisk != null ? 'md-no-asterisk="' + attr.mdNoAsterisk + '"' : '') + '\
ng-focus="$mdAutocompleteCtrl.focus()"\
ng-focus="$mdAutocompleteCtrl.focus($event)"\
aria-owns="ul-{{$mdAutocompleteCtrl.id}}"\

@@ -1127,3 +1239,3 @@ ' + (attr.mdSelectOnFocus != null ? 'md-select-on-focus=""' : '') + '\

return '\
<input flex type="search"\
<input type="search"\
' + (tabindex != null ? 'tabindex="' + tabindex + '"' : '') + '\

@@ -1140,3 +1252,3 @@ id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}"\

ng-blur="$mdAutocompleteCtrl.blur()"\
ng-focus="$mdAutocompleteCtrl.focus()"\
ng-focus="$mdAutocompleteCtrl.focus($event)"\
placeholder="{{placeholder}}"\

@@ -1155,5 +1267,5 @@ aria-owns="ul-{{$mdAutocompleteCtrl.id}}"\

ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled"\
ng-click="$mdAutocompleteCtrl.clear()">\
<md-icon md-svg-icon="md-close"></md-icon>\
<span class="_md-visually-hidden">Clear</span>\
ng-click="$mdAutocompleteCtrl.clear($event)">\
<md-icon md-svg-src="' + $$mdSvgRegistry.mdClose + '"></md-icon>\
<span class="md-visually-hidden">Clear</span>\
</button>\

@@ -1166,2 +1278,3 @@ ';

}
MdAutocomplete.$inject = ["$$mdSvgRegistry"];

@@ -1262,3 +1375,3 @@ angular

if (text === null || state.unsafeText !== prevState.unsafeText) {
text = angular.element('<div>').text(state.unsafeText).html()
text = angular.element('<div>').text(state.unsafeText).html();
}

@@ -1275,11 +1388,10 @@ if (regex === null || state.term !== prevState.term) {

function sanitize (term) {
return term && term.replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g, '\\$&');
return term && term.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g, '\\$&');
}
function getRegExp (text, flags) {
var str = '';
if (flags.indexOf('^') >= 1) str += '^';
str += text;
if (flags.indexOf('$') >= 1) str += '$';
return new RegExp(sanitize(str), flags.replace(/[\$\^]/g, ''));
var startFlag = '', endFlag = '';
if (flags.indexOf('^') >= 0) startFlag = '^';
if (flags.indexOf('$') >= 0) endFlag = '$';
return new RegExp(startFlag + sanitize(text) + endFlag, flags.replace(/[\$\^]/g, ''));
}

@@ -1286,0 +1398,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function o(e,o,i,l,a,r,c,s,p,f){function h(){i.initOptionalProperties(e,p,{searchText:null,selectedItem:null}),a(o),C(),i.nextTick(function(){b(),$(),x(),o.on("focus",x)})}function g(){function t(){var e=0,t=o.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}function n(){var e=pe.scrollContainer.getBoundingClientRect(),t={};e.right>c.right-m&&(t.left=a.right-e.width+"px"),pe.$.scrollContainer.css(t)}if(!pe)return i.nextTick(g,!1,e);var l,a=pe.wrap.getBoundingClientRect(),r=pe.snap.getBoundingClientRect(),c=pe.root.getBoundingClientRect(),s=r.bottom-c.top,f=c.bottom-r.top,h=a.left-c.left,$=a.width,x=t();p.mdFloatingLabel&&(h+=d,$-=2*d),l={left:h+"px",minWidth:$+"px",maxWidth:Math.max(a.right-c.left,c.right-a.left)-m+"px"},s>f&&c.height-a.bottom-m<u?(l.top="auto",l.bottom=f+"px",l.maxHeight=Math.min(u,a.top-c.top-m)+"px"):(l.top=s-x+"px",l.bottom="auto",l.maxHeight=Math.min(u,c.bottom+i.scrollTop()-a.bottom-m)+"px"),pe.$.scrollContainer.css(l),i.nextTick(n,!1)}function $(){pe.$.root.length&&(a(pe.$.scrollContainer),pe.$.scrollContainer.detach(),pe.$.root.append(pe.$.scrollContainer),c.pin&&c.pin(pe.$.scrollContainer,s))}function x(){e.autofocus&&pe.input.focus()}function C(){var n=parseInt(e.delay,10)||0;p.$observe("disabled",function(e){me.isDisabled=i.parseAttributeBoolean(e,!1)}),p.$observe("required",function(e){me.isRequired=i.parseAttributeBoolean(e,!1)}),p.$observe("readonly",function(e){me.isReadonly=i.parseAttributeBoolean(e,!1)}),e.$watch("searchText",n?i.debounce(F,n):F),e.$watch("selectedItem",M),t.element(r).on("resize",g),e.$on("$destroy",v)}function v(){if(me.hidden||i.enableScrolling(),t.element(r).off("resize",g),pe){var e="ul scroller scrollContainer input".split(" ");t.forEach(e,function(e){pe.$[e].remove()})}}function b(){pe={main:o[0],scrollContainer:o[0].getElementsByClassName("md-virtual-repeat-container")[0],scroller:o[0].getElementsByClassName("md-virtual-repeat-scroller")[0],ul:o.find("ul")[0],input:o.find("input")[0],wrap:o.find("md-autocomplete-wrap")[0],root:document.body},pe.li=pe.ul.getElementsByTagName("li"),pe.snap=A(),pe.$=T(pe)}function A(){for(var e=o;e.length;e=e.parent())if(t.isDefined(e.attr("md-autocomplete-snap")))return e[0];return pe.wrap}function T(e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=t.element(e[o]));return n}function w(n,o){!n&&o?(g(),pe&&i.nextTick(function(){i.disableScrollAround(pe.ul),ve=y(t.element(pe.wrap))},!1,e)):n&&!o&&i.nextTick(function(){i.enableScrolling(),ve&&(ve(),ve=null)},!1,e)}function y(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}function E(){he=!0}function I(){$e||pe.input.focus(),he=!1,me.hidden=j()}function k(){pe.input.focus()}function M(t,n){t&&_(t).then(function(o){e.searchText=o,L(t,n)}),t!==n&&N()}function N(){t.isFunction(e.itemChange)&&e.itemChange(q(e.selectedItem))}function D(){t.isFunction(e.textChange)&&e.textChange()}function L(e,t){ge.forEach(function(n){n(e,t)})}function O(e){-1==ge.indexOf(e)&&ge.push(e)}function R(e){var t=ge.indexOf(e);-1!=t&&ge.splice(t,1)}function F(t,n){me.index=W(),t!==n&&_(e.selectedItem).then(function(o){t!==o&&(e.selectedItem=null,t!==n&&D(),Q()?ce():(me.matches=[],U(!1),ne()))})}function S(){$e=!1,he||(me.hidden=j())}function B(e){e&&(he=!1,$e=!1),pe.input.blur()}function H(){$e=!0,t.isString(e.searchText)||(e.searchText=""),me.hidden=j(),me.hidden||ce()}function P(t){switch(t.keyCode){case l.KEY_CODE.DOWN_ARROW:if(me.loading)return;t.stopPropagation(),t.preventDefault(),me.index=Math.min(me.index+1,me.matches.length-1),ie(),ne();break;case l.KEY_CODE.UP_ARROW:if(me.loading)return;t.stopPropagation(),t.preventDefault(),me.index=me.index<0?me.matches.length-1:Math.max(0,me.index-1),ie(),ne();break;case l.KEY_CODE.TAB:if(I(),me.hidden||me.loading||me.index<0||me.matches.length<1)return;Z(me.index);break;case l.KEY_CODE.ENTER:if(me.hidden||me.loading||me.index<0||me.matches.length<1)return;if(z())return;t.stopPropagation(),t.preventDefault(),Z(me.index);break;case l.KEY_CODE.ESCAPE:t.stopPropagation(),t.preventDefault(),e.searchText&&ee(),B(!0)}}function V(){return t.isNumber(e.minLength)?e.minLength:1}function _(t){function n(t){return t&&e.itemText?e.itemText(q(t)):null}return f.when(n(t)||t)}function q(e){if(!e)return n;var t={};return me.itemName&&(t[me.itemName]=e),t}function W(){return e.autoselect?0:-1}function U(e){me.loading!=e&&(me.loading=e),me.hidden=j()}function j(){return me.loading&&!Y()?!0:z()?!0:$e?!K():!0}function K(){return Q()&&Y()||re()}function Y(){return!!me.matches.length}function z(){return!!me.scope.selectedItem}function G(){return me.loading&&!z()}function J(){return _(me.matches[me.index])}function Q(){return(e.searchText||"").length>=V()}function X(e,t,n){Object.defineProperty(me,e,{get:function(){return n},set:function(e){var o=n;n=e,t(e,o)}})}function Z(t){i.nextTick(function(){_(me.matches[t]).then(function(e){var t=pe.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=me.matches[t],U(!1)})},!1)}function ee(){U(!0),me.index=0,me.matches=[],e.searchText="";var t=document.createEvent("CustomEvent");t.initCustomEvent("input",!0,!0,{value:e.searchText}),pe.input.dispatchEvent(t),pe.input.focus()}function te(n){function o(t){t&&(t=f.when(t),Ce++,U(!0),i.nextTick(function(){t.then(l)["finally"](function(){0===--Ce&&U(!1)})},!0,e))}function l(t){fe[r]=t,(n||"")===(e.searchText||"")&&(me.matches=t,me.hidden=j(),me.loading&&U(!1),e.selectOnMatch&&ue(),ne(),g())}var a=e.$parent.$eval(se),r=n.toLowerCase(),c=t.isArray(a),u=!!a.then;c?l(a):u&&o(a)}function ne(){J().then(function(e){me.messages=[oe(),e]})}function oe(){if(xe===me.matches.length)return"";switch(xe=me.matches.length,me.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+me.matches.length+" matches available."}}function ie(){if(pe.li[0]){var e=pe.li[0].offsetHeight,t=e*me.index,n=t+e,o=pe.scroller.clientHeight,i=pe.scroller.scrollTop;i>t?ae(t):n>i+o&&ae(n-o)}}function le(){return 0!==Ce}function ae(e){pe.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function re(){var e=(me.scope.searchText||"").length;return me.hasNotFound&&!Y()&&(!me.loading||le())&&e>=V()&&($e||he)&&!z()}function ce(){var t=e.searchText||"",n=t.toLowerCase();!e.noCache&&fe[n]?(me.matches=fe[n],ne()):te(t),me.hidden=j()}function ue(){var t=e.searchText,n=me.matches,o=n[0];1===n.length&&_(o).then(function(n){var o=t==n;e.matchInsensitive&&!o&&(o=t.toLowerCase()==n.toLowerCase()),o&&Z(0)})}var me=this,de=e.itemsExpr.split(/ in /i),se=de[1],pe=null,fe={},he=!1,ge=[],$e=!1,xe=0,Ce=0,ve=null;return X("hidden",w,!0),me.scope=e,me.parent=e.$parent,me.itemName=de[0],me.matches=[],me.loading=!1,me.hidden=!0,me.index=null,me.messages=[],me.id=i.nextUid(),me.isDisabled=null,me.isRequired=null,me.isReadonly=null,me.hasNotFound=!1,me.keydown=P,me.blur=S,me.focus=H,me.clear=ee,me.select=Z,me.listEnter=E,me.listLeave=I,me.mouseUp=k,me.getCurrentDisplayValue=J,me.registerSelectedItemWatcher=O,me.unregisterSelectedItemWatcher=R,me.notFoundVisible=re,me.loadingIsVisible=G,h()}function i(){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId"},link:function(e,t,n,o){o.hasNotFound=!!t.attr("md-has-not-found")},template:function(e,t){function n(){var t=e.find("md-item-template").detach(),n=t.length?t.html():e.html();return t.length||e.empty(),"<md-autocomplete-parent-scope md-autocomplete-replace>"+n+"</md-autocomplete-parent-scope>"}function o(){var t=e.find("md-not-found").detach(),n=t.length?t.html():"";return n?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>'+n+"</li>":""}function i(){return t.mdFloatingLabel?' <md-input-container flex ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" '+(null!=c?'tabindex="'+c+'"':"")+' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" '+(null!=t.mdNoAsterisk?'md-no-asterisk="'+t.mdNoAsterisk+'"':"")+' ng-focus="$mdAutocompleteCtrl.focus()" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=t.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>'+r+"</div> </md-input-container>":' <input flex type="search" '+(null!=c?'tabindex="'+c+'"':"")+' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" ng-focus="$mdAutocompleteCtrl.focus()" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=t.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" tabindex="-1" ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled" ng-click="$mdAutocompleteCtrl.clear()"> <md-icon md-svg-icon="md-close"></md-icon> <span class="_md-visually-hidden">Clear</span> </button> '}var l=o(),a=n(),r=e.html(),c=t.tabindex;return l&&e.attr("md-has-not-found",!0),e.attr("tabindex","-1")," <md-autocomplete-wrap layout=\"row\" ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\"> "+i()+' <md-progress-linear class="'+(t.mdFloatingLabel?"md-inline":"")+'" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-min="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select($index)" md-extra-name="$mdAutocompleteCtrl.itemName"> '+a+" </li>"+l+' </ul> </md-virtual-repeat-container> </md-autocomplete-wrap> <aria-status class="_md-visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p> </aria-status>'}}}function l(e,t){function n(e,n,o){return function(e,n,i){function l(n,o){c[o]=e[n],e.$watch(n,function(e){t.nextTick(function(){c[o]=e})})}function a(){var t=!1,n=!1;e.$watch(function(){n||t||(t=!0,e.$$postDigest(function(){n||c.$digest(),t=n=!1}))}),c.$watch(function(){n=!0})}var r=e.$mdAutocompleteCtrl,c=r.parent.$new(),u=r.itemName;l("$index","$index"),l("item",u),a(),o(c,function(e){n.after(e)})}}return{restrict:"AE",compile:n,terminal:!0,transclude:"element"}}function a(e,n,o){function i(i,l){var r=null,c=null,u=o.mdHighlightFlags||"",m=e.$watch(function(e){return{term:i(e),unsafeText:l(e)}},function(e,o){null!==r&&e.unsafeText===o.unsafeText||(r=t.element("<div>").text(e.unsafeText).html()),null!==c&&e.term===o.term||(c=a(e.term,u)),n.html(r.replace(c,'<span class="highlight">$&</span>'))},!0);n.on("$destroy",m)}function l(e){return e&&e.replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g,"\\$&")}function a(e,t){var n="";return t.indexOf("^")>=1&&(n+="^"),n+=e,t.indexOf("$")>=1&&(n+="$"),new RegExp(l(n),t.replace(/[\$\^]/g,""))}this.init=i}function r(e,t){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(n,o){var i=t(o.mdHighlightText),l=e(n.html());return function(e,t,n,o){o.init(i,l)}}}}t.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),t.module("material.components.autocomplete").controller("MdAutocompleteCtrl",o);var c=41,u=5.5*c,m=8,d=2;o.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q"],t.module("material.components.autocomplete").directive("mdAutocomplete",i),t.module("material.components.autocomplete").directive("mdAutocompleteParentScope",l),l.$inject=["$compile","$mdUtil"],t.module("material.components.autocomplete").controller("MdHighlightCtrl",a),a.$inject=["$scope","$element","$attrs"],t.module("material.components.autocomplete").directive("mdHighlightText",r),r.$inject=["$interpolate","$parse"]}(window,window.angular);
!function(e,t,n){"use strict";function o(e,o,i,l,a,r,c,s,p,h,f){function g(){i.initOptionalProperties(e,p,{searchText:"",selectedItem:null}),a(o),b(),i.nextTick(function(){T(),C(),v(),o.on("focus",v)})}function $(){e.requireMatch&&ke&&ke.$setValidity("md-require-match",!!e.selectedItem)}function x(){function t(){var e=0,t=o.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}function n(){var e=ve.scrollContainer.getBoundingClientRect(),t={};e.right>c.right-m&&(t.left=a.right-e.width+"px"),ve.$.scrollContainer.css(t)}if(!ve)return i.nextTick(x,!1,e);var l,a=ve.wrap.getBoundingClientRect(),r=ve.snap.getBoundingClientRect(),c=ve.root.getBoundingClientRect(),s=r.bottom-c.top,h=c.bottom-r.top,f=a.left-c.left,g=a.width,$=t();p.mdFloatingLabel&&(f+=d,g-=2*d),l={left:f+"px",minWidth:g+"px",maxWidth:Math.max(a.right-c.left,c.right-a.left)-m+"px"},s>h&&c.height-a.bottom-m<u?(l.top="auto",l.bottom=h+"px",l.maxHeight=Math.min(u,a.top-c.top-m)+"px"):(l.top=s-$+"px",l.bottom="auto",l.maxHeight=Math.min(u,c.bottom+i.scrollTop()-a.bottom-m)+"px"),ve.$.scrollContainer.css(l),i.nextTick(n,!1)}function C(){ve.$.root.length&&(a(ve.$.scrollContainer),ve.$.scrollContainer.detach(),ve.$.root.append(ve.$.scrollContainer),c.pin&&c.pin(ve.$.scrollContainer,s))}function v(){e.autofocus&&ve.input.focus()}function b(){var n=parseInt(e.delay,10)||0;p.$observe("disabled",function(e){$e.isDisabled=i.parseAttributeBoolean(e,!1)}),p.$observe("required",function(e){$e.isRequired=i.parseAttributeBoolean(e,!1)}),p.$observe("readonly",function(e){$e.isReadonly=i.parseAttributeBoolean(e,!1)}),e.$watch("searchText",n?i.debounce(q,n):q),e.$watch("selectedItem",L),t.element(r).on("resize",x),e.$on("$destroy",A)}function A(){if($e.hidden||i.enableScrolling(),t.element(r).off("resize",x),ve){var e=["ul","scroller","scrollContainer","input"];t.forEach(e,function(e){ve.$[e].remove()})}}function T(){ve={main:o[0],scrollContainer:o[0].querySelector(".md-virtual-repeat-container"),scroller:o[0].querySelector(".md-virtual-repeat-scroller"),ul:o.find("ul")[0],input:o.find("input")[0],wrap:o.find("md-autocomplete-wrap")[0],root:document.body},ve.li=ve.ul.getElementsByTagName("li"),ve.snap=w(),ve.$=y(ve),ke=ve.$.input.controller("ngModel")}function w(){for(var e=o;e.length;e=e.parent())if(t.isDefined(e.attr("md-autocomplete-snap")))return e[0];return ve.wrap}function y(e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=t.element(e[o]));return n}function I(n,o){!n&&o?(x(),ve&&i.nextTick(function(){i.disableScrollAround(ve.ul),Ee=E(t.element(ve.wrap))},!1,e)):n&&!o&&i.nextTick(function(){i.enableScrolling(),Ee&&(Ee(),Ee=null)},!1,e)}function E(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}function k(){Ae=!0}function M(){we||$e.hidden||ve.input.focus(),Ae=!1,$e.hidden=Y()}function O(){ve.input.focus()}function L(t,n){$(),t?_(t).then(function(o){e.searchText=o,S(t,n)}):n&&e.searchText&&_(n).then(function(t){t.toString().toLowerCase()===e.searchText.toLowerCase()&&(e.searchText="")}),t!==n&&R()}function R(){t.isFunction(e.itemChange)&&e.itemChange(j(e.selectedItem))}function D(){t.isFunction(e.textChange)&&e.textChange()}function S(e,t){Te.forEach(function(n){n(e,t)})}function N(e){Te.indexOf(e)==-1&&Te.push(e)}function F(e){var t=Te.indexOf(e);t!=-1&&Te.splice(t,1)}function q(t,n){$e.index=U(),t!==n&&($(),_(e.selectedItem).then(function(o){t!==o&&(e.selectedItem=null,t!==n&&D(),te()?he():($e.matches=[],K(!1),ce()))}))}function H(){we=!1,Ae||($e.hidden=Y())}function P(e){e&&(Ae=!1,we=!1),ve.input.blur()}function V(n){we=!0,t.isString(e.searchText)||(e.searchText=""),$e.hidden=Y(),$e.hidden||he()}function B(t){switch(t.keyCode){case l.KEY_CODE.DOWN_ARROW:if($e.loading)return;t.stopPropagation(),t.preventDefault(),$e.index=Math.min($e.index+1,$e.matches.length-1),me(),ce();break;case l.KEY_CODE.UP_ARROW:if($e.loading)return;t.stopPropagation(),t.preventDefault(),$e.index=$e.index<0?$e.matches.length-1:Math.max(0,$e.index-1),me(),ce();break;case l.KEY_CODE.TAB:if(M(),$e.hidden||$e.loading||$e.index<0||$e.matches.length<1)return;oe($e.index);break;case l.KEY_CODE.ENTER:if($e.hidden||$e.loading||$e.index<0||$e.matches.length<1)return;if(X())return;t.stopPropagation(),t.preventDefault(),oe($e.index);break;case l.KEY_CODE.ESCAPE:if(t.preventDefault(),!z())return;t.stopPropagation(),le(),e.searchText&&G("clear")&&ae(),$e.hidden=!0,G("blur")&&P(!0)}}function W(){return t.isNumber(e.minLength)?e.minLength:1}function _(n){function o(t){return t&&e.itemText?e.itemText(j(t)):null}return h.when(o(n)||n).then(function(e){return e&&!t.isString(e)&&f.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e})}function j(e){if(!e)return n;var t={};return $e.itemName&&(t[$e.itemName]=e),t}function U(){return e.autoselect?0:-1}function K(e){$e.loading!=e&&($e.loading=e),$e.hidden=Y()}function Y(){return!(!$e.loading||Q())||(!!X()||(!we||!J()))}function z(){return G("blur")||!$e.hidden||$e.loading||G("clear")&&e.searchText}function G(t){return!e.escapeOptions||e.escapeOptions.toLowerCase().indexOf(t)!==-1}function J(){return te()&&Q()||pe()}function Q(){return!!$e.matches.length}function X(){return!!$e.scope.selectedItem}function Z(){return $e.loading&&!X()}function ee(){return _($e.matches[$e.index])}function te(){return(e.searchText||"").length>=W()}function ne(e,t,n){Object.defineProperty($e,e,{get:function(){return n},set:function(e){var o=n;n=e,t(e,o)}})}function oe(t){i.nextTick(function(){_($e.matches[t]).then(function(e){var t=ve.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=$e.matches[t],K(!1)})},!1)}function ie(){le(),ae()}function le(){$e.index=0,$e.matches=[]}function ae(){K(!0),e.searchText="";var t=document.createEvent("CustomEvent");t.initCustomEvent("change",!0,!0,{value:""}),ve.input.dispatchEvent(t),ve.input.blur(),e.searchText="",ve.input.focus()}function re(n){function o(t){t&&(t=h.when(t),Ie++,K(!0),i.nextTick(function(){t.then(l)["finally"](function(){0===--Ie&&K(!1)})},!0,e))}function l(t){be[r]=t,(n||"")===(e.searchText||"")&&fe(t)}var a=e.$parent.$eval(Ce),r=n.toLowerCase(),c=t.isArray(a),u=!!a.then;c?l(a):u&&o(a)}function ce(){ee().then(function(e){$e.messages=[ue(),e]})}function ue(){if(ye===$e.matches.length)return"";switch(ye=$e.matches.length,$e.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+$e.matches.length+" matches available."}}function me(){if(ve.li[0]){var e=ve.li[0].offsetHeight,t=e*$e.index,n=t+e,o=ve.scroller.clientHeight,i=ve.scroller.scrollTop;t<i?se(t):n>i+o&&se(n-o)}}function de(){return 0!==Ie}function se(e){ve.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function pe(){var e=($e.scope.searchText||"").length;return $e.hasNotFound&&!Q()&&(!$e.loading||de())&&e>=W()&&(we||Ae)&&!X()}function he(){var t=e.searchText||"",n=t.toLowerCase();!e.noCache&&be[n]?fe(be[n]):re(t),$e.hidden=Y()}function fe(t){$e.matches=t,$e.hidden=Y(),$e.loading&&K(!1),e.selectOnMatch&&ge(),ce(),x()}function ge(){var t=e.searchText,n=$e.matches,o=n[0];1===n.length&&_(o).then(function(n){var o=t==n;e.matchInsensitive&&!o&&(o=t.toLowerCase()==n.toLowerCase()),o&&oe(0)})}var $e=this,xe=e.itemsExpr.split(/ in /i),Ce=xe[1],ve=null,be={},Ae=!1,Te=[],we=!1,ye=0,Ie=0,Ee=null,ke=null;return ne("hidden",I,!0),$e.scope=e,$e.parent=e.$parent,$e.itemName=xe[0],$e.matches=[],$e.loading=!1,$e.hidden=!0,$e.index=null,$e.messages=[],$e.id=i.nextUid(),$e.isDisabled=null,$e.isRequired=null,$e.isReadonly=null,$e.hasNotFound=!1,$e.keydown=B,$e.blur=H,$e.focus=V,$e.clear=ie,$e.select=oe,$e.listEnter=k,$e.listLeave=M,$e.mouseUp=O,$e.getCurrentDisplayValue=ee,$e.registerSelectedItemWatcher=N,$e.unregisterSelectedItemWatcher=F,$e.notFoundVisible=pe,$e.loadingIsVisible=Z,$e.positionDropdown=x,g()}function i(e){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions"},link:function(e,t,n,o){o.hasNotFound=!!t.attr("md-has-not-found")},template:function(t,n){function o(){var e=t.find("md-item-template").detach(),n=e.length?e.html():t.html();return e.length||t.empty(),"<md-autocomplete-parent-scope md-autocomplete-replace>"+n+"</md-autocomplete-parent-scope>"}function i(){var e=t.find("md-not-found").detach(),n=e.length?e.html():"";return n?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>'+n+"</li>":""}function l(){return n.mdFloatingLabel?' <md-input-container ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" '+(null!=u?'tabindex="'+u+'"':"")+' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-model-options="{ allowInvalid: true }" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" '+(null!=n.mdNoAsterisk?'md-no-asterisk="'+n.mdNoAsterisk+'"':"")+' ng-focus="$mdAutocompleteCtrl.focus($event)" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=n.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>'+c+"</div> </md-input-container>":' <input type="search" '+(null!=u?'tabindex="'+u+'"':"")+' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" ng-focus="$mdAutocompleteCtrl.focus($event)" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" '+(null!=n.mdSelectOnFocus?'md-select-on-focus=""':"")+' aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" tabindex="-1" ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled" ng-click="$mdAutocompleteCtrl.clear($event)"> <md-icon md-svg-src="'+e.mdClose+'"></md-icon> <span class="md-visually-hidden">Clear</span> </button> '}var a=i(),r=o(),c=t.html(),u=n.tabindex;return a&&t.attr("md-has-not-found",!0),t.attr("tabindex","-1")," <md-autocomplete-wrap ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\"> "+l()+' <md-progress-linear class="'+(n.mdFloatingLabel?"md-inline":"")+'" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-min="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select($index)" md-extra-name="$mdAutocompleteCtrl.itemName"> '+r+" </li>"+a+' </ul> </md-virtual-repeat-container> </md-autocomplete-wrap> <aria-status class="md-visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p> </aria-status>'}}}function l(e,t){function n(e,n,o){return function(e,n,i){function l(n,o){c[o]=e[n],e.$watch(n,function(e){t.nextTick(function(){c[o]=e})})}function a(){var t=!1,n=!1;e.$watch(function(){n||t||(t=!0,e.$$postDigest(function(){n||c.$digest(),t=n=!1}))}),c.$watch(function(){n=!0})}var r=e.$mdAutocompleteCtrl,c=r.parent.$new(),u=r.itemName;l("$index","$index"),l("item",u),a(),o(c,function(e){n.after(e)})}}return{restrict:"AE",compile:n,terminal:!0,transclude:"element"}}function a(e,n,o){function i(i,l){var r=null,c=null,u=o.mdHighlightFlags||"",m=e.$watch(function(e){return{term:i(e),unsafeText:l(e)}},function(e,o){null!==r&&e.unsafeText===o.unsafeText||(r=t.element("<div>").text(e.unsafeText).html()),null!==c&&e.term===o.term||(c=a(e.term,u)),n.html(r.replace(c,'<span class="highlight">$&</span>'))},!0);n.on("$destroy",m)}function l(e){return e&&e.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g,"\\$&")}function a(e,t){var n="",o="";return t.indexOf("^")>=0&&(n="^"),t.indexOf("$")>=0&&(o="$"),new RegExp(n+l(e)+o,t.replace(/[\$\^]/g,""))}this.init=i}function r(e,t){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(n,o){var i=t(o.mdHighlightText),l=e(n.html());return function(e,t,n,o){o.init(i,l)}}}}t.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),t.module("material.components.autocomplete").controller("MdAutocompleteCtrl",o);var c=41,u=5.5*c,m=8,d=2;o.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log"],t.module("material.components.autocomplete").directive("mdAutocomplete",i),i.$inject=["$$mdSvgRegistry"],t.module("material.components.autocomplete").directive("mdAutocompleteParentScope",l),l.$inject=["$compile","$mdUtil"],t.module("material.components.autocomplete").controller("MdHighlightCtrl",a),a.$inject=["$scope","$element","$attrs"],t.module("material.components.autocomplete").directive("mdHighlightText",r),r.$inject=["$interpolate","$parse"]}(window,window.angular);
{
"name": "angular-material-autocomplete",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-icon": "1.1.0-rc4-master-06e7e99",
"angular-material-virtualRepeat": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-icon": "1.1.0-rc.5-master-c447c12",
"angular-material-virtualRepeat": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -33,3 +33,3 @@ (function( window, angular, undefined ){

.directive('mdBackdrop', ["$mdTheming", "$mdUtil", "$animate", "$rootElement", "$window", "$log", "$$rAF", "$document", function BackdropDirective($mdTheming, $mdUtil, $animate, $rootElement, $window, $log, $$rAF, $document) {
var ERROR_CSS_POSITION = "<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";
var ERROR_CSS_POSITION = '<md-backdrop> may not work properly in a scrolled, static-positioned parent container.';

@@ -45,11 +45,21 @@ return {

$$rAF(function () {
var bodyStyles;
$$rAF(function() {
// If body scrolling has been disabled using mdUtil.disableBodyScroll(),
// adjust the 'backdrop' height to account for the fixed 'body' top offset.
// Note that this can be pretty expensive and is better done inside the $$rAF.
var body = $window.getComputedStyle($document[0].body);
if (body.position == 'fixed') {
var hViewport = parseInt(body.height, 10) + Math.abs(parseInt(body.top, 10));
element.css({
height: hViewport + 'px'
bodyStyles = $window.getComputedStyle($document[0].body);
if (bodyStyles.position === 'fixed') {
var resizeHandler = $mdUtil.debounce(function(){
bodyStyles = $window.getComputedStyle($document[0].body);
resize();
}, 60, null, false);
resize();
angular.element($window).on('resize', resizeHandler);
scope.$on('$destroy', function() {
angular.element($window).off('resize', resizeHandler);
});

@@ -60,19 +70,18 @@ }

// so let's wait until $animate is done...
var parent = element.parent()[0];
if (parent) {
var parent = element.parent();
if ( parent.nodeName == 'BODY' ) {
element.css({position : 'fixed'});
if (parent.length) {
if (parent[0].nodeName === 'BODY') {
element.css('position', 'fixed');
}
var styles = $window.getComputedStyle(parent);
if (styles.position == 'static') {
var styles = $window.getComputedStyle(parent[0]);
if (styles.position === 'static') {
// backdrop uses position:absolute and will not work properly with parent position:static (default)
$log.warn(ERROR_CSS_POSITION);
}
}
// Only inherit the parent if the backdrop has a parent.
if (element.parent().length) {
$mdTheming.inherit(element, element.parent());
// Only inherit the parent if the backdrop has a parent.
$mdTheming.inherit(element, parent);
}

@@ -82,8 +91,5 @@ });

function resize() {
var hViewport = parseInt(body.height, 10) + Math.abs(parseInt(body.top, 10));
element.css({
height: hViewport + 'px'
});
var viewportHeight = parseInt(bodyStyles.height, 10) + Math.abs(parseInt(bodyStyles.top, 10));
element.css('height', viewportHeight + 'px');
}
}

@@ -90,0 +96,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,n,e){"use strict";n.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(t,n,e,i,o,r,a,p){function d(n,d,s){e.pin&&e.pin(d,i),a(function(){var n=o.getComputedStyle(p[0].body);if("fixed"==n.position){var e=parseInt(n.height,10)+Math.abs(parseInt(n.top,10));d.css({height:e+"px"})}var i=d.parent()[0];if(i){"BODY"==i.nodeName&&d.css({position:"fixed"});var a=o.getComputedStyle(i);"static"==a.position&&r.warn(c)}d.parent().length&&t.inherit(d,d.parent())})}var c="<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";return{restrict:"E",link:d}}])}(window,window.angular);
!function(e,t,n){"use strict";t.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(e,n,o,i,r,a,d,c){function p(p,l,m){function u(){var e=parseInt(f.height,10)+Math.abs(parseInt(f.top,10));l.css("height",e+"px")}o.pin&&o.pin(l,i);var f;d(function(){if(f=r.getComputedStyle(c[0].body),"fixed"===f.position){var o=n.debounce(function(){f=r.getComputedStyle(c[0].body),u()},60,null,!1);u(),t.element(r).on("resize",o),p.$on("$destroy",function(){t.element(r).off("resize",o)})}var i=l.parent();if(i.length){"BODY"===i[0].nodeName&&l.css("position","fixed");var d=r.getComputedStyle(i[0]);"static"===d.position&&a.warn(s),e.inherit(l,i)}})}var s="<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";return{restrict:"E",link:p}}])}(window,window.angular);
{
"name": "angular-material-backdrop",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -146,3 +146,3 @@ (function( window, angular, undefined ){

bottomSheetDefaults.$inject = ["$animate", "$mdConstant", "$mdUtil", "$mdTheming", "$mdBottomSheet", "$rootElement", "$mdGesture"];
bottomSheetDefaults.$inject = ["$animate", "$mdConstant", "$mdUtil", "$mdTheming", "$mdBottomSheet", "$rootElement", "$mdGesture", "$log"];
return $$interimElementProvider('$mdBottomSheet')

@@ -155,3 +155,4 @@ .setDefaults({

/* ngInject */
function bottomSheetDefaults($animate, $mdConstant, $mdUtil, $mdTheming, $mdBottomSheet, $rootElement, $mdGesture) {
function bottomSheetDefaults($animate, $mdConstant, $mdUtil, $mdTheming, $mdBottomSheet, $rootElement,
$mdGesture, $log) {
var backdrop;

@@ -177,5 +178,12 @@

// Once the md-bottom-sheet has `ng-cloak` applied on his template the opening animation will not work properly.
// This is a very common problem, so we have to notify the developer about this.
if (element.hasClass('ng-cloak')) {
var message = '$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.';
$log.warn( message, element[0] );
}
if (!options.disableBackdrop) {
// Add a backdrop that will close on click
backdrop = $mdUtil.createBackdrop(scope, "_md-bottom-sheet-backdrop md-opaque");
backdrop = $mdUtil.createBackdrop(scope, "md-bottom-sheet-backdrop md-opaque");

@@ -213,3 +221,3 @@ // Prevent mouse focus on backdrop; ONLY programatic focus allowed.

element[0].querySelector('a') ||
element[0].querySelector('[ng-click]')
element[0].querySelector($mdUtil.prefixer('ng-click', true))
) || backdrop;

@@ -216,0 +224,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function o(e){return{restrict:"E",link:function(t,n){n.addClass("_md"),t.$on("$destroy",function(){e.destroy()})}}}function r(e){function n(e,n,a,c,i,l,d){function s(o,r,d,s){r=a.extractElementByName(r,"md-bottom-sheet"),r.attr("tabindex","-1"),d.disableBackdrop||(S=a.createBackdrop(o,"_md-bottom-sheet-backdrop md-opaque"),S[0].tabIndex=-1,d.clickOutsideToClose&&S.on("click",function(){a.nextTick(i.cancel,!0)}),c.inherit(S,d.parent),e.enter(S,d.parent,null));var m=new u(r,d.parent);return d.bottomSheet=m,c.inherit(m.element,d.parent),d.disableParentScroll&&(d.restoreScroll=a.disableScrollAround(m.element,d.parent)),e.enter(m.element,d.parent,S).then(function(){var e=a.findFocusTarget(r)||t.element(r[0].querySelector("button")||r[0].querySelector("a")||r[0].querySelector("[ng-click]"))||S;d.escapeToClose&&(d.rootElementKeyupCallback=function(e){e.keyCode===n.KEY_CODE.ESCAPE&&a.nextTick(i.cancel,!0)},l.on("keyup",d.rootElementKeyupCallback),e&&e.focus())})}function m(t,n,o){var r=o.bottomSheet;return o.disableBackdrop||e.leave(S),e.leave(r.element).then(function(){o.disableParentScroll&&(o.restoreScroll(),delete o.restoreScroll),r.cleanup()})}function u(e,t){function c(t){e.css(n.CSS.TRANSITION_DURATION,"0ms")}function l(t){var o=t.pointer.distanceY;5>o&&(o=Math.max(-r,o/2)),e.css(n.CSS.TRANSFORM,"translate3d(0,"+(r+o)+"px,0)")}function s(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>o)){var r=e.prop("offsetHeight")-t.pointer.distanceY,c=Math.min(r/t.pointer.velocityY*.75,500);e.css(n.CSS.TRANSITION_DURATION,c+"ms"),a.nextTick(i.cancel,!0)}else e.css(n.CSS.TRANSITION_DURATION,""),e.css(n.CSS.TRANSFORM,"")}var m=d.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",c).on("$md.drag",l).on("$md.dragend",s),{element:e,cleanup:function(){m(),t.off("$md.dragstart",c),t.off("$md.drag",l),t.off("$md.dragend",s)}}}var S;return{themable:!0,onShow:s,onRemove:m,disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}var o=.5,r=80;return n.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:n})}t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",o).provider("$mdBottomSheet",r),o.$inject=["$mdBottomSheet"],r.$inject=["$$interimElementProvider"]}(window,window.angular);
!function(e,t,o){"use strict";function n(e){return{restrict:"E",link:function(t,o){o.addClass("_md"),t.$on("$destroy",function(){e.destroy()})}}}function r(e){function o(e,o,a,c,i,l,s,d){function m(n,r,s,m){if(r=a.extractElementByName(r,"md-bottom-sheet"),r.attr("tabindex","-1"),r.hasClass("ng-cloak")){var u="$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.";d.warn(u,r[0])}s.disableBackdrop||(p=a.createBackdrop(n,"md-bottom-sheet-backdrop md-opaque"),p[0].tabIndex=-1,s.clickOutsideToClose&&p.on("click",function(){a.nextTick(i.cancel,!0)}),c.inherit(p,s.parent),e.enter(p,s.parent,null));var f=new S(r,s.parent);return s.bottomSheet=f,c.inherit(f.element,s.parent),s.disableParentScroll&&(s.restoreScroll=a.disableScrollAround(f.element,s.parent)),e.enter(f.element,s.parent,p).then(function(){var e=a.findFocusTarget(r)||t.element(r[0].querySelector("button")||r[0].querySelector("a")||r[0].querySelector(a.prefixer("ng-click",!0)))||p;s.escapeToClose&&(s.rootElementKeyupCallback=function(e){e.keyCode===o.KEY_CODE.ESCAPE&&a.nextTick(i.cancel,!0)},l.on("keyup",s.rootElementKeyupCallback),e&&e.focus())})}function u(t,o,n){var r=n.bottomSheet;return n.disableBackdrop||e.leave(p),e.leave(r.element).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),r.cleanup()})}function S(e,t){function c(t){e.css(o.CSS.TRANSITION_DURATION,"0ms")}function l(t){var n=t.pointer.distanceY;n<5&&(n=Math.max(-r,n/2)),e.css(o.CSS.TRANSFORM,"translate3d(0,"+(r+n)+"px,0)")}function d(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>n)){var r=e.prop("offsetHeight")-t.pointer.distanceY,c=Math.min(r/t.pointer.velocityY*.75,500);e.css(o.CSS.TRANSITION_DURATION,c+"ms"),a.nextTick(i.cancel,!0)}else e.css(o.CSS.TRANSITION_DURATION,""),e.css(o.CSS.TRANSFORM,"")}var m=s.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",c).on("$md.drag",l).on("$md.dragend",d),{element:e,cleanup:function(){m(),t.off("$md.dragstart",c),t.off("$md.drag",l),t.off("$md.dragend",d)}}}var p;return{themable:!0,onShow:m,onRemove:u,disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}var n=.5,r=80;return o.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:o})}t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",n).provider("$mdBottomSheet",r),n.$inject=["$mdBottomSheet"],r.$inject=["$$interimElementProvider"]}(window,window.angular);
{
"name": "angular-material-bottomSheet",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-backdrop": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-backdrop": "1.1.0-rc.5-master-c447c12"
}
}
{
"name": "angular-material-button",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -67,4 +67,26 @@ (function( window, angular, undefined ){

*
* Developers can also change the color palette of the button, by using the following classes
* - `md-primary`
* - `md-accent`
* - `md-warn`
*
* See for example
*
* <hljs lang="html">
* <md-button class="md-primary">Primary Button</md-button>
* </hljs>
*
* Button can be also raised, which means that they will use the current color palette to fill the button.
*
* <hljs lang="html">
* <md-button class="md-accent md-raised">Raised and Accent Button</md-button>
* </hljs>
*
* It is also possible to disable the focus effect on the button, by using the following markup.
*
* <hljs lang="html">
* <md-button class="md-no-focus">No Focus Style</md-button>
* </hljs>
*
* @param {boolean=} md-no-ink If present, disable ripple ink effects.
* @param {boolean=} md-no-focus-style If present, disable focus style on button
* @param {expression=} ng-disabled En/Disable based on the expression

@@ -135,3 +157,3 @@ * @param {string=} md-ripple-size Overrides the default ripple size logic. Options: `full`, `partial`, `auto`

// Use async expect to support possible bindings in the button label
$mdAria.expectWithText(element, 'aria-label');
$mdAria.expectWithoutText(element, 'aria-label');

@@ -154,3 +176,3 @@ // For anchor elements, we have to set tabindex manually when the

if (!angular.isDefined(attr.mdNoFocusStyle)) {
if (!element.hasClass('md-no-focus')) {
// restrict focus styles to the keyboard

@@ -173,2 +195,3 @@ scope.mouseActive = false;

}
}

@@ -175,0 +198,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,n,t){"use strict";function i(e){return{restrict:"E",link:function(n,t){e(t)}}}function o(e,t,i,o){function u(e){return n.isDefined(e.href)||n.isDefined(e.ngHref)||n.isDefined(e.ngLink)||n.isDefined(e.uiSref)}function c(e,n){if(u(n))return'<a class="md-button" ng-transclude></a>';var t="undefined"==typeof n.type?"button":n.type;return'<button class="md-button" type="'+t+'" ng-transclude></button>'}function d(c,d,a){t(d),e.attach(c,d),i.expectWithText(d,"aria-label"),u(a)&&n.isDefined(a.ngDisabled)&&c.$watch(a.ngDisabled,function(e){d.attr("tabindex",e?-1:0)}),d.on("click",function(e){a.disabled===!0&&(e.preventDefault(),e.stopImmediatePropagation())}),n.isDefined(a.mdNoFocusStyle)||(c.mouseActive=!1,d.on("mousedown",function(){c.mouseActive=!0,o(function(){c.mouseActive=!1},100)}).on("focus",function(){c.mouseActive===!1&&d.addClass("md-focused")}).on("blur",function(e){d.removeClass("md-focused")}))}return{restrict:"EA",replace:!0,transclude:!0,template:c,link:d}}n.module("material.components.button",["material.core"]).directive("mdButton",o).directive("a",i),i.$inject=["$mdTheming"],o.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"]}(window,window.angular);
!function(n,t,e){"use strict";function i(n){return{restrict:"E",link:function(t,e){n(e)}}}function o(n,e,i,o){function u(n){return t.isDefined(n.href)||t.isDefined(n.ngHref)||t.isDefined(n.ngLink)||t.isDefined(n.uiSref)}function c(n,t){if(u(t))return'<a class="md-button" ng-transclude></a>';var e="undefined"==typeof t.type?"button":t.type;return'<button class="md-button" type="'+e+'" ng-transclude></button>'}function a(c,a,s){e(a),n.attach(c,a),i.expectWithoutText(a,"aria-label"),u(s)&&t.isDefined(s.ngDisabled)&&c.$watch(s.ngDisabled,function(n){a.attr("tabindex",n?-1:0)}),a.on("click",function(n){s.disabled===!0&&(n.preventDefault(),n.stopImmediatePropagation())}),a.hasClass("md-no-focus")||(c.mouseActive=!1,a.on("mousedown",function(){c.mouseActive=!0,o(function(){c.mouseActive=!1},100)}).on("focus",function(){c.mouseActive===!1&&a.addClass("md-focused")}).on("blur",function(n){a.removeClass("md-focused")}))}return{restrict:"EA",replace:!0,transclude:!0,template:c,link:a}}t.module("material.components.button",["material.core"]).directive("mdButton",o).directive("a",i),i.$inject=["$mdTheming"],o.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"]}(window,window.angular);
{
"name": "angular-material-card",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -34,3 +34,4 @@ (function( window, angular, undefined ){

*
* An image included as a direct descendant will fill the card's width, while the `<md-card-content>`
* An image included as a direct descendant will fill the card's width. If you want to avoid this,
* you can add the `md-image-no-fill` class to the parent element. The `<md-card-content>`
* container will wrap text content and provide padding. An `<md-card-footer>` element can be

@@ -37,0 +38,0 @@ * optionally included to put content flush against the bottom edge of the card.

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(n,i,t){"use strict";function e(n){return{restrict:"E",link:function(i,t,e){t.addClass("_md"),n(t)}}}i.module("material.components.card",["material.core"]).directive("mdCard",e),e.$inject=["$mdTheming"]}(window,window.angular);
{
"name": "angular-material-checkbox",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -44,4 +44,7 @@ (function( window, angular, undefined ){

* If falsy expression is passed in it just looks like a normal unchecked checkbox.
* The indeterminate, checked, and unchecked states are mutually exclusive. A box cannot be in any two states at the same time.
* When a checkbox is indeterminate that overrides any checked/unchecked rendering logic.
* The indeterminate, checked, and unchecked states are mutually exclusive. A box cannot be in any two states at the same time.
* Adding the 'md-indeterminate' attribute overrides any checked/unchecked rendering logic.
* When using the 'md-indeterminate' attribute use 'ng-checked' to define rendering logic instead of using 'ng-model'.
* @param {expression=} ng-checked If this expression evaluates as truthy, the 'md-checked' css class is added to the checkbox and it
* will appear checked.
*

@@ -67,3 +70,2 @@ * @usage

inputDirective = inputDirective[0];
var CHECKED_CSS = 'md-checked';

@@ -76,6 +78,6 @@ return {

template:
'<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="_md-icon"></div>' +
'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="md-icon"></div>' +
'</div>' +
'<div ng-transclude class="_md-label"></div>',
'<div ng-transclude class="md-label"></div>',
compile: compile

@@ -89,28 +91,31 @@ };

function compile (tElement, tAttrs) {
var container = tElement.children();
var mdIndeterminateStateEnabled = tAttrs.hasOwnProperty('mdIndeterminate');
tAttrs.$set('tabindex', tAttrs.tabindex || '0');
tAttrs.$set('type', 'checkbox');
tAttrs.$set('role', tAttrs.type);
tAttrs.type = 'checkbox';
tAttrs.tabindex = tAttrs.tabindex || '0';
tElement.attr('role', tAttrs.type);
return {
pre: function(scope, element) {
// Attach a click handler during preLink, in order to immediately stop propagation
// (especially for ng-click) when the checkbox is disabled.
element.on('click', function(e) {
if (this.hasAttribute('disabled')) {
e.stopImmediatePropagation();
}
});
},
post: postLink
};
// Attach a click handler in compile in order to immediately stop propagation
// (especially for ng-click) when the checkbox is disabled.
tElement.on('click', function(event) {
if (this.hasAttribute('disabled')) {
event.stopImmediatePropagation();
}
});
// Redirect focus events to the root element, because IE11 is always focusing the container element instead
// of the md-checkbox element. This causes issues when using ngModelOptions: `updateOnBlur`
container.on('focus', function() {
tElement.focus();
});
return function postLink(scope, element, attr, ngModelCtrl) {
function postLink(scope, element, attr, ngModelCtrl) {
var isIndeterminate;
ngModelCtrl = ngModelCtrl || $mdUtil.fakeNgModel();
$mdTheming(element);
if (mdIndeterminateStateEnabled) {
// Redirect focus events to the root element, because IE11 is always focusing the container element instead
// of the md-checkbox element. This causes issues when using ngModelOptions: `updateOnBlur`
element.children().on('focus', function() {
element.focus();
});
if ($mdUtil.parseAttributeBoolean(attr.mdIndeterminate)) {
setIndeterminateState();

@@ -122,4 +127,4 @@ scope.$watch(attr.mdIndeterminate, setIndeterminateState);

scope.$watch(
scope.$eval.bind(scope, attr.ngChecked),
ngModelCtrl.$setViewValue.bind(ngModelCtrl)
scope.$eval.bind(scope, attr.ngChecked),
ngModelCtrl.$setViewValue.bind(ngModelCtrl)
);

@@ -177,7 +182,3 @@ }

ev.preventDefault();
if (!element.hasClass('md-focused')) {
element.addClass('md-focused');
}
element.addClass('md-focused');
listener(ev);

@@ -188,3 +189,5 @@ }

function listener(ev) {
if (element[0].hasAttribute('disabled')) {
// skipToggle boolean is used by the switch directive to prevent the click event
// when releasing the drag. There will be always a click if releasing the drag over the checkbox
if (element[0].hasAttribute('disabled') || scope.skipToggle) {
return;

@@ -197,3 +200,3 @@ }

ngModelCtrl.$setViewValue( viewValue, ev && ev.type);
ngModelCtrl.$setViewValue(viewValue, ev && ev.type);
ngModelCtrl.$render();

@@ -204,7 +207,4 @@ });

function render() {
if(ngModelCtrl.$viewValue && !isIndeterminate) {
element.addClass(CHECKED_CSS);
} else {
element.removeClass(CHECKED_CSS);
}
// Cast the $viewValue to a boolean since it could be undefined
element.toggleClass('md-checked', !!ngModelCtrl.$viewValue && !isIndeterminate);
}

@@ -219,3 +219,3 @@

}
};
}
}

@@ -222,0 +222,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,n,t){"use strict";function i(e,t,i,c,d,a){function o(o,s){var u=o.children(),l=s.hasOwnProperty("mdIndeterminate");return s.type="checkbox",s.tabindex=s.tabindex||"0",o.attr("role",s.type),o.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()}),u.on("focus",function(){o.focus()}),function(o,s,u,m){function f(e,n,t){u[e]&&o.$watch(u[e],function(e){t[e]&&s.attr(n,t[e])})}function h(e){var n=e.which||e.keyCode;n!==i.KEY_CODE.SPACE&&n!==i.KEY_CODE.ENTER||(e.preventDefault(),s.hasClass("md-focused")||s.addClass("md-focused"),v(e))}function v(e){s[0].hasAttribute("disabled")||o.$apply(function(){var n=u.ngChecked?u.checked:!m.$viewValue;m.$setViewValue(n,e&&e.type),m.$render()})}function p(){m.$viewValue&&!k?s.addClass(r):s.removeClass(r)}function b(e){k=e!==!1,k&&s.attr("aria-checked","mixed"),s.toggleClass("md-indeterminate",k)}var k;m=m||d.fakeNgModel(),c(s),l&&(b(),o.$watch(u.mdIndeterminate,b)),u.ngChecked&&o.$watch(o.$eval.bind(o,u.ngChecked),m.$setViewValue.bind(m)),f("ngDisabled","tabindex",{"true":"-1","false":u.tabindex}),t.expectWithText(s,"aria-label"),e.link.pre(o,{on:n.noop,0:{}},u,[m]),o.mouseActive=!1,s.on("click",v).on("keypress",h).on("mousedown",function(){o.mouseActive=!0,a(function(){o.mouseActive=!1},100)}).on("focus",function(){o.mouseActive===!1&&s.addClass("md-focused")}).on("blur",function(){s.removeClass("md-focused")}),m.$render=p}}e=e[0];var r="md-checked";return{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox><div class="_md-icon"></div></div><div ng-transclude class="_md-label"></div>',compile:o}}n.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",i),i.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"]}(window,window.angular);
!function(e,t,n){"use strict";function i(e,n,i,o,c,d){function a(a,s){function r(a,s,r,u){function l(e,t,n){r[e]&&a.$watch(r[e],function(e){n[e]&&s.attr(t,n[e])})}function m(e){var t=e.which||e.keyCode;t!==i.KEY_CODE.SPACE&&t!==i.KEY_CODE.ENTER||(e.preventDefault(),s.addClass("md-focused"),f(e))}function f(e){s[0].hasAttribute("disabled")||a.skipToggle||a.$apply(function(){var t=r.ngChecked?r.checked:!u.$viewValue;u.$setViewValue(t,e&&e.type),u.$render()})}function p(){s.toggleClass("md-checked",!!u.$viewValue&&!v)}function h(e){v=e!==!1,v&&s.attr("aria-checked","mixed"),s.toggleClass("md-indeterminate",v)}var v;u=u||c.fakeNgModel(),o(s),s.children().on("focus",function(){s.focus()}),c.parseAttributeBoolean(r.mdIndeterminate)&&(h(),a.$watch(r.mdIndeterminate,h)),r.ngChecked&&a.$watch(a.$eval.bind(a,r.ngChecked),u.$setViewValue.bind(u)),l("ngDisabled","tabindex",{"true":"-1","false":r.tabindex}),n.expectWithText(s,"aria-label"),e.link.pre(a,{on:t.noop,0:{}},r,[u]),a.mouseActive=!1,s.on("click",f).on("keypress",m).on("mousedown",function(){a.mouseActive=!0,d(function(){a.mouseActive=!1},100)}).on("focus",function(){a.mouseActive===!1&&s.addClass("md-focused")}).on("blur",function(){s.removeClass("md-focused")}),u.$render=p}return s.$set("tabindex",s.tabindex||"0"),s.$set("type","checkbox"),s.$set("role",s.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:r}}return e=e[0],{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:a}}t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",i),i.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"]}(window,window.angular);
{
"name": "angular-material-chips",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-autocomplete": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-autocomplete": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -101,3 +101,3 @@ (function( window, angular, undefined ){

MdChipCtrl.prototype.getChipContent = function() {
var chipContents = this.$element[0].getElementsByClassName('_md-chip-content');
var chipContents = this.$element[0].getElementsByClassName('md-chip-content');
return angular.element(chipContents[0]);

@@ -242,3 +242,3 @@ };

var DELETE_HINT_TEMPLATE = '\
<span ng-if="!$mdChipsCtrl.readonly" class="_md-visually-hidden">\
<span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden">\
{{$mdChipsCtrl.deleteHint}}\

@@ -278,3 +278,3 @@ </span>';

.element(element[0]
.querySelector('._md-chip-content'))
.querySelector('.md-chip-content'))
.on('blur', function () {

@@ -297,12 +297,19 @@ chipsController.resetSelectedChip();

* @name mdChipRemove
* @restrict A
* @module material.components.chips
*
* @description
* `<md-chip-remove>`
* Designates an element to be used as the delete button for a chip. This
* element is passed as a child of the `md-chips` element.
* Designates an element to be used as the delete button for a chip. <br/>
* This element is passed as a child of the `md-chips` element.
*
* The designated button will be just appended to the chip and removes the given chip on click.<br/>
* By default the button is not being styled by the `md-chips` component.
*
* @usage
* <hljs lang="html">
* <md-chips><button md-chip-remove>DEL</button></md-chips>
* <md-chips>
* <button md-chip-remove="">
* <md-icon md-svg-icon="md-close"></md-icon>
* </button>
* </md-chips>
* </hljs>

@@ -315,3 +322,2 @@ */

*
* @param $compile
* @param $timeout

@@ -448,12 +454,2 @@ * @returns {{restrict: string, require: string[], link: Function, scope: boolean}}

/**
* Whether to use the onAppend expression to transform the chip buffer
* before appending it to the list.
* @type {boolean}
*
*
* @deprecated Will remove in 1.0.
*/
this.useOnAppend = false;
/**
* Whether to use the transformChip expression to transform the chip buffer

@@ -482,3 +478,2 @@ * before appending it to the list.

*/
this.useOnSelect = false;
}

@@ -502,6 +497,15 @@ MdChipsCtrl.$inject = ["$scope", "$mdConstant", "$log", "$element", "$timeout", "$mdUtil"];

if (event.keyCode === this.$mdConstant.KEY_CODE.BACKSPACE) {
if (chipBuffer) return;
// Only select and focus the previous chip, if the current caret position of the
// input element is at the beginning.
if (this.getCursorPosition(event.target) !== 0) {
return;
}
event.preventDefault();
event.stopPropagation();
if (this.items.length) this.selectAndFocusChipSafe(this.items.length - 1);
if (this.items.length) {
this.selectAndFocusChipSafe(this.items.length - 1);
}
return;

@@ -528,3 +532,25 @@ }

/**
* Returns the cursor position of the specified input element.
* @param element HTMLInputElement
* @returns {Number} Cursor Position of the input.
*/
MdChipsCtrl.prototype.getCursorPosition = function(element) {
/*
* Figure out whether the current input for the chips buffer is valid for using
* the selectionStart / end property to retrieve the cursor position.
* Some browsers do not allow the use of those attributes, on different input types.
*/
try {
if (element.selectionStart === element.selectionEnd) {
return element.selectionStart;
}
} catch (e) {
if (!element.value) {
return 0;
}
}
};
/**

@@ -547,3 +573,3 @@ * Updates the content of the chip at given index

*/
MdChipsCtrl.prototype.isEditingChip = function(){
MdChipsCtrl.prototype.isEditingChip = function() {
return !!this.$element[0].getElementsByClassName('_md-chip-editing').length;

@@ -553,2 +579,12 @@ };

MdChipsCtrl.prototype.isRemovable = function() {
// Return false if we have static chips
if (!this.ngModelCtrl) {
return false;
}
return this.readonly ? this.removable :
angular.isDefined(this.removable) ? this.removable : true;
};
/**

@@ -568,2 +604,4 @@ * Handles the keydown event on the chip elements: backspace removes the selected chip, arrow

event.preventDefault();
// Cancel the delete action only after the event cancel. Otherwise the page will go back.
if (!this.isRemovable()) return;
this.removeAndSelectAdjacentChip(this.selectedChip);

@@ -677,21 +715,2 @@ break;

/**
* Sets whether to use the md-on-append expression. This expression is
* bound to scope and controller in {@code MdChipsDirective} as
* {@code onAppend}. Due to the nature of directive scope bindings, the
* controller cannot know on its own/from the scope whether an expression was
* actually provided.
*
* @deprecated
*
* TODO: Remove deprecated md-on-append functionality in 1.0
*/
MdChipsCtrl.prototype.useOnAppendExpression = function() {
this.$log.warn("md-on-append is deprecated; please use md-transform-chip or md-on-add instead");
if (!this.useTransformChip || !this.transformChip) {
this.useTransformChip = true;
this.transformChip = this.onAppend;
}
};
/**
* Sets whether to use the md-transform-chip expression. This expression is

@@ -852,3 +871,3 @@ * bound to scope and controller in {@code MdChipsDirective} as

MdChipsCtrl.prototype.focusChip = function(index) {
this.$element[0].querySelector('md-chip[index="' + index + '"] ._md-chip-content').focus();
this.$element[0].querySelector('md-chip[index="' + index + '"] .md-chip-content').focus();
};

@@ -998,7 +1017,28 @@

*
* <span style="font-size:.8em;text-align:center">
* Warning: This component is a WORK IN PROGRESS. If you use it now,
* it will probably break on you in the future.
* </span>
* <span style="font-size:.8em;text-align:center">
* Warning: This component is a WORK IN PROGRESS. If you use it now,
* it will probably break on you in the future.
* </span>
*
* Sometimes developers want to limit the amount of possible chips.<br/>
* You can specify the maximum amount of chips by using the following markup.
*
* <hljs lang="html">
* <md-chips
* ng-model="myItems"
* placeholder="Add an item"
* md-max-chips="5">
* </md-chips>
* </hljs>
*
* In some cases, you have an autocomplete inside of the `md-chips`.<br/>
* When the maximum amount of chips has been reached, you can also disable the autocomplete selection.<br/>
* Here is an example markup.
*
* <hljs lang="html">
* <md-chips ng-model="myItems" md-max-chips="5">
* <md-autocomplete ng-hide="myItems.length > 5" ...></md-autocomplete>
* </md-chips>
* </hljs>
*
* @param {string=|object=} ng-model A model to bind the list of items to

@@ -1008,5 +1048,8 @@ * @param {string=} placeholder Placeholder text that will be forwarded to the input.

* displayed when there is at least one item in the list
* @param {boolean=} md-removable Enables or disables the deletion of chips through the
* removal icon or the Delete/Backspace key. Defaults to true.
* @param {boolean=} readonly Disables list manipulation (deleting or adding list items), hiding
* the input and delete buttons. If no `ng-model` is provided, the chips will automatically be
* marked as readonly.
* marked as readonly.<br/><br/>
* When `md-removable` is not defined, the `md-remove` behavior will be overwritten and disabled.
* @param {string=} md-enable-chip-edit Set this to "true" to enable editing of chip contents. The user can

@@ -1068,3 +1111,5 @@ * go into edit mode with pressing "space", "enter", or double clicking on the chip. Chip edit is only

ng-keydown="$mdChipsCtrl.chipKeydown($event)"\
ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"\
ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \
\'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly,\
\'md-removable\': $mdChipsCtrl.isRemovable() }"\
class="md-chips">\

@@ -1074,3 +1119,3 @@ <md-chip ng-repeat="$chip in $mdChipsCtrl.items"\

ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}">\
<div class="_md-chip-content"\
<div class="md-chip-content"\
tabindex="-1"\

@@ -1081,9 +1126,8 @@ aria-hidden="true"\

md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div>\
<div ng-if="!$mdChipsCtrl.readonly"\
class="_md-chip-remove-container"\
<div ng-if="$mdChipsCtrl.isRemovable()"\
class="md-chip-remove-container"\
md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div>\
</md-chip>\
<div class="_md-chip-input-container">\
<div ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"\
md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div>\
<div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl">\
<div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div>\
</div>\

@@ -1101,3 +1145,2 @@ </md-chips-wrap>';

ng-blur="$mdChipsCtrl.onInputBlur()"\
ng-trim="false"\
ng-keydown="$mdChipsCtrl.inputKeydown($event)">';

@@ -1110,4 +1153,4 @@

<button\
class="_md-chip-remove"\
ng-if="!$mdChipsCtrl.readonly"\
class="md-chip-remove"\
ng-if="$mdChipsCtrl.isRemovable()"\
ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)"\

@@ -1117,4 +1160,4 @@ type="button"\

tabindex="-1">\
<md-icon md-svg-icon="md-close"></md-icon>\
<span class="_md-visually-hidden">\
<md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon>\
<span class="md-visually-hidden">\
{{$mdChipsCtrl.deleteButtonLabel}}\

@@ -1127,3 +1170,3 @@ </span>\

*/
function MdChips ($mdTheming, $mdUtil, $compile, $log, $timeout) {
function MdChips ($mdTheming, $mdUtil, $compile, $log, $timeout, $$mdSvgRegistry) {
// Run our templates through $mdUtil.processTemplate() to allow custom start/end symbols

@@ -1149,2 +1192,3 @@ var templates = getTemplates();

readonly: '=readonly',
removable: '=mdRemovable',
placeholder: '@',

@@ -1201,5 +1245,13 @@ mdEnableChipEdit: '@',

var chipRemoveSelector = $mdUtil
.prefixer()
.buildList('md-chip-remove')
.map(function(attr) {
return 'md-chips>*[' + attr + ']';
})
.join(',');
// Set the chip remove, chip contents and chip input templates. The link function will put
// them on the scope for transclusion later.
var chipRemoveTemplate = getTemplateByQuery('md-chips>*[md-chip-remove]') || templates.remove,
var chipRemoveTemplate = getTemplateByQuery(chipRemoveSelector) || templates.remove,
chipContentsTemplate = chipTemplate || templates.default,

@@ -1239,2 +1291,4 @@ chipInputTemplate = getTemplateByQuery('md-chips>md-autocomplete')

mdChipsCtrl.mdCloseIcon = $$mdSvgRegistry.mdClose;
element

@@ -1315,3 +1369,3 @@ .attr({ 'aria-hidden': true, tabindex: -1 })

}
MdChips.$inject = ["$mdTheming", "$mdUtil", "$compile", "$log", "$timeout"];
MdChips.$inject = ["$mdTheming", "$mdUtil", "$compile", "$log", "$timeout", "$$mdSvgRegistry"];

@@ -1318,0 +1372,0 @@ angular

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,i){"use strict";function n(t,e,n,s,o){this.$scope=t,this.$element=e,this.$mdConstant=n,this.$timeout=s,this.$mdUtil=o,this.isEditting=!1,this.parentController=i,this.enableChipEdit=!1}function s(t,i){function n(n,o){return n.append(i.processTemplate(s)),function(i,n,s,o){var r=o.shift(),h=o.shift();t(n),r&&(h.init(r),e.element(n[0].querySelector("._md-chip-content")).on("blur",function(){r.resetSelectedChip(),r.$scope.$applyAsync()}))}}var s=i.processTemplate(l);return{restrict:"E",require:["^?mdChips","mdChip"],compile:n,controller:"MdChipCtrl"}}function o(t){function e(e,i,n,s){i.on("click",function(t){e.$apply(function(){s.removeChip(e.$$replacedScope.$index)})}),t(function(){i.attr({tabindex:-1,"aria-hidden":!0}),i.find("button").attr("tabindex","-1")})}return{restrict:"A",require:"^mdChips",scope:!1,link:e}}function r(t){function e(e,i,n){var s=e.$parent.$mdChipsCtrl,o=s.parent.$new(!1,s.parent);o.$$replacedScope=e,o.$chip=e.$chip,o.$index=e.$index,o.$mdChipsCtrl=s;var r=s.$scope.$eval(n.mdChipTransclude);i.html(r),t(i.contents())(o)}return{restrict:"EA",terminal:!0,link:e,scope:!1}}function h(t,e,i,n,s,o){this.$timeout=s,this.$mdConstant=e,this.$scope=t,this.parent=t.$parent,this.$log=i,this.$element=n,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.hasAutocomplete=!1,this.enableChipEdit=o.parseAttributeBoolean(this.mdEnableChipEdit),this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useOnAppend=!1,this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1,this.useOnSelect=!1}function p(t,e,i,n,s){function o(o,r){function p(t){if(r.ngModel){var e=c[0].querySelector(t);return e&&e.outerHTML}}var c=r.$mdUserTemplate;r.$mdUserTemplate=null;var d=p("md-chips>md-chip-template"),l=p("md-chips>*[md-chip-remove]")||h.remove,a=d||h["default"],m=p("md-chips>md-autocomplete")||p("md-chips>input")||h.input,u=c.find("md-chip");return c[0].querySelector("md-chip-template>*[md-chip-remove]")&&n.warn("invalid placement of md-chip-remove within md-chip-template."),function(n,o,p,c){e.initOptionalProperties(n,r),t(o);var C=c[0];if(d&&(C.enableChipEdit=!1),C.chipContentsTemplate=a,C.chipRemoveTemplate=l,C.chipInputTemplate=m,o.attr({"aria-hidden":!0,tabindex:-1}).on("focus",function(){C.onFocus()}),r.ngModel&&(C.configureNgModel(o.controller("ngModel")),p.mdTransformChip&&C.useTransformChipExpression(),p.mdOnAppend&&C.useOnAppendExpression(),p.mdOnAdd&&C.useOnAddExpression(),p.mdOnRemove&&C.useOnRemoveExpression(),p.mdOnSelect&&C.useOnSelectExpression(),m!=h.input&&n.$watch("$mdChipsCtrl.readonly",function(t){t||e.nextTick(function(){0===m.indexOf("<md-autocomplete")&&C.configureAutocomplete(o.find("md-autocomplete").controller("mdAutocomplete")),C.configureUserInput(o.find("input"))})}),e.nextTick(function(){var t=o.find("input");t&&t.toggleClass("md-input",!0)})),u.length>0){var f=i(u.clone())(n.$parent);s(function(){o.find("md-chips-wrap").prepend(f)})}}}function r(){return{chips:e.processTemplate(a),input:e.processTemplate(m),"default":e.processTemplate(u),remove:e.processTemplate(C)}}var h=r();return{template:function(t,e){return e.$mdUserTemplate=t.clone(),h.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:o,scope:{readonly:"=readonly",placeholder:"@",mdEnableChipEdit:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch"}}}function c(){this.selectedItem=null,this.searchText=""}function d(t,e){function i(i,n){return function(i,s,o,r){e.initOptionalProperties(i,n),t(s),s.attr("tabindex","-1")}}return{template:function(t,e){return f},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:i,scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",highlightFlags:"@?mdHighlightFlags"}}}e.module("material.components.chips",["material.core","material.components.autocomplete"]),e.module("material.components.chips").controller("MdChipCtrl",n),n.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],n.prototype.init=function(t){this.parentController=t,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},n.prototype.getChipContent=function(){var t=this.$element[0].getElementsByClassName("_md-chip-content");return e.element(t[0])},n.prototype.getContentElement=function(){return e.element(this.getChipContent().children()[0])},n.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},n.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var t=this.getChipIndex(),e=this.getContentElement().text();e?(this.parentController.updateChipContents(t,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===t&&this.parentController.focusChip(t)}.bind(this))):this.parentController.removeChipAndFocusInput(t)}},n.prototype.selectNodeContents=function(e){var i,n;document.body.createTextRange?(i=document.body.createTextRange(),i.moveToElementText(e),i.select()):t.getSelection&&(n=t.getSelection(),i=document.createRange(),i.selectNodeContents(e),n.removeAllRanges(),n.addRange(i))},n.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},n.prototype.chipKeyDown=function(t){this.isEditting||t.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&t.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&t.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(t.preventDefault(),this.goOutOfEditMode()):(t.preventDefault(),this.goInEditMode())},n.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()},e.module("material.components.chips").directive("mdChip",s);var l=' <span ng-if="!$mdChipsCtrl.readonly" class="_md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>';s.$inject=["$mdTheming","$mdUtil"],e.module("material.components.chips").directive("mdChipRemove",o),o.$inject=["$timeout"],e.module("material.components.chips").directive("mdChipTransclude",r),r.$inject=["$compile"],e.module("material.components.chips").controller("MdChipsCtrl",h),h.$inject=["$scope","$mdConstant","$log","$element","$timeout","$mdUtil"],h.prototype.inputKeydown=function(t){var e=this.getChipBuffer();if(!(this.hasAutocomplete&&t.isDefaultPrevented&&t.isDefaultPrevented())){if(t.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(e)return;return t.preventDefault(),t.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),-1!==this.separatorKeys.indexOf(t.keyCode)){if(this.hasAutocomplete&&this.requireMatch||!e)return;if(t.preventDefault(),this.hasMaxChipsReached())return;this.appendChip(e.trim()),this.resetChipBuffer()}}},h.prototype.updateChipContents=function(t,e){t>=0&&t<this.items.length&&(this.items[t]=e,this.ngModelCtrl.$setDirty())},h.prototype.isEditingChip=function(){return!!this.$element[0].getElementsByClassName("_md-chip-editing").length},h.prototype.chipKeydown=function(t){if(!this.getChipBuffer()&&!this.isEditingChip())switch(t.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;t.preventDefault(),this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:t.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:t.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;t.preventDefault(),this.onFocus()}},h.prototype.getPlaceholder=function(){var t=this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder);return t?this.secondaryPlaceholder:this.placeholder},h.prototype.removeAndSelectAdjacentChip=function(t){var i=this.getAdjacentChipIndex(t);this.removeChip(t),this.$timeout(e.bind(this,function(){this.selectAndFocusChipSafe(i)}))},h.prototype.resetSelectedChip=function(){this.selectedChip=-1},h.prototype.getAdjacentChipIndex=function(t){var e=this.items.length-1;return 0==e?-1:t==e?t-1:t},h.prototype.appendChip=function(t){if(this.useTransformChip&&this.transformChip){var i=this.transformChip({$chip:t});e.isDefined(i)&&(t=i)}if(e.isObject(t)){var n=this.items.some(function(i){return e.equals(t,i)});if(n)return}if(!(null==t||this.items.indexOf(t)+1)){var s=this.items.push(t);this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:s})}},h.prototype.useOnAppendExpression=function(){this.$log.warn("md-on-append is deprecated; please use md-transform-chip or md-on-add instead"),this.useTransformChip&&this.transformChip||(this.useTransformChip=!0,this.transformChip=this.onAppend)},h.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},h.prototype.useOnAddExpression=function(){this.useOnAdd=!0},h.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},h.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},h.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},h.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},h.prototype.hasMaxChipsReached=function(){return e.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),this.maxChips>0&&this.items.length>=this.maxChips},h.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached())},h.prototype.removeChip=function(t){var e=this.items.splice(t,1);this.ngModelCtrl.$setDirty(),this.validateModel(),e&&e.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:e[0],$index:t})},h.prototype.removeChipAndFocusInput=function(t){this.removeChip(t),this.onFocus()},h.prototype.selectAndFocusChipSafe=function(t){return this.items.length?t===this.items.length?this.onFocus():(t=Math.max(t,0),t=Math.min(t,this.items.length-1),this.selectChip(t),void this.focusChip(t)):(this.selectChip(-1),void this.onFocus())},h.prototype.selectChip=function(t){t>=-1&&t<=this.items.length?(this.selectedChip=t,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[this.selectedChip]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},h.prototype.selectAndFocusChip=function(t){this.selectChip(t),-1!=t&&this.focusChip(t)},h.prototype.focusChip=function(t){this.$element[0].querySelector('md-chip[index="'+t+'"] ._md-chip-content').focus()},h.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){e.items=e.ngModelCtrl.$viewValue}},h.prototype.onFocus=function(){var t=this.$element[0].querySelector("input");t&&t.focus(),this.resetSelectedChip()},h.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},h.prototype.onInputBlur=function(){this.inputHasFocus=!1},h.prototype.configureUserInput=function(t){this.userInputElement=t;var i=t.controller("ngModel");i!=this.ngModelCtrl&&(this.userInputNgModelCtrl=i);var n=this.$scope,s=this,o=function(t,i){n.$evalAsync(e.bind(s,i,t))};t.attr({tabindex:0}).on("keydown",function(t){o(t,s.inputKeydown)}).on("focus",function(t){o(t,s.onInputFocus)}).on("blur",function(t){o(t,s.onInputBlur)})},h.prototype.configureAutocomplete=function(t){t&&(this.hasAutocomplete=!0,t.registerSelectedItemWatcher(e.bind(this,function(t){if(t){if(this.hasMaxChipsReached())return;this.appendChip(t),this.resetChipBuffer()}})),this.$element.find("input").on("focus",e.bind(this,this.onInputFocus)).on("blur",e.bind(this,this.onInputBlur)))},h.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0},e.module("material.components.chips").directive("mdChips",p);var a=' <md-chips-wrap ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="_md-chip-content" tabindex="-1" aria-hidden="true" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="!$mdChipsCtrl.readonly" class="_md-chip-remove-container" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="_md-chip-input-container"> <div ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl" md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',m=' <input class="md-input" tabindex="0" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" aria-label="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-trim="false" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',u=" <span>{{$chip}}</span>",C=' <button class="_md-chip-remove" ng-if="!$mdChipsCtrl.readonly" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" aria-hidden="true" tabindex="-1"> <md-icon md-svg-icon="md-close"></md-icon> <span class="_md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>';p.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout"],e.module("material.components.chips").controller("MdContactChipsCtrl",c),c.prototype.queryContact=function(t){var i=this.contactQuery({$query:t});return this.filterSelected?i.filter(e.bind(this,this.filterSelectedContacts)):i},c.prototype.itemName=function(t){return t[this.contactName]},c.prototype.filterSelectedContacts=function(t){return-1==this.contacts.indexOf(t)},e.module("material.components.chips").directive("mdContactChips",d);var f=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';d.$inject=["$mdTheming","$mdUtil"]}(window,window.angular);
!function(t,e,i){"use strict";function n(t,e,n,s,o){this.$scope=t,this.$element=e,this.$mdConstant=n,this.$timeout=s,this.$mdUtil=o,this.isEditting=!1,this.parentController=i,this.enableChipEdit=!1}function s(t,i){function n(n,o){return n.append(i.processTemplate(s)),function(i,n,s,o){var r=o.shift(),h=o.shift();t(n),r&&(h.init(r),e.element(n[0].querySelector(".md-chip-content")).on("blur",function(){r.resetSelectedChip(),r.$scope.$applyAsync()}))}}var s=i.processTemplate(d);return{restrict:"E",require:["^?mdChips","mdChip"],compile:n,controller:"MdChipCtrl"}}function o(t){function e(e,i,n,s){i.on("click",function(t){e.$apply(function(){s.removeChip(e.$$replacedScope.$index)})}),t(function(){i.attr({tabindex:-1,"aria-hidden":!0}),i.find("button").attr("tabindex","-1")})}return{restrict:"A",require:"^mdChips",scope:!1,link:e}}function r(t){function e(e,i,n){var s=e.$parent.$mdChipsCtrl,o=s.parent.$new(!1,s.parent);o.$$replacedScope=e,o.$chip=e.$chip,o.$index=e.$index,o.$mdChipsCtrl=s;var r=s.$scope.$eval(n.mdChipTransclude);i.html(r),t(i.contents())(o)}return{restrict:"EA",terminal:!0,link:e,scope:!1}}function h(t,e,i,n,s,o){this.$timeout=s,this.$mdConstant=e,this.$scope=t,this.parent=t.$parent,this.$log=i,this.$element=n,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.hasAutocomplete=!1,this.enableChipEdit=o.parseAttributeBoolean(this.mdEnableChipEdit),this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1}function p(t,e,i,n,s,o){function r(r,h){function c(t){if(h.ngModel){var e=l[0].querySelector(t);return e&&e.outerHTML}}var l=h.$mdUserTemplate;h.$mdUserTemplate=null;var d=c("md-chips>md-chip-template"),a=e.prefixer().buildList("md-chip-remove").map(function(t){return"md-chips>*["+t+"]"}).join(","),m=c(a)||p.remove,u=d||p["default"],C=c("md-chips>md-autocomplete")||c("md-chips>input")||p.input,f=l.find("md-chip");return l[0].querySelector("md-chip-template>*[md-chip-remove]")&&n.warn("invalid placement of md-chip-remove within md-chip-template."),function(n,r,c,l){e.initOptionalProperties(n,h),t(r);var a=l[0];if(d&&(a.enableChipEdit=!1),a.chipContentsTemplate=u,a.chipRemoveTemplate=m,a.chipInputTemplate=C,a.mdCloseIcon=o.mdClose,r.attr({"aria-hidden":!0,tabindex:-1}).on("focus",function(){a.onFocus()}),h.ngModel&&(a.configureNgModel(r.controller("ngModel")),c.mdTransformChip&&a.useTransformChipExpression(),c.mdOnAppend&&a.useOnAppendExpression(),c.mdOnAdd&&a.useOnAddExpression(),c.mdOnRemove&&a.useOnRemoveExpression(),c.mdOnSelect&&a.useOnSelectExpression(),C!=p.input&&n.$watch("$mdChipsCtrl.readonly",function(t){t||e.nextTick(function(){0===C.indexOf("<md-autocomplete")&&a.configureAutocomplete(r.find("md-autocomplete").controller("mdAutocomplete")),a.configureUserInput(r.find("input"))})}),e.nextTick(function(){var t=r.find("input");t&&t.toggleClass("md-input",!0)})),f.length>0){var $=i(f.clone())(n.$parent);s(function(){r.find("md-chips-wrap").prepend($)})}}}function h(){return{chips:e.processTemplate(a),input:e.processTemplate(m),"default":e.processTemplate(u),remove:e.processTemplate(C)}}var p=h();return{template:function(t,e){return e.$mdUserTemplate=t.clone(),p.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:r,scope:{readonly:"=readonly",removable:"=mdRemovable",placeholder:"@",mdEnableChipEdit:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch"}}}function c(){this.selectedItem=null,this.searchText=""}function l(t,e){function i(i,n){return function(i,s,o,r){e.initOptionalProperties(i,n),t(s),s.attr("tabindex","-1")}}return{template:function(t,e){return f},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:i,scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",highlightFlags:"@?mdHighlightFlags"}}}e.module("material.components.chips",["material.core","material.components.autocomplete"]),e.module("material.components.chips").controller("MdChipCtrl",n),n.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],n.prototype.init=function(t){this.parentController=t,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},n.prototype.getChipContent=function(){var t=this.$element[0].getElementsByClassName("md-chip-content");return e.element(t[0])},n.prototype.getContentElement=function(){return e.element(this.getChipContent().children()[0])},n.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},n.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var t=this.getChipIndex(),e=this.getContentElement().text();e?(this.parentController.updateChipContents(t,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===t&&this.parentController.focusChip(t)}.bind(this))):this.parentController.removeChipAndFocusInput(t)}},n.prototype.selectNodeContents=function(e){var i,n;document.body.createTextRange?(i=document.body.createTextRange(),i.moveToElementText(e),i.select()):t.getSelection&&(n=t.getSelection(),i=document.createRange(),i.selectNodeContents(e),n.removeAllRanges(),n.addRange(i))},n.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},n.prototype.chipKeyDown=function(t){this.isEditting||t.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&t.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&t.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(t.preventDefault(),this.goOutOfEditMode()):(t.preventDefault(),this.goInEditMode())},n.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()},e.module("material.components.chips").directive("mdChip",s);var d=' <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>';s.$inject=["$mdTheming","$mdUtil"],e.module("material.components.chips").directive("mdChipRemove",o),o.$inject=["$timeout"],e.module("material.components.chips").directive("mdChipTransclude",r),r.$inject=["$compile"],e.module("material.components.chips").controller("MdChipsCtrl",h),h.$inject=["$scope","$mdConstant","$log","$element","$timeout","$mdUtil"],h.prototype.inputKeydown=function(t){var e=this.getChipBuffer();if(!(this.hasAutocomplete&&t.isDefaultPrevented&&t.isDefaultPrevented())){if(t.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(0!==this.getCursorPosition(t.target))return;return t.preventDefault(),t.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),this.separatorKeys.indexOf(t.keyCode)!==-1){if(this.hasAutocomplete&&this.requireMatch||!e)return;if(t.preventDefault(),this.hasMaxChipsReached())return;this.appendChip(e.trim()),this.resetChipBuffer()}}},h.prototype.getCursorPosition=function(t){try{if(t.selectionStart===t.selectionEnd)return t.selectionStart}catch(e){if(!t.value)return 0}},h.prototype.updateChipContents=function(t,e){t>=0&&t<this.items.length&&(this.items[t]=e,this.ngModelCtrl.$setDirty())},h.prototype.isEditingChip=function(){return!!this.$element[0].getElementsByClassName("_md-chip-editing").length},h.prototype.isRemovable=function(){return!!this.ngModelCtrl&&(this.readonly?this.removable:!e.isDefined(this.removable)||this.removable)},h.prototype.chipKeydown=function(t){if(!this.getChipBuffer()&&!this.isEditingChip())switch(t.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;if(t.preventDefault(),!this.isRemovable())return;this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:t.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:t.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;t.preventDefault(),this.onFocus()}},h.prototype.getPlaceholder=function(){var t=this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder);return t?this.secondaryPlaceholder:this.placeholder},h.prototype.removeAndSelectAdjacentChip=function(t){var i=this.getAdjacentChipIndex(t);this.removeChip(t),this.$timeout(e.bind(this,function(){this.selectAndFocusChipSafe(i)}))},h.prototype.resetSelectedChip=function(){this.selectedChip=-1},h.prototype.getAdjacentChipIndex=function(t){var e=this.items.length-1;return 0==e?-1:t==e?t-1:t},h.prototype.appendChip=function(t){if(this.useTransformChip&&this.transformChip){var i=this.transformChip({$chip:t});e.isDefined(i)&&(t=i)}if(e.isObject(t)){var n=this.items.some(function(i){return e.equals(t,i)});if(n)return}if(!(null==t||this.items.indexOf(t)+1)){var s=this.items.push(t);this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:s})}},h.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},h.prototype.useOnAddExpression=function(){this.useOnAdd=!0},h.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},h.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},h.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},h.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},h.prototype.hasMaxChipsReached=function(){return e.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),this.maxChips>0&&this.items.length>=this.maxChips},h.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached())},h.prototype.removeChip=function(t){var e=this.items.splice(t,1);this.ngModelCtrl.$setDirty(),this.validateModel(),e&&e.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:e[0],$index:t})},h.prototype.removeChipAndFocusInput=function(t){this.removeChip(t),this.onFocus()},h.prototype.selectAndFocusChipSafe=function(t){return this.items.length?t===this.items.length?this.onFocus():(t=Math.max(t,0),t=Math.min(t,this.items.length-1),this.selectChip(t),void this.focusChip(t)):(this.selectChip(-1),void this.onFocus())},h.prototype.selectChip=function(t){t>=-1&&t<=this.items.length?(this.selectedChip=t,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[this.selectedChip]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},h.prototype.selectAndFocusChip=function(t){this.selectChip(t),t!=-1&&this.focusChip(t)},h.prototype.focusChip=function(t){this.$element[0].querySelector('md-chip[index="'+t+'"] .md-chip-content').focus()},h.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){e.items=e.ngModelCtrl.$viewValue}},h.prototype.onFocus=function(){var t=this.$element[0].querySelector("input");t&&t.focus(),this.resetSelectedChip()},h.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},h.prototype.onInputBlur=function(){this.inputHasFocus=!1},h.prototype.configureUserInput=function(t){this.userInputElement=t;var i=t.controller("ngModel");i!=this.ngModelCtrl&&(this.userInputNgModelCtrl=i);var n=this.$scope,s=this,o=function(t,i){n.$evalAsync(e.bind(s,i,t))};t.attr({tabindex:0}).on("keydown",function(t){o(t,s.inputKeydown)}).on("focus",function(t){o(t,s.onInputFocus)}).on("blur",function(t){o(t,s.onInputBlur)})},h.prototype.configureAutocomplete=function(t){t&&(this.hasAutocomplete=!0,t.registerSelectedItemWatcher(e.bind(this,function(t){if(t){if(this.hasMaxChipsReached())return;this.appendChip(t),this.resetChipBuffer()}})),this.$element.find("input").on("focus",e.bind(this,this.onInputFocus)).on("blur",e.bind(this,this.onInputBlur)))},h.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0},e.module("material.components.chips").directive("mdChips",p);var a=' <md-chips-wrap ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly, \'md-removable\': $mdChipsCtrl.isRemovable() }" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="md-chip-content" tabindex="-1" aria-hidden="true" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="$mdChipsCtrl.isRemovable()" class="md-chip-remove-container" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"> <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',m=' <input class="md-input" tabindex="0" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" aria-label="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',u=" <span>{{$chip}}</span>",C=' <button class="md-chip-remove" ng-if="$mdChipsCtrl.isRemovable()" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" aria-hidden="true" tabindex="-1"> <md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon> <span class="md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>';p.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],e.module("material.components.chips").controller("MdContactChipsCtrl",c),c.prototype.queryContact=function(t){var i=this.contactQuery({$query:t});return this.filterSelected?i.filter(e.bind(this,this.filterSelectedContacts)):i},c.prototype.itemName=function(t){return t[this.contactName]},c.prototype.filterSelectedContacts=function(t){return this.contacts.indexOf(t)==-1},e.module("material.components.chips").directive("mdContactChips",l);var f=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';l.$inject=["$mdTheming","$mdUtil"]}(window,window.angular);
{
"name": "angular-material-colors",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -71,3 +71,3 @@ (function( window, angular, undefined ){

* @description
* Convert the color expression into an object with scope-interpolated values
* Gets a color json object, keys are css properties and values are string of the wanted color
* Then calculate the rgba() values based on the theme color parts

@@ -85,3 +85,3 @@ *

* link: function (scope, elem) {
* $mdColors.applyThemeColors(elem, scope, {color: 'red'});
* $mdColors.applyThemeColors(elem, {color: 'red'});
* }

@@ -94,4 +94,6 @@ * }

try {
// Assign the calculate RGBA color values directly as inline CSS
element.css(interpolateColors(colorExpression));
if (colorExpression) {
// Assign the calculate RGBA color values directly as inline CSS
element.css(interpolateColors(colorExpression));
}
} catch (e) {

@@ -140,3 +142,3 @@ $log.error(e.message);

return $mdUtil.supplant('rgba( {0}, {1}, {2}, {3} )',
return $mdUtil.supplant('rgba({0}, {1}, {2}, {3})',
[rgbValues[0], rgbValues[1], rgbValues[2], rgbValues[3] || color.opacity]

@@ -296,3 +298,13 @@ );

var lastColors = {};
var parseColors = function (theme) {
if (typeof theme !== 'string') {
theme = '';
}
if (!attrs.mdColors) {
attrs.mdColors = '{}';
}
/**

@@ -329,5 +341,23 @@ * Json.parse() does not work because the keys are not quoted;

cleanElement(colors);
return colors;
};
var cleanElement = function (colors) {
if (!angular.equals(colors, lastColors)) {
var keys = Object.keys(lastColors);
if (lastColors.background && !keys['color']) {
keys.push('color');
}
keys.forEach(function (key) {
element.css(key, '');
});
}
lastColors = colors;
};
/**

@@ -344,3 +374,3 @@ * Registering for mgTheme changes and asking mdTheme controller run our callback whenever a theme changes

scope.$on('destroy', function () {
scope.$on('$destroy', function () {
unregisterChanges();

@@ -347,0 +377,0 @@ });

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,r,o){"use strict";!function(){function e(e,o,t){function n(e,r){try{e.css(u(r))}catch(o){t.error(o.message)}}function i(e){var r=c(e);return s(r)}function s(r,t){t=t||!1;var n=e.PALETTES[r.palette][r.hue];return n=t?n.contrast:n.value,o.supplant("rgba( {0}, {1}, {2}, {3} )",[n[0],n[1],n[2],n[3]||r.opacity])}function u(e){var o={},t=e.hasOwnProperty("color");return r.forEach(e,function(e,r){var n=c(e),a=r.indexOf("background")>-1;o[r]=s(n),a&&!t&&(o.color=s(n,!0))}),o}function l(o){return r.isDefined(e.THEMES[o.split("-")[0]])}function c(o){var t=o.split("-"),n=r.isDefined(e.THEMES[t[0]]),a=n?t.splice(0,1)[0]:e.defaultTheme();return{theme:a,palette:h(t,a),hue:m(t,a),opacity:t[2]||1}}function h(r,t){var n=r.length>1&&-1!==a.indexOf(r[1]),i=r[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(n&&(i=r[0]+"-"+r.splice(1,1)),-1===a.indexOf(i)){var s=e.THEMES[t].colors[i];if(!s)throw new Error(o.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:i}));i=s.name}return i}function m(r,t){var n=e.THEMES[t].colors;if("hue"===r[1]){var a=parseInt(r.splice(2,1)[0],10);if(1>a||a>3)throw new Error(o.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:a}));if(r[1]="hue-"+a,!(r[0]in n))throw new Error(o.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(n).join(", "),usedTheme:r[0]}));return n[r[0]].hues[r[1]]}return r[1]||n[r[0]in n?r[0]:"primary"].hues["default"]}return a=a||Object.keys(e.PALETTES),{applyThemeColors:n,getThemeColor:i,hasTheme:l}}function t(e,o,t,a){return{restrict:"A",require:["^?mdTheme"],compile:function(i,s){function u(){var e=s.mdColors,t=e.indexOf("::")>-1,a=t?!0:n.test(s.mdColors);s.mdColors=e.replace("::","");var i=r.isDefined(s.mdColorsWatch);return t||a?!1:i?o.parseAttributeBoolean(s.mdColorsWatch):!0}var l=u();return function(o,n,i,s){var u=s[0],c=function(r){var t=a(i.mdColors)(o);return u&&Object.keys(t).forEach(function(o){var n=t[o];e.hasTheme(n)||(t[o]=(r||u.$mdTheme)+"-"+n)}),t},h=r.noop;u&&(h=u.registerChanges(function(r){e.applyThemeColors(n,c(r))})),o.$on("destroy",function(){h()});try{l?o.$watch(c,r.bind(this,e.applyThemeColors,n),!0):e.applyThemeColors(n,c())}catch(m){t.error(m.message)}}}}}var n=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,a=o;r.module("material.components.colors",["material.core"]).directive("mdColors",t).service("$mdColors",e),e.$inject=["$mdTheming","$mdUtil","$log"],t.$inject=["$mdColors","$mdUtil","$log","$parse"]}()}(window,window.angular);
!function(e,r,o){"use strict";!function(){function e(e,o,t){function n(e,r){try{r&&e.css(u(r))}catch(o){t.error(o.message)}}function s(e){var r=c(e);return i(r)}function i(r,t){t=t||!1;var n=e.PALETTES[r.palette][r.hue];return n=t?n.contrast:n.value,o.supplant("rgba({0}, {1}, {2}, {3})",[n[0],n[1],n[2],n[3]||r.opacity])}function u(e){var o={},t=e.hasOwnProperty("color");return r.forEach(e,function(e,r){var n=c(e),a=r.indexOf("background")>-1;o[r]=i(n),a&&!t&&(o.color=i(n,!0))}),o}function l(o){return r.isDefined(e.THEMES[o.split("-")[0]])}function c(o){var t=o.split("-"),n=r.isDefined(e.THEMES[t[0]]),a=n?t.splice(0,1)[0]:e.defaultTheme();return{theme:a,palette:h(t,a),hue:m(t,a),opacity:t[2]||1}}function h(r,t){var n=r.length>1&&a.indexOf(r[1])!==-1,s=r[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(n&&(s=r[0]+"-"+r.splice(1,1)),a.indexOf(s)===-1){var i=e.THEMES[t].colors[s];if(!i)throw new Error(o.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:s}));s=i.name}return s}function m(r,t){var n=e.THEMES[t].colors;if("hue"===r[1]){var a=parseInt(r.splice(2,1)[0],10);if(a<1||a>3)throw new Error(o.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:a}));if(r[1]="hue-"+a,!(r[0]in n))throw new Error(o.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(n).join(", "),usedTheme:r[0]}));return n[r[0]].hues[r[1]]}return r[1]||n[r[0]in n?r[0]:"primary"].hues["default"]}return a=a||Object.keys(e.PALETTES),{applyThemeColors:n,getThemeColor:s,hasTheme:l}}function t(e,o,t,a){return{restrict:"A",require:["^?mdTheme"],compile:function(s,i){function u(){var e=i.mdColors,t=e.indexOf("::")>-1,a=!!t||n.test(i.mdColors);i.mdColors=e.replace("::","");var s=r.isDefined(i.mdColorsWatch);return!t&&!a&&(!s||o.parseAttributeBoolean(i.mdColorsWatch))}var l=u();return function(o,n,s,i){var u=i[0],c={},h=function(r){"string"!=typeof r&&(r=""),s.mdColors||(s.mdColors="{}");var t=a(s.mdColors)(o);return u&&Object.keys(t).forEach(function(o){var n=t[o];e.hasTheme(n)||(t[o]=(r||u.$mdTheme)+"-"+n)}),m(t),t},m=function(e){if(!r.equals(e,c)){var o=Object.keys(c);c.background&&!o.color&&o.push("color"),o.forEach(function(e){n.css(e,"")})}c=e},d=r.noop;u&&(d=u.registerChanges(function(r){e.applyThemeColors(n,h(r))})),o.$on("$destroy",function(){d()});try{l?o.$watch(h,r.bind(this,e.applyThemeColors,n),!0):e.applyThemeColors(n,h())}catch(f){t.error(f.message)}}}}}var n=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,a=o;r.module("material.components.colors",["material.core"]).directive("mdColors",t).service("$mdColors",e),e.$inject=["$mdTheming","$mdUtil","$log"],t.$inject=["$mdColors","$mdUtil","$log","$parse"]}()}(window,window.angular);
{
"name": "angular-material-content",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -45,2 +45,9 @@ (function( window, angular, undefined ){

*
* Additionally, we now also offer the `md-no-flicker` class which can be applied to any element
* and uses a Webkit-specific filter of `blur(0px)` that forces GPU rendering of all elements
* inside (which eliminates the flicker on iOS devices).
*
* _<b>Note:</b> Forcing an element to render on the GPU can have unintended side-effects, especially
* related to the z-index of elements. Please use with caution and only on the elements needed._
*
* @usage

@@ -55,3 +62,2 @@ *

* </hljs>
*
*/

@@ -58,0 +64,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,o){"use strict";function n(e){function t(e,t){this.$scope=e,this.$element=t}return{restrict:"E",controller:["$scope","$element",t],link:function(t,o){o.addClass("_md"),e(o),t.$broadcast("$mdContentLoaded",o),l(o[0])}}}function l(e){t.element(e).on("$md.pressdown",function(t){"t"===t.pointer.type&&(t.$materialScrollFixed||(t.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}t.module("material.components.content",["material.core"]).directive("mdContent",n),n.$inject=["$mdTheming"]}(window,window.angular);
{
"name": "angular-material-core",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-ngAnimate": "1.1.0-rc4-master-06e7e99",
"angular-material-animate": "1.1.0-rc4-master-06e7e99",
"angular-material-layout": "1.1.0-rc4-master-06e7e99",
"angular-material-gestures": "1.1.0-rc4-master-06e7e99",
"angular-material-theming": "1.1.0-rc4-master-06e7e99"
"angular-material-ngAnimate": "1.1.0-rc.5-master-c447c12",
"angular-material-animate": "1.1.0-rc.5-master-c447c12",
"angular-material-layout": "1.1.0-rc.5-master-c447c12",
"angular-material-gestures": "1.1.0-rc.5-master-c447c12",
"angular-material-theming": "1.1.0-rc.5-master-c447c12"
}
}
{
"name": "angular-material-datepicker",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-icon": "1.1.0-rc4-master-06e7e99",
"angular-material-virtualRepeat": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-icon": "1.1.0-rc.5-master-c447c12",
"angular-material-virtualRepeat": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,4 +5,5 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,a){"use strict";!function(){function t(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(i-n)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody role="rowgroup" md-virtual-repeat="i in ctrl.items" md-calendar-month md-month-offset="$index" class="md-calendar-month" md-start-index="ctrl.getSelectedMonthIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter"},require:["ngModel","mdCalendar"],controller:a,controllerAs:"ctrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.configureNgModel(i)}}}function a(t,e,a,n,i,r,s,d,o,c,h){if(s(t),this.items={length:2e3},this.maxDate&&this.minDate){var u=d.getMonthDistance(this.minDate,this.maxDate)+1;u=Math.max(u,1),u+=1,this.items.length=u}if(this.$animate=n,this.$q=i,this.$mdInkRipple=c,this.$mdUtil=h,this.keyCode=r.KEY_CODE,this.dateUtil=d,this.dateLocale=o,this.$element=t,this.$scope=a,this.calendarElement=t[0].querySelector(".md-calendar"),this.calendarScroller=t[0].querySelector(".md-virtual-repeat-scroller"),this.today=this.dateUtil.createDateAtMidnight(),this.firstRenderableDate=this.dateUtil.incrementMonths(this.today,-this.items.length/2),this.minDate&&this.minDate>this.firstRenderableDate)this.firstRenderableDate=this.minDate;else if(this.maxDate){this.items.length-2;this.firstRenderableDate=this.dateUtil.incrementMonths(this.maxDate,-(this.items.length-2))}this.id=l++,this.ngModelCtrl=null,this.selectedDate=null,this.displayDate=null,this.focusDate=null,this.isInitialized=!1,this.isMonthTransitionInProgress=!1,e.tabindex||t.attr("tabindex","-1");var m=this;this.cellClickHandler=function(){var t=this;this.hasAttribute("data-timestamp")&&a.$apply(function(){var e=Number(t.getAttribute("data-timestamp"));m.setNgModelValue(m.dateUtil.createDateAtMidnight(e))})},this.attachCalendarEventListeners()}e.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]).directive("mdCalendar",t);var n=265,i=45,r="md-calendar-selected-date",s="md-focus",l=0;a.$inject=["$element","$attrs","$scope","$animate","$q","$mdConstant","$mdTheming","$$mdDateUtil","$mdDateLocale","$mdInkRipple","$mdUtil"],a.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){e.changeSelectedDate(e.ngModelCtrl.$viewValue)}},a.prototype.buildInitialCalendarDisplay=function(){this.buildWeekHeader(),this.hideVerticalScrollbar(),this.displayDate=this.selectedDate||this.today,this.isInitialized=!0},a.prototype.hideVerticalScrollbar=function(){var t=this.$element[0],e=t.querySelector(".md-calendar-scroll-mask"),a=this.calendarScroller,n=t.querySelector(".md-calendar-day-header").clientWidth,i=a.offsetWidth-a.clientWidth;e.style.width=n+"px",a.style.width=n+i+"px",a.style.paddingRight=i+"px"},a.prototype.attachCalendarEventListeners=function(){this.$element.on("keydown",e.bind(this,this.handleKeyEvent))},a.prototype.handleKeyEvent=function(t){var e=this;this.$scope.$apply(function(){if(t.which==e.keyCode.ESCAPE||t.which==e.keyCode.TAB)return e.$scope.$emit("md-calendar-close"),void(t.which==e.keyCode.TAB&&t.preventDefault());if(t.which===e.keyCode.ENTER)return e.setNgModelValue(e.displayDate),void t.preventDefault();var a=e.getFocusDateFromKeyEvent(t);a&&(a=e.boundDateByMinAndMax(a),t.preventDefault(),t.stopPropagation(),e.changeDisplayDate(a).then(function(){e.focus(a)}))})},a.prototype.getFocusDateFromKeyEvent=function(t){var e=this.dateUtil,a=this.keyCode;switch(t.which){case a.RIGHT_ARROW:return e.incrementDays(this.displayDate,1);case a.LEFT_ARROW:return e.incrementDays(this.displayDate,-1);case a.DOWN_ARROW:return t.metaKey?e.incrementMonths(this.displayDate,1):e.incrementDays(this.displayDate,7);case a.UP_ARROW:return t.metaKey?e.incrementMonths(this.displayDate,-1):e.incrementDays(this.displayDate,-7);case a.PAGE_DOWN:return e.incrementMonths(this.displayDate,1);case a.PAGE_UP:return e.incrementMonths(this.displayDate,-1);case a.HOME:return e.getFirstDateOfMonth(this.displayDate);case a.END:return e.getLastDateOfMonth(this.displayDate);default:return null}},a.prototype.getSelectedMonthIndex=function(){return this.dateUtil.getMonthDistance(this.firstRenderableDate,this.selectedDate||this.today)},a.prototype.scrollToMonth=function(t){if(this.dateUtil.isValidDate(t)){var e=this.dateUtil.getMonthDistance(this.firstRenderableDate,t);this.calendarScroller.scrollTop=e*n}},a.prototype.setNgModelValue=function(t){this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render()},a.prototype.focus=function(t){var e=t||this.selectedDate||this.today,a=this.calendarElement.querySelector(".md-focus");a&&a.classList.remove(s);var n=this.getDateId(e),i=document.getElementById(n);i?(i.classList.add(s),i.focus()):this.focusDate=e},a.prototype.boundDateByMinAndMax=function(t){var e=t;return this.minDate&&t<this.minDate&&(e=new Date(this.minDate.getTime())),this.maxDate&&t>this.maxDate&&(e=new Date(this.maxDate.getTime())),e},a.prototype.changeSelectedDate=function(t){var e=this,a=this.selectedDate;this.selectedDate=t,this.changeDisplayDate(t).then(function(){if(a){var n=document.getElementById(e.getDateId(a));n&&(n.classList.remove(r),n.setAttribute("aria-selected","false"))}if(t){var i=document.getElementById(e.getDateId(t));i&&(i.classList.add(r),i.setAttribute("aria-selected","true"))}})},a.prototype.changeDisplayDate=function(t){if(!this.isInitialized)return this.buildInitialCalendarDisplay(),this.$q.when();if(!this.dateUtil.isValidDate(t)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var e=this.animateDateChange(t);this.displayDate=t;var a=this;return e.then(function(){a.isMonthTransitionInProgress=!1}),e},a.prototype.animateDateChange=function(t){return this.scrollToMonth(t),this.$q.when()},a.prototype.buildWeekHeader=function(){for(var t=this.dateLocale.firstDayOfWeek,e=this.dateLocale.shortDays,a=document.createElement("tr"),n=0;7>n;n++){var i=document.createElement("th");i.textContent=e[(n+t)%7],a.appendChild(i)}this.$element.find("thead").append(a)},a.prototype.getDateId=function(t){return["md",this.id,t.getFullYear(),t.getMonth(),t.getDate()].join("-")}}(),function(){function t(){return{require:["^^mdCalendar","mdCalendarMonth"],scope:{offset:"=mdMonthOffset"},controller:a,controllerAs:"mdMonthCtrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.calendarCtrl=i,r.generateContent(),t.$watch(function(){return r.offset},function(t,e){t!=e&&r.generateContent()})}}}function a(t,e,a){this.dateUtil=e,this.dateLocale=a,this.$element=t,this.calendarCtrl=null,this.offset,this.focusAfterAppend=null}e.module("material.components.datepicker").directive("mdCalendarMonth",t);var n="md-calendar-date-today",i="md-calendar-selected-date",r="md-focus";a.$inject=["$element","$$mdDateUtil","$mdDateLocale"],a.prototype.generateContent=function(){var t=this.calendarCtrl,e=this.dateUtil.incrementMonths(t.firstRenderableDate,this.offset);this.$element.empty(),this.$element.append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(r),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},a.prototype.buildDateCell=function(t){var e=this.calendarCtrl,a=document.createElement("td");if(a.tabIndex=-1,a.classList.add("md-calendar-date"),a.setAttribute("role","gridcell"),t){a.setAttribute("tabindex","-1"),a.setAttribute("aria-label",this.dateLocale.longDateFormatter(t)),a.id=e.getDateId(t),a.setAttribute("data-timestamp",t.getTime()),this.dateUtil.isSameDay(t,e.today)&&a.classList.add(n),this.dateUtil.isValidDate(e.selectedDate)&&this.dateUtil.isSameDay(t,e.selectedDate)&&(a.classList.add(i),a.setAttribute("aria-selected","true"));var r=this.dateLocale.dates[t.getDate()];if(this.isDateEnabled(t)){var s=document.createElement("span");a.appendChild(s),s.classList.add("md-calendar-date-selection-indicator"),s.textContent=r,a.addEventListener("click",e.cellClickHandler),e.focusDate&&this.dateUtil.isSameDay(t,e.focusDate)&&(this.focusAfterAppend=a)}else a.classList.add("md-calendar-date-disabled"),a.textContent=r}return a},a.prototype.isDateEnabled=function(t){return this.dateUtil.isDateWithinRange(t,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!e.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(t))},a.prototype.buildDateRow=function(t){var e=document.createElement("tr");return e.setAttribute("role","row"),e.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(t)),e},a.prototype.buildCalendarForMonth=function(t){var e=this.dateUtil.isValidDate(t)?t:new Date,a=this.dateUtil.getFirstDateOfMonth(e),n=this.getLocaleDay_(a),i=this.dateUtil.getNumberOfDaysInMonth(e),r=document.createDocumentFragment(),s=1,l=this.buildDateRow(s);r.appendChild(l);var d=this.offset===this.calendarCtrl.items.length-1,o=0,c=document.createElement("td");if(c.classList.add("md-calendar-month-label"),this.calendarCtrl.maxDate&&a>this.calendarCtrl.maxDate&&c.classList.add("md-calendar-month-label-disabled"),c.textContent=this.dateLocale.monthHeaderFormatter(e),2>=n){c.setAttribute("colspan","7");var h=this.buildDateRow();if(h.appendChild(c),r.insertBefore(h,l),d)return r}else o=2,c.setAttribute("colspan","2"),l.appendChild(c);for(var u=o;n>u;u++)l.appendChild(this.buildDateCell());for(var m=n,p=a,f=1;i>=f;f++){if(7===m){if(d)return r;m=0,s++,l=this.buildDateRow(s),r.appendChild(l)}p.setDate(f);var D=this.buildDateCell(p);l.appendChild(D),m++}for(;l.childNodes.length<7;)l.appendChild(this.buildDateCell());for(;r.childNodes.length<6;){for(var g=this.buildDateRow(),u=0;7>u;u++)g.appendChild(this.buildDateCell());r.appendChild(g)}return r},a.prototype.getLocaleDay_=function(t){return(t.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){e.module("material.components.datepicker").config(["$provide",function(t){function e(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}e.prototype.$get=function(t){function e(t){if(!t)return"";var e=t.toLocaleTimeString(),a=t;return 0!=t.getHours()||-1===e.indexOf("11:")&&-1===e.indexOf("23:")||(a=new Date(t.getFullYear(),t.getMonth(),t.getDate(),1,0,0)),a.toLocaleDateString()}function a(t){return new Date(t)}function n(t){t=t.trim();var e=/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;return e.test(t)}function i(t){return u.shortMonths[t.getMonth()]+" "+t.getFullYear()}function r(t){return"Week "+t}function s(t){return[u.days[t.getDay()],u.months[t.getMonth()],u.dates[t.getDate()],t.getFullYear()].join(" ")}for(var l=t.DATETIME_FORMATS.DAY.map(function(t){return t[0]}),d=Array(32),o=1;31>=o;o++)d[o]=o;var c="Calendar",h="Open calendar",u={months:this.months||t.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||t.DATETIME_FORMATS.SHORTMONTH,days:this.days||t.DATETIME_FORMATS.DAY,shortDays:this.shortDays||l,dates:this.dates||d,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||e,parseDate:this.parseDate||a,isDateComplete:this.isDateComplete||n,monthHeaderFormatter:this.monthHeaderFormatter||i,weekNumberFormatter:this.weekNumberFormatter||r,longDateFormatter:this.longDateFormatter||s,msgCalendar:this.msgCalendar||c,msgOpenCalendar:this.msgOpenCalendar||h};return u},e.prototype.$get.$inject=["$locale"],t.provider("$mdDateLocale",new e)}])}(),function(){function a(){return{template:'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" md-svg-icon="md-calendar"></md-icon></md-button><div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"><md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button></div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-min-date="ctrl.minDate" md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>',require:["ngModel","mdDatepicker","?^mdInputContainer"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",dateFilter:"=mdDateFilter"},controller:n,controllerAs:"ctrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1],s=n[2];if(s)throw Error("md-datepicker should not be placed inside md-input-container.");r.configureNgModel(i)}}}function n(t,a,n,i,r,s,l,d,o,c,h,u){this.$compile=i,this.$timeout=r,this.$window=s,this.dateLocale=c,this.dateUtil=h,this.$mdConstant=l,this.$mdUtil=o,this.$$rAF=u,this.documentElement=e.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=a[0].querySelector("input"),this.ngInputElement=e.element(this.inputElement),this.inputContainer=a[0].querySelector(".md-datepicker-input-container"),this.calendarPane=a[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=a[0].querySelector(".md-datepicker-button"),this.inputMask=a[0].querySelector(".md-datepicker-input-mask-opaque"),this.$element=a,this.$attrs=n,this.$scope=t,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(a[0].disabled||e.isString(n.disabled)),this.isCalendarOpen=!1,this.calendarPaneOpenedFrom=null,this.calendarPane.id="md-date-pane"+o.nextUid(),d(a),this.bodyClickHandler=e.bind(this,this.handleBodyClick),this.windowResizeHandler=o.debounce(e.bind(this,this.closeCalendarPane),100),n.tabindex||a.attr("tabindex","-1"),this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners();var m=this;t.$on("$destroy",function(){m.detachCalendarPane()})}e.module("material.components.datepicker").directive("mdDatepicker",a);var i=3,r="md-datepicker-invalid",s=500,l=368,d=360;n.$inject=["$scope","$element","$attrs","$compile","$timeout","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF"],n.prototype.configureNgModel=function(t){this.ngModelCtrl=t;var e=this;t.$render=function(){var t=e.ngModelCtrl.$viewValue;if(t&&!(t instanceof Date))throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: "+typeof t);e.date=t,e.inputElement.value=e.dateLocale.formatDate(t),e.resizeInputElement(),e.updateErrorState()}},n.prototype.attachChangeListeners=function(){var t=this;t.$scope.$on("md-calendar-change",function(e,a){t.ngModelCtrl.$setViewValue(a),t.date=a,t.inputElement.value=t.dateLocale.formatDate(a),t.closeCalendarPane(),t.resizeInputElement(),t.updateErrorState()}),t.ngInputElement.on("input",e.bind(t,t.resizeInputElement)),t.ngInputElement.on("input",t.$mdUtil.debounce(t.handleInputEvent,s,t))},n.prototype.attachInteractionListeners=function(){var t=this,e=this.$scope,a=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(n){n.altKey&&n.keyCode==a.DOWN_ARROW&&(t.openCalendarPane(n),e.$digest())}),e.$on("md-calendar-close",function(){t.closeCalendarPane()})},n.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},n.prototype.setDisabled=function(t){this.isDisabled=t,this.inputElement.disabled=t,this.calendarButton.disabled=t},n.prototype.updateErrorState=function(t){var a=t||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(a)){if(a=this.dateUtil.createDateAtMidnight(a),this.dateUtil.isValidDate(this.minDate)){var n=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",a>=n)}if(this.dateUtil.isValidDate(this.maxDate)){var i=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",i>=a)}e.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(a))}else this.ngModelCtrl.$setValidity("valid",null==a);this.ngModelCtrl.$valid||this.inputContainer.classList.add(r)},n.prototype.clearErrorState=function(){this.inputContainer.classList.remove(r),["mindate","maxdate","filtered","valid"].forEach(function(t){this.ngModelCtrl.$setValidity(t,!0)},this)},n.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+i},n.prototype.handleInputEvent=function(){var t=this.inputElement.value,e=t?this.dateLocale.parseDate(t):null;this.dateUtil.setDateTimeToMidnight(e);var a=""==t||this.dateUtil.isValidDate(e)&&this.dateLocale.isDateComplete(t)&&this.isDateEnabled(e);a&&(this.ngModelCtrl.$setViewValue(e),this.date=e),this.updateErrorState(e)},n.prototype.isDateEnabled=function(t){return this.dateUtil.isDateWithinRange(t,this.minDate,this.maxDate)&&(!e.isFunction(this.dateFilter)||this.dateFilter(t))},n.prototype.attachCalendarPane=function(){var t=this.calendarPane;t.style.transform="",this.$element.addClass("md-datepicker-open");var e=this.inputContainer.getBoundingClientRect(),a=document.body.getBoundingClientRect(),n=e.top-a.top,i=e.left-a.left,r=a.top<0&&0==document.body.scrollTop?-a.top:document.body.scrollTop,s=a.left<0&&0==document.body.scrollLeft?-a.left:document.body.scrollLeft,o=r+this.$window.innerHeight,c=s+this.$window.innerWidth;if(i+d>c){if(c-d>0)i=c-d;else{i=s;var h=this.$window.innerWidth/d;t.style.transform="scale("+h+")"}t.classList.add("md-datepicker-pos-adjusted")}n+l>o&&o-l>r&&(n=o-l,t.classList.add("md-datepicker-pos-adjusted")),t.style.left=i+"px",t.style.top=n+"px",document.body.appendChild(t),this.inputMask.style.left=e.width+"px",this.$$rAF(function(){t.classList.add("md-pane-open")})},n.prototype.detachCalendarPane=function(){this.$element.removeClass("md-datepicker-open"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},n.prototype.openCalendarPane=function(e){if(!this.isCalendarOpen&&!this.isDisabled){this.isCalendarOpen=!0,this.calendarPaneOpenedFrom=e.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar();var a=this;this.$mdUtil.nextTick(function(){a.documentElement.on("click touchstart",a.bodyClickHandler)},!1),t.addEventListener("resize",this.windowResizeHandler)}},n.prototype.closeCalendarPane=function(){this.isCalendarOpen&&(this.detachCalendarPane(),this.isCalendarOpen=!1,this.calendarPaneOpenedFrom.focus(),this.calendarPaneOpenedFrom=null,this.ngModelCtrl.$setTouched(),this.documentElement.off("click touchstart",this.bodyClickHandler),t.removeEventListener("resize",this.windowResizeHandler))},n.prototype.getCalendarCtrl=function(){return e.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},n.prototype.focusCalendar=function(){var t=this;this.$mdUtil.nextTick(function(){t.getCalendarCtrl().focus()},!1)},n.prototype.setFocused=function(t){t||this.ngModelCtrl.$setTouched(),this.isFocused=t},n.prototype.handleBodyClick=function(t){if(this.isCalendarOpen){var e=this.$mdUtil.getClosest(t.target,"md-calendar");e||this.closeCalendarPane(),this.$scope.$digest()}}}(),function(){e.module("material.components.datepicker").factory("$$mdDateUtil",function(){function t(t){return new Date(t.getFullYear(),t.getMonth(),1)}function a(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function n(t){return new Date(t.getFullYear(),t.getMonth()+1,1)}function i(t){return new Date(t.getFullYear(),t.getMonth()-1,1)}function r(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function s(t,e){return t.getDate()==e.getDate()&&r(t,e)}function l(t,e){var a=n(t);return r(a,e)}function d(t,e){var a=i(t);return r(e,a)}function o(t,e){return g((t.getTime()+e.getTime())/2)}function c(e){var a=t(e);return Math.floor((a.getDay()+e.getDate()-1)/7)}function h(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function u(t,e){var n=new Date(t.getFullYear(),t.getMonth()+e,1),i=a(n);return i<t.getDate()?n.setDate(i):n.setDate(t.getDate()),n}function m(t,e){return 12*(e.getFullYear()-t.getFullYear())+(e.getMonth()-t.getMonth())}function p(t){return new Date(t.getFullYear(),t.getMonth(),a(t))}function f(t){return null!=t&&t.getTime&&!isNaN(t.getTime())}function D(t){f(t)&&t.setHours(0,0,0,0)}function g(t){var a;return a=e.isUndefined(t)?new Date:new Date(t),D(a),a}function y(t,e,a){var n=g(t),i=f(e)?g(e):null,r=f(a)?g(a):null;return(!i||n>=i)&&(!r||r>=n)}return{getFirstDateOfMonth:t,getNumberOfDaysInMonth:a,getDateInNextMonth:n,getDateInPreviousMonth:i,isInNextMonth:l,isInPreviousMonth:d,getDateMidpoint:o,isSameMonthAndYear:r,getWeekOfMonth:c,incrementDays:h,incrementMonths:u,getLastDateOfMonth:p,isSameDay:s,getMonthDistance:m,isValidDate:f,setDateTimeToMidnight:D,createDateAtMidnight:g,isDateWithinRange:y}})}()}(window,window.angular);
!function(t,e,a){"use strict";e.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){function t(){return{template:function(t,e){var a=e.hasOwnProperty("ngIf")?"":'ng-if="calendarCtrl.isInitialized"',n='<div ng-switch="calendarCtrl.currentView" '+a+'><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>';return n},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:a,controllerAs:"calendarCtrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.configureNgModel(i)}}}function a(t,a,n,r,l,s,d,o){s(t),this.$element=t,this.$scope=a,this.dateUtil=n,this.$mdUtil=r,this.keyCode=l.KEY_CODE,this.$$rAF=d,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.currentView=this._currentView||"month",this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=i++,this.displayDate=null,this.selectedDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,o.tabindex||t.attr("tabindex","-1"),t.on("keydown",e.bind(this,this.handleKeyEvent))}e.module("material.components.datepicker").directive("mdCalendar",t);var n=340,i=0;a.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs"],a.prototype.configureNgModel=function(t){var e=this;e.ngModelCtrl=t,e.$mdUtil.nextTick(function(){e.isInitialized=!0}),t.$render=function(){var t=this.$viewValue;e.$scope.$broadcast("md-calendar-parent-changed",t),e.selectedDate||(e.selectedDate=t),e.displayDate||(e.displayDate=e.selectedDate||e.today)}},a.prototype.setNgModelValue=function(t){var e=this.dateUtil.createDateAtMidnight(t);return this.focus(e),this.$scope.$emit("md-calendar-change",e),this.ngModelCtrl.$setViewValue(e),this.ngModelCtrl.$render(),e},a.prototype.setCurrentView=function(t,a){var n=this;n.$mdUtil.nextTick(function(){n.currentView=t,a&&(n.displayDate=e.isDate(a)?a:new Date(a))})},a.prototype.focus=function(t){if(this.dateUtil.isValidDate(t)){var e=this.$element[0].querySelector(".md-focus");e&&e.classList.remove(this.FOCUSED_DATE_CLASS);var a=this.getDateId(t,this.currentView),n=document.getElementById(a);n&&(n.classList.add(this.FOCUSED_DATE_CLASS),n.focus(),this.displayDate=t)}else{var i=this.$element[0].querySelector("[ng-switch]");i&&i.focus()}},a.prototype.getActionFromKeyEvent=function(t){var e=this.keyCode;switch(t.which){case e.ENTER:return"select";case e.RIGHT_ARROW:return"move-right";case e.LEFT_ARROW:return"move-left";case e.DOWN_ARROW:return t.metaKey?"move-page-down":"move-row-down";case e.UP_ARROW:return t.metaKey?"move-page-up":"move-row-up";case e.PAGE_DOWN:return"move-page-down";case e.PAGE_UP:return"move-page-up";case e.HOME:return"start";case e.END:return"end";default:return null}},a.prototype.handleKeyEvent=function(t){var e=this;this.$scope.$apply(function(){if(t.which==e.keyCode.ESCAPE||t.which==e.keyCode.TAB)return e.$scope.$emit("md-calendar-close"),void(t.which==e.keyCode.TAB&&t.preventDefault());var a=e.getActionFromKeyEvent(t);a&&(t.preventDefault(),t.stopPropagation(),e.$scope.$broadcast("md-calendar-parent-action",a))})},a.prototype.hideVerticalScrollbar=function(t){function e(){var e=a.width||n,i=a.scrollbarWidth,l=t.calendarScroller;r.style.width=e+"px",l.style.width=e+i+"px",l.style.paddingRight=i+"px"}var a=this,i=t.$element[0],r=i.querySelector(".md-calendar-scroll-mask");a.width>0?e():a.$$rAF(function(){var n=t.calendarScroller;a.scrollbarWidth=n.offsetWidth-n.clientWidth,a.width=i.querySelector("table").offsetWidth,e()})},a.prototype.getDateId=function(t,e){if(!e)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,e,t.getFullYear(),t.getMonth(),t.getDate()].join("-")},a.prototype.updateVirtualRepeat=function(){var t=this.$scope,e=t.$on("$md-resize-enable",function(){t.$$phase||t.$apply(),e()})}}(),function(){function t(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(i-n)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarMonth"],controller:a,controllerAs:"monthCtrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.initialize(i)}}}function a(t,e,a,n,i,r){this.$element=t,this.$scope=e,this.$animate=a,this.$q=n,this.dateUtil=i,this.dateLocale=r,this.calendarScroller=t[0].querySelector(".md-virtual-repeat-scroller"),this.firstRenderableDate=null,this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var l=this;this.cellClickHandler=function(){var t=i.getTimestampFromNode(this);l.$scope.$apply(function(){l.calendarCtrl.setNgModelValue(t)})},this.headerClickHandler=function(){l.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}e.module("material.components.datepicker").directive("mdCalendarMonth",t);var n=265,i=45;a.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],a.prototype.initialize=function(t){var e=t.minDate,a=t.maxDate;if(this.calendarCtrl=t,this.items={length:2e3},a&&e){var n=this.dateUtil.getMonthDistance(e,a)+1;n=Math.max(n,1),n+=1,this.items.length=n}if(this.firstRenderableDate=this.dateUtil.incrementMonths(t.today,-this.items.length/2),e&&e>this.firstRenderableDate)this.firstRenderableDate=e;else if(a){this.items.length-2;this.firstRenderableDate=this.dateUtil.incrementMonths(a,-(this.items.length-2))}this.attachScopeListeners(),t.updateVirtualRepeat(),t.ngModelCtrl&&t.ngModelCtrl.$render()},a.prototype.getSelectedMonthIndex=function(){var t=this.calendarCtrl;return this.dateUtil.getMonthDistance(this.firstRenderableDate,t.displayDate||t.selectedDate||t.today)},a.prototype.changeSelectedDate=function(t){var e=this,a=e.calendarCtrl,n=a.selectedDate;a.selectedDate=t,this.changeDisplayDate(t).then(function(){var e=a.SELECTED_DATE_CLASS,i="month";if(n){var r=document.getElementById(a.getDateId(n,i));r&&(r.classList.remove(e),r.setAttribute("aria-selected","false"))}if(t){var l=document.getElementById(a.getDateId(t,i));l&&(l.classList.add(e),l.setAttribute("aria-selected","true"))}})},a.prototype.changeDisplayDate=function(t){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(t)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var e=this.animateDateChange(t);this.calendarCtrl.displayDate=t;var a=this;return e.then(function(){a.isMonthTransitionInProgress=!1}),e},a.prototype.animateDateChange=function(t){if(this.dateUtil.isValidDate(t)){var e=this.dateUtil.getMonthDistance(this.firstRenderableDate,t);this.calendarScroller.scrollTop=e*n}return this.$q.when()},a.prototype.buildWeekHeader=function(){for(var t=this.dateLocale.firstDayOfWeek,e=this.dateLocale.shortDays,a=document.createElement("tr"),n=0;n<7;n++){var i=document.createElement("th");i.textContent=e[(n+t)%7],a.appendChild(i)}this.$element.find("thead").append(a)},a.prototype.attachScopeListeners=function(){var t=this;t.$scope.$on("md-calendar-parent-changed",function(e,a){t.changeSelectedDate(a)}),t.$scope.$on("md-calendar-parent-action",e.bind(this,this.handleKeyEvent))},a.prototype.handleKeyEvent=function(t,e){var a=this.calendarCtrl,n=a.displayDate;if("select"===e)a.setNgModelValue(n);else{var i=null,r=this.dateUtil;switch(e){case"move-right":i=r.incrementDays(n,1);break;case"move-left":i=r.incrementDays(n,-1);break;case"move-page-down":i=r.incrementMonths(n,1);break;case"move-page-up":i=r.incrementMonths(n,-1);break;case"move-row-down":i=r.incrementDays(n,7);break;case"move-row-up":i=r.incrementDays(n,-7);break;case"start":i=r.getFirstDateOfMonth(n);break;case"end":i=r.getLastDateOfMonth(n)}i&&(i=this.dateUtil.clampDate(i,a.minDate,a.maxDate),this.changeDisplayDate(i).then(function(){a.focus(i)}))}}}(),function(){function t(t,e){var n=t('<md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon>')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:a,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(t,e,a,i){var r=i[0],l=i[1],s=i[2];s.calendarCtrl=r,s.monthCtrl=l,s.arrowIcon=n.cloneNode(!0),s.generateContent(),t.$watch(function(){return s.offset},function(t,e){t!==e&&s.generateContent()})}}}function a(t,e,a){this.$element=t,this.dateUtil=e,this.dateLocale=a,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}e.module("material.components.datepicker").directive("mdCalendarMonthBody",t),t.$inject=["$compile","$$mdSvgRegistry"],a.$inject=["$element","$$mdDateUtil","$mdDateLocale"],a.prototype.generateContent=function(){var t=this.dateUtil.incrementMonths(this.monthCtrl.firstRenderableDate,this.offset);this.$element.empty(),this.$element.append(this.buildCalendarForMonth(t)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},a.prototype.buildDateCell=function(t){var e=this.monthCtrl,a=this.calendarCtrl,n=document.createElement("td");if(n.tabIndex=-1,n.classList.add("md-calendar-date"),n.setAttribute("role","gridcell"),t){n.setAttribute("tabindex","-1"),n.setAttribute("aria-label",this.dateLocale.longDateFormatter(t)),n.id=a.getDateId(t,"month"),n.setAttribute("data-timestamp",t.getTime()),this.dateUtil.isSameDay(t,a.today)&&n.classList.add(a.TODAY_CLASS),this.dateUtil.isValidDate(a.selectedDate)&&this.dateUtil.isSameDay(t,a.selectedDate)&&(n.classList.add(a.SELECTED_DATE_CLASS),n.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[t.getDate()];if(this.isDateEnabled(t)){var r=document.createElement("span");r.classList.add("md-calendar-date-selection-indicator"),r.textContent=i,n.appendChild(r),n.addEventListener("click",e.cellClickHandler),a.displayDate&&this.dateUtil.isSameDay(t,a.displayDate)&&(this.focusAfterAppend=n)}else n.classList.add("md-calendar-date-disabled"),n.textContent=i}return n},a.prototype.isDateEnabled=function(t){return this.dateUtil.isDateWithinRange(t,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!e.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(t))},a.prototype.buildDateRow=function(t){var e=document.createElement("tr");return e.setAttribute("role","row"),e.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(t)),e},a.prototype.buildCalendarForMonth=function(t){var e=this.dateUtil.isValidDate(t)?t:new Date,a=this.dateUtil.getFirstDateOfMonth(e),n=this.getLocaleDay_(a),i=this.dateUtil.getNumberOfDaysInMonth(e),r=document.createDocumentFragment(),l=1,s=this.buildDateRow(l);r.appendChild(s);var d=this.offset===this.monthCtrl.items.length-1,o=0,c=document.createElement("td"),h=document.createElement("span");if(h.textContent=this.dateLocale.monthHeaderFormatter(e),c.appendChild(h),c.classList.add("md-calendar-month-label"),this.calendarCtrl.maxDate&&a>this.calendarCtrl.maxDate?c.classList.add("md-calendar-month-label-disabled"):(c.addEventListener("click",this.monthCtrl.headerClickHandler),c.setAttribute("data-timestamp",a.getTime()),c.setAttribute("aria-label",this.dateLocale.monthFormatter(e)),c.appendChild(this.arrowIcon.cloneNode(!0))),n<=2){c.setAttribute("colspan","7");var u=this.buildDateRow();if(u.appendChild(c),r.insertBefore(u,s),d)return r}else o=3,c.setAttribute("colspan","3"),s.appendChild(c);for(var m=o;m<n;m++)s.appendChild(this.buildDateCell());for(var p=n,f=a,g=1;g<=i;g++){if(7===p){if(d)return r;p=0,l++,s=this.buildDateRow(l),r.appendChild(s)}f.setDate(g);var D=this.buildDateCell(f);s.appendChild(D),p++}for(;s.childNodes.length<7;)s.appendChild(this.buildDateCell());for(;r.childNodes.length<6;){for(var C=this.buildDateRow(),v=0;v<7;v++)C.appendChild(this.buildDateCell());r.appendChild(C)}return r},a.prototype.getLocaleDay_=function(t){return(t.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){function t(){return{template:'<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarYear"],controller:a,controllerAs:"yearCtrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1];r.initialize(i)}}}function a(t,e,a,n,i){this.$element=t,this.$scope=e,this.$animate=a,this.$q=n,this.dateUtil=i,this.calendarScroller=t[0].querySelector(".md-virtual-repeat-scroller"),this.firstRenderableDate=null,this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var r=this;this.cellClickHandler=function(){r.calendarCtrl.setCurrentView("month",i.getTimestampFromNode(this))}}e.module("material.components.datepicker").directive("mdCalendarYear",t);var n=88;a.$inject=["$element","$scope","$animate","$q","$$mdDateUtil"],a.prototype.initialize=function(t){var e=t.minDate,a=t.maxDate;if(this.calendarCtrl=t,this.items={length:400},this.firstRenderableDate=this.dateUtil.incrementYears(t.today,-(this.items.length/2)),e&&e>this.firstRenderableDate?this.firstRenderableDate=e:a&&(this.firstRenderableDate=this.dateUtil.incrementMonths(a,-(this.items.length-1))),a&&e){var n=this.dateUtil.getYearDistance(this.firstRenderableDate,a)+1;this.items.length=Math.max(n,1)}this.attachScopeListeners(),t.updateVirtualRepeat(),t.ngModelCtrl&&t.ngModelCtrl.$render()},a.prototype.getFocusedYearIndex=function(){var t=this.calendarCtrl;return this.dateUtil.getYearDistance(this.firstRenderableDate,t.displayDate||t.selectedDate||t.today)},a.prototype.changeDate=function(t){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(t)&&!this.isMonthTransitionInProgress){var e=this,a=this.animateDateChange(t);return e.isMonthTransitionInProgress=!0,e.calendarCtrl.displayDate=t,a.then(function(){e.isMonthTransitionInProgress=!1})}},a.prototype.animateDateChange=function(t){if(this.dateUtil.isValidDate(t)){var e=this.dateUtil.getYearDistance(this.firstRenderableDate,t);this.calendarScroller.scrollTop=e*n}return this.$q.when()},a.prototype.handleKeyEvent=function(t,e){var a=this.calendarCtrl,n=a.displayDate;if("select"===e)this.changeDate(n).then(function(){a.setCurrentView("month",n),a.focus(n)});else{var i=null,r=this.dateUtil;switch(e){case"move-right":i=r.incrementMonths(n,1);break;case"move-left":i=r.incrementMonths(n,-1);break;case"move-row-down":i=r.incrementMonths(n,6);break;case"move-row-up":i=r.incrementMonths(n,-6)}if(i){var l=a.minDate?r.incrementMonths(r.getFirstDateOfMonth(a.minDate),1):null,s=a.maxDate?r.getFirstDateOfMonth(a.maxDate):null;i=r.getFirstDateOfMonth(this.dateUtil.clampDate(i,l,s)),this.changeDate(i).then(function(){a.focus(i)})}}},a.prototype.attachScopeListeners=function(){var t=this;t.$scope.$on("md-calendar-parent-changed",function(e,a){t.changeDate(a)}),t.$scope.$on("md-calendar-parent-action",e.bind(t,t.handleKeyEvent))}}(),function(){function t(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:a,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(t,e,a,n){var i=n[0],r=n[1],l=n[2];l.calendarCtrl=i,l.yearCtrl=r,l.generateContent(),t.$watch(function(){return l.offset},function(t,e){t!=e&&l.generateContent()})}}}function a(t,e,a){this.$element=t,this.dateUtil=e,this.dateLocale=a,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}e.module("material.components.datepicker").directive("mdCalendarYearBody",t),a.$inject=["$element","$$mdDateUtil","$mdDateLocale"],a.prototype.generateContent=function(){var t=this.dateUtil.incrementYears(this.yearCtrl.firstRenderableDate,this.offset);this.$element.empty(),this.$element.append(this.buildCalendarForYear(t)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},a.prototype.buildMonthCell=function(t,e){var a=this.calendarCtrl,n=this.yearCtrl,i=this.buildBlankCell(),r=new Date(t,e,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(r)),i.id=a.getDateId(r,"year"),i.setAttribute("data-timestamp",r.getTime()),this.dateUtil.isSameMonthAndYear(r,a.today)&&i.classList.add(a.TODAY_CLASS),this.dateUtil.isValidDate(a.selectedDate)&&this.dateUtil.isSameMonthAndYear(r,a.selectedDate)&&(i.classList.add(a.SELECTED_DATE_CLASS),i.setAttribute("aria-selected","true"));var l=this.dateLocale.shortMonths[e];if(this.dateUtil.isMonthWithinRange(r,a.minDate,a.maxDate)){var s=document.createElement("span");s.classList.add("md-calendar-date-selection-indicator"),s.textContent=l,i.appendChild(s),i.addEventListener("click",n.cellClickHandler),a.displayDate&&this.dateUtil.isSameMonthAndYear(r,a.displayDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=l;return i},a.prototype.buildBlankCell=function(){var t=document.createElement("td");return t.tabIndex=-1,t.classList.add("md-calendar-date"),t.setAttribute("role","gridcell"),t.setAttribute("tabindex","-1"),t},a.prototype.buildCalendarForYear=function(t){var e,a=t.getFullYear(),n=document.createDocumentFragment(),i=document.createElement("tr"),r=document.createElement("td");for(r.className="md-calendar-month-label",r.textContent=a,i.appendChild(r),e=0;e<6;e++)i.appendChild(this.buildMonthCell(a,e));n.appendChild(i);var l=document.createElement("tr");for(l.appendChild(this.buildBlankCell()),e=6;e<12;e++)l.appendChild(this.buildMonthCell(a,e));return n.appendChild(l),n}}(),function(){e.module("material.components.datepicker").config(["$provide",function(t){function e(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}e.prototype.$get=function(t,e){function a(t){if(!t)return"";var a=t.toLocaleTimeString(),n=t;return 0!=t.getHours()||a.indexOf("11:")===-1&&a.indexOf("23:")===-1||(n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),1,0,0)),e("date")(n,"M/d/yyyy")}function n(t){return new Date(t)}function i(t){t=t.trim();var e=/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;return e.test(t)}function r(t){return p.shortMonths[t.getMonth()]+" "+t.getFullYear()}function l(t){return p.months[t.getMonth()]+" "+t.getFullYear()}function s(t){return"Week "+t}function d(t){return[p.days[t.getDay()],p.months[t.getMonth()],p.dates[t.getDate()],t.getFullYear()].join(" ")}for(var o=t.DATETIME_FORMATS.SHORTDAY.map(function(t){return t.substring(0,1)}),c=Array(32),h=1;h<=31;h++)c[h]=h;var u="Calendar",m="Open calendar",p={months:this.months||t.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||t.DATETIME_FORMATS.SHORTMONTH,days:this.days||t.DATETIME_FORMATS.DAY,shortDays:this.shortDays||o,dates:this.dates||c,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||a,parseDate:this.parseDate||n,isDateComplete:this.isDateComplete||i,monthHeaderFormatter:this.monthHeaderFormatter||r,monthFormatter:this.monthFormatter||l,weekNumberFormatter:this.weekNumberFormatter||s,longDateFormatter:this.longDateFormatter||d,msgCalendar:this.msgCalendar||u,msgOpenCalendar:this.msgOpenCalendar||m};return p},e.prototype.$get.$inject=["$locale","$filter"],t.provider("$mdDateLocale",new e)}])}(),function(){e.module("material.components.datepicker").factory("$$mdDateUtil",function(){function t(t){return new Date(t.getFullYear(),t.getMonth(),1)}function a(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function n(t){return new Date(t.getFullYear(),t.getMonth()+1,1)}function i(t){return new Date(t.getFullYear(),t.getMonth()-1,1)}function r(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function l(t,e){return t.getDate()==e.getDate()&&r(t,e)}function s(t,e){var a=n(t);return r(a,e)}function d(t,e){var a=i(t);return r(e,a)}function o(t,e){return D((t.getTime()+e.getTime())/2)}function c(e){var a=t(e);return Math.floor((a.getDay()+e.getDate()-1)/7)}function h(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function u(t,e){var n=new Date(t.getFullYear(),t.getMonth()+e,1),i=a(n);return i<t.getDate()?n.setDate(i):n.setDate(t.getDate()),n}function m(t,e){return 12*(e.getFullYear()-t.getFullYear())+(e.getMonth()-t.getMonth())}function p(t){return new Date(t.getFullYear(),t.getMonth(),a(t))}function f(t){return null!=t&&t.getTime&&!isNaN(t.getTime())}function g(t){f(t)&&t.setHours(0,0,0,0)}function D(t){var a;return a=e.isUndefined(t)?new Date:new Date(t),g(a),a}function C(t,e,a){var n=D(t),i=f(e)?D(e):null,r=f(a)?D(a):null;return(!i||i<=n)&&(!r||r>=n)}function v(t,e){return u(t,12*e)}function y(t,e){return e.getFullYear()-t.getFullYear()}function $(t,e,a){var n=t;return e&&t<e&&(n=new Date(e.getTime())),a&&t>a&&(n=new Date(a.getTime())),n}function b(t){if(t&&t.hasAttribute("data-timestamp"))return Number(t.getAttribute("data-timestamp"))}function w(t,e,a){var n=t.getMonth(),i=t.getFullYear();return(!e||e.getFullYear()<i||e.getMonth()<=n)&&(!a||a.getFullYear()>i||a.getMonth()>=n)}return{getFirstDateOfMonth:t,getNumberOfDaysInMonth:a,getDateInNextMonth:n,getDateInPreviousMonth:i,isInNextMonth:s,isInPreviousMonth:d,getDateMidpoint:o,isSameMonthAndYear:r,getWeekOfMonth:c,incrementDays:h,incrementMonths:u,getLastDateOfMonth:p,isSameDay:l,getMonthDistance:m,isValidDate:f,setDateTimeToMidnight:g,createDateAtMidnight:D,isDateWithinRange:C,incrementYears:v,getYearDistance:y,clampDate:$,getTimestampFromNode:b,isMonthWithinRange:w}})}(),function(){function a(t,a,i){return{template:function(e,a){var n=a.mdHideIcons,i="all"===n||"calendar"===n?"":'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="'+t.mdCalendar+'"></md-icon></md-button>',r="all"===n||"triangle"===n?"":'<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>';return""+i+'<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)">'+r+'</div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}"md-min-date="ctrl.minDate"md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>'},require:["ngModel","mdDatepicker","?^mdInputContainer","?^form"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",currentView:"@mdCurrentView",dateFilter:"=mdDateFilter",isOpen:"=?mdIsOpen",debounceInterval:"=mdDebounceInterval"},controller:n,controllerAs:"ctrl",bindToController:!0,link:function(t,n,r,l){var o=l[0],c=l[1],h=l[2],u=l[3],m=a.parseAttributeBoolean(r.mdNoAsterisk);if(c.configureNgModel(o,h),h){var p=n[0].querySelector(".md-errors-spacer");p&&n.after(e.element("<div>").append(p)),h.setHasPlaceholder(r.mdPlaceholder),h.input=n,h.element.addClass(s).toggleClass(d,"calendar"!==r.mdHideIcons&&"all"!==r.mdHideIcons),h.label?m||r.$observe("required",function(t){h.label.toggleClass("md-required",!!t)}):i.expect(n,"aria-label",r.mdPlaceholder),t.$watch(h.isErrorGetter||function(){return o.$invalid&&(o.$touched||u&&u.$submitted)},h.setInvalid)}else if(u)var f=t.$watch(function(){return u.$submitted},function(t){t&&(c.updateErrorState(),f())})}}}function n(t,a,n,i,r,l,s,d,o,c,h){this.$window=i,this.dateLocale=d,this.dateUtil=o,this.$mdConstant=r,this.$mdUtil=s,this.$$rAF=c,this.documentElement=e.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=a[0].querySelector("input"),this.ngInputElement=e.element(this.inputElement),this.inputContainer=a[0].querySelector(".md-datepicker-input-container"),this.calendarPane=a[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=a[0].querySelector(".md-datepicker-button"),this.inputMask=a[0].querySelector(".md-datepicker-input-mask-opaque"),this.$element=a,this.$attrs=n,this.$scope=t,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(a[0].disabled||e.isString(n.disabled)),this.isCalendarOpen=!1,this.openOnFocus=n.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPane.id="md-date-pane"+s.nextUid(),this.bodyClickHandler=e.bind(this,this.handleBodyClick),this.windowEventName=h.isIos||h.isAndroid?"orientationchange":"resize",this.windowEventHandler=s.debounce(e.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=e.bind(this,this.handleWindowBlur),n.tabindex||a.attr("tabindex","-1"),l(a),l(e.element(this.calendarPane)),this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners();var u=this;t.$on("$destroy",function(){u.detachCalendarPane()}),n.mdIsOpen&&t.$watch("ctrl.isOpen",function(t){t?u.openCalendarPane({target:u.inputElement}):u.closeCalendarPane()})}e.module("material.components.datepicker").directive("mdDatepicker",a),a.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria"];var i=3,r="md-datepicker-invalid",l="md-datepicker-open",s="_md-datepicker-floating-label",d="_md-datepicker-has-calendar-icon",o=500,c=368,h=360;n.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$mdGesture"],n.prototype.configureNgModel=function(t,a){this.ngModelCtrl=t,this.mdInputContainer=a;var n=this;t.$render=function(){var t=n.ngModelCtrl.$viewValue;if(t&&!(t instanceof Date))throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: "+typeof t);n.date=t,n.inputElement.value=n.dateLocale.formatDate(t),n.mdInputContainer&&n.mdInputContainer.setHasValue(!!t),n.resizeInputElement(),n.updateErrorState()},t.$viewChangeListeners.unshift(e.bind(this,this.updateErrorState))},n.prototype.attachChangeListeners=function(){var t=this;t.$scope.$on("md-calendar-change",function(e,a){t.ngModelCtrl.$setViewValue(a),t.date=a,t.inputElement.value=t.dateLocale.formatDate(a),t.mdInputContainer&&t.mdInputContainer.setHasValue(!!a),t.closeCalendarPane(),t.resizeInputElement(),t.updateErrorState()}),t.ngInputElement.on("input",e.bind(t,t.resizeInputElement));var a=e.isDefined(this.debounceInterval)?this.debounceInterval:o;t.ngInputElement.on("input",t.$mdUtil.debounce(t.handleInputEvent,a,t))},n.prototype.attachInteractionListeners=function(){var t=this,a=this.$scope,n=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(e){e.altKey&&e.keyCode==n.DOWN_ARROW&&(t.openCalendarPane(e),a.$digest())}),t.openOnFocus&&(t.ngInputElement.on("focus",e.bind(t,t.openCalendarPane)),e.element(t.$window).on("blur",t.windowBlurHandler),a.$on("$destroy",function(){e.element(t.$window).off("blur",t.windowBlurHandler)})),a.$on("md-calendar-close",function(){t.closeCalendarPane()})},n.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},n.prototype.setDisabled=function(t){this.isDisabled=t,this.inputElement.disabled=t,this.calendarButton&&(this.calendarButton.disabled=t)},n.prototype.updateErrorState=function(t){var a=t||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(a)){if(a=this.dateUtil.createDateAtMidnight(a),this.dateUtil.isValidDate(this.minDate)){var n=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",a>=n)}if(this.dateUtil.isValidDate(this.maxDate)){var i=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",a<=i)}e.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(a))}else this.ngModelCtrl.$setValidity("valid",null==a);this.ngModelCtrl.$valid||this.inputContainer.classList.add(r)},n.prototype.clearErrorState=function(){this.inputContainer.classList.remove(r),["mindate","maxdate","filtered","valid"].forEach(function(t){this.ngModelCtrl.$setValidity(t,!0)},this)},n.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+i},n.prototype.handleInputEvent=function(){var t=this.inputElement.value,e=t?this.dateLocale.parseDate(t):null;this.dateUtil.setDateTimeToMidnight(e);var a=""==t||this.dateUtil.isValidDate(e)&&this.dateLocale.isDateComplete(t)&&this.isDateEnabled(e);a&&(this.ngModelCtrl.$setViewValue(e),this.date=e),this.updateErrorState(e)},n.prototype.isDateEnabled=function(t){return this.dateUtil.isDateWithinRange(t,this.minDate,this.maxDate)&&(!e.isFunction(this.dateFilter)||this.dateFilter(t))},n.prototype.attachCalendarPane=function(){var t=this.calendarPane,a=document.body;t.style.transform="",this.$element.addClass(l),this.mdInputContainer&&this.mdInputContainer.element.addClass(l),e.element(a).addClass("md-datepicker-is-showing");var n=this.inputContainer.getBoundingClientRect(),i=a.getBoundingClientRect(),r=n.top-i.top,s=n.left-i.left,d=i.top<0&&0==document.body.scrollTop?-i.top:document.body.scrollTop,o=i.left<0&&0==document.body.scrollLeft?-i.left:document.body.scrollLeft,u=d+this.$window.innerHeight,m=o+this.$window.innerWidth;if(s+h>m){if(m-h>0)s=m-h;else{s=o;var p=this.$window.innerWidth/h;t.style.transform="scale("+p+")"}t.classList.add("md-datepicker-pos-adjusted")}r+c>u&&u-c>d&&(r=u-c,t.classList.add("md-datepicker-pos-adjusted")),t.style.left=s+"px",t.style.top=r+"px",document.body.appendChild(t),this.inputMask.style.left=n.width+"px",this.$$rAF(function(){t.classList.add("md-pane-open")})},n.prototype.detachCalendarPane=function(){this.$element.removeClass(l),this.mdInputContainer&&this.mdInputContainer.element.removeClass(l),e.element(document.body).removeClass("md-datepicker-is-showing"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},n.prototype.openCalendarPane=function(e){if(!this.isCalendarOpen&&!this.isDisabled&&!this.inputFocusedOnWindowBlur){this.isCalendarOpen=this.isOpen=!0,this.calendarPaneOpenedFrom=e.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar(),this.evalAttr("ngFocus");var a=this;this.$mdUtil.nextTick(function(){a.documentElement.on("click touchstart",a.bodyClickHandler)},!1),
t.addEventListener(this.windowEventName,this.windowEventHandler)}},n.prototype.closeCalendarPane=function(){function e(){a.isCalendarOpen=a.isOpen=!1}if(this.isCalendarOpen){var a=this;a.detachCalendarPane(),a.ngModelCtrl.$setTouched(),a.evalAttr("ngBlur"),a.documentElement.off("click touchstart",a.bodyClickHandler),t.removeEventListener(a.windowEventName,a.windowEventHandler),a.calendarPaneOpenedFrom.focus(),a.calendarPaneOpenedFrom=null,a.openOnFocus?a.$mdUtil.nextTick(e):e()}},n.prototype.getCalendarCtrl=function(){return e.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},n.prototype.focusCalendar=function(){var t=this;this.$mdUtil.nextTick(function(){t.getCalendarCtrl().focus()},!1)},n.prototype.setFocused=function(t){t||this.ngModelCtrl.$setTouched(),this.openOnFocus||this.evalAttr(t?"ngFocus":"ngBlur"),this.isFocused=t},n.prototype.handleBodyClick=function(t){if(this.isCalendarOpen){var e=this.$mdUtil.getClosest(t.target,"md-calendar");e||this.closeCalendarPane(),this.$scope.$digest()}},n.prototype.handleWindowBlur=function(){this.inputFocusedOnWindowBlur=document.activeElement===this.inputElement},n.prototype.evalAttr=function(t){this.$attrs[t]&&this.$scope.$parent.$eval(this.$attrs[t])}}()}(window,window.angular);
{
"name": "angular-material-dialog",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-backdrop": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-backdrop": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -214,2 +214,65 @@ (function( window, angular, undefined ){

*
* ### Pre-Rendered Dialogs
* By using the `contentElement` option, it is possible to use an already existing element in the DOM.
*
* <hljs lang="js">
* $scope.showPrerenderedDialog = function() {
* $mdDialog.show({
* contentElement: '#myStaticDialog',
* parent: angular.element(document.body)
* });
* };
* </hljs>
*
* When using a string as value, `$mdDialog` will automatically query the DOM for the specified CSS selector.
*
* <hljs lang="html">
* <div style="visibility: hidden">
* <div class="md-dialog-container" id="myStaticDialog">
* <md-dialog>
* This is a pre-rendered dialog.
* </md-dialog>
* </div>
* </div>
* </hljs>
*
* **Notice**: It is important, to use the `.md-dialog-container` as the content element, otherwise the dialog
* will not show up.
*
* It also possible to use a DOM element for the `contentElement` option.
* - `contentElement: document.querySelector('#myStaticDialog')`
* - `contentElement: angular.element(TEMPLATE)`
*
* When using a `template` as content element, it will be not compiled upon open.
* This allows you to compile the element yourself and use it each time the dialog opens.
*
* ### Custom Presets
* Developers are also able to create their own preset, which can be easily used without repeating
* their options each time.
*
* <hljs lang="js">
* $mdDialogProvider.addPreset('testPreset', {
* options: function() {
* return {
* template:
* '<md-dialog>' +
* 'This is a custom preset' +
* '</md-dialog>',
* controllerAs: 'dialog',
* bindToController: true,
* clickOutsideToClose: true,
* escapeToClose: true
* };
* }
* });
* </hljs>
*
* After you created your preset at config phase, you can easily access it.
*
* <hljs lang="js">
* $mdDialog.show(
* $mdDialog.testPreset()
* );
* </hljs>
*
* ### JavaScript: promise API syntax, custom dialog template

@@ -402,2 +465,3 @@ * <hljs lang="js">

* - $mdDialogPreset#placeholder(string) - Sets the placeholder text for the input.
* - $mdDialogPreset#initialValue(string) - Sets the initial value for the prompt input.
* - $mdDialogPreset#ok(string) - Sets the prompt "Okay" button text.

@@ -426,2 +490,7 @@ * - $mdDialogPreset#cancel(string) - Sets the prompt "Cancel" button text.

* This template should **never** be constructed with any kind of user input or user data.
* - `contentElement` - `{string|Element}`: Instead of using a template, which will be compiled each time a
* dialog opens, you can also use a DOM element.<br/>
* * When specifying an element, which is present on the DOM, `$mdDialog` will temporary fetch the element into
* the dialog and restores it at the old DOM position upon close.
* * When specifying a string, the string be used as a CSS selector, to lookup for the element in the DOM.
* - `autoWrap` - `{boolean=}`: Whether or not to automatically wrap the template with a

@@ -466,8 +535,9 @@ * `<md-dialog>` tag if one is not provided. Defaults to true. Can be disabled if you provide a

* to the root element of the application.
* - `onShowing` `{function=} Callback function used to announce the show() action is
* - `onShowing` - `function(scope, element)`: Callback function used to announce the show() action is
* starting.
* - `onComplete` `{function=}`: Callback function used to announce when the show() action is
* - `onComplete` - `function(scope, element)`: Callback function used to announce when the show() action is
* finished.
* - `onRemoving` `{function=}`: Callback function used to announce the close/hide() action is
* starting. This allows developers to run custom animations in parallel the close animations.
* - `onRemoving` - `function(element, removePromise)`: Callback function used to announce the
* close/hide() action is starting. This allows developers to run custom animations
* in parallel the close animations.
* - `fullscreen` `{boolean=}`: An option to apply `.md-dialog-fullscreen` class on open.

@@ -506,8 +576,8 @@ * @returns {promise} A promise that can be resolved with `$mdDialog.hide()` or

advancedDialogOptions.$inject = ["$mdDialog", "$mdTheming", "$mdConstant"];
dialogDefaultOptions.$inject = ["$mdDialog", "$mdAria", "$mdUtil", "$mdConstant", "$animate", "$document", "$window", "$rootElement", "$log", "$injector"];
advancedDialogOptions.$inject = ["$mdDialog", "$mdConstant"];
dialogDefaultOptions.$inject = ["$mdDialog", "$mdAria", "$mdUtil", "$mdConstant", "$animate", "$document", "$window", "$rootElement", "$log", "$injector", "$mdTheming"];
return $$interimElementProvider('$mdDialog')
.setDefaults({
methods: ['disableParentScroll', 'hasBackdrop', 'clickOutsideToClose', 'escapeToClose',
'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen'],
'targetEvent', 'closeTo', 'openFrom', 'parent', 'fullscreen', 'contentElement'],
options: dialogDefaultOptions

@@ -526,3 +596,3 @@ })

.addPreset('prompt', {
methods: ['title', 'htmlContent', 'textContent', 'content', 'placeholder', 'ariaLabel',
methods: ['title', 'htmlContent', 'textContent', 'initialValue', 'content', 'placeholder', 'ariaLabel',
'ok', 'cancel', 'theme', 'css'],

@@ -533,3 +603,3 @@ options: advancedDialogOptions

/* ngInject */
function advancedDialogOptions($mdDialog, $mdTheming, $mdConstant) {
function advancedDialogOptions($mdDialog, $mdConstant) {
return {

@@ -540,9 +610,10 @@ template: [

' <h2 class="md-title">{{ dialog.title }}</h2>',
' <div ng-if="::dialog.mdHtmlContent" class="_md-dialog-content-body" ',
' <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ',
' ng-bind-html="::dialog.mdHtmlContent"></div>',
' <div ng-if="::!dialog.mdHtmlContent" class="_md-dialog-content-body">',
' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">',
' <p>{{::dialog.mdTextContent}}</p>',
' </div>',
' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',
' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">',
' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" ' +
' placeholder="{{::dialog.placeholder}}">',
' </md-input-container>',

@@ -562,4 +633,10 @@ ' </md-dialog-content>',

controller: function mdDialogCtrl() {
var isPrompt = this.$type == 'prompt';
if (isPrompt && this.initialValue) {
this.result = this.initialValue;
}
this.hide = function() {
$mdDialog.hide(this.$type === 'prompt' ? this.result : true);
$mdDialog.hide(isPrompt ? this.result : true);
};

@@ -577,3 +654,2 @@ this.abort = function() {

bindToController: true,
theme: $mdTheming.defaultTheme()
};

@@ -583,6 +659,9 @@ }

/* ngInject */
function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document, $window, $rootElement, $log, $injector) {
function dialogDefaultOptions($mdDialog, $mdAria, $mdUtil, $mdConstant, $animate, $document, $window, $rootElement,
$log, $injector, $mdTheming) {
return {
hasBackdrop: true,
isolateScope: true,
onCompiling: beforeCompile,
onShow: onShow,

@@ -594,2 +673,3 @@ onShowing: beforeShow,

targetEvent: null,
contentElement: null,
closeTo: null,

@@ -621,3 +701,11 @@ openFrom: null,

function beforeCompile(options) {
// Automatically apply the theme, if the user didn't specify a theme explicitly.
// Those option changes need to be done, before the compilation has started, because otherwise
// the option changes will be not available in the $mdCompilers locales.
detectTheming(options);
}
function beforeShow(scope, element, options, controller) {
if (controller) {

@@ -642,9 +730,41 @@ controller.mdHtmlContent = controller.htmlContent || options.htmlContent || '';

if (options.contentElement) {
var contentEl = options.contentElement;
if (angular.isString(contentEl)) {
contentEl = document.querySelector(contentEl);
options.elementInsertionSibling = contentEl.nextElementSibling;
options.elementInsertionParent = contentEl.parentNode;
} else {
contentEl = contentEl[0] || contentEl;
// When the element is not visible in the DOM, then we can treat is as same
// as a normal dialog would do. Removing it at close etc.
// ---
// When the element is visible in the DOM, then we restore it at close of the dialog.
if (document.contains(contentEl)) {
options.elementInsertionSibling = contentEl.nextElementSibling;
options.elementInsertionParent = contentEl.parentNode;
}
}
options.elementInsertionEntry = contentEl;
element = angular.element(contentEl);
}
var dialogElement = element.find('md-dialog');
// Once a dialog has `ng-cloak` applied on his template the dialog animation will not work properly.
// This is a very common problem, so we have to notify the developer about this.
if (dialogElement.hasClass('ng-cloak')) {
var message = '$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.';
$log.warn( message, element[0] );
}
captureParentAndFromToElements(options);
configureAria(element.find('md-dialog'), options);
configureAria(dialogElement, options);
showBackdrop(scope, element, options);
activateListeners(element, options);
return dialogPopIn(element, options)
.then(function() {
activateListeners(element, options);
lockScreenReader(element, options);

@@ -720,2 +840,22 @@ warnDeprecatedActions();

function removeContentElement() {
if (!options.contentElement) return;
options.reverseContainerStretch();
if (!options.elementInsertionParent) {
// When the contentElement has no parent, then it's a virtual DOM element, which should
// be removed at close, as same as normal templates inside of a dialog.
options.elementInsertionEntry.parentNode.removeChild(options.elementInsertionEntry);
} else if (!options.elementInsertionSibling) {
// When the contentElement doesn't have any sibling, then it can be simply appended to the
// parent, because it plays no role, which index it had before.
options.elementInsertionParent.appendChild(options.elementInsertionEntry);
} else {
// When the contentElement has a sibling, which marks the previous position of the contentElement
// in the DOM, we insert it correctly before the sibling, to have the same index as before.
options.elementInsertionParent.insertBefore(options.elementInsertionEntry, options.elementInsertionSibling);
}
}
/**

@@ -726,3 +866,8 @@ * Detach the element

angular.element($document[0].body).removeClass('md-dialog-is-showing');
element.remove();
// Only remove the element, if it's not provided through the contentElement option.
if (!options.contentElement) {
element.remove();
} else {
removeContentElement();
}

@@ -733,2 +878,18 @@ if (!options.$destroy) options.origin.focus();

function detectTheming(options) {
// Only detect the theming, if the developer didn't specify the theme specifically.
if (options.theme) return;
options.theme = $mdTheming.defaultTheme();
if (options.targetEvent && options.targetEvent.target) {
var targetEl = angular.element(options.targetEvent.target);
// Once the user specifies a targetEvent, we will automatically try to find the correct
// nested theme.
options.theme = (targetEl.controller('mdTheme') || {}).$mdTheme || options.theme;
}
}
/**

@@ -754,2 +915,3 @@ * Capture originator/trigger/from/to element information (if available)

/**

@@ -798,3 +960,3 @@ * Identify the bounding RECT for the target element

var window = angular.element($window);
var onWindowResize = $mdUtil.debounce(function(){
var onWindowResize = $mdUtil.debounce(function() {
stretchDialogContainerToViewport(element, options);

@@ -898,3 +1060,3 @@ }, 60);

if (options.hasBackdrop) {
options.backdrop = $mdUtil.createBackdrop(scope, "_md-dialog-backdrop md-opaque");
options.backdrop = $mdUtil.createBackdrop(scope, "md-dialog-backdrop md-opaque");
$animate.enter(options.backdrop, options.parent);

@@ -961,3 +1123,3 @@ }

topFocusTrap = document.createElement('div');
topFocusTrap.classList.add('_md-dialog-focus-trap');
topFocusTrap.classList.add('md-dialog-focus-trap');
topFocusTrap.tabIndex = 0;

@@ -1030,2 +1192,7 @@

var previousStyles = {
top: container.css('top'),
height: container.css('height')
};
container.css({

@@ -1036,3 +1203,8 @@ top: (isFixed ? $mdUtil.scrollTop(options.parent) : 0) + 'px',

return container;
return function() {
// Reverts the modified styles back to the previous values.
// This is needed for contentElements, which should have the same styles after close
// as before.
container.css(previousStyles);
};
}

@@ -1046,3 +1218,3 @@

options.parent.append(container);
stretchDialogContainerToViewport(container, options);
options.reverseContainerStretch = stretchDialogContainerToViewport(container, options);

@@ -1052,3 +1224,3 @@ var dialogEl = container.find('md-dialog');

var buildTranslateToOrigin = animator.calculateZoomToOrigin;
var translateOptions = {transitionInClass: '_md-transition-in', transitionOutClass: '_md-transition-out'};
var translateOptions = {transitionInClass: 'md-transition-in', transitionOutClass: 'md-transition-out'};
var from = animator.toTransformCss(buildTranslateToOrigin(dialogEl, options.openFrom || options.origin));

@@ -1064,3 +1236,3 @@ var to = animator.toTransformCss(""); // defaults to center display (or parent or $rootElement)

.then(function(animateReversal) {
// Build a reversal translate function synched to this translation...
// Build a reversal translate function synced to this translation...
options.reverseAnimate = function() {

@@ -1071,3 +1243,3 @@ delete options.reverseAnimate;

// Using the opposite classes to create a close animation to the closeTo element
translateOptions = {transitionInClass: '_md-transition-out', transitionOutClass: '_md-transition-in'};
translateOptions = {transitionInClass: 'md-transition-out', transitionOutClass: 'md-transition-in'};
from = to;

@@ -1081,3 +1253,3 @@ to = animator.toTransformCss(buildTranslateToOrigin(dialogEl, options.closeTo));

return animateReversal(
animator.toTransformCss(
to = animator.toTransformCss(
// in case the origin element has moved or is hidden,

@@ -1090,2 +1262,12 @@ // let's recalculate the translateCSS

};
// Builds a function, which clears the animations / transforms of the dialog element.
// Required for contentElements, which should not have the the animation styling after
// the dialog is closed.
options.clearAnimate = function() {
delete options.clearAnimate;
return animator
.translate3d(dialogEl, to, animator.toTransformCss(''), {});
};
return true;

@@ -1099,3 +1281,9 @@ });

function dialogPopOut(container, options) {
return options.reverseAnimate();
return options.reverseAnimate().then(function() {
if (options.contentElement) {
// When we use a contentElement, we want the element to be the same as before.
// That means, that we have to clear all the animation properties, like transform.
options.clearAnimate();
}
});
}

@@ -1102,0 +1290,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function o(e,n,o){return{restrict:"E",link:function(i,a){a.addClass("_md"),n(a),e(function(){function e(){a.toggleClass("md-content-overflow",r.scrollHeight>r.clientHeight)}var n,r=a[0].querySelector("md-dialog-content");r&&(n=r.getElementsByTagName("img"),e(),t.element(n).on("load",e)),i.$on("$destroy",function(){o.destroy(a)})})}}}function i(e){function o(e,t,n){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',' <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">',' <h2 class="md-title">{{ dialog.title }}</h2>',' <div ng-if="::dialog.mdHtmlContent" class="_md-dialog-content-body" ',' ng-bind-html="::dialog.mdHtmlContent"></div>',' <div ng-if="::!dialog.mdHtmlContent" class="_md-dialog-content-body">'," <p>{{::dialog.mdTextContent}}</p>"," </div>",' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">'," </md-input-container>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary">'," {{ dialog.cancel }}"," </md-button>",' <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type===\'alert\'">'," {{ dialog.ok }}"," </md-button>"," </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:function(){this.hide=function(){e.hide("prompt"===this.$type?this.result:!0)},this.abort=function(){e.cancel()},this.keypress=function(t){t.keyCode===n.KEY_CODE.ENTER&&e.hide(this.result)}},controllerAs:"dialog",bindToController:!0,theme:t.defaultTheme()}}function i(e,o,i,d,l,c,s,m,u,f){function g(e,t,n,o){if(o){if(o.mdHtmlContent=o.htmlContent||n.htmlContent||"",o.mdTextContent=o.textContent||n.textContent||o.content||n.content||"",o.mdHtmlContent&&!f.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(o.mdHtmlContent&&o.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}}function p(e,n,o,a){function r(){n[0].querySelector(".md-actions")&&u.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>.")}function d(){function e(){var e=n[0].querySelector(".dialog-close");if(!e){var o=n[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=o[o.length-1]}return t.element(e)}if(o.focusOnOpen){var a=i.findFocusTarget(n)||e();a.focus()}}return t.element(c[0].body).addClass("md-dialog-is-showing"),C(o),y(n.find("md-dialog"),o),v(e,n,o),T(n,o).then(function(){b(n,o),k(n,o),r(),d()})}function h(e,n,o){function i(){return S(n,o)}function d(){t.element(c[0].body).removeClass("md-dialog-is-showing"),n.remove(),o.$destroy||o.origin.focus()}return o.deactivateListeners(),o.unlockScreenReader(),o.hideBackdrop(o.$destroy),a&&a.parentNode&&a.parentNode.removeChild(a),r&&r.parentNode&&r.parentNode.removeChild(r),o.$destroy?d():i().then(d)}function C(e){function o(e,o){var i=t.element(e||{});if(i&&i.length){var a={top:0,left:0,height:0,width:0},r=t.isFunction(i[0].getBoundingClientRect);return t.extend(o||{},{element:r?i:n,bounds:r?i[0].getBoundingClientRect():t.extend({},a,i[0]),focus:t.bind(i,i.focus)})}}function i(e,n){return t.isString(e)&&(e=c[0].querySelector(e)),t.element(e||n)}e.origin=t.extend({element:null,bounds:null,focus:t.noop},e.origin||{}),e.parent=i(e.parent,m),e.closeTo=o(i(e.closeTo)),e.openFrom=o(i(e.openFrom)),e.targetEvent&&(e.origin=o(e.targetEvent.target,e.origin))}function b(n,o){var a=t.element(s),r=i.debounce(function(){$(n,o)},60),l=[],c=function(){var t="alert"==o.$type?e.hide:e.cancel;i.nextTick(t,!0)};if(o.escapeToClose){var m=o.parent,u=function(e){e.keyCode===d.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),c())};n.on("keydown",u),m.on("keydown",u),l.push(function(){n.off("keydown",u),m.off("keydown",u)})}if(a.on("resize",r),l.push(function(){a.off("resize",r)}),o.clickOutsideToClose){var f,g=n,p=function(e){f=e.target},h=function(e){f===g[0]&&e.target===g[0]&&(e.stopPropagation(),e.preventDefault(),c())};g.on("mousedown",p),g.on("mouseup",h),l.push(function(){g.off("mousedown",p),g.off("mouseup",h)})}o.deactivateListeners=function(){l.forEach(function(e){e()}),o.deactivateListeners=null}}function v(e,t,n){n.disableParentScroll&&(n.restoreScroll=i.disableScrollAround(t,n.parent)),n.hasBackdrop&&(n.backdrop=i.createBackdrop(e,"_md-dialog-backdrop md-opaque"),l.enter(n.backdrop,n.parent)),n.hideBackdrop=function(e){n.backdrop&&(e?n.backdrop.remove():l.leave(n.backdrop)),n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),n.hideBackdrop=null}}function y(e,t){var n="alert"===t.$type?"alertdialog":"dialog",d=e.find("md-dialog-content"),l=e.attr("id"),c="dialogContent_"+(l||i.nextUid());e.attr({role:n,tabIndex:"-1"}),0===d.length&&(d=e,l&&(c=l)),d.attr("id",c),e.attr("aria-describedby",c),t.ariaLabel?o.expect(e,"aria-label",t.ariaLabel):o.expectAsync(e,"aria-label",function(){var e=d.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")}),a=document.createElement("div"),a.classList.add("_md-dialog-focus-trap"),a.tabIndex=0,r=a.cloneNode(!1);var s=function(){e.focus()};a.addEventListener("focus",s),r.addEventListener("focus",s),e[0].parentNode.insertBefore(a,e[0]),e.after(r)}function k(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,i=0;i<t.length;i++)e===t[i]||x(t[i],["SCRIPT","STYLE"])||t[i].setAttribute("aria-hidden",o);n(e=e.parentNode)}}var o=!0;n(e[0]),t.unlockScreenReader=function(){o=!1,n(e[0]),t.unlockScreenReader=null}}function $(e,t){var n="fixed"==s.getComputedStyle(c[0].body).position,o=t.backdrop?s.getComputedStyle(t.backdrop[0]):null,a=o?Math.min(c[0].body.clientHeight,Math.ceil(Math.abs(parseInt(o.height,10)))):0;return e.css({top:(n?i.scrollTop(t.parent):0)+"px",height:a?a+"px":"100%"}),e}function T(e,t){t.parent.append(e),$(e,t);var n=e.find("md-dialog"),o=i.dom.animator,a=o.calculateZoomToOrigin,r={transitionInClass:"_md-transition-in",transitionOutClass:"_md-transition-out"},d=o.toTransformCss(a(n,t.openFrom||t.origin)),l=o.toTransformCss("");return t.fullscreen&&n.addClass("md-dialog-fullscreen"),o.translate3d(n,d,l,r).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(r={transitionInClass:"_md-transition-out",transitionOutClass:"_md-transition-in"},d=l,l=o.toTransformCss(a(n,t.closeTo)),o.translate3d(n,d,l,r)):e(o.toTransformCss(a(n,t.origin)))},!0})}function S(e,t){return t.reverseAnimate()}function x(e,t){return-1!==t.indexOf(e.nodeName)?!0:void 0}return{hasBackdrop:!0,isolateScope:!0,onShow:p,onShowing:g,onRemove:h,clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){function n(e){return t.autoWrap&&!/<\/md-dialog>/g.test(e)?"<md-dialog>"+(e||"")+"</md-dialog>":e||""}return'<div class="md-dialog-container" tabindex="-1">'+n(e)+"</div>"}}}var a,r;return o.$inject=["$mdDialog","$mdTheming","$mdConstant"],i.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen"],options:i}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:o}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:o}).addPreset("prompt",{methods:["title","htmlContent","textContent","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:o})}t.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",o).provider("$mdDialog",i),o.$inject=["$$rAF","$mdTheming","$mdDialog"],i.$inject=["$$interimElementProvider"]}(window,window.angular);
!function(e,t,n){"use strict";function o(e,n,o){return{restrict:"E",link:function(i,r){r.addClass("_md"),n(r),e(function(){function e(){r.toggleClass("md-content-overflow",a.scrollHeight>a.clientHeight)}var n,a=r[0].querySelector("md-dialog-content");a&&(n=a.getElementsByTagName("img"),e(),t.element(n).on("load",e)),i.$on("$destroy",function(){o.destroy(r)})})}}}function i(e){function o(e,t){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',' <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">',' <h2 class="md-title">{{ dialog.title }}</h2>',' <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ',' ng-bind-html="::dialog.mdHtmlContent"></div>',' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">'," <p>{{::dialog.mdTextContent}}</p>"," </div>",' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}">'," </md-input-container>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary">'," {{ dialog.cancel }}"," </md-button>",' <md-button ng-click="dialog.hide()" class="md-primary" md-autofocus="dialog.$type===\'alert\'">'," {{ dialog.ok }}"," </md-button>"," </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:function(){var n="prompt"==this.$type;n&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){e.hide(!n||this.result)},this.abort=function(){e.cancel()},this.keypress=function(n){n.keyCode===t.KEY_CODE.ENTER&&e.hide(this.result)}},controllerAs:"dialog",bindToController:!0}}function i(e,o,i,l,d,s,c,m,u,g,f){function p(e){b(e)}function h(e,t,n,o){if(o){if(o.mdHtmlContent=o.htmlContent||n.htmlContent||"",o.mdTextContent=o.textContent||n.textContent||o.content||n.content||"",o.mdHtmlContent&&!g.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(o.mdHtmlContent&&o.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}}function C(e,n,o,r){function a(){n[0].querySelector(".md-actions")&&u.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>.")}function l(){function e(){var e=n[0].querySelector(".dialog-close");if(!e){var o=n[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=o[o.length-1]}return t.element(e)}if(o.focusOnOpen){var r=i.findFocusTarget(n)||e();r.focus()}}if(t.element(s[0].body).addClass("md-dialog-is-showing"),o.contentElement){var d=o.contentElement;t.isString(d)?(d=document.querySelector(d),o.elementInsertionSibling=d.nextElementSibling,o.elementInsertionParent=d.parentNode):(d=d[0]||d,document.contains(d)&&(o.elementInsertionSibling=d.nextElementSibling,o.elementInsertionParent=d.parentNode)),o.elementInsertionEntry=d,n=t.element(d)}var c=n.find("md-dialog");if(c.hasClass("ng-cloak")){var m="$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.";u.warn(m,n[0])}return y(o),E(c,o),$(e,n,o),k(n,o),x(n,o).then(function(){S(n,o),a(),l()})}function v(e,n,o){function i(){return w(n,o)}function l(){o.contentElement&&(o.reverseContainerStretch(),o.elementInsertionParent?o.elementInsertionSibling?o.elementInsertionParent.insertBefore(o.elementInsertionEntry,o.elementInsertionSibling):o.elementInsertionParent.appendChild(o.elementInsertionEntry):o.elementInsertionEntry.parentNode.removeChild(o.elementInsertionEntry))}function d(){t.element(s[0].body).removeClass("md-dialog-is-showing"),o.contentElement?l():n.remove(),o.$destroy||o.origin.focus()}return o.deactivateListeners(),o.unlockScreenReader(),o.hideBackdrop(o.$destroy),r&&r.parentNode&&r.parentNode.removeChild(r),a&&a.parentNode&&a.parentNode.removeChild(a),o.$destroy?d():i().then(d)}function b(e){if(!e.theme&&(e.theme=f.defaultTheme(),e.targetEvent&&e.targetEvent.target)){var n=t.element(e.targetEvent.target);e.theme=(n.controller("mdTheme")||{}).$mdTheme||e.theme}}function y(e){function o(e,o){var i=t.element(e||{});if(i&&i.length){var r={top:0,left:0,height:0,width:0},a=t.isFunction(i[0].getBoundingClientRect);return t.extend(o||{},{element:a?i:n,bounds:a?i[0].getBoundingClientRect():t.extend({},r,i[0]),focus:t.bind(i,i.focus)})}}function i(e,n){return t.isString(e)&&(e=s[0].querySelector(e)),t.element(e||n)}e.origin=t.extend({element:null,bounds:null,focus:t.noop},e.origin||{}),e.parent=i(e.parent,m),e.closeTo=o(i(e.closeTo)),e.openFrom=o(i(e.openFrom)),e.targetEvent&&(e.origin=o(e.targetEvent.target,e.origin))}function k(n,o){var r=t.element(c),a=i.debounce(function(){T(n,o)},60),d=[],s=function(){var t="alert"==o.$type?e.hide:e.cancel;i.nextTick(t,!0)};if(o.escapeToClose){var m=o.parent,u=function(e){e.keyCode===l.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),s())};n.on("keydown",u),m.on("keydown",u),d.push(function(){n.off("keydown",u),m.off("keydown",u)})}if(r.on("resize",a),d.push(function(){r.off("resize",a)}),o.clickOutsideToClose){var g,f=n,p=function(e){g=e.target},h=function(e){g===f[0]&&e.target===f[0]&&(e.stopPropagation(),e.preventDefault(),s())};f.on("mousedown",p),f.on("mouseup",h),d.push(function(){f.off("mousedown",p),f.off("mouseup",h)})}o.deactivateListeners=function(){d.forEach(function(e){e()}),o.deactivateListeners=null}}function $(e,t,n){n.disableParentScroll&&(n.restoreScroll=i.disableScrollAround(t,n.parent)),n.hasBackdrop&&(n.backdrop=i.createBackdrop(e,"md-dialog-backdrop md-opaque"),d.enter(n.backdrop,n.parent)),n.hideBackdrop=function(e){n.backdrop&&(e?n.backdrop.remove():d.leave(n.backdrop)),n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),n.hideBackdrop=null}}function E(e,t){var n="alert"===t.$type?"alertdialog":"dialog",l=e.find("md-dialog-content"),d=e.attr("id"),s="dialogContent_"+(d||i.nextUid());e.attr({role:n,tabIndex:"-1"}),0===l.length&&(l=e,d&&(s=d)),l.attr("id",s),e.attr("aria-describedby",s),t.ariaLabel?o.expect(e,"aria-label",t.ariaLabel):o.expectAsync(e,"aria-label",function(){var e=l.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")}),r=document.createElement("div"),r.classList.add("md-dialog-focus-trap"),r.tabIndex=0,a=r.cloneNode(!1);var c=function(){e.focus()};r.addEventListener("focus",c),a.addEventListener("focus",c),e[0].parentNode.insertBefore(r,e[0]),e.after(a)}function S(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,i=0;i<t.length;i++)e===t[i]||I(t[i],["SCRIPT","STYLE"])||t[i].setAttribute("aria-hidden",o);n(e=e.parentNode)}}var o=!0;n(e[0]),t.unlockScreenReader=function(){o=!1,n(e[0]),t.unlockScreenReader=null}}function T(e,t){var n="fixed"==c.getComputedStyle(s[0].body).position,o=t.backdrop?c.getComputedStyle(t.backdrop[0]):null,r=o?Math.min(s[0].body.clientHeight,Math.ceil(Math.abs(parseInt(o.height,10)))):0,a={top:e.css("top"),height:e.css("height")};return e.css({top:(n?i.scrollTop(t.parent):0)+"px",height:r?r+"px":"100%"}),function(){e.css(a)}}function x(e,t){t.parent.append(e),t.reverseContainerStretch=T(e,t);var n=e.find("md-dialog"),o=i.dom.animator,r=o.calculateZoomToOrigin,a={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},l=o.toTransformCss(r(n,t.openFrom||t.origin)),d=o.toTransformCss("");return t.fullscreen&&n.addClass("md-dialog-fullscreen"),o.translate3d(n,l,d,a).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(a={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},l=d,d=o.toTransformCss(r(n,t.closeTo)),o.translate3d(n,l,d,a)):e(d=o.toTransformCss(r(n,t.origin)))},t.clearAnimate=function(){return delete t.clearAnimate,o.translate3d(n,d,o.toTransformCss(""),{})},!0})}function w(e,t){return t.reverseAnimate().then(function(){t.contentElement&&t.clearAnimate()})}function I(e,t){if(t.indexOf(e.nodeName)!==-1)return!0}return{hasBackdrop:!0,isolateScope:!0,onCompiling:p,onShow:C,onShowing:h,onRemove:v,clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,contentElement:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){function n(e){return t.autoWrap&&!/<\/md-dialog>/g.test(e)?"<md-dialog>"+(e||"")+"</md-dialog>":e||""}return'<div class="md-dialog-container" tabindex="-1">'+n(e)+"</div>"}}}var r,a;return o.$inject=["$mdDialog","$mdConstant"],i.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","contentElement"],options:i}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:o}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:o}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:o})}t.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",o).provider("$mdDialog",i),o.$inject=["$$rAF","$mdTheming","$mdDialog"],i.$inject=["$$interimElementProvider"]}(window,window.angular);
{
"name": "angular-material-divider",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -8,0 +8,0 @@ (function( window, angular, undefined ){

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(i,e,n){"use strict";function r(i){return{restrict:"E",link:i}}e.module("material.components.divider",["material.core"]).directive("mdDivider",r),r.$inject=["$mdTheming"]}(window,window.angular);
{
"name": "angular-material-fabActions",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -37,3 +37,3 @@ (function( window, angular, undefined ){

*/
function MdFabActionsDirective() {
function MdFabActionsDirective($mdUtil) {
return {

@@ -47,8 +47,4 @@ restrict: 'E',

var hasNgRepeat = false;
var hasNgRepeat = $mdUtil.prefixer().hasAttribute(children, 'ng-repeat');
angular.forEach(['', 'data-', 'x-'], function(prefix) {
hasNgRepeat = hasNgRepeat || (children.attr(prefix + 'ng-repeat') ? true : false);
});
// Support both ng-repeat and static content

@@ -64,2 +60,3 @@ if (hasNgRepeat) {

}
MdFabActionsDirective.$inject = ["$mdUtil"];

@@ -66,0 +63,0 @@ })();

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(a,i,t){"use strict";!function(){function a(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(a,t){var n=a.children(),e=!1;i.forEach(["","data-","x-"],function(a){e=e||!!n.attr(a+"ng-repeat")}),e?n.addClass("md-fab-action-item"):n.wrap('<div class="md-fab-action-item">')}}}i.module("material.components.fabActions",["material.core"]).directive("mdFabActions",a)}()}(window,window.angular);
!function(i,t,e){"use strict";!function(){function i(i){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(t,e){var a=t.children(),n=i.prefixer().hasAttribute(a,"ng-repeat");n?a.addClass("md-fab-action-item"):a.wrap('<div class="md-fab-action-item">')}}}t.module("material.components.fabActions",["material.core"]).directive("mdFabActions",i),i.$inject=["$mdUtil"]}()}(window,window.angular);
{
"name": "angular-material-fabSpeedDial",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -57,3 +57,3 @@ (function( window, angular, undefined ){

// Add an animations waiting class so we know not to run
$element.addClass('_md-animations-waiting');
$element.addClass('md-animations-waiting');
}

@@ -158,3 +158,3 @@

// Remove the waiting class
$element.removeClass('_md-animations-waiting');
$element.removeClass('md-animations-waiting');
});

@@ -330,3 +330,2 @@ }

'material.components.fabShared',
'material.components.fabTrigger',
'material.components.fabActions'

@@ -437,3 +436,3 @@ ])

// Don't run if we are still waiting and we are not ready
if (element.hasClass('_md-animations-waiting') && !element.hasClass('_md-animations-ready')) {
if (element.hasClass('md-animations-waiting') && !element.hasClass('_md-animations-ready')) {
return;

@@ -440,0 +439,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(n,e,t){"use strict";!function(){function n(n,t,i,o,a,r){function c(){_.direction=_.direction||"down",_.isOpen=_.isOpen||!1,d(),t.addClass("_md-animations-waiting")}function s(){var i=["click","focusin","focusout"];e.forEach(i,function(n){t.on(n,l)}),n.$on("$destroy",function(){e.forEach(i,function(n){t.off(n,l)}),p()})}function l(n){"click"==n.type&&$(n),"focusout"!=n.type||F||(F=r(function(){_.close()},100,!1)),"focusin"==n.type&&F&&(r.cancel(F),F=null)}function d(){_.currentActionIndex=-1}function u(){n.$watch("vm.direction",function(n,e){i.removeClass(t,"md-"+e),i.addClass(t,"md-"+n),d()});var e,o;n.$watch("vm.isOpen",function(n){d(),e&&o||(e=D(),o=I()),n?m():p();var a=n?"md-is-open":"",r=n?"":"md-is-open";e.attr("aria-haspopup",!0),e.attr("aria-expanded",n),o.attr("aria-hidden",!n),i.setClass(t,a,r)})}function f(){t[0].scrollHeight>0?i.addClass(t,"_md-animations-ready").then(function(){t.removeClass("_md-animations-waiting")}):10>k&&(r(f,100),k+=1)}function m(){t.on("keydown",h),o.nextTick(function(){e.element(document).on("click touchend",g)})}function p(){t.off("keydown",h),e.element(document).off("click touchend",g)}function g(n){if(n.target){var e=o.getClosest(n.target,"md-fab-trigger"),t=o.getClosest(n.target,"md-fab-actions");e||t||_.close()}}function h(n){switch(n.which){case a.KEY_CODE.ESCAPE:return _.close(),n.preventDefault(),!1;case a.KEY_CODE.LEFT_ARROW:return A(n),!1;case a.KEY_CODE.UP_ARROW:return O(n),!1;case a.KEY_CODE.RIGHT_ARROW:return w(n),!1;case a.KEY_CODE.DOWN_ARROW:return E(n),!1}}function v(n){C(n,-1)}function b(n){C(n,1)}function C(n,t){var i=y();_.currentActionIndex=_.currentActionIndex+t,_.currentActionIndex=Math.min(i.length-1,_.currentActionIndex),_.currentActionIndex=Math.max(0,_.currentActionIndex);var o=e.element(i[_.currentActionIndex]).children()[0];e.element(o).attr("tabindex",0),o.focus(),n.preventDefault(),n.stopImmediatePropagation()}function y(){var n=I()[0].querySelectorAll(".md-fab-action-item");return e.forEach(n,function(n){e.element(e.element(n).children()[0]).attr("tabindex",-1)}),n}function A(n){"left"===_.direction?b(n):v(n)}function O(n){"down"===_.direction?v(n):b(n)}function w(n){"left"===_.direction?v(n):b(n)}function E(n){"up"===_.direction?v(n):b(n)}function x(n){return o.getClosest(n,"md-fab-trigger")}function S(n){return o.getClosest(n,"md-fab-actions")}function $(n){x(n.target)&&_.toggle(),S(n.target)&&_.close()}function D(){return t.find("md-fab-trigger")}function I(){return t.find("md-fab-actions")}var _=this;_.open=function(){n.$evalAsync("vm.isOpen = true")},_.close=function(){n.$evalAsync("vm.isOpen = false"),t.find("md-fab-trigger")[0].focus()},_.toggle=function(){n.$evalAsync("vm.isOpen = !vm.isOpen")},c(),s(),u();var k=0;f();var F}e.module("material.components.fabShared",["material.core"]).controller("MdFabController",n),n.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"]}(),function(){function t(){function n(n,e){e.prepend('<div class="_md-css-variables"></div>')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:n}}function i(t){function i(n){t(n,a,!1)}function o(t){if(!t.hasClass("_md-animations-waiting")||t.hasClass("_md-animations-ready")){var i=t[0],o=t.controller("mdFabSpeedDial"),a=i.querySelectorAll(".md-fab-action-item"),r=i.querySelector("md-fab-trigger"),c=i.querySelector("._md-css-variables"),s=parseInt(n.getComputedStyle(c).zIndex);e.forEach(a,function(n,e){var t=n.style;t.transform=t.webkitTransform="",t.transitionDelay="",t.opacity=1,t.zIndex=a.length-e+s}),r.style.zIndex=s+a.length+1,o.isOpen||e.forEach(a,function(n,e){var t,i,a=n.style,c=(r.clientHeight-n.clientHeight)/2,s=(r.clientWidth-n.clientWidth)/2;switch(o.direction){case"up":t=n.scrollHeight*(e+1)+c,i="Y";break;case"down":t=-(n.scrollHeight*(e+1)+c),i="Y";break;case"left":t=n.scrollWidth*(e+1)+s,i="X";break;case"right":t=-(n.scrollWidth*(e+1)+s),i="X"}var l="translate"+i+"("+t+"px)";a.transform=a.webkitTransform=l})}}return{addClass:function(n,e,t){n.hasClass("md-fling")?(o(n),i(t)):t()},removeClass:function(n,e,t){o(n),i(t)}}}function o(t){function i(n){t(n,a,!1)}function o(t){var i=t[0],o=t.controller("mdFabSpeedDial"),a=i.querySelectorAll(".md-fab-action-item"),c=i.querySelector("._md-css-variables"),s=parseInt(n.getComputedStyle(c).zIndex);e.forEach(a,function(n,e){var t=n.style,i=e*r;t.opacity=o.isOpen?1:0,t.transform=t.webkitTransform=o.isOpen?"scale(1)":"scale(0)",t.transitionDelay=(o.isOpen?i:a.length-i)+"ms",t.zIndex=a.length-e+s})}var r=65;return{addClass:function(n,e,t){o(n),i(t)},removeClass:function(n,e,t){o(n),i(t)}}}var a=300;e.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabSpeedDial",t).animation(".md-fling",i).animation(".md-scale",o).service("mdFabSpeedDialFlingAnimation",i).service("mdFabSpeedDialScaleAnimation",o),i.$inject=["$timeout"],o.$inject=["$timeout"]}()}(window,window.angular);
!function(n,e,t){"use strict";!function(){function n(n,t,i,o,a,r){function c(){k.direction=k.direction||"down",k.isOpen=k.isOpen||!1,d(),t.addClass("md-animations-waiting")}function s(){var i=["click","focusin","focusout"];e.forEach(i,function(n){t.on(n,l)}),n.$on("$destroy",function(){e.forEach(i,function(n){t.off(n,l)}),p()})}function l(n){"click"==n.type&&$(n),"focusout"!=n.type||F||(F=r(function(){k.close()},100,!1)),"focusin"==n.type&&F&&(r.cancel(F),F=null)}function d(){k.currentActionIndex=-1}function u(){n.$watch("vm.direction",function(n,e){i.removeClass(t,"md-"+e),i.addClass(t,"md-"+n),d()});var e,o;n.$watch("vm.isOpen",function(n){d(),e&&o||(e=D(),o=I()),n?m():p();var a=n?"md-is-open":"",r=n?"":"md-is-open";e.attr("aria-haspopup",!0),e.attr("aria-expanded",n),o.attr("aria-hidden",!n),i.setClass(t,a,r)})}function f(){t[0].scrollHeight>0?i.addClass(t,"_md-animations-ready").then(function(){t.removeClass("md-animations-waiting")}):_<10&&(r(f,100),_+=1)}function m(){t.on("keydown",h),o.nextTick(function(){e.element(document).on("click touchend",g)})}function p(){t.off("keydown",h),e.element(document).off("click touchend",g)}function g(n){if(n.target){var e=o.getClosest(n.target,"md-fab-trigger"),t=o.getClosest(n.target,"md-fab-actions");e||t||k.close()}}function h(n){switch(n.which){case a.KEY_CODE.ESCAPE:return k.close(),n.preventDefault(),!1;case a.KEY_CODE.LEFT_ARROW:return A(n),!1;case a.KEY_CODE.UP_ARROW:return O(n),!1;case a.KEY_CODE.RIGHT_ARROW:return w(n),!1;case a.KEY_CODE.DOWN_ARROW:return E(n),!1}}function v(n){C(n,-1)}function b(n){C(n,1)}function C(n,t){var i=y();k.currentActionIndex=k.currentActionIndex+t,k.currentActionIndex=Math.min(i.length-1,k.currentActionIndex),k.currentActionIndex=Math.max(0,k.currentActionIndex);var o=e.element(i[k.currentActionIndex]).children()[0];e.element(o).attr("tabindex",0),o.focus(),n.preventDefault(),n.stopImmediatePropagation()}function y(){var n=I()[0].querySelectorAll(".md-fab-action-item");return e.forEach(n,function(n){e.element(e.element(n).children()[0]).attr("tabindex",-1)}),n}function A(n){"left"===k.direction?b(n):v(n)}function O(n){"down"===k.direction?v(n):b(n)}function w(n){"left"===k.direction?v(n):b(n)}function E(n){"up"===k.direction?v(n):b(n)}function x(n){return o.getClosest(n,"md-fab-trigger")}function S(n){return o.getClosest(n,"md-fab-actions")}function $(n){x(n.target)&&k.toggle(),S(n.target)&&k.close()}function D(){return t.find("md-fab-trigger")}function I(){return t.find("md-fab-actions")}var k=this;k.open=function(){n.$evalAsync("vm.isOpen = true")},k.close=function(){n.$evalAsync("vm.isOpen = false"),t.find("md-fab-trigger")[0].focus()},k.toggle=function(){n.$evalAsync("vm.isOpen = !vm.isOpen")},c(),s(),u();var _=0;f();var F}e.module("material.components.fabShared",["material.core"]).controller("MdFabController",n),n.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"]}(),function(){function t(){function n(n,e){e.prepend('<div class="_md-css-variables"></div>')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:n}}function i(t){function i(n){t(n,a,!1)}function o(t){if(!t.hasClass("md-animations-waiting")||t.hasClass("_md-animations-ready")){var i=t[0],o=t.controller("mdFabSpeedDial"),a=i.querySelectorAll(".md-fab-action-item"),r=i.querySelector("md-fab-trigger"),c=i.querySelector("._md-css-variables"),s=parseInt(n.getComputedStyle(c).zIndex);e.forEach(a,function(n,e){var t=n.style;t.transform=t.webkitTransform="",t.transitionDelay="",t.opacity=1,t.zIndex=a.length-e+s}),r.style.zIndex=s+a.length+1,o.isOpen||e.forEach(a,function(n,e){var t,i,a=n.style,c=(r.clientHeight-n.clientHeight)/2,s=(r.clientWidth-n.clientWidth)/2;switch(o.direction){case"up":t=n.scrollHeight*(e+1)+c,i="Y";break;case"down":t=-(n.scrollHeight*(e+1)+c),i="Y";break;case"left":t=n.scrollWidth*(e+1)+s,i="X";break;case"right":t=-(n.scrollWidth*(e+1)+s),i="X"}var l="translate"+i+"("+t+"px)";a.transform=a.webkitTransform=l})}}return{addClass:function(n,e,t){n.hasClass("md-fling")?(o(n),i(t)):t()},removeClass:function(n,e,t){o(n),i(t)}}}function o(t){function i(n){t(n,a,!1)}function o(t){var i=t[0],o=t.controller("mdFabSpeedDial"),a=i.querySelectorAll(".md-fab-action-item"),c=i.querySelector("._md-css-variables"),s=parseInt(n.getComputedStyle(c).zIndex);e.forEach(a,function(n,e){var t=n.style,i=e*r;t.opacity=o.isOpen?1:0,t.transform=t.webkitTransform=o.isOpen?"scale(1)":"scale(0)",t.transitionDelay=(o.isOpen?i:a.length-i)+"ms",t.zIndex=a.length-e+s})}var r=65;return{addClass:function(n,e,t){o(n),i(t)},removeClass:function(n,e,t){o(n),i(t)}}}var a=300;e.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",t).animation(".md-fling",i).animation(".md-scale",o).service("mdFabSpeedDialFlingAnimation",i).service("mdFabSpeedDialScaleAnimation",o),i.$inject=["$timeout"],o.$inject=["$timeout"]}()}(window,window.angular);
{
"name": "angular-material-fabToolbar",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-fabShared": "1.1.0-rc4-master-06e7e99",
"angular-material-fabTrigger": "1.1.0-rc4-master-06e7e99",
"angular-material-fabActions": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-fabShared": "1.1.0-rc.5-master-c447c12",
"angular-material-fabActions": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -23,3 +23,2 @@ (function( window, angular, undefined ){

'material.components.fabShared',
'material.components.fabTrigger',
'material.components.fabActions'

@@ -90,4 +89,4 @@ ])

transclude: true,
template: '<div class="_md-fab-toolbar-wrapper">' +
' <div class="_md-fab-toolbar-content" ng-transclude></div>' +
template: '<div class="md-fab-toolbar-wrapper">' +
' <div class="md-fab-toolbar-content" ng-transclude></div>' +
'</div>',

@@ -113,3 +112,3 @@

element.find('md-fab-trigger').find('button')
.prepend('<div class="_md-fab-toolbar-background"></div>');
.prepend('<div class="md-fab-toolbar-background"></div>');
}

@@ -130,3 +129,3 @@ }

// Grab the relevant child elements
var backgroundElement = el.querySelector('._md-fab-toolbar-background');
var backgroundElement = el.querySelector('.md-fab-toolbar-background');
var triggerElement = el.querySelector('md-fab-trigger button');

@@ -133,0 +132,0 @@ var toolbarElement = el.querySelector('md-toolbar');

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,o){"use strict";!function(){function o(){function t(t,e,o){e.addClass("md-fab-toolbar"),e.find("md-fab-trigger").find("button").prepend('<div class="_md-fab-toolbar-background"></div>')}return{restrict:"E",transclude:!0,template:'<div class="_md-fab-toolbar-wrapper"> <div class="_md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:t}}function n(){function o(o,n,r){if(n){var a=o[0],l=o.controller("mdFabToolbar"),i=a.querySelector("._md-fab-toolbar-background"),s=a.querySelector("md-fab-trigger button"),d=a.querySelector("md-toolbar"),c=a.querySelector("md-fab-trigger button md-icon"),f=o.find("md-fab-actions").children();if(s&&i){var m=t.getComputedStyle(s).getPropertyValue("background-color"),b=a.offsetWidth,u=(a.offsetHeight,2*(b/s.offsetWidth));i.style.backgroundColor=m,i.style.borderRadius=b+"px",l.isOpen?(d.style.pointerEvents="inherit",i.style.width=s.offsetWidth+"px",i.style.height=s.offsetHeight+"px",i.style.transform="scale("+u+")",i.style.transitionDelay="0ms",c&&(c.style.transitionDelay=".3s"),e.forEach(f,function(t,e){t.style.transitionDelay=25*(f.length-e)+"ms"})):(d.style.pointerEvents="none",i.style.transform="scale(1)",i.style.top="0",o.hasClass("md-right")&&(i.style.left="0",i.style.right=null),o.hasClass("md-left")&&(i.style.right="0",i.style.left=null),i.style.transitionDelay="200ms",c&&(c.style.transitionDelay="0ms"),e.forEach(f,function(t,e){t.style.transitionDelay=200+25*e+"ms"}))}}}return{addClass:function(t,e,n){o(t,e,n),n()},removeClass:function(t,e,n){o(t,e,n),n()}}}e.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabToolbar",o).animation(".md-fab-toolbar",n).service("mdFabToolbarAnimation",n)}()}(window,window.angular);
!function(t,e,o){"use strict";!function(){function o(){function t(t,e,o){e.addClass("md-fab-toolbar"),e.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:t}}function n(){function o(o,n,r){if(n){var a=o[0],l=o.controller("mdFabToolbar"),i=a.querySelector(".md-fab-toolbar-background"),s=a.querySelector("md-fab-trigger button"),d=a.querySelector("md-toolbar"),c=a.querySelector("md-fab-trigger button md-icon"),f=o.find("md-fab-actions").children();if(s&&i){var m=t.getComputedStyle(s).getPropertyValue("background-color"),b=a.offsetWidth,u=(a.offsetHeight,2*(b/s.offsetWidth));i.style.backgroundColor=m,i.style.borderRadius=b+"px",l.isOpen?(d.style.pointerEvents="inherit",i.style.width=s.offsetWidth+"px",i.style.height=s.offsetHeight+"px",i.style.transform="scale("+u+")",i.style.transitionDelay="0ms",c&&(c.style.transitionDelay=".3s"),e.forEach(f,function(t,e){t.style.transitionDelay=25*(f.length-e)+"ms"})):(d.style.pointerEvents="none",i.style.transform="scale(1)",i.style.top="0",o.hasClass("md-right")&&(i.style.left="0",i.style.right=null),o.hasClass("md-left")&&(i.style.right="0",i.style.left=null),i.style.transitionDelay="200ms",c&&(c.style.transitionDelay="0ms"),e.forEach(f,function(t,e){t.style.transitionDelay=200+25*e+"ms"}))}}}return{addClass:function(t,e,n){o(t,e,n),n()},removeClass:function(t,e,n){o(t,e,n),n()}}}e.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",o).animation(".md-fab-toolbar",n).service("mdFabToolbarAnimation",n)}()}(window,window.angular);
{
"name": "angular-material-fabTrigger",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-26a5fb8",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-26a5fb8"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-26a5fb8
*/

@@ -8,0 +8,0 @@ (function( window, angular, undefined ){

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-26a5fb8
*/
!function(r,e,i){"use strict";!function(){function r(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"]}}e.module("material.components.fabTrigger",["material.core"]).directive("mdFabTrigger",r)}()}(window,window.angular);
{
"name": "angular-material-gridList",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -8,0 +8,0 @@ (function( window, angular, undefined ){

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,n){"use strict";function i(t,n,i,o){function a(r,a,u,s){function l(){for(var t in n.MEDIA)o(t),o.getQuery(n.MEDIA[t]).addListener(T);return o.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],u,c)}function d(){s.layoutDelegate=e.noop,L();for(var t in n.MEDIA)o.getQuery(n.MEDIA[t]).removeListener(T)}function c(t){null==t?s.invalidateLayout():o(t)&&s.invalidateLayout()}function f(t){var n=h(),o={tileSpans:v(n),colCount:w(),rowMode:b(),rowHeight:$(),gutter:y()};if(t||!e.equals(o,D)){var u=i(o.colCount,o.tileSpans,n).map(function(t,i){return{grid:{element:a,style:p(o.colCount,i,o.gutter,o.rowMode,o.rowHeight)},tiles:t.map(function(t,r){return{element:e.element(n[r]),style:g(t.position,t.spans,o.colCount,i,o.gutter,o.rowMode,o.rowHeight)}})}}).reflow().performance();r.mdOnLayout({$event:{performance:u}}),D=o}}function m(t){return x+t+M}function g(t,e,n,i,r,o,a){var u=1/n*100,s=(n-1)/n,l=A({share:u,gutterShare:s,gutter:r}),d={left:C({unit:l,offset:t.col,gutter:r}),width:G({unit:l,span:e.col,gutter:r}),paddingTop:"",marginTop:"",top:"",height:""};switch(o){case"fixed":d.top=C({unit:a,offset:t.row,gutter:r}),d.height=G({unit:a,span:e.row,gutter:r});break;case"ratio":var c=u/a,f=A({share:c,gutterShare:s,gutter:r});d.paddingTop=G({unit:f,span:e.row,gutter:r}),d.marginTop=C({unit:f,offset:t.row,gutter:r});break;case"fit":var m=(i-1)/i,c=1/i*100,f=A({share:c,gutterShare:m,gutter:r});d.top=C({unit:f,offset:t.row,gutter:r}),d.height=G({unit:f,span:e.row,gutter:r})}return d}function p(t,e,n,i,r){var o={};switch(i){case"fixed":o.height=G({unit:r,span:e,gutter:n}),o.paddingBottom="";break;case"ratio":var a=1===t?0:(t-1)/t,u=1/t*100,s=u*(1/r),l=A({share:s,gutterShare:a,gutter:n});o.height="",o.paddingBottom=G({unit:l,span:e,gutter:n});break;case"fit":}return o}function h(){return[].filter.call(a.children(),function(t){return"MD-GRID-TILE"==t.tagName&&!t.$$mdDestroyed})}function v(t){return[].map.call(t,function(t){var n=e.element(t).controller("mdGridTile");return{row:parseInt(o.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(o.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}function w(){var t=parseInt(o.getResponsiveAttribute(u,"md-cols"),10);if(isNaN(t))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return t}function y(){return I(o.getResponsiveAttribute(u,"md-gutter")||1)}function $(){var t=o.getResponsiveAttribute(u,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";switch(b()){case"fixed":return I(t);case"ratio":var e=t.split(":");return parseFloat(e[0])/parseFloat(e[1]);case"fit":return 0}}function b(){var t=o.getResponsiveAttribute(u,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";return"fit"==t?"fit":-1!==t.indexOf(":")?"ratio":"fixed"}function I(t){return/\D$/.test(t)?t:t+"px"}a.addClass("_md"),a.attr("role","list"),s.layoutDelegate=f;var T=e.bind(s,s.invalidateLayout),L=l();r.$on("$destroy",d);var D,x=t.startSymbol(),M=t.endSymbol(),A=t(m("share")+"% - ("+m("gutter")+" * "+m("gutterShare")+")"),C=t("calc(("+m("unit")+" + "+m("gutter")+") * "+m("offset")+")"),G=t("calc(("+m("unit")+") * "+m("span")+" + ("+m("span")+" - 1) * "+m("gutter")+")")}return{restrict:"E",controller:r,scope:{mdOnLayout:"&"},link:a}}function r(t){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=t.nextTick,this.layoutDelegate=e.noop}function o(t){function n(e,n){var i,a,u,s,l,d;return s=t.time(function(){a=r(e,n)}),i={layoutInfo:function(){return a},map:function(e){return l=t.time(function(){var t=i.layoutInfo();u=e(t.positioning,t.rowCount)}),i},reflow:function(e){return d=t.time(function(){var t=e||o;t(u.grid,u.tiles)}),i},performance:function(){return{tileCount:n.length,layoutTime:s,mapTime:l,reflowTime:d,totalTime:s+l+d}}}}function i(t,e){t.element.css(t.style),e.forEach(function(t){t.element.css(t.style)})}function r(t,e){function n(e,n){if(e.col>t)throw"md-grid-list: Tile at position "+n+" has a colspan ("+e.col+") that exceeds the column count ("+t+")";for(var a=0,d=0;d-a<e.col;)u>=t?i():(a=l.indexOf(0,u),-1!==a&&-1!==(d=o(a+1))?u=d+1:(a=d=0,i()));return r(a,e.col,e.row),u=a+e.col,{col:a,row:s}}function i(){u=0,s++,r(0,t,-1)}function r(t,e,n){for(var i=t;t+e>i;i++)l[i]=Math.max(l[i]+n,0)}function o(t){var e;for(e=t;e<l.length;e++)if(0!==l[e])return e;return e===l.length?e:void 0}function a(){for(var e=[],n=0;t>n;n++)e.push(0);return e}var u=0,s=0,l=a();return{positioning:e.map(function(t,e){return{spans:t,position:n(t,e)}}),rowCount:s+Math.max.apply(Math,l)}}var o=i;return n.animateWith=function(t){o=e.isFunction(t)?t:i},n}function a(t){function n(n,i,r,o){i.attr("role","listitem");var a=t.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,e.bind(o,o.invalidateLayout));o.invalidateTiles(),n.$on("$destroy",function(){i[0].$$mdDestroyed=!0,a(),o.invalidateLayout()}),e.isDefined(n.$parent.$index)&&n.$watch(function(){return n.$parent.$index},function(t,e){t!==e&&o.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(t){this.$attrs=t}],link:n}}function u(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}e.module("material.components.gridList",["material.core"]).directive("mdGridList",i).directive("mdGridTile",a).directive("mdGridTileFooter",u).directive("mdGridTileHeader",u).factory("$mdGridLayout",o),i.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],r.$inject=["$mdUtil"],r.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(e.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},o.$inject=["$mdUtil"],a.$inject=["$mdMedia"]}(window,window.angular);
!function(t,e,n){"use strict";function i(t,n,i,o){function a(r,a,u,s){function l(){for(var t in n.MEDIA)o(t),o.getQuery(n.MEDIA[t]).addListener(T);return o.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],u,d)}function c(){s.layoutDelegate=e.noop,L();for(var t in n.MEDIA)o.getQuery(n.MEDIA[t]).removeListener(T)}function d(t){null==t?s.invalidateLayout():o(t)&&s.invalidateLayout()}function f(t){var n=h(),o={tileSpans:v(n),colCount:w(),rowMode:b(),rowHeight:$(),gutter:y()};if(t||!e.equals(o,D)){var u=i(o.colCount,o.tileSpans,n).map(function(t,i){return{grid:{element:a,style:p(o.colCount,i,o.gutter,o.rowMode,o.rowHeight)},tiles:t.map(function(t,r){return{element:e.element(n[r]),style:g(t.position,t.spans,o.colCount,i,o.gutter,o.rowMode,o.rowHeight)}})}}).reflow().performance();r.mdOnLayout({$event:{performance:u}}),D=o}}function m(t){return x+t+M}function g(t,e,n,i,r,o,a){var u=1/n*100,s=(n-1)/n,l=A({share:u,gutterShare:s,gutter:r}),c={left:C({unit:l,offset:t.col,gutter:r}),width:G({unit:l,span:e.col,gutter:r}),paddingTop:"",marginTop:"",top:"",height:""};switch(o){case"fixed":c.top=C({unit:a,offset:t.row,gutter:r}),c.height=G({unit:a,span:e.row,gutter:r});break;case"ratio":var d=u/a,f=A({share:d,gutterShare:s,gutter:r});c.paddingTop=G({unit:f,span:e.row,gutter:r}),c.marginTop=C({unit:f,offset:t.row,gutter:r});break;case"fit":var m=(i-1)/i,d=1/i*100,f=A({share:d,gutterShare:m,gutter:r});c.top=C({unit:f,offset:t.row,gutter:r}),c.height=G({unit:f,span:e.row,gutter:r})}return c}function p(t,e,n,i,r){var o={};switch(i){case"fixed":o.height=G({unit:r,span:e,gutter:n}),o.paddingBottom="";break;case"ratio":var a=1===t?0:(t-1)/t,u=1/t*100,s=u*(1/r),l=A({share:s,gutterShare:a,gutter:n});o.height="",o.paddingBottom=G({unit:l,span:e,gutter:n});break;case"fit":}return o}function h(){return[].filter.call(a.children(),function(t){return"MD-GRID-TILE"==t.tagName&&!t.$$mdDestroyed})}function v(t){return[].map.call(t,function(t){var n=e.element(t).controller("mdGridTile");return{row:parseInt(o.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(o.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}function w(){var t=parseInt(o.getResponsiveAttribute(u,"md-cols"),10);if(isNaN(t))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return t}function y(){return I(o.getResponsiveAttribute(u,"md-gutter")||1)}function $(){var t=o.getResponsiveAttribute(u,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";switch(b()){case"fixed":return I(t);case"ratio":var e=t.split(":");return parseFloat(e[0])/parseFloat(e[1]);case"fit":return 0}}function b(){var t=o.getResponsiveAttribute(u,"md-row-height");if(!t)throw"md-grid-list: md-row-height attribute was not found";return"fit"==t?"fit":t.indexOf(":")!==-1?"ratio":"fixed"}function I(t){return/\D$/.test(t)?t:t+"px"}a.addClass("_md"),a.attr("role","list"),s.layoutDelegate=f;var T=e.bind(s,s.invalidateLayout),L=l();r.$on("$destroy",c);var D,x=t.startSymbol(),M=t.endSymbol(),A=t(m("share")+"% - ("+m("gutter")+" * "+m("gutterShare")+")"),C=t("calc(("+m("unit")+" + "+m("gutter")+") * "+m("offset")+")"),G=t("calc(("+m("unit")+") * "+m("span")+" + ("+m("span")+" - 1) * "+m("gutter")+")")}return{restrict:"E",controller:r,scope:{mdOnLayout:"&"},link:a}}function r(t){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=t.nextTick,this.layoutDelegate=e.noop}function o(t){function n(e,n){var i,a,u,s,l,c;return s=t.time(function(){a=r(e,n)}),i={layoutInfo:function(){return a},map:function(e){return l=t.time(function(){var t=i.layoutInfo();u=e(t.positioning,t.rowCount)}),i},reflow:function(e){return c=t.time(function(){var t=e||o;t(u.grid,u.tiles)}),i},performance:function(){return{tileCount:n.length,layoutTime:s,mapTime:l,reflowTime:c,totalTime:s+l+c}}}}function i(t,e){t.element.css(t.style),e.forEach(function(t){t.element.css(t.style)})}function r(t,e){function n(e,n){if(e.col>t)throw"md-grid-list: Tile at position "+n+" has a colspan ("+e.col+") that exceeds the column count ("+t+")";for(var a=0,c=0;c-a<e.col;)u>=t?i():(a=l.indexOf(0,u),a!==-1&&(c=o(a+1))!==-1?u=c+1:(a=c=0,i()));return r(a,e.col,e.row),u=a+e.col,{col:a,row:s}}function i(){u=0,s++,r(0,t,-1)}function r(t,e,n){for(var i=t;i<t+e;i++)l[i]=Math.max(l[i]+n,0)}function o(t){var e;for(e=t;e<l.length;e++)if(0!==l[e])return e;if(e===l.length)return e}function a(){for(var e=[],n=0;n<t;n++)e.push(0);return e}var u=0,s=0,l=a();return{positioning:e.map(function(t,e){return{spans:t,position:n(t,e)}}),rowCount:s+Math.max.apply(Math,l)}}var o=i;return n.animateWith=function(t){o=e.isFunction(t)?t:i},n}function a(t){function n(n,i,r,o){i.attr("role","listitem");var a=t.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,e.bind(o,o.invalidateLayout));o.invalidateTiles(),n.$on("$destroy",function(){i[0].$$mdDestroyed=!0,a(),o.invalidateLayout()}),e.isDefined(n.$parent.$index)&&n.$watch(function(){return n.$parent.$index},function(t,e){t!==e&&o.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(t){this.$attrs=t}],link:n}}function u(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}e.module("material.components.gridList",["material.core"]).directive("mdGridList",i).directive("mdGridTile",a).directive("mdGridTileFooter",u).directive("mdGridTileHeader",u).factory("$mdGridLayout",o),i.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],r.$inject=["$mdUtil"],r.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(e.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},o.$inject=["$mdUtil"],a.$inject=["$mdMedia"]}(window,window.angular);
{
"name": "angular-material-icon",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -206,5 +206,10 @@ (function( window, angular, undefined ){

$mdTheming(element);
var lastFontIcon = attr.mdFontIcon;
var lastFontSet = $mdIcon.fontSet(attr.mdFontSet);
prepareForFontIcon();
attr.$observe('mdFontIcon', fontIconChanged);
attr.$observe('mdFontSet', fontIconChanged);
// Keep track of the content of the svg src so we can compare against it later to see if the

@@ -238,9 +243,2 @@ // attribute is static (and thus safe).

attr.$observe(attrName, function(attrVal) {
// If using svg-src and the value is static (i.e., is exactly equal to the compile-time
// `md-svg-src` value), then it is implicitly trusted.
if (!isInlineSvg(attrVal) && attrVal === originalSvgSrc) {
attrVal = $sce.trustAsUrl(attrVal);
}
element.empty();

@@ -250,5 +248,5 @@ if (attrVal) {

.then(function(svg) {
element.empty();
element.append(svg);
});
element.empty();
element.append(svg);
});
}

@@ -275,21 +273,40 @@

}
element.addClass($mdIcon.fontSet(attr.mdFontSet));
element.addClass(lastFontSet);
}
}
}
/**
* Gets whether the given svg src is an inline ("data:" style) SVG.
* @param {string} svgSrc The svg src.
* @returns {boolean} Whether the src is an inline SVG.
*/
function isInlineSvg(svgSrc) {
var dataUrlRegex = /^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;
return dataUrlRegex.test(svgSrc);
function fontIconChanged() {
if (!attr.mdSvgIcon && !attr.mdSvgSrc) {
if (attr.mdFontIcon) {
element.removeClass(lastFontIcon);
element.addClass(attr.mdFontIcon);
lastFontIcon = attr.mdFontIcon;
}
var fontSet = $mdIcon.fontSet(attr.mdFontSet);
if (lastFontSet !== fontSet) {
element.removeClass(lastFontSet);
element.addClass(fontSet);
lastFontSet = fontSet;
}
}
}
}
}
angular
.module('material.components.icon')
.provider('$mdIcon', MdIconProvider);
angular
.module('material.components.icon')
.constant('$$mdSvgRegistry', {
'mdTabsArrow': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=',
'mdClose': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=',
'mdCancel': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==',
'mdMenu': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+',
'mdToggleArrow': 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==',
'mdCalendar': 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg=='
})
.provider('$mdIcon', MdIconProvider);

@@ -313,2 +330,19 @@ /**

*
* The `$templateRequest` service expects the icons source to be loaded over trusted URLs.<br/>
* This means, when loading icons from an external URL, you have to trust the URL in the `$sceDelegateProvider`.
*
* <hljs lang="js">
* app.config(function($sceDelegateProvider) {
* $sceDelegateProvider.resourceUrlWhitelist([
* // Adding 'self' to the whitelist, will allow requests from the current origin.
* 'self',
* // Using double asterisks here, will allow all URLs to load.
* // We recommend to only specify the given domain you want to allow.
* '**'
* ]);
* });
* </hljs>
*
* Read more about the [$sceDelegateProvider](https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider).
*
* **Notice:** Most font-icons libraries do not support ligatures (for example `fontawesome`).<br/>

@@ -611,46 +645,3 @@ * In such cases you are not able to use the icon's ligature name - Like so:

preloadIcons: function($templateCache) {
var iconProvider = this;
var svgRegistry = [
{
id: 'md-tabs-arrow',
url: 'md-tabs-arrow.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g></svg>'
},
{
id: 'md-close',
url: 'md-close.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z"/></g></svg>'
},
{
id: 'md-cancel',
url: 'md-cancel.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm5 13.59l-1.41 1.41-3.59-3.59-3.59 3.59-1.41-1.41 3.59-3.59-3.59-3.59 1.41-1.41 3.59 3.59 3.59-3.59 1.41 1.41-3.59 3.59 3.59 3.59z"/></g></svg>'
},
{
id: 'md-menu',
url: 'md-menu.svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" /></svg>'
},
{
id: 'md-toggle-arrow',
url: 'md-toggle-arrow-svg',
svg: '<svg version="1.1" x="0px" y="0px" viewBox="0 0 48 48"><path d="M24 16l-12 12 2.83 2.83 9.17-9.17 9.17 9.17 2.83-2.83z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>'
},
{
id: 'md-calendar',
url: 'md-calendar.svg',
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg>'
}
];
svgRegistry.forEach(function(asset) {
iconProvider.icon(asset.id, asset.url);
$templateCache.put(asset.url, asset.svg);
});
},
$get: ['$templateRequest', '$q', '$log', '$templateCache', '$mdUtil', '$sce', function($templateRequest, $q, $log, $templateCache, $mdUtil, $sce) {
this.preloadIcons($templateCache);
$get: ['$templateRequest', '$q', '$log', '$mdUtil', '$sce', function($templateRequest, $q, $log, $mdUtil, $sce) {
return MdIconService(config, $templateRequest, $q, $log, $mdUtil, $sce);

@@ -686,3 +677,3 @@ }]

* created from the SVG markup in the SVG data file. If an error occurs (e.g. the icon cannot be found) the promise
* will get rejected.
* will get rejected.
*

@@ -716,2 +707,3 @@ * @usage

var iconCache = {};
var svgCache = {};
var urlRegex = /[-\w@:%\+.~#?&//=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&//=]*)?/i;

@@ -828,3 +820,3 @@ var dataUrlRegex = /^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;

var icon = set.querySelector('#' + iconName);
return !icon ? announceIdNotFound(id) : new Icon(icon, iconSetConfig);
return icon ? new Icon(icon, iconSetConfig) : announceIdNotFound(id);
}

@@ -864,4 +856,6 @@

extractSvg = function(response) {
var svg = angular.element('<div>').append(response).find('svg')[0];
resolve(svg);
if (!svgCache[url]) {
svgCache[url] = angular.element('<div>').append(response)[0].querySelector('svg');
}
resolve(svgCache[url]);
};

@@ -890,3 +884,3 @@

if (el && el.tagName != 'svg') {
el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(el)[0];
el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">').append(el.cloneNode(true))[0];
}

@@ -893,0 +887,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,n){"use strict";function i(t,e,n,i){function r(r,a,u){function s(){var t=a.parent();return t.attr("aria-label")||t.text()?!0:!(!t.parent().attr("aria-label")&&!t.parent().text())}function c(){u.mdSvgIcon||u.mdSvgSrc||(u.mdFontIcon&&a.addClass("md-font "+u.mdFontIcon),a.addClass(t.fontSet(u.mdFontSet)))}e(a),c();var d=a[0].getAttribute(u.$attr.mdSvgSrc),l=u.alt||u.mdFontIcon||u.mdSvgIcon||a.text(),f=u.$normalize(u.$attr.mdSvgIcon||u.$attr.mdSvgSrc||"");u["aria-label"]||(""===l||s()?a.text()||n.expect(a,"aria-hidden","true"):(n.expect(a,"aria-label",l),n.expect(a,"role","img"))),f&&u.$observe(f,function(e){o(e)||e!==d||(e=i.trustAsUrl(e)),a.empty(),e&&t(e).then(function(t){a.empty(),a.append(t)})})}function o(t){var e=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return e.test(t)}return{restrict:"E",link:r}}function r(){}function o(t,e){this.url=t,this.viewBoxSize=e||u.defaultViewBoxSize}function a(n,i,r,o,a,u){function s(t){if(t=t||"",e.isString(t)||(t=u.getTrustedUrl(t)),x[t])return r.when(d(x[t]));if(S.test(t)||$.test(t))return g(t).then(l(t));-1==t.indexOf(":")&&(t="$default:"+t);var i=n[t]?f:v;return i(t).then(l(t))}function c(t){var i=e.isUndefined(t)||!(t&&t.length);if(i)return n.defaultFontSet;var r=t;return e.forEach(n.fontSets,function(e){e.alias==t&&(r=e.fontSet||r)}),r}function d(t){var n=t.clone(),i="_cache"+a.nextUid();return n.id&&(n.id+=i),e.forEach(n.querySelectorAll("[id]"),function(t){t.id+=i}),n}function l(t){return function(e){return x[t]=m(e)?e:new h(e,n[t]),x[t].clone()}}function f(t){var e=n[t];return g(e.url).then(function(t){return new h(t,e)})}function v(t){function e(e){var n=t.slice(t.lastIndexOf(":")+1),r=e.querySelector("#"+n);return r?new h(r,u):i(t)}function i(t){var e="icon "+t+" not found";return o.warn(e),r.reject(e||t)}var a=t.substring(0,t.lastIndexOf(":"))||"$default",u=n[a];return u?g(u.url).then(e):i(t)}function g(n){function a(n){var i=$.exec(n),o=/base64/i.test(n),a=o?t.atob(i[2]):i[2];return r.when(e.element(a)[0])}function u(t){return r(function(n,r){var a=function(t){var n=e.isString(t)?t:t.message||t.data||t.statusText;o.warn(n),r(t)},u=function(t){var i=e.element("<div>").append(t).find("svg")[0];n(i)};i(t,!0).then(u,a)})}return $.test(n)?a(n):u(n)}function m(t){return e.isDefined(t.element)&&e.isDefined(t.config)}function h(t,n){t&&"svg"!=t.tagName&&(t=e.element('<svg xmlns="http://www.w3.org/2000/svg">').append(t)[0]),t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=t,this.config=n,this.prepare()}function p(){var t=this.config?this.config.viewBoxSize:n.defaultViewBoxSize;e.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+t+" "+t,focusable:!1},function(t,e){this.element.setAttribute(e,t)},this)}function w(){return this.element.cloneNode(!0)}var x={},S=/[-\w@:%\+.~#?&\/\/=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&\/\/=]*)?/i,$=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return h.prototype={clone:w,prepare:p},s.fontSet=c,s}e.module("material.components.icon",["material.core"]),e.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",i]),e.module("material.components.icon").provider("$mdIcon",r);var u={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};r.prototype={icon:function(t,e,n){return-1==t.indexOf(":")&&(t="$default:"+t),u[t]=new o(e,n),this},iconSet:function(t,e,n){return u[t]=new o(e,n),this},defaultIconSet:function(t,e){var n="$default";return u[n]||(u[n]=new o(t,e)),u[n].viewBoxSize=e||u.defaultViewBoxSize,this},defaultViewBoxSize:function(t){return u.defaultViewBoxSize=t,this},fontSet:function(t,e){return u.fontSets.push({alias:t,fontSet:e||t}),this},defaultFontSet:function(t){return u.defaultFontSet=t?t:"",this},defaultIconSize:function(t){return u.defaultIconSize=t,this},preloadIcons:function(t){var e=this,n=[{id:"md-tabs-arrow",url:"md-tabs-arrow.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g></svg>'},{id:"md-close",url:"md-close.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z"/></g></svg>'},{id:"md-cancel",url:"md-cancel.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm5 13.59l-1.41 1.41-3.59-3.59-3.59 3.59-1.41-1.41 3.59-3.59-3.59-3.59 1.41-1.41 3.59 3.59 3.59-3.59 1.41 1.41-3.59 3.59 3.59 3.59z"/></g></svg>'},{id:"md-menu",url:"md-menu.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" /></svg>'},{id:"md-toggle-arrow",url:"md-toggle-arrow-svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 48 48"><path d="M24 16l-12 12 2.83 2.83 9.17-9.17 9.17 9.17 2.83-2.83z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>'},{id:"md-calendar",url:"md-calendar.svg",svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></svg>'}];n.forEach(function(n){e.icon(n.id,n.url),t.put(n.url,n.svg)})},$get:["$templateRequest","$q","$log","$templateCache","$mdUtil","$sce",function(t,e,n,i,r,o){return this.preloadIcons(i),a(u,t,e,n,r,o)}]},a.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"]}(window,window.angular);
!function(t,e,n){"use strict";function i(t,e,n,i){function o(i,o,a){function r(){var t=o.parent();return!(!t.attr("aria-label")&&!t.text())||!(!t.parent().attr("aria-label")&&!t.parent().text())}function u(){a.mdSvgIcon||a.mdSvgSrc||(a.mdFontIcon&&o.addClass("md-font "+a.mdFontIcon),o.addClass(g))}function c(){if(!a.mdSvgIcon&&!a.mdSvgSrc){a.mdFontIcon&&(o.removeClass(I),o.addClass(a.mdFontIcon),I=a.mdFontIcon);var e=t.fontSet(a.mdFontSet);g!==e&&(o.removeClass(g),o.addClass(e),g=e)}}e(o);var I=a.mdFontIcon,g=t.fontSet(a.mdFontSet);u(),a.$observe("mdFontIcon",c),a.$observe("mdFontSet",c);var d=(o[0].getAttribute(a.$attr.mdSvgSrc),a.alt||a.mdFontIcon||a.mdSvgIcon||o.text()),s=a.$normalize(a.$attr.mdSvgIcon||a.$attr.mdSvgSrc||"");a["aria-label"]||(""===d||r()?o.text()||n.expect(o,"aria-hidden","true"):(n.expect(o,"aria-label",d),n.expect(o,"role","img"))),s&&a.$observe(s,function(e){o.empty(),e&&t(e).then(function(t){o.empty(),o.append(t)})})}return{restrict:"E",link:o}}function o(){}function a(t,e){this.url=t,this.viewBoxSize=e||u.defaultViewBoxSize}function r(n,i,o,a,r,u){function c(t){if(t=t||"",e.isString(t)||(t=u.getTrustedUrl(t)),w[t])return o.when(g(w[t]));if(v.test(t)||N.test(t))return S(t).then(d(t));t.indexOf(":")==-1&&(t="$default:"+t);var i=n[t]?s:l;return i(t).then(d(t))}function I(t){var i=e.isUndefined(t)||!(t&&t.length);if(i)return n.defaultFontSet;var o=t;return e.forEach(n.fontSets,function(e){e.alias==t&&(o=e.fontSet||o)}),o}function g(t){var n=t.clone(),i="_cache"+r.nextUid();return n.id&&(n.id+=i),e.forEach(n.querySelectorAll("[id]"),function(t){t.id+=i}),n}function d(t){return function(e){return w[t]=m(e)?e:new f(e,n[t]),w[t].clone()}}function s(t){var e=n[t];return S(e.url).then(function(t){return new f(t,e)})}function l(t){function e(e){var n=t.slice(t.lastIndexOf(":")+1),o=e.querySelector("#"+n);return o?new f(o,u):i(t)}function i(t){var e="icon "+t+" not found";return a.warn(e),o.reject(e||t)}var r=t.substring(0,t.lastIndexOf(":"))||"$default",u=n[r];return u?S(u.url).then(e):i(t)}function S(n){function r(n){var i=N.exec(n),a=/base64/i.test(n),r=a?t.atob(i[2]):i[2];return o.when(e.element(r)[0])}function u(t){return o(function(n,o){var r=function(t){var n=e.isString(t)?t:t.message||t.data||t.statusText;a.warn(n),o(t)},u=function(i){j[t]||(j[t]=e.element("<div>").append(i)[0].querySelector("svg")),n(j[t])};i(t,!0).then(u,r)})}return N.test(n)?r(n):u(n)}function m(t){return e.isDefined(t.element)&&e.isDefined(t.config)}function f(t,n){t&&"svg"!=t.tagName&&(t=e.element('<svg xmlns="http://www.w3.org/2000/svg">').append(t.cloneNode(!0))[0]),t.getAttribute("xmlns")||t.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=t,this.config=n,this.prepare()}function x(){var t=this.config?this.config.viewBoxSize:n.defaultViewBoxSize;e.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+t+" "+t,focusable:!1},function(t,e){this.element.setAttribute(e,t)},this)}function M(){return this.element.cloneNode(!0)}var w={},j={},v=/[-\w@:%\+.~#?&\/\/=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&\/\/=]*)?/i,N=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return f.prototype={clone:M,prepare:x},c.fontSet=I,c}e.module("material.components.icon",["material.core"]),e.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",i]),e.module("material.components.icon").constant("$$mdSvgRegistry",{mdTabsArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=",mdClose:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=",mdCancel:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==",mdMenu:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+",mdToggleArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==",mdCalendar:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg=="}).provider("$mdIcon",o);var u={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};o.prototype={icon:function(t,e,n){return t.indexOf(":")==-1&&(t="$default:"+t),u[t]=new a(e,n),this},iconSet:function(t,e,n){return u[t]=new a(e,n),this},defaultIconSet:function(t,e){var n="$default";return u[n]||(u[n]=new a(t,e)),u[n].viewBoxSize=e||u.defaultViewBoxSize,this},defaultViewBoxSize:function(t){return u.defaultViewBoxSize=t,this},fontSet:function(t,e){return u.fontSets.push({alias:t,fontSet:e||t}),this},defaultFontSet:function(t){return u.defaultFontSet=t?t:"",this},defaultIconSize:function(t){return u.defaultIconSize=t,this},$get:["$templateRequest","$q","$log","$mdUtil","$sce",function(t,e,n,i,o){return r(u,t,e,n,i,o)}]},r.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"]}(window,window.angular);
{
"name": "angular-material-input",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -15,3 +15,2 @@ (function( window, angular, undefined ){

*/
angular.module('material.components.input', [

@@ -33,4 +32,9 @@ 'material.core'

.animation('.md-input-messages-animation', ngMessagesAnimation)
.animation('.md-input-message-animation', ngMessageAnimation);
.animation('.md-input-message-animation', ngMessageAnimation)
// Register a service for each animation so that we can easily inject them into unit tests
.service('mdInputInvalidAnimation', mdInputInvalidMessagesAnimation)
.service('mdInputMessagesAnimation', ngMessagesAnimation)
.service('mdInputMessageAnimation', ngMessageAnimation);
/**

@@ -54,2 +58,6 @@ * @ngdoc directive

*
* <b>Note:</b> When using `ngMessages` with your input element, make sure the message and container elements
* are *block* elements, otherwise animations applied to the messages will not look as intended. Either use a `div` and
* apply the `ng-message` and `ng-messages` classes respectively, or use the `md-block` class on your element.
*
* @param md-is-error {expression=} When the given expression evaluates to true, the input container

@@ -155,3 +163,3 @@ * will go into error state. Defaults to erroring if the input has been touched and is invalid.

link: function(scope, element, attr, containerCtrl) {
if (!containerCtrl || attr.mdNoFloat || element.hasClass('_md-container-ignore')) return;
if (!containerCtrl || attr.mdNoFloat || element.hasClass('md-container-ignore')) return;

@@ -176,2 +184,6 @@ containerCtrl.label = element;

*
* When the input is required and uses a floating label, then the label will automatically contain
* an asterisk (`*`).<br/>
* This behavior can be disabled by using the `md-no-asterisk` attribute.
*
* @param {number=} md-maxlength The maximum number of characters allowed in this input. If this is

@@ -189,3 +201,5 @@ * specified, a character counter will be shown underneath the input.<br/><br/>

* @param md-no-autogrow {boolean=} When present, textareas will not grow automatically.
* @param md-no-asterisk {boolean=} When present, asterisk will not be appended to required inputs label
* @param md-no-asterisk {boolean=} When present, an asterisk will not be appended to the inputs floating label
* @param md-no-resize {boolean=} Disables the textarea resize handle.
* @param {number=} max-rows The maximum amount of rows for a textarea.
* @param md-detect-hidden {boolean=} When present, textareas will be sized properly when they are

@@ -218,3 +232,3 @@ * revealed after being hidden. This is off by default for performance reasons because it

* <input name="favoriteColor" ng-model="favoriteColor" required>
* <div ng-messages="userForm.lastName.$error">
* <div ng-messages="colorForm.favoriteColor.$error">
* <div ng-message="required">This is required!</div>

@@ -277,8 +291,23 @@ * </div>

*
*
* <h3>Textarea directive</h3>
* The `textarea` element within a `md-input-container` has the following specific behavior:
* - By default the `textarea` grows as the user types. This can be disabled via the `md-no-autogrow`
* attribute.
* - If a `textarea` has the `rows` attribute, it will treat the `rows` as the minimum height and will
* continue growing as the user types. For example a textarea with `rows="3"` will be 3 lines of text
* high initially. If no rows are specified, the directive defaults to 1.
* - The textarea's height gets set on initialization, as well as while the user is typing. In certain situations
* (e.g. while animating) the directive might have been initialized, before the element got it's final height. In
* those cases, you can trigger a resize manually by broadcasting a `md-resize-textarea` event on the scope.
* - If you wan't a `textarea` to stop growing at a certain point, you can specify the `max-rows` attribute.
* - The textarea's bottom border acts as a handle which users can drag, in order to resize the element vertically.
* Once the user has resized a `textarea`, the autogrowing functionality becomes disabled. If you don't want a
* `textarea` to be resizeable by the user, you can add the `md-no-resize` attribute.
*/
function inputTextareaDirective($mdUtil, $window, $mdAria, $timeout) {
function inputTextareaDirective($mdUtil, $window, $mdAria, $timeout, $mdGesture) {
return {
restrict: 'E',
require: ['^?mdInputContainer', '?ngModel'],
require: ['^?mdInputContainer', '?ngModel', '?^form'],
link: postLink

@@ -292,4 +321,6 @@ };

var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel();
var parentForm = ctrls[2];
var isReadonly = angular.isDefined(attr.readonly);
var mdNoAsterisk = $mdUtil.parseAttributeBoolean(attr.mdNoAsterisk);
var tagName = element[0].tagName.toLowerCase();

@@ -302,3 +333,7 @@

} else if (containerCtrl.input) {
throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!");
if (containerCtrl.input[0].contains(element[0])) {
return;
} else {
throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!");
}
}

@@ -314,3 +349,3 @@ containerCtrl.input = element;

if (!containerCtrl.label) {
$mdAria.expect(element, 'aria-label', element.attr('placeholder'));
$mdAria.expect(element, 'aria-label', attr.placeholder);
}

@@ -323,3 +358,9 @@

if (element[0].tagName.toLowerCase() === 'textarea') {
// This works around a Webkit issue where number inputs, placed in a flexbox, that have
// a `min` and `max` will collapse to about 1/3 of their proper width. Please check #7349
// for more info. Also note that we don't override the `step` if the user has specified it,
// in order to prevent some unexpected behaviour.
if (tagName === 'input' && attr.type === 'number' && attr.min && attr.max && !attr.step) {
element.attr('step', 'any');
} else if (tagName === 'textarea') {
setupTextarea();

@@ -336,14 +377,13 @@ }

var isErrorGetter = containerCtrl.isErrorGetter || function() {
return ngModelCtrl.$invalid && (ngModelCtrl.$touched || isParentFormSubmitted());
return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (parentForm && parentForm.$submitted));
};
var isParentFormSubmitted = function () {
var parent = $mdUtil.getClosest(element, 'form');
var form = parent ? angular.element(parent).controller('form') : null;
scope.$watch(isErrorGetter, containerCtrl.setInvalid);
return form ? form.$submitted : false;
};
// When the developer uses the ngValue directive for the input, we have to observe the attribute, because
// Angular's ngValue directive is just setting the `value` attribute.
if (attr.ngValue) {
attr.$observe('value', inputCheckValue);
}
scope.$watch(isErrorGetter, containerCtrl.setInvalid);
ngModelCtrl.$parsers.push(ngModelPipelineCheckValue);

@@ -369,5 +409,2 @@ ngModelCtrl.$formatters.push(ngModelPipelineCheckValue);

//ngModelCtrl.$setTouched();
//if( ngModelCtrl.$invalid ) containerCtrl.setInvalid();
scope.$on('$destroy', function() {

@@ -379,5 +416,3 @@ containerCtrl.setFocused(false);

/**
*
*/
/** Gets run through ngModel's pipeline and set the `has-value` class on the container. */
function ngModelPipelineCheckValue(arg) {

@@ -405,9 +440,13 @@ containerCtrl.setHasValue(!ngModelCtrl.$isEmpty(arg));

function setupTextarea() {
if (attr.hasOwnProperty('mdNoAutogrow')) {
return;
}
var isAutogrowing = !attr.hasOwnProperty('mdNoAutogrow');
attachResizeHandle();
if (!isAutogrowing) return;
// Can't check if height was or not explicity set,
// so rows attribute will take precedence if present
var minRows = attr.hasOwnProperty('rows') ? parseInt(attr.rows) : NaN;
var maxRows = attr.hasOwnProperty('maxRows') ? parseInt(attr.maxRows) : NaN;
var scopeResizeListener = scope.$on('md-resize-textarea', growTextarea);
var lineHeight = null;

@@ -422,55 +461,59 @@ var node = element[0];

// We can hook into Angular's pipeline, instead of registering a new listener.
// Note that we should use `$parsers`, as opposed to `$viewChangeListeners` which
// was used before, because `$viewChangeListeners` don't fire if the input is
// invalid.
// We could leverage ngModel's $parsers here, however it
// isn't reliable, because Angular trims the input by default,
// which means that growTextarea won't fire when newlines and
// spaces are added.
element.on('input', growTextarea);
// We should still use the $formatters, because they fire when
// the value was changed from outside the textarea.
if (hasNgModel) {
ngModelCtrl.$formatters.unshift(pipelineListener);
ngModelCtrl.$parsers.unshift(pipelineListener);
} else {
// Note that it's safe to use the `input` event since we're not supporting IE9 and below.
element.on('input', growTextarea);
ngModelCtrl.$formatters.push(formattersListener);
}
if (!minRows) {
element
.attr('rows', 1)
.on('scroll', onScroll);
element.attr('rows', 1);
}
angular.element($window).on('resize', growTextarea);
scope.$on('$destroy', disableAutogrow);
scope.$on('$destroy', function() {
angular.element($window).off('resize', growTextarea);
});
function growTextarea() {
// temporarily disables element's flex so its height 'runs free'
element
.addClass('md-no-flex')
.attr('rows', 1);
.attr('rows', 1)
.css('height', 'auto')
.addClass('md-no-flex');
if (minRows) {
if (!lineHeight) {
node.style.minHeight = 0;
lineHeight = element.prop('clientHeight');
node.style.minHeight = null;
}
var height = getHeight();
var newRows = Math.round( Math.round(getHeight() / lineHeight) );
var rowsToSet = Math.min(newRows, minRows);
if (!lineHeight) {
// offsetHeight includes padding which can throw off our value
var originalPadding = element[0].style.padding || '';
lineHeight = element.css('padding', 0).prop('offsetHeight');
element[0].style.padding = originalPadding;
}
element
.css('height', lineHeight * rowsToSet + 'px')
.attr('rows', rowsToSet)
.toggleClass('_md-textarea-scrollable', newRows >= minRows);
if (minRows && lineHeight) {
height = Math.max(height, lineHeight * minRows);
}
} else {
element.css('height', 'auto');
node.scrollTop = 0;
var height = getHeight();
if (height) element.css('height', height + 'px');
if (maxRows && lineHeight) {
var maxHeight = lineHeight * maxRows;
if (maxHeight < height) {
element.attr('md-no-autogrow', '');
height = maxHeight;
} else {
element.removeAttr('md-no-autogrow');
}
}
element.removeClass('md-no-flex');
if (lineHeight) {
element.attr('rows', Math.round(height / lineHeight));
}
element
.css('height', height + 'px')
.removeClass('md-no-flex');
}

@@ -481,18 +524,89 @@

var line = node.scrollHeight - offsetHeight;
return offsetHeight + (line > 0 ? line : 0);
return offsetHeight + Math.max(line, 0);
}
function onScroll(e) {
node.scrollTop = 0;
// for smooth new line adding
var line = node.scrollHeight - node.offsetHeight;
var height = node.offsetHeight + line;
node.style.height = height + 'px';
function formattersListener(value) {
$mdUtil.nextTick(growTextarea);
return value;
}
function pipelineListener(value) {
growTextarea();
return value;
function disableAutogrow() {
if (!isAutogrowing) return;
isAutogrowing = false;
angular.element($window).off('resize', growTextarea);
scopeResizeListener && scopeResizeListener();
element
.attr('md-no-autogrow', '')
.off('input', growTextarea);
if (hasNgModel) {
var listenerIndex = ngModelCtrl.$formatters.indexOf(formattersListener);
if (listenerIndex > -1) {
ngModelCtrl.$formatters.splice(listenerIndex, 1);
}
}
}
function attachResizeHandle() {
if (attr.hasOwnProperty('mdNoResize')) return;
var handle = angular.element('<div class="md-resize-handle"></div>');
var isDragging = false;
var dragStart = null;
var startHeight = 0;
var container = containerCtrl.element;
var dragGestureHandler = $mdGesture.register(handle, 'drag', { horizontal: false });
element.after(handle);
handle.on('mousedown', onMouseDown);
container
.on('$md.dragstart', onDragStart)
.on('$md.drag', onDrag)
.on('$md.dragend', onDragEnd);
scope.$on('$destroy', function() {
handle
.off('mousedown', onMouseDown)
.remove();
container
.off('$md.dragstart', onDragStart)
.off('$md.drag', onDrag)
.off('$md.dragend', onDragEnd);
dragGestureHandler();
handle = null;
container = null;
dragGestureHandler = null;
});
function onMouseDown(ev) {
ev.preventDefault();
isDragging = true;
dragStart = ev.clientY;
startHeight = parseFloat(element.css('height')) || element.prop('offsetHeight');
}
function onDragStart(ev) {
if (!isDragging) return;
ev.preventDefault();
disableAutogrow();
container.addClass('md-input-resized');
}
function onDrag(ev) {
if (!isDragging) return;
element.css('height', startHeight + (ev.pointer.y - dragStart) - $mdUtil.scrollTop() + 'px');
}
function onDragEnd(ev) {
if (!isDragging) return;
isDragging = false;
container.removeClass('md-input-resized');
}
}
// Attach a watcher to detect when the textarea gets shown.

@@ -525,3 +639,3 @@ if (attr.hasOwnProperty('mdDetectHidden')) {

}
inputTextareaDirective.$inject = ["$mdUtil", "$window", "$mdAria", "$timeout"];
inputTextareaDirective.$inject = ["$mdUtil", "$window", "$mdAria", "$timeout", "$mdGesture"];

@@ -588,3 +702,3 @@ function mdMaxlengthDirective($animate, $mdUtil) {

// which does not have a length property.
charCountEl.text(String(element.val() || value || '').length + '/' + maxlength);
charCountEl.text(String(element.val() || value || '').length + ' / ' + maxlength);
return value;

@@ -596,3 +710,3 @@ }

function placeholderDirective($log) {
function placeholderDirective($compile) {
return {

@@ -602,6 +716,13 @@ restrict: 'A',

priority: 200,
link: postLink
link: {
// Note that we need to do this in the pre-link, as opposed to the post link, if we want to
// support data bindings in the placeholder. This is necessary, because we have a case where
// we transfer the placeholder value to the `<label>` and we remove it from the original `<input>`.
// If we did this in the post-link, Angular would have set up the observers already and would be
// re-adding the attribute, even though we removed it from the element.
pre: preLink
}
};
function postLink(scope, element, attr, inputContainer) {
function preLink(scope, element, attr, inputContainer) {
// If there is no input container, just return

@@ -611,6 +732,6 @@ if (!inputContainer) return;

var label = inputContainer.element.find('label');
var hasNoFloat = angular.isDefined(inputContainer.element.attr('md-no-float'));
var noFloat = inputContainer.element.attr('md-no-float');
// If we have a label, or they specify the md-no-float attribute, just return
if ((label && label.length) || hasNoFloat) {
if ((label && label.length) || noFloat === '' || scope.$eval(noFloat)) {
// Add a placeholder class so we can target it in the CSS

@@ -621,16 +742,25 @@ inputContainer.setHasPlaceholder(true);

// Otherwise, grab/remove the placeholder
var placeholderText = attr.placeholder;
element.removeAttr('placeholder');
// md-select handles placeholders on it's own
if (element[0].nodeName != 'MD-SELECT') {
// Move the placeholder expression to the label
var newLabel = angular.element('<label ng-click="delegateClick()" tabindex="-1">' + attr.placeholder + '</label>');
// And add the placeholder text as a separate label
if (inputContainer.input && inputContainer.input[0].nodeName != 'MD-SELECT') {
var placeholder = '<label ng-click="delegateClick()">' + placeholderText + '</label>';
// Note that we unset it via `attr`, in order to get Angular
// to remove any observers that it might have set up. Otherwise
// the attribute will be added on the next digest.
attr.$set('placeholder', null);
inputContainer.element.addClass('md-icon-float');
inputContainer.element.prepend(placeholder);
// We need to compile the label manually in case it has any bindings.
// A gotcha here is that we first add the element to the DOM and we compile
// it later. This is necessary, because if we compile the element beforehand,
// it won't be able to find the `mdInputContainer` controller.
inputContainer.element
.addClass('md-icon-float')
.prepend(newLabel);
$compile(newLabel)(scope);
}
}
}
placeholderDirective.$inject = ["$log"];
placeholderDirective.$inject = ["$compile"];

@@ -801,12 +931,10 @@ /**

function mdInputInvalidMessagesAnimation($q, $animateCss) {
var $$AnimateRunner, $animateCss, $mdUtil;
function mdInputInvalidMessagesAnimation($$AnimateRunner, $animateCss, $mdUtil) {
saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);
return {
addClass: function(element, className, done) {
var messages = getMessagesElement(element);
if (className == "md-input-invalid" && messages.hasClass('md-auto-hide')) {
showInputMessages(element, $animateCss, $q).finally(done);
} else {
done();
}
showInputMessages(element, done);
}

@@ -817,12 +945,14 @@

}
mdInputInvalidMessagesAnimation.$inject = ["$q", "$animateCss"];
mdInputInvalidMessagesAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"];
function ngMessagesAnimation($q, $animateCss) {
function ngMessagesAnimation($$AnimateRunner, $animateCss, $mdUtil) {
saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);
return {
enter: function(element, done) {
showInputMessages(element, $animateCss, $q).finally(done);
showInputMessages(element, done);
},
leave: function(element, done) {
hideInputMessages(element, $animateCss, $q).finally(done);
hideInputMessages(element, done);
},

@@ -832,3 +962,3 @@

if (className == "ng-hide") {
hideInputMessages(element, $animateCss, $q).finally(done);
hideInputMessages(element, done);
} else {

@@ -841,3 +971,3 @@ done();

if (className == "ng-hide") {
showInputMessages(element, $animateCss, $q).finally(done);
showInputMessages(element, done);
} else {

@@ -849,26 +979,20 @@ done();

}
ngMessagesAnimation.$inject = ["$q", "$animateCss"];
ngMessagesAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"];
function ngMessageAnimation($animateCss) {
function ngMessageAnimation($$AnimateRunner, $animateCss, $mdUtil) {
saveSharedServices($$AnimateRunner, $animateCss, $mdUtil);
return {
enter: function(element, done) {
var messages = getMessagesElement(element);
// If we have the md-auto-hide class, the md-input-invalid animation will fire, so we can skip
if (messages.hasClass('md-auto-hide')) {
done();
return;
}
return showMessage(element, $animateCss);
return showMessage(element);
},
leave: function(element, done) {
return hideMessage(element, $animateCss);
return hideMessage(element);
}
}
}
ngMessageAnimation.$inject = ["$animateCss"];
ngMessageAnimation.$inject = ["$$AnimateRunner", "$animateCss", "$mdUtil"];
function showInputMessages(element, $animateCss, $q) {
function showInputMessages(element, done) {
var animators = [], animator;

@@ -878,3 +1002,3 @@ var messages = getMessagesElement(element);

angular.forEach(messages.children(), function(child) {
animator = showMessage(angular.element(child), $animateCss);
animator = showMessage(angular.element(child));

@@ -884,6 +1008,6 @@ animators.push(animator.start());

return $q.all(animators);
$$AnimateRunner.all(animators, done);
}
function hideInputMessages(element, $animateCss, $q) {
function hideInputMessages(element, done) {
var animators = [], animator;

@@ -893,3 +1017,3 @@ var messages = getMessagesElement(element);

angular.forEach(messages.children(), function(child) {
animator = hideMessage(angular.element(child), $animateCss);
animator = hideMessage(angular.element(child));

@@ -899,8 +1023,20 @@ animators.push(animator.start());

return $q.all(animators);
$$AnimateRunner.all(animators, done);
}
function showMessage(element, $animateCss) {
var height = element[0].offsetHeight;
function showMessage(element) {
var height = parseInt(window.getComputedStyle(element[0]).height);
var topMargin = parseInt(window.getComputedStyle(element[0]).marginTop);
var messages = getMessagesElement(element);
var container = getInputElement(element);
// Check to see if the message is already visible so we can skip
var alreadyVisible = (topMargin > -height);
// If we have the md-auto-hide class, the md-input-invalid animation will fire, so we can skip
if (alreadyVisible || (messages.hasClass('md-auto-hide') && !container.hasClass('md-input-invalid'))) {
return $animateCss(element, {});
}
return $animateCss(element, {

@@ -915,5 +1051,6 @@ event: 'enter',

function hideMessage(element, $animateCss) {
function hideMessage(element) {
var height = element[0].offsetHeight;
var styles = window.getComputedStyle(element[0]);
//var styles = { opacity: element.css('opacity') };

@@ -942,7 +1079,19 @@ // If we are already hidden, just return an empty animation

function getMessagesElement(element) {
var input = getInputElement(element);
// If we are a ng-message element, we need to traverse up the DOM tree
if (element.hasClass('md-input-message-animation')) {
return angular.element($mdUtil.getClosest(element, function(node) {
return node.classList.contains('md-input-messages-animation');
}));
}
return angular.element(input[0].querySelector('.md-input-messages-animation'));
// Otherwise, we can traverse down
return angular.element(element[0].querySelector('.md-input-messages-animation'));
}
function saveSharedServices(_$$AnimateRunner_, _$animateCss_, _$mdUtil_) {
$$AnimateRunner = _$$AnimateRunner_;
$animateCss = _$animateCss_;
$mdUtil = _$mdUtil_;
}
})(window, window.angular);

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function i(e,t){function n(t,n){e(n);var i=n[0].querySelector(o),r=n[0].querySelector(a);i&&n.addClass("md-icon-left"),r&&n.addClass("md-icon-right")}function i(e,n,i,r){var o=this;o.isErrorGetter=i.mdIsError&&t(i.mdIsError),o.delegateClick=function(){o.input.focus()},o.element=n,o.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},o.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},o.setHasPlaceholder=function(e){n.toggleClass("md-input-has-placeholder",!!e)},o.setInvalid=function(e){e?r.addClass(n,"md-input-invalid"):r.removeClass(n,"md-input-invalid")},e.$watch(function(){return o.label&&o.input},function(e){e&&!o.label.attr("for")&&o.label.attr("for",o.input.attr("id"))})}var r=["INPUT","TEXTAREA","SELECT","MD-SELECT"],o=r.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),a=r.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return i.$inject=["$scope","$element","$attrs","$animate"],{restrict:"E",link:n,controller:i}}function r(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,i){!i||n.mdNoFloat||t.hasClass("_md-container-ignore")||(i.label=t,e.$on("$destroy",function(){i.label=null}))}}}function o(e,n,i,r){function o(o,a,u,l){function s(e){return m.setHasValue(!g.$isEmpty(e)),e}function c(){m.label&&u.$observe("required",function(e){m.label.toggleClass("md-required",e&&!v)})}function d(){m.setHasValue(a.val().length>0||(a[0].validity||{}).badInput)}function f(){function i(){if(a.addClass("md-no-flex").attr("rows",1),d){f||(m.style.minHeight=0,f=a.prop("clientHeight"),m.style.minHeight=null);var e=Math.round(Math.round(l()/f)),t=Math.min(e,d);a.css("height",f*t+"px").attr("rows",t).toggleClass("_md-textarea-scrollable",e>=d)}else{a.css("height","auto"),m.scrollTop=0;var n=l();n&&a.css("height",n+"px")}a.removeClass("md-no-flex")}function l(){var e=m.offsetHeight,t=m.scrollHeight-e;return e+(t>0?t:0)}function s(e){m.scrollTop=0;var t=m.scrollHeight-m.offsetHeight,n=m.offsetHeight+t;m.style.height=n+"px"}function c(e){return i(),e}if(!u.hasOwnProperty("mdNoAutogrow")){var d=u.hasOwnProperty("rows")?parseInt(u.rows):NaN,f=null,m=a[0];if(r(function(){e.nextTick(i)},10,!1),p?(g.$formatters.unshift(c),g.$parsers.unshift(c)):a.on("input",i),d||a.attr("rows",1).on("scroll",s),t.element(n).on("resize",i),o.$on("$destroy",function(){t.element(n).off("resize",i)}),u.hasOwnProperty("mdDetectHidden")){var h=function(){var e=!1;return function(){var t=0===m.offsetHeight;t===!1&&e===!0&&i(),e=t}}();o.$watch(function(){return e.nextTick(h,!1),!0})}}}var m=l[0],p=!!l[1],g=l[1]||e.fakeNgModel(),h=t.isDefined(u.readonly),v=e.parseAttributeBoolean(u.mdNoAsterisk);if(m){if("hidden"===u.type)return void a.attr("aria-hidden","true");if(m.input)throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!");m.input=a,c();var $=t.element('<div class="md-errors-spacer">');a.after($),m.label||i.expect(a,"aria-label",a.attr("placeholder")),a.addClass("md-input"),a.attr("id")||a.attr("id","input_"+e.nextUid()),"textarea"===a[0].tagName.toLowerCase()&&f(),p||d();var C=m.isErrorGetter||function(){return g.$invalid&&(g.$touched||y())},y=function(){var n=e.getClosest(a,"form"),i=n?t.element(n).controller("form"):null;return i?i.$submitted:!1};o.$watch(C,m.setInvalid),g.$parsers.push(s),g.$formatters.push(s),a.on("input",d),h||a.on("focus",function(t){e.nextTick(function(){m.setFocused(!0)})}).on("blur",function(t){e.nextTick(function(){m.setFocused(!1),d()})}),o.$on("$destroy",function(){m.setFocused(!1),m.setHasValue(!1),m.input=null})}}return{restrict:"E",require:["^?mdInputContainer","?ngModel"],link:o}}function a(e,n){function i(i,r,o,a){function u(e){return s.parent?(s.text(String(r.val()||e||"").length+"/"+l),e):e}var l,s,c,d=a[0],f=a[1];n.nextTick(function(){c=t.element(f.element[0].querySelector(".md-errors-spacer")),s=t.element('<div class="md-char-counter">'),c.append(s),o.$set("ngTrim","false"),d.$formatters.push(u),d.$viewChangeListeners.push(u),r.on("input keydown keyup",function(){u()}),i.$watch(o.mdMaxlength,function(n){l=n,t.isNumber(n)&&n>0?(s.parent().length||e.enter(s,c),u()):e.leave(s)}),d.$validators["md-maxlength"]=function(e,n){return!t.isNumber(l)||0>l?!0:(e||r.val()||n||"").length<=l}})}return{restrict:"A",require:["ngModel","^mdInputContainer"],link:i}}function u(e){function n(e,n,i,r){if(r){var o=r.element.find("label"),a=t.isDefined(r.element.attr("md-no-float"));if(o&&o.length||a)return void r.setHasPlaceholder(!0);var u=i.placeholder;if(n.removeAttr("placeholder"),r.input&&"MD-SELECT"!=r.input[0].nodeName){var l='<label ng-click="delegateClick()">'+u+"</label>";r.element.addClass("md-icon-float"),r.element.prepend(l)}}}return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:n}}function l(e){function t(t,n,i){function r(){a=!0,e(function(){n[0].select(),a=!1},1,!1)}function o(e){a&&e.preventDefault()}if("INPUT"===n[0].nodeName||"TEXTAREA"===n[0].nodeName){var a=!1;n.on("focus",r).on("mouseup",o),t.$on("$destroy",function(){n.off("focus",r).off("mouseup",o)})}}return{restrict:"A",link:t}}function s(){function e(e,n,i,r){r&&(n.toggleClass("md-input-messages-animation",!0),n.toggleClass("md-auto-hide",!0),("false"==i.mdAutoHide||t(i))&&n.toggleClass("md-auto-hide",!1))}function t(e){return y.some(function(t){return e[t]})}return{restrict:"EA",link:e,require:"^^?mdInputContainer"}}function c(e){function t(t){function n(){for(var e=t[0];e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}function i(t){return!!e.getClosest(t,"md-input-container")}function r(e){e.toggleClass("md-input-message-animation",!0)}if(i(t))r(t);else if(n())return function(e,n){i(n)&&r(t)}}return{restrict:"EA",compile:t,priority:100}}function d(e,t){return{addClass:function(n,i,r){var o=C(n);"md-input-invalid"==i&&o.hasClass("md-auto-hide")?p(n,t,e)["finally"](r):r()}}}function f(e,t){return{enter:function(n,i){p(n,t,e)["finally"](i)},leave:function(n,i){g(n,t,e)["finally"](i)},addClass:function(n,i,r){"ng-hide"==i?g(n,t,e)["finally"](r):r()},removeClass:function(n,i,r){"ng-hide"==i?p(n,t,e)["finally"](r):r()}}}function m(e){return{enter:function(t,n){var i=C(t);return i.hasClass("md-auto-hide")?void n():h(t,e)},leave:function(t,n){return v(t,e)}}}function p(e,n,i){var r,o=[],a=C(e);return t.forEach(a.children(),function(e){r=h(t.element(e),n),o.push(r.start())}),i.all(o)}function g(e,n,i){var r,o=[],a=C(e);return t.forEach(a.children(),function(e){r=v(t.element(e),n),o.push(r.start())}),i.all(o)}function h(e,t){var n=e[0].offsetHeight;return t(e,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-n+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function v(t,n){var i=t[0].offsetHeight,r=e.getComputedStyle(t[0]);return 0==r.opacity?n(t,{}):n(t,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-i+"px"},duration:.3})}function $(e){var t=e.controller("mdInputContainer");return t.element}function C(e){var n=$(e);return t.element(n[0].querySelector(".md-input-messages-animation"))}t.module("material.components.input",["material.core"]).directive("mdInputContainer",i).directive("label",r).directive("input",o).directive("textarea",o).directive("mdMaxlength",a).directive("placeholder",u).directive("ngMessages",s).directive("ngMessage",c).directive("ngMessageExp",c).directive("mdSelectOnFocus",l).animation(".md-input-invalid",d).animation(".md-input-messages-animation",f).animation(".md-input-message-animation",m),i.$inject=["$mdTheming","$parse"],o.$inject=["$mdUtil","$window","$mdAria","$timeout"],a.$inject=["$animate","$mdUtil"],u.$inject=["$log"],l.$inject=["$timeout"];var y=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];c.$inject=["$mdUtil"],d.$inject=["$q","$animateCss"],f.$inject=["$q","$animateCss"],m.$inject=["$animateCss"]}(window,window.angular);
!function(e,t,n){"use strict";function i(e,t){function n(t,n){e(n);var i=n[0].querySelector(o),r=n[0].querySelector(a);i&&n.addClass("md-icon-left"),r&&n.addClass("md-icon-right")}function i(e,n,i,r){var o=this;o.isErrorGetter=i.mdIsError&&t(i.mdIsError),o.delegateClick=function(){o.input.focus()},o.element=n,o.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},o.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},o.setHasPlaceholder=function(e){n.toggleClass("md-input-has-placeholder",!!e)},o.setInvalid=function(e){e?r.addClass(n,"md-input-invalid"):r.removeClass(n,"md-input-invalid")},e.$watch(function(){return o.label&&o.input},function(e){e&&!o.label.attr("for")&&o.label.attr("for",o.input.attr("id"))})}var r=["INPUT","TEXTAREA","SELECT","MD-SELECT"],o=r.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),a=r.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return i.$inject=["$scope","$element","$attrs","$animate"],{restrict:"E",link:n,controller:i}}function r(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,i){!i||n.mdNoFloat||t.hasClass("md-container-ignore")||(i.label=t,e.$on("$destroy",function(){i.label=null}))}}}function o(e,n,i,r,o){function a(a,u,s,l){function c(e){return p.setHasValue(!v.$isEmpty(e)),e}function d(){p.label&&s.$observe("required",function(e){p.label.toggleClass("md-required",e&&!C)})}function m(){p.setHasValue(u.val().length>0||(u[0].validity||{}).badInput)}function f(){function i(){u.attr("rows",1).css("height","auto").addClass("md-no-flex");var e=l();if(!y){var t=u[0].style.padding||"";y=u.css("padding",0).prop("offsetHeight"),u[0].style.padding=t}if(h&&y&&(e=Math.max(e,y*h)),$&&y){var n=y*$;n<e?(u.attr("md-no-autogrow",""),e=n):u.removeAttr("md-no-autogrow")}y&&u.attr("rows",Math.round(e/y)),u.css("height",e+"px").removeClass("md-no-flex")}function l(){var e=w.offsetHeight,t=w.scrollHeight-e;return e+Math.max(t,0)}function c(t){return e.nextTick(i),t}function d(){if(f&&(f=!1,t.element(n).off("resize",i),C&&C(),u.attr("md-no-autogrow","").off("input",i),g)){var e=v.$formatters.indexOf(c);e>-1&&v.$formatters.splice(e,1)}}function m(){function n(e){e.preventDefault(),m=!0,f=e.clientY,g=parseFloat(u.css("height"))||u.prop("offsetHeight")}function i(e){m&&(e.preventDefault(),d(),v.addClass("md-input-resized"))}function r(t){m&&u.css("height",g+(t.pointer.y-f)-e.scrollTop()+"px")}function l(e){m&&(m=!1,v.removeClass("md-input-resized"))}if(!s.hasOwnProperty("mdNoResize")){var c=t.element('<div class="md-resize-handle"></div>'),m=!1,f=null,g=0,v=p.element,h=o.register(c,"drag",{horizontal:!1});u.after(c),c.on("mousedown",n),v.on("$md.dragstart",i).on("$md.drag",r).on("$md.dragend",l),a.$on("$destroy",function(){c.off("mousedown",n).remove(),v.off("$md.dragstart",i).off("$md.drag",r).off("$md.dragend",l),h(),c=null,v=null,h=null})}}var f=!s.hasOwnProperty("mdNoAutogrow");if(m(),f){var h=s.hasOwnProperty("rows")?parseInt(s.rows):NaN,$=s.hasOwnProperty("maxRows")?parseInt(s.maxRows):NaN,C=a.$on("md-resize-textarea",i),y=null,w=u[0];if(r(function(){e.nextTick(i)},10,!1),u.on("input",i),g&&v.$formatters.push(c),h||u.attr("rows",1),t.element(n).on("resize",i),a.$on("$destroy",d),s.hasOwnProperty("mdDetectHidden")){var x=function(){var e=!1;return function(){var t=0===w.offsetHeight;t===!1&&e===!0&&i(),e=t}}();a.$watch(function(){return e.nextTick(x,!1),!0})}}}var p=l[0],g=!!l[1],v=l[1]||e.fakeNgModel(),h=l[2],$=t.isDefined(s.readonly),C=e.parseAttributeBoolean(s.mdNoAsterisk),y=u[0].tagName.toLowerCase();if(p){if("hidden"===s.type)return void u.attr("aria-hidden","true");if(p.input){if(p.input[0].contains(u[0]))return;throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!")}p.input=u,d();var w=t.element('<div class="md-errors-spacer">');u.after(w),p.label||i.expect(u,"aria-label",s.placeholder),u.addClass("md-input"),u.attr("id")||u.attr("id","input_"+e.nextUid()),"input"===y&&"number"===s.type&&s.min&&s.max&&!s.step?u.attr("step","any"):"textarea"===y&&f(),g||m();var x=p.isErrorGetter||function(){return v.$invalid&&(v.$touched||h&&h.$submitted)};a.$watch(x,p.setInvalid),s.ngValue&&s.$observe("value",m),v.$parsers.push(c),v.$formatters.push(c),u.on("input",m),$||u.on("focus",function(t){e.nextTick(function(){p.setFocused(!0)})}).on("blur",function(t){e.nextTick(function(){p.setFocused(!1),m()})}),a.$on("$destroy",function(){p.setFocused(!1),p.setHasValue(!1),p.input=null})}}return{restrict:"E",require:["^?mdInputContainer","?ngModel","?^form"],link:a}}function a(e,n){function i(i,r,o,a){function u(e){return l.parent?(l.text(String(r.val()||e||"").length+" / "+s),e):e}var s,l,c,d=a[0],m=a[1];n.nextTick(function(){c=t.element(m.element[0].querySelector(".md-errors-spacer")),l=t.element('<div class="md-char-counter">'),c.append(l),o.$set("ngTrim","false"),d.$formatters.push(u),d.$viewChangeListeners.push(u),r.on("input keydown keyup",function(){u()}),i.$watch(o.mdMaxlength,function(n){s=n,t.isNumber(n)&&n>0?(l.parent().length||e.enter(l,c),u()):e.leave(l)}),d.$validators["md-maxlength"]=function(e,n){return!t.isNumber(s)||s<0||(e||r.val()||n||"").length<=s}})}return{restrict:"A",require:["ngModel","^mdInputContainer"],link:i}}function u(e){function n(n,i,r,o){if(o){var a=o.element.find("label"),u=o.element.attr("md-no-float");if(a&&a.length||""===u||n.$eval(u))return void o.setHasPlaceholder(!0);if("MD-SELECT"!=i[0].nodeName){var s=t.element('<label ng-click="delegateClick()" tabindex="-1">'+r.placeholder+"</label>");r.$set("placeholder",null),o.element.addClass("md-icon-float").prepend(s),e(s)(n)}}}return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:{pre:n}}}function s(e){function t(t,n,i){function r(){a=!0,e(function(){n[0].select(),a=!1},1,!1)}function o(e){a&&e.preventDefault()}if("INPUT"===n[0].nodeName||"TEXTAREA"===n[0].nodeName){var a=!1;n.on("focus",r).on("mouseup",o),t.$on("$destroy",function(){n.off("focus",r).off("mouseup",o)})}}return{restrict:"A",link:t}}function l(){function e(e,n,i,r){r&&(n.toggleClass("md-input-messages-animation",!0),n.toggleClass("md-auto-hide",!0),("false"==i.mdAutoHide||t(i))&&n.toggleClass("md-auto-hide",!1))}function t(e){return w.some(function(t){return e[t]})}return{restrict:"EA",link:e,require:"^^?mdInputContainer"}}function c(e){function t(t){function n(){for(var e=t[0];e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}function i(t){return!!e.getClosest(t,"md-input-container")}function r(e){e.toggleClass("md-input-message-animation",!0)}if(i(t))r(t);else if(n())return function(e,n){i(n)&&r(t)}}return{restrict:"EA",compile:t,priority:100}}function d(e,t,n){return y(e,t,n),{addClass:function(e,t,n){p(e,n)}}}function m(e,t,n){return y(e,t,n),{enter:function(e,t){p(e,t)},leave:function(e,t){g(e,t)},addClass:function(e,t,n){"ng-hide"==t?g(e,n):n()},removeClass:function(e,t,n){"ng-hide"==t?p(e,n):n()}}}function f(e,t,n){return y(e,t,n),{enter:function(e,t){return v(e)},leave:function(e,t){return h(e)}}}function p(e,n){var i,r=[],o=C(e);t.forEach(o.children(),function(e){i=v(t.element(e)),r.push(i.start())}),x.all(r,n)}function g(e,n){var i,r=[],o=C(e);t.forEach(o.children(),function(e){i=h(t.element(e)),r.push(i.start())}),x.all(r,n)}function v(t){var n=parseInt(e.getComputedStyle(t[0]).height),i=parseInt(e.getComputedStyle(t[0]).marginTop),r=C(t),o=$(t),a=i>-n;return a||r.hasClass("md-auto-hide")&&!o.hasClass("md-input-invalid")?E(t,{}):E(t,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-n+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function h(t){var n=t[0].offsetHeight,i=e.getComputedStyle(t[0]);return 0==i.opacity?E(t,{}):E(t,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-n+"px"},duration:.3})}function $(e){var t=e.controller("mdInputContainer");return t.element}function C(e){return e.hasClass("md-input-message-animation")?t.element(b.getClosest(e,function(e){return e.classList.contains("md-input-messages-animation")})):t.element(e[0].querySelector(".md-input-messages-animation"))}function y(e,t,n){x=e,E=t,b=n}t.module("material.components.input",["material.core"]).directive("mdInputContainer",i).directive("label",r).directive("input",o).directive("textarea",o).directive("mdMaxlength",a).directive("placeholder",u).directive("ngMessages",l).directive("ngMessage",c).directive("ngMessageExp",c).directive("mdSelectOnFocus",s).animation(".md-input-invalid",d).animation(".md-input-messages-animation",m).animation(".md-input-message-animation",f).service("mdInputInvalidAnimation",d).service("mdInputMessagesAnimation",m).service("mdInputMessageAnimation",f),i.$inject=["$mdTheming","$parse"],o.$inject=["$mdUtil","$window","$mdAria","$timeout","$mdGesture"],a.$inject=["$animate","$mdUtil"],u.$inject=["$compile"],s.$inject=["$timeout"];var w=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];c.$inject=["$mdUtil"];var x,E,b;d.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],m.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],f.$inject=["$$AnimateRunner","$animateCss","$mdUtil"]}(window,window.angular);
{
"name": "angular-material-list",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -66,34 +66,168 @@ (function( window, angular, undefined ){

* @description
* The `<md-list-item>` directive is a container intended for row items in a `<md-list>` container.
* The `md-2-line` and `md-3-line` classes can be added to a `<md-list-item>`
* to increase the height with 22px and 40px respectively.
* A `md-list-item` element can be used to represent some information in a row.<br/>
*
* ## CSS
* `.md-avatar` - class for image avatars
* @usage
* ### Single Row Item
* <hljs lang="html">
* <md-list-item>
* <span>Single Row Item</span>
* </md-list-item>
* </hljs>
*
* `.md-avatar-icon` - class for icon avatars
* ### Multiple Lines
* By using the following markup, you will be able to have two lines inside of one `md-list-item`.
*
* `.md-offset` - on content without an avatar
* <hljs lang="html">
* <md-list-item class="md-2-line">
* <div class="md-list-item-text" layout="column">
* <p>First Line</p>
* <p>Second Line</p>
* </div>
* </md-list-item>
* </hljs>
*
* @usage
* It is also possible to have three lines inside of one list item.
*
* <hljs lang="html">
* <md-list>
* <md-list-item>
* <img class="md-avatar" ng-src="path/to/img"/>
* <span>Item content in list</span>
* </md-list-item>
* <md-list-item>
* <md-icon class="md-avatar-icon" md-svg-icon="communication:phone"></md-icon>
* <span>Item content in list</span>
* </md-list-item>
* </md-list>
* <md-list-item class="md-3-line">
* <div class="md-list-item-text" layout="column">
* <p>First Line</p>
* <p>Second Line</p>
* <p>Third Line</p>
* </div>
* </md-list-item>
* </hljs>
*
* _**Note:** We automatically apply special styling when the inner contents are wrapped inside
* of a `<md-button>` tag. This styling is automatically ignored for `class="md-secondary"` buttons
* and you can include a class of `class="md-exclude"` if you need to use a non-secondary button
* that is inside the list, but does not wrap the contents._
* ### Secondary Items
* Secondary items are elements which will be aligned at the end of the `md-list-item`.
*
* <hljs lang="html">
* <md-list-item>
* <span>Single Row Item</span>
* <md-button class="md-secondary">
* Secondary Button
* </md-button>
* </md-list-item>
* </hljs>
*
* It also possible to have multiple secondary items inside of one `md-list-item`.
*
* <hljs lang="html">
* <md-list-item>
* <span>Single Row Item</span>
* <md-button class="md-secondary">First Button</md-button>
* <md-button class="md-secondary">Second Button</md-button>
* </md-list-item>
* </hljs>
*
* ### Proxy Item
* Proxies are elements, which will execute their specific action on click<br/>
* Currently supported proxy items are
* - `md-checkbox` (Toggle)
* - `md-switch` (Toggle)
* - `md-menu` (Open)
*
* This means, when using a supported proxy item inside of `md-list-item`, the list item will
* become clickable and executes the associated action of the proxy element on click.
*
* <hljs lang="html">
* <md-list-item>
* <span>First Line</span>
* <md-checkbox class="md-secondary"></md-checkbox>
* </md-list-item>
* </hljs>
*
* The `md-checkbox` element will be automatically detected as a proxy element and will toggle on click.
*
* <hljs lang="html">
* <md-list-item>
* <span>First Line</span>
* <md-switch class="md-secondary"></md-switch>
* </md-list-item>
* </hljs>
*
* The recognized `md-switch` will toggle its state, when the user clicks on the `md-list-item`.
*
* It is also possible to have a `md-menu` inside of a `md-list-item`.
* <hljs lang="html">
* <md-list-item>
* <p>Click anywhere to fire the secondary action</p>
* <md-menu class="md-secondary">
* <md-button class="md-icon-button">
* <md-icon md-svg-icon="communication:message"></md-icon>
* </md-button>
* <md-menu-content width="4">
* <md-menu-item>
* <md-button>
* Redial
* </md-button>
* </md-menu-item>
* <md-menu-item>
* <md-button>
* Check voicemail
* </md-button>
* </md-menu-item>
* <md-menu-divider></md-menu-divider>
* <md-menu-item>
* <md-button>
* Notifications
* </md-button>
* </md-menu-item>
* </md-menu-content>
* </md-menu>
* </md-list-item>
* </hljs>
*
* The menu will automatically open, when the users clicks on the `md-list-item`.<br/>
*
* If the developer didn't specify any position mode on the menu, the `md-list-item` will automatically detect the
* position mode and applies it to the `md-menu`.
*
* ### Avatars
* Sometimes you may want to have some avatars inside of the `md-list-item `.<br/>
* You are able to create a optimized icon for the list item, by applying the `.md-avatar` class on the `<img>` element.
*
* <hljs lang="html">
* <md-list-item>
* <img src="my-avatar.png" class="md-avatar">
* <span>Alan Turing</span>
* </hljs>
*
* When using `<md-icon>` for an avater, you have to use the `.md-avatar-icon` class.
* <hljs lang="html">
* <md-list-item>
* <md-icon class="md-avatar-icon" md-svg-icon="avatars:timothy"></md-icon>
* <span>Timothy Kopra</span>
* </md-list-item>
* </hljs>
*
* In cases, you have a `md-list-item`, which doesn't have any avatar,
* but you want to align it with the other avatar items, you have to use the `.md-offset` class.
*
* <hljs lang="html">
* <md-list-item class="md-offset">
* <span>Jon Doe</span>
* </md-list-item>
* </hljs>
*
* ### DOM modification
* The `md-list-item` component automatically detects if the list item should be clickable.
*
* ---
* If the `md-list-item` is clickable, we wrap all content inside of a `<div>` and create
* an overlaying button, which will will execute the given actions (like `ng-href`, `ng-click`)
*
* We create an overlaying button, instead of wrapping all content inside of the button,
* because otherwise some elements may not be clickable inside of the button.
*
* ---
* When using a secondary item inside of your list item, the `md-list-item` component will automatically create
* a secondary container at the end of the `md-list-item`, which contains all secondary items.
*
* The secondary item container is not static, because otherwise the overflow will not work properly on the
* list item.
*
*/
function mdListItemDirective($mdAria, $mdConstant, $mdUtil, $timeout) {
var proxiedTypes = ['md-checkbox', 'md-switch'];
var proxiedTypes = ['md-checkbox', 'md-switch', 'md-menu'];
return {

@@ -112,3 +246,3 @@ restrict: 'E',

if (tAttrs.ngClick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {
if (tAttrs.ngClick || tAttrs.ngDblclick || tAttrs.ngHref || tAttrs.href || tAttrs.uiSref || tAttrs.ngAttrUiSref) {
wrapIn('button');

@@ -125,8 +259,12 @@ } else {

} else if (!tEl[0].querySelector('md-button:not(.md-secondary):not(.md-exclude)')) {
tEl.addClass('_md-no-proxy');
tEl.addClass('md-no-proxy');
}
}
wrapSecondaryItems();
setupToggleAria();
if (hasProxiedElement && proxyElement.nodeName === "MD-MENU") {
setupProxiedMenu();
}

@@ -148,12 +286,41 @@ function setupToggleAria() {

function setupProxiedMenu() {
var menuEl = angular.element(proxyElement);
var isEndAligned = menuEl.parent().hasClass('md-secondary-container') ||
proxyElement.parentNode.firstElementChild !== proxyElement;
var xAxisPosition = 'left';
if (isEndAligned) {
// When the proxy item is aligned at the end of the list, we have to set the origin to the end.
xAxisPosition = 'right';
}
// Set the position mode / origin of the proxied menu.
if (!menuEl.attr('md-position-mode')) {
menuEl.attr('md-position-mode', xAxisPosition + ' target');
}
// Apply menu open binding to menu button
var menuOpenButton = menuEl.children().eq(0);
if (!hasClickEvent(menuOpenButton[0])) {
menuOpenButton.attr('ng-click', '$mdOpenMenu($event)');
}
if (!menuOpenButton.attr('aria-label')) {
menuOpenButton.attr('aria-label', 'Open List Menu');
}
}
function wrapIn(type) {
if (type == 'div') {
itemContainer = angular.element('<div class="_md-no-style _md-list-item-inner">');
itemContainer = angular.element('<div class="md-no-style md-list-item-inner">');
itemContainer.append(tEl.contents());
tEl.addClass('_md-proxy-focus');
tEl.addClass('md-proxy-focus');
} else {
// Element which holds the default list-item content.
itemContainer = angular.element(
'<div class="md-button _md-no-style">'+
' <div class="_md-list-item-inner"></div>'+
'<div class="md-button md-no-style">'+
' <div class="md-list-item-inner"></div>'+
'</div>'

@@ -164,12 +331,20 @@ );

var buttonWrap = angular.element(
'<md-button class="_md-no-style"></md-button>'
'<md-button class="md-no-style"></md-button>'
);
buttonWrap[0].setAttribute('aria-label', tEl[0].textContent);
copyAttributes(tEl[0], buttonWrap[0]);
// We allow developers to specify the `md-no-focus` class, to disable the focus style
// on the button executor. Once more classes should be forwarded, we should probably make the
// class forward more generic.
if (tEl.hasClass('md-no-focus')) {
buttonWrap.addClass('md-no-focus');
}
// Append the button wrap before our list-item content, because it will overlay in relative.
itemContainer.prepend(buttonWrap);
itemContainer.children().eq(1).append(tEl.contents());
tEl.addClass('_md-button-wrap');

@@ -183,3 +358,3 @@ }

function wrapSecondaryItems() {
var secondaryItemsWrapper = angular.element('<div class="_md-secondary-container">');
var secondaryItemsWrapper = angular.element('<div class="md-secondary-container">');

@@ -190,6 +365,2 @@ angular.forEach(secondaryItems, function(secondaryItem) {

// Since the secondary item container is static we need to fill the remaing space.
var spaceFiller = angular.element('<div class="flex"></div>');
itemContainer.append(spaceFiller);
itemContainer.append(secondaryItemsWrapper);

@@ -199,8 +370,17 @@ }

function wrapSecondaryItem(secondaryItem, container) {
// If the current secondary item is not a button, but contains a ng-click attribute,
// the secondary item will be automatically wrapped inside of a button.
if (secondaryItem && !isButton(secondaryItem) && secondaryItem.hasAttribute('ng-click')) {
$mdAria.expect(secondaryItem, 'aria-label');
var buttonWrapper = angular.element('<md-button class="md-secondary md-icon-button">');
copyAttributes(secondaryItem, buttonWrapper[0]);
// Copy the attributes from the secondary item to the generated button.
// We also support some additional attributes from the secondary item,
// because some developers may use a ngIf, ngHide, ngShow on their item.
copyAttributes(secondaryItem, buttonWrapper[0], ['ng-if', 'ng-hide', 'ng-show']);
secondaryItem.setAttribute('tabindex', '-1');
buttonWrapper.append(secondaryItem);
secondaryItem = buttonWrapper[0];

@@ -219,10 +399,24 @@ }

function copyAttributes(item, wrapper) {
var copiedAttrs = ['ng-if', 'ng-click', 'aria-label', 'ng-disabled',
'ui-sref', 'href', 'ng-href', 'target', 'ng-attr-ui-sref', 'ui-sref-opts'];
/**
* Copies attributes from a source element to the destination element
* By default the function will copy the most necessary attributes, supported
* by the button executor for clickable list items.
* @param source Element with the specified attributes
* @param destination Element which will retrieve the attributes
* @param extraAttrs Additional attributes, which will be copied over.
*/
function copyAttributes(source, destination, extraAttrs) {
var copiedAttrs = $mdUtil.prefixer([
'ng-if', 'ng-click', 'ng-dblclick', 'aria-label', 'ng-disabled', 'ui-sref',
'href', 'ng-href', 'target', 'ng-attr-ui-sref', 'ui-sref-opts'
]);
if (extraAttrs) {
copiedAttrs = copiedAttrs.concat($mdUtil.prefixer(extraAttrs));
}
angular.forEach(copiedAttrs, function(attr) {
if (item.hasAttribute(attr)) {
wrapper.setAttribute(attr, item.getAttribute(attr));
item.removeAttribute(attr);
if (source.hasAttribute(attr)) {
destination.setAttribute(attr, source.getAttribute(attr));
source.removeAttribute(attr);
}

@@ -254,3 +448,3 @@ });

$element.addClass('_md'); // private md component indicator for styling
var proxies = [],

@@ -265,3 +459,3 @@ firstElement = $element[0].firstElementChild,

if ($element.hasClass('_md-proxy-focus') && proxies.length) {
if ($element.hasClass('md-proxy-focus') && proxies.length) {
angular.forEach(proxies, function(proxy) {

@@ -302,2 +496,3 @@ proxy = angular.element(proxy);

}
function computeClickable() {

@@ -308,3 +503,3 @@ if (proxies.length == 1 || hasClick) {

if (!hasClick) {
ctrl.attachRipple($scope, angular.element($element[0].querySelector('._md-no-style')));
ctrl.attachRipple($scope, angular.element($element[0].querySelector('.md-no-style')));
}

@@ -314,2 +509,21 @@ }

function isEventFromControl(event) {
var forbiddenControls = ['md-slider'];
// If there is no path property in the event, then we can assume that the event was not bubbled.
if (!event.path) {
return forbiddenControls.indexOf(event.target.tagName.toLowerCase()) !== -1;
}
// We iterate the event path up and check for a possible component.
// Our maximum index to search, is the list item root.
var maxPath = event.path.indexOf($element.children()[0]);
for (var i = 0; i < maxPath; i++) {
if (forbiddenControls.indexOf(event.path[i].tagName.toLowerCase()) !== -1) {
return true;
}
}
}
var clickChildKeypressListener = function(e) {

@@ -337,2 +551,6 @@ if (e.target.nodeName != 'INPUT' && e.target.nodeName != 'TEXTAREA' && !e.target.isContentEditable) {

$element.children().eq(0).on('click', function(e) {
// When the event is coming from an control and it should not trigger the proxied element
// then we are skipping.
if (isEventFromControl(e)) return;
var parentButton = $mdUtil.getClosest(e.target, 'BUTTON');

@@ -342,2 +560,5 @@ if (!parentButton && clickChild.contains(e.target)) {

if (e.target !== proxy && !proxy.contains(e.target)) {
if (proxy.nodeName === 'MD-MENU') {
proxy = proxy.children[0];
}
angular.element(proxy).triggerHandler('click');

@@ -344,0 +565,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function r(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function i(e,n,r,i){var o=["md-checkbox","md-switch"];return{restrict:"E",controller:"MdListController",compile:function(a,s){function c(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=a.find(t)[0])&&!e.hasAttribute("aria-label")){var i=a.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}function l(e){if("div"==e)y=t.element('<div class="_md-no-style _md-list-item-inner">'),y.append(a.contents()),a.addClass("_md-proxy-focus");else{y=t.element('<div class="md-button _md-no-style"> <div class="_md-list-item-inner"></div></div>');var n=t.element('<md-button class="_md-no-style"></md-button>');n[0].setAttribute("aria-label",a[0].textContent),m(a[0],n[0]),y.prepend(n),y.children().eq(1).append(a.contents()),a.addClass("_md-button-wrap")}a[0].setAttribute("tabindex","-1"),a.append(y)}function d(){var e=t.element('<div class="_md-secondary-container">');t.forEach(C,function(t){u(t,e)});var n=t.element('<div class="flex"></div>');y.append(n),y.append(e)}function u(n,r){if(n&&!p(n)&&n.hasAttribute("ng-click")){e.expect(n,"aria-label");var i=t.element('<md-button class="md-secondary md-icon-button">');m(n,i[0]),n.setAttribute("tabindex","-1"),i.append(n),n=i[0]}n&&(!v(n)||!s.ngClick&&f(n))&&t.element(n).removeClass("md-secondary"),a.addClass("md-with-secondary"),r.append(n)}function m(e,n){var r=["ng-if","ng-click","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"];t.forEach(r,function(t){e.hasAttribute(t)&&(n.setAttribute(t,e.getAttribute(t)),e.removeAttribute(t))})}function f(e){return-1!=o.indexOf(e.nodeName.toLowerCase())}function p(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"==t||"BUTTON"==t}function v(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===s.$normalize(t[n].name))return!0;return!1}function b(e,a,s,c){function l(){m&&m.children&&!b&&t.forEach(o,function(e){t.forEach(m.querySelectorAll(e+":not(.md-secondary)"),function(e){u.push(e)})})}function d(){(1==u.length||b)&&(a.addClass("md-clickable"),b||c.attachRipple(e,t.element(a[0].querySelector("._md-no-style"))))}a.addClass("_md");var u=[],m=a[0].firstElementChild,f=a.hasClass("_md-button-wrap"),p=f?m.firstElementChild:m,b=p&&v(p);l(),d(),a.hasClass("_md-proxy-focus")&&u.length&&t.forEach(u,function(n){n=t.element(n),e.mouseActive=!1,n.on("mousedown",function(){e.mouseActive=!0,i(function(){e.mouseActive=!1},100)}).on("focus",function(){e.mouseActive===!1&&a.addClass("md-focused"),n.on("blur",function t(){a.removeClass("md-focused"),n.off("blur",t)})})});var h=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var t=e.which||e.keyCode;t==n.KEY_CODE.SPACE&&p&&(p.click(),e.preventDefault(),e.stopPropagation())}};b||u.length||p&&p.addEventListener("keypress",h),a.off("click"),a.off("keypress"),1==u.length&&p&&a.children().eq(0).on("click",function(e){var n=r.getClosest(e.target,"BUTTON");!n&&p.contains(e.target)&&t.forEach(u,function(n){e.target===n||n.contains(e.target)||t.element(n).triggerHandler("click")})}),e.$on("$destroy",function(){p&&p.removeEventListener("keypress",h)})}var h,g,C=a[0].querySelectorAll(".md-secondary"),y=a;if(a[0].setAttribute("role","listitem"),s.ngClick||s.ngHref||s.href||s.uiSref||s.ngAttrUiSref)l("button");else{for(var A,k=0;A=o[k];++k)if(g=a[0].querySelector(A)){h=!0;break}h?l("div"):a[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)")||a.addClass("_md-no-proxy")}return d(),c(),b}}}function o(e,t,n){function r(e,t){var r={};n.attach(e,t,r)}var i=this;i.attachRipple=r}t.module("material.components.list",["material.core"]).controller("MdListController",o).directive("mdList",r).directive("mdListItem",i),r.$inject=["$mdTheming"],i.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],o.$inject=["$scope","$element","$mdListInkRipple"]}(window,window.angular);
!function(e,t,n){"use strict";function r(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function i(e,n,r,i){var a=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(o,s){function d(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=o.find(t)[0])&&!e.hasAttribute("aria-label")){var i=o.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}function c(){var e=t.element(C),n=e.parent().hasClass("md-secondary-container")||C.parentNode.firstElementChild!==C,r="left";n&&(r="right"),e.attr("md-position-mode")||e.attr("md-position-mode",r+" target");var i=e.children().eq(0);g(i[0])||i.attr("ng-click","$mdOpenMenu($event)"),i.attr("aria-label")||i.attr("aria-label","Open List Menu")}function l(e){if("div"==e)A=t.element('<div class="md-no-style md-list-item-inner">'),A.append(o.contents()),o.addClass("md-proxy-focus");else{A=t.element('<div class="md-button md-no-style"> <div class="md-list-item-inner"></div></div>');var n=t.element('<md-button class="md-no-style"></md-button>');n[0].setAttribute("aria-label",o[0].textContent),f(o[0],n[0]),o.hasClass("md-no-focus")&&n.addClass("md-no-focus"),A.prepend(n),A.children().eq(1).append(o.contents()),o.addClass("_md-button-wrap")}o[0].setAttribute("tabindex","-1"),o.append(A)}function u(){var e=t.element('<div class="md-secondary-container">');t.forEach(y,function(t){m(t,e)}),A.append(e)}function m(n,r){if(n&&!h(n)&&n.hasAttribute("ng-click")){e.expect(n,"aria-label");var i=t.element('<md-button class="md-secondary md-icon-button">');f(n,i[0],["ng-if","ng-hide","ng-show"]),n.setAttribute("tabindex","-1"),i.append(n),n=i[0]}n&&(!g(n)||!s.ngClick&&p(n))&&t.element(n).removeClass("md-secondary"),o.addClass("md-with-secondary"),r.append(n)}function f(e,n,i){var a=r.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"]);i&&(a=a.concat(r.prefixer(i))),t.forEach(a,function(t){e.hasAttribute(t)&&(n.setAttribute(t,e.getAttribute(t)),e.removeAttribute(t))})}function p(e){return a.indexOf(e.nodeName.toLowerCase())!=-1}function h(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"==t||"BUTTON"==t}function g(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===s.$normalize(t[n].name))return!0;return!1}function v(e,o,s,d){function c(){f&&f.children&&!v&&t.forEach(a,function(e){t.forEach(f.querySelectorAll(e+":not(.md-secondary)"),function(e){m.push(e)})})}function l(){(1==m.length||v)&&(o.addClass("md-clickable"),v||d.attachRipple(e,t.element(o[0].querySelector(".md-no-style"))))}function u(e){var t=["md-slider"];if(!e.path)return t.indexOf(e.target.tagName.toLowerCase())!==-1;for(var n=e.path.indexOf(o.children()[0]),r=0;r<n;r++)if(t.indexOf(e.path[r].tagName.toLowerCase())!==-1)return!0}o.addClass("_md");var m=[],f=o[0].firstElementChild,p=o.hasClass("_md-button-wrap"),h=p?f.firstElementChild:f,v=h&&g(h);c(),l(),o.hasClass("md-proxy-focus")&&m.length&&t.forEach(m,function(n){n=t.element(n),e.mouseActive=!1,n.on("mousedown",function(){e.mouseActive=!0,i(function(){e.mouseActive=!1},100)}).on("focus",function(){e.mouseActive===!1&&o.addClass("md-focused"),n.on("blur",function t(){o.removeClass("md-focused"),n.off("blur",t)})})});var b=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var t=e.which||e.keyCode;t==n.KEY_CODE.SPACE&&h&&(h.click(),e.preventDefault(),e.stopPropagation())}};v||m.length||h&&h.addEventListener("keypress",b),o.off("click"),o.off("keypress"),1==m.length&&h&&o.children().eq(0).on("click",function(e){if(!u(e)){var n=r.getClosest(e.target,"BUTTON");!n&&h.contains(e.target)&&t.forEach(m,function(n){e.target===n||n.contains(e.target)||("MD-MENU"===n.nodeName&&(n=n.children[0]),t.element(n).triggerHandler("click"))})}}),e.$on("$destroy",function(){h&&h.removeEventListener("keypress",b)})}var b,C,y=o[0].querySelectorAll(".md-secondary"),A=o;if(o[0].setAttribute("role","listitem"),s.ngClick||s.ngDblclick||s.ngHref||s.href||s.uiSref||s.ngAttrUiSref)l("button");else{for(var k,E=0;k=a[E];++E)if(C=o[0].querySelector(k)){b=!0;break}b?l("div"):o[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)")||o.addClass("md-no-proxy")}return u(),d(),b&&"MD-MENU"===C.nodeName&&c(),v}}}function a(e,t,n){function r(e,t){var r={};n.attach(e,t,r)}var i=this;i.attachRipple=r}t.module("material.components.list",["material.core"]).controller("MdListController",a).directive("mdList",r).directive("mdListItem",i),r.$inject=["$mdTheming"],i.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],a.$inject=["$scope","$element","$mdListInkRipple"]}(window,window.angular);
{
"name": "angular-material-menu",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-backdrop": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-backdrop": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -32,2 +32,3 @@ (function( window, angular, undefined ){

var prefixer = $mdUtil.prefixer();
var menuContainer;

@@ -46,4 +47,5 @@ var self = this;

menuContainer = setMenuContainer;
// Default element for ARIA attributes has the ngClick or ngMouseenter expression
triggerElement = $element[0].querySelector('[ng-click],[ng-mouseenter]');
triggerElement = $element[0].querySelector(prefixer.buildSelector(['ng-click', 'ng-mouseenter']));
triggerElement.setAttribute('aria-expanded', 'false');

@@ -67,3 +69,7 @@

$scope.$on('$destroy', this.disableHoverListener);
$scope.$on('$destroy', angular.bind(this, function() {
this.disableHoverListener();
$mdMenu.destroy();
}));
menuContainer.on('$destroy', function() {

@@ -167,9 +173,9 @@ $mdMenu.destroy();

menuContainer.attr('aria-hidden', 'false');
$element[0].classList.add('_md-open');
$element[0].classList.add('md-open');
angular.forEach(self.nestedMenus, function(el) {
el.classList.remove('_md-open');
el.classList.remove('md-open');
});
} else {
menuContainer.attr('aria-hidden', 'true');
$element[0].classList.remove('_md-open');
$element[0].classList.remove('md-open');
}

@@ -180,3 +186,5 @@ $scope.$mdMenuIsOpen = self.isOpen;

this.focusMenuContainer = function focusMenuContainer() {
var focusTarget = menuContainer[0].querySelector('[md-menu-focus-target]');
var focusTarget = menuContainer[0]
.querySelector(prefixer.buildSelector(['md-menu-focus-target', 'md-autofocus']));
if (!focusTarget) focusTarget = menuContainer[0].querySelector('.md-button');

@@ -361,3 +369,18 @@ focusTarget.focus();

* </hljs>
*
* ### Auto Focus
* By default, when a menu opens, `md-menu` focuses the first button in the menu content.
*
* But sometimes you would like to focus another specific menu item instead of the first.<br/>
* This can be done by applying the `md-autofocus` directive on the given element.
*
* <hljs lang="html">
* <md-menu-item>
* <md-button md-autofocus ng-click="doSomething()">
* Auto Focus
* </md-button>
* </md-menu-item>
* </hljs>
*
*
* ### Preventing close

@@ -420,4 +443,7 @@ *

var triggerElement = templateElement.children()[0];
if (!triggerElement.hasAttribute('ng-click')) {
triggerElement = triggerElement.querySelector('[ng-click],[ng-mouseenter]') || triggerElement;
var prefixer = $mdUtil.prefixer();
if (!prefixer.hasAttribute(triggerElement, 'ng-click')) {
triggerElement = triggerElement
.querySelector(prefixer.buildSelector(['ng-click', 'ng-mouseenter'])) || triggerElement;
}

@@ -456,3 +482,3 @@ if (triggerElement && (

// Move everything into a md-menu-container and pass it to the controller
var menuContainer = angular.element( '<div class="_md _md-open-menu-container md-whiteframe-z2"></div>');
var menuContainer = angular.element( '<div class="_md md-open-menu-container md-whiteframe-z2"></div>');
var menuContents = element.children()[1];

@@ -505,2 +531,3 @@

function menuDefaultOptions($mdUtil, $mdTheming, $mdConstant, $document, $window, $q, $$rAF, $animateCss, $animate) {
var prefixer = $mdUtil.prefixer();
var animator = $mdUtil.dom.animator;

@@ -537,3 +564,3 @@

if (options.hasBackdrop) {
options.backdrop = $mdUtil.createBackdrop(scope, "_md-menu-backdrop _md-click-catcher");
options.backdrop = $mdUtil.createBackdrop(scope, "md-menu-backdrop md-click-catcher");

@@ -557,3 +584,3 @@ $animate.enter(options.backdrop, $document[0].body);

function onRemove(scope, element, opts) {
opts.cleanupInteraction();
opts.cleanupInteraction && opts.cleanupInteraction();
opts.cleanupResizing();

@@ -572,3 +599,3 @@ opts.hideBackdrop();

function animateRemoval() {
return $animateCss(element, {addClass: '_md-leave'}).start();
return $animateCss(element, {addClass: 'md-leave'}).start();
}

@@ -580,3 +607,3 @@

function detachAndClean() {
element.removeClass('_md-active');
element.removeClass('md-active');
detachElement(element, opts);

@@ -620,3 +647,3 @@ opts.alreadyOpen = false;

element.removeClass('_md-leave');
element.removeClass('md-leave');

@@ -626,3 +653,3 @@ // Animate the menu scaling, and opacity [from its position origin (default == top-left)]

$animateCss(element, {
addClass: '_md-active',
addClass: 'md-active',
from: animator.toCss(position),

@@ -686,3 +713,3 @@ to: animator.toCss({transform: ''})

function activateInteraction() {
element.addClass('_md-clickable');
element.addClass('md-clickable');

@@ -700,3 +727,5 @@ // close on backdrop click

// kick off initial focus in the menu on the first element
var focusTarget = opts.menuContentEl[0].querySelector('[md-menu-focus-target]');
var focusTarget = opts.menuContentEl[0]
.querySelector(prefixer.buildSelector(['md-menu-focus-target', 'md-autofocus']));
if ( !focusTarget ) {

@@ -711,3 +740,3 @@ var firstChild = opts.menuContentEl[0].firstElementChild;

return function cleanupInteraction() {
element.removeClass('_md-clickable');
element.removeClass('md-clickable');
if (opts.backdrop) opts.backdrop.off('click', onBackdropClick);

@@ -798,10 +827,9 @@ opts.menuContentEl.off('keydown', onMenuKeyDown);

if (!target) return false;
for (var i = 0, attr; attr = attrs[i]; ++i) {
var altForms = [attr, 'data-' + attr, 'x-' + attr];
for (var j = 0, rawAttr; rawAttr = altForms[j]; ++j) {
if (target.hasAttribute(rawAttr)) {
return true;
}
if (prefixer.hasAttribute(target, attr)) {
return true;
}
}
return false;

@@ -811,9 +839,2 @@ }

opts.menuContentEl[0].addEventListener('click', captureClickListener, true);
return function cleanupInteraction() {
element.removeClass('_md-clickable');
opts.menuContentEl.off('keydown');
opts.menuContentEl[0].removeEventListener('click', captureClickListener, true);
};
}

@@ -890,3 +911,3 @@ }

var originNode = opts.target[0].querySelector('[md-menu-origin]') || opts.target[0],
var originNode = opts.target[0].querySelector(prefixer.buildSelector('md-menu-origin')) || opts.target[0],
originNodeRect = originNode.getBoundingClientRect();

@@ -909,3 +930,3 @@

alignTarget = alignTarget.firstElementChild || alignTarget;
alignTarget = alignTarget.querySelector('[md-menu-align-target]') || alignTarget;
alignTarget = alignTarget.querySelector(prefixer.buildSelector('md-menu-align-target')) || alignTarget;
alignTargetRect = alignTarget.getBoundingClientRect();

@@ -938,3 +959,3 @@

var rtl = ($mdUtil.bidi() == 'rtl');
switch (positionMode.left) {

@@ -958,4 +979,13 @@ case 'target':

break;
case 'right':
if (rtl) {
position.left = originNodeRect.right - originNodeRect.width;
transformOrigin += 'left';
} else {
position.left = originNodeRect.right - openMenuNodeRect.width;
transformOrigin += 'right';
}
break;
case 'left':
if(rtl) {
if (rtl) {
position.left = originNodeRect.right - openMenuNodeRect.width;

@@ -962,0 +992,0 @@ transformOrigin += 'right';

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function r(e,r,o,i,a,l,s,d){var u,c,m=this;this.nestLevel=parseInt(r.mdNestLevel,10)||0,this.init=function(n,r){r=r||{},u=n,c=o[0].querySelector("[ng-click],[ng-mouseenter]"),c.setAttribute("aria-expanded","false"),this.isInMenuBar=r.isInMenuBar,this.nestedMenus=a.nodesToArray(u[0].querySelectorAll(".md-nested-menu")),u.on("$mdInterimElementRemove",function(){m.isOpen=!1,a.nextTick(function(){m.onIsOpenChanged(m.isOpen)})}),a.nextTick(function(){m.onIsOpenChanged(m.isOpen)});var l="menu_container_"+a.nextUid();u.attr("id",l),t.element(c).attr({"aria-owns":l,"aria-haspopup":"true"}),i.$on("$destroy",this.disableHoverListener),u.on("$destroy",function(){e.destroy()})};var f,p,h=[];this.enableHoverListener=function(){h.push(s.$on("$mdMenuOpen",function(e,t){u[0].contains(t[0])&&(m.currentlyOpenMenu=t.controller("mdMenu"),m.isAlreadyOpening=!1,m.currentlyOpenMenu.registerContainerProxy(m.triggerContainerProxy.bind(m)))})),h.push(s.$on("$mdMenuClose",function(e,t){u[0].contains(t[0])&&(m.currentlyOpenMenu=n)})),p=t.element(a.nodesToArray(u[0].children[0].children)),p.on("mouseenter",m.handleMenuItemHover),p.on("mouseleave",m.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;h.length;)h.shift()();p&&p.off("mouseenter",m.handleMenuItemHover),p&&p.off("mouseleave",m.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!m.isAlreadyOpening){var n=e.target.querySelector("md-menu")||a.getClosest(e.target,"MD-MENU");f=l(function(){if(n&&(n=t.element(n).controller("mdMenu")),m.currentlyOpenMenu&&m.currentlyOpenMenu!=n){var e=m.nestLevel+1;m.currentlyOpenMenu.close(!0,{closeTo:e}),m.isAlreadyOpening=!!n,n&&n.open()}else n&&!n.isOpen&&n.open&&(m.isAlreadyOpening=!!n,n&&n.open())},n?100:250);var r=e.currentTarget.querySelector(".md-button:not([disabled])");r&&r.focus()}},this.handleMenuItemMouseLeave=function(){f&&(l.cancel(f),f=n)},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),m.isOpen||(m.enableHoverListener(),m.isOpen=!0,a.nextTick(function(){m.onIsOpenChanged(m.isOpen)}),c=c||(t?t.target:o[0]),c.setAttribute("aria-expanded","true"),i.$emit("$mdMenuOpen",o),e.show({scope:i,mdMenuCtrl:m,nestLevel:m.nestLevel,element:u,target:c,preserveElement:!0,parent:"body"})["finally"](function(){c.setAttribute("aria-expanded","false"),m.disableHoverListener()}))},i.$mdOpenMenu=this.open,this.onIsOpenChanged=function(e){e?(u.attr("aria-hidden","false"),o[0].classList.add("_md-open"),t.forEach(m.nestedMenus,function(e){e.classList.remove("_md-open")})):(u.attr("aria-hidden","true"),o[0].classList.remove("_md-open")),i.$mdMenuIsOpen=m.isOpen},this.focusMenuContainer=function(){var e=u[0].querySelector("[md-menu-focus-target]");e||(e=u[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return m.isOpen?e.destroy():d.when(!1)},this.close=function(n,r){if(m.isOpen){m.isOpen=!1,a.nextTick(function(){m.onIsOpenChanged(m.isOpen)});var l=t.extend({},r,{skipFocus:n});if(i.$emit("$mdMenuClose",o,l),e.hide(null,r),!n){var s=m.restoreFocusTo||o.find("button")[0];s instanceof t.element&&(s=s[0]),s&&s.focus()}}},this.positionMode=function(){var e=(r.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(r.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}function o(e){function r(n){n.addClass("md-menu");var r=n.children()[0];if(r.hasAttribute("ng-click")||(r=r.querySelector("[ng-click],[ng-mouseenter]")||r),!r||"MD-BUTTON"!=r.nodeName&&"BUTTON"!=r.nodeName||r.hasAttribute("type")||r.setAttribute("type","button"),2!=n.children().length)throw Error(i+"Expected two children elements.");r&&r.setAttribute("aria-haspopup","true");var a=n[0].querySelectorAll("md-menu"),l=parseInt(n[0].getAttribute("md-nest-level"),10)||0;return a&&t.forEach(e.nodesToArray(a),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",l+1)}),o}function o(e,r,o,i){var a=i[0],l=i[1]!=n,s=t.element('<div class="_md _md-open-menu-container md-whiteframe-z2"></div>'),d=r.children()[1];r.addClass("_md"),d.hasAttribute("role")||d.setAttribute("role","menu"),s.append(d),r.on("$destroy",function(){s.remove()}),r.append(s),s[0].style.display="none",a.init(s,{isInMenuBar:l})}var i="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:r}}function i(e){function r(e,r,a,l,s,d,u,c,m){function f(n,r,o){return o.nestLevel?t.noop:(o.disableParentScroll&&!e.getClosest(o.target,"MD-DIALOG")?o.restoreScroll=e.disableScrollAround(o.element,o.parent):o.disableParentScroll=!1,o.hasBackdrop&&(o.backdrop=e.createBackdrop(n,"_md-menu-backdrop _md-click-catcher"),m.enter(o.backdrop,l[0].body)),function(){o.backdrop&&o.backdrop.remove(),o.disableParentScroll&&o.restoreScroll()})}function p(e,t,n){function r(){return c(t,{addClass:"_md-leave"}).start()}function o(){t.removeClass("_md-active"),M(t,n),n.alreadyOpen=!1}return n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():r().then(o)}function h(n,o,i){function l(){return i.parent.append(o),o[0].style.display="",d(function(e){var t=y(o,i);o.removeClass("_md-leave"),c(o,{addClass:"_md-active",from:C.toCss(t),to:C.toCss({transform:""})}).start().then(e)})}function m(){if(!i.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");t.extend(i,{alreadyOpen:!1,isRemoved:!1,target:t.element(i.target),parent:t.element(i.parent),menuContentEl:t.element(o[0].querySelector("md-menu-content"))})}function p(){var e=function(e,t){return u.throttle(function(){if(!i.isRemoved){var n=y(e,t);e.css(C.toCss(n))}})}(o,i);return s.addEventListener("resize",e),s.addEventListener("orientationchange",e),function(){s.removeEventListener("resize",e),s.removeEventListener("orientationchange",e)}}function h(){function t(t){var n;switch(t.keyCode){case a.KEY_CODE.ESCAPE:i.mdMenuCtrl.close(!1,{closeAll:!0}),n=!0;break;case a.KEY_CODE.UP_ARROW:g(t,i.menuContentEl,i,-1)||i.nestLevel||i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.DOWN_ARROW:g(t,i.menuContentEl,i,1)||i.nestLevel||i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.LEFT_ARROW:i.nestLevel?i.mdMenuCtrl.close():i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.RIGHT_ARROW:var r=e.getClosest(t.target,"MD-MENU");r&&r!=i.parent[0]?t.target.click():i.mdMenuCtrl.triggerContainerProxy(t),n=!0}n&&(t.preventDefault(),t.stopImmediatePropagation())}function r(e){e.preventDefault(),e.stopPropagation(),n.$apply(function(){i.mdMenuCtrl.close(!0,{closeAll:!0})})}function l(t){function r(){n.$apply(function(){i.mdMenuCtrl.close(!0,{closeAll:!0})})}function o(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)for(var o,i=[n,"data-"+n,"x-"+n],a=0;o=i[a];++a)if(e.hasAttribute(o))return!0;return!1}var a=t.target;do{if(a==i.menuContentEl[0])return;if((o(a,["ng-click","ng-href","ui-sref"])||"BUTTON"==a.nodeName||"MD-BUTTON"==a.nodeName)&&!o(a,["md-prevent-menu-close"])){var l=e.getClosest(a,"MD-MENU");a.hasAttribute("disabled")||l&&l!=i.parent[0]||r();break}}while(a=a.parentNode)}o.addClass("_md-clickable"),i.backdrop&&i.backdrop.on("click",r),i.menuContentEl.on("keydown",t),i.menuContentEl[0].addEventListener("click",l,!0);var s=i.menuContentEl[0].querySelector("[md-menu-focus-target]");if(!s){var d=i.menuContentEl[0].firstElementChild;s=d&&(d.querySelector(".md-button:not([disabled])")||d.firstElementChild)}return s&&s.focus(),function(){o.removeClass("_md-clickable"),i.backdrop&&i.backdrop.off("click",r),i.menuContentEl.off("keydown",t),i.menuContentEl[0].removeEventListener("click",l,!0)}}return m(i),r.inherit(i.menuContentEl,i.target),i.cleanupResizing=p(),i.hideBackdrop=f(n,o,i),l().then(function(e){return i.alreadyOpen=!0,i.cleanupInteraction=h(),e})}function g(t,n,r,o){for(var i,a=e.getClosest(t.target,"MD-MENU-ITEM"),l=e.nodesToArray(n[0].children),s=l.indexOf(a),d=s+o;d>=0&&d<l.length;d+=o){var u=l[d].querySelector(".md-button");if(i=v(u))break}return i}function v(e){return e&&-1!=e.getAttribute("tabindex")?(e.focus(),l[0].activeElement==e):void 0}function M(e,t){t.preserveElement?o(e).style.display="none":o(e).parentNode===o(t.parent)&&o(t.parent).removeChild(o(e))}function y(t,r){function o(e){e.top=Math.max(Math.min(e.top,M.bottom-u.offsetHeight),M.top),e.left=Math.max(Math.min(e.left,M.right-u.offsetWidth),M.left)}function a(){for(var e=0;e<c.children.length;++e)if("none"!=s.getComputedStyle(c.children[e]).display)return c.children[e]}var d,u=t[0],c=t[0].firstElementChild,m=c.getBoundingClientRect(),f=l[0].body,p=f.getBoundingClientRect(),h=s.getComputedStyle(c),g=r.target[0].querySelector("[md-menu-origin]")||r.target[0],v=g.getBoundingClientRect(),M={left:p.left+i,top:Math.max(p.top,0)+i,bottom:Math.max(p.bottom,Math.max(p.top,0)+p.height)-i,right:p.right-i},y={top:0,left:0,right:0,bottom:0},C={top:0,left:0,right:0,bottom:0},b=r.mdMenuCtrl.positionMode();"target"!=b.top&&"target"!=b.left&&"target-right"!=b.left||(d=a(),d&&(d=d.firstElementChild||d,d=d.querySelector("[md-menu-align-target]")||d,y=d.getBoundingClientRect(),C={top:parseFloat(u.style.top||0),left:parseFloat(u.style.left||0)}));var E={},O="top ";switch(b.top){case"target":E.top=C.top+v.top-y.top;break;case"cascade":E.top=v.top-parseFloat(h.paddingTop)-g.style.top;break;case"bottom":E.top=v.top+v.height;break;default:throw new Error('Invalid target mode "'+b.top+'" specified for md-menu on Y axis.')}var k="rtl"==e.bidi();switch(b.left){case"target":E.left=C.left+v.left-y.left,O+=k?"right":"left";break;case"target-left":E.left=v.left,O+="left";break;case"target-right":E.left=v.right-m.width+(m.right-y.right),O+="right";break;case"cascade":var $=k?v.left-m.width<M.left:v.right+m.width<M.right;E.left=$?v.right-g.style.left:v.left-g.style.left-m.width,O+=$?"left":"right";break;case"left":k?(E.left=v.right-m.width,O+="right"):(E.left=v.left,O+="left");break;default:throw new Error('Invalid target mode "'+b.left+'" specified for md-menu on X axis.')}var A=r.mdMenuCtrl.offsets();E.top+=A.top,E.left+=A.left,o(E);var x=Math.round(100*Math.min(v.width/u.offsetWidth,1))/100,w=Math.round(100*Math.min(v.height/u.offsetHeight,1))/100;return{top:Math.round(E.top),left:Math.round(E.left),transform:r.alreadyOpen?n:e.supplant("scale({0},{1})",[x,w]),transformOrigin:O}}var C=e.dom.animator;return{parent:"body",onShow:h,onRemove:p,hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0}}function o(e){return e instanceof t.element&&(e=e[0]),e}var i=8;return r.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"],e("$mdMenu").setDefaults({methods:["target"],options:r})}t.module("material.components.menu",["material.core","material.components.backdrop"]),t.module("material.components.menu").controller("mdMenuCtrl",r),r.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q"],t.module("material.components.menu").directive("mdMenu",o),o.$inject=["$mdUtil"],t.module("material.components.menu").provider("$mdMenu",i),i.$inject=["$$interimElementProvider"]}(window,window.angular);
!function(e,t,n){"use strict";function r(e,r,o,i,a,l,s,d){var u,c,m=a.prefixer(),f=this;this.nestLevel=parseInt(r.mdNestLevel,10)||0,this.init=function(n,r){r=r||{},u=n,c=o[0].querySelector(m.buildSelector(["ng-click","ng-mouseenter"])),c.setAttribute("aria-expanded","false"),this.isInMenuBar=r.isInMenuBar,this.nestedMenus=a.nodesToArray(u[0].querySelectorAll(".md-nested-menu")),u.on("$mdInterimElementRemove",function(){f.isOpen=!1,a.nextTick(function(){f.onIsOpenChanged(f.isOpen)})}),a.nextTick(function(){f.onIsOpenChanged(f.isOpen)});var l="menu_container_"+a.nextUid();u.attr("id",l),t.element(c).attr({"aria-owns":l,"aria-haspopup":"true"}),i.$on("$destroy",t.bind(this,function(){this.disableHoverListener(),e.destroy()})),u.on("$destroy",function(){e.destroy()})};var p,h,g=[];this.enableHoverListener=function(){g.push(s.$on("$mdMenuOpen",function(e,t){u[0].contains(t[0])&&(f.currentlyOpenMenu=t.controller("mdMenu"),f.isAlreadyOpening=!1,f.currentlyOpenMenu.registerContainerProxy(f.triggerContainerProxy.bind(f)))})),g.push(s.$on("$mdMenuClose",function(e,t){u[0].contains(t[0])&&(f.currentlyOpenMenu=n)})),h=t.element(a.nodesToArray(u[0].children[0].children)),h.on("mouseenter",f.handleMenuItemHover),h.on("mouseleave",f.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;g.length;)g.shift()();h&&h.off("mouseenter",f.handleMenuItemHover),h&&h.off("mouseleave",f.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!f.isAlreadyOpening){var n=e.target.querySelector("md-menu")||a.getClosest(e.target,"MD-MENU");p=l(function(){if(n&&(n=t.element(n).controller("mdMenu")),f.currentlyOpenMenu&&f.currentlyOpenMenu!=n){var e=f.nestLevel+1;f.currentlyOpenMenu.close(!0,{closeTo:e}),f.isAlreadyOpening=!!n,n&&n.open()}else n&&!n.isOpen&&n.open&&(f.isAlreadyOpening=!!n,n&&n.open())},n?100:250);var r=e.currentTarget.querySelector(".md-button:not([disabled])");r&&r.focus()}},this.handleMenuItemMouseLeave=function(){p&&(l.cancel(p),p=n)},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),f.isOpen||(f.enableHoverListener(),f.isOpen=!0,a.nextTick(function(){f.onIsOpenChanged(f.isOpen)}),c=c||(t?t.target:o[0]),c.setAttribute("aria-expanded","true"),i.$emit("$mdMenuOpen",o),e.show({scope:i,mdMenuCtrl:f,nestLevel:f.nestLevel,element:u,target:c,preserveElement:!0,parent:"body"})["finally"](function(){c.setAttribute("aria-expanded","false"),f.disableHoverListener()}))},i.$mdOpenMenu=this.open,this.onIsOpenChanged=function(e){e?(u.attr("aria-hidden","false"),o[0].classList.add("md-open"),t.forEach(f.nestedMenus,function(e){e.classList.remove("md-open")})):(u.attr("aria-hidden","true"),o[0].classList.remove("md-open")),i.$mdMenuIsOpen=f.isOpen},this.focusMenuContainer=function(){var e=u[0].querySelector(m.buildSelector(["md-menu-focus-target","md-autofocus"]));e||(e=u[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return f.isOpen?e.destroy():d.when(!1)},this.close=function(n,r){if(f.isOpen){f.isOpen=!1,a.nextTick(function(){f.onIsOpenChanged(f.isOpen)});var l=t.extend({},r,{skipFocus:n});if(i.$emit("$mdMenuClose",o,l),e.hide(null,r),!n){var s=f.restoreFocusTo||o.find("button")[0];s instanceof t.element&&(s=s[0]),s&&s.focus()}}},this.positionMode=function(){var e=(r.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(r.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}function o(e){function r(n){n.addClass("md-menu");var r=n.children()[0],a=e.prefixer();if(a.hasAttribute(r,"ng-click")||(r=r.querySelector(a.buildSelector(["ng-click","ng-mouseenter"]))||r),!r||"MD-BUTTON"!=r.nodeName&&"BUTTON"!=r.nodeName||r.hasAttribute("type")||r.setAttribute("type","button"),2!=n.children().length)throw Error(i+"Expected two children elements.");r&&r.setAttribute("aria-haspopup","true");var l=n[0].querySelectorAll("md-menu"),s=parseInt(n[0].getAttribute("md-nest-level"),10)||0;return l&&t.forEach(e.nodesToArray(l),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",s+1)}),o}function o(e,r,o,i){var a=i[0],l=i[1]!=n,s=t.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'),d=r.children()[1];r.addClass("_md"),d.hasAttribute("role")||d.setAttribute("role","menu"),s.append(d),r.on("$destroy",function(){s.remove()}),r.append(s),s[0].style.display="none",a.init(s,{isInMenuBar:l})}var i="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:r}}function i(e){function r(e,r,a,l,s,d,u,c,m){function f(n,r,o){return o.nestLevel?t.noop:(o.disableParentScroll&&!e.getClosest(o.target,"MD-DIALOG")?o.restoreScroll=e.disableScrollAround(o.element,o.parent):o.disableParentScroll=!1,o.hasBackdrop&&(o.backdrop=e.createBackdrop(n,"md-menu-backdrop md-click-catcher"),m.enter(o.backdrop,l[0].body)),function(){o.backdrop&&o.backdrop.remove(),o.disableParentScroll&&o.restoreScroll()})}function p(e,t,n){function r(){return c(t,{addClass:"md-leave"}).start()}function o(){t.removeClass("md-active"),b(t,n),n.alreadyOpen=!1}return n.cleanupInteraction&&n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():r().then(o)}function h(n,o,i){function l(){return i.parent.append(o),o[0].style.display="",d(function(e){var t=y(o,i);o.removeClass("md-leave"),c(o,{addClass:"md-active",from:C.toCss(t),to:C.toCss({transform:""})}).start().then(e)})}function m(){if(!i.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");t.extend(i,{alreadyOpen:!1,isRemoved:!1,target:t.element(i.target),parent:t.element(i.parent),menuContentEl:t.element(o[0].querySelector("md-menu-content"))})}function p(){var e=function(e,t){return u.throttle(function(){if(!i.isRemoved){var n=y(e,t);e.css(C.toCss(n))}})}(o,i);return s.addEventListener("resize",e),s.addEventListener("orientationchange",e),function(){s.removeEventListener("resize",e),s.removeEventListener("orientationchange",e)}}function h(){function t(t){var n;switch(t.keyCode){case a.KEY_CODE.ESCAPE:i.mdMenuCtrl.close(!1,{closeAll:!0}),n=!0;break;case a.KEY_CODE.UP_ARROW:g(t,i.menuContentEl,i,-1)||i.nestLevel||i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.DOWN_ARROW:g(t,i.menuContentEl,i,1)||i.nestLevel||i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.LEFT_ARROW:i.nestLevel?i.mdMenuCtrl.close():i.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.RIGHT_ARROW:var r=e.getClosest(t.target,"MD-MENU");r&&r!=i.parent[0]?t.target.click():i.mdMenuCtrl.triggerContainerProxy(t),n=!0}n&&(t.preventDefault(),t.stopImmediatePropagation())}function r(e){e.preventDefault(),e.stopPropagation(),n.$apply(function(){i.mdMenuCtrl.close(!0,{closeAll:!0})})}function l(t){function r(){n.$apply(function(){i.mdMenuCtrl.close(!0,{closeAll:!0})})}function o(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)if(M.hasAttribute(e,n))return!0;return!1}var a=t.target;do{if(a==i.menuContentEl[0])return;if((o(a,["ng-click","ng-href","ui-sref"])||"BUTTON"==a.nodeName||"MD-BUTTON"==a.nodeName)&&!o(a,["md-prevent-menu-close"])){var l=e.getClosest(a,"MD-MENU");a.hasAttribute("disabled")||l&&l!=i.parent[0]||r();break}}while(a=a.parentNode)}o.addClass("md-clickable"),i.backdrop&&i.backdrop.on("click",r),i.menuContentEl.on("keydown",t),i.menuContentEl[0].addEventListener("click",l,!0);var s=i.menuContentEl[0].querySelector(M.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!s){var d=i.menuContentEl[0].firstElementChild;s=d&&(d.querySelector(".md-button:not([disabled])")||d.firstElementChild)}return s&&s.focus(),function(){o.removeClass("md-clickable"),i.backdrop&&i.backdrop.off("click",r),i.menuContentEl.off("keydown",t),i.menuContentEl[0].removeEventListener("click",l,!0)}}return m(i),r.inherit(i.menuContentEl,i.target),i.cleanupResizing=p(),i.hideBackdrop=f(n,o,i),l().then(function(e){return i.alreadyOpen=!0,i.cleanupInteraction=h(),e})}function g(t,n,r,o){for(var i,a=e.getClosest(t.target,"MD-MENU-ITEM"),l=e.nodesToArray(n[0].children),s=l.indexOf(a),d=s+o;d>=0&&d<l.length;d+=o){var u=l[d].querySelector(".md-button");if(i=v(u))break}return i}function v(e){if(e&&e.getAttribute("tabindex")!=-1)return e.focus(),l[0].activeElement==e}function b(e,t){t.preserveElement?o(e).style.display="none":o(e).parentNode===o(t.parent)&&o(t.parent).removeChild(o(e))}function y(t,r){function o(e){e.top=Math.max(Math.min(e.top,b.bottom-u.offsetHeight),b.top),e.left=Math.max(Math.min(e.left,b.right-u.offsetWidth),b.left)}function a(){for(var e=0;e<c.children.length;++e)if("none"!=s.getComputedStyle(c.children[e]).display)return c.children[e]}var d,u=t[0],c=t[0].firstElementChild,m=c.getBoundingClientRect(),f=l[0].body,p=f.getBoundingClientRect(),h=s.getComputedStyle(c),g=r.target[0].querySelector(M.buildSelector("md-menu-origin"))||r.target[0],v=g.getBoundingClientRect(),b={left:p.left+i,top:Math.max(p.top,0)+i,bottom:Math.max(p.bottom,Math.max(p.top,0)+p.height)-i,right:p.right-i},y={top:0,left:0,right:0,bottom:0},C={top:0,left:0,right:0,bottom:0},E=r.mdMenuCtrl.positionMode();"target"!=E.top&&"target"!=E.left&&"target-right"!=E.left||(d=a(),d&&(d=d.firstElementChild||d,d=d.querySelector(M.buildSelector("md-menu-align-target"))||d,y=d.getBoundingClientRect(),C={top:parseFloat(u.style.top||0),left:parseFloat(u.style.left||0)}));var O={},k="top ";switch(E.top){case"target":O.top=C.top+v.top-y.top;break;case"cascade":O.top=v.top-parseFloat(h.paddingTop)-g.style.top;break;case"bottom":O.top=v.top+v.height;break;default:throw new Error('Invalid target mode "'+E.top+'" specified for md-menu on Y axis.')}var $="rtl"==e.bidi();switch(E.left){case"target":O.left=C.left+v.left-y.left,k+=$?"right":"left";break;case"target-left":O.left=v.left,k+="left";break;case"target-right":O.left=v.right-m.width+(m.right-y.right),k+="right";break;case"cascade":var A=$?v.left-m.width<b.left:v.right+m.width<b.right;O.left=A?v.right-g.style.left:v.left-g.style.left-m.width,k+=A?"left":"right";break;case"right":$?(O.left=v.right-v.width,k+="left"):(O.left=v.right-m.width,k+="right");break;case"left":$?(O.left=v.right-m.width,k+="right"):(O.left=v.left,k+="left");break;default:throw new Error('Invalid target mode "'+E.left+'" specified for md-menu on X axis.')}var x=r.mdMenuCtrl.offsets();O.top+=x.top,O.left+=x.left,o(O);var w=Math.round(100*Math.min(v.width/u.offsetWidth,1))/100,S=Math.round(100*Math.min(v.height/u.offsetHeight,1))/100;return{top:Math.round(O.top),left:Math.round(O.left),transform:r.alreadyOpen?n:e.supplant("scale({0},{1})",[w,S]),transformOrigin:k}}var M=e.prefixer(),C=e.dom.animator;return{parent:"body",onShow:h,onRemove:p,hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0}}function o(e){return e instanceof t.element&&(e=e[0]),e}var i=8;return r.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"],e("$mdMenu").setDefaults({methods:["target"],options:r})}t.module("material.components.menu",["material.core","material.components.backdrop"]),t.module("material.components.menu").controller("mdMenuCtrl",r),r.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q"],t.module("material.components.menu").directive("mdMenu",o),o.$inject=["$mdUtil"],t.module("material.components.menu").provider("$mdMenu",i),i.$inject=["$$interimElementProvider"]}(window,window.angular);
{
"name": "angular-material-menuBar",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-menu": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-menu": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -60,4 +60,4 @@ (function( window, angular, undefined ){

if (self.getMenus().indexOf(el[0]) != -1) {
$element[0].classList.add('_md-open');
el[0].classList.add('_md-open');
$element[0].classList.add('md-open');
el[0].classList.add('md-open');
self.currentlyOpenMenu = el.controller('mdMenu');

@@ -72,4 +72,4 @@ self.currentlyOpenMenu.registerContainerProxy(self.handleKeyDown);

if (rootMenus.indexOf(el[0]) != -1) {
$element[0].classList.remove('_md-open');
el[0].classList.remove('_md-open');
$element[0].classList.remove('md-open');
el[0].classList.remove('md-open');
}

@@ -102,4 +102,4 @@

MenuBarController.prototype.setKeyboardMode = function(enabled) {
if (enabled) this.$element[0].classList.add('_md-keyboard-mode');
else this.$element[0].classList.remove('_md-keyboard-mode');
if (enabled) this.$element[0].classList.add('md-keyboard-mode');
else this.$element[0].classList.remove('md-keyboard-mode');
};

@@ -259,3 +259,3 @@

for (var i = 0; i < menus.length; ++i) {
if (menus[i].classList.contains('_md-open')) return i;
if (menus[i].classList.contains('md-open')) return i;
}

@@ -382,7 +382,10 @@ return -1;

menuEl.setAttribute('md-position-mode', 'left bottom');
menuEl.querySelector('button,a').setAttribute('role', 'menuitem');
// Since we're in the compile function and actual `md-buttons` are not compiled yet,
// we need to query for possible `md-buttons` as well.
menuEl.querySelector('button, a, md-button').setAttribute('role', 'menuitem');
}
var contentEls = $mdUtil.nodesToArray(menuEl.querySelectorAll('md-menu-content'));
angular.forEach(contentEls, function(contentEl) {
contentEl.classList.add('_md-menu-bar-menu');
contentEl.classList.add('md-menu-bar-menu');
contentEl.classList.add('md-dense');

@@ -396,2 +399,9 @@ if (!contentEl.hasAttribute('width')) {

// Mark the child menu items that they're inside a menu bar. This is necessary,
// because mnMenuItem has special behaviour during compilation, depending on
// whether it is inside a mdMenuBar. We can usually figure this out via the DOM,
// however if a directive that uses documentFragment is applied to the child (e.g. ngRepeat),
// the element won't have a parent and won't compile properly.
templateEl.find('md-menu-item').addClass('md-in-menu-bar');
return function postLink(scope, el, attr, ctrl) {

@@ -537,8 +547,14 @@ el.addClass('_md'); // private md component indicator for styling

/* ngInject */
function MenuItemDirective() {
function MenuItemDirective($mdUtil) {
return {
controller: 'MenuItemController',
require: ['mdMenuItem', '?ngModel'],
priority: 210, // ensure that our post link runs after ngAria
compile: function(templateEl, templateAttrs) {
if (templateAttrs.type == 'checkbox' || templateAttrs.type == 'radio') {
var type = templateAttrs.type;
var inMenuBarClass = 'md-in-menu-bar';
// Note: This allows us to show the `check` icon for the md-menu-bar items.
// The `md-in-menu-bar` class is set by the mdMenuBar directive.
if ((type == 'checkbox' || type == 'radio') && templateEl.hasClass(inMenuBarClass)) {
var text = templateEl[0].textContent;

@@ -552,9 +568,9 @@ var buttonEl = angular.element('<md-button type="button"></md-button>');

templateEl.append(buttonEl);
templateEl[0].classList.add('md-indent');
templateEl.addClass('md-indent').removeClass(inMenuBarClass);
setDefault('role', (templateAttrs.type == 'checkbox') ? 'menuitemcheckbox' : 'menuitemradio', buttonEl);
angular.forEach(['ng-disabled'], moveAttrToButton);
setDefault('role', type == 'checkbox' ? 'menuitemcheckbox' : 'menuitemradio', buttonEl);
moveAttrToButton('ng-disabled');
} else {
setDefault('role', 'menuitem', templateEl[0].querySelector('md-button,button,a'));
setDefault('role', 'menuitem', templateEl[0].querySelector('md-button, button, a'));
}

@@ -579,14 +595,18 @@

function moveAttrToButton(attr) {
if (templateEl[0].hasAttribute(attr)) {
var val = templateEl[0].getAttribute(attr);
buttonEl[0].setAttribute(attr, val);
templateEl[0].removeAttribute(attr);
}
function moveAttrToButton(attribute) {
var attributes = $mdUtil.prefixer(attribute);
angular.forEach(attributes, function(attr) {
if (templateEl[0].hasAttribute(attr)) {
var val = templateEl[0].getAttribute(attr);
buttonEl[0].setAttribute(attr, val);
templateEl[0].removeAttribute(attr);
}
});
}
},
controller: 'MenuItemController'
}
};
}
MenuItemDirective.$inject = ["$mdUtil"];
})(window, window.angular);

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function o(e,n,o,i,r,s,u,l){this.$element=o,this.$attrs=i,this.$mdConstant=r,this.$mdUtil=u,this.$document=s,this.$scope=e,this.$rootScope=n,this.$timeout=l;var d=this;t.forEach(a,function(e){d[e]=t.bind(d,d[e])})}function i(e,n){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(o,i){return i.ariaRole||o[0].setAttribute("role","menubar"),t.forEach(o[0].children,function(n){if("MD-MENU"==n.nodeName){n.hasAttribute("md-position-mode")||(n.setAttribute("md-position-mode","left bottom"),n.querySelector("button,a").setAttribute("role","menuitem"));var o=e.nodesToArray(n.querySelectorAll("md-menu-content"));t.forEach(o,function(e){e.classList.add("_md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),function(e,t,o,i){t.addClass("_md"),n(e,t),i.init()}}}}function r(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}function s(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}function u(){return{require:["mdMenuItem","?ngModel"],priority:210,compile:function(e,n){function o(n,o,i){i=i||e,i instanceof t.element&&(i=i[0]),i.hasAttribute(n)||i.setAttribute(n,o)}function i(t){if(e[0].hasAttribute(t)){var n=e[0].getAttribute(t);s[0].setAttribute(t,n),e[0].removeAttribute(t)}}if("checkbox"==n.type||"radio"==n.type){var r=e[0].textContent,s=t.element('<md-button type="button"></md-button>');s.html(r),s.attr("tabindex","0"),e.html(""),e.append(t.element('<md-icon md-svg-icon="check"></md-icon>')),e.append(s),e[0].classList.add("md-indent"),o("role","checkbox"==n.type?"menuitemcheckbox":"menuitemradio",s),t.forEach(["ng-disabled"],i)}else o("role","menuitem",e[0].querySelector("md-button,button,a"));return function(e,t,n,o){var i=o[0],r=o[1];i.init(r)}},controller:"MenuItemController"}}t.module("material.components.menuBar",["material.core","material.components.menu"]),t.module("material.components.menuBar").controller("MenuBarController",o);var a=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];o.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],o.prototype.init=function(){var e=this.$element,t=this.$mdUtil,o=this.$scope,i=this,r=[];e.on("keydown",this.handleKeyDown),this.parentToolbar=t.getClosest(e,"MD-TOOLBAR"),r.push(this.$rootScope.$on("$mdMenuOpen",function(t,n){-1!=i.getMenus().indexOf(n[0])&&(e[0].classList.add("_md-open"),n[0].classList.add("_md-open"),i.currentlyOpenMenu=n.controller("mdMenu"),i.currentlyOpenMenu.registerContainerProxy(i.handleKeyDown),i.enableOpenOnHover())})),r.push(this.$rootScope.$on("$mdMenuClose",function(o,r,s){var u=i.getMenus();if(-1!=u.indexOf(r[0])&&(e[0].classList.remove("_md-open"),r[0].classList.remove("_md-open")),e[0].contains(r[0])){for(var a=r[0];a&&-1==u.indexOf(a);)a=t.getClosest(a,"MD-MENU",!0);a&&(s.skipFocus||a.querySelector("button:not([disabled])").focus(),i.currentlyOpenMenu=n,i.disableOpenOnHover(),i.setKeyboardMode(!0))}})),o.$on("$destroy",function(){for(;r.length;)r.shift()()}),this.setKeyboardMode(!0)},o.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("_md-keyboard-mode"):this.$element[0].classList.remove("_md-keyboard-mode")},o.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){this.openOnHoverEnabled=!0;var e;(e=this.parentToolbar)&&(e.dataset.mdRestoreStyle=e.getAttribute("style"),e.style.position="relative",e.style.zIndex=100),t.element(this.getMenus()).on("mouseenter",this.handleMenuHover)}},o.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},o.prototype.disableOpenOnHover=function(){if(this.openOnHoverEnabled){this.openOnHoverEnabled=!1;var e;(e=this.parentToolbar)&&(e.style.cssText=e.dataset.mdRestoreStyle||""),t.element(this.getMenus()).off("mouseenter",this.handleMenuHover)}},o.prototype.scheduleOpenHoveredMenu=function(e){var n=t.element(e.currentTarget),o=n.controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(o)},o.prototype.scheduleOpenMenu=function(e){var t=this,o=this.$timeout;e!=t.currentlyOpenMenu&&(o.cancel(t.pendingMenuOpen),t.pendingMenuOpen=o(function(){t.pendingMenuOpen=n,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},o.prototype.handleKeyDown=function(e){var n=this.$mdConstant.KEY_CODE,o=this.currentlyOpenMenu,i=o&&o.isOpen;this.setKeyboardMode(!0);var r,s,u;switch(e.keyCode){case n.DOWN_ARROW:o?o.focusMenuContainer():this.openFocusedMenu(),r=!0;break;case n.UP_ARROW:o&&o.close(),r=!0;break;case n.LEFT_ARROW:s=this.focusMenu(-1),i&&(u=t.element(s).controller("mdMenu"),this.scheduleOpenMenu(u)),r=!0;break;case n.RIGHT_ARROW:s=this.focusMenu(1),i&&(u=t.element(s).controller("mdMenu"),this.scheduleOpenMenu(u)),r=!0}r&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},o.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();-1==n&&(n=this.getOpenMenuIndex());var o=!1;return-1==n?(n=0,o=!0):(0>e&&n>0||e>0&&n<t.length-e)&&(n+=e,o=!0),o?(t[n].querySelector("button").focus(),t[n]):void 0},o.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&t.element(e).controller("mdMenu").open()},o.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},o.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},o.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil,t=e.getClosest(this.$document[0].activeElement,"MD-MENU");if(!t)return-1;var n=this.getMenus().indexOf(t);return n},o.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("_md-open"))return t;return-1},t.module("material.components.menuBar").directive("mdMenuBar",i),i.$inject=["$mdUtil","$mdTheming"],t.module("material.components.menuBar").directive("mdMenuDivider",r),t.module("material.components.menuBar").controller("MenuItemController",s),s.$inject=["$scope","$element","$attrs"],s.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},s.prototype.clearNgAria=function(){var e=this.$element[0],n=["role","tabindex","aria-invalid","aria-checked"];t.forEach(n,function(t){e.removeAttribute(t)})},s.prototype.initClickListeners=function(){function e(){if("radio"==u){var e=s.ngValue?r.$eval(s.ngValue):s.value;return i.$modelValue==e}return i.$modelValue}function n(e){e?l.off("click",d):l.on("click",d)}var o=this,i=this.ngModel,r=this.$scope,s=this.$attrs,u=(this.$element,this.mode);this.handleClick=t.bind(this,this.handleClick);var a=this.iconEl,l=t.element(this.buttonEl),d=this.handleClick;s.$observe("disabled",n),n(s.disabled),i.$render=function(){o.clearNgAria(),e()?(a.style.display="",l.attr("aria-checked","true")):(a.style.display="none",l.attr("aria-checked","false"))},r.$$postDigest(i.$render)},s.prototype.handleClick=function(e){var t,n=this.mode,o=this.ngModel,i=this.$attrs;"checkbox"==n?t=!o.$modelValue:"radio"==n&&(t=i.ngValue?this.$scope.$eval(i.ngValue):i.value),o.$setViewValue(t),o.$render()},t.module("material.components.menuBar").directive("mdMenuItem",u)}(window,window.angular);
!function(e,t,n){"use strict";function o(e,n,o,i,r,s,u,l){this.$element=o,this.$attrs=i,this.$mdConstant=r,this.$mdUtil=u,this.$document=s,this.$scope=e,this.$rootScope=n,this.$timeout=l;var d=this;t.forEach(a,function(e){d[e]=t.bind(d,d[e])})}function i(e,n){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(o,i){return i.ariaRole||o[0].setAttribute("role","menubar"),t.forEach(o[0].children,function(n){if("MD-MENU"==n.nodeName){n.hasAttribute("md-position-mode")||(n.setAttribute("md-position-mode","left bottom"),n.querySelector("button, a, md-button").setAttribute("role","menuitem"));var o=e.nodesToArray(n.querySelectorAll("md-menu-content"));t.forEach(o,function(e){e.classList.add("md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),o.find("md-menu-item").addClass("md-in-menu-bar"),function(e,t,o,i){t.addClass("_md"),n(e,t),i.init()}}}}function r(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}function s(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}function u(e){return{controller:"MenuItemController",require:["mdMenuItem","?ngModel"],priority:210,compile:function(n,o){function i(e,o,i){i=i||n,i instanceof t.element&&(i=i[0]),i.hasAttribute(e)||i.setAttribute(e,o)}function r(o){var i=e.prefixer(o);t.forEach(i,function(e){if(n[0].hasAttribute(e)){var t=n[0].getAttribute(e);l[0].setAttribute(e,t),n[0].removeAttribute(e)}})}var s=o.type,u="md-in-menu-bar";if("checkbox"!=s&&"radio"!=s||!n.hasClass(u))i("role","menuitem",n[0].querySelector("md-button, button, a"));else{var a=n[0].textContent,l=t.element('<md-button type="button"></md-button>');l.html(a),l.attr("tabindex","0"),n.html(""),n.append(t.element('<md-icon md-svg-icon="check"></md-icon>')),n.append(l),n.addClass("md-indent").removeClass(u),i("role","checkbox"==s?"menuitemcheckbox":"menuitemradio",l),r("ng-disabled")}return function(e,t,n,o){var i=o[0],r=o[1];i.init(r)}}}}t.module("material.components.menuBar",["material.core","material.components.menu"]),t.module("material.components.menuBar").controller("MenuBarController",o);var a=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];o.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],o.prototype.init=function(){var e=this.$element,t=this.$mdUtil,o=this.$scope,i=this,r=[];e.on("keydown",this.handleKeyDown),this.parentToolbar=t.getClosest(e,"MD-TOOLBAR"),r.push(this.$rootScope.$on("$mdMenuOpen",function(t,n){i.getMenus().indexOf(n[0])!=-1&&(e[0].classList.add("md-open"),n[0].classList.add("md-open"),i.currentlyOpenMenu=n.controller("mdMenu"),i.currentlyOpenMenu.registerContainerProxy(i.handleKeyDown),i.enableOpenOnHover())})),r.push(this.$rootScope.$on("$mdMenuClose",function(o,r,s){var u=i.getMenus();if(u.indexOf(r[0])!=-1&&(e[0].classList.remove("md-open"),r[0].classList.remove("md-open")),e[0].contains(r[0])){for(var a=r[0];a&&u.indexOf(a)==-1;)a=t.getClosest(a,"MD-MENU",!0);a&&(s.skipFocus||a.querySelector("button:not([disabled])").focus(),i.currentlyOpenMenu=n,i.disableOpenOnHover(),i.setKeyboardMode(!0))}})),o.$on("$destroy",function(){for(;r.length;)r.shift()()}),this.setKeyboardMode(!0)},o.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("md-keyboard-mode"):this.$element[0].classList.remove("md-keyboard-mode")},o.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){this.openOnHoverEnabled=!0;var e;(e=this.parentToolbar)&&(e.dataset.mdRestoreStyle=e.getAttribute("style"),e.style.position="relative",e.style.zIndex=100),t.element(this.getMenus()).on("mouseenter",this.handleMenuHover)}},o.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},o.prototype.disableOpenOnHover=function(){if(this.openOnHoverEnabled){this.openOnHoverEnabled=!1;var e;(e=this.parentToolbar)&&(e.style.cssText=e.dataset.mdRestoreStyle||""),t.element(this.getMenus()).off("mouseenter",this.handleMenuHover)}},o.prototype.scheduleOpenHoveredMenu=function(e){var n=t.element(e.currentTarget),o=n.controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(o)},o.prototype.scheduleOpenMenu=function(e){var t=this,o=this.$timeout;e!=t.currentlyOpenMenu&&(o.cancel(t.pendingMenuOpen),t.pendingMenuOpen=o(function(){t.pendingMenuOpen=n,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},o.prototype.handleKeyDown=function(e){var n=this.$mdConstant.KEY_CODE,o=this.currentlyOpenMenu,i=o&&o.isOpen;this.setKeyboardMode(!0);var r,s,u;switch(e.keyCode){case n.DOWN_ARROW:o?o.focusMenuContainer():this.openFocusedMenu(),r=!0;break;case n.UP_ARROW:o&&o.close(),r=!0;break;case n.LEFT_ARROW:s=this.focusMenu(-1),i&&(u=t.element(s).controller("mdMenu"),this.scheduleOpenMenu(u)),r=!0;break;case n.RIGHT_ARROW:s=this.focusMenu(1),i&&(u=t.element(s).controller("mdMenu"),this.scheduleOpenMenu(u)),r=!0}r&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},o.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();n==-1&&(n=this.getOpenMenuIndex());var o=!1;if(n==-1?(n=0,o=!0):(e<0&&n>0||e>0&&n<t.length-e)&&(n+=e,o=!0),o)return t[n].querySelector("button").focus(),t[n]},o.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&t.element(e).controller("mdMenu").open()},o.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},o.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},o.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil,t=e.getClosest(this.$document[0].activeElement,"MD-MENU");if(!t)return-1;var n=this.getMenus().indexOf(t);return n},o.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("md-open"))return t;return-1},t.module("material.components.menuBar").directive("mdMenuBar",i),i.$inject=["$mdUtil","$mdTheming"],t.module("material.components.menuBar").directive("mdMenuDivider",r),t.module("material.components.menuBar").controller("MenuItemController",s),s.$inject=["$scope","$element","$attrs"],s.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},s.prototype.clearNgAria=function(){var e=this.$element[0],n=["role","tabindex","aria-invalid","aria-checked"];t.forEach(n,function(t){e.removeAttribute(t)})},s.prototype.initClickListeners=function(){function e(){if("radio"==u){var e=s.ngValue?r.$eval(s.ngValue):s.value;return i.$modelValue==e}return i.$modelValue}function n(e){e?l.off("click",d):l.on("click",d)}var o=this,i=this.ngModel,r=this.$scope,s=this.$attrs,u=(this.$element,this.mode);this.handleClick=t.bind(this,this.handleClick);var a=this.iconEl,l=t.element(this.buttonEl),d=this.handleClick;s.$observe("disabled",n),n(s.disabled),i.$render=function(){o.clearNgAria(),e()?(a.style.display="",l.attr("aria-checked","true")):(a.style.display="none",l.attr("aria-checked","false"))},r.$$postDigest(i.$render)},s.prototype.handleClick=function(e){var t,n=this.mode,o=this.ngModel,i=this.$attrs;"checkbox"==n?t=!o.$modelValue:"radio"==n&&(t=i.ngValue?this.$scope.$eval(i.ngValue):i.value),o.$setViewValue(t),o.$render()},t.module("material.components.menuBar").directive("mdMenuItem",u),u.$inject=["$mdUtil"]}(window,window.angular);
{
"name": "angular-material-navBar",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -119,3 +119,3 @@ (function( window, angular, undefined ){

'<nav role="navigation">' +
'<ul class="_md-nav-bar-list" layout="row" ng-transclude role="listbox"' +
'<ul class="_md-nav-bar-list" ng-transclude role="listbox"' +
'tabindex="0"' +

@@ -223,24 +223,22 @@ 'ng-focus="ctrl.onFocus()"' +

MdNavBarController.prototype._updateTabs = function(newValue, oldValue) {
var self = this;
var tabs = this._getTabs();
var oldIndex = -1;
var newIndex = -1;
var newTab = this._getTabByName(newValue);
var oldTab = this._getTabByName(oldValue);
var oldIndex;
if (oldValue) {
var oldTab = this._getTabByName(oldValue);
if (oldTab) {
oldTab.setSelected(false);
oldIndex = tabs.indexOf(oldTab);
}
if (oldTab) {
oldTab.setSelected(false);
oldIndex = tabs.indexOf(oldTab);
}
if (newValue) {
var tab = this._getTabByName(newValue);
if (tab) {
tab.setSelected(true);
var newIndex = tabs.indexOf(tab);
var self = this;
this._$timeout(function() {
self._updateInkBarStyles(tab, newIndex, oldIndex);
});
}
if (newTab) {
newTab.setSelected(true);
newIndex = tabs.indexOf(newTab);
}
this._$timeout(function() {
self._updateInkBarStyles(newTab, newIndex, oldIndex);
});
};

@@ -253,8 +251,13 @@

MdNavBarController.prototype._updateInkBarStyles = function(tab, newIndex, oldIndex) {
var tabEl = tab.getButtonEl();
var left = tabEl.offsetLeft;
this._inkbar.toggleClass('_md-left', newIndex < oldIndex)
.toggleClass('_md-right', newIndex > oldIndex);
this._inkbar.css({left: left + 'px', width: tabEl.offsetWidth + 'px'});
this._inkbar.css({display: newIndex < 0 ? 'none' : ''});
if(tab){
var tabEl = tab.getButtonEl();
var left = tabEl.offsetLeft;
this._inkbar.css({left: left + 'px', width: tabEl.offsetWidth + 'px'});
}
};

@@ -261,0 +264,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,n){"use strict";function a(t){return{restrict:"E",transclude:!0,controller:r,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" layout="row" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>',link:function(n,a,r,o){o.navBarAriaLabel||t.expectAsync(a,"aria-label",e.noop)}}}function r(t,e,n,a){this._$timeout=n,this._$scope=e,this._$mdConstant=a,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=t[0],this._inkbar;var r=this,o=this._$scope.$watch(function(){return r._navBarEl.querySelectorAll("._md-nav-button").length},function(t){t>0&&(r._initTabs(),o())})}function o(t){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:i,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>',scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",name:"@"},link:function(n,a,r,o){var i=o[0],s=o[1];t(function(){i.name||(i.name=e.element(a[0].querySelector("._md-nav-button-text")).text().trim());var t=e.element(a[0].querySelector("._md-nav-button"));t.on("click",function(){s.mdSelectedNavItem=i.name,n.$apply()})})}}}function i(t){this._$element=t,this.mdNavClick,this.mdNavHref,this.name,this._selected=!1,this._focused=!1;var e=!!t.attr("md-nav-click"),n=!!t.attr("md-nav-href"),a=!!t.attr("md-nav-sref");if((e?1:0)+(n?1:0)+(a?1:0)>1)throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive")}e.module("material.components.navBar",["material.core"]).controller("MdNavBarController",r).directive("mdNavBar",a).controller("MdNavItemController",i).directive("mdNavItem",o),a.$inject=["$mdAria"],r.$inject=["$element","$scope","$timeout","$mdConstant"],r.prototype._initTabs=function(){this._inkbar=e.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]);var t=this;this._$timeout(function(){t._updateTabs(t.mdSelectedNavItem,n)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,n){t._$timeout(function(){t._updateTabs(e,n)})})},r.prototype._updateTabs=function(t,e){var n,a=this._getTabs();if(e){var r=this._getTabByName(e);r&&(r.setSelected(!1),n=a.indexOf(r))}if(t){var o=this._getTabByName(t);if(o){o.setSelected(!0);var i=a.indexOf(o),s=this;this._$timeout(function(){s._updateInkBarStyles(o,i,n)})}}},r.prototype._updateInkBarStyles=function(t,e,n){var a=t.getButtonEl(),r=a.offsetLeft;this._inkbar.toggleClass("_md-left",n>e).toggleClass("_md-right",e>n),this._inkbar.css({left:r+"px",width:a.offsetWidth+"px"})},r.prototype._getTabs=function(){var t=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item"));return t.map(function(t){return e.element(t).controller("mdNavItem")})},r.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},r.prototype._getSelectedTab=function(){return this._findTab(function(t){return t.isSelected()})},r.prototype.getFocusedTab=function(){return this._findTab(function(t){return t.hasFocus()})},r.prototype._findTab=function(t){for(var e=this._getTabs(),n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},r.prototype.onFocus=function(){var t=this._getSelectedTab();t&&t.setFocused(!0)},r.prototype.onBlur=function(){var t=this.getFocusedTab();t&&t.setFocused(!1)},r.prototype._moveFocus=function(t,e){t.setFocused(!1),e.setFocused(!0)},r.prototype.onKeydown=function(t){var e=this._$mdConstant.KEY_CODE,n=this._getTabs(),a=this.getFocusedTab();if(a){var r=n.indexOf(a);switch(t.keyCode){case e.UP_ARROW:case e.LEFT_ARROW:r>0&&this._moveFocus(a,n[r-1]);break;case e.DOWN_ARROW:case e.RIGHT_ARROW:r<n.length-1&&this._moveFocus(a,n[r+1]);break;case e.SPACE:case e.ENTER:this._$timeout(function(){a.getButtonEl().click()})}}},o.$inject=["$$rAF"],i.$inject=["$element"],i.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},i.prototype.getName=function(){return this.name},i.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},i.prototype.setSelected=function(t){this._selected=t},i.prototype.isSelected=function(){return this._selected},i.prototype.setFocused=function(t){this._focused=t},i.prototype.hasFocus=function(){return this._focused}}(window,window.angular);
!function(t,e,n){"use strict";function a(t){return{restrict:"E",transclude:!0,controller:r,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>',link:function(n,a,r,o){o.navBarAriaLabel||t.expectAsync(a,"aria-label",e.noop)}}}function r(t,e,n,a){this._$timeout=n,this._$scope=e,this._$mdConstant=a,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=t[0],this._inkbar;var r=this,o=this._$scope.$watch(function(){return r._navBarEl.querySelectorAll("._md-nav-button").length},function(t){t>0&&(r._initTabs(),o())})}function o(t){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:s,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>',scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",name:"@"},link:function(n,a,r,o){var s=o[0],i=o[1];t(function(){s.name||(s.name=e.element(a[0].querySelector("._md-nav-button-text")).text().trim());var t=e.element(a[0].querySelector("._md-nav-button"));t.on("click",function(){i.mdSelectedNavItem=s.name,n.$apply()})})}}}function s(t){this._$element=t,this.mdNavClick,this.mdNavHref,this.name,this._selected=!1,this._focused=!1;var e=!!t.attr("md-nav-click"),n=!!t.attr("md-nav-href"),a=!!t.attr("md-nav-sref");if((e?1:0)+(n?1:0)+(a?1:0)>1)throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive")}e.module("material.components.navBar",["material.core"]).controller("MdNavBarController",r).directive("mdNavBar",a).controller("MdNavItemController",s).directive("mdNavItem",o),a.$inject=["$mdAria"],r.$inject=["$element","$scope","$timeout","$mdConstant"],r.prototype._initTabs=function(){this._inkbar=e.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]);var t=this;this._$timeout(function(){t._updateTabs(t.mdSelectedNavItem,n)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,n){t._$timeout(function(){t._updateTabs(e,n)})})},r.prototype._updateTabs=function(t,e){var n=this,a=this._getTabs(),r=-1,o=-1,s=this._getTabByName(t),i=this._getTabByName(e);i&&(i.setSelected(!1),r=a.indexOf(i)),s&&(s.setSelected(!0),o=a.indexOf(s)),this._$timeout(function(){n._updateInkBarStyles(s,o,r)})},r.prototype._updateInkBarStyles=function(t,e,n){if(this._inkbar.toggleClass("_md-left",e<n).toggleClass("_md-right",e>n),this._inkbar.css({display:e<0?"none":""}),t){var a=t.getButtonEl(),r=a.offsetLeft;this._inkbar.css({left:r+"px",width:a.offsetWidth+"px"})}},r.prototype._getTabs=function(){var t=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item"));return t.map(function(t){return e.element(t).controller("mdNavItem")})},r.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},r.prototype._getSelectedTab=function(){return this._findTab(function(t){return t.isSelected()})},r.prototype.getFocusedTab=function(){return this._findTab(function(t){return t.hasFocus()})},r.prototype._findTab=function(t){for(var e=this._getTabs(),n=0;n<e.length;n++)if(t(e[n]))return e[n];return null},r.prototype.onFocus=function(){var t=this._getSelectedTab();t&&t.setFocused(!0)},r.prototype.onBlur=function(){var t=this.getFocusedTab();t&&t.setFocused(!1)},r.prototype._moveFocus=function(t,e){t.setFocused(!1),e.setFocused(!0)},r.prototype.onKeydown=function(t){var e=this._$mdConstant.KEY_CODE,n=this._getTabs(),a=this.getFocusedTab();if(a){var r=n.indexOf(a);switch(t.keyCode){case e.UP_ARROW:case e.LEFT_ARROW:r>0&&this._moveFocus(a,n[r-1]);break;case e.DOWN_ARROW:case e.RIGHT_ARROW:r<n.length-1&&this._moveFocus(a,n[r+1]);break;case e.SPACE:case e.ENTER:this._$timeout(function(){a.getButtonEl().click()})}}},o.$inject=["$$rAF"],s.$inject=["$element"],s.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},s.prototype.getName=function(){return this.name},s.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},s.prototype.setSelected=function(t){this._selected=t},s.prototype.isSelected=function(){return this._selected},s.prototype.setFocused=function(t){this._focused=t},s.prototype.hasFocus=function(){return this._focused}}(window,window.angular);
{
"name": "angular-material-panel",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-backdrop": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-backdrop": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,n,o){"use strict";function e(t,o,e,i){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,transformTemplate:n.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:l},this._config={},this._$rootElement=t,this._$rootScope=o,this._$injector=e,this._$window=i,this.animation=a.animation,this.xPosition=s.xPosition,this.yPosition=s.yPosition}function i(t,n){this._$q=n.get("$q"),this._$mdCompiler=n.get("$mdCompiler"),this._$mdConstant=n.get("$mdConstant"),this._$mdUtil=n.get("$mdUtil"),this._$rootScope=n.get("$rootScope"),this._$animate=n.get("$animate"),this._$mdPanel=n.get("$mdPanel"),this._$log=n.get("$log"),this._$window=n.get("$window"),this._$$rAF=n.get("$$rAF"),this.id=t.id,this.isAttached=!1,this._config=t,this._panelContainer,this._panelEl,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null}function s(t){this._$window=t,this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function a(t){this._$mdUtil=t.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass=""}function r(t){var o=n.isString(t)?document.querySelector(t):t;return n.element(o)}n.module("material.components.panel",["material.core","material.components.backdrop"]).service("$mdPanel",e);var l=80,h="_md-panel-hidden",c=n.element('<div class="_md-panel-focus-trap" tabindex="0"></div>');e.$inject=["$rootElement","$rootScope","$injector","$window"],e.prototype.create=function(t){var o=t||{};this._config={scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},n.extend(this._config,this._defaultConfigOptions,o);var e="panel_"+this._$injector.get("$mdUtil").nextUid(),s=n.extend({id:e},this._config);return new i(s,this._$injector)},e.prototype.open=function(t){var n=this.create(t);return n.open().then(function(){return n})},e.prototype.newPanelPosition=function(){return new s(this._$window)},e.prototype.newPanelAnimation=function(){return new a(this._$injector)},e.prototype._wrapTemplate=function(t){var n=t||"";return'<div class="md-panel-outer-wrapper"> <div class="md-panel" style="left: -9999px;">'+n+"</div></div>"},i.prototype.open=function(){var t=this;return this._$q(function(n,o){var e=t._done(n,t),i=t._simpleBind(t.show,t);t.attach().then(i).then(e)["catch"](o)})},i.prototype.close=function(){var t=this;return this._$q(function(n,o){var e=t._done(n,t),i=t._simpleBind(t.detach,t);t.hide().then(i).then(e)["catch"](o)})},i.prototype.attach=function(){if(this.isAttached&&this._panelEl)return this._$q.when(this);var t=this;return this._$q(function(o,e){var i=t._done(o,t),s=t._config.onDomAdded||n.noop,a=function(n){return t.isAttached=!0,t._addEventListeners(),n};t._$q.all([t._createBackdrop(),t._createPanel().then(a)["catch"](e)]).then(s).then(i)["catch"](e)})},i.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var t=this,o=t._config.onDomRemoved||n.noop,e=function(){return t._removeEventListeners(),t._topFocusTrap&&t._topFocusTrap.parentNode&&t._topFocusTrap.parentNode.removeChild(t._topFocusTrap),t._bottomFocusTrap&&t._bottomFocusTrap.parentNode&&t._bottomFocusTrap.parentNode.removeChild(t._bottomFocusTrap),t._panelContainer.remove(),t.isAttached=!1,t._$q.when(t)};return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(n,i){var s=t._done(n,t);t._$q.all([e(),t._backdropRef?t._backdropRef.detach():!0]).then(o).then(s)["catch"](i)})},i.prototype.destroy=function(){this._config.locals=null},i.prototype.show=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(!this._panelContainer.hasClass(h))return this._$q.when(this);var t=this,o=function(){return t.removeClass(h),t._animateOpen()};return this._$q(function(e,i){var s=t._done(e,t),a=t._config.onOpenComplete||n.noop;t._$q.all([t._backdropRef?t._backdropRef.show():t,o().then(function(){t._focusOnOpen()},i)]).then(a).then(s)["catch"](i)})},i.prototype.hide=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(this._panelContainer.hasClass(h))return this._$q.when(this);var t=this;return this._$q(function(o,e){var i=t._done(o,t),s=t._config.onRemoving||n.noop,a=function(){var n=t._config.origin;n&&r(n).focus()},l=function(){t.addClass(h)};t._$q.all([t._backdropRef?t._backdropRef.hide():t,t._animateClose().then(s).then(l).then(a)["catch"](e)]).then(i,e)})},i.prototype.addClass=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this._panelContainer.hasClass(t)||this._panelContainer.addClass(t)},i.prototype.removeClass=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this._panelContainer.hasClass(t)&&this._panelContainer.removeClass(t)},i.prototype.toggleClass=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this._panelContainer.toggleClass(t)},i.prototype._createPanel=function(){var t=this;return this._$q(function(o,e){t._config.locals||(t._config.locals={}),t._config.locals.mdPanelRef=t,t._$mdCompiler.compile(t._config).then(function(i){t._panelContainer=i.link(t._config.scope),r(t._config.attachTo).append(t._panelContainer),t._config.disableParentScroll&&(t._restoreScroll=t._$mdUtil.disableScrollAround(null,t._panelContainer)),t._panelEl=n.element(t._panelContainer[0].querySelector(".md-panel")),t._config.panelClass&&t._panelEl.addClass(t._config.panelClass),t._$animate.pin&&t._$animate.pin(t._panelContainer,r(t._config.attachTo)),t._configureTrapFocus(),t._addStyles().then(function(){o(t)},e)},e)})},i.prototype._addStyles=function(){var t=this;return this._$q(function(n){t._panelContainer.css("z-index",t._config.zIndex),t._panelEl.css("z-index",t._config.zIndex+1);var o=function(){t._panelEl.css("left",""),t._panelContainer.addClass(h),n(t)};if(t._config.fullscreen)return t._panelEl.addClass("_md-panel-fullscreen"),void o();var e=t._config.position;return e?void t._$rootScope.$$postDigest(function(){t._updatePosition(!0),n(t)}):void o()})},i.prototype._updatePosition=function(t){var n=this._config.position;if(n){n._setPanelPosition(this._panelEl),t&&this._panelContainer.addClass(h),this._panelEl.css("top",n.getTop()),this._panelEl.css("bottom",n.getBottom()),this._panelEl.css("left",n.getLeft()),this._panelEl.css("right",n.getRight());var o=this._$mdConstant.CSS.TRANSFORM;this._panelEl.css(o,n.getTransform())}},i.prototype._focusOnOpen=function(){if(this._config.focusOnOpen){var t=this;this._$rootScope.$$postDigest(function(){var n=t._$mdUtil.findFocusTarget(t._panelEl)||t._panelEl;n.focus()})}},i.prototype._createBackdrop=function(){if(this._config.hasBackdrop){if(!this._backdropRef){var t=this._$mdPanel.newPanelAnimation().openFrom(this._config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"}),n={animation:t,attachTo:this._config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this._config.zIndex-1};this._backdropRef=this._$mdPanel.create(n)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},i.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},i.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(t){t()}),this._removeListeners=null},i.prototype._configureEscapeToClose=function(){if(this._config.escapeToClose){var t=r(this._config.attachTo),n=this,o=function(t){t.keyCode===n._$mdConstant.KEY_CODE.ESCAPE&&(t.stopPropagation(),t.preventDefault(),n.close())};this._panelContainer.on("keydown",o),t.on("keydown",o),this._removeListeners.push(function(){n._panelContainer.off("keydown",o),t.off("keydown",o)})}},i.prototype._configureClickOutsideToClose=function(){if(this._config.clickOutsideToClose){var t,n=this._panelContainer,o=function(n){t=n.target},e=this,i=function(o){t===n[0]&&o.target===n[0]&&(o.stopPropagation(),o.preventDefault(),e.close())};n.on("mousedown",o),n.on("mouseup",i),this._removeListeners.push(function(){n.off("mousedown",o),n.off("mouseup",i)})}},i.prototype._configureScrollListener=function(){var t=n.bind(this,this._updatePosition),o=this._$$rAF.throttle(t),e=this,i=function(){e._config.disableParentScroll||o()};this._$window.addEventListener("scroll",i,!0),this._removeListeners.push(function(){e._$window.removeEventListener("scroll",i,!0)})},i.prototype._configureTrapFocus=function(){if(this._panelEl.attr("tabIndex","-1"),this._config.trapFocus){var t=this._panelEl;this._topFocusTrap=c.clone()[0],this._bottomFocusTrap=c.clone()[0];var n=function(){t.focus()};this._topFocusTrap.addEventListener("focus",n),this._bottomFocusTrap.addEventListener("focus",n),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",n),this._bottomFocusTrap.removeEventListener("focus",n)},this)),t[0].parentNode.insertBefore(this._topFocusTrap,t[0]),t.after(this._bottomFocusTrap)}},i.prototype._animateOpen=function(){this.addClass("md-panel-is-showing");var t=this._config.animation;if(!t)return this.addClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(o){var e=n._done(o,n),i=function(){n._$log.warn("MdPanel Animations failed. Showing panel without animating."),e()};t.animateOpen(n._panelEl).then(e,i)})},i.prototype._animateClose=function(){var t=this._config.animation;if(!t)return this.removeClass("md-panel-is-showing"),this.removeClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(o){var e=function(){n.removeClass("md-panel-is-showing"),o(n)},i=function(){n._$log.warn("MdPanel Animations failed. Hiding panel without animating."),e()};t.animateClose(n._panelEl).then(e,i)})},i.prototype._simpleBind=function(t,n){return function(o){return t.apply(n,o)}},i.prototype._done=function(t,n){return function(){t(n)}},s.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},s.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},s.prototype.absolute=function(){return this._absolute=!0,this},s.prototype.top=function(t){return this._bottom="",this._top=t||"0",this},s.prototype.bottom=function(t){return this._top="",this._bottom=t||"0",this},s.prototype.left=function(t){return this._right="",this._left=t||"0",this},s.prototype.right=function(t){return this._left="",this._right=t||"0",this},s.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},s.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},s.prototype.center=function(){return this.centerHorizontally().centerVertically()},s.prototype.relativeTo=function(t){return this._absolute=!1,this._relativeToEl=r(t),this},s.prototype.addPanelPosition=function(t,n){if(!this._relativeToEl)throw new Error("addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(t),this._validateYPosition(n),this._positions.push({x:t,y:n}),this},s.prototype._validateYPosition=function(t){if(null!=t){for(var n,o=Object.keys(s.yPosition),e=[],i=0;n=o[i];i++){var a=s.yPosition[n];if(e.push(a),a===t)return}throw new Error("Panel y position only accepts the following values:\n"+e.join(" | "))}},s.prototype._validateXPosition=function(t){if(null!=t){for(var n,o=Object.keys(s.xPosition),e=[],i=0;n=o[i];i++){var a=s.xPosition[n];if(e.push(a),a===t)return}throw new Error("Panel x Position only accepts the following values:\n"+e.join(" | "))}},s.prototype.withOffsetX=function(t){return this._translateX.push(t),this},s.prototype.withOffsetY=function(t){return this._translateY.push(t),this},s.prototype.getTop=function(){return this._top},s.prototype.getBottom=function(){return this._bottom},s.prototype.getLeft=function(){return this._left},s.prototype.getRight=function(){return this._right},s.prototype.getTransform=function(){var t=this._reduceTranslateValues("translateX",this._translateX),n=this._reduceTranslateValues("translateY",this._translateY);return(t+" "+n).trim()},s.prototype._isOnscreen=function(t){var n=parseInt(this.getLeft()),o=parseInt(this.getTop()),e=n+t[0].offsetWidth,i=o+t[0].offsetHeight;return n>=0&&o>=0&&i<=this._$window.innerHeight&&e<=this._$window.innerWidth},s.prototype.getActualPosition=function(){return this._actualPosition},s.prototype._reduceTranslateValues=function(t,n){return n.map(function(n){return t+"("+n+")"}).join(" ")},s.prototype._setPanelPosition=function(t){if(!this._absolute){if(this._actualPosition)return void this._calculatePanelPosition(t,this._actualPosition);for(var n=0;n<this._positions.length&&(this._actualPosition=this._positions[n],this._calculatePanelPosition(t,this._actualPosition),!this._isOnscreen(t));n++);}},s.prototype._calculatePanelPosition=function(t,n){var o=t[0].getBoundingClientRect(),e=o.width,i=o.height,a=this._relativeToEl[0].getBoundingClientRect(),r=a.left,l=a.right,h=a.width;switch(n.x){case s.xPosition.OFFSET_START:this._left=r-e+"px";break;case s.xPosition.ALIGN_END:this._left=l-e+"px";break;case s.xPosition.CENTER:var c=r+.5*h-.5*e;this._left=c+"px";break;case s.xPosition.ALIGN_START:this._left=r+"px";break;case s.xPosition.OFFSET_END:this._left=l+"px"}var p=a.top,_=a.bottom,u=a.height;switch(n.y){case s.yPosition.ABOVE:this._top=p-i+"px";break;case s.yPosition.ALIGN_BOTTOMS:this._top=_-i+"px";break;case s.yPosition.CENTER:var f=p+.5*u-.5*i;this._top=f+"px";break;case s.yPosition.ALIGN_TOPS:this._top=p+"px";break;case s.yPosition.BELOW:this._top=_+"px"}},a.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},a.prototype.openFrom=function(t){return t=t.target?t.target:t,this._openFrom=this._getPanelAnimationTarget(t),this._closeTo||(this._closeTo=this._openFrom),this},a.prototype.closeTo=function(t){return this._closeTo=this._getPanelAnimationTarget(t),this},a.prototype._getPanelAnimationTarget=function(t){return n.isDefined(t.top)||n.isDefined(t.left)?{element:o,bounds:{top:t.top||0,left:t.left||0}}:this._getBoundingClientRect(r(t))},a.prototype.withAnimation=function(t){return this._animationClass=t,this},a.prototype.animateOpen=function(t){var o=this._$mdUtil.dom.animator;this._fixBounds(t);var e={},i=t[0].style.transform||"",s=o.toTransformCss(i),r=o.toTransformCss(i);switch(this._animationClass){case a.animation.SLIDE:t.css("opacity","1"),e={transitionInClass:"_md-panel-animate-enter"};var l=o.calculateSlideToOrigin(t,this._openFrom)||"";s=o.toTransformCss(l+" "+i);break;case a.animation.SCALE:e={transitionInClass:"_md-panel-animate-enter"};var h=o.calculateZoomToOrigin(t,this._openFrom)||"";s=o.toTransformCss(h+" "+i);break;case a.animation.FADE:e={transitionInClass:"_md-panel-animate-enter"};break;default:e=n.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return o.translate3d(t,s,r,e)},a.prototype.animateClose=function(t){var o=this._$mdUtil.dom.animator,e={},i=t[0].style.transform||"",s=o.toTransformCss(i),r=o.toTransformCss(i);switch(this._animationClass){case a.animation.SLIDE:t.css("opacity","1"),e={transitionInClass:"_md-panel-animate-leave"};var l=o.calculateSlideToOrigin(t,this._closeTo)||"";r=o.toTransformCss(l+" "+i);break;case a.animation.SCALE:e={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var h=o.calculateZoomToOrigin(t,this._closeTo)||"";r=o.toTransformCss(h+" "+i);break;case a.animation.FADE:e={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:e=n.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return o.translate3d(t,s,r,e)},a.prototype._fixBounds=function(t){var n=t[0].offsetWidth,o=t[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=o),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=n),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=o),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=n)},a.prototype._getBoundingClientRect=function(t){return t instanceof n.element?{element:t,bounds:t[0].getBoundingClientRect()}:void 0}}(window,window.angular);
!function(t,n,o){"use strict";function i(t,o,i,e){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:n.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:l},this._config={},this._$rootElement=t,this._$rootScope=o,this._$injector=i,this._$window=e,this.animation=a.animation,this.xPosition=s.xPosition,this.yPosition=s.yPosition}function e(t,n){this._$q=n.get("$q"),this._$mdCompiler=n.get("$mdCompiler"),this._$mdConstant=n.get("$mdConstant"),this._$mdUtil=n.get("$mdUtil"),this._$rootScope=n.get("$rootScope"),this._$animate=n.get("$animate"),this._$mdPanel=n.get("$mdPanel"),this._$log=n.get("$log"),this._$window=n.get("$window"),this._$$rAF=n.get("$$rAF"),this.id=t.id,this.config=t,this.isAttached=!1,this._panelContainer,this._panelEl,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null}function s(t){this._$window=t.get("$window"),this._isRTL="rtl"===t.get("$mdUtil").bidi(),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function a(t){this._$mdUtil=t.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass=""}function r(t){var o=n.isString(t)?document.querySelector(t):t;return n.element(o)}n.module("material.components.panel",["material.core","material.components.backdrop"]).service("$mdPanel",i);var l=80,h="_md-panel-hidden",c=n.element('<div class="_md-panel-focus-trap" tabindex="0"></div>');i.$inject=["$rootElement","$rootScope","$injector","$window"],i.prototype.create=function(t){var o=t||{};this._config={scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},n.extend(this._config,this._defaultConfigOptions,o);var i="panel_"+this._$injector.get("$mdUtil").nextUid(),s=n.extend({id:i},this._config);return new e(s,this._$injector)},i.prototype.open=function(t){var n=this.create(t);return n.open().then(function(){return n})},i.prototype.newPanelPosition=function(){return new s(this._$injector)},i.prototype.newPanelAnimation=function(){return new a(this._$injector)},i.prototype._wrapTemplate=function(t){var n=t||"";return'<div class="md-panel-outer-wrapper"> <div class="md-panel" style="left: -9999px;">'+n+"</div></div>"},e.prototype.open=function(){var t=this;return this._$q(function(n,o){var i=t._done(n,t),e=t._simpleBind(t.show,t);t.attach().then(e).then(i)["catch"](o)})},e.prototype.close=function(){var t=this;return this._$q(function(n,o){var i=t._done(n,t),e=t._simpleBind(t.detach,t);t.hide().then(e).then(i)["catch"](o)})},e.prototype.attach=function(){if(this.isAttached&&this._panelEl)return this._$q.when(this);var t=this;return this._$q(function(o,i){var e=t._done(o,t),s=t.config.onDomAdded||n.noop,a=function(n){return t.isAttached=!0,t._addEventListeners(),n};t._$q.all([t._createBackdrop(),t._createPanel().then(a)["catch"](i)]).then(s).then(e)["catch"](i)})},e.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var t=this,o=t.config.onDomRemoved||n.noop,i=function(){return t._removeEventListeners(),t._topFocusTrap&&t._topFocusTrap.parentNode&&t._topFocusTrap.parentNode.removeChild(t._topFocusTrap),t._bottomFocusTrap&&t._bottomFocusTrap.parentNode&&t._bottomFocusTrap.parentNode.removeChild(t._bottomFocusTrap),t._panelContainer.remove(),t.isAttached=!1,t._$q.when(t)};return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(n,e){var s=t._done(n,t);t._$q.all([i(),!t._backdropRef||t._backdropRef.detach()]).then(o).then(s)["catch"](e)})},e.prototype.destroy=function(){this.config.scope.$destroy(),this.config.locals=null},e.prototype.show=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(!this._panelContainer.hasClass(h))return this._$q.when(this);var t=this,o=function(){return t.removeClass(h),t._animateOpen()};return this._$q(function(i,e){var s=t._done(i,t),a=t.config.onOpenComplete||n.noop;t._$q.all([t._backdropRef?t._backdropRef.show():t,o().then(function(){t._focusOnOpen()},e)]).then(a).then(s)["catch"](e)})},e.prototype.hide=function(){if(!this._panelContainer)return this._$q(function(t,n){n("Panel does not exist yet. Call open() or attach().")});if(this._panelContainer.hasClass(h))return this._$q.when(this);var t=this;return this._$q(function(o,i){var e=t._done(o,t),s=t.config.onRemoving||n.noop,a=function(){var n=t.config.origin;n&&r(n).focus()},l=function(){t.addClass(h)};t._$q.all([t._backdropRef?t._backdropRef.hide():t,t._animateClose().then(s).then(l).then(a)["catch"](i)]).then(e,i)})},e.prototype.addClass=function(t,n){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");n||this._panelContainer.hasClass(t)?n&&!this._panelEl.hasClass(t)&&this._panelEl.addClass(t):this._panelContainer.addClass(t)},e.prototype.removeClass=function(t,n){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");!n&&this._panelContainer.hasClass(t)?this._panelContainer.removeClass(t):n&&this._panelEl.hasClass(t)&&this._panelEl.removeClass(t)},e.prototype.toggleClass=function(t,n){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");n?this._panelEl.toggleClass(t):this._panelContainer.toggleClass(t)},e.prototype._createPanel=function(){var t=this;return this._$q(function(o,i){t.config.locals||(t.config.locals={}),t.config.locals.mdPanelRef=t,t._$mdCompiler.compile(t.config).then(function(e){t._panelContainer=e.link(t.config.scope),r(t.config.attachTo).append(t._panelContainer),t.config.disableParentScroll&&(t._restoreScroll=t._$mdUtil.disableScrollAround(null,t._panelContainer,{disableScrollMask:!0})),t._panelEl=n.element(t._panelContainer[0].querySelector(".md-panel")),t.config.panelClass&&t._panelEl.addClass(t.config.panelClass),t.config.propagateContainerEvents&&t._panelContainer.css("pointer-events","none"),t._$animate.pin&&t._$animate.pin(t._panelContainer,r(t.config.attachTo)),t._configureTrapFocus(),t._addStyles().then(function(){o(t)},i)},i)})},e.prototype._addStyles=function(){var t=this;return this._$q(function(n){t._panelContainer.css("z-index",t.config.zIndex),t._panelEl.css("z-index",t.config.zIndex+1);var o=function(){t._panelEl.css("left",""),t._panelContainer.addClass(h),n(t)};if(t.config.fullscreen)return t._panelEl.addClass("_md-panel-fullscreen"),void o();var i=t.config.position;return i?void t._$rootScope.$$postDigest(function(){t._updatePosition(!0),n(t)}):void o()})},e.prototype.updatePosition=function(t){if(!this._panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this.config.position=t,this._updatePosition()},e.prototype._updatePosition=function(t){var n=this.config.position;if(n){n._setPanelPosition(this._panelEl),t&&this._panelContainer.addClass(h),this._panelEl.css(s.absPosition.TOP,n.getTop()),this._panelEl.css(s.absPosition.BOTTOM,n.getBottom()),this._panelEl.css(s.absPosition.LEFT,n.getLeft()),this._panelEl.css(s.absPosition.RIGHT,n.getRight());var o=this._$mdConstant.CSS.TRANSFORM;this._panelEl.css(o,n.getTransform())}},e.prototype._focusOnOpen=function(){if(this.config.focusOnOpen){var t=this;this._$rootScope.$$postDigest(function(){var n=t._$mdUtil.findFocusTarget(t._panelEl)||t._panelEl;n.focus()})}},e.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var t=this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"}),n={animation:t,attachTo:this.config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(n)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},e.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},e.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(t){t()}),this._removeListeners=[]},e.prototype._configureEscapeToClose=function(){if(this.config.escapeToClose){var t=r(this.config.attachTo),n=this,o=function(t){t.keyCode===n._$mdConstant.KEY_CODE.ESCAPE&&(t.stopPropagation(),t.preventDefault(),n.close())};this._panelContainer.on("keydown",o),t.on("keydown",o),this._removeListeners.push(function(){n._panelContainer.off("keydown",o),t.off("keydown",o)})}},e.prototype._configureClickOutsideToClose=function(){if(this.config.clickOutsideToClose){var t,n=this._panelContainer,o=function(n){t=n.target},i=this,e=function(o){t===n[0]&&o.target===n[0]&&(o.stopPropagation(),o.preventDefault(),i.close())};n.on("mousedown",o),n.on("mouseup",e),this._removeListeners.push(function(){n.off("mousedown",o),n.off("mouseup",e)})}},e.prototype._configureScrollListener=function(){var t=n.bind(this,this._updatePosition),o=this._$$rAF.throttle(t),i=this,e=function(){i.config.disableParentScroll||o()};this._$window.addEventListener("scroll",e,!0),this._removeListeners.push(function(){i._$window.removeEventListener("scroll",e,!0)})},e.prototype._configureTrapFocus=function(){if(this._panelEl.attr("tabIndex","-1"),this.config.trapFocus){var t=this._panelEl;this._topFocusTrap=c.clone()[0],this._bottomFocusTrap=c.clone()[0];var n=function(){t.focus()};this._topFocusTrap.addEventListener("focus",n),this._bottomFocusTrap.addEventListener("focus",n),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",n),this._bottomFocusTrap.removeEventListener("focus",n)},this)),t[0].parentNode.insertBefore(this._topFocusTrap,t[0]),t.after(this._bottomFocusTrap)}},e.prototype._animateOpen=function(){this.addClass("md-panel-is-showing");var t=this.config.animation;if(!t)return this.addClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(o){var i=n._done(o,n),e=function(){n._$log.warn("MdPanel Animations failed. Showing panel without animating."),i()};t.animateOpen(n._panelEl).then(i,e)})},e.prototype._animateClose=function(){var t=this.config.animation;if(!t)return this.removeClass("md-panel-is-showing"),this.removeClass("_md-panel-shown"),this._$q.when(this);var n=this;return this._$q(function(o){var i=function(){n.removeClass("md-panel-is-showing"),o(n)},e=function(){n._$log.warn("MdPanel Animations failed. Hiding panel without animating."),i()};t.animateClose(n._panelEl).then(i,e)})},e.prototype._simpleBind=function(t,n){return function(o){return t.apply(n,o)}},e.prototype._done=function(t,n){return function(){t(n)}},s.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},s.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},s.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},s.prototype.absolute=function(){return this._absolute=!0,this},s.prototype._setPosition=function(t,o){if(t===s.absPosition.RIGHT||t===s.absPosition.LEFT)this._left=this._right="";else{if(t!==s.absPosition.BOTTOM&&t!==s.absPosition.TOP){var i=Object.keys(s.absPosition).join().toLowerCase();throw new Error("Position must be one of "+i+".")}this._top=this._bottom=""}return this["_"+t]=n.isString(o)?o:"0",this},s.prototype.top=function(t){return this._setPosition(s.absPosition.TOP,t)},s.prototype.bottom=function(t){return this._setPosition(s.absPosition.BOTTOM,t)},s.prototype.start=function(t){var n=this._isRTL?s.absPosition.RIGHT:s.absPosition.LEFT;return this._setPosition(n,t)},s.prototype.end=function(t){var n=this._isRTL?s.absPosition.LEFT:s.absPosition.RIGHT;return this._setPosition(n,t)},s.prototype.left=function(t){return this._setPosition(s.absPosition.LEFT,t)},s.prototype.right=function(t){return this._setPosition(s.absPosition.RIGHT,t)},s.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},s.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},s.prototype.center=function(){return this.centerHorizontally().centerVertically()},s.prototype.relativeTo=function(t){return this._absolute=!1,this._relativeToEl=r(t),this},s.prototype.addPanelPosition=function(t,n){if(!this._relativeToEl)throw new Error("addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(t),this._validateYPosition(n),this._positions.push({x:t,y:n}),this},s.prototype._validateYPosition=function(t){if(null!=t){for(var n,o=Object.keys(s.yPosition),i=[],e=0;n=o[e];e++){var a=s.yPosition[n];if(i.push(a),a===t)return}throw new Error("Panel y position only accepts the following values:\n"+i.join(" | "))}},s.prototype._validateXPosition=function(t){if(null!=t){for(var n,o=Object.keys(s.xPosition),i=[],e=0;n=o[e];e++){var a=s.xPosition[n];if(i.push(a),a===t)return}throw new Error("Panel x Position only accepts the following values:\n"+i.join(" | "))}},s.prototype.withOffsetX=function(t){return this._translateX.push(t),this},s.prototype.withOffsetY=function(t){return this._translateY.push(t),this},s.prototype.getTop=function(){return this._top},s.prototype.getBottom=function(){return this._bottom},s.prototype.getLeft=function(){return this._left},s.prototype.getRight=function(){return this._right},s.prototype.getTransform=function(){var t=this._reduceTranslateValues("translateX",this._translateX),n=this._reduceTranslateValues("translateY",this._translateY);return(t+" "+n).trim()},s.prototype._isOnscreen=function(t){var n=parseInt(this.getLeft()),o=parseInt(this.getTop()),i=n+t[0].offsetWidth,e=o+t[0].offsetHeight;return n>=0&&o>=0&&e<=this._$window.innerHeight&&i<=this._$window.innerWidth},s.prototype.getActualPosition=function(){return this._actualPosition},s.prototype._reduceTranslateValues=function(t,n){return n.map(function(n){return t+"("+n+")"}).join(" ")},s.prototype._setPanelPosition=function(t){if(!this._absolute){if(this._actualPosition)return void this._calculatePanelPosition(t,this._actualPosition);for(var n=0;n<this._positions.length&&(this._actualPosition=this._positions[n],this._calculatePanelPosition(t,this._actualPosition),!this._isOnscreen(t));n++);}},s.prototype._reverseXPosition=function(t){if(t!==s.xPosition.CENTER){var n="start",o="end";return t.indexOf(n)>-1?t.replace(n,o):t.replace(o,n)}},s.prototype._bidi=function(t){return this._isRTL?this._reverseXPosition(t):t},s.prototype._calculatePanelPosition=function(t,n){var o=t[0].getBoundingClientRect(),i=o.width,e=o.height,a=this._relativeToEl[0].getBoundingClientRect(),r=a.left,l=a.right,h=a.width;switch(this._bidi(n.x)){case s.xPosition.OFFSET_START:this._left=r-i+"px";break;case s.xPosition.ALIGN_END:this._left=l-i+"px";break;case s.xPosition.CENTER:var c=r+.5*h-.5*i;this._left=c+"px";break;case s.xPosition.ALIGN_START:this._left=r+"px";break;case s.xPosition.OFFSET_END:this._left=l+"px"}var p=a.top,_=a.bottom,u=a.height;switch(n.y){case s.yPosition.ABOVE:this._top=p-e+"px";break;case s.yPosition.ALIGN_BOTTOMS:this._top=_-e+"px";break;case s.yPosition.CENTER:var f=p+.5*u-.5*e;this._top=f+"px";break;case s.yPosition.ALIGN_TOPS:this._top=p+"px";break;case s.yPosition.BELOW:this._top=_+"px"}},a.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},a.prototype.openFrom=function(t){return t=t.target?t.target:t,this._openFrom=this._getPanelAnimationTarget(t),this._closeTo||(this._closeTo=this._openFrom),this},a.prototype.closeTo=function(t){return this._closeTo=this._getPanelAnimationTarget(t),this},a.prototype._getPanelAnimationTarget=function(t){return n.isDefined(t.top)||n.isDefined(t.left)?{element:o,bounds:{top:t.top||0,left:t.left||0}}:this._getBoundingClientRect(r(t))},a.prototype.withAnimation=function(t){return this._animationClass=t,this},a.prototype.animateOpen=function(t){var o=this._$mdUtil.dom.animator;this._fixBounds(t);var i={},e=t[0].style.transform||"",s=o.toTransformCss(e),r=o.toTransformCss(e);switch(this._animationClass){case a.animation.SLIDE:t.css("opacity","1"),i={transitionInClass:"_md-panel-animate-enter"};var l=o.calculateSlideToOrigin(t,this._openFrom)||"";s=o.toTransformCss(l+" "+e);break;case a.animation.SCALE:i={transitionInClass:"_md-panel-animate-enter"};var h=o.calculateZoomToOrigin(t,this._openFrom)||"";s=o.toTransformCss(h+" "+e);break;case a.animation.FADE:i={transitionInClass:"_md-panel-animate-enter"};break;default:i=n.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return o.translate3d(t,s,r,i)},a.prototype.animateClose=function(t){var o=this._$mdUtil.dom.animator,i={},e=t[0].style.transform||"",s=o.toTransformCss(e),r=o.toTransformCss(e);switch(this._animationClass){case a.animation.SLIDE:t.css("opacity","1"),i={transitionInClass:"_md-panel-animate-leave"};var l=o.calculateSlideToOrigin(t,this._closeTo)||"";r=o.toTransformCss(l+" "+e);break;case a.animation.SCALE:i={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var h=o.calculateZoomToOrigin(t,this._closeTo)||"";r=o.toTransformCss(h+" "+e);break;case a.animation.FADE:i={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:i=n.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return o.translate3d(t,s,r,i)},a.prototype._fixBounds=function(t){var n=t[0].offsetWidth,o=t[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=o),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=n),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=o),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=n)},a.prototype._getBoundingClientRect=function(t){if(t instanceof n.element)return{element:t,bounds:t[0].getBoundingClientRect()}}}(window,window.angular);
{
"name": "angular-material-progressCircular",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -80,3 +80,3 @@ (function( window, angular, undefined ){

var DISABLED_CLASS = '_md-progress-circular-disabled';
var INDETERMINATE_CLASS = '_md-mode-indeterminate';
var INDETERMINATE_CLASS = 'md-mode-indeterminate';

@@ -83,0 +83,0 @@ return {

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,r,t){"use strict";function n(e,t,n,a,i,o){function s(o,s,u){function g(r,n,i,s,u){var m=++k,v=a.now(),g=n-r,p=l(o.mdDiameter),h=p-c(p),w=i||t.easeFn,M=s||t.duration;n===r?A.attr("d",d(n,p,h,u)):C=f(function $(t){var n=e.Math.max(0,e.Math.min((t||a.now())-v,M));A.attr("d",d(w(n,r,g,M),p,h,u)),m===k&&M>n&&(C=f($))})}function $(){g(D,y,t.easeFnIndeterminate,t.durationIndeterminate,S),S=(S+y)%100;var e=D;D=-y,y=-e}function x(){F||(F=i($,t.durationIndeterminate+50,0,!1),$(),s.addClass(M).removeAttr("aria-valuenow"))}function I(){F&&(i.cancel(F),F=null,s.removeClass(M))}var C,F,b=s[0],P=r.element(b.querySelector("svg")),A=r.element(b.querySelector("path")),D=t.startIndeterminate,y=t.endIndeterminate,S=0,k=0;n(s),s.toggleClass(w,u.hasOwnProperty("disabled")),o.mdMode===h&&x(),o.$on("$destroy",function(){I(),C&&v(C)}),o.$watchGroup(["value","mdMode",function(){var e=b.disabled;return e===!0||e===!1?e:r.isDefined(s.attr("disabled"))}],function(e,r){var t=e[1],n=e[2],a=r[2];if(n!==a&&s.toggleClass(w,!!n),n)I();else if(t!==p&&t!==h&&(t=h,u.$set("mdMode",t)),t===h)x();else{var i=m(e[0]);I(),s.attr("aria-valuenow",i),g(m(r[0]),i)}}),o.$watch("mdDiameter",function(e){var r=l(e),t=c(r),n=r/2+"px",a={width:r+"px",height:r+"px"};P[0].setAttribute("viewBox","0 0 "+r+" "+r),P.css(a).css("transform-origin",n+" "+n+" "+n),s.css(a),A.css("stroke-width",t+"px")})}function d(e,r,t,n){var a,i=3.5999,o=n||0,s=r/2,d=t/2,m=o*i,l=e*i,c=u(s,d,m),f=u(s,d,l+m),v=0>l?0:1;return a=0>l?l>=-180?0:1:180>=l?0:1,"M"+c+"A"+d+","+d+" 0 "+a+","+v+" "+f}function u(r,t,n){var a=(n-90)*g;return r+t*e.Math.cos(a)+","+(r+t*e.Math.sin(a))}function m(r){return e.Math.max(0,e.Math.min(r||0,100))}function l(e){var r=t.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*r),n}return r}function c(e){return t.strokeWidth/100*e}var f=e.requestAnimationFrame||r.noop,v=e.cancelAnimationFrame||r.noop,g=e.Math.PI/180,p="determinate",h="indeterminate",w="_md-progress-circular-disabled",M="_md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,t){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),r.isUndefined(t.mdMode)){var n=r.isDefined(t.value),a=n?p:h;t.$set("mdMode",a)}else t.$set("mdMode",t.mdMode.trim());return s}}}function a(){function e(e,r,t,n){return t*e/n+r}function t(e,r,t,n){var a=(e/=n)*e,i=a*e;return r+t*(6*i*a+-15*a*a+10*i)}var n={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:500,startIndeterminate:3,endIndeterminate:80,easeFnIndeterminate:t,easingPresets:{linearEase:e,materialEase:t}};return{configure:function(e){return n=r.extend(n,e||{})},$get:function(){return n}}}r.module("material.components.progressCircular",["material.core"]),r.module("material.components.progressCircular").directive("mdProgressCircular",n),n.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],r.module("material.components.progressCircular").provider("$mdProgressCircular",a)}(window,window.angular);
!function(e,r,t){"use strict";function n(e,t,n,a,i,o){function s(o,s,u){function g(r,n,i,s,u){var m=++k,v=a.now(),g=n-r,p=l(o.mdDiameter),h=p-c(p),w=i||t.easeFn,M=s||t.duration;n===r?A.attr("d",d(n,p,h,u)):C=f(function $(t){var n=e.Math.max(0,e.Math.min((t||a.now())-v,M));A.attr("d",d(w(n,r,g,M),p,h,u)),m===k&&n<M&&(C=f($))})}function $(){g(D,y,t.easeFnIndeterminate,t.durationIndeterminate,S),S=(S+y)%100;var e=D;D=-y,y=-e}function x(){F||(F=i($,t.durationIndeterminate+50,0,!1),$(),s.addClass(M).removeAttr("aria-valuenow"))}function I(){F&&(i.cancel(F),F=null,s.removeClass(M))}var C,F,b=s[0],P=r.element(b.querySelector("svg")),A=r.element(b.querySelector("path")),D=t.startIndeterminate,y=t.endIndeterminate,S=0,k=0;n(s),s.toggleClass(w,u.hasOwnProperty("disabled")),o.mdMode===h&&x(),o.$on("$destroy",function(){I(),C&&v(C)}),o.$watchGroup(["value","mdMode",function(){var e=b.disabled;return e===!0||e===!1?e:r.isDefined(s.attr("disabled"))}],function(e,r){var t=e[1],n=e[2],a=r[2];if(n!==a&&s.toggleClass(w,!!n),n)I();else if(t!==p&&t!==h&&(t=h,u.$set("mdMode",t)),t===h)x();else{var i=m(e[0]);I(),s.attr("aria-valuenow",i),g(m(r[0]),i)}}),o.$watch("mdDiameter",function(e){var r=l(e),t=c(r),n=r/2+"px",a={width:r+"px",height:r+"px"};P[0].setAttribute("viewBox","0 0 "+r+" "+r),P.css(a).css("transform-origin",n+" "+n+" "+n),s.css(a),A.css("stroke-width",t+"px")})}function d(e,r,t,n){var a,i=3.5999,o=n||0,s=r/2,d=t/2,m=o*i,l=e*i,c=u(s,d,m),f=u(s,d,l+m),v=l<0?0:1;return a=l<0?l>=-180?0:1:l<=180?0:1,"M"+c+"A"+d+","+d+" 0 "+a+","+v+" "+f}function u(r,t,n){var a=(n-90)*g;return r+t*e.Math.cos(a)+","+(r+t*e.Math.sin(a))}function m(r){return e.Math.max(0,e.Math.min(r||0,100))}function l(e){var r=t.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*r),n}return r}function c(e){return t.strokeWidth/100*e}var f=e.requestAnimationFrame||r.noop,v=e.cancelAnimationFrame||r.noop,g=e.Math.PI/180,p="determinate",h="indeterminate",w="_md-progress-circular-disabled",M="md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,t){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),r.isUndefined(t.mdMode)){var n=r.isDefined(t.value),a=n?p:h;t.$set("mdMode",a)}else t.$set("mdMode",t.mdMode.trim());return s}}}function a(){function e(e,r,t,n){return t*e/n+r}function t(e,r,t,n){var a=(e/=n)*e,i=a*e;return r+t*(6*i*a+-15*a*a+10*i)}var n={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:500,startIndeterminate:3,endIndeterminate:80,easeFnIndeterminate:t,easingPresets:{linearEase:e,materialEase:t}};return{configure:function(e){return n=r.extend(n,e||{})},$get:function(){return n}}}r.module("material.components.progressCircular",["material.core"]),r.module("material.components.progressCircular").directive("mdProgressCircular",n),n.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],r.module("material.components.progressCircular").provider("$mdProgressCircular",a)}(window,window.angular);
{
"name": "angular-material-progressLinear",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -79,6 +79,6 @@ (function( window, angular, undefined ){

restrict: 'E',
template: '<div class="_md-container">' +
'<div class="_md-dashed"></div>' +
'<div class="_md-bar _md-bar1"></div>' +
'<div class="_md-bar _md-bar2"></div>' +
template: '<div class="md-container">' +
'<div class="md-dashed"></div>' +
'<div class="md-bar md-bar1"></div>' +
'<div class="md-bar md-bar2"></div>' +
'</div>',

@@ -101,5 +101,5 @@ compile: compile

var toVendorCSS = $mdUtil.dom.animator.toCss;
var bar1 = angular.element(element[0].querySelector('._md-bar1'));
var bar2 = angular.element(element[0].querySelector('._md-bar2'));
var container = angular.element(element[0].querySelector('._md-container'));
var bar1 = angular.element(element[0].querySelector('.md-bar1'));
var bar2 = angular.element(element[0].querySelector('.md-bar2'));
var container = angular.element(element[0].querySelector('.md-container'));

@@ -130,3 +130,3 @@ element

if (value === true || value === false) {
isDisabled = value;
isDisabled = !!value;
} else {

@@ -136,6 +136,7 @@ isDisabled = angular.isDefined(value);

element.toggleClass(DISABLED_CLASS, !!isDisabled);
element.toggleClass(DISABLED_CLASS, isDisabled);
container.toggleClass(lastMode, !isDisabled);
});
attr.$observe('mdMode',function(mode){
attr.$observe('mdMode', function(mode) {
if (lastMode) container.removeClass( lastMode );

@@ -148,6 +149,6 @@

case MODE_INDETERMINATE:
container.addClass( lastMode = "_md-mode-" + mode );
container.addClass( lastMode = "md-mode-" + mode );
break;
default:
container.addClass( lastMode = "_md-mode-" + MODE_INDETERMINATE );
container.addClass( lastMode = "md-mode-" + MODE_INDETERMINATE );
break;

@@ -169,3 +170,3 @@ }

element.attr("md-mode",mode);
element.attr("md-mode", mode);
attr.mdMode = mode;

@@ -172,0 +173,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,a,r){"use strict";function t(e,r,t){function d(e,a,r){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),n}function n(t,d,n){function u(){n.$observe("value",function(e){var a=i(e);d.attr("aria-valuenow",a),v()!=l&&b($,a)}),n.$observe("mdBufferValue",function(e){b(w,i(e))}),n.$observe("disabled",function(e){g=e===!0||e===!1?e:a.isDefined(e),d.toggleClass(c,!!g)}),n.$observe("mdMode",function(e){switch(_&&h.removeClass(_),e){case l:case m:case s:case o:h.addClass(_="_md-mode-"+e);break;default:h.addClass(_="_md-mode-"+o)}})}function f(){if(a.isUndefined(n.mdMode)){var e=a.isDefined(n.value),r=e?s:o;d.attr("md-mode",r),n.mdMode=r}}function v(){var e=(n.mdMode||"").trim();if(e)switch(e){case s:case o:case m:case l:break;default:e=o}return e}function b(e,t){if(!g&&v()){var d=r.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),n=p({transform:d});a.element(e).css(n)}}e(d);var _,g=n.hasOwnProperty("disabled"),p=r.dom.animator.toCss,w=a.element(d[0].querySelector("._md-bar1")),$=a.element(d[0].querySelector("._md-bar2")),h=a.element(d[0].querySelector("._md-container"));d.attr("md-mode",v()).toggleClass(c,g),f(),u()}function i(e){return Math.max(0,Math.min(e||0,100))}var s="determinate",o="indeterminate",m="buffer",l="query",c="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="_md-container"><div class="_md-dashed"></div><div class="_md-bar _md-bar1"></div><div class="_md-bar _md-bar2"></div></div>',compile:d}}a.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",t),t.$inject=["$mdTheming","$mdUtil","$log"]}(window,window.angular);
!function(e,a,r){"use strict";function t(e,r,t){function d(e,a,r){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),n}function n(t,d,n){function u(){n.$observe("value",function(e){var a=i(e);d.attr("aria-valuenow",a),v()!=l&&b(h,a)}),n.$observe("mdBufferValue",function(e){b($,i(e))}),n.$observe("disabled",function(e){p=e===!0||e===!1?!!e:a.isDefined(e),d.toggleClass(c,p),C.toggleClass(g,!p)}),n.$observe("mdMode",function(e){switch(g&&C.removeClass(g),e){case l:case m:case s:case o:C.addClass(g="md-mode-"+e);break;default:C.addClass(g="md-mode-"+o)}})}function f(){if(a.isUndefined(n.mdMode)){var e=a.isDefined(n.value),r=e?s:o;d.attr("md-mode",r),n.mdMode=r}}function v(){var e=(n.mdMode||"").trim();if(e)switch(e){case s:case o:case m:case l:break;default:e=o}return e}function b(e,t){if(!p&&v()){var d=r.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),n=w({transform:d});a.element(e).css(n)}}e(d);var g,p=n.hasOwnProperty("disabled"),w=r.dom.animator.toCss,$=a.element(d[0].querySelector(".md-bar1")),h=a.element(d[0].querySelector(".md-bar2")),C=a.element(d[0].querySelector(".md-container"));d.attr("md-mode",v()).toggleClass(c,p),f(),u()}function i(e){return Math.max(0,Math.min(e||0,100))}var s="determinate",o="indeterminate",m="buffer",l="query",c="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:d}}a.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",t),t.$inject=["$mdTheming","$mdUtil","$log"]}(window,window.angular);
{
"name": "angular-material-radioButton",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -82,18 +82,24 @@ (function( window, angular, undefined ){

scope.mouseActive = false;
element.attr({
'role': 'radiogroup',
'tabIndex': element.attr('tabindex') || '0'
})
.on('keydown', keydownListener)
.on('mousedown', function(event) {
scope.mouseActive = true;
$timeout(function() {
scope.mouseActive = false;
}, 100);
})
.on('focus', function() {
if(scope.mouseActive === false) { rgCtrl.$element.addClass('md-focused'); }
})
.on('blur', function() { rgCtrl.$element.removeClass('md-focused'); });
element
.attr({
'role': 'radiogroup',
'tabIndex': element.attr('tabindex') || '0'
})
.on('keydown', keydownListener)
.on('mousedown', function(event) {
scope.mouseActive = true;
$timeout(function() {
scope.mouseActive = false;
}, 100);
})
.on('focus', function() {
if(scope.mouseActive === false) {
rgCtrl.$element.addClass('md-focused');
}
})
.on('blur', function() {
rgCtrl.$element.removeClass('md-focused');
});
/**

@@ -188,2 +194,5 @@ *

this.$element.attr('aria-activedescendant', radioId);
},
isDisabled: function() {
return this.$element[0].hasAttribute('disabled');
}

@@ -265,7 +274,7 @@ };

transclude: true,
template: '<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="_md-off"></div>' +
'<div class="_md-on"></div>' +
template: '<div class="md-container" md-ink-ripple md-ink-ripple-checkbox>' +
'<div class="md-off"></div>' +
'<div class="md-on"></div>' +
'</div>' +
'<div ng-transclude class="_md-label"></div>',
'<div ng-transclude class="md-label"></div>',
link: link

@@ -285,5 +294,5 @@ };

*/
function initialize(controller) {
if ( !rgCtrl ) {
throw 'RadioGroupController not found.';
function initialize() {
if (!rgCtrl) {
throw 'RadioButton: No RadioGroupController could be found.';
}

@@ -305,3 +314,3 @@

function listener(ev) {
if (element[0].hasAttribute('disabled')) return;
if (element[0].hasAttribute('disabled') || rgCtrl.isDisabled()) return;

@@ -308,0 +317,0 @@ scope.$apply(function() {

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function i(e,n,i,r){function o(o,d,a,s){function c(){d.hasClass("md-focused")||d.addClass("md-focused")}function u(i){var r=i.which||i.keyCode;if(r==n.KEY_CODE.ENTER||i.currentTarget==i.target)switch(r){case n.KEY_CODE.LEFT_ARROW:case n.KEY_CODE.UP_ARROW:i.preventDefault(),l.selectPrevious(),c();break;case n.KEY_CODE.RIGHT_ARROW:case n.KEY_CODE.DOWN_ARROW:i.preventDefault(),l.selectNext(),c();break;case n.KEY_CODE.ENTER:var o=t.element(e.getClosest(d[0],"form"));o.length>0&&o.triggerHandler("submit")}}d.addClass("_md"),i(d);var l=s[0],m=s[1]||e.fakeNgModel();l.init(m),o.mouseActive=!1,d.attr({role:"radiogroup",tabIndex:d.attr("tabindex")||"0"}).on("keydown",u).on("mousedown",function(e){o.mouseActive=!0,r(function(){o.mouseActive=!1},100)}).on("focus",function(){o.mouseActive===!1&&l.$element.addClass("md-focused")}).on("blur",function(){l.$element.removeClass("md-focused")})}function d(e){this._radioButtonRenderFns=[],this.$element=e}function a(){return{init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=t.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return s(this.$element,1)},selectPrevious:function(){return s(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)}}}function s(n,i){var r=e.iterator(n[0].querySelectorAll("md-radio-button"),!0);if(r.count()){var o=function(e){return!t.element(e).attr("disabled")},d=n[0].querySelector("md-radio-button.md-checked"),a=r[0>i?"previous":"next"](d,o)||r.first();t.element(a).triggerHandler("click")}}return d.prototype=a(),{restrict:"E",controller:["$element",d],require:["mdRadioGroup","?ngModel"],link:{pre:o}}}function r(e,t,n){function i(i,o,d,a){function s(e){if(!a)throw"RadioGroupController not found.";a.add(u),d.$observe("value",u),o.on("click",c).on("$destroy",function(){a.remove(u)})}function c(e){o[0].hasAttribute("disabled")||i.$apply(function(){a.setViewValue(d.value,e&&e.type)})}function u(){function e(e){"MD-RADIO-GROUP"!=o.parent()[0].nodeName&&o.parent()[e?"addClass":"removeClass"](r)}var t=a.getViewValue()==d.value;t!==m&&(m=t,o.attr("aria-checked",t),t?(e(!0),o.addClass(r),a.setActiveDescendant(o.attr("id"))):(e(!1),o.removeClass(r)))}function l(n,i){function r(){return d.id||"radio_"+t.nextUid()}i.ariaId=r(),n.attr({id:i.ariaId,role:"radio","aria-checked":"false"}),e.expectWithText(n,"aria-label")}var m;n(o),l(o,i),s()}var r="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="_md-container" md-ink-ripple md-ink-ripple-checkbox><div class="_md-off"></div><div class="_md-on"></div></div><div ng-transclude class="_md-label"></div>',link:i}}t.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",i).directive("mdRadioButton",r),i.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],r.$inject=["$mdAria","$mdUtil","$mdTheming"]}(window,window.angular);
!function(e,t,n){"use strict";function i(e,n,i,r){function o(o,d,a,s){function u(){d.hasClass("md-focused")||d.addClass("md-focused")}function c(i){var r=i.which||i.keyCode;if(r==n.KEY_CODE.ENTER||i.currentTarget==i.target)switch(r){case n.KEY_CODE.LEFT_ARROW:case n.KEY_CODE.UP_ARROW:i.preventDefault(),l.selectPrevious(),u();break;case n.KEY_CODE.RIGHT_ARROW:case n.KEY_CODE.DOWN_ARROW:i.preventDefault(),l.selectNext(),u();break;case n.KEY_CODE.ENTER:var o=t.element(e.getClosest(d[0],"form"));o.length>0&&o.triggerHandler("submit")}}d.addClass("_md"),i(d);var l=s[0],m=s[1]||e.fakeNgModel();l.init(m),o.mouseActive=!1,d.attr({role:"radiogroup",tabIndex:d.attr("tabindex")||"0"}).on("keydown",c).on("mousedown",function(e){o.mouseActive=!0,r(function(){o.mouseActive=!1},100)}).on("focus",function(){o.mouseActive===!1&&l.$element.addClass("md-focused")}).on("blur",function(){l.$element.removeClass("md-focused")})}function d(e){this._radioButtonRenderFns=[],this.$element=e}function a(){return{init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=t.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);t!==-1&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return s(this.$element,1)},selectPrevious:function(){return s(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}}}function s(n,i){var r=e.iterator(n[0].querySelectorAll("md-radio-button"),!0);if(r.count()){var o=function(e){return!t.element(e).attr("disabled")},d=n[0].querySelector("md-radio-button.md-checked"),a=r[i<0?"previous":"next"](d,o)||r.first();t.element(a).triggerHandler("click")}}return d.prototype=a(),{restrict:"E",controller:["$element",d],require:["mdRadioGroup","?ngModel"],link:{pre:o}}}function r(e,t,n){function i(i,o,d,a){function s(){if(!a)throw"RadioButton: No RadioGroupController could be found.";a.add(c),d.$observe("value",c),o.on("click",u).on("$destroy",function(){a.remove(c)})}function u(e){o[0].hasAttribute("disabled")||a.isDisabled()||i.$apply(function(){a.setViewValue(d.value,e&&e.type)})}function c(){function e(e){"MD-RADIO-GROUP"!=o.parent()[0].nodeName&&o.parent()[e?"addClass":"removeClass"](r)}var t=a.getViewValue()==d.value;t!==m&&(m=t,o.attr("aria-checked",t),t?(e(!0),o.addClass(r),a.setActiveDescendant(o.attr("id"))):(e(!1),o.removeClass(r)))}function l(n,i){function r(){return d.id||"radio_"+t.nextUid()}i.ariaId=r(),n.attr({id:i.ariaId,role:"radio","aria-checked":"false"}),e.expectWithText(n,"aria-label")}var m;n(o),l(o,i),s()}var r="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:i}}t.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",i).directive("mdRadioButton",r),i.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],r.$inject=["$mdAria","$mdUtil","$mdTheming"]}(window,window.angular);
{
"name": "angular-material-select",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-backdrop": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-backdrop": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -26,3 +26,3 @@ (function( window, angular, undefined ){

var CHECKBOX_SELECTION_INDICATOR =
angular.element('<div class="_md-container"><div class="_md-icon"></div></div>');
angular.element('<div class="md-container"><div class="md-icon"></div></div>');

@@ -48,2 +48,34 @@ angular.module('material.components.select', [

*
* When the select is required and uses a floating label, then the label will automatically contain
* an asterisk (`*`). This behavior can be disabled by using the `md-no-asterisk` attribute.
*
* By default, the select will display with an underline to match other form elements. This can be
* disabled by applying the `md-no-underline` CSS class.
*
* ### Option Params
*
* When applied, `md-option-empty` will mark the option as "empty" allowing the option to clear the
* select and put it back in it's default state. You may supply this attribute on any option you
* wish, however, it is automatically applied to an option whose `value` or `ng-value` are not
* defined.
*
* **Automatically Applied**
*
* - `<md-option>`
* - `<md-option value>`
* - `<md-option value="">`
* - `<md-option ng-value>`
* - `<md-option ng-value="">`
*
* **NOT Automatically Applied**
*
* - `<md-option ng-value="1">`
* - `<md-option ng-value="''">`
* - `<md-option ng-value="undefined">`
* - `<md-option value="undefined">` (this evaluates to the string `"undefined"`)
* - <code ng-non-bindable>&lt;md-option ng-value="{{someValueThatMightBeUndefined}}"&gt;</code>
*
* **Note:** A value of `undefined` ***is considered a valid value*** (and does not auto-apply this
* attribute) since you may wish this to be your "Not Available" or "None" option.
*
* @param {expression} ng-model The model!

@@ -57,5 +89,6 @@ * @param {boolean=} multiple Whether it's multiple.

* @param {string=} placeholder Placeholder hint text.
* @param md-no-asterisk {boolean=} When set to true, an asterisk will not be appended to the floating label.
* @param {string=} aria-label Optional label for accessibility. Only necessary if no placeholder or
* explicit label is present.
* @param {string=} md-container-class Class list to get applied to the `._md-select-menu-container`
* @param {string=} md-container-class Class list to get applied to the `.md-select-menu-container`
* element (for custom styling).

@@ -153,3 +186,6 @@ *

*/
function SelectDirective($mdSelect, $mdUtil, $mdTheming, $mdAria, $compile, $parse) {
function SelectDirective($mdSelect, $mdUtil, $mdConstant, $mdTheming, $mdAria, $compile, $parse) {
var keyCodes = $mdConstant.KEY_CODE;
var NAVIGATION_KEYS = [keyCodes.SPACE, keyCodes.ENTER, keyCodes.UP_ARROW, keyCodes.DOWN_ARROW];
return {

@@ -166,4 +202,4 @@ restrict: 'E',

var valueEl = angular.element('<md-select-value><span></span></md-select-value>');
valueEl.append('<span class="_md-select-icon" aria-hidden="true"></span>');
valueEl.addClass('_md-select-value');
valueEl.append('<span class="md-select-icon" aria-hidden="true"></span>');
valueEl.addClass('md-select-value');
if (!valueEl[0].hasAttribute('id')) {

@@ -188,3 +224,3 @@ valueEl.attr('id', 'select_value_label_' + $mdUtil.nextUid());

'<div>' +
' <md-progress-circular md-mode="indeterminate" ng-if="!$$loadingAsyncDone" md-diameter="25px"></md-progress-circular>' +
' <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular>' +
'</div>'

@@ -200,6 +236,5 @@ ));

if (attr.name) {
var autofillClone = angular.element('<select class="_md-visually-hidden">');
var autofillClone = angular.element('<select class="md-visually-hidden">');
autofillClone.attr({
'name': '.' + attr.name,
'ng-model': attr.ngModel,
'name': attr.name,
'aria-hidden': 'true',

@@ -216,2 +251,11 @@ 'tabindex': '-1'

// Adds an extra option that will hold the selected value for the
// cases where the select is a part of a non-angular form. This can be done with a ng-model,
// however if the `md-option` is being `ng-repeat`-ed, Angular seems to insert a similar
// `option` node, but with a value of `? string: <value> ?` which would then get submitted.
// This also goes around having to prepend a dot to the name attribute.
autofillClone.append(
'<option ng-value="' + attr.ngModel + '" selected></option>'
);
element.parent().append(autofillClone);

@@ -225,3 +269,3 @@ }

var selectTemplate = '' +
'<div class="_md-select-menu-container" aria-hidden="true">' +
'<div class="md-select-menu-container" aria-hidden="true">' +
'<md-select-menu {0}>{1}</md-select-menu>' +

@@ -249,7 +293,8 @@ '</div>';

var isReadonly = angular.isDefined(attr.readonly);
var disableAsterisk = $mdUtil.parseAttributeBoolean(attr.mdNoAsterisk);
if (containerCtrl) {
var isErrorGetter = containerCtrl.isErrorGetter || function() {
return ngModelCtrl.$invalid && ngModelCtrl.$touched;
};
return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (formCtrl && formCtrl.$submitted));
};

@@ -277,12 +322,2 @@ if (containerCtrl.input) {

if (attr.name && formCtrl) {
var selectEl = element.parent()[0].querySelector('select[name=".' + attr.name + '"]');
$mdUtil.nextTick(function() {
var controller = angular.element(selectEl).controller('ngModel');
if (controller) {
formCtrl.$removeControl(controller);
}
});
}
if (formCtrl && angular.isDefined(attr.multiple)) {

@@ -308,2 +343,9 @@ $mdUtil.nextTick(function() {

if (containerCtrl && containerCtrl.label) {
attr.$observe('required', function (value) {
// Toggle the md-required class on the input containers label, because the input container is automatically
// applying the asterisk indicator on the label.
containerCtrl.label.toggleClass('md-required', value && !disableAsterisk);
});
}

@@ -328,10 +370,10 @@ mdSelectCtrl.setLabelText = function(text) {

if (isPlaceholder) {
valueEl.addClass('_md-select-placeholder');
valueEl.addClass('md-select-placeholder');
if (containerCtrl && containerCtrl.label) {
containerCtrl.label.addClass('_md-placeholder');
containerCtrl.label.addClass('md-placeholder');
}
} else {
valueEl.removeClass('_md-select-placeholder');
valueEl.removeClass('md-select-placeholder');
if (containerCtrl && containerCtrl.label) {
containerCtrl.label.removeClass('_md-placeholder');
containerCtrl.label.removeClass('md-placeholder');
}

@@ -344,7 +386,5 @@ }

.on('focus', function(ev) {
// only set focus on if we don't currently have a selected value. This avoids the "bounce"
// on the label transition because the focus will immediately switch to the open menu.
if (containerCtrl && containerCtrl.element.hasClass('md-input-has-value')) {
containerCtrl.setFocused(true);
}
// Always focus the container (if we have one) so floating labels and other styles are
// applied properly
containerCtrl && containerCtrl.setFocused(true);
});

@@ -357,3 +397,3 @@

untouched = false;
if (selectScope.isOpen) {
if (selectScope._mdSelectIsOpen) {
event.stopImmediatePropagation();

@@ -363,3 +403,3 @@ }

if (selectScope.isOpen) return;
if (selectScope._mdSelectIsOpen) return;
containerCtrl && containerCtrl.setFocused(false);

@@ -501,3 +541,3 @@ inputCheckValue();

selectContainer = angular.element(
element[0].querySelector('._md-select-menu-container')
element[0].querySelector('.md-select-menu-container')
);

@@ -517,4 +557,3 @@ selectScope = scope;

function handleKeypress(e) {
var allowedCodes = [32, 13, 38, 40];
if (allowedCodes.indexOf(e.keyCode) != -1) {
if ($mdConstant.isNavigationKey(e)) {
// prevent page scrolling on interaction

@@ -524,6 +563,7 @@ e.preventDefault();

} else {
if (e.keyCode <= 90 && e.keyCode >= 31) {
if ($mdConstant.isInputKey(e) || $mdConstant.isNumPadKey(e)) {
e.preventDefault();
var node = selectMenuCtrl.optNodeForKeyboardSearch(e);
if (!node) return;
if (!node || node.hasAttribute('disabled')) return;
var optionCtrl = angular.element(node).controller('mdOption');

@@ -540,3 +580,3 @@ if (!selectMenuCtrl.isMultiple) {

function openSelect() {
selectScope.isOpen = true;
selectScope._mdSelectIsOpen = true;
element.attr('aria-expanded', 'true');

@@ -555,3 +595,3 @@

}).finally(function() {
selectScope.isOpen = false;
selectScope._mdSelectIsOpen = false;
element.focus();

@@ -562,8 +602,9 @@ element.attr('aria-expanded', 'false');

}
};
}
}
SelectDirective.$inject = ["$mdSelect", "$mdUtil", "$mdTheming", "$mdAria", "$compile", "$parse"];
SelectDirective.$inject = ["$mdSelect", "$mdUtil", "$mdConstant", "$mdTheming", "$mdAria", "$compile", "$parse"];
function SelectMenuDirective($parse, $mdUtil, $mdTheming) {
function SelectMenuDirective($parse, $mdUtil, $mdConstant, $mdTheming) {
// We want the scope to be set to 'false' so an isolated scope is not created

@@ -587,3 +628,3 @@ // which would interfere with the md-select-header's access to the

element.addClass('_md'); // private md component indicator for styling
$mdTheming(element);

@@ -682,2 +723,3 @@ element.on('click', clickListener);

var CLEAR_SEARCH_AFTER = 300;
self.optNodeForKeyboardSearch = function(e) {

@@ -691,3 +733,7 @@ clearSearchTimeout && clearTimeout(clearSearchTimeout);

}, CLEAR_SEARCH_AFTER);
searchStr += String.fromCharCode(e.keyCode);
// Support 1-9 on numpad
var keyCode = e.keyCode - ($mdConstant.isNumPadKey(e) ? 48 : 0);
searchStr += String.fromCharCode(keyCode);
var search = new RegExp('^' + searchStr, 'i');

@@ -712,2 +758,9 @@ if (!optNodes) {

// Setup a more robust version of isEmpty to ensure value is a valid option
self.ngModel.$isEmpty = function($viewValue) {
// We have to transform the viewValue into the hashKey, because otherwise the
// OptionCtrl may not exist. Developers may have specified a trackBy function.
return !self.options[self.hashGetter($viewValue)];
};
// Allow users to provide `ng-model="foo" ng-model-options="{trackBy: 'foo.id'}"` so

@@ -746,6 +799,23 @@ // that we can properly compare objects set on the model to the available options

mapFn = function(el) {
// If we do not have a `value` or `ng-value`, assume it is an empty option which clears the select
if (el.hasAttribute('md-option-empty')) {
return '';
}
var html = el.innerHTML;
// Remove the ripple container from the selected option, copying it would cause a CSP violation.
var rippleContainer = el.querySelector('.md-ripple-container');
return rippleContainer ? html.replace(rippleContainer.outerHTML, '') : html;
if (rippleContainer) {
html = html.replace(rippleContainer.outerHTML, '');
}
// Remove the checkbox container, because it will cause the label to wrap inside of the placeholder.
// It should be not displayed inside of the label element.
var checkboxContainer = el.querySelector('.md-container');
if (checkboxContainer) {
html = html.replace(checkboxContainer.outerHTML, '');
}
return html;
};

@@ -777,2 +847,3 @@ } else if (mode == 'aria') {

}
self.options[hashKey] = optionCtrl;

@@ -783,2 +854,11 @@

self.select(hashKey, optionCtrl.value);
// When the current $modelValue of the ngModel Controller is using the same hash as
// the current option, which will be added, then we can be sure, that the validation
// of the option has occurred before the option was added properly.
// This means, that we have to manually trigger a new validation of the current option.
if (angular.isDefined(self.ngModel.$modelValue) && self.hashGetter(self.ngModel.$modelValue) === hashKey) {
self.ngModel.$validate();
}
self.refreshViewValue();

@@ -845,3 +925,3 @@ }

}
SelectMenuDirective.$inject = ["$parse", "$mdUtil", "$mdTheming"];
SelectMenuDirective.$inject = ["$parse", "$mdUtil", "$mdConstant", "$mdTheming"];

@@ -860,8 +940,20 @@ function OptionDirective($mdButtonInkRipple, $mdUtil) {

// Manual transclusion to avoid the extra inner <span> that ng-transclude generates
element.append(angular.element('<div class="_md-text">').append(element.contents()));
element.append(angular.element('<div class="md-text">').append(element.contents()));
element.attr('tabindex', attr.tabindex || '0');
if (!hasDefinedValue(attr)) {
element.attr('md-option-empty', '');
}
return postLink;
}
function hasDefinedValue(attr) {
var value = attr.value;
var ngValue = attr.ngValue;
return value || ngValue;
}
function postLink(scope, element, attr, ctrls) {

@@ -872,3 +964,3 @@ var optionCtrl = ctrls[0];

if (selectCtrl.isMultiple) {
element.addClass('_md-checkbox-enabled');
element.addClass('md-checkbox-enabled');
element.prepend(CHECKBOX_SELECTION_INDICATOR.clone());

@@ -991,3 +1083,3 @@ }

}
labelElement.addClass('_md-container-ignore');
labelElement.addClass('md-container-ignore');
if (attrs.label) labelElement.text(attrs.label);

@@ -1014,4 +1106,5 @@ }

function selectDefaultOptions($mdSelect, $mdConstant, $mdUtil, $window, $q, $$rAF, $animateCss, $animate, $document) {
var ERRROR_TARGET_EXPECTED = "$mdSelect.show() expected a target element in options.target but got '{0}'!";
var ERROR_TARGET_EXPECTED = "$mdSelect.show() expected a target element in options.target but got '{0}'!";
var animator = $mdUtil.dom.animator;
var keyCodes = $mdConstant.KEY_CODE;

@@ -1047,3 +1140,3 @@ return {

function animateRemoval() {
return $animateCss(element, {addClass: '_md-leave'}).start();
return $animateCss(element, {addClass: 'md-leave'}).start();
}

@@ -1056,3 +1149,3 @@

element.removeClass('_md-active');
element.removeClass('md-active');
element.attr('aria-hidden', 'true');

@@ -1105,3 +1198,3 @@ element[0].style.display = 'none';

$animateCss(element, {removeClass: '_md-leave', duration: 0})
$animateCss(element, {removeClass: 'md-leave', duration: 0})
.start()

@@ -1132,3 +1225,3 @@ .then(positionAndFocusMenu)

$$rAF(function() {
element.addClass('_md-active');
element.addClass('md-active');
info.dropDown.element.css(animator.toCss({transform: ''}));

@@ -1159,3 +1252,3 @@

// Override duration to immediately show invisible backdrop
options.backdrop = $mdUtil.createBackdrop(scope, "_md-select-backdrop _md-click-catcher");
options.backdrop = $mdUtil.createBackdrop(scope, "md-select-backdrop md-click-catcher");
$animate.enter(options.backdrop, $document[0].body, null, {duration: 0});

@@ -1191,3 +1284,3 @@ }

if (!options.target) {
throw new Error($mdUtil.supplant(ERRROR_TARGET_EXPECTED, [options.target]));
throw new Error($mdUtil.supplant(ERROR_TARGET_EXPECTED, [options.target]));
}

@@ -1264,3 +1357,3 @@

element.addClass('_md-clickable');
element.addClass('md-clickable');

@@ -1280,3 +1373,3 @@ // Close on backdrop click

element.removeClass('_md-clickable');
element.removeClass('md-clickable');
opts.isRemoved = true;

@@ -1297,3 +1390,2 @@ };

function onMenuKeyDown(ev) {
var keyCodes = $mdConstant.KEY_CODE;
ev.preventDefault();

@@ -1327,3 +1419,3 @@ ev.stopPropagation();

default:
if (ev.keyCode >= 31 && ev.keyCode <= 90) {
if ($mdConstant.isInputKey(ev) || $mdConstant.isNumPadKey(ev)) {
var optNode = dropDown.controller('mdSelectMenu').optNodeForKeyboardSearch(ev);

@@ -1481,3 +1573,3 @@ opts.focusedNode = optNode || opts.focusedNode;

if (isScrollable) {
selectNode.classList.add('_md-overflow');
selectNode.classList.add('md-overflow');
}

@@ -1521,3 +1613,3 @@

var left, top, transformOrigin, minWidth;
var left, top, transformOrigin, minWidth, fontSize;
if (shouldOpenAroundTarget) {

@@ -1540,2 +1632,4 @@ left = targetRect.left;

minWidth = Math.min(targetRect.width + centeredRect.paddingLeft + centeredRect.paddingRight, maxWidth);
fontSize = window.getComputedStyle(targetNode)['font-size'];
}

@@ -1554,3 +1648,4 @@

top: Math.floor(clamp(bounds.top, top, bounds.bottom - containerRect.height)),
'min-width': minWidth
'min-width': minWidth,
'font-size': fontSize
}

@@ -1557,0 +1652,0 @@ },

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function i(e,i,r,o,l,a){function d(l,d){var s=t.element("<md-select-value><span></span></md-select-value>");if(s.append('<span class="_md-select-icon" aria-hidden="true"></span>'),s.addClass("_md-select-value"),s[0].hasAttribute("id")||s.attr("id","select_value_label_"+i.nextUid()),l.find("md-content").length||l.append(t.element("<md-content>").append(l.contents())),d.mdOnOpen&&(l.find("md-content").prepend(t.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="!$$loadingAsyncDone" md-diameter="25px"></md-progress-circular></div>')),l.find("md-option").attr("ng-show","$$loadingAsyncDone")),d.name){var c=t.element('<select class="_md-visually-hidden">');c.attr({name:"."+d.name,"ng-model":d.ngModel,"aria-hidden":"true",tabindex:"-1"});var u=l.find("md-option");t.forEach(u,function(e){var n=t.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?n.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&n.attr("value",e.getAttribute("value")),c.append(n)}),l.parent().append(c)}var p=i.parseAttributeBoolean(d.multiple),f=p?"multiple":"",m='<div class="_md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>';return m=i.supplant(m,[f,l.html()]),l.empty().append(s),l.append(m),d.tabindex||d.$set("tabindex",0),function(l,d,s,c){function u(){var e=d.attr("aria-label")||d.attr("placeholder");!e&&C&&C.label&&(e=C.label.text()),y=e,o.expect(d,"aria-label",e)}function f(){T&&(D=D||T.find("md-select-menu").controller("mdSelectMenu"),k.setLabelText(D.selectedLabels()))}function m(){if(y){var e=D.selectedLabels({mode:"aria"});d.attr("aria-label",e.length?y+": "+e:y)}}function h(){C&&C.setHasValue(D.selectedLabels().length>0||(d[0].validity||{}).badInput)}function v(){if(T=t.element(d[0].querySelector("._md-select-menu-container")),E=l,s.mdContainerClass){var e=T[0].getAttribute("class")+" "+s.mdContainerClass;T[0].setAttribute("class",e)}D=T.find("md-select-menu").controller("mdSelectMenu"),D.init(M,s.ngModel),d.on("$destroy",function(){T.remove()})}function g(e){var n=[32,13,38,40];if(-1!=n.indexOf(e.keyCode))e.preventDefault(),b(e);else if(e.keyCode<=90&&e.keyCode>=31){e.preventDefault();var i=D.optNodeForKeyboardSearch(e);if(!i)return;var r=t.element(i).controller("mdOption");D.isMultiple||D.deselect(Object.keys(D.selected)[0]),D.select(r.hashKey,r.value),D.refreshViewValue()}}function b(){E.isOpen=!0,d.attr("aria-expanded","true"),e.show({scope:E,preserveScope:!0,skipCompile:!0,element:T,target:d[0],selectCtrl:k,preserveElement:!0,hasBackdrop:!0,loadingAsync:s.mdOnOpen?l.$eval(s.mdOnOpen)||!0:!1})["finally"](function(){E.isOpen=!1,d.focus(),d.attr("aria-expanded","false"),M.$setTouched()})}var $,y,w=!0,C=c[0],k=c[1],M=c[2],x=c[3],S=d.find("md-select-value"),A=t.isDefined(s.readonly);if(C){var O=C.isErrorGetter||function(){return M.$invalid&&M.$touched};if(C.input&&d.find("md-select-header").find("input")[0]!==C.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");C.input=d,C.label||o.expect(d,"aria-label",d.attr("placeholder")),l.$watch(O,C.setInvalid)}var T,E,D;if(v(),r(d),s.name&&x){var _=d.parent()[0].querySelector('select[name=".'+s.name+'"]');i.nextTick(function(){var e=t.element(_).controller("ngModel");e&&x.$removeControl(e)})}x&&t.isDefined(s.multiple)&&i.nextTick(function(){var e=M.$modelValue||M.$viewValue;e&&x.$setPristine()});var R=M.$render;M.$render=function(){R(),f(),m(),h()},s.$observe("placeholder",M.$render),k.setLabelText=function(e){if(k.setIsPlaceholder(!e),s.mdSelectedText)e=a(s.mdSelectedText)(l);else{var t=s.placeholder||(C&&C.label?C.label.text():"");e=e||t||""}var n=S.children().eq(0);n.html(e)},k.setIsPlaceholder=function(e){e?(S.addClass("_md-select-placeholder"),C&&C.label&&C.label.addClass("_md-placeholder")):(S.removeClass("_md-select-placeholder"),C&&C.label&&C.label.removeClass("_md-placeholder"))},A||(d.on("focus",function(e){C&&C.element.hasClass("md-input-has-value")&&C.setFocused(!0)}),d.on("blur",function(e){w&&(w=!1,E.isOpen&&e.stopImmediatePropagation()),E.isOpen||(C&&C.setFocused(!1),h())})),k.triggerClose=function(){a(s.mdOnClose)(l)},l.$$postDigest(function(){u(),f(),m()}),l.$watch(function(){return D.selectedLabels()},f);var V;s.$observe("ngMultiple",function(e){V&&V();var t=a(e);V=l.$watch(function(){return t(l)},function(e,t){e===n&&t===n||(e?d.attr("multiple","multiple"):d.removeAttr("multiple"),d.attr("aria-multiselectable",e?"true":"false"),T&&(D.setMultiple(e),R=M.$render,M.$render=function(){R(),f(),m(),h()},M.$render()))})}),s.$observe("disabled",function(e){t.isString(e)&&(e=!0),$!==n&&$===e||($=e,e?d.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",b).off("keydown",g):d.attr({tabindex:s.tabindex,"aria-disabled":"false"}).on("click",b).on("keydown",g))}),s.hasOwnProperty("disabled")||s.hasOwnProperty("ngDisabled")||(d.attr({"aria-disabled":"false"}),d.on("click",b),d.on("keydown",g));var B={role:"listbox","aria-expanded":"false","aria-multiselectable":p&&!s.ngMultiple?"true":"false"};d[0].hasAttribute("id")||(B.id="select_"+i.nextUid());var P="select_container_"+i.nextUid();T.attr("id",P),B["aria-owns"]=P,d.attr(B),l.$on("$destroy",function(){e.destroy()["finally"](function(){C&&(C.setFocused(!1),C.setHasValue(!1),C.input=null),M.$setTouched()})})}}return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:d,controller:function(){}}}function r(e,i,r){function o(e,n,o,l){function a(e){13!=e.keyCode&&32!=e.keyCode||d(e)}function d(n){var r=i.getClosest(n.target,"md-option"),o=r&&t.element(r).data("$mdOptionController");if(r&&o){if(r.hasAttribute("disabled"))return n.stopImmediatePropagation(),!1;var l=s.hashGetter(o.value),a=t.isDefined(s.selected[l]);e.$apply(function(){s.isMultiple?a?s.deselect(l):s.select(l,o.value):a||(s.deselect(Object.keys(s.selected)[0]),s.select(l,o.value)),s.refreshViewValue()})}}var s=l[0];n.addClass("_md"),r(n),n.on("click",d),n.on("keypress",a)}function l(r,o,l){function a(){var e=s.ngModel.$modelValue||s.ngModel.$viewValue||[];if(t.isArray(e)){var n=Object.keys(s.selected),i=e.map(s.hashGetter),r=n.filter(function(e){return-1===i.indexOf(e)});r.forEach(s.deselect),i.forEach(function(t,n){s.select(t,e[n])})}}function d(){var e=s.ngModel.$viewValue||s.ngModel.$modelValue;Object.keys(s.selected).forEach(s.deselect),s.select(s.hashGetter(e),e)}var s=this;s.isMultiple=t.isDefined(o.multiple),s.selected={},s.options={},r.$watchCollection(function(){return s.options},function(){s.ngModel.$render()});var u,p;s.setMultiple=function(e){function n(e,n){return t.isArray(e||n||[])}var i=s.ngModel;p=p||i.$isEmpty,s.isMultiple=e,u&&u(),s.isMultiple?(i.$validators["md-multiple"]=n,i.$render=a,r.$watchCollection(s.modelBinding,function(e){n(e)&&a(e),s.ngModel.$setPristine()}),i.$isEmpty=function(e){return!e||0===e.length}):(delete i.$validators["md-multiple"],i.$render=d)};var f,m,h,v="",g=300;s.optNodeForKeyboardSearch=function(e){f&&clearTimeout(f),f=setTimeout(function(){f=n,v="",h=n,m=n},g),v+=String.fromCharCode(e.keyCode);var i=new RegExp("^"+v,"i");m||(m=l.find("md-option"),h=new Array(m.length),t.forEach(m,function(e,t){h[t]=e.textContent.trim()}));for(var r=0;r<h.length;++r)if(i.test(h[r]))return m[r]},s.init=function(n,i){if(s.ngModel=n,s.modelBinding=i,n.$options&&n.$options.trackBy){var o={},l=e(n.$options.trackBy);s.hashGetter=function(e,t){return o.$value=e,l(t||r,o)}}else s.hashGetter=function(e){return t.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++c)):e};s.setMultiple(s.isMultiple)},s.selectedLabels=function(e){e=e||{};var t=e.mode||"html",n=i.nodesToArray(l[0].querySelectorAll("md-option[selected]"));if(n.length){var r;return"html"==t?r=function(e){var t=e.innerHTML,n=e.querySelector(".md-ripple-container");return n?t.replace(n.outerHTML,""):t}:"aria"==t&&(r=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),n.map(r).join(", ")}return""},s.select=function(e,t){var n=s.options[e];n&&n.setSelected(!0),s.selected[e]=t},s.deselect=function(e){var t=s.options[e];t&&t.setSelected(!1),delete s.selected[e]},s.addOption=function(e,n){if(t.isDefined(s.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+n.value+'" found.');s.options[e]=n,t.isDefined(s.selected[e])&&(s.select(e,n.value),s.refreshViewValue())},s.removeOption=function(e){delete s.options[e]},s.refreshViewValue=function(){var e,n=[];for(var i in s.selected)(e=s.options[i])?n.push(e.value):n.push(s.selected[i]);var r=s.ngModel.$options&&s.ngModel.$options.trackBy,o=s.isMultiple?n:n[0],l=s.ngModel.$modelValue;(r?t.equals(l,o):l==o)||(s.ngModel.$setViewValue(o),s.ngModel.$render())}}return l.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu"],scope:!1,controller:l,link:{pre:o}}}function o(e,n){function i(e,n){return e.append(t.element('<div class="_md-text">').append(e.contents())),e.attr("tabindex",n.tabindex||"0"),r}function r(i,r,o,l){function a(e,t,n){if(!c.hashGetter)return void(n||i.$$postDigest(function(){a(e,t,!0)}));var r=c.hashGetter(t,i),o=c.hashGetter(e,i);s.hashKey=o,s.value=e,c.removeOption(r,s),c.addOption(o,s)}function d(){var e={role:"option","aria-selected":"false"};r[0].hasAttribute("id")||(e.id="select_option_"+n.nextUid()),r.attr(e)}var s=l[0],c=l[1];c.isMultiple&&(r.addClass("_md-checkbox-enabled"),r.prepend(u.clone())),t.isDefined(o.ngValue)?i.$watch(o.ngValue,a):t.isDefined(o.value)?a(o.value):i.$watch(function(){return r.text().trim()},a),o.$observe("disabled",function(e){e?r.attr("tabindex","-1"):r.attr("tabindex","0")}),i.$$postDigest(function(){o.$observe("selected",function(e){t.isDefined(e)&&("string"==typeof e&&(e=!0),e?(c.isMultiple||c.deselect(Object.keys(c.selected)[0]),c.select(s.hashKey,s.value)):c.deselect(s.hashKey),c.refreshViewValue())})}),e.attach(i,r),d(),i.$on("$destroy",function(){c.removeOption(s.hashKey,s)})}function o(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}return o.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:o,compile:i}}function l(){function e(e,n){function i(){return e.parent().find("md-select-header").length}function r(){var i=e.find("label");i.length||(i=t.element("<label>"),e.prepend(i)),i.addClass("_md-container-ignore"),n.label&&i.text(n.label)}i()||r()}return{restrict:"E",compile:e}}function a(){return{restrict:"E"}}function d(e){function i(e,i,d,c,u,p,f,m,h){function v(e,t,n){function i(){return f(t,{addClass:"_md-leave"}).start()}function r(){t.removeClass("_md-active"),t.attr("aria-hidden","true"),t[0].style.display="none",b(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}return n=n||{},n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?r():i().then(r)}function g(r,o,l){function a(e,t,n){return n.parent.append(t),u(function(e,n){try{f(t,{removeClass:"_md-leave",duration:0}).start().then(s).then(e)}catch(i){n(i)}})}function s(){return u(function(e){if(l.isRemoved)return u.reject(!1);var t=$(r,o,l);t.container.element.css(w.toCss(t.container.styles)),t.dropDown.element.css(w.toCss(t.dropDown.styles)),p(function(){o.addClass("_md-active"),t.dropDown.element.css(w.toCss({transform:""})),g(l.focusedNode),e()})})}function v(e,t,n){return n.disableParentScroll&&!d.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=d.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1,n.hasBackdrop&&(n.backdrop=d.createBackdrop(e,"_md-select-backdrop _md-click-catcher"),m.enter(n.backdrop,h[0].body,null,{duration:0})),function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll(),delete n.restoreScroll}}function g(e){e&&!e.hasAttribute("disabled")&&e.focus()}function b(e,n){var i=o.find("md-select-menu");if(!n.target)throw new Error(d.supplant(y,[n.target]));t.extend(n,{isRemoved:!1,target:t.element(n.target),parent:t.element(n.parent),selectEl:i,contentEl:o.find("md-content"),optionNodes:i[0].getElementsByTagName("md-option")})}function C(){var e=function(e,t,n){return function(){if(!n.isRemoved){var i=$(e,t,n),r=i.container,o=i.dropDown;r.element.css(w.toCss(r.styles)),o.element.css(w.toCss(o.styles))}}}(r,o,l),n=t.element(c);return n.on("resize",e),n.on("orientationchange",e),function(){n.off("resize",e),n.off("orientationchange",e)}}function k(){l.loadingAsync&&!l.isRemoved&&(r.$$loadingAsyncDone=!1,u.when(l.loadingAsync).then(function(){r.$$loadingAsyncDone=!0,delete l.loadingAsync}).then(function(){p(s)}))}function M(){function t(t){t.preventDefault(),t.stopPropagation(),l.restoreFocus=!1,d.nextTick(e.hide,!0)}function r(t){var n=i.KEY_CODE;switch(t.preventDefault(),t.stopPropagation(),t.keyCode){case n.UP_ARROW:return c();case n.DOWN_ARROW:return s();case n.SPACE:case n.ENTER:var r=d.getClosest(t.target,"md-option");r&&(p.triggerHandler({type:"click",target:r}),t.preventDefault()),u(t);break;case n.TAB:case n.ESCAPE:t.stopPropagation(),t.preventDefault(),l.restoreFocus=!0,d.nextTick(e.hide,!0);break;default:if(t.keyCode>=31&&t.keyCode<=90){var o=p.controller("mdSelectMenu").optNodeForKeyboardSearch(t);l.focusedNode=o||l.focusedNode,o&&o.focus()}}}function a(e){var t,i=d.nodesToArray(l.optionNodes),r=i.indexOf(l.focusedNode);do-1===r?r=0:"next"===e&&r<i.length-1?r++:"prev"===e&&r>0&&r--,t=i[r],t.hasAttribute("disabled")&&(t=n);while(!t&&r<i.length-1&&r>0);t&&t.focus(),l.focusedNode=t}function s(){a("next")}function c(){a("prev")}function u(t){function n(){var e=!1;if(t&&t.currentTarget.children.length>0){var n=t.currentTarget.children[0],i=n.scrollHeight>n.clientHeight;if(i&&n.children.length>0){var r=t.pageX-t.currentTarget.getBoundingClientRect().left;r>n.querySelector("md-option").offsetWidth&&(e=!0)}}return e}if(!(t&&"click"==t.type&&t.currentTarget!=p[0]||n())){var i=d.getClosest(t.target,"md-option");i&&i.hasAttribute&&!i.hasAttribute("disabled")&&(t.preventDefault(),t.stopPropagation(),f.isMultiple||(l.restoreFocus=!0,d.nextTick(function(){e.hide(f.ngModel.$viewValue)},!0)))}}if(!l.isRemoved){var p=l.selectEl,f=p.controller("mdSelectMenu")||{};return o.addClass("_md-clickable"),l.backdrop&&l.backdrop.on("click",t),p.on("keydown",r),p.on("click",u),function(){l.backdrop&&l.backdrop.off("click",t),p.off("keydown",r),p.off("click",u),o.removeClass("_md-clickable"),l.isRemoved=!0}}}return k(),b(r,l),l.hideBackdrop=v(r,o,l),a(r,o,l).then(function(e){return o.attr("aria-hidden","false"),l.alreadyOpen=!0,l.cleanupInteraction=M(),l.cleanupResizing=C(),e},l.hideBackdrop)}function b(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}function $(e,n,i){var u,p=n[0],f=i.target[0].children[0],m=h[0].body,v=i.selectEl[0],g=i.contentEl[0],b=m.getBoundingClientRect(),$=f.getBoundingClientRect(),y=!1,w={left:b.left+s,top:s,bottom:b.height-s,right:b.width-s-(d.floatingScrollbars()?16:0)},C={top:$.top-w.top,left:$.left-w.left,right:w.right-($.left+$.width),bottom:w.bottom-($.top+$.height)},k=b.width-2*s,M=v.querySelector("md-option[selected]"),x=v.getElementsByTagName("md-option"),S=v.getElementsByTagName("md-optgroup"),A=a(n,g),O=r(i.loadingAsync);u=O?g.firstElementChild||g:M?M:S.length?S[0]:x.length?x[0]:g.firstElementChild||g,g.offsetWidth>k?g.style["max-width"]=k+"px":g.style.maxWidth=null,y&&(g.style["min-width"]=$.width+"px"),A&&v.classList.add("_md-overflow");var T=u;"MD-OPTGROUP"===(T.tagName||"").toUpperCase()&&(T=x[0]||g.firstElementChild||g,u=T),i.focusedNode=T,p.style.display="block";var E=v.getBoundingClientRect(),D=l(u);if(u){var _=c.getComputedStyle(u);D.paddingLeft=parseInt(_.paddingLeft,10)||0,D.paddingRight=parseInt(_.paddingRight,10)||0}if(A){var R=g.offsetHeight/2;g.scrollTop=D.top+D.height/2-R,C.top<R?g.scrollTop=Math.min(D.top,g.scrollTop+R-C.top):C.bottom<R&&(g.scrollTop=Math.max(D.top+D.height-E.height,g.scrollTop-R+C.bottom))}var V,B,P,L;y?(V=$.left,B=$.top+$.height,P="50% 0",B+E.height>w.bottom&&(B=$.top-E.height,P="50% 100%")):(V=$.left+D.left-D.paddingLeft+2,B=Math.floor($.top+$.height/2-D.height/2-D.top+g.scrollTop)+2,P=D.left+$.width/2+"px "+(D.top+D.height/2-g.scrollTop)+"px 0px",L=Math.min($.width+D.paddingLeft+D.paddingRight,k));var N=p.getBoundingClientRect(),j=Math.round(100*Math.min($.width/E.width,1))/100,I=Math.round(100*Math.min($.height/E.height,1))/100;return{container:{element:t.element(p),styles:{left:Math.floor(o(w.left,V,w.right-N.width)),top:Math.floor(o(w.top,B,w.bottom-N.height)),"min-width":L}},dropDown:{element:t.element(v),styles:{transformOrigin:P,transform:i.alreadyOpen?"":d.supplant("scale({0},{1})",[j,I])}}}}var y="$mdSelect.show() expected a target element in options.target but got '{0}'!",w=d.dom.animator;return{parent:"body",themable:!0,onShow:g,onRemove:v,hasBackdrop:!0,disableParentScroll:!0}}function r(e){return e&&t.isFunction(e.then)}function o(e,t,n){return Math.max(e,Math.min(t,n))}function l(e){return e?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}function a(e,t){var n=!1;try{var i=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=i}finally{}return n}return i.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],e("$mdSelect").setDefaults({methods:["target"],options:i})}var s=8,c=0,u=t.element('<div class="_md-container"><div class="_md-icon"></div></div>');t.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",i).directive("mdSelectMenu",r).directive("mdOption",o).directive("mdOptgroup",l).directive("mdSelectHeader",a).provider("$mdSelect",d),i.$inject=["$mdSelect","$mdUtil","$mdTheming","$mdAria","$compile","$parse"],r.$inject=["$parse","$mdUtil","$mdTheming"],o.$inject=["$mdButtonInkRipple","$mdUtil"],d.$inject=["$$interimElementProvider"]}(window,window.angular);
!function(e,t,n){"use strict";function i(e,i,o,r,l,a,d){function s(a,s){var c=t.element("<md-select-value><span></span></md-select-value>");if(c.append('<span class="md-select-icon" aria-hidden="true"></span>'),c.addClass("md-select-value"),c[0].hasAttribute("id")||c.attr("id","select_value_label_"+i.nextUid()),a.find("md-content").length||a.append(t.element("<md-content>").append(a.contents())),s.mdOnOpen&&(a.find("md-content").prepend(t.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),a.find("md-option").attr("ng-show","$$loadingAsyncDone")),s.name){var u=t.element('<select class="md-visually-hidden">');u.attr({name:s.name,"aria-hidden":"true",tabindex:"-1"});var p=a.find("md-option");t.forEach(p,function(e){var n=t.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?n.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&n.attr("value",e.getAttribute("value")),u.append(n)}),u.append('<option ng-value="'+s.ngModel+'" selected></option>'),a.parent().append(u)}var f=i.parseAttributeBoolean(s.multiple),m=f?"multiple":"",h='<div class="md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>';return h=i.supplant(h,[m,a.html()]),a.empty().append(c),a.append(h),s.tabindex||s.$set("tabindex",0),function(a,s,c,u){function p(){var e=s.attr("aria-label")||s.attr("placeholder");!e&&M&&M.label&&(e=M.label.text()),w=e,l.expect(s,"aria-label",e)}function m(){T&&(P=P||T.find("md-select-menu").controller("mdSelectMenu"),k.setLabelText(P.selectedLabels()))}function h(){if(w){var e=P.selectedLabels({mode:"aria"});s.attr("aria-label",e.length?w+": "+e:w)}}function g(){M&&M.setHasValue(P.selectedLabels().length>0||(s[0].validity||{}).badInput)}function v(){if(T=t.element(s[0].querySelector(".md-select-menu-container")),R=a,c.mdContainerClass){var e=T[0].getAttribute("class")+" "+c.mdContainerClass;T[0].setAttribute("class",e)}P=T.find("md-select-menu").controller("mdSelectMenu"),P.init(x,c.ngModel),s.on("$destroy",function(){T.remove()})}function b(e){if(o.isNavigationKey(e))e.preventDefault(),$(e);else if(o.isInputKey(e)||o.isNumPadKey(e)){e.preventDefault();var n=P.optNodeForKeyboardSearch(e);if(!n||n.hasAttribute("disabled"))return;var i=t.element(n).controller("mdOption");P.isMultiple||P.deselect(Object.keys(P.selected)[0]),P.select(i.hashKey,i.value),P.refreshViewValue()}}function $(){R._mdSelectIsOpen=!0,s.attr("aria-expanded","true"),e.show({scope:R,preserveScope:!0,skipCompile:!0,element:T,target:s[0],selectCtrl:k,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!c.mdOnOpen&&(a.$eval(c.mdOnOpen)||!0)})["finally"](function(){R._mdSelectIsOpen=!1,s.focus(),s.attr("aria-expanded","false"),x.$setTouched()})}var y,w,C=!0,M=u[0],k=u[1],x=u[2],S=u[3],A=s.find("md-select-value"),O=t.isDefined(c.readonly),E=i.parseAttributeBoolean(c.mdNoAsterisk);if(M){var D=M.isErrorGetter||function(){return x.$invalid&&(x.$touched||S&&S.$submitted)};if(M.input&&s.find("md-select-header").find("input")[0]!==M.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");M.input=s,M.label||l.expect(s,"aria-label",s.attr("placeholder")),a.$watch(D,M.setInvalid)}var T,R,P;v(),r(s),S&&t.isDefined(c.multiple)&&i.nextTick(function(){var e=x.$modelValue||x.$viewValue;e&&S.$setPristine()});var V=x.$render;x.$render=function(){V(),m(),h(),g()},c.$observe("placeholder",x.$render),M&&M.label&&c.$observe("required",function(e){M.label.toggleClass("md-required",e&&!E)}),k.setLabelText=function(e){if(k.setIsPlaceholder(!e),c.mdSelectedText)e=d(c.mdSelectedText)(a);else{var t=c.placeholder||(M&&M.label?M.label.text():"");e=e||t||""}var n=A.children().eq(0);n.html(e)},k.setIsPlaceholder=function(e){e?(A.addClass("md-select-placeholder"),M&&M.label&&M.label.addClass("md-placeholder")):(A.removeClass("md-select-placeholder"),M&&M.label&&M.label.removeClass("md-placeholder"))},O||(s.on("focus",function(e){M&&M.setFocused(!0)}),s.on("blur",function(e){C&&(C=!1,R._mdSelectIsOpen&&e.stopImmediatePropagation()),R._mdSelectIsOpen||(M&&M.setFocused(!1),g())})),k.triggerClose=function(){d(c.mdOnClose)(a)},a.$$postDigest(function(){p(),m(),h()}),a.$watch(function(){return P.selectedLabels()},m);var B;c.$observe("ngMultiple",function(e){B&&B();var t=d(e);B=a.$watch(function(){return t(a)},function(e,t){e===n&&t===n||(e?s.attr("multiple","multiple"):s.removeAttr("multiple"),s.attr("aria-multiselectable",e?"true":"false"),T&&(P.setMultiple(e),V=x.$render,x.$render=function(){V(),m(),h(),g()},x.$render()))})}),c.$observe("disabled",function(e){t.isString(e)&&(e=!0),y!==n&&y===e||(y=e,e?s.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",$).off("keydown",b):s.attr({tabindex:c.tabindex,"aria-disabled":"false"}).on("click",$).on("keydown",b))}),c.hasOwnProperty("disabled")||c.hasOwnProperty("ngDisabled")||(s.attr({"aria-disabled":"false"}),s.on("click",$),s.on("keydown",b));var N={role:"listbox","aria-expanded":"false","aria-multiselectable":f&&!c.ngMultiple?"true":"false"};s[0].hasAttribute("id")||(N.id="select_"+i.nextUid());var I="select_container_"+i.nextUid();T.attr("id",I),N["aria-owns"]=I,s.attr(N),a.$on("$destroy",function(){e.destroy()["finally"](function(){M&&(M.setFocused(!1),M.setHasValue(!1),M.input=null),x.$setTouched()})})}}var c=o.KEY_CODE;[c.SPACE,c.ENTER,c.UP_ARROW,c.DOWN_ARROW];return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:s,controller:function(){}}}function o(e,i,o,r){function l(e,n,o,l){function a(e){13!=e.keyCode&&32!=e.keyCode||d(e)}function d(n){var o=i.getClosest(n.target,"md-option"),r=o&&t.element(o).data("$mdOptionController");if(o&&r){if(o.hasAttribute("disabled"))return n.stopImmediatePropagation(),!1;var l=s.hashGetter(r.value),a=t.isDefined(s.selected[l]);e.$apply(function(){s.isMultiple?a?s.deselect(l):s.select(l,r.value):a||(s.deselect(Object.keys(s.selected)[0]),s.select(l,r.value)),s.refreshViewValue()})}}var s=l[0];n.addClass("_md"),r(n),n.on("click",d),n.on("keypress",a)}function a(r,l,a){function d(){var e=u.ngModel.$modelValue||u.ngModel.$viewValue||[];if(t.isArray(e)){var n=Object.keys(u.selected),i=e.map(u.hashGetter),o=n.filter(function(e){return i.indexOf(e)===-1});o.forEach(u.deselect),i.forEach(function(t,n){u.select(t,e[n])})}}function s(){var e=u.ngModel.$viewValue||u.ngModel.$modelValue;Object.keys(u.selected).forEach(u.deselect),u.select(u.hashGetter(e),e)}var u=this;u.isMultiple=t.isDefined(l.multiple),u.selected={},u.options={},r.$watchCollection(function(){return u.options},function(){u.ngModel.$render()});var p,f;u.setMultiple=function(e){function n(e,n){return t.isArray(e||n||[])}var i=u.ngModel;f=f||i.$isEmpty,u.isMultiple=e,p&&p(),u.isMultiple?(i.$validators["md-multiple"]=n,i.$render=d,r.$watchCollection(u.modelBinding,function(e){n(e)&&d(e),u.ngModel.$setPristine()}),i.$isEmpty=function(e){return!e||0===e.length}):(delete i.$validators["md-multiple"],i.$render=s)};var m,h,g,v="",b=300;u.optNodeForKeyboardSearch=function(e){m&&clearTimeout(m),m=setTimeout(function(){m=n,v="",g=n,h=n},b);var i=e.keyCode-(o.isNumPadKey(e)?48:0);v+=String.fromCharCode(i);var r=new RegExp("^"+v,"i");h||(h=a.find("md-option"),g=new Array(h.length),t.forEach(h,function(e,t){g[t]=e.textContent.trim()}));for(var l=0;l<g.length;++l)if(r.test(g[l]))return h[l]},u.init=function(n,i){if(u.ngModel=n,u.modelBinding=i,u.ngModel.$isEmpty=function(e){return!u.options[u.hashGetter(e)]},n.$options&&n.$options.trackBy){var o={},l=e(n.$options.trackBy);u.hashGetter=function(e,t){return o.$value=e,l(t||r,o)}}else u.hashGetter=function(e){return t.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++c)):e};u.setMultiple(u.isMultiple)},u.selectedLabels=function(e){e=e||{};var t=e.mode||"html",n=i.nodesToArray(a[0].querySelectorAll("md-option[selected]"));if(n.length){var o;return"html"==t?o=function(e){if(e.hasAttribute("md-option-empty"))return"";var t=e.innerHTML,n=e.querySelector(".md-ripple-container");n&&(t=t.replace(n.outerHTML,""));var i=e.querySelector(".md-container");return i&&(t=t.replace(i.outerHTML,"")),t}:"aria"==t&&(o=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),n.map(o).join(", ")}return""},u.select=function(e,t){var n=u.options[e];n&&n.setSelected(!0),u.selected[e]=t},u.deselect=function(e){var t=u.options[e];t&&t.setSelected(!1),delete u.selected[e]},u.addOption=function(e,n){if(t.isDefined(u.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+n.value+'" found.');u.options[e]=n,t.isDefined(u.selected[e])&&(u.select(e,n.value),t.isDefined(u.ngModel.$modelValue)&&u.hashGetter(u.ngModel.$modelValue)===e&&u.ngModel.$validate(),u.refreshViewValue())},u.removeOption=function(e){delete u.options[e]},u.refreshViewValue=function(){var e,n=[];for(var i in u.selected)(e=u.options[i])?n.push(e.value):n.push(u.selected[i]);var o=u.ngModel.$options&&u.ngModel.$options.trackBy,r=u.isMultiple?n:n[0],l=u.ngModel.$modelValue;(o?t.equals(l,r):l==r)||(u.ngModel.$setViewValue(r),u.ngModel.$render())}}return a.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu"],scope:!1,controller:a,link:{pre:l}}}function r(e,n){function i(e,n){return e.append(t.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",n.tabindex||"0"),o(n)||e.attr("md-option-empty",""),r}function o(e){var t=e.value,n=e.ngValue;return t||n}function r(i,o,r,l){function a(e,t,n){if(!c.hashGetter)return void(n||i.$$postDigest(function(){a(e,t,!0)}));var o=c.hashGetter(t,i),r=c.hashGetter(e,i);s.hashKey=r,s.value=e,c.removeOption(o,s),c.addOption(r,s)}function d(){var e={role:"option","aria-selected":"false"};o[0].hasAttribute("id")||(e.id="select_option_"+n.nextUid()),o.attr(e)}var s=l[0],c=l[1];c.isMultiple&&(o.addClass("md-checkbox-enabled"),o.prepend(u.clone())),t.isDefined(r.ngValue)?i.$watch(r.ngValue,a):t.isDefined(r.value)?a(r.value):i.$watch(function(){return o.text().trim()},a),r.$observe("disabled",function(e){e?o.attr("tabindex","-1"):o.attr("tabindex","0")}),i.$$postDigest(function(){r.$observe("selected",function(e){t.isDefined(e)&&("string"==typeof e&&(e=!0),e?(c.isMultiple||c.deselect(Object.keys(c.selected)[0]),c.select(s.hashKey,s.value)):c.deselect(s.hashKey),c.refreshViewValue())})}),e.attach(i,o),d(),i.$on("$destroy",function(){c.removeOption(s.hashKey,s)})}function l(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}return l.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:l,compile:i}}function l(){function e(e,n){function i(){return e.parent().find("md-select-header").length}function o(){var i=e.find("label");i.length||(i=t.element("<label>"),e.prepend(i)),i.addClass("md-container-ignore"),n.label&&i.text(n.label)}i()||o()}return{restrict:"E",compile:e}}function a(){return{restrict:"E"}}function d(i){function o(i,o,c,u,p,f,m,h,g){function v(e,t,n){function i(){return m(t,{addClass:"md-leave"}).start()}function o(){t.removeClass("md-active"),t.attr("aria-hidden","true"),t[0].style.display="none",$(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}return n=n||{},n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?o():i().then(o)}function b(e,r,l){function a(e,t,n){return n.parent.append(t),p(function(e,n){try{m(t,{removeClass:"md-leave",duration:0}).start().then(d).then(e)}catch(i){n(i)}})}function d(){return p(function(t){if(l.isRemoved)return p.reject(!1);var n=y(e,r,l);n.container.element.css(C.toCss(n.container.styles)),n.dropDown.element.css(C.toCss(n.dropDown.styles)),f(function(){r.addClass("md-active"),n.dropDown.element.css(C.toCss({transform:""})),v(l.focusedNode),t()})})}function s(e,t,n){return n.disableParentScroll&&!c.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=c.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1,n.hasBackdrop&&(n.backdrop=c.createBackdrop(e,"md-select-backdrop md-click-catcher"),h.enter(n.backdrop,g[0].body,null,{duration:0})),function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll(),delete n.restoreScroll}}function v(e){e&&!e.hasAttribute("disabled")&&e.focus()}function b(e,n){var i=r.find("md-select-menu");if(!n.target)throw new Error(c.supplant(w,[n.target]));t.extend(n,{isRemoved:!1,target:t.element(n.target),parent:t.element(n.parent),selectEl:i,contentEl:r.find("md-content"),optionNodes:i[0].getElementsByTagName("md-option")})}function $(){var n=function(e,t,n){return function(){if(!n.isRemoved){var i=y(e,t,n),o=i.container,r=i.dropDown;o.element.css(C.toCss(o.styles)),r.element.css(C.toCss(r.styles))}}}(e,r,l),i=t.element(u);return i.on("resize",n),i.on("orientationchange",n),function(){i.off("resize",n),i.off("orientationchange",n)}}function k(){l.loadingAsync&&!l.isRemoved&&(e.$$loadingAsyncDone=!1,p.when(l.loadingAsync).then(function(){e.$$loadingAsyncDone=!0,delete l.loadingAsync}).then(function(){f(d)}))}function x(){function e(e){e.preventDefault(),e.stopPropagation(),l.restoreFocus=!1,c.nextTick(i.hide,!0)}function t(e){switch(e.preventDefault(),e.stopPropagation(),e.keyCode){case M.UP_ARROW:return s();case M.DOWN_ARROW:return d();case M.SPACE:case M.ENTER:var t=c.getClosest(e.target,"md-option");t&&(p.triggerHandler({type:"click",target:t}),e.preventDefault()),u(e);break;case M.TAB:case M.ESCAPE:e.stopPropagation(),e.preventDefault(),l.restoreFocus=!0,c.nextTick(i.hide,!0);break;default:if(o.isInputKey(e)||o.isNumPadKey(e)){var n=p.controller("mdSelectMenu").optNodeForKeyboardSearch(e);l.focusedNode=n||l.focusedNode,n&&n.focus()}}}function a(e){var t,i=c.nodesToArray(l.optionNodes),o=i.indexOf(l.focusedNode);do o===-1?o=0:"next"===e&&o<i.length-1?o++:"prev"===e&&o>0&&o--,t=i[o],t.hasAttribute("disabled")&&(t=n);while(!t&&o<i.length-1&&o>0);t&&t.focus(),l.focusedNode=t}function d(){a("next")}function s(){a("prev")}function u(e){function t(){var t=!1;if(e&&e.currentTarget.children.length>0){var n=e.currentTarget.children[0],i=n.scrollHeight>n.clientHeight;if(i&&n.children.length>0){var o=e.pageX-e.currentTarget.getBoundingClientRect().left;o>n.querySelector("md-option").offsetWidth&&(t=!0)}}return t}if(!(e&&"click"==e.type&&e.currentTarget!=p[0]||t())){var n=c.getClosest(e.target,"md-option");n&&n.hasAttribute&&!n.hasAttribute("disabled")&&(e.preventDefault(),e.stopPropagation(),f.isMultiple||(l.restoreFocus=!0,c.nextTick(function(){i.hide(f.ngModel.$viewValue)},!0)))}}if(!l.isRemoved){var p=l.selectEl,f=p.controller("mdSelectMenu")||{};return r.addClass("md-clickable"),l.backdrop&&l.backdrop.on("click",e),p.on("keydown",t),p.on("click",u),function(){l.backdrop&&l.backdrop.off("click",e),p.off("keydown",t),p.off("click",u),r.removeClass("md-clickable"),l.isRemoved=!0}}}return k(),b(e,l),l.hideBackdrop=s(e,r,l),a(e,r,l).then(function(e){return r.attr("aria-hidden","false"),l.alreadyOpen=!0,l.cleanupInteraction=x(),l.cleanupResizing=$(),e},l.hideBackdrop)}function $(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}function y(n,i,o){var p,f=i[0],m=o.target[0].children[0],h=g[0].body,v=o.selectEl[0],b=o.contentEl[0],$=h.getBoundingClientRect(),y=m.getBoundingClientRect(),w=!1,C={left:$.left+s,top:s,bottom:$.height-s,right:$.width-s-(c.floatingScrollbars()?16:0)},M={top:y.top-C.top,left:y.left-C.left,right:C.right-(y.left+y.width),bottom:C.bottom-(y.top+y.height)},k=$.width-2*s,x=v.querySelector("md-option[selected]"),S=v.getElementsByTagName("md-option"),A=v.getElementsByTagName("md-optgroup"),O=d(i,b),E=r(o.loadingAsync);p=E?b.firstElementChild||b:x?x:A.length?A[0]:S.length?S[0]:b.firstElementChild||b,b.offsetWidth>k?b.style["max-width"]=k+"px":b.style.maxWidth=null,w&&(b.style["min-width"]=y.width+"px"),O&&v.classList.add("md-overflow");var D=p;"MD-OPTGROUP"===(D.tagName||"").toUpperCase()&&(D=S[0]||b.firstElementChild||b,p=D),o.focusedNode=D,f.style.display="block";var T=v.getBoundingClientRect(),R=a(p);if(p){var P=u.getComputedStyle(p);R.paddingLeft=parseInt(P.paddingLeft,10)||0,R.paddingRight=parseInt(P.paddingRight,10)||0}if(O){var V=b.offsetHeight/2;b.scrollTop=R.top+R.height/2-V,M.top<V?b.scrollTop=Math.min(R.top,b.scrollTop+V-M.top):M.bottom<V&&(b.scrollTop=Math.max(R.top+R.height-T.height,b.scrollTop-V+M.bottom))}var B,N,I,L,_;w?(B=y.left,N=y.top+y.height,I="50% 0",N+T.height>C.bottom&&(N=y.top-T.height,I="50% 100%")):(B=y.left+R.left-R.paddingLeft+2,N=Math.floor(y.top+y.height/2-R.height/2-R.top+b.scrollTop)+2,I=R.left+y.width/2+"px "+(R.top+R.height/2-b.scrollTop)+"px 0px",L=Math.min(y.width+R.paddingLeft+R.paddingRight,k),_=e.getComputedStyle(m)["font-size"]);var j=f.getBoundingClientRect(),K=Math.round(100*Math.min(y.width/T.width,1))/100,q=Math.round(100*Math.min(y.height/T.height,1))/100;return{container:{element:t.element(f),styles:{left:Math.floor(l(C.left,B,C.right-j.width)),top:Math.floor(l(C.top,N,C.bottom-j.height)),"min-width":L,"font-size":_}},dropDown:{element:t.element(v),styles:{transformOrigin:I,transform:o.alreadyOpen?"":c.supplant("scale({0},{1})",[K,q])}}}}var w="$mdSelect.show() expected a target element in options.target but got '{0}'!",C=c.dom.animator,M=o.KEY_CODE;return{parent:"body",themable:!0,onShow:b,onRemove:v,hasBackdrop:!0,disableParentScroll:!0}}function r(e){return e&&t.isFunction(e.then)}function l(e,t,n){return Math.max(e,Math.min(t,n))}function a(e){return e?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}function d(e,t){var n=!1;try{var i=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=i}finally{}return n}return o.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],i("$mdSelect").setDefaults({methods:["target"],options:o})}var s=8,c=0,u=t.element('<div class="md-container"><div class="md-icon"></div></div>');t.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",i).directive("mdSelectMenu",o).directive("mdOption",r).directive("mdOptgroup",l).directive("mdSelectHeader",a).provider("$mdSelect",d),i.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$compile","$parse"],o.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"],r.$inject=["$mdButtonInkRipple","$mdUtil"],d.$inject=["$$interimElementProvider"]}(window,window.angular);
{
"name": "angular-material-showHide",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -27,3 +27,3 @@ (function( window, angular, undefined ){

function createDirective(name, targetValue) {
return ['$mdUtil', function($mdUtil) {
return ['$mdUtil', '$window', function($mdUtil, $window) {
return {

@@ -36,2 +36,6 @@ restrict: 'A',

var node = $element[0];
var cachedTransitionStyles = node.nodeType === $window.Node.ELEMENT_NODE ?
$window.getComputedStyle(node) : {};
$scope.$watch($attr[name], function(value) {

@@ -42,3 +46,8 @@ if (!!value === targetValue) {

});
$mdUtil.dom.animator.waitTransitionEnd($element).then(function() {
var opts = {
cachedTransitionStyles: cachedTransitionStyles
};
$mdUtil.dom.animator.waitTransitionEnd($element, opts).then(function() {
$scope.$broadcast('$md-resize');

@@ -53,2 +62,3 @@ });

}
})(window, window.angular);

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(n,i,t){"use strict";function e(n,i){return["$mdUtil",function(t){return{restrict:"A",multiElement:!0,link:function(e,o,r){var c=e.$on("$md-resize-enable",function(){c(),e.$watch(r[n],function(n){!!n===i&&(t.nextTick(function(){e.$broadcast("$md-resize")}),t.dom.animator.waitTransitionEnd(o).then(function(){e.$broadcast("$md-resize")}))})})}}}]}i.module("material.components.showHide",["material.core"]).directive("ngShow",e("ngShow",!0)).directive("ngHide",e("ngHide",!1))}(window,window.angular);
!function(n,e,i){"use strict";function t(n,e){return["$mdUtil","$window",function(i,t){return{restrict:"A",multiElement:!0,link:function(o,r,a){var d=o.$on("$md-resize-enable",function(){d();var c=r[0],u=c.nodeType===t.Node.ELEMENT_NODE?t.getComputedStyle(c):{};o.$watch(a[n],function(n){if(!!n===e){i.nextTick(function(){o.$broadcast("$md-resize")});var t={cachedTransitionStyles:u};i.dom.animator.waitTransitionEnd(r,t).then(function(){o.$broadcast("$md-resize")})}})})}}}]}e.module("material.components.showHide",["material.core"]).directive("ngShow",t("ngShow",!0)).directive("ngHide",t("ngHide",!1))}(window,window.angular);
{
"name": "angular-material-sidenav",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-backdrop": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-backdrop": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -74,2 +74,7 @@ (function( window, angular, undefined ){

* $mdSidenav(componentId).isLockedOpen();
* // On close callback to handle close, backdrop click or escape key pressed
* // Callback happens BEFORE the close action occurs.
* $mdSidenav(componentId).onClose(function () {
* $log.debug('closing');
* });
* </hljs>

@@ -117,2 +122,3 @@ */

close : rejectFn,
onClose : angular.noop,
then : function(callback) {

@@ -243,3 +249,3 @@ return waitForInstance(handle)

*
* The $mdMedia() servic e is exposed to the is-locked-open attribute, which
* The $mdMedia() service is exposed to the is-locked-open attribute, which
* can be given a media query or one of the `sm`, `gt-sm`, `md`, `gt-md`, `lg` or `gt-lg` presets.

@@ -260,3 +266,3 @@ * Examples:

compile: function(element) {
element.addClass('_md-closed');
element.addClass('md-closed');
element.attr('tabIndex', '-1');

@@ -274,2 +280,3 @@ return postLink;

var triggeringElement = null;
var previousContainerStyles;
var promise = $q.when(true);

@@ -289,3 +296,3 @@ var isLockedOpenParsed = $parse(attr.mdIsLockedOpen);

if (!angular.isDefined(attr.mdDisableBackdrop)) {
backdrop = $mdUtil.createBackdrop(scope, "_md-sidenav-backdrop md-opaque ng-enter");
backdrop = $mdUtil.createBackdrop(scope, "md-sidenav-backdrop md-opaque ng-enter");
}

@@ -323,8 +330,8 @@

if (isLocked === oldValue) {
element.toggleClass('_md-locked-open', !!isLocked);
element.toggleClass('md-locked-open', !!isLocked);
} else {
$animate[isLocked ? 'addClass' : 'removeClass'](element, '_md-locked-open');
$animate[isLocked ? 'addClass' : 'removeClass'](element, 'md-locked-open');
}
if (backdrop) {
backdrop.toggleClass('_md-locked-open', !!isLocked);
backdrop.toggleClass('md-locked-open', !!isLocked);
}

@@ -345,2 +352,4 @@ }

var restorePositioning = updateContainerPositions(parent, isOpen);
if ( isOpen ) {

@@ -354,14 +363,58 @@ // Capture upon opening..

return promise = $q.all([
isOpen && backdrop ? $animate.enter(backdrop, parent) :
backdrop ? $animate.leave(backdrop) : $q.when(true),
$animate[isOpen ? 'removeClass' : 'addClass'](element, '_md-closed')
])
.then(function() {
// Perform focus when animations are ALL done...
if (scope.isOpen) {
focusEl && focusEl.focus();
}
});
isOpen && backdrop ? $animate.enter(backdrop, parent) : backdrop ?
$animate.leave(backdrop) : $q.when(true),
$animate[isOpen ? 'removeClass' : 'addClass'](element, 'md-closed')
]).then(function() {
// Perform focus when animations are ALL done...
if (scope.isOpen) {
focusEl && focusEl.focus();
}
// Restores the positioning on the sidenav and backdrop.
restorePositioning && restorePositioning();
});
}
function updateContainerPositions(parent, willOpen) {
var drawerEl = element[0];
var scrollTop = parent[0].scrollTop;
if (willOpen && scrollTop) {
previousContainerStyles = {
top: drawerEl.style.top,
bottom: drawerEl.style.bottom,
height: drawerEl.style.height
};
// When the parent is scrolled down, then we want to be able to show the sidenav at the current scroll
// position. We're moving the sidenav down to the correct scroll position and apply the height of the
// parent, to increase the performance. Using 100% as height, will impact the performance heavily.
var positionStyle = {
top: scrollTop + 'px',
bottom: 'auto',
height: parent[0].clientHeight + 'px'
};
// Apply the new position styles to the sidenav and backdrop.
element.css(positionStyle);
backdrop.css(positionStyle);
}
// When the sidenav is closing and we have previous defined container styles,
// then we return a restore function, which resets the sidenav and backdrop.
if (!willOpen && previousContainerStyles) {
return function() {
drawerEl.style.top = previousContainerStyles.top;
drawerEl.style.bottom = previousContainerStyles.bottom;
drawerEl.style.height = previousContainerStyles.height;
backdrop[0].style.top = null;
backdrop[0].style.bottom = null;
backdrop[0].style.height = null;
previousContainerStyles = null;
}
}
}
/**

@@ -398,2 +451,4 @@ * Prevent parent scrolling (when the SideNav is open)

} else {
if (scope.isOpen && sidenavCtrl.onCloseCb) sidenavCtrl.onCloseCb();
return $q(function(resolve){

@@ -463,2 +518,8 @@ // Toggle value to force an async `updateIsOpen()` to run

// Synchronous setters
self.onClose = function (callback) {
self.onCloseCb = callback;
return self;
};
// Async actions

@@ -465,0 +526,0 @@ self.open = function() { return self.$toggleOpen( true ); };

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(n,e,t){"use strict";function o(n,o,r,i){function d(n,t){var i=function(){return!1},d=function(){return r.when(o.supplant(a,[t||""]))};return e.extend({isLockedOpen:i,isOpen:i,toggle:d,open:d,close:d,then:function(n){return s(t).then(n||e.noop)}},n)}function c(e,r){var d=n.get(e);return d||r?d:(i.error(o.supplant(a,[e||""])),t)}function s(e){return n.when(e)["catch"](i.error)}var a="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",u={find:c,waitFor:s};return function(n,t){if(e.isUndefined(n))return u;var o=t===!0,r=u.find(n,o);return!r&&o?u.waitFor(n):!r&&e.isUndefined(t)?d(u,n):r}}function r(){return{restrict:"A",require:"^mdSidenav",link:function(n,e,t,o){}}}function i(n,o,r,i,d,c,s,a,u,l){function f(c,f,p,m){function $(n,e){c.isLockedOpen=n,n===e?f.toggleClass("_md-locked-open",!!n):d[n?"addClass":"removeClass"](f,"_md-locked-open"),C&&C.toggleClass("_md-locked-open",!!n)}function v(n){var e=o.findFocusTarget(f)||o.findFocusTarget(f,"[md-sidenav-focus]")||f,t=f.parent();return t[n?"on":"off"]("keydown",w),C&&C[n?"on":"off"]("click",h),n&&(y=l[0].activeElement),g(n),S=u.all([n&&C?d.enter(C,t):C?d.leave(C):u.when(!0),d[n?"removeClass":"addClass"](f,"_md-closed")]).then(function(){c.isOpen&&e&&e.focus()})}function g(n){var o=f.parent();n&&!k?(k=o.css("overflow"),o.css("overflow","hidden")):e.isDefined(k)&&(o.css("overflow",k),k=t)}function O(n){return c.isOpen==n?u.when(!0):u(function(e){c.isOpen=n,o.nextTick(function(){S.then(function(n){c.isOpen||(y&&y.focus(),y=null),e(n)})})})}function w(n){var e=n.keyCode===r.KEY_CODE.ESCAPE;return e?h(n):u.when(!0)}function h(n){return n.preventDefault(),m.close()}var k,C,y=null,S=u.when(!0),_=s(p.mdIsLockedOpen),D=function(){return _(c.$parent,{$media:function(e){return a.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),n(e)},$mdMedia:n})};e.isDefined(p.mdDisableBackdrop)||(C=o.createBackdrop(c,"_md-sidenav-backdrop md-opaque ng-enter")),f.addClass("_md"),i(f),C&&i.inherit(C,f),f.on("$destroy",function(){C&&C.remove(),m.destroy()}),c.$on("$destroy",function(){C&&C.remove()}),c.$watch(D,$),c.$watch("isOpen",v),m.$toggleOpen=O}return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(n){return n.addClass("_md-closed"),n.attr("tabIndex","-1"),f}}}function d(n,e,t,o,r){var i=this;i.isOpen=function(){return!!n.isOpen},i.isLockedOpen=function(){return!!n.isLockedOpen},i.open=function(){return i.$toggleOpen(!0)},i.close=function(){return i.$toggleOpen(!1)},i.toggle=function(){return i.$toggleOpen(!n.isOpen)},i.$toggleOpen=function(e){return r.when(n.isOpen=e)},i.destroy=o.register(i,t.mdComponentId)}e.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",o).directive("mdSidenav",i).directive("mdSidenavFocus",r).controller("$mdSidenavController",d),o.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],i.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$animate","$compile","$parse","$log","$q","$document"],d.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"]}(window,window.angular);
!function(e,n,t){"use strict";function o(e,o,i,r){function s(e,t){var r=function(){return!1},s=function(){return i.when(o.supplant(l,[t||""]))};return n.extend({isLockedOpen:r,isOpen:r,toggle:s,open:s,close:s,onClose:n.noop,then:function(e){return d(t).then(e||n.noop)}},e)}function c(n,i){var s=e.get(n);return s||i?s:(r.error(o.supplant(l,[n||""])),t)}function d(n){return e.when(n)["catch"](r.error)}var l="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",u={find:c,waitFor:d};return function(e,t){if(n.isUndefined(e))return u;var o=t===!0,i=u.find(e,o);return!i&&o?u.waitFor(e):!i&&n.isUndefined(t)?s(u,e):i}}function i(){return{restrict:"A",require:"^mdSidenav",link:function(e,n,t,o){}}}function r(e,o,i,r,s,c,d,l,u,a){function p(c,p,f,m){function $(e,n){c.isLockedOpen=e,e===n?p.toggleClass("md-locked-open",!!e):s[e?"addClass":"removeClass"](p,"md-locked-open"),k&&k.toggleClass("md-locked-open",!!e)}function g(e){var n=o.findFocusTarget(p)||o.findFocusTarget(p,"[md-sidenav-focus]")||p,t=p.parent();t[e?"on":"off"]("keydown",O),k&&k[e?"on":"off"]("click",w);var i=v(t,e);return e&&(S=a[0].activeElement),h(e),D=u.all([e&&k?s.enter(k,t):k?s.leave(k):u.when(!0),s[e?"removeClass":"addClass"](p,"md-closed")]).then(function(){c.isOpen&&n&&n.focus(),i&&i()})}function v(e,n){var t=p[0],o=e[0].scrollTop;if(n&&o){b={top:t.style.top,bottom:t.style.bottom,height:t.style.height};var i={top:o+"px",bottom:"auto",height:e[0].clientHeight+"px"};p.css(i),k.css(i)}if(!n&&b)return function(){t.style.top=b.top,t.style.bottom=b.bottom,t.style.height=b.height,k[0].style.top=null,k[0].style.bottom=null,k[0].style.height=null,b=null}}function h(e){var o=p.parent();e&&!y?(y=o.css("overflow"),o.css("overflow","hidden")):n.isDefined(y)&&(o.css("overflow",y),y=t)}function C(e){return c.isOpen==e?u.when(!0):(c.isOpen&&m.onCloseCb&&m.onCloseCb(),u(function(n){c.isOpen=e,o.nextTick(function(){D.then(function(e){c.isOpen||(S&&S.focus(),S=null),n(e)})})}))}function O(e){var n=e.keyCode===i.KEY_CODE.ESCAPE;return n?w(e):u.when(!0)}function w(e){return e.preventDefault(),m.close()}var y,k,b,S=null,D=u.when(!0),E=d(f.mdIsLockedOpen),q=function(){return E(c.$parent,{$media:function(n){return l.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),e(n)},$mdMedia:e})};n.isDefined(f.mdDisableBackdrop)||(k=o.createBackdrop(c,"md-sidenav-backdrop md-opaque ng-enter")),p.addClass("_md"),r(p),k&&r.inherit(k,p),p.on("$destroy",function(){k&&k.remove(),m.destroy()}),c.$on("$destroy",function(){k&&k.remove()}),c.$watch(q,$),c.$watch("isOpen",g),m.$toggleOpen=C}return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed"),e.attr("tabIndex","-1"),p}}}function s(e,n,t,o,i){var r=this;r.isOpen=function(){return!!e.isOpen},r.isLockedOpen=function(){return!!e.isLockedOpen},r.onClose=function(e){return r.onCloseCb=e,r},r.open=function(){return r.$toggleOpen(!0)},r.close=function(){return r.$toggleOpen(!1)},r.toggle=function(){return r.$toggleOpen(!e.isOpen)},r.$toggleOpen=function(n){return i.when(e.isOpen=n)},r.destroy=o.register(r,t.mdComponentId)}n.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",o).directive("mdSidenav",r).directive("mdSidenavFocus",i).controller("$mdSidenavController",s),o.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],r.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$animate","$compile","$parse","$log","$q","$document"],s.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"]}(window,window.angular);
{
"name": "angular-material-slider",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -40,2 +40,3 @@ (function( window, angular, undefined ){

var slider = elem.find('md-slider');
if (!slider) {

@@ -84,15 +85,18 @@ return;

ctrl.fitInputWidthToTextLength = function (length) {
var input = element.find('md-input-container');
var computedStyle = getComputedStyle(input[0]);
var minWidth = parseInt(computedStyle['min-width']);
var padding = parseInt(computedStyle['padding']) * 2;
initialMaxWidth = initialMaxWidth || parseInt(computedStyle['max-width']);
var input = element[0].querySelector('md-input-container');
var newMaxWidth = Math.max(initialMaxWidth, minWidth + padding + (minWidth / 2 * length));
if (input) {
var computedStyle = getComputedStyle(input);
var minWidth = parseInt(computedStyle.minWidth);
var padding = parseInt(computedStyle.padding) * 2;
input.css('max-width', newMaxWidth + 'px');
initialMaxWidth = initialMaxWidth || parseInt(computedStyle.maxWidth);
var newMaxWidth = Math.max(initialMaxWidth, minWidth + padding + (minWidth / 2 * length));
input.style.maxWidth = newMaxWidth + 'px';
}
};
}
};
}
}
};
}

@@ -132,4 +136,10 @@

* </hljs>
* <h4>Invert Mode</h4>
* <hljs lang="html">
* <md-slider md-invert ng-model="myValue" step="10" min="10" max="130">
* </md-slider>
* </hljs>
*
* @param {boolean=} md-discrete Whether to enable discrete mode.
* @param {boolean=} md-invert Whether to enable invert mode.
* @param {number=} step The distance between values the user is allowed to pick. Default 1.

@@ -145,17 +155,17 @@ * @param {number=} min The minimum value the user is allowed to pick. Default 0.

template:
'<div class="_md-slider-wrapper">' +
'<div class="_md-slider-content">' +
'<div class="_md-track-container">' +
'<div class="_md-track"></div>' +
'<div class="_md-track _md-track-fill"></div>' +
'<div class="_md-track-ticks"></div>' +
'<div class="md-slider-wrapper">' +
'<div class="md-slider-content">' +
'<div class="md-track-container">' +
'<div class="md-track"></div>' +
'<div class="md-track md-track-fill"></div>' +
'<div class="md-track-ticks"></div>' +
'</div>' +
'<div class="_md-thumb-container">' +
'<div class="_md-thumb"></div>' +
'<div class="_md-focus-thumb"></div>' +
'<div class="_md-focus-ring"></div>' +
'<div class="_md-sign">' +
'<span class="_md-thumb-text"></span>' +
'<div class="md-thumb-container">' +
'<div class="md-thumb"></div>' +
'<div class="md-focus-thumb"></div>' +
'<div class="md-focus-ring"></div>' +
'<div class="md-sign">' +
'<span class="md-thumb-text"></span>' +
'</div>' +
'<div class="_md-disabled-thumb"></div>' +
'<div class="md-disabled-thumb"></div>' +
'</div>' +

@@ -172,3 +182,3 @@ '</div>' +

function compile (tElement, tAttrs) {
var wrapper = angular.element(tElement[0].getElementsByClassName('_md-slider-wrapper'));
var wrapper = angular.element(tElement[0].getElementsByClassName('md-slider-wrapper'));

@@ -207,10 +217,10 @@ var tabIndex = tAttrs.tabindex || 0;

var thumb = angular.element(element[0].querySelector('._md-thumb'));
var thumbText = angular.element(element[0].querySelector('._md-thumb-text'));
var thumb = angular.element(element[0].querySelector('.md-thumb'));
var thumbText = angular.element(element[0].querySelector('.md-thumb-text'));
var thumbContainer = thumb.parent();
var trackContainer = angular.element(element[0].querySelector('._md-track-container'));
var activeTrack = angular.element(element[0].querySelector('._md-track-fill'));
var tickContainer = angular.element(element[0].querySelector('._md-track-ticks'));
var wrapper = angular.element(element[0].getElementsByClassName('_md-slider-wrapper'));
var content = angular.element(element[0].getElementsByClassName('_md-slider-content'));
var trackContainer = angular.element(element[0].querySelector('.md-track-container'));
var activeTrack = angular.element(element[0].querySelector('.md-track-fill'));
var tickContainer = angular.element(element[0].querySelector('.md-track-ticks'));
var wrapper = angular.element(element[0].getElementsByClassName('md-slider-wrapper'));
var content = angular.element(element[0].getElementsByClassName('md-slider-content'));
var throttledRefreshDimensions = $mdUtil.throttle(refreshSliderDimensions, 5000);

@@ -222,2 +232,3 @@

var discrete = angular.isDefined(attr.mdDiscrete);
var invert = angular.isDefined(attr.mdInvert);
angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(0);

@@ -377,2 +388,3 @@ angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(100);

}
changeAmount = invert ? -changeAmount : changeAmount;
if (changeAmount) {

@@ -409,3 +421,3 @@ if (ev.metaKey || ev.ctrlKey || ev.altKey) {

wrapper.removeClass('md-focused');
element.removeClass('_md-active');
element.removeClass('md-active');
clearTicks();

@@ -427,3 +439,3 @@ }

var percent = (ngModelCtrl.$viewValue - min) / (max - min);
var percent = valueToPercent(ngModelCtrl.$viewValue);
scope.modelValue = ngModelCtrl.$viewValue;

@@ -467,8 +479,16 @@ element.attr('aria-valuenow', ngModelCtrl.$viewValue);

var thumbPosition = (percent * 100) + '%';
var activeTrackPercent = invert ? (1 - percent) * 100 + '%' : thumbPosition;
thumbContainer.css(vertical ? 'bottom' : 'left', thumbPosition);
activeTrack.css(vertical ? 'height' : 'width', thumbPosition);
if (vertical) {
thumbContainer.css('bottom', thumbPosition);
}
else {
$mdUtil.bidiProperty(thumbContainer, 'left', 'right', thumbPosition);
}
element.toggleClass('_md-min', percent === 0);
element.toggleClass('_md-max', percent === 1);
activeTrack.css(vertical ? 'height' : 'width', activeTrackPercent);
element.toggleClass((invert ? 'md-max' : 'md-min'), percent === 0);
element.toggleClass((invert ? 'md-min' : 'md-max'), percent === 1);
}

@@ -484,3 +504,3 @@

element.addClass('_md-active');
element.addClass('md-active');
element[0].focus();

@@ -499,3 +519,3 @@ refreshSliderDimensions();

element.removeClass('_md-dragging');
element.removeClass('md-dragging');

@@ -515,3 +535,3 @@ var exactVal = percentToValue( positionToPercent( vertical ? ev.pointer.y : ev.pointer.x ));

element.addClass('_md-dragging');
element.addClass('md-dragging');
setSliderFromEvent(ev);

@@ -577,2 +597,6 @@ }

if (!vertical && $mdUtil.bidi() === 'rtl') {
calc = 1 - calc;
}
return Math.max(0, Math.min(1, vertical ? 1 - calc : calc));

@@ -587,7 +611,9 @@ }

function percentToValue( percent ) {
return (min + percent * (max - min));
var adjustedPercent = invert ? (1 - percent) : percent;
return (min + adjustedPercent * (max - min));
}
function valueToPercent( val ) {
return (val - min)/(max - min);
var percent = (val - min) / (max - min);
return invert ? (1 - percent) : percent;
}

@@ -594,0 +620,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function i(){return{controller:function(){},compile:function(e){var i=e.find("md-slider");if(i){var a=i.attr("md-vertical");return a!==n&&e.attr("md-vertical",""),i.attr("flex")||i.attr("flex",""),function(e,n,i,a){function r(e){n.children().attr("disabled",e),n.find("input").attr("disabled",e)}n.addClass("_md");var o=t.noop;i.disabled?r(!0):i.ngDisabled&&(o=e.$watch(i.ngDisabled,function(e){r(e)})),e.$on("$destroy",function(){o()});var d;a.fitInputWidthToTextLength=function(e){var t=n.find("md-input-container"),i=getComputedStyle(t[0]),a=parseInt(i["min-width"]),r=2*parseInt(i.padding);d=d||parseInt(i["max-width"]);var o=Math.max(d,a+r+a/2*e);t.css("max-width",o+"px")}}}}}}function a(e,n,i,a,r,o,d,s,l,u){function c(e,n){var a=t.element(e[0].getElementsByClassName("_md-slider-wrapper")),r=n.tabindex||0;return a.attr("tabindex",r),(n.disabled||n.ngDisabled)&&a.attr("tabindex",-1),a.attr("role","slider"),i.expect(e,"aria-label"),m}function m(i,c,m,f){function v(){C(),M()}function h(e){de=parseFloat(e),c.attr("aria-valuemin",e),v()}function p(e){se=parseFloat(e),c.attr("aria-valuemax",e),v()}function g(e){le=parseFloat(e)}function $(e){ue=A(parseInt(e),0,6)}function w(){c.attr("aria-disabled",!!G())}function b(){if(ae&&!G()&&!t.isUndefined(le)){if(0>=le){var e="Slider step value must be greater than zero when in discrete mode";throw l.error(e),new Error(e)}var i=Math.floor((se-de)/le);ce||(ce=t.element("<canvas>").css("position","absolute"),Z.append(ce),me=ce[0].getContext("2d"));var a=x();!a||a.height||a.width||(C(),a=fe),ce[0].width=a.width,ce[0].height=a.height;for(var r,o=0;i>=o;o++){var d=n.getComputedStyle(Z[0]);me.fillStyle=d.color||"black",r=Math.floor((ie?a.height:a.width)*(o/i)),me.fillRect(ie?0:r-1,ie?r-1:0,ie?a.width:2,ie?2:a.height)}}}function _(){if(ce&&me){var e=x();me.clearRect(0,0,e.width,e.height)}}function C(){fe=Q[0].getBoundingClientRect()}function x(){return te(),fe}function y(e){if(!G()){var t;(ie?e.keyCode===r.KEY_CODE.DOWN_ARROW:e.keyCode===r.KEY_CODE.LEFT_ARROW)?t=-le:(ie?e.keyCode===r.KEY_CODE.UP_ARROW:e.keyCode===r.KEY_CODE.RIGHT_ARROW)&&(t=le),t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),i.$evalAsync(function(){E(Y.$viewValue+t)}))}}function D(){b(),i.mouseActive=!0,ee.removeClass("md-focused"),u(function(){i.mouseActive=!1},100)}function V(){i.mouseActive===!1&&ee.addClass("md-focused")}function k(){ee.removeClass("md-focused"),c.removeClass("_md-active"),_()}function E(e){Y.$setViewValue(A(S(e)))}function M(){isNaN(Y.$viewValue)&&(Y.$viewValue=Y.$modelValue),Y.$viewValue=A(Y.$viewValue);var e=(Y.$viewValue-de)/(se-de);i.modelValue=Y.$viewValue,c.attr("aria-valuenow",Y.$viewValue),R(e),H.text(Y.$viewValue)}function A(e,n,i){return t.isNumber(e)?(n=t.isNumber(n)?n:de,i=t.isNumber(i)?i:se,Math.max(n,Math.min(i,e))):void 0}function S(e){if(t.isNumber(e)){var n=Math.round((e-de)/le)*le+de;return n=Math.round(n*Math.pow(10,ue))/Math.pow(10,ue),U&&U.fitInputWidthToTextLength&&a.debounce(function(){U.fitInputWidthToTextLength(n.toString().length)},100)(),n}}function R(e){e=F(e);var t=100*e+"%";J.css(ie?"bottom":"left",t),X.css(ie?"height":"width",t),c.toggleClass("_md-min",0===e),c.toggleClass("_md-max",1===e)}function N(e){if(!G()){c.addClass("_md-active"),c[0].focus(),C();var t=z(P(ie?e.pointer.y:e.pointer.x)),n=A(S(t));i.$apply(function(){E(n),R(B(n))})}}function T(e){if(!G()){c.removeClass("_md-dragging");var t=z(P(ie?e.pointer.y:e.pointer.x)),n=A(S(t));i.$apply(function(){E(n),M()})}}function O(e){G()||(ve=!0,e.stopPropagation(),c.addClass("_md-dragging"),K(e))}function I(e){ve&&(e.stopPropagation(),K(e))}function W(e){ve&&(e.stopPropagation(),ve=!1)}function K(e){ae?q(ie?e.pointer.y:e.pointer.x):L(ie?e.pointer.y:e.pointer.x)}function L(e){i.$evalAsync(function(){E(z(P(e)))})}function q(e){var t=z(P(e)),n=A(S(t));R(P(e)),H.text(n)}function F(e){return Math.max(0,Math.min(e||0,1))}function P(e){var t=ie?fe.top:fe.left,n=ie?fe.height:fe.width,i=(e-t)/n;return Math.max(0,Math.min(1,ie?1-i:i))}function z(e){return de+e*(se-de)}function B(e){return(e-de)/(se-de)}o(c);var Y=f[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},U=f[1],G=(t.element(a.getClosest(c,"_md-slider-container",!0)),m.ngDisabled?t.bind(null,s(m.ngDisabled),i.$parent):function(){return c[0].hasAttribute("disabled")}),j=t.element(c[0].querySelector("._md-thumb")),H=t.element(c[0].querySelector("._md-thumb-text")),J=j.parent(),Q=t.element(c[0].querySelector("._md-track-container")),X=t.element(c[0].querySelector("._md-track-fill")),Z=t.element(c[0].querySelector("._md-track-ticks")),ee=t.element(c[0].getElementsByClassName("_md-slider-wrapper")),te=(t.element(c[0].getElementsByClassName("_md-slider-content")),a.throttle(C,5e3)),ne=3,ie=t.isDefined(m.mdVertical),ae=t.isDefined(m.mdDiscrete);t.isDefined(m.min)?m.$observe("min",h):h(0),t.isDefined(m.max)?m.$observe("max",p):p(100),t.isDefined(m.step)?m.$observe("step",g):g(1),t.isDefined(m.round)?m.$observe("round",$):$(ne);var re=t.noop;m.ngDisabled&&(re=i.$parent.$watch(m.ngDisabled,w)),d.register(ee,"drag",{horizontal:!ie}),i.mouseActive=!1,ee.on("keydown",y).on("mousedown",D).on("focus",V).on("blur",k).on("$md.pressdown",N).on("$md.pressup",T).on("$md.dragstart",O).on("$md.drag",I).on("$md.dragend",W),setTimeout(v,0);var oe=e.throttle(v);t.element(n).on("resize",oe),i.$on("$destroy",function(){t.element(n).off("resize",oe)}),Y.$render=M,Y.$viewChangeListeners.push(M),Y.$formatters.push(A),Y.$formatters.push(S);var de,se,le,ue,ce,me,fe={};C();var ve=!1}return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="_md-slider-wrapper"><div class="_md-slider-content"><div class="_md-track-container"><div class="_md-track"></div><div class="_md-track _md-track-fill"></div><div class="_md-track-ticks"></div></div><div class="_md-thumb-container"><div class="_md-thumb"></div><div class="_md-focus-thumb"></div><div class="_md-focus-ring"></div><div class="_md-sign"><span class="_md-thumb-text"></span></div><div class="_md-disabled-thumb"></div></div></div></div>',compile:c}}t.module("material.components.slider",["material.core"]).directive("mdSlider",a).directive("mdSliderContainer",i),a.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"]}(window,window.angular);
!function(e,t,i){"use strict";function n(){return{controller:function(){},compile:function(e){var n=e.find("md-slider");if(n){var a=n.attr("md-vertical");return a!==i&&e.attr("md-vertical",""),n.attr("flex")||n.attr("flex",""),function(e,i,n,a){function r(e){i.children().attr("disabled",e),i.find("input").attr("disabled",e)}i.addClass("_md");var o=t.noop;n.disabled?r(!0):n.ngDisabled&&(o=e.$watch(n.ngDisabled,function(e){r(e)})),e.$on("$destroy",function(){o()});var d;a.fitInputWidthToTextLength=function(e){var t=i[0].querySelector("md-input-container");if(t){var n=getComputedStyle(t),a=parseInt(n.minWidth),r=2*parseInt(n.padding);d=d||parseInt(n.maxWidth);var o=Math.max(d,a+r+a/2*e);t.style.maxWidth=o+"px"}}}}}}}function a(e,i,n,a,r,o,d,s,l,u){function c(e,i){var a=t.element(e[0].getElementsByClassName("md-slider-wrapper")),r=i.tabindex||0;return a.attr("tabindex",r),(i.disabled||i.ngDisabled)&&a.attr("tabindex",-1),a.attr("role","slider"),n.expect(e,"aria-label"),m}function m(n,c,m,f){function v(){C(),S()}function h(e){se=parseFloat(e),c.attr("aria-valuemin",e),v()}function p(e){le=parseFloat(e),c.attr("aria-valuemax",e),v()}function g(e){ue=parseFloat(e)}function $(e){ce=A(parseInt(e),0,6)}function b(){c.attr("aria-disabled",!!G())}function w(){if(ae&&!G()&&!t.isUndefined(ue)){if(ue<=0){var e="Slider step value must be greater than zero when in discrete mode";throw l.error(e),new Error(e)}var n=Math.floor((le-se)/ue);me||(me=t.element("<canvas>").css("position","absolute"),Z.append(me),fe=me[0].getContext("2d"));var a=x();!a||a.height||a.width||(C(),a=ve),me[0].width=a.width,me[0].height=a.height;for(var r,o=0;o<=n;o++){var d=i.getComputedStyle(Z[0]);fe.fillStyle=d.color||"black",r=Math.floor((ne?a.height:a.width)*(o/n)),fe.fillRect(ne?0:r-1,ne?r-1:0,ne?a.width:2,ne?2:a.height)}}}function y(){if(me&&fe){var e=x();fe.clearRect(0,0,e.width,e.height)}}function C(){ve=Q[0].getBoundingClientRect()}function x(){return te(),ve}function D(e){if(!G()){var t;(ne?e.keyCode===r.KEY_CODE.DOWN_ARROW:e.keyCode===r.KEY_CODE.LEFT_ARROW)?t=-ue:(ne?e.keyCode===r.KEY_CODE.UP_ARROW:e.keyCode===r.KEY_CODE.RIGHT_ARROW)&&(t=ue),t=re?-t:t,t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),n.$evalAsync(function(){M(Y.$viewValue+t)}))}}function V(){w(),n.mouseActive=!0,ee.removeClass("md-focused"),u(function(){n.mouseActive=!1},100)}function k(){n.mouseActive===!1&&ee.addClass("md-focused")}function E(){ee.removeClass("md-focused"),c.removeClass("md-active"),y()}function M(e){Y.$setViewValue(A(R(e)))}function S(){isNaN(Y.$viewValue)&&(Y.$viewValue=Y.$modelValue),Y.$viewValue=A(Y.$viewValue);var e=B(Y.$viewValue);n.modelValue=Y.$viewValue,c.attr("aria-valuenow",Y.$viewValue),W(e),H.text(Y.$viewValue)}function A(e,i,n){if(t.isNumber(e))return i=t.isNumber(i)?i:se,n=t.isNumber(n)?n:le,Math.max(i,Math.min(n,e))}function R(e){if(t.isNumber(e)){var i=Math.round((e-se)/ue)*ue+se;return i=Math.round(i*Math.pow(10,ce))/Math.pow(10,ce),U&&U.fitInputWidthToTextLength&&a.debounce(function(){U.fitInputWidthToTextLength(i.toString().length)},100)(),i}}function W(e){e=P(e);var t=100*e+"%",i=re?100*(1-e)+"%":t;ne?J.css("bottom",t):a.bidiProperty(J,"left","right",t),X.css(ne?"height":"width",i),c.toggleClass(re?"md-max":"md-min",0===e),c.toggleClass(re?"md-min":"md-max",1===e)}function N(e){if(!G()){c.addClass("md-active"),c[0].focus(),C();var t=z(F(ne?e.pointer.y:e.pointer.x)),i=A(R(t));n.$apply(function(){M(i),W(B(i))})}}function T(e){if(!G()){c.removeClass("md-dragging");var t=z(F(ne?e.pointer.y:e.pointer.x)),i=A(R(t));n.$apply(function(){M(i),S()})}}function _(e){G()||(he=!0,e.stopPropagation(),c.addClass("md-dragging"),q(e))}function I(e){he&&(e.stopPropagation(),q(e))}function O(e){he&&(e.stopPropagation(),he=!1)}function q(e){ae?L(ne?e.pointer.y:e.pointer.x):K(ne?e.pointer.y:e.pointer.x)}function K(e){n.$evalAsync(function(){M(z(F(e)))})}function L(e){var t=z(F(e)),i=A(R(t));W(F(e)),H.text(i)}function P(e){return Math.max(0,Math.min(e||0,1))}function F(e){var t=ne?ve.top:ve.left,i=ne?ve.height:ve.width,n=(e-t)/i;return ne||"rtl"!==a.bidi()||(n=1-n),Math.max(0,Math.min(1,ne?1-n:n))}function z(e){var t=re?1-e:e;return se+t*(le-se)}function B(e){var t=(e-se)/(le-se);return re?1-t:t}o(c);var Y=f[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},U=f[1],G=(t.element(a.getClosest(c,"_md-slider-container",!0)),m.ngDisabled?t.bind(null,s(m.ngDisabled),n.$parent):function(){return c[0].hasAttribute("disabled")}),j=t.element(c[0].querySelector(".md-thumb")),H=t.element(c[0].querySelector(".md-thumb-text")),J=j.parent(),Q=t.element(c[0].querySelector(".md-track-container")),X=t.element(c[0].querySelector(".md-track-fill")),Z=t.element(c[0].querySelector(".md-track-ticks")),ee=t.element(c[0].getElementsByClassName("md-slider-wrapper")),te=(t.element(c[0].getElementsByClassName("md-slider-content")),a.throttle(C,5e3)),ie=3,ne=t.isDefined(m.mdVertical),ae=t.isDefined(m.mdDiscrete),re=t.isDefined(m.mdInvert);t.isDefined(m.min)?m.$observe("min",h):h(0),t.isDefined(m.max)?m.$observe("max",p):p(100),t.isDefined(m.step)?m.$observe("step",g):g(1),t.isDefined(m.round)?m.$observe("round",$):$(ie);var oe=t.noop;m.ngDisabled&&(oe=n.$parent.$watch(m.ngDisabled,b)),d.register(ee,"drag",{horizontal:!ne}),n.mouseActive=!1,ee.on("keydown",D).on("mousedown",V).on("focus",k).on("blur",E).on("$md.pressdown",N).on("$md.pressup",T).on("$md.dragstart",_).on("$md.drag",I).on("$md.dragend",O),setTimeout(v,0);var de=e.throttle(v);t.element(i).on("resize",de),n.$on("$destroy",function(){t.element(i).off("resize",de)}),Y.$render=S,Y.$viewChangeListeners.push(S),Y.$formatters.push(A),Y.$formatters.push(R);var se,le,ue,ce,me,fe,ve={};C();var he=!1}return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="md-slider-wrapper"><div class="md-slider-content"><div class="md-track-container"><div class="md-track"></div><div class="md-track md-track-fill"></div><div class="md-track-ticks"></div></div><div class="md-thumb-container"><div class="md-thumb"></div><div class="md-focus-thumb"></div><div class="md-focus-ring"></div><div class="md-sign"><span class="md-thumb-text"></span></div><div class="md-disabled-thumb"></div></div></div></div>',compile:c}}t.module("material.components.slider",["material.core"]).directive("mdSlider",a).directive("mdSliderContainer",n),a.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"]}(window,window.angular);
{
"name": "angular-material-sticky",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-content": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-content": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -33,2 +33,5 @@ (function( window, angular, undefined ){

*
* Whenever the current browser supports stickiness natively, the `$mdSticky` service will just
* use the native browser stickiness.
*
* By default the `$mdSticky` service compiles the cloned element, when not specified through the `elementClone`

@@ -82,5 +85,5 @@ * parameter, in the same scope as the actual element lives.

*/
function MdSticky($document, $mdConstant, $$rAF, $mdUtil, $compile) {
function MdSticky($mdConstant, $$rAF, $mdUtil, $compile) {
var browserStickySupport = checkStickySupport();
var browserStickySupport = $mdUtil.checkStickySupport();

@@ -143,3 +146,3 @@ /**

function add(element, stickyClone) {
stickyClone.addClass('_md-sticky-clone');
stickyClone.addClass('md-sticky-clone');

@@ -331,20 +334,3 @@ var item = {

// Function to check for browser sticky support
function checkStickySupport($el) {
var stickyProp;
var testEl = angular.element('<div>');
$document[0].body.appendChild(testEl[0]);
var stickyProps = ['sticky', '-webkit-sticky'];
for (var i = 0; i < stickyProps.length; ++i) {
testEl.css({position: stickyProps[i], top: 0, 'z-index': 2});
if (testEl.css('position') == stickyProps[i]) {
stickyProp = stickyProps[i];
break;
}
}
testEl.remove();
return stickyProp;
}
// Android 4.4 don't accurately give scroll events.

@@ -381,4 +367,4 @@ // To fix this problem, we setup a fake scroll event. We say:

}
MdSticky.$inject = ["$document", "$mdConstant", "$$rAF", "$mdUtil", "$compile"];
MdSticky.$inject = ["$mdConstant", "$$rAF", "$mdUtil", "$compile"];
})(window, window.angular);

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,n){"use strict";function r(t,r,o,i,l){function c(t){function e(t,e){e.addClass("_md-sticky-clone");var n={element:t,clone:e};return v.items.push(n),i.nextTick(function(){d.prepend(n.clone)}),m(),function(){v.items.forEach(function(e,n){e.element[0]===t[0]&&(v.items.splice(n,1),e.clone.remove())}),m()}}function l(){v.items.forEach(c),v.items=v.items.sort(function(t,e){return t.top<e.top?-1:1});for(var t,e=d.prop("scrollTop"),n=v.items.length-1;n>=0;n--)if(e>v.items[n].top){t=v.items[n];break}f(t)}function c(t){var e=t.element[0];for(t.top=0,t.left=0,t.right=0;e&&e!==d[0];)t.top+=e.offsetTop,t.left+=e.offsetLeft,e.offsetParent&&(t.right+=e.offsetParent.offsetWidth-e.offsetWidth-e.offsetLeft),e=e.offsetParent;t.height=t.element.prop("offsetHeight");var r=i.floatingScrollbars()?"0":n;i.bidi(t.clone,"margin-left",t.left,r),i.bidi(t.clone,"margin-right",r,t.right)}function s(){var t=d.prop("scrollTop"),e=t>(s.prevScrollTop||0);if(s.prevScrollTop=t,0===t)return void f(null);if(e){if(v.next&&v.next.top<=t)return void f(v.next);if(v.current&&v.next&&v.next.top-t<=v.next.height)return void p(v.current,t+(v.next.top-v.next.height-t))}if(!e){if(v.current&&v.prev&&t<v.current.top)return void f(v.prev);if(v.next&&v.current&&t>=v.next.top-v.current.height)return void p(v.current,t+(v.next.top-t-v.current.height))}v.current&&p(v.current,t)}function f(t){if(v.current!==t){v.current&&(p(v.current,null),u(v.current,null)),t&&u(t,"active"),v.current=t;var e=v.items.indexOf(t);v.next=v.items[e+1],v.prev=v.items[e-1],u(v.next,"next"),u(v.prev,"prev")}}function u(t,e){t&&t.state!==e&&(t.state&&(t.clone.attr("sticky-prev-state",t.state),t.element.attr("sticky-prev-state",t.state)),t.clone.attr("sticky-state",e),t.element.attr("sticky-state",e),t.state=e)}function p(t,e){t&&(null===e||e===n?t.translateY&&(t.translateY=null,t.clone.css(r.CSS.TRANSFORM,"")):(t.translateY=e,i.bidi(t.clone,r.CSS.TRANSFORM,"translate3d("+t.left+"px,"+e+"px,0)","translateY("+e+"px)")))}var d=t.$element,m=o.throttle(l);a(d),d.on("$scrollstart",m),d.on("$scroll",s);var v;return v={prev:null,current:null,next:null,items:[],add:e,refreshElements:l}}function s(n){var r,o=e.element("<div>");t[0].body.appendChild(o[0]);for(var i=["sticky","-webkit-sticky"],l=0;l<i.length;++l)if(o.css({position:i[l],top:0,"z-index":2}),o.css("position")==i[l]){r=i[l];break}return o.remove(),r}function a(t){function e(){+i.now()-r>l?(n=!1,t.triggerHandler("$scrollend")):(t.triggerHandler("$scroll"),o.throttle(e))}var n,r,l=200;t.on("scroll touchmove",function(){n||(n=!0,o.throttle(e),t.triggerHandler("$scrollstart")),t.triggerHandler("$scroll"),r=+i.now()})}var f=s();return function(t,e,n){var r=e.controller("mdContent");if(r)if(f)e.css({position:f,top:0,"z-index":2});else{var o=r.$element.data("$$sticky");o||(o=c(r),r.$element.data("$$sticky",o));var i=n||l(e.clone())(t),s=o.add(e,i);t.$on("$destroy",s)}}}e.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",r),r.$inject=["$document","$mdConstant","$$rAF","$mdUtil","$compile"]}(window,window.angular);
!function(t,e,n){"use strict";function r(t,e,r,o){function i(o){function i(t,e){e.addClass("md-sticky-clone");var n={element:t,clone:e};return v.items.push(n),r.nextTick(function(){m.prepend(n.clone)}),d(),function(){v.items.forEach(function(e,n){e.element[0]===t[0]&&(v.items.splice(n,1),e.clone.remove())}),d()}}function c(){v.items.forEach(s),v.items=v.items.sort(function(t,e){return t.top<e.top?-1:1});for(var t,e=m.prop("scrollTop"),n=v.items.length-1;n>=0;n--)if(e>v.items[n].top){t=v.items[n];break}f(t)}function s(t){var e=t.element[0];for(t.top=0,t.left=0,t.right=0;e&&e!==m[0];)t.top+=e.offsetTop,t.left+=e.offsetLeft,e.offsetParent&&(t.right+=e.offsetParent.offsetWidth-e.offsetWidth-e.offsetLeft),e=e.offsetParent;t.height=t.element.prop("offsetHeight");var o=r.floatingScrollbars()?"0":n;r.bidi(t.clone,"margin-left",t.left,o),r.bidi(t.clone,"margin-right",o,t.right)}function a(){var t=m.prop("scrollTop"),e=t>(a.prevScrollTop||0);if(a.prevScrollTop=t,0===t)return void f(null);if(e){if(v.next&&v.next.top<=t)return void f(v.next);if(v.current&&v.next&&v.next.top-t<=v.next.height)return void p(v.current,t+(v.next.top-v.next.height-t))}if(!e){if(v.current&&v.prev&&t<v.current.top)return void f(v.prev);if(v.next&&v.current&&t>=v.next.top-v.current.height)return void p(v.current,t+(v.next.top-t-v.current.height))}v.current&&p(v.current,t)}function f(t){if(v.current!==t){v.current&&(p(v.current,null),u(v.current,null)),t&&u(t,"active"),v.current=t;var e=v.items.indexOf(t);v.next=v.items[e+1],v.prev=v.items[e-1],u(v.next,"next"),u(v.prev,"prev")}}function u(t,e){t&&t.state!==e&&(t.state&&(t.clone.attr("sticky-prev-state",t.state),t.element.attr("sticky-prev-state",t.state)),t.clone.attr("sticky-state",e),t.element.attr("sticky-state",e),t.state=e)}function p(e,o){e&&(null===o||o===n?e.translateY&&(e.translateY=null,e.clone.css(t.CSS.TRANSFORM,"")):(e.translateY=o,r.bidi(e.clone,t.CSS.TRANSFORM,"translate3d("+e.left+"px,"+o+"px,0)","translateY("+o+"px)")))}var m=o.$element,d=e.throttle(c);l(m),m.on("$scrollstart",d),m.on("$scroll",a);var v;return v={prev:null,current:null,next:null,items:[],add:i,refreshElements:c}}function l(t){function n(){+r.now()-i>l?(o=!1,t.triggerHandler("$scrollend")):(t.triggerHandler("$scroll"),e.throttle(n))}var o,i,l=200;t.on("scroll touchmove",function(){o||(o=!0,e.throttle(n),t.triggerHandler("$scrollstart")),t.triggerHandler("$scroll"),i=+r.now()})}var c=r.checkStickySupport();return function(t,e,n){var r=e.controller("mdContent");if(r)if(c)e.css({position:c,top:0,"z-index":2});else{var l=r.$element.data("$$sticky");l||(l=i(r),r.$element.data("$$sticky",l));var s=n||o(e.clone())(t),a=l.add(e,s);t.$on("$destroy",a)}}}e.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",r),r.$inject=["$mdConstant","$$rAF","$mdUtil","$compile"]}(window,window.angular);
{
"name": "angular-material-subheader",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-sticky": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-sticky": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -44,6 +44,17 @@ (function( window, angular, undefined ){

* @description
* The `<md-subheader>` directive is a subheader for a section. By default it is sticky.
* You can make it not sticky by applying the `md-no-sticky` class to the subheader.
* The `md-subheader` directive creates a sticky subheader for a section.
*
* Developers are able to disable the stickiness of the subheader by using the following markup
*
* <hljs lang="html">
* <md-subheader class="md-no-sticky">Not Sticky</md-subheader>
* </hljs>
*
* ### Notes
* - The `md-subheader` directive uses the [$mdSticky](/api/service/$mdSticky) service to make the
* subheader sticky.
*
* > Whenever the current browser doesn't support stickiness natively, the subheader
* will be compiled twice to create a sticky clone of the subheader.
*
* @usage

@@ -62,4 +73,4 @@ * <hljs lang="html">

'<div class="md-subheader _md">' +
' <div class="_md-subheader-inner">' +
' <div class="_md-subheader-content"></div>' +
' <div class="md-subheader-inner">' +
' <div class="md-subheader-content"></div>' +
' </div>' +

@@ -71,7 +82,11 @@ '</div>'

element.addClass('_md');
// Remove the ngRepeat attribute from the root element, because we don't want to compile
// the ngRepeat for the sticky clone again.
$mdUtil.prefixer().removeAttribute(element, 'ng-repeat');
var outerHTML = element[0].outerHTML;
function getContent(el) {
return angular.element(el[0].querySelector('._md-subheader-content'));
return angular.element(el[0].querySelector('.md-subheader-content'));
}

@@ -93,9 +108,13 @@

// DIV to ensure we have something $mdSticky can use
var wrapper = angular.element('<div class="_md-subheader-wrapper">' + outerHTML + '</div>');
var wrapper = $compile('<div class="md-subheader-wrapper">' + outerHTML + '</div>')(scope);
// Immediately append our transcluded clone into the wrapper.
// We don't have to recompile the element again, because the clone is already
// compiled in it's transclusion scope. If we recompile the outerHTML of the new clone, we would lose
// our ngIf's and other previous registered bindings / properties.
getContent(wrapper).append(clone);
// Delay initialization until after any `ng-if`/`ng-repeat`/etc has finished before
// attempting to create the clone
$mdUtil.nextTick(function() {
// Append our transcluded clone into the wrapper.
// We don't have to recompile the element again, because the clone is already
// compiled in it's transclusion scope. If we recompile the outerHTML of the new clone, we would lose
// our ngIf's and other previous registered bindings / properties.
getContent(wrapper).append(clone);
});

@@ -102,0 +121,0 @@ // Make the element sticky and provide the stickyClone our self, to avoid recompilation of the subheader

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,d,n){"use strict";function t(e,n,t,i){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md"> <div class="_md-subheader-inner"> <div class="_md-subheader-content"></div> </div></div>',link:function(n,i,a,r,s){function c(e){return d.element(e[0].querySelector("._md-subheader-content"))}t(i),i.addClass("_md");var m=i[0].outerHTML;s(n,function(e){c(i).append(e)}),i.hasClass("md-no-sticky")||s(n,function(t){var a=d.element('<div class="_md-subheader-wrapper">'+m+"</div>");c(a).append(t),e(n,i,a)})}}}d.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",t),t.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil"]}(window,window.angular);
!function(e,n,t){"use strict";function d(e,t,d,i){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md"> <div class="md-subheader-inner"> <div class="md-subheader-content"></div> </div></div>',link:function(r,a,c,s,m){function u(e){return n.element(e[0].querySelector(".md-subheader-content"))}d(a),a.addClass("_md"),i.prefixer().removeAttribute(a,"ng-repeat");var o=a[0].outerHTML;m(r,function(e){u(a).append(e)}),a.hasClass("md-no-sticky")||m(r,function(n){var d=t('<div class="md-subheader-wrapper">'+o+"</div>")(r);i.nextTick(function(){u(d).append(n)}),e(r,a,d)})}}}n.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",d),d.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil"]}(window,window.angular);
{
"name": "angular-material-swipe",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -8,0 +8,0 @@ (function( window, angular, undefined ){

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,i,n){"use strict";function t(e){function i(e){function i(i,r,o){var c=e(o[n]);r.on(t,function(e){i.$applyAsync(function(){c(i,{$event:e})})})}return{restrict:"A",link:i}}var n="md"+e,t="$md."+e.toLowerCase();return i.$inject=["$parse"],i}i.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",t("SwipeLeft")).directive("mdSwipeRight",t("SwipeRight")).directive("mdSwipeUp",t("SwipeUp")).directive("mdSwipeDown",t("SwipeDown"))}(window,window.angular);
{
"name": "angular-material-switch",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-checkbox": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-checkbox": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -12,3 +12,2 @@ (function( window, angular, undefined ){

/**
* @private
* @ngdoc module

@@ -61,3 +60,3 @@ * @name material.components.switch

*/
function MdSwitch(mdCheckboxDirective, $mdUtil, $mdConstant, $parse, $$rAF, $mdGesture) {
function MdSwitch(mdCheckboxDirective, $mdUtil, $mdConstant, $parse, $$rAF, $mdGesture, $timeout) {
var checkboxDirective = mdCheckboxDirective[0];

@@ -70,9 +69,9 @@

template:
'<div class="_md-container">' +
'<div class="_md-bar"></div>' +
'<div class="_md-thumb-container">' +
'<div class="_md-thumb" md-ink-ripple md-ink-ripple-checkbox></div>' +
'<div class="md-container">' +
'<div class="md-bar"></div>' +
'<div class="md-thumb-container">' +
'<div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div>' +
'</div>'+
'</div>' +
'<div ng-transclude class="_md-label"></div>',
'<div ng-transclude class="md-label"></div>',
require: '?ngModel',

@@ -83,5 +82,5 @@ compile: mdSwitchCompile

function mdSwitchCompile(element, attr) {
var checkboxLink = checkboxDirective.compile(element, attr);
var checkboxLink = checkboxDirective.compile(element, attr).post;
// No transition on initial load.
element.addClass('_md-dragging');
element.addClass('md-dragging');

@@ -98,8 +97,8 @@ return function (scope, element, attr, ngModel) {

var thumbContainer = angular.element(element[0].querySelector('._md-thumb-container'));
var switchContainer = angular.element(element[0].querySelector('._md-container'));
var thumbContainer = angular.element(element[0].querySelector('.md-thumb-container'));
var switchContainer = angular.element(element[0].querySelector('.md-container'));
// no transition on initial load
$$rAF(function() {
element.removeClass('_md-dragging');
element.removeClass('md-dragging');
});

@@ -128,3 +127,3 @@

element.addClass('_md-dragging');
element.addClass('md-dragging');
drag = {width: thumbContainer.prop('offsetWidth')};

@@ -153,3 +152,3 @@ }

element.removeClass('_md-dragging');
element.removeClass('md-dragging');
thumbContainer.css($mdConstant.CSS.TRANSFORM, '');

@@ -159,3 +158,3 @@

// or if the drag distance is >50% of the total.
var isChanged = ngModel.$viewValue ? drag.translate > 0.5 : drag.translate < 0.5;
var isChanged = ngModel.$viewValue ? drag.translate < 0.5 : drag.translate > 0.5;
if (isChanged) {

@@ -165,2 +164,8 @@ applyModelValue(!ngModel.$viewValue);

drag = null;
// Wait for incoming mouse click
scope.skipToggle = true;
$timeout(function() {
scope.skipToggle = false;
}, 1);
}

@@ -180,4 +185,4 @@

}
MdSwitch.$inject = ["mdCheckboxDirective", "$mdUtil", "$mdConstant", "$parse", "$$rAF", "$mdGesture"];
MdSwitch.$inject = ["mdCheckboxDirective", "$mdUtil", "$mdConstant", "$parse", "$$rAF", "$mdGesture", "$timeout"];
})(window, window.angular);

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function a(e,n,a,i,r,d){function o(e,o){var l=s.compile(e,o);return e.addClass("_md-dragging"),function(e,o,s,c){function m(t){p&&p(e)||(t.stopPropagation(),o.addClass("_md-dragging"),h={width:f.prop("offsetWidth")})}function u(e){if(h){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/h.width,n=c.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),f.css(a.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),h.translate=n}}function v(e){if(h){e.stopPropagation(),o.removeClass("_md-dragging"),f.css(a.CSS.TRANSFORM,"");var t=c.$viewValue?h.translate>.5:h.translate<.5;t&&g(!c.$viewValue),h=null}}function g(t){e.$apply(function(){c.$setViewValue(t),c.$render()})}c=c||n.fakeNgModel();var p=null;null!=s.disabled?p=function(){return!0}:s.ngDisabled&&(p=i(s.ngDisabled));var f=t.element(o[0].querySelector("._md-thumb-container")),$=t.element(o[0].querySelector("._md-container"));r(function(){o.removeClass("_md-dragging")}),l(e,o,s,c),p&&e.$watch(p,function(e){o.attr("tabindex",e?-1:0)}),d.register($,"drag"),$.on("$md.dragstart",m).on("$md.drag",u).on("$md.dragend",v);var h}}var s=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="_md-container"><div class="_md-bar"></div><div class="_md-thumb-container"><div class="_md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="_md-label"></div>',require:"?ngModel",compile:o}}t.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",a),a.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture"]}(window,window.angular);
!function(e,t,n){"use strict";function i(e,n,i,a,r,d,o){function s(e,s){var c=l.compile(e,s).post;return e.addClass("md-dragging"),function(e,s,l,m){function u(t){f&&f(e)||(t.stopPropagation(),s.addClass("md-dragging"),w={width:$.prop("offsetWidth")})}function g(e){if(w){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/w.width,n=m.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),$.css(i.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),w.translate=n}}function v(t){if(w){t.stopPropagation(),s.removeClass("md-dragging"),$.css(i.CSS.TRANSFORM,"");var n=m.$viewValue?w.translate<.5:w.translate>.5;n&&p(!m.$viewValue),w=null,e.skipToggle=!0,o(function(){e.skipToggle=!1},1)}}function p(t){e.$apply(function(){m.$setViewValue(t),m.$render()})}m=m||n.fakeNgModel();var f=null;null!=l.disabled?f=function(){return!0}:l.ngDisabled&&(f=a(l.ngDisabled));var $=t.element(s[0].querySelector(".md-thumb-container")),h=t.element(s[0].querySelector(".md-container"));r(function(){s.removeClass("md-dragging")}),c(e,s,l,m),f&&e.$watch(f,function(e){s.attr("tabindex",e?-1:0)}),d.register(h,"drag"),h.on("$md.dragstart",u).on("$md.drag",g).on("$md.dragend",v);var w}}var l=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:s}}t.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",i),i.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture","$timeout"]}(window,window.angular);
{
"name": "angular-material-tabs",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-icon": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-icon": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -716,3 +716,7 @@ (function( window, angular, undefined ){

var canvasWidth = $element.prop('clientWidth');
angular.forEach(getElements().dummies, function (tab) { canvasWidth -= tab.offsetWidth; });
angular.forEach(getElements().dummies, function (tab) {
canvasWidth -= tab.offsetWidth;
});
return canvasWidth < 0;

@@ -782,8 +786,13 @@ }

/**
* Calculates the width of the pagination wrapper by summing the widths of the dummy tabs.
* @returns {number}
*/
function calcPagingWidth () {
var width = 1;
return calcTabsWidth(getElements().dummies);
}
angular.forEach(getElements().dummies, function (element) {
function calcTabsWidth(tabs) {
var width = 0;
angular.forEach(tabs, function (tab) {
//-- Uses the larger value between `getBoundingClientRect().width` and `offsetWidth`. This

@@ -793,3 +802,3 @@ // prevents `offsetWidth` value from being rounded down and causing wrapping issues, but

// of a dialog)
width += Math.max(element.offsetWidth, element.getBoundingClientRect().width);
width += Math.max(tab.offsetWidth, tab.getBoundingClientRect().width);
});

@@ -960,2 +969,3 @@

}
if (!ctrl.tabs.length) return queue.push(ctrl.updateInkBarStyles);

@@ -965,2 +975,3 @@ // if the element is not visible, we will not be able to calculate sizes until it is

if (!$element.prop('offsetParent')) return handleResizeWhenVisible();
var index = ctrl.selectedIndex,

@@ -970,9 +981,11 @@ totalWidth = elements.paging.offsetWidth,

left = tab.offsetLeft,
right = totalWidth - left - tab.offsetWidth,
tabWidth;
right = totalWidth - left - tab.offsetWidth;
if (ctrl.shouldCenterTabs) {
tabWidth = Array.prototype.slice.call(elements.tabs).reduce(function (value, element) {
return value + element.offsetWidth;
}, 0);
if (totalWidth > tabWidth) $mdUtil.nextTick(updateInkBarStyles, false);
// We need to use the same calculate process as in the pagination wrapper, to avoid rounding deviations.
var tabWidth = calcTabsWidth(elements.tabs);
if (totalWidth > tabWidth) {
$mdUtil.nextTick(updateInkBarStyles, false);
}
}

@@ -1118,3 +1131,3 @@ updateInkBarClassName();

function MdTabs () {
function MdTabs ($$mdSvgRegistry) {
return {

@@ -1137,3 +1150,3 @@ scope: {

'ng-click="$mdTabsCtrl.previousPage()"> ' +
'<md-icon md-svg-icon="md-tabs-arrow"></md-icon> ' +
'<md-icon md-svg-src="'+ $$mdSvgRegistry.mdTabsArrow +'"></md-icon> ' +
'</md-prev-button> ' +

@@ -1148,3 +1161,3 @@ '<md-next-button ' +

'ng-click="$mdTabsCtrl.nextPage()"> ' +
'<md-icon md-svg-icon="md-tabs-arrow"></md-icon> ' +
'<md-icon md-svg-src="'+ $$mdSvgRegistry.mdTabsArrow +'"></md-icon> ' +
'</md-next-button> ' +

@@ -1185,3 +1198,3 @@ '<md-tabs-canvas ' +

'</md-pagination-wrapper> ' +
'<md-tabs-dummy-wrapper class="_md-visually-hidden md-dummy-wrapper"> ' +
'<md-tabs-dummy-wrapper class="md-visually-hidden md-dummy-wrapper"> ' +
'<md-dummy-tab ' +

@@ -1233,2 +1246,3 @@ 'class="md-tab" ' +

}
MdTabs.$inject = ["$$mdSvgRegistry"];

@@ -1258,4 +1272,12 @@ angular

});
var config = { childList: true, subtree: true };
var config = {
childList: true,
subtree: true,
// Per https://bugzilla.mozilla.org/show_bug.cgi?id=1138368, browsers will not fire
// the childList mutation, once a <span> element's innerText changes.
// The characterData of the <span> element will change.
characterData: true
};
observer.observe(element[0], config);

@@ -1262,0 +1284,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,n){"use strict";function a(){function e(e,a,s,i){if(i){var d=i.getTabElementIndex(a),c=n(a,"md-tab-body").remove(),o=n(a,"md-tab-label").remove(),r=i.insertTab({scope:e,parent:e.$parent,index:d,element:a,template:c.html(),label:o.html()},d);e.select=e.select||t.noop,e.deselect=e.deselect||t.noop,e.$watch("active",function(e){e&&i.select(r.getIndex(),!0)}),e.$watch("disabled",function(){i.refreshIndex()}),e.$watch(function(){return i.getTabElementIndex(a)},function(e){r.index=e,i.updateTabOrder()}),e.$on("$destroy",function(){i.removeTab(r)})}}function n(e,n){for(var a=e[0].children,s=0,i=a.length;i>s;s++){var d=a[s];if(d.tagName===n.toUpperCase())return t.element(d)}return t.element()}return{require:"^?mdTabs",terminal:!0,compile:function(a,s){var i=n(a,"md-tab-label"),d=n(a,"md-tab-body");if(0==i.length&&(i=t.element("<md-tab-label></md-tab-label>"),s.label?i.text(s.label):i.append(a.contents()),0==d.length)){var c=a.contents().detach();d=t.element("<md-tab-body></md-tab-body>"),d.append(c)}return a.append(i),d.html()&&a.append(d),e},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}}}function s(){return{require:"^?mdTabs",link:function(e,t,n,a){a&&a.attachRipple(e,t)}}}function i(){return{terminal:!0}}function d(e){return{restrict:"A",compile:function(t,n){var a=e(n.mdTabScroll,null,!0);return function(e,t){t.on("mousewheel",function(t){e.$apply(function(){a(e,{$event:t})})})}}}}function c(e,a,s,i,d,c,o,r,l,m){function b(){re.selectedIndex=re.selectedIndex||0,f(),p(),u(),m(a),c.nextTick(function(){me=M(),se(),ee(),ie(),re.tabs[re.selectedIndex]&&re.tabs[re.selectedIndex].scope.select(),ue=!0,Y()})}function f(){var e=r.$mdTabsTemplate,n=t.element(a[0].querySelector("md-tab-data"));n.html(e),l(n.contents())(re.parent),delete r.$mdTabsTemplate}function u(){t.element(s).on("resize",O),e.$on("$destroy",x)}function p(){e.$watch("$mdTabsCtrl.selectedIndex",y)}function h(e,t){var n=r.$normalize("md-"+e);t&&K(e,t),r.$observe(n,function(t){re[e]=t})}function g(e,t){function n(t){re[e]="false"!==t}var a=r.$normalize("md-"+e);t&&K(e,t),r.hasOwnProperty(a)&&n(r[a]),r.$observe(a,n)}function x(){fe=!0,t.element(s).off("resize",O)}function T(e){var n=M();t.element(n.wrapper).toggleClass("md-stretch-tabs",N()),ie()}function v(e){re.shouldCenterTabs=j()}function $(e,n){if(e!==n){var a=M();t.forEach(a.tabs,function(t){t.style.maxWidth=e+"px"}),c.nextTick(re.updateInkBarStyles)}}function C(e,t){e!==t&&(re.maxTabWidth=Q(),re.shouldCenterTabs=j(),c.nextTick(function(){re.maxTabWidth=Q(),ee(re.selectedIndex)}))}function I(e){a[e?"removeClass":"addClass"]("md-no-tab-content")}function w(n){var a=M(),s=re.shouldCenterTabs?"":"-"+n+"px";t.element(a.paging).css(i.CSS.TRANSFORM,"translate3d("+s+", 0, 0)"),e.$broadcast("$mdTabsPaginationChanged")}function k(e,t){e!==t&&M().tabs[e]&&(ee(),Z())}function y(t,n){t!==n&&(re.selectedIndex=U(t),re.lastSelectedIndex=n,re.updateInkBarStyles(),se(),ee(t),e.$broadcast("$mdTabsChanged"),re.tabs[n]&&re.tabs[n].scope.deselect(),re.tabs[t]&&re.tabs[t].scope.select())}function S(e){var t=a[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(t,e[0])}function P(){P.watcher||(P.watcher=e.$watch(function(){c.nextTick(function(){P.watcher&&a.prop("offsetParent")&&(P.watcher(),P.watcher=null,O())},!1)}))}function L(e){switch(e.keyCode){case i.KEY_CODE.LEFT_ARROW:e.preventDefault(),X(-1,!0);break;case i.KEY_CODE.RIGHT_ARROW:e.preventDefault(),X(1,!0);break;case i.KEY_CODE.SPACE:case i.KEY_CODE.ENTER:e.preventDefault(),le||W(re.focusIndex)}re.lastClick=!1}function W(e,t){le||(re.focusIndex=re.selectedIndex=e),re.lastClick=!0,t&&re.noSelectClick||c.nextTick(function(){re.tabs[e].element.triggerHandler("click")},!1)}function E(e){re.shouldPaginate&&(e.preventDefault(),re.offsetLeft=ce(re.offsetLeft-e.wheelDelta))}function A(){var e,t,n=M(),a=n.canvas.clientWidth,s=a+re.offsetLeft;for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>s));e++);re.offsetLeft=ce(t.offsetLeft)}function D(){var e,t,n=M();for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>=re.offsetLeft));e++);re.offsetLeft=ce(t.offsetLeft+t.offsetWidth-n.canvas.clientWidth)}function O(){re.lastSelectedIndex=re.selectedIndex,re.offsetLeft=ce(re.offsetLeft),c.nextTick(function(){re.updateInkBarStyles(),Y()})}function B(e){t.element(M().inkBar).toggleClass("ng-hide",e)}function R(e){a.toggleClass("md-dynamic-height",e)}function F(e){if(!fe){var t=re.selectedIndex,n=re.tabs.splice(e.getIndex(),1)[0];ae(),re.selectedIndex===t&&(n.scope.deselect(),re.tabs[re.selectedIndex]&&re.tabs[re.selectedIndex].scope.select()),c.nextTick(function(){Y(),re.offsetLeft=ce(re.offsetLeft)})}}function q(e,n){var a=ue,s={getIndex:function(){return re.tabs.indexOf(i)},isActive:function(){return this.getIndex()===re.selectedIndex},isLeft:function(){return this.getIndex()<re.selectedIndex},isRight:function(){return this.getIndex()>re.selectedIndex},shouldRender:function(){return!re.noDisconnect||this.isActive()},hasFocus:function(){return!re.lastClick&&re.hasFocus&&this.getIndex()===re.focusIndex},id:c.nextUid()},i=t.extend(s,e);return t.isDefined(n)?re.tabs.splice(n,0,i):re.tabs.push(i),te(),ne(),c.nextTick(function(){Y(),a&&re.autoselect&&c.nextTick(function(){c.nextTick(function(){W(re.tabs.indexOf(i))})})}),i}function M(){var e={},t=a[0];return e.wrapper=t.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.contents=t.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function _(){return re.offsetLeft>0}function H(){var e=M(),t=e.tabs[e.tabs.length-1];return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+re.offsetLeft}function N(){switch(re.stretchTabs){case"always":return!0;case"never":return!1;default:return!re.shouldPaginate&&s.matchMedia("(max-width: 600px)").matches}}function j(){return re.centerTabs&&!re.shouldPaginate}function z(){if(re.noPagination||!ue)return!1;var e=a.prop("clientWidth");return t.forEach(M().dummies,function(t){e-=t.offsetWidth}),0>e}function U(e){if(-1===e)return-1;var t,n,a=Math.max(re.tabs.length-e,e);for(t=0;a>=t;t++){if(n=re.tabs[e+t],n&&n.scope.disabled!==!0)return n.getIndex();if(n=re.tabs[e-t],n&&n.scope.disabled!==!0)return n.getIndex()}return e}function K(e,t,n){Object.defineProperty(re,e,{get:function(){return n},set:function(e){var a=n;n=e,t&&t(e,a)}})}function Y(){G(),re.maxTabWidth=Q(),re.shouldPaginate=z()}function G(){var e=M();N()?t.element(e.paging).css("width",""):t.element(e.paging).css("width",J()+"px")}function J(){var e=1;return t.forEach(M().dummies,function(t){e+=Math.max(t.offsetWidth,t.getBoundingClientRect().width)}),Math.ceil(e)}function Q(){return a.prop("clientWidth")}function V(){var e=re.tabs[re.selectedIndex],t=re.tabs[re.focusIndex];re.tabs=re.tabs.sort(function(e,t){return e.index-t.index}),re.selectedIndex=re.tabs.indexOf(e),re.focusIndex=re.tabs.indexOf(t)}function X(e,t){var n,a=t?"focusIndex":"selectedIndex",s=re[a];for(n=s+e;re.tabs[n]&&re.tabs[n].scope.disabled;n+=e);re.tabs[n]&&(re[a]=n)}function Z(){M().dummies[re.focusIndex].focus()}function ee(e){var t=M();if(null==e&&(e=re.focusIndex),t.tabs[e]&&!re.shouldCenterTabs){var n=t.tabs[e],a=n.offsetLeft,s=n.offsetWidth+a;re.offsetLeft=Math.max(re.offsetLeft,ce(s-t.canvas.clientWidth+64)),re.offsetLeft=Math.min(re.offsetLeft,ce(a))}}function te(){be.forEach(function(e){c.nextTick(e)}),be=[]}function ne(){var e=!1;t.forEach(re.tabs,function(t){t.template&&(e=!0)}),re.hasContent=e}function ae(){re.selectedIndex=U(re.selectedIndex),re.focusIndex=U(re.focusIndex)}function se(){if(!re.dynamicHeight)return a.css("height","");if(!re.tabs.length)return be.push(se);var e=M(),t=e.contents[re.selectedIndex],s=t?t.offsetHeight:0,i=e.wrapper.offsetHeight,d=s+i,r=a.prop("clientHeight");if(r!==d){"bottom"===a.attr("md-align-tabs")&&(r-=i,d-=i,a.attr("md-border-bottom")!==n&&++r),le=!0;var l={height:r+"px"},m={height:d+"px"};a.css(l),o(a,{from:l,to:m,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){a.css({transition:"none",height:""}),c.nextTick(function(){a.css("transition","")}),le=!1})}}function ie(){var e=M();if(!e.tabs[re.selectedIndex])return void t.element(e.inkBar).css({left:"auto",right:"auto"});if(!re.tabs.length)return be.push(re.updateInkBarStyles);if(!a.prop("offsetParent"))return P();var n,s=re.selectedIndex,i=e.paging.offsetWidth,d=e.tabs[s],o=d.offsetLeft,r=i-o-d.offsetWidth;re.shouldCenterTabs&&(n=Array.prototype.slice.call(e.tabs).reduce(function(e,t){return e+t.offsetWidth},0),i>n&&c.nextTick(ie,!1)),de(),t.element(e.inkBar).css({left:o+"px",right:r+"px"})}function de(){var e=M(),n=re.selectedIndex,a=re.lastSelectedIndex,s=t.element(e.inkBar);t.isNumber(a)&&s.toggleClass("md-left",a>n).toggleClass("md-right",n>a)}function ce(e){var t=M();if(!t.tabs.length||!re.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],a=n.offsetLeft+n.offsetWidth;return e=Math.max(0,e),e=Math.min(a-t.canvas.clientWidth,e)}function oe(e,n){var a=M(),s={colorElement:t.element(a.inkBar)};d.attach(e,n,s)}var re=this,le=!1,me=M(),be=[],fe=!1,ue=!1;h("stretchTabs",T),K("focusIndex",k,re.selectedIndex||0),K("offsetLeft",w,0),K("hasContent",I,!1),K("maxTabWidth",$,Q()),K("shouldPaginate",C,!1),g("noInkBar",B),g("dynamicHeight",R),g("noPagination"),g("swipeContent"),g("noDisconnect"),g("autoselect"),g("noSelectClick"),g("centerTabs",v,!1),g("enableDisconnect"),re.scope=e,re.parent=e.$parent,re.tabs=[],re.lastSelectedIndex=null,re.hasFocus=!1,re.lastClick=!0,re.shouldCenterTabs=j(),re.updatePagination=c.debounce(Y,100),re.redirectFocus=Z,re.attachRipple=oe,re.insertTab=q,re.removeTab=F,re.select=W,re.scroll=E,re.nextPage=A,re.previousPage=D,re.keydown=L,re.canPageForward=H,re.canPageBack=_,re.refreshIndex=ae,re.incrementIndex=X,re.getTabElementIndex=S,re.updateInkBarStyles=c.debounce(ie,100),re.updateTabOrder=c.debounce(V,100),b()}function o(){return{scope:{selectedIndex:"=?mdSelected"},template:function(e,t){return t.$mdTabsTemplate=e.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-icon="md-tabs-arrow"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-icon="md-tabs-arrow"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper class="_md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{::tab.id}}" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="tab-content-{{::tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}function r(e){return{require:"^?mdTabs",link:function(e,t,n,a){if(a){var s=new MutationObserver(function(e){a.updatePagination(),a.updateInkBarStyles()}),i={childList:!0,subtree:!0};s.observe(t[0],i),e.$on("$destroy",function(){s&&s.disconnect()})}}}}function l(e,t){function n(n,a,s,i){function d(){n.$watch("connected",function(e){e===!1?c():o()}),n.$on("$destroy",o)}function c(){i.enableDisconnect&&t.disconnectScope(r)}function o(){i.enableDisconnect&&t.reconnectScope(r)}if(i){var r=i.enableDisconnect?n.compileScope.$new():n.compileScope;return a.html(n.template),e(a.contents())(r),t.nextTick(d)}}return{restrict:"A",link:n,scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}t.module("material.components.tabs",["material.core","material.components.icon"]),t.module("material.components.tabs").directive("mdTab",a),t.module("material.components.tabs").directive("mdTabItem",s),t.module("material.components.tabs").directive("mdTabLabel",i),t.module("material.components.tabs").directive("mdTabScroll",d),d.$inject=["$parse"],t.module("material.components.tabs").controller("MdTabsController",c),c.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming"],t.module("material.components.tabs").directive("mdTabs",o),t.module("material.components.tabs").directive("mdTabsDummyWrapper",r),r.$inject=["$mdUtil"],t.module("material.components.tabs").directive("mdTabsTemplate",l),l.$inject=["$compile","$mdUtil"]}(window,window.angular);
!function(e,t,n){"use strict";function a(){function e(e,a,s,i){if(i){var d=i.getTabElementIndex(a),c=n(a,"md-tab-body").remove(),r=n(a,"md-tab-label").remove(),o=i.insertTab({scope:e,parent:e.$parent,index:d,element:a,template:c.html(),label:r.html()},d);e.select=e.select||t.noop,e.deselect=e.deselect||t.noop,e.$watch("active",function(e){e&&i.select(o.getIndex(),!0)}),e.$watch("disabled",function(){i.refreshIndex()}),e.$watch(function(){return i.getTabElementIndex(a)},function(e){o.index=e,i.updateTabOrder()}),e.$on("$destroy",function(){i.removeTab(o)})}}function n(e,n){for(var a=e[0].children,s=0,i=a.length;s<i;s++){var d=a[s];if(d.tagName===n.toUpperCase())return t.element(d)}return t.element()}return{require:"^?mdTabs",terminal:!0,compile:function(a,s){var i=n(a,"md-tab-label"),d=n(a,"md-tab-body");if(0==i.length&&(i=t.element("<md-tab-label></md-tab-label>"),s.label?i.text(s.label):i.append(a.contents()),0==d.length)){var c=a.contents().detach();d=t.element("<md-tab-body></md-tab-body>"),d.append(c)}return a.append(i),d.html()&&a.append(d),e},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}}}function s(){return{require:"^?mdTabs",link:function(e,t,n,a){a&&a.attachRipple(e,t)}}}function i(){return{terminal:!0}}function d(e){return{restrict:"A",compile:function(t,n){var a=e(n.mdTabScroll,null,!0);return function(e,t){t.on("mousewheel",function(t){e.$apply(function(){a(e,{$event:t})})})}}}}function c(e,a,s,i,d,c,r,o,l,m){function b(){le.selectedIndex=le.selectedIndex||0,f(),p(),u(),m(a),c.nextTick(function(){be=M(),ie(),te(),de(),le.tabs[le.selectedIndex]&&le.tabs[le.selectedIndex].scope.select(),pe=!0,Y()})}function f(){var e=o.$mdTabsTemplate,n=t.element(a[0].querySelector("md-tab-data"));n.html(e),l(n.contents())(le.parent),delete o.$mdTabsTemplate}function u(){t.element(s).on("resize",O),e.$on("$destroy",x)}function p(){e.$watch("$mdTabsCtrl.selectedIndex",y)}function h(e,t){var n=o.$normalize("md-"+e);t&&K(e,t),o.$observe(n,function(t){le[e]=t})}function g(e,t){function n(t){le[e]="false"!==t}var a=o.$normalize("md-"+e);t&&K(e,t),o.hasOwnProperty(a)&&n(o[a]),o.$observe(a,n)}function x(){ue=!0,t.element(s).off("resize",O)}function T(e){var n=M();t.element(n.wrapper).toggleClass("md-stretch-tabs",j()),de()}function v(e){le.shouldCenterTabs=N()}function $(e,n){if(e!==n){var a=M();t.forEach(a.tabs,function(t){t.style.maxWidth=e+"px"}),c.nextTick(le.updateInkBarStyles)}}function C(e,t){e!==t&&(le.maxTabWidth=V(),le.shouldCenterTabs=N(),c.nextTick(function(){le.maxTabWidth=V(),te(le.selectedIndex)}))}function I(e){a[e?"removeClass":"addClass"]("md-no-tab-content")}function w(n){var a=M(),s=le.shouldCenterTabs?"":"-"+n+"px";t.element(a.paging).css(i.CSS.TRANSFORM,"translate3d("+s+", 0, 0)"),e.$broadcast("$mdTabsPaginationChanged")}function k(e,t){e!==t&&M().tabs[e]&&(te(),ee())}function y(t,n){t!==n&&(le.selectedIndex=U(t),le.lastSelectedIndex=n,le.updateInkBarStyles(),ie(),te(t),e.$broadcast("$mdTabsChanged"),le.tabs[n]&&le.tabs[n].scope.deselect(),le.tabs[t]&&le.tabs[t].scope.select())}function S(e){var t=a[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(t,e[0])}function P(){P.watcher||(P.watcher=e.$watch(function(){c.nextTick(function(){P.watcher&&a.prop("offsetParent")&&(P.watcher(),P.watcher=null,O())},!1)}))}function L(e){switch(e.keyCode){case i.KEY_CODE.LEFT_ARROW:e.preventDefault(),Z(-1,!0);break;case i.KEY_CODE.RIGHT_ARROW:e.preventDefault(),Z(1,!0);break;case i.KEY_CODE.SPACE:case i.KEY_CODE.ENTER:e.preventDefault(),me||W(le.focusIndex)}le.lastClick=!1}function W(e,t){me||(le.focusIndex=le.selectedIndex=e),le.lastClick=!0,t&&le.noSelectClick||c.nextTick(function(){le.tabs[e].element.triggerHandler("click")},!1)}function E(e){le.shouldPaginate&&(e.preventDefault(),le.offsetLeft=re(le.offsetLeft-e.wheelDelta))}function A(){var e,t,n=M(),a=n.canvas.clientWidth,s=a+le.offsetLeft;for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>s));e++);le.offsetLeft=re(t.offsetLeft)}function D(){var e,t,n=M();for(e=0;e<n.tabs.length&&(t=n.tabs[e],!(t.offsetLeft+t.offsetWidth>=le.offsetLeft));e++);le.offsetLeft=re(t.offsetLeft+t.offsetWidth-n.canvas.clientWidth)}function O(){le.lastSelectedIndex=le.selectedIndex,le.offsetLeft=re(le.offsetLeft),c.nextTick(function(){le.updateInkBarStyles(),Y()})}function B(e){t.element(M().inkBar).toggleClass("ng-hide",e)}function R(e){a.toggleClass("md-dynamic-height",e)}function F(e){if(!ue){var t=le.selectedIndex,n=le.tabs.splice(e.getIndex(),1)[0];se(),le.selectedIndex===t&&(n.scope.deselect(),le.tabs[le.selectedIndex]&&le.tabs[le.selectedIndex].scope.select()),c.nextTick(function(){Y(),le.offsetLeft=re(le.offsetLeft)})}}function q(e,n){var a=pe,s={getIndex:function(){return le.tabs.indexOf(i)},isActive:function(){return this.getIndex()===le.selectedIndex},isLeft:function(){return this.getIndex()<le.selectedIndex},isRight:function(){return this.getIndex()>le.selectedIndex},shouldRender:function(){return!le.noDisconnect||this.isActive()},hasFocus:function(){return!le.lastClick&&le.hasFocus&&this.getIndex()===le.focusIndex},id:c.nextUid()},i=t.extend(s,e);return t.isDefined(n)?le.tabs.splice(n,0,i):le.tabs.push(i),ne(),ae(),c.nextTick(function(){Y(),a&&le.autoselect&&c.nextTick(function(){c.nextTick(function(){W(le.tabs.indexOf(i))})})}),i}function M(){var e={},t=a[0];return e.wrapper=t.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.contents=t.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function H(){return le.offsetLeft>0}function _(){var e=M(),t=e.tabs[e.tabs.length-1];return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+le.offsetLeft}function j(){switch(le.stretchTabs){case"always":return!0;case"never":return!1;default:return!le.shouldPaginate&&s.matchMedia("(max-width: 600px)").matches}}function N(){return le.centerTabs&&!le.shouldPaginate}function z(){if(le.noPagination||!pe)return!1;var e=a.prop("clientWidth");return t.forEach(M().dummies,function(t){e-=t.offsetWidth}),e<0}function U(e){if(e===-1)return-1;var t,n,a=Math.max(le.tabs.length-e,e);for(t=0;t<=a;t++){if(n=le.tabs[e+t],n&&n.scope.disabled!==!0)return n.getIndex();if(n=le.tabs[e-t],n&&n.scope.disabled!==!0)return n.getIndex()}return e}function K(e,t,n){Object.defineProperty(le,e,{get:function(){return n},set:function(e){var a=n;n=e,t&&t(e,a)}})}function Y(){G(),le.maxTabWidth=V(),le.shouldPaginate=z()}function G(){var e=M();j()?t.element(e.paging).css("width",""):t.element(e.paging).css("width",J()+"px")}function J(){return Q(M().dummies)}function Q(e){var n=0;return t.forEach(e,function(e){n+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(n)}function V(){return a.prop("clientWidth")}function X(){var e=le.tabs[le.selectedIndex],t=le.tabs[le.focusIndex];le.tabs=le.tabs.sort(function(e,t){return e.index-t.index}),le.selectedIndex=le.tabs.indexOf(e),le.focusIndex=le.tabs.indexOf(t)}function Z(e,t){var n,a=t?"focusIndex":"selectedIndex",s=le[a];for(n=s+e;le.tabs[n]&&le.tabs[n].scope.disabled;n+=e);le.tabs[n]&&(le[a]=n)}function ee(){M().dummies[le.focusIndex].focus()}function te(e){var t=M();if(null==e&&(e=le.focusIndex),t.tabs[e]&&!le.shouldCenterTabs){var n=t.tabs[e],a=n.offsetLeft,s=n.offsetWidth+a;le.offsetLeft=Math.max(le.offsetLeft,re(s-t.canvas.clientWidth+64)),le.offsetLeft=Math.min(le.offsetLeft,re(a))}}function ne(){fe.forEach(function(e){c.nextTick(e)}),fe=[]}function ae(){var e=!1;t.forEach(le.tabs,function(t){t.template&&(e=!0)}),le.hasContent=e}function se(){le.selectedIndex=U(le.selectedIndex),le.focusIndex=U(le.focusIndex)}function ie(){if(!le.dynamicHeight)return a.css("height","");if(!le.tabs.length)return fe.push(ie);var e=M(),t=e.contents[le.selectedIndex],s=t?t.offsetHeight:0,i=e.wrapper.offsetHeight,d=s+i,o=a.prop("clientHeight");if(o!==d){"bottom"===a.attr("md-align-tabs")&&(o-=i,d-=i,a.attr("md-border-bottom")!==n&&++o),me=!0;var l={height:o+"px"},m={height:d+"px"};a.css(l),r(a,{from:l,to:m,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){a.css({transition:"none",height:""}),c.nextTick(function(){a.css("transition","")}),me=!1})}}function de(){var e=M();if(!e.tabs[le.selectedIndex])return void t.element(e.inkBar).css({left:"auto",right:"auto"});if(!le.tabs.length)return fe.push(le.updateInkBarStyles);if(!a.prop("offsetParent"))return P();var n=le.selectedIndex,s=e.paging.offsetWidth,i=e.tabs[n],d=i.offsetLeft,r=s-d-i.offsetWidth;if(le.shouldCenterTabs){var o=Q(e.tabs);s>o&&c.nextTick(de,!1)}ce(),t.element(e.inkBar).css({left:d+"px",right:r+"px"})}function ce(){var e=M(),n=le.selectedIndex,a=le.lastSelectedIndex,s=t.element(e.inkBar);t.isNumber(a)&&s.toggleClass("md-left",n<a).toggleClass("md-right",n>a)}function re(e){var t=M();if(!t.tabs.length||!le.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],a=n.offsetLeft+n.offsetWidth;return e=Math.max(0,e),e=Math.min(a-t.canvas.clientWidth,e)}function oe(e,n){var a=M(),s={colorElement:t.element(a.inkBar)};d.attach(e,n,s)}var le=this,me=!1,be=M(),fe=[],ue=!1,pe=!1;h("stretchTabs",T),K("focusIndex",k,le.selectedIndex||0),K("offsetLeft",w,0),K("hasContent",I,!1),K("maxTabWidth",$,V()),K("shouldPaginate",C,!1),g("noInkBar",B),g("dynamicHeight",R),g("noPagination"),g("swipeContent"),g("noDisconnect"),g("autoselect"),g("noSelectClick"),g("centerTabs",v,!1),g("enableDisconnect"),le.scope=e,le.parent=e.$parent,le.tabs=[],le.lastSelectedIndex=null,le.hasFocus=!1,le.lastClick=!0,le.shouldCenterTabs=N(),le.updatePagination=c.debounce(Y,100),le.redirectFocus=ee,le.attachRipple=oe,le.insertTab=q,le.removeTab=F,le.select=W,le.scroll=E,le.nextPage=A,le.previousPage=D,le.keydown=L,le.canPageForward=_,le.canPageBack=H,le.refreshIndex=se,le.incrementIndex=Z,le.getTabElementIndex=S,le.updateInkBarStyles=c.debounce(de,100),le.updateTabOrder=c.debounce(X,100),b()}function r(e){return{scope:{selectedIndex:"=?mdSelected"},template:function(t,n){return n.$mdTabsTemplate=t.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{::tab.id}}" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="tab-content-{{::tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}function o(e){return{require:"^?mdTabs",link:function(e,t,n,a){if(a){var s=new MutationObserver(function(e){a.updatePagination(),a.updateInkBarStyles()}),i={childList:!0,subtree:!0,characterData:!0};s.observe(t[0],i),e.$on("$destroy",function(){s&&s.disconnect()})}}}}function l(e,t){function n(n,a,s,i){function d(){n.$watch("connected",function(e){e===!1?c():r()}),n.$on("$destroy",r)}function c(){i.enableDisconnect&&t.disconnectScope(o)}function r(){i.enableDisconnect&&t.reconnectScope(o)}if(i){var o=i.enableDisconnect?n.compileScope.$new():n.compileScope;return a.html(n.template),e(a.contents())(o),t.nextTick(d)}}return{restrict:"A",link:n,scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}t.module("material.components.tabs",["material.core","material.components.icon"]),t.module("material.components.tabs").directive("mdTab",a),t.module("material.components.tabs").directive("mdTabItem",s),t.module("material.components.tabs").directive("mdTabLabel",i),t.module("material.components.tabs").directive("mdTabScroll",d),d.$inject=["$parse"],t.module("material.components.tabs").controller("MdTabsController",c),c.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming"],t.module("material.components.tabs").directive("mdTabs",r),r.$inject=["$$mdSvgRegistry"],t.module("material.components.tabs").directive("mdTabsDummyWrapper",o),o.$inject=["$mdUtil"],t.module("material.components.tabs").directive("mdTabsTemplate",l),l.$inject=["$compile","$mdUtil"]}(window,window.angular);
{
"name": "angular-material-toast",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-button": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-button": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -58,7 +58,36 @@ (function( window, angular, undefined ){

*
* ### Custom Presets
* Developers are also able to create their own preset, which can be easily used without repeating
* their options each time.
*
* <hljs lang="js">
* $mdToastProvider.addPreset('testPreset', {
* options: function() {
* return {
* template:
* '<md-toast>' +
* '<div class="md-toast-content">' +
* 'This is a custom preset' +
* '</div>' +
* '</md-toast>',
* controllerAs: 'toast',
* bindToController: true
* };
* }
* });
* </hljs>
*
* After you created your preset at config phase, you can easily access it.
*
* <hljs lang="js">
* $mdToast.show(
* $mdToast.testPreset()
* );
* </hljs>
*
* ## Parent container notes
*
* The toast is positioned using absolute positioning relative to it's first non-static parent
* The toast is positioned using absolute positioning relative to its first non-static parent
* container. Thus, if the requested parent container uses static positioning, we will temporarily
* set it's positioning to `relative` while the toast is visible and reset it when the toast is
* set its positioning to `relative` while the toast is visible and reset it when the toast is
* hidden.

@@ -170,2 +199,6 @@ *

* </tr>
* <tr>
* <td>`.toastClass(string)`</td>
* <td>Sets a class on the toast element</td>
* </tr>
* </tbody>

@@ -218,4 +251,7 @@ * </table>

* closed manually. Default: 3000.
* - `position` - `{string=}`: Where to place the toast. Available: any combination
* of 'bottom', 'left', 'top', 'right'. Default: 'bottom left'.
* - `position` - `{string=}`: Sets the position of the toast. <br/>
* Available: any combination of `'bottom'`, `'left'`, `'top'`, `'right'`, `'end'` and `'start'`.
* The properties `'end'` and `'start'` are dynamic and can be used for RTL support.<br/>
* Default combination: `'bottom left'`.
* - `toastClass` - `{string=}`: A class to set on the toast element.
* - `controller` - `{string=}`: The controller to associate with this toast.

@@ -282,3 +318,3 @@ * The controller will be injected the local `$mdToast.hide( )`, which is a function

.setDefaults({
methods: ['position', 'hideDelay', 'capsule', 'parent', 'position' ],
methods: ['position', 'hideDelay', 'capsule', 'parent', 'position', 'toastClass'],
options: toastDefaultOptions

@@ -294,3 +330,3 @@ })

' <div class="md-toast-content">' +
' <span flex class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true">' +
' <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true">' +
' {{ toast.content }}' +

@@ -344,2 +380,3 @@ ' </span>' +

onRemove: onRemove,
toastClass: '',
position: 'bottom left',

@@ -373,4 +410,5 @@ themable: true,

return templateRoot.outerHTML;
// We have to return the innerHTMl, because we do not want to have the `md-template` element to be
// the root element of our interimElement.
return templateRoot.innerHTML;
}

@@ -406,3 +444,3 @@

element.addClass('_md-' + swipe);
element.addClass('md-' + swipe);
$mdUtil.nextTick($mdToast.cancel);

@@ -412,2 +450,3 @@ };

element.addClass(options.toastClass);

@@ -423,9 +462,9 @@ // 'top left' -> 'md-top md-left'

element.on(SWIPE_EVENTS, options.onSwipe);
element.addClass(isSmScreen ? '_md-bottom' : options.position.split(' ').map(function(pos) {
return '_md-' + pos;
element.addClass(isSmScreen ? 'md-bottom' : options.position.split(' ').map(function(pos) {
return 'md-' + pos;
}).join(' '));
if (options.parent) options.parent.addClass('_md-toast-animating');
if (options.parent) options.parent.addClass('md-toast-animating');
return $animate.enter(element, options.parent).then(function() {
if (options.parent) options.parent.removeClass('_md-toast-animating');
if (options.parent) options.parent.removeClass('md-toast-animating');
});

@@ -436,3 +475,3 @@ }

element.off(SWIPE_EVENTS, options.onSwipe);
if (options.parent) options.parent.addClass('_md-toast-animating');
if (options.parent) options.parent.addClass('md-toast-animating');
if (options.openClass) options.parent.removeClass(options.openClass);

@@ -442,3 +481,3 @@

.then(function () {
if (options.parent) options.parent.removeClass('_md-toast-animating');
if (options.parent) options.parent.removeClass('md-toast-animating');
if ($mdUtil.hasComputedStyle(options.parent, 'position', 'static')) {

@@ -453,6 +492,6 @@ options.parent.css('position', '');

if (!$mdMedia('gt-xs')) {
return '_md-toast-open-bottom';
return 'md-toast-open-bottom';
}
return '_md-toast-open-' +
return 'md-toast-open-' +
(position.indexOf('top') > -1 ? 'top' : 'bottom');

@@ -459,0 +498,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,n){"use strict";function o(t){return{restrict:"E",link:function(e,n){n.addClass("_md"),e.$on("$destroy",function(){t.destroy()})}}}function a(t){function n(t){a=t}function o(t,n,o,i){function s(e,s,r){a=r.textContent||r.content;var m=!i("gt-sm");return s=o.extractElementByName(s,"md-toast",!0),r.element=s,r.onSwipe=function(t,e){var a=t.type.replace("$md.",""),i=a.replace("swipe","");"down"===i&&-1!=r.position.indexOf("top")&&!m||"up"===i&&(-1!=r.position.indexOf("bottom")||m)||("left"!==i&&"right"!==i||!m)&&(s.addClass("_md-"+a),o.nextTick(n.cancel))},r.openClass=d(r.position),r.parent.addClass(r.openClass),o.hasComputedStyle(r.parent,"position","static")&&r.parent.css("position","relative"),s.on(l,r.onSwipe),s.addClass(m?"_md-bottom":r.position.split(" ").map(function(t){return"_md-"+t}).join(" ")),r.parent&&r.parent.addClass("_md-toast-animating"),t.enter(s,r.parent).then(function(){r.parent&&r.parent.removeClass("_md-toast-animating")})}function r(e,n,a){return n.off(l,a.onSwipe),a.parent&&a.parent.addClass("_md-toast-animating"),a.openClass&&a.parent.removeClass(a.openClass),(1==a.$destroy?n.remove():t.leave(n)).then(function(){a.parent&&a.parent.removeClass("_md-toast-animating"),o.hasComputedStyle(a.parent,"position","static")&&a.parent.css("position","")})}function d(t){return i("gt-xs")?"_md-toast-open-"+(t.indexOf("top")>-1?"top":"bottom"):"_md-toast-open-bottom"}var l="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:s,onRemove:r,position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(t,n){var o=n.autoWrap&&t&&!/md-toast-content/g.test(t);if(o){var a=document.createElement("md-template");a.innerHTML=t;for(var i=0;i<a.children.length;i++)if("MD-TOAST"===a.children[i].nodeName){var s=e.element('<div class="md-toast-content">');s.append(e.element(a.children[i].childNodes)),a.children[i].appendChild(s[0])}return a.outerHTML}return t||""}}}var a,i="ok",s=t("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position"],options:o}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(t,e){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}"> <div class="md-toast-content"> <span flex class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true"> {{ toast.content }} </span> <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="highlightClasses"> {{ toast.action }} </md-button> </div></md-toast>',controller:["$scope",function(e){var n=this;n.highlightAction&&(e.highlightClasses=["md-highlight",n.highlightClass]),e.$watch(function(){return a},function(){n.content=a}),this.resolve=function(){t.hide(i)}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",n).addMethod("updateContent",n);return o.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"],s}e.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",o).provider("$mdToast",a),o.$inject=["$mdToast"],a.$inject=["$$interimElementProvider"]}(window,window.angular);
!function(t,e,n){"use strict";function o(t){return{restrict:"E",link:function(e,n){n.addClass("_md"),e.$on("$destroy",function(){t.destroy()})}}}function a(t){function n(t){a=t}function o(t,n,o,s){function i(e,i,r){a=r.textContent||r.content;var m=!s("gt-sm");return i=o.extractElementByName(i,"md-toast",!0),r.element=i,r.onSwipe=function(t,e){var a=t.type.replace("$md.",""),s=a.replace("swipe","");"down"===s&&r.position.indexOf("top")!=-1&&!m||"up"===s&&(r.position.indexOf("bottom")!=-1||m)||("left"!==s&&"right"!==s||!m)&&(i.addClass("md-"+a),o.nextTick(n.cancel))},r.openClass=d(r.position),i.addClass(r.toastClass),r.parent.addClass(r.openClass),o.hasComputedStyle(r.parent,"position","static")&&r.parent.css("position","relative"),i.on(l,r.onSwipe),i.addClass(m?"md-bottom":r.position.split(" ").map(function(t){return"md-"+t}).join(" ")),r.parent&&r.parent.addClass("md-toast-animating"),t.enter(i,r.parent).then(function(){r.parent&&r.parent.removeClass("md-toast-animating")})}function r(e,n,a){return n.off(l,a.onSwipe),a.parent&&a.parent.addClass("md-toast-animating"),a.openClass&&a.parent.removeClass(a.openClass),(1==a.$destroy?n.remove():t.leave(n)).then(function(){a.parent&&a.parent.removeClass("md-toast-animating"),o.hasComputedStyle(a.parent,"position","static")&&a.parent.css("position","")})}function d(t){return s("gt-xs")?"md-toast-open-"+(t.indexOf("top")>-1?"top":"bottom"):"md-toast-open-bottom"}var l="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:i,onRemove:r,toastClass:"",position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(t,n){var o=n.autoWrap&&t&&!/md-toast-content/g.test(t);if(o){var a=document.createElement("md-template");a.innerHTML=t;for(var s=0;s<a.children.length;s++)if("MD-TOAST"===a.children[s].nodeName){var i=e.element('<div class="md-toast-content">');i.append(e.element(a.children[s].childNodes)),a.children[s].appendChild(i[0])}return a.innerHTML}return t||""}}}var a,s="ok",i=t("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:o}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(t,e){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}"> <div class="md-toast-content"> <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true"> {{ toast.content }} </span> <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="highlightClasses"> {{ toast.action }} </md-button> </div></md-toast>',controller:["$scope",function(e){var n=this;n.highlightAction&&(e.highlightClasses=["md-highlight",n.highlightClass]),e.$watch(function(){return a},function(){n.content=a}),this.resolve=function(){t.hide(s)}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",n).addMethod("updateContent",n);return o.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"],i}e.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",o).provider("$mdToast",a),o.$inject=["$mdToast"],a.$inject=["$$interimElementProvider"]}(window,window.angular);
{
"name": "angular-material-toolbar",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-content": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-content": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -85,2 +85,6 @@ (function( window, angular, undefined ){

$mdUtil.nextTick(function () {
element.addClass('_md-toolbar-transitions'); // adding toolbar transitions after digest
}, false);
if (angular.isDefined(attr.mdScrollShrink)) {

@@ -207,3 +211,3 @@ setupScrollShrink();

$$rAF(updateToolbarHeight);
$mdUtil.nextTick(updateToolbarHeight, false);

@@ -214,4 +218,4 @@ return function disableScrollShrink() {

$$rAF(updateToolbarHeight);
}
updateToolbarHeight();
};
}

@@ -218,0 +222,0 @@

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(n,t,o){"use strict";function e(n,o,e,r,a){var i=t.bind(null,e.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(l,c,s){function d(){function r(n){var t=c.parent().find("md-content");!p&&t.length&&d(null,t),n=l.$eval(n),n===!1?$():$=f()}function d(n,t){t&&c.parent()[0]===t.parent()[0]&&(p&&p.off("scroll",v),p=t,$=f())}function m(n){var t=n?n.target.scrollTop:g;C(),S=Math.min(h/w,Math.max(0,S+t-g)),c.css(o.CSS.TRANSFORM,i([-S*w])),p.css(o.CSS.TRANSFORM,i([(h-S)*w])),g=t,e.nextTick(function(){var n=c.hasClass("md-whiteframe-z1");n&&!S?a.removeClass(c,"md-whiteframe-z1"):!n&&S&&a.addClass(c,"md-whiteframe-z1")})}function f(){return p?(p.on("scroll",v),p.attr("scroll-shrink","true"),n(u),function(){p.off("scroll",v),p.attr("scroll-shrink","false"),n(u)}):t.noop}function u(){h=c.prop("offsetHeight");var n=-h*w+"px";p.css({"margin-top":n,"margin-bottom":n}),m()}var h,p,$=t.noop,S=0,g=0,w=s.mdShrinkSpeedFactor||.5,v=n.throttle(m),C=e.debounce(u,5e3);l.$on("$mdContentLoaded",d),s.$observe("mdScrollShrink",r),s.ngShow&&l.$watch(s.ngShow,u),s.ngHide&&l.$watch(s.ngHide,u),l.$on("$destroy",$)}c.addClass("_md"),r(c),t.isDefined(s.mdScrollShrink)&&d()}}}t.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e),e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"]}(window,window.angular);
!function(n,t,o){"use strict";function e(n,o,e,r,a){var i=t.bind(null,e.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(l,s,c){function d(){function r(n){var t=s.parent().find("md-content");!p&&t.length&&d(null,t),n=l.$eval(n),n===!1?$():$=f()}function d(n,t){t&&s.parent()[0]===t.parent()[0]&&(p&&p.off("scroll",v),p=t,$=f())}function m(n){var t=n?n.target.scrollTop:g;k(),S=Math.min(h/w,Math.max(0,S+t-g)),s.css(o.CSS.TRANSFORM,i([-S*w])),p.css(o.CSS.TRANSFORM,i([(h-S)*w])),g=t,e.nextTick(function(){var n=s.hasClass("md-whiteframe-z1");n&&!S?a.removeClass(s,"md-whiteframe-z1"):!n&&S&&a.addClass(s,"md-whiteframe-z1")})}function f(){return p?(p.on("scroll",v),p.attr("scroll-shrink","true"),e.nextTick(u,!1),function(){p.off("scroll",v),p.attr("scroll-shrink","false"),u()}):t.noop}function u(){h=s.prop("offsetHeight");var n=-h*w+"px";p.css({"margin-top":n,"margin-bottom":n}),m()}var h,p,$=t.noop,S=0,g=0,w=c.mdShrinkSpeedFactor||.5,v=n.throttle(m),k=e.debounce(u,5e3);l.$on("$mdContentLoaded",d),c.$observe("mdScrollShrink",r),c.ngShow&&l.$watch(c.ngShow,u),c.ngHide&&l.$watch(c.ngHide,u),l.$on("$destroy",$)}s.addClass("_md"),r(s),e.nextTick(function(){s.addClass("_md-toolbar-transitions")},!1),t.isDefined(c.mdScrollShrink)&&d()}}}t.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e),e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"]}(window,window.angular);
{
"name": "angular-material-tooltip",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -41,3 +41,4 @@ (function( window, angular, undefined ){

* @param {expression=} md-visible Boolean bound to whether the tooltip is currently visible.
* @param {number=} md-delay How many milliseconds to wait to show the tooltip after the user focuses, hovers, or touches the parent. Defaults to 0ms.
* @param {number=} md-delay How many milliseconds to wait to show the tooltip after the user focuses, hovers, or touches the
* parent. Defaults to 0ms on non-touch devices and 75ms on touch.
* @param {boolean=} md-autohide If present or provided with a boolean value, the tooltip will hide on mouse leave, regardless of focus

@@ -47,4 +48,7 @@ * @param {string=} md-direction Which direction would you like the tooltip to go? Supports left, right, top, and bottom. Defaults to bottom.

function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdTheming, $rootElement,
$animate, $q) {
$animate, $q, $interpolate) {
var ENTER_EVENTS = 'focus touchstart mouseenter';
var LEAVE_EVENTS = 'blur touchcancel mouseleave';
var SHOW_CLASS = 'md-show';
var TOOLTIP_SHOW_DELAY = 0;

@@ -56,4 +60,4 @@ var TOOLTIP_WINDOW_EDGE_SPACE = 8;

transclude: true,
priority:210, // Before ngAria
template: '<div class="_md-content _md" ng-transclude></div>',
priority: 210, // Before ngAria
template: '<div class="md-content _md" ng-transclude></div>',
scope: {

@@ -65,3 +69,9 @@ delay: '=?mdDelay',

},
link: postLink
compile: function(tElement, tAttr) {
if (!tAttr.mdDirection) {
tAttr.$set('mdDirection', 'bottom');
}
return postLink;
}
};

@@ -74,3 +84,3 @@

var parent = $mdUtil.getParentWithPointerEvents(element),
content = angular.element(element[0].getElementsByClassName('_md-content')[0]),
content = angular.element(element[0].getElementsByClassName('md-content')[0]),
tooltipParent = angular.element(document.body),

@@ -162,7 +172,18 @@ showTimeout = null,

});
// Updates the aria-label when the element text changes. This watch
// doesn't need to be set up if the element doesn't have any data
// bindings.
if (element.text().indexOf($interpolate.startSymbol()) > -1) {
scope.$watch(function() {
return element.text().trim();
}, addAriaLabel);
}
}
function addAriaLabel () {
if (!parent.attr('aria-label') && !parent.text().trim()) {
parent.attr('aria-label', element.text().trim());
function addAriaLabel (override) {
if ((override || !parent.attr('aria-label')) && !parent.text().trim()) {
var rawText = override || element.text().trim();
var interpolatedText = $interpolate(rawText)(parent.scope());
parent.attr('aria-label', interpolatedText);
}

@@ -217,4 +238,4 @@ }

parent
.off('focus mouseenter touchstart', enterHandler)
.off('blur mouseleave touchend touchcancel', leaveHandler)
.off(ENTER_EVENTS, enterHandler)
.off(LEAVE_EVENTS, leaveHandler)
.off('mousedown', mousedownHandler);

@@ -232,6 +253,16 @@

elementFocusedOnWindowBlur = false;
return;
} else if (!scope.visible) {
parent.on(LEAVE_EVENTS, leaveHandler);
setVisible(true);
// If the user is on a touch device, we should bind the tap away after
// the `touched` in order to prevent the tooltip being removed immediately.
if (e.type === 'touchstart') {
parent.one('touchend', function() {
$mdUtil.nextTick(function() {
$document.one('touchend', leaveHandler);
}, false);
});
}
}
parent.on('blur mouseleave touchend touchcancel', leaveHandler );
setVisible(true);
};

@@ -241,4 +272,3 @@ var leaveHandler = function () {

if (autohide || mouseActive || ($document[0].activeElement !== parent[0]) ) {
if (autohide || mouseActive || $document[0].activeElement !== parent[0]) {
// When a show timeout is currently in progress, then we have to cancel it.

@@ -252,4 +282,4 @@ // Otherwise the tooltip will remain showing without focus or hover.

parent.off('blur mouseleave touchend touchcancel', leaveHandler );
parent.triggerHandler("blur");
parent.off(LEAVE_EVENTS, leaveHandler);
parent.triggerHandler('blur');
setVisible(false);

@@ -265,3 +295,3 @@ }

parent.on('mousedown', mousedownHandler);
parent.on('focus mouseenter touchstart', enterHandler );
parent.on(ENTER_EVENTS, enterHandler);
}

@@ -315,4 +345,4 @@

angular.forEach([element, content], function (element) {
$animate.addClass(element, '_md-show');
$animate.addClass(content, SHOW_CLASS).then(function() {
element.addClass(SHOW_CLASS);
});

@@ -322,13 +352,6 @@ }

function hideTooltip() {
var promises = [];
angular.forEach([element, content], function (it) {
if (it.parent() && it.hasClass('_md-show')) {
promises.push($animate.removeClass(it, '_md-show'));
}
});
$q.all(promises)
.then(function () {
if (!scope.visible) element.detach();
});
$animate.removeClass(content, SHOW_CLASS).then(function(){
element.removeClass(SHOW_CLASS);
if (!scope.visible) element.detach();
});
}

@@ -389,4 +412,4 @@

}
MdTooltipDirective.$inject = ["$timeout", "$window", "$$rAF", "$document", "$mdUtil", "$mdTheming", "$rootElement", "$animate", "$q"];
MdTooltipDirective.$inject = ["$timeout", "$window", "$$rAF", "$document", "$mdUtil", "$mdTheming", "$rootElement", "$animate", "$q", "$interpolate"];
})(window, window.angular);

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,i){"use strict";function o(t,i,o,n,r,c,a,l,u){function s(a,s,h){function m(){a.delay=a.delay||d}function v(){var t="center top";switch(a.direction){case"left":t="right center";break;case"right":t="left center";break;case"top":t="center bottom";break;case"bottom":t="center top"}O.css("transform-origin",t)}function p(t){t?E():x()}function b(){if(s[0]&&"MutationObserver"in i){var t=new MutationObserver(function(t){t.forEach(function(t){"md-visible"===t.attributeName&&(a.visibleWatcher||(a.visibleWatcher=a.$watch("visible",p))),"md-direction"===t.attributeName&&M(a.direction)})});t.observe(s[0],{attributes:!0}),h.hasOwnProperty("mdVisible")&&(a.visibleWatcher=a.$watch("visible",p))}else a.visibleWatcher=a.$watch("visible",p),a.$watch("direction",M);var e=function(){a.$destroy()};s.one("$destroy",e),q.one("$destroy",e),a.$on("$destroy",function(){y(!1),s.remove(),t&&t.disconnect()})}function w(){q.attr("aria-label")||q.text().trim()||q.attr("aria-label",s.text().trim())}function $(){s.detach(),s.attr("role","tooltip")}function g(){function o(){y(!1)}var c=!1;if(q[0]&&"MutationObserver"in i){var l=new MutationObserver(function(t){t.some(function(t){return"disabled"===t.attributeName&&q[0].disabled})&&r.nextTick(function(){y(!1)})});l.observe(q[0],{attributes:!0})}var u=function(){s=document.activeElement===q[0]},s=!1;e.element(i).on("blur",u).on("resize",P),document.addEventListener("scroll",o,!0),a.$on("$destroy",function(){e.element(i).off("blur",u).off("resize",P),q.off("focus mouseenter touchstart",d).off("blur mouseleave touchend touchcancel",f).off("mousedown",m),f(),document.removeEventListener("scroll",o,!0),l&&l.disconnect()});var d=function(t){return"focus"===t.type&&s?void(s=!1):(q.on("blur mouseleave touchend touchcancel",f),void y(!0))},f=function(){var e=a.hasOwnProperty("autohide")?a.autohide:h.hasOwnProperty("mdAutohide");(e||c||n[0].activeElement!==q[0])&&(C&&(t.cancel(C),y.queued=!1,C=null),q.off("blur mouseleave touchend touchcancel",f),q.triggerHandler("blur"),y(!1)),c=!1},m=function(){c=!0};q.on("mousedown",m),q.on("focus mouseenter touchstart",d)}function y(e){y.queued&&y.value===!!e||!y.queued&&a.visible===!!e||(y.value=!!e,y.queued||(e?(y.queued=!0,C=t(function(){a.visible=y.value,y.queued=!1,C=null,a.visibleWatcher||p(a.visible)},a.delay)):r.nextTick(function(){a.visible=!1,a.visibleWatcher||p(!1)})))}function E(){if(s[0].textContent.trim()){if(s.css({top:0,left:0}),k.append(s),r.hasComputedStyle(s,"display","none"))return a.visible=!1,void s.detach();M(),e.forEach([s,O],function(t){l.addClass(t,"_md-show")})}}function x(){var t=[];e.forEach([s,O],function(e){e.parent()&&e.hasClass("_md-show")&&t.push(l.removeClass(e,"_md-show"))}),u.all(t).then(function(){a.visible||s.detach()})}function M(){a.visible&&(v(),W())}function W(){function t(t){var e={left:t.left,top:t.top};return e.left=Math.min(e.left,k.prop("scrollWidth")-i.width-f),e.left=Math.max(e.left,f),e.top=Math.min(e.top,k.prop("scrollHeight")-i.height-f),e.top=Math.max(e.top,f),e}function e(t){return"left"===t?{left:o.left-i.width-f,top:o.top+o.height/2-i.height/2}:"right"===t?{left:o.left+o.width+f,top:o.top+o.height/2-i.height/2}:"top"===t?{left:o.left+o.width/2-i.width/2,top:o.top-i.height-f}:{left:o.left+o.width/2-i.width/2,top:o.top+o.height+f}}var i=r.offsetRect(s,k),o=r.offsetRect(q,k),n=e(a.direction),c=s.prop("offsetParent");a.direction?n=t(n):c&&n.top>c.scrollHeight-i.height-f&&(n=t(e("top"))),s.css({left:n.left+"px",top:n.top+"px"})}c(s);var q=r.getParentWithPointerEvents(s),O=e.element(s[0].getElementsByClassName("_md-content")[0]),k=e.element(document.body),C=null,P=o.throttle(function(){M()});l.pin&&l.pin(s,q),m(),$(),g(),v(),b(),w()}var d=0,f=8;return{restrict:"E",transclude:!0,priority:210,template:'<div class="_md-content _md" ng-transclude></div>',scope:{delay:"=?mdDelay",visible:"=?mdVisible",autohide:"=?mdAutohide",direction:"@?mdDirection"},link:s}}e.module("material.components.tooltip",["material.core"]).directive("mdTooltip",o),o.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q"]}(window,window.angular);
!function(t,e,i){"use strict";function n(t,i,n,o,r,c,a,l,u,s){function d(a,u,d){function b(){a.delay=a.delay||v}function w(){var t="center top";switch(a.direction){case"left":t="right center";break;case"right":t="left center";break;case"top":t="center bottom";break;case"bottom":t="center top"}P.css("transform-origin",t)}function $(t){t?O():W()}function g(){if(u[0]&&"MutationObserver"in i){var t=new MutationObserver(function(t){t.forEach(function(t){"md-visible"===t.attributeName&&(a.visibleWatcher||(a.visibleWatcher=a.$watch("visible",$))),"md-direction"===t.attributeName&&q(a.direction)})});t.observe(u[0],{attributes:!0}),d.hasOwnProperty("mdVisible")&&(a.visibleWatcher=a.$watch("visible",$))}else a.visibleWatcher=a.$watch("visible",$),a.$watch("direction",q);var e=function(){a.$destroy()};u.one("$destroy",e),k.one("$destroy",e),a.$on("$destroy",function(){M(!1),u.remove(),t&&t.disconnect()}),u.text().indexOf(s.startSymbol())>-1&&a.$watch(function(){return u.text().trim()},y)}function y(t){if((t||!k.attr("aria-label"))&&!k.text().trim()){var e=t||u.text().trim(),i=s(e)(k.scope());k.attr("aria-label",i)}}function x(){u.detach(),u.attr("role","tooltip")}function E(){function n(){M(!1)}var c=!1;if(k[0]&&"MutationObserver"in i){var l=new MutationObserver(function(t){t.some(function(t){return"disabled"===t.attributeName&&k[0].disabled})&&r.nextTick(function(){M(!1)})});l.observe(k[0],{attributes:!0})}var u=function(){s=document.activeElement===k[0]},s=!1;e.element(i).on("blur",u).on("resize",N),document.addEventListener("scroll",n,!0),a.$on("$destroy",function(){e.element(i).off("blur",u).off("resize",N),k.off(f,m).off(h,v).off("mousedown",p),v(),document.removeEventListener("scroll",n,!0),l&&l.disconnect()});var m=function(t){"focus"===t.type&&s?s=!1:a.visible||(k.on(h,v),M(!0),"touchstart"===t.type&&k.one("touchend",function(){r.nextTick(function(){o.one("touchend",v)},!1)}))},v=function(){var e=a.hasOwnProperty("autohide")?a.autohide:d.hasOwnProperty("mdAutohide");(e||c||o[0].activeElement!==k[0])&&(D&&(t.cancel(D),M.queued=!1,D=null),k.off(h,v),k.triggerHandler("blur"),M(!1)),c=!1},p=function(){c=!0};k.on("mousedown",p),k.on(f,m)}function M(e){M.queued&&M.value===!!e||!M.queued&&a.visible===!!e||(M.value=!!e,M.queued||(e?(M.queued=!0,D=t(function(){a.visible=M.value,M.queued=!1,D=null,a.visibleWatcher||$(a.visible)},a.delay)):r.nextTick(function(){a.visible=!1,a.visibleWatcher||$(!1)})))}function O(){if(u[0].textContent.trim()){if(u.css({top:0,left:0}),T.append(u),r.hasComputedStyle(u,"display","none"))return a.visible=!1,void u.detach();q(),l.addClass(P,m).then(function(){u.addClass(m)})}}function W(){l.removeClass(P,m).then(function(){u.removeClass(m),a.visible||u.detach()})}function q(){a.visible&&(w(),C())}function C(){function t(t){var e={left:t.left,top:t.top};return e.left=Math.min(e.left,T.prop("scrollWidth")-i.width-p),e.left=Math.max(e.left,p),e.top=Math.min(e.top,T.prop("scrollHeight")-i.height-p),e.top=Math.max(e.top,p),e}function e(t){return"left"===t?{left:n.left-i.width-p,top:n.top+n.height/2-i.height/2}:"right"===t?{left:n.left+n.width+p,top:n.top+n.height/2-i.height/2}:"top"===t?{left:n.left+n.width/2-i.width/2,top:n.top-i.height-p}:{left:n.left+n.width/2-i.width/2,top:n.top+n.height+p}}var i=r.offsetRect(u,T),n=r.offsetRect(k,T),o=e(a.direction),c=u.prop("offsetParent");a.direction?o=t(o):c&&o.top>c.scrollHeight-i.height-p&&(o=t(e("top"))),u.css({left:o.left+"px",top:o.top+"px"})}c(u);var k=r.getParentWithPointerEvents(u),P=e.element(u[0].getElementsByClassName("md-content")[0]),T=e.element(document.body),D=null,N=n.throttle(function(){q()});l.pin&&l.pin(u,k),b(),x(),E(),w(),g(),y()}var f="focus touchstart mouseenter",h="blur touchcancel mouseleave",m="md-show",v=0,p=8;return{restrict:"E",transclude:!0,priority:210,template:'<div class="md-content _md" ng-transclude></div>',scope:{delay:"=?mdDelay",visible:"=?mdVisible",autohide:"=?mdAutohide",direction:"@?mdDirection"},compile:function(t,e){return e.mdDirection||e.$set("mdDirection","bottom"),d}}}e.module("material.components.tooltip",["material.core"]).directive("mdTooltip",n),n.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q","$interpolate"]}(window,window.angular);
{
"name": "angular-material-virtualRepeat",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99",
"angular-material-showHide": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12",
"angular-material-showHide": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -31,5 +31,18 @@ (function( window, angular, undefined ){

*
* Virtual repeat is a limited substitute for ng-repeat that renders only
* enough dom nodes to fill the container and recycling them as the user scrolls.
* VirtualRepeat is a limited substitute for ng-repeat that renders only
* enough DOM nodes to fill the container and recycling them as the user scrolls.
*
* Once an element is not visible anymore, the VirtualRepeat recycles it and will reuse it for
* another visible item by replacing the previous dataset with the new one.
*
* **Common Issues**
* > When having one-time bindings inside of the view template, the VirtualRepeat will not properly
* > update the bindings for new items, since the view will be recycled.
*
* **Notes:**
* > The VirtualRepeat is a similar implementation to the Android
* [RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html)
*
*
*
* @usage

@@ -141,5 +154,5 @@ * <hljs lang="html">

this.scroller = $element[0].getElementsByClassName('md-virtual-repeat-scroller')[0];
this.sizer = this.scroller.getElementsByClassName('md-virtual-repeat-sizer')[0];
this.offsetter = this.scroller.getElementsByClassName('md-virtual-repeat-offsetter')[0];
this.scroller = $element[0].querySelector('.md-virtual-repeat-scroller');
this.sizer = this.scroller.querySelector('.md-virtual-repeat-sizer');
this.offsetter = this.scroller.querySelector('.md-virtual-repeat-offsetter');

@@ -630,2 +643,6 @@ // After the dom stablizes, measure the initial size of the container and

if (!this.itemSize) {
// Make sure to clean up watchers if we can (see #8178)
if(this.unwatchItemSize_ && this.unwatchItemSize_ !== angular.noop){
this.unwatchItemSize_();
}
this.unwatchItemSize_ = this.$scope.$watchCollection(

@@ -635,3 +652,3 @@ this.repeatListExpression,

if (items && items.length) {
this.$$rAF(angular.bind(this, this.readItemSize_));
this.readItemSize_();
}

@@ -699,6 +716,8 @@ }));

// If the number of items shrank, scroll up to the top.
// If the number of items shrank
if (this.items && itemsLength < this.items.length && this.container.getScrollOffset() !== 0) {
this.items = items;
var previousScrollOffset = this.container.getScrollOffset();
this.container.resetScroll();
this.container.scrollTo(previousScrollOffset);
return;

@@ -705,0 +724,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(t,e,i){"use strict";function s(){return{controller:o,template:n,compile:function(t,e){t.addClass("md-virtual-repeat-container").addClass(e.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function n(t){return'<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">'+t[0].innerHTML+"</div></div>"}function o(t,i,s,n,o,r,h,l){this.$rootScope=n,this.$scope=r,this.$element=h,this.$attrs=l,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.$attrs.mdTopIndex?(this.bindTopIndex=s(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),e.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,e.bind(this,function(t){t!==this.topIndex&&this.scrollToIndex(t)}))):this.topIndex=0,this.scroller=h[0].getElementsByClassName("md-virtual-repeat-scroller")[0],this.sizer=this.scroller.getElementsByClassName("md-virtual-repeat-sizer")[0],this.offsetter=this.scroller.getElementsByClassName("md-virtual-repeat-offsetter")[0];var a=e.bind(this,this.updateSize);t(e.bind(this,function(){a();var t=i.debounce(a,10,null,!1),s=e.element(o);this.size||t(),s.on("resize",t),r.$on("$destroy",function(){s.off("resize",t)}),r.$emit("$md-resize-enable"),r.$on("$md-resize",a)}))}function r(t){return{controller:h,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,i){var s=i.mdVirtualRepeat,n=s.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),o=n[1],r=t(n[2]),h=i.mdExtraName&&t(i.mdExtraName);return function(t,e,i,s,n){s[0].link_(s[1],n,o,r,h)}}}}function h(t,i,s,n,o,r,h,l){this.$scope=t,this.$element=i,this.$attrs=s,this.$browser=n,this.$document=o,this.$rootScope=r,this.$$rAF=h,this.onDemand=l.parseAttributeBoolean(s.mdOnDemand),this.browserCheckUrlChange=n.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=t.$eval(s.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=e.noop,this.blocks={},this.pooledBlocks=[],t.$on("$destroy",e.bind(this,this.cleanupBlocks_))}function l(t){if(!e.isFunction(t.getItemAtIndex)||!e.isFunction(t.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=t}e.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",s).directive("mdVirtualRepeat",r);var a=1533917,d=3;o.$inject=["$$rAF","$mdUtil","$parse","$rootScope","$window","$scope","$element","$attrs"],o.prototype.register=function(t){this.repeater=t,e.element(this.scroller).on("scroll wheel touchmove touchend",e.bind(this,this.handleScroll_))},o.prototype.isHorizontal=function(){return this.horizontal},o.prototype.getSize=function(){return this.size},o.prototype.setSize_=function(t){var e=this.getDimensionName_();this.size=t,this.$element[0].style[e]=t+"px"},o.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},o.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},o.prototype.getScrollSize=function(){return this.scrollSize},o.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},o.prototype.sizeScroller_=function(t){var e=this.getDimensionName_(),i=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",a>t)this.sizer.style[e]=t+"px";else{this.sizer.style[e]="auto",this.sizer.style[i]="auto";var s=Math.floor(t/a),n=document.createElement("div");n.style[e]="1533917px",n.style[i]="1px";for(var o=0;s>o;o++)this.sizer.appendChild(n.cloneNode(!1));n.style[e]=t-s*a+"px",this.sizer.appendChild(n)}},o.prototype.autoShrink_=function(t){var e=Math.max(t,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&e!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var i=this.originalSize||this.size;if(!i||i>e)this.originalSize||(this.originalSize=this.size),this.setSize_(e);else if(null!==this.originalSize){this.unsetSize_();var s=this.originalSize;this.originalSize=null,s||this.updateSize(),this.setSize_(s||this.size)}this.repeater.containerUpdated()}},o.prototype.setScrollSize=function(t){var e=t+this.offsetSize;this.scrollSize!==e&&(this.sizeScroller_(e),this.autoShrink_(e),this.scrollSize=e)},o.prototype.getScrollOffset=function(){return this.scrollOffset},o.prototype.scrollTo=function(t){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=t,this.handleScroll_()},o.prototype.scrollToIndex=function(t){var e=this.repeater.getItemSize(),i=this.repeater.itemsLength;t>i&&(t=i-1),this.scrollTo(e*t)},o.prototype.resetScroll=function(){this.scrollTo(0)},o.prototype.handleScroll_=function(){var t=e.element(document)[0],i="rtl"!=t.dir&&"rtl"!=t.body.dir;i||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var s=this.isHorizontal()?i?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(s===this.scrollOffset||s>this.scrollSize-this.size)){var n=this.repeater.getItemSize();if(n){var o=Math.max(0,Math.floor(s/n)-d),r=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||i?o*n:-(o*n))+"px)";if(this.scrollOffset=s,this.offsetter.style.webkitTransform=r,this.offsetter.style.transform=r,this.bindTopIndex){var h=Math.floor(s/n);h!==this.topIndex&&h<this.repeater.getItemCount()&&(this.topIndex=h,this.bindTopIndex.assign(this.$scope,h),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},r.$inject=["$parse"],h.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],h.Block,h.prototype.link_=function(t,i,s,n,o){this.container=t,this.transclude=i,this.repeatName=s,this.rawRepeatListExpression=n,this.extraName=o,this.sized=!1,this.repeatListExpression=e.bind(this,this.repeatListExpression_),this.container.register(this)},h.prototype.cleanupBlocks_=function(){e.forEach(this.pooledBlocks,function(t){t.element.remove()})},h.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var t=this.getBlock_(0);t.element[0].parentNode||this.parentNode.appendChild(t.element[0]),this.itemSize=t.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=t,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},h.prototype.repeatListExpression_=function(t){var e=this.rawRepeatListExpression(t);if(this.onDemand&&e){var i=new l(e);return i.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),i}return e},h.prototype.containerUpdated=function(){return this.itemSize?(this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,e.bind(this,function(t,e){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(t,e)}))),this.updateIndexes_(),void((this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof l&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items)))):(this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,e.bind(this,function(t){t&&t.length&&this.$$rAF(e.bind(this,this.readItemSize_))})),void(this.$rootScope.$$phase||this.$scope.$digest()))},h.prototype.getItemSize=function(){return this.itemSize},h.prototype.getItemCount=function(){return this.itemsLength},h.prototype.virtualRepeatUpdate_=function(t,i){this.isVirtualRepeatUpdating_=!0;var s=t&&t.length||0,n=!1;if(this.items&&s<this.items.length&&0!==this.container.getScrollOffset())return this.items=t,void this.container.resetScroll();if(s!==this.itemsLength&&(n=!0,this.itemsLength=s),this.items=t,(t!==i||n)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,n&&this.container.setScrollSize(s*this.itemSize),this.isFirstRender){this.isFirstRender=!1;var o=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.container.scrollToIndex(o)}Object.keys(this.blocks).forEach(function(t){var e=parseInt(t,10);(e<this.newStartIndex||e>=this.newEndIndex)&&this.poolBlock_(e)},this),this.$browser.$$checkUrlChange=e.noop;var r,h,l=[],a=[];for(r=this.newStartIndex;r<this.newEndIndex&&null==this.blocks[r];r++)h=this.getBlock_(r),this.updateBlock_(h,r),l.push(h);for(;null!=this.blocks[r];r++)this.updateBlock_(this.blocks[r],r);for(var d=r-1;r<this.newEndIndex;r++)h=this.getBlock_(r),this.updateBlock_(h,r),a.push(h);l.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(l),this.$element[0].nextSibling),a.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(a),this.blocks[d]&&this.blocks[d].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isVirtualRepeatUpdating_=!1},h.prototype.getBlock_=function(t){if(this.pooledBlocks.length)return this.pooledBlocks.pop();var i;return this.transclude(e.bind(this,function(e,s){i={element:e,"new":!0,scope:s},this.updateScope_(s,t),this.parentNode.appendChild(e[0])})),i},h.prototype.updateBlock_=function(t,e){this.blocks[e]=t,(t["new"]||t.scope.$index!==e||t.scope[this.repeatName]!==this.items[e])&&(t["new"]=!1,this.updateScope_(t.scope,e),this.$rootScope.$$phase||t.scope.$digest())},h.prototype.updateScope_=function(t,e){t.$index=e,t[this.repeatName]=this.items&&this.items[e],this.extraName&&(t[this.extraName(this.$scope)]=this.items[e])},h.prototype.poolBlock_=function(t){this.pooledBlocks.push(this.blocks[t]),this.parentNode.removeChild(this.blocks[t].element[0]),delete this.blocks[t]},h.prototype.domFragmentFromBlocks_=function(t){var e=this.$document[0].createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element[0])}),e},h.prototype.updateIndexes_=function(){var t=this.items?this.items.length:0,e=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(t-e,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+e+d,this.newEndIndex=Math.min(t,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-d)},l.prototype.$$includeIndexes=function(t,e){for(var i=t;e>i;i++)this.hasOwnProperty(i)||(this[i]=this.model.getItemAtIndex(i));this.length=this.model.getLength()}}(window,window.angular);
!function(t,e,i){"use strict";function s(){return{controller:o,template:n,compile:function(t,e){t.addClass("md-virtual-repeat-container").addClass(e.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function n(t){return'<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">'+t[0].innerHTML+"</div></div>"}function o(t,i,s,n,o,r,h,l){this.$rootScope=n,this.$scope=r,this.$element=h,this.$attrs=l,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.$attrs.mdTopIndex?(this.bindTopIndex=s(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),e.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,e.bind(this,function(t){t!==this.topIndex&&this.scrollToIndex(t)}))):this.topIndex=0,this.scroller=h[0].querySelector(".md-virtual-repeat-scroller"),this.sizer=this.scroller.querySelector(".md-virtual-repeat-sizer"),this.offsetter=this.scroller.querySelector(".md-virtual-repeat-offsetter");var a=e.bind(this,this.updateSize);t(e.bind(this,function(){a();var t=i.debounce(a,10,null,!1),s=e.element(o);this.size||t(),s.on("resize",t),r.$on("$destroy",function(){s.off("resize",t)}),r.$emit("$md-resize-enable"),r.$on("$md-resize",a)}))}function r(t){return{controller:h,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,i){var s=i.mdVirtualRepeat,n=s.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),o=n[1],r=t(n[2]),h=i.mdExtraName&&t(i.mdExtraName);return function(t,e,i,s,n){s[0].link_(s[1],n,o,r,h)}}}}function h(t,i,s,n,o,r,h,l){this.$scope=t,this.$element=i,this.$attrs=s,this.$browser=n,this.$document=o,this.$rootScope=r,this.$$rAF=h,this.onDemand=l.parseAttributeBoolean(s.mdOnDemand),this.browserCheckUrlChange=n.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=t.$eval(s.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=e.noop,this.blocks={},this.pooledBlocks=[],t.$on("$destroy",e.bind(this,this.cleanupBlocks_))}function l(t){if(!e.isFunction(t.getItemAtIndex)||!e.isFunction(t.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=t}e.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",s).directive("mdVirtualRepeat",r);var a=1533917,c=3;o.$inject=["$$rAF","$mdUtil","$parse","$rootScope","$window","$scope","$element","$attrs"],o.prototype.register=function(t){this.repeater=t,e.element(this.scroller).on("scroll wheel touchmove touchend",e.bind(this,this.handleScroll_))},o.prototype.isHorizontal=function(){return this.horizontal},o.prototype.getSize=function(){return this.size},o.prototype.setSize_=function(t){var e=this.getDimensionName_();this.size=t,this.$element[0].style[e]=t+"px"},o.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},o.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},o.prototype.getScrollSize=function(){return this.scrollSize},o.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},o.prototype.sizeScroller_=function(t){var e=this.getDimensionName_(),i=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",t<a)this.sizer.style[e]=t+"px";else{this.sizer.style[e]="auto",this.sizer.style[i]="auto";var s=Math.floor(t/a),n=document.createElement("div");n.style[e]="1533917px",n.style[i]="1px";for(var o=0;o<s;o++)this.sizer.appendChild(n.cloneNode(!1));n.style[e]=t-s*a+"px",this.sizer.appendChild(n)}},o.prototype.autoShrink_=function(t){var e=Math.max(t,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&e!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var i=this.originalSize||this.size;if(!i||e<i)this.originalSize||(this.originalSize=this.size),this.setSize_(e);else if(null!==this.originalSize){this.unsetSize_();var s=this.originalSize;this.originalSize=null,s||this.updateSize(),this.setSize_(s||this.size)}this.repeater.containerUpdated()}},o.prototype.setScrollSize=function(t){var e=t+this.offsetSize;this.scrollSize!==e&&(this.sizeScroller_(e),this.autoShrink_(e),this.scrollSize=e)},o.prototype.getScrollOffset=function(){return this.scrollOffset},o.prototype.scrollTo=function(t){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=t,this.handleScroll_()},o.prototype.scrollToIndex=function(t){var e=this.repeater.getItemSize(),i=this.repeater.itemsLength;t>i&&(t=i-1),this.scrollTo(e*t)},o.prototype.resetScroll=function(){this.scrollTo(0)},o.prototype.handleScroll_=function(){var t=e.element(document)[0],i="rtl"!=t.dir&&"rtl"!=t.body.dir;i||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var s=this.isHorizontal()?i?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(s===this.scrollOffset||s>this.scrollSize-this.size)){var n=this.repeater.getItemSize();if(n){var o=Math.max(0,Math.floor(s/n)-c),r=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||i?o*n:-(o*n))+"px)";if(this.scrollOffset=s,this.offsetter.style.webkitTransform=r,this.offsetter.style.transform=r,this.bindTopIndex){var h=Math.floor(s/n);h!==this.topIndex&&h<this.repeater.getItemCount()&&(this.topIndex=h,this.bindTopIndex.assign(this.$scope,h),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},r.$inject=["$parse"],h.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],h.Block,h.prototype.link_=function(t,i,s,n,o){this.container=t,this.transclude=i,this.repeatName=s,this.rawRepeatListExpression=n,this.extraName=o,this.sized=!1,this.repeatListExpression=e.bind(this,this.repeatListExpression_),this.container.register(this)},h.prototype.cleanupBlocks_=function(){e.forEach(this.pooledBlocks,function(t){t.element.remove()})},h.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var t=this.getBlock_(0);t.element[0].parentNode||this.parentNode.appendChild(t.element[0]),this.itemSize=t.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=t,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},h.prototype.repeatListExpression_=function(t){var e=this.rawRepeatListExpression(t);if(this.onDemand&&e){var i=new l(e);return i.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),i}return e},h.prototype.containerUpdated=function(){return this.itemSize?(this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,e.bind(this,function(t,e){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(t,e)}))),this.updateIndexes_(),void((this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof l&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items)))):(this.unwatchItemSize_&&this.unwatchItemSize_!==e.noop&&this.unwatchItemSize_(),this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,e.bind(this,function(t){t&&t.length&&this.readItemSize_()})),void(this.$rootScope.$$phase||this.$scope.$digest()))},h.prototype.getItemSize=function(){return this.itemSize},h.prototype.getItemCount=function(){return this.itemsLength},h.prototype.virtualRepeatUpdate_=function(t,i){this.isVirtualRepeatUpdating_=!0;var s=t&&t.length||0,n=!1;if(this.items&&s<this.items.length&&0!==this.container.getScrollOffset()){this.items=t;var o=this.container.getScrollOffset();return this.container.resetScroll(),void this.container.scrollTo(o)}if(s!==this.itemsLength&&(n=!0,this.itemsLength=s),this.items=t,(t!==i||n)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,n&&this.container.setScrollSize(s*this.itemSize),this.isFirstRender){this.isFirstRender=!1;var r=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.container.scrollToIndex(r)}Object.keys(this.blocks).forEach(function(t){var e=parseInt(t,10);(e<this.newStartIndex||e>=this.newEndIndex)&&this.poolBlock_(e)},this),this.$browser.$$checkUrlChange=e.noop;var h,l,a=[],c=[];for(h=this.newStartIndex;h<this.newEndIndex&&null==this.blocks[h];h++)l=this.getBlock_(h),this.updateBlock_(l,h),a.push(l);for(;null!=this.blocks[h];h++)this.updateBlock_(this.blocks[h],h);for(var d=h-1;h<this.newEndIndex;h++)l=this.getBlock_(h),this.updateBlock_(l,h),c.push(l);a.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(a),this.$element[0].nextSibling),c.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(c),this.blocks[d]&&this.blocks[d].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isVirtualRepeatUpdating_=!1},h.prototype.getBlock_=function(t){if(this.pooledBlocks.length)return this.pooledBlocks.pop();var i;return this.transclude(e.bind(this,function(e,s){i={element:e,"new":!0,scope:s},this.updateScope_(s,t),this.parentNode.appendChild(e[0])})),i},h.prototype.updateBlock_=function(t,e){this.blocks[e]=t,(t["new"]||t.scope.$index!==e||t.scope[this.repeatName]!==this.items[e])&&(t["new"]=!1,this.updateScope_(t.scope,e),this.$rootScope.$$phase||t.scope.$digest())},h.prototype.updateScope_=function(t,e){t.$index=e,t[this.repeatName]=this.items&&this.items[e],this.extraName&&(t[this.extraName(this.$scope)]=this.items[e])},h.prototype.poolBlock_=function(t){this.pooledBlocks.push(this.blocks[t]),this.parentNode.removeChild(this.blocks[t].element[0]),delete this.blocks[t]},h.prototype.domFragmentFromBlocks_=function(t){var e=this.$document[0].createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element[0])}),e},h.prototype.updateIndexes_=function(){var t=this.items?this.items.length:0,e=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(t-e,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+e+c,this.newEndIndex=Math.min(t,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-c)},l.prototype.$$includeIndexes=function(t,e){for(var i=t;i<e;i++)this.hasOwnProperty(i)||(this[i]=this.model.getItemAtIndex(i));this.length=this.model.getLength()}}(window,window.angular);
{
"name": "angular-material-whiteframe",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0-rc.5-master-c447c12",
"dependencies": {
"angular-material-core": "1.1.0-rc4-master-06e7e99"
"angular-material-core": "1.1.0-rc.5-master-c447c12"
}
}

@@ -5,3 +5,3 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0
*/

@@ -23,3 +23,2 @@ (function( window, angular, undefined ){

* @name mdWhiteframe
* @restrict A
*

@@ -29,3 +28,4 @@ * @description

*
* The attribute values needs to be a number between 1 and 24.
* The attribute values needs to be a number between 1 and 24 or -1.
* When set to -1 no style is applied.
*

@@ -42,4 +42,17 @@ * ### Notes

* </hljs>
*
* <hljs lang="html">
* <div md-whiteframe="-1">
* <span>No elevation shadow applied</span>
* </div>
* </hljs>
*
* <hljs lang="html">
* <div ng-init="elevation = 5" md-whiteframe="{{elevation}}">
* <span>Elevation of 5dp with an interpolated value</span>
* </div>
* </hljs>
*/
function MdWhiteframeDirective($log) {
var DISABLE_DP = -1;
var MIN_DP = 1;

@@ -50,3 +63,2 @@ var MAX_DP = 24;

return {
restrict: 'A',
link: postLink

@@ -56,10 +68,16 @@ };

function postLink(scope, element, attr) {
var elevation = parseInt(attr.mdWhiteframe, 10) || DEFAULT_DP;
var oldClass = '';
if (elevation > MAX_DP || elevation < MIN_DP) {
$log.warn('md-whiteframe attribute value is invalid. It should be a number between ' + MIN_DP + ' and ' + MAX_DP, element[0]);
elevation = DEFAULT_DP;
}
attr.$observe('mdWhiteframe', function(elevation) {
elevation = parseInt(elevation, 10) || DEFAULT_DP;
element.addClass('md-whiteframe-' + elevation + 'dp');
if (elevation != DISABLE_DP && (elevation > MAX_DP || elevation < MIN_DP)) {
$log.warn('md-whiteframe attribute value is invalid. It should be a number between ' + MIN_DP + ' and ' + MAX_DP, element[0]);
elevation = DEFAULT_DP;
}
var newClass = elevation == DISABLE_DP ? '' : 'md-whiteframe-' + elevation + 'dp';
attr.$updateClass(newClass, oldClass);
oldClass = newClass;
});
}

@@ -66,0 +84,0 @@ }

@@ -5,4 +5,4 @@ /*!

* @license MIT
* v1.1.0-rc4-master-06e7e99
* v1.1.0-rc.5-master-c447c12
*/
!function(e,t,a){"use strict";function i(e){function t(t,n,d){var m=parseInt(d.mdWhiteframe,10)||r;(m>i||a>m)&&(e.warn("md-whiteframe attribute value is invalid. It should be a number between "+a+" and "+i,n[0]),m=r),n.addClass("md-whiteframe-"+m+"dp")}var a=1,i=24,r=4;return{restrict:"A",link:t}}t.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",i),i.$inject=["$log"]}(window,window.angular);
!function(e,t,a){"use strict";function i(e){function t(t,m,d){var o="";d.$observe("mdWhiteframe",function(t){t=parseInt(t,10)||r,t!=a&&(t>n||t<i)&&(e.warn("md-whiteframe attribute value is invalid. It should be a number between "+i+" and "+n,m[0]),t=r);var u=t==a?"":"md-whiteframe-"+t+"dp";d.$updateClass(u,o),o=u})}var a=-1,i=1,n=24,r=4;return{link:t}}t.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",i),i.$inject=["$log"]}(window,window.angular);
{
"name": "angular-material",
"version": "1.1.0-rc4-master-06e7e99",
"version": "1.1.0",
"main": "index",

@@ -47,2 +47,2 @@ "format": "cjs",

}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc