/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v0.10.0 */ !function(e,t,n){"use strict";function o(){return{restrict:"E"}}function r(e){function n(e,n,a,l,c,i,s,m,d){function u(o,r,d){r=a.extractElementByName(r,"md-bottom-sheet"),S=c('')(o),S.on("click",function(){l(s.cancel)}),i.inherit(S,d.parent),e.enter(S,d.parent,null);var u=new f(r,d.parent);return d.bottomSheet=u,d.targetEvent&&t.element(d.targetEvent.target).blur(),i.inherit(u.element,d.parent),d.disableParentScroll&&(d.lastOverflow=d.parent.css("overflow"),d.parent.css("overflow","hidden")),e.enter(u.element,d.parent).then(function(){var e=t.element(r[0].querySelector("button")||r[0].querySelector("a")||r[0].querySelector("[ng-click]"));e.focus(),d.escapeToClose&&(d.rootElementKeyupCallback=function(e){e.keyCode===n.KEY_CODE.ESCAPE&&l(s.cancel)},m.on("keyup",d.rootElementKeyupCallback))})}function p(n,o,r){var a=r.bottomSheet;return e.leave(S),e.leave(a.element).then(function(){r.disableParentScroll&&(r.parent.css("overflow",r.lastOverflow),delete r.lastOverflow),a.cleanup(),r.targetEvent&&t.element(r.targetEvent.target).focus()})}function f(e,t){function a(t){e.css(n.CSS.TRANSITION_DURATION,"0ms")}function c(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 i(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>o)){var r=e.prop("offsetHeight")-t.pointer.distanceY,a=Math.min(r/t.pointer.velocityY*.75,500);e.css(n.CSS.TRANSITION_DURATION,a+"ms"),l(s.cancel)}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",a).on("$md.drag",c).on("$md.dragend",i),{element:e,cleanup:function(){m(),t.off("$md.dragstart",a).off("$md.drag",c).off("$md.dragend",i)}}}var S;return{themable:!0,targetEvent:null,onShow:u,onRemove:p,escapeToClose:!0,disableParentScroll:!0}}var o=.5,r=80;return n.$inject=["$animate","$mdConstant","$mdUtil","$timeout","$compile","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","targetEvent"],options:n})}t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",o).provider("$mdBottomSheet",r),r.$inject=["$$interimElementProvider"]}(window,window.angular);