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

@material/drawer

Package Overview
Dependencies
Maintainers
10
Versions
1688
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/drawer - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

2

dist/mdc.drawer.min.js

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

*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.drawer=e():(t.mdc=t.mdc||{},t.mdc.drawer=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=39)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return o(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(0),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var o=arguments.length,i=Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.initialize.apply(this,i),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return i(t,null,[{key:"attachTo",value:function(e){return new t(e,new o.a)}}]),i(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(3);n.d(e,"MDCFoundation",function(){return r.a}),n.d(e,"MDCComponent",function(){return o.a}),n.d(e,"SelectionControlState",function(){return i.a})},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=void 0},,,,,,,,function(t,e,n){"use strict";var r=n(43);n.d(e,"a",function(){return r.a});var o=n(44);n.d(e,"b",function(){return o.a})},,function(t,e,n){"use strict";function r(t){if(!("ontouchstart"in(arguments.length>1&&void 0!==arguments[1]?arguments[1]:window).document))switch(t){case"touchstart":return"pointerdown";case"touchmove":return"pointermove";case"touchend":return"pointerup";default:return t}return t}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===d||e){var n=t.document.createElement("div"),r="transform"in n.style?"transform":"-webkit-transform";d=r}return d}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return"CSS"in t&&t.CSS.supports("(--color: red)")}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===f||e){var n=!1;try{t.document.addEventListener("test",null,{get passive(){n=!0}})}catch(t){}f=n}return!!f&&{passive:!0}}function s(t){t.hasAttribute("tabindex")&&t.setAttribute(c,t.getAttribute("tabindex")),t.setAttribute(l,!0)}function u(t){t.hasAttribute(l)&&(t.hasAttribute(c)?(t.setAttribute("tabindex",t.getAttribute(c)),t.removeAttribute(c)):t.removeAttribute("tabindex"),t.removeAttribute(l))}Object.defineProperty(e,"__esModule",{value:!0}),e.remapEvent=r,e.getTransformPropertyName=o,e.supportsCssCustomProperties=i,e.applyPassive=a,e.saveElementTabState=s,e.restoreElementTabState=u;var c="data-mdc-tabindex",l="data-mdc-tabindex-handled",d=void 0,f=void 0},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(40)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),o=n(41);n.d(e,"MDCTemporaryDrawer",function(){return o.a}),n.d(e,"MDCTemporaryDrawerFoundation",function(){return o.b});var i=n(46);n.d(e,"MDCPersistentDrawer",function(){return i.a}),n.d(e,"MDCPersistentDrawerFoundation",function(){return i.b}),n.d(e,"util",function(){return r})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(2),s=n(42),u=n(13);n.d(e,"b",function(){return s.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this,e=s.a.strings,n=e.FOCUSABLE_ELEMENTS,r=e.OPACITY_VAR_NAME;return new s.a({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},addBodyClass:function(t){return document.body.classList.add(t)},removeBodyClass:function(t){return document.body.classList.remove(t)},hasNecessaryDom:function(){return Boolean(t.drawer)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(u.remapEvent(e),n,u.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(u.remapEvent(e),n,u.applyPassive())},registerDrawerInteractionHandler:function(e,n){return t.drawer.addEventListener(u.remapEvent(e),n)},deregisterDrawerInteractionHandler:function(e,n){return t.drawer.removeEventListener(u.remapEvent(e),n)},registerTransitionEndHandler:function(e){return t.drawer.addEventListener("transitionend",e)},deregisterTransitionEndHandler:function(e){return t.drawer.removeEventListener("transitionend",e)},registerDocumentKeydownHandler:function(t){return document.addEventListener("keydown",t)},deregisterDocumentKeydownHandler:function(t){return document.removeEventListener("keydown",t)},getDrawerWidth:function(){return t.drawer.offsetWidth},setTranslateX:function(e){return t.drawer.style.setProperty(u.getTransformPropertyName(),null===e?null:"translateX("+e+"px)")},updateCssVariable:function(e){u.supportsCssCustomProperties()&&t.root_.style.setProperty(r,e)},getFocusableElements:function(){return t.drawer.querySelectorAll(n)},saveElementTabState:function(t){return u.saveElementTabState(t)},restoreElementTabState:function(t){return u.restoreElementTabState(t)},makeElementUntabbable:function(t){return t.setAttribute("tabindex",-1)},notifyOpen:function(){return t.emit(s.a.strings.OPEN_EVENT)},notifyClose:function(){return t.emit(s.a.strings.CLOSE_EVENT)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},isDrawer:function(e){return e===t.drawer}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()}},{key:"drawer",get:function(){return this.root_.querySelector(s.a.strings.DRAWER_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(11),s=n(45),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(t){r(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t),e.cssClasses.ROOT,e.cssClasses.ANIMATING,e.cssClasses.OPEN));return n.componentClickHandler_=function(){return n.close()},n}return i(e,t),l(e,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return u(a.b.defaultAdapter,{addBodyClass:function(){},removeBodyClass:function(){},isDrawer:function(){return!1},updateCssVariable:function(){}})}}]),l(e,[{key:"init",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"init",this).call(this),this.adapter_.updateCssVariable(0),this.adapter_.registerInteractionHandler("click",this.componentClickHandler_)}},{key:"destroy",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this.adapter_.deregisterInteractionHandler("click",this.componentClickHandler_),this.enableScroll_()}},{key:"open",value:function(){this.disableScroll_(),this.adapter_.updateCssVariable(""),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"open",this).call(this)}},{key:"close",value:function(){this.adapter_.updateCssVariable(""),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"close",this).call(this)}},{key:"prepareForTouchEnd_",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"prepareForTouchEnd_",this).call(this),this.adapter_.updateCssVariable("")}},{key:"updateDrawer_",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDrawer_",this).call(this);var t=Math.max(0,1+this.direction_*(this.newPosition_/this.drawerWidth_));this.adapter_.updateCssVariable(t)}},{key:"isRootTransitioningEventTarget_",value:function(t){return this.adapter_.isDrawer(t)}},{key:"handleTransitionEnd_",value:function(t){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"handleTransitionEnd_",this).call(this,t),this.isOpen_||this.enableScroll_()}},{key:"disableScroll_",value:function(){this.adapter_.addBodyClass(s.a.SCROLL_LOCK)}},{key:"enableScroll_",value:function(){this.adapter_.removeBodyClass(s.a.SCROLL_LOCK)}}]),e}(a.b);e.a=d},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]"},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return c});var a=n(2),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t){function e(t,n,i,a){r(this,e);var u=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s(e.defaultAdapter,t)));return u.rootCssClass_=n,u.animatingCssClass_=i,u.openCssClass_=a,u.transitionEndHandler_=function(t){return u.handleTransitionEnd_(t)},u.inert_=!1,u.drawerClickHandler_=function(t){return t.stopPropagation()},u.componentTouchStartHandler_=function(t){return u.handleTouchStart_(t)},u.componentTouchMoveHandler_=function(t){return u.handleTouchMove_(t)},u.componentTouchEndHandler_=function(t){return u.handleTouchEnd_(t)},u.documentKeydownHandler_=function(t){(t.key&&"Escape"===t.key||27===t.keyCode)&&u.close()},u}return i(e,t),u(e,null,[{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){},hasNecessaryDom:function(){return!1},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDrawerInteractionHandler:function(){},deregisterDrawerInteractionHandler:function(){},registerTransitionEndHandler:function(){},deregisterTransitionEndHandler:function(){},registerDocumentKeydownHandler:function(){},deregisterDocumentKeydownHandler:function(){},setTranslateX:function(){},getFocusableElements:function(){},saveElementTabState:function(){},restoreElementTabState:function(){},makeElementUntabbable:function(){},notifyOpen:function(){},notifyClose:function(){},isRtl:function(){return!1},getDrawerWidth:function(){return 0}}}}]),u(e,[{key:"init",value:function(){var t=this.rootCssClass_,e=this.openCssClass_;if(!this.adapter_.hasClass(t))throw new Error(t+" class required in root element.");if(!this.adapter_.hasNecessaryDom())throw new Error("Required DOM nodes missing in "+t+" component.");this.adapter_.hasClass(e)?this.isOpen_=!0:(this.detabinate_(),this.isOpen_=!1),this.adapter_.registerDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.registerDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.registerInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.registerInteractionHandler("touchend",this.componentTouchEndHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.deregisterDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.deregisterInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.deregisterInteractionHandler("touchend",this.componentTouchEndHandler_),this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_)}},{key:"open",value:function(){this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.registerDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.addClass(this.animatingCssClass_),this.adapter_.addClass(this.openCssClass_),this.retabinate_(),this.isOpen_||this.adapter_.notifyOpen(),this.isOpen_=!0}},{key:"close",value:function(){this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.addClass(this.animatingCssClass_),this.adapter_.removeClass(this.openCssClass_),this.detabinate_(),this.isOpen_&&this.adapter_.notifyClose(),this.isOpen_=!1}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"detabinate_",value:function(){if(!this.inert_){var t=this.adapter_.getFocusableElements();if(t)for(var e=0;e<t.length;e++)this.adapter_.saveElementTabState(t[e]),this.adapter_.makeElementUntabbable(t[e]);this.inert_=!0}}},{key:"retabinate_",value:function(){if(this.inert_){var t=this.adapter_.getFocusableElements();if(t)for(var e=0;e<t.length;e++)this.adapter_.restoreElementTabState(t[e]);this.inert_=!1}}},{key:"handleTouchStart_",value:function(t){this.adapter_.hasClass(this.openCssClass_)&&(t.pointerType&&"touch"!==t.pointerType||(this.direction_=this.adapter_.isRtl()?-1:1,this.drawerWidth_=this.adapter_.getDrawerWidth(),this.startX_=t.touches?t.touches[0].pageX:t.pageX,this.currentX_=this.startX_,this.updateRaf_=requestAnimationFrame(this.updateDrawer_.bind(this))))}},{key:"handleTouchMove_",value:function(t){t.pointerType&&"touch"!==t.pointerType||(this.currentX_=t.touches?t.touches[0].pageX:t.pageX)}},{key:"handleTouchEnd_",value:function(t){t.pointerType&&"touch"!==t.pointerType||(this.prepareForTouchEnd_(),Math.abs(this.newPosition_/this.drawerWidth_)>=.5?this.close():this.open())}},{key:"prepareForTouchEnd_",value:function(){cancelAnimationFrame(this.updateRaf_),this.adapter_.setTranslateX(null)}},{key:"updateDrawer_",value:function(){this.updateRaf_=requestAnimationFrame(this.updateDrawer_.bind(this)),this.adapter_.setTranslateX(this.newPosition_)}},{key:"isRootTransitioningEventTarget_",value:function(){return!1}},{key:"handleTransitionEnd_",value:function(t){this.isRootTransitioningEventTarget_(t.target)&&(this.adapter_.removeClass(this.animatingCssClass_),this.adapter_.deregisterTransitionEndHandler(this.transitionEndHandler_))}},{key:"newPosition_",get:function(){return 1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_)}}]),e}(a.MDCFoundation)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var r=n(11),o={ROOT:"mdc-temporary-drawer",OPEN:"mdc-temporary-drawer--open",ANIMATING:"mdc-temporary-drawer--animating",SCROLL_LOCK:"mdc-drawer-scroll-lock"},i={DRAWER_SELECTOR:".mdc-temporary-drawer__drawer",OPACITY_VAR_NAME:"--mdc-temporary-drawer-opacity",FOCUSABLE_ELEMENTS:r.a,OPEN_EVENT:"MDCTemporaryDrawer:open",CLOSE_EVENT:"MDCTemporaryDrawer:close"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(2),s=n(47),u=n(13);n.d(e,"b",function(){return s.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this,e=s.a.strings.FOCUSABLE_ELEMENTS;return new s.a({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},hasNecessaryDom:function(){return Boolean(t.drawer)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(u.remapEvent(e),n,u.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(u.remapEvent(e),n,u.applyPassive())},registerDrawerInteractionHandler:function(e,n){return t.drawer.addEventListener(u.remapEvent(e),n)},deregisterDrawerInteractionHandler:function(e,n){return t.drawer.removeEventListener(u.remapEvent(e),n)},registerTransitionEndHandler:function(e){return t.root_.addEventListener("transitionend",e)},deregisterTransitionEndHandler:function(e){return t.root_.removeEventListener("transitionend",e)},registerDocumentKeydownHandler:function(t){return document.addEventListener("keydown",t)},deregisterDocumentKeydownHandler:function(t){return document.removeEventListener("keydown",t)},getDrawerWidth:function(){return t.drawer.offsetWidth},setTranslateX:function(e){return t.drawer.style.setProperty(u.getTransformPropertyName(),null===e?null:"translateX("+e+"px)")},getFocusableElements:function(){return t.drawer.querySelectorAll(e)},saveElementTabState:function(t){return u.saveElementTabState(t)},restoreElementTabState:function(t){return u.restoreElementTabState(t)},makeElementUntabbable:function(t){return t.setAttribute("tabindex",-1)},notifyOpen:function(){return t.emit(s.a.strings.OPEN_EVENT)},notifyClose:function(){return t.emit(s.a.strings.CLOSE_EVENT)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},isDrawer:function(e){return e===t.drawer}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()}},{key:"drawer",get:function(){return this.root_.querySelector(s.a.strings.DRAWER_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(11),s=n(48),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t),e.cssClasses.ROOT,e.cssClasses.ANIMATING,e.cssClasses.OPEN))}return i(e,t),c(e,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return u(a.b.defaultAdapter,{isDrawer:function(){return!1}})}}]),c(e,[{key:"isRootTransitioningEventTarget_",value:function(t){return this.adapter_.isDrawer(t)}}]),e}(a.b);e.a=l},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var r=n(11),o={ROOT:"mdc-persistent-drawer",OPEN:"mdc-persistent-drawer--open",ANIMATING:"mdc-persistent-drawer--animating"},i={DRAWER_SELECTOR:".mdc-persistent-drawer__drawer",FOCUSABLE_ELEMENTS:r.a,OPEN_EVENT:"MDCPersistentDrawer:open",CLOSE_EVENT:"MDCPersistentDrawer:close"}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.drawer=e():(t.mdc=t.mdc||{},t.mdc.drawer=e())}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/assets/",e(e.s=39)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),this.adapter_=e}return o(t,null,[{key:"cssClasses",get:function(){return{}}},{key:"strings",get:function(){return{}}},{key:"numbers",get:function(){return{}}},{key:"defaultAdapter",get:function(){return{}}}]),o(t,[{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),t}();e.a=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n(0),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;r(this,t),this.root_=e;for(var o=arguments.length,i=Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];this.initialize.apply(this,i),this.foundation_=void 0===n?this.getDefaultFoundation():n,this.foundation_.init(),this.initialSyncWithDOM()}return i(t,null,[{key:"attachTo",value:function(e){return new t(e,new o.a)}}]),i(t,[{key:"initialize",value:function(){}},{key:"getDefaultFoundation",value:function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")}},{key:"initialSyncWithDOM",value:function(){}},{key:"destroy",value:function(){this.foundation_.destroy()}},{key:"listen",value:function(t,e){this.root_.addEventListener(t,e)}},{key:"unlisten",value:function(t,e){this.root_.removeEventListener(t,e)}},{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=void 0;"function"==typeof CustomEvent?r=new CustomEvent(t,{detail:e,bubbles:n}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n,!1,e)),this.root_.dispatchEvent(r)}}]),t}();e.a=a},,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1);n.d(e,"MDCFoundation",function(){return r.a}),n.d(e,"MDCComponent",function(){return o.a})},,,,,,,function(t,e,n){"use strict";var r=n(43);n.d(e,"a",function(){return r.a});var o=n(44);n.d(e,"b",function(){return o.a})},,function(t,e,n){"use strict";function r(t){if(!("ontouchstart"in(arguments.length>1&&void 0!==arguments[1]?arguments[1]:window).document))switch(t){case"touchstart":return"pointerdown";case"touchmove":return"pointermove";case"touchend":return"pointerup";default:return t}return t}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===d||e){var n=t.document.createElement("div"),r="transform"in n.style?"transform":"-webkit-transform";d=r}return d}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return"CSS"in t&&t.CSS.supports("(--color: red)")}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(void 0===f||e){var n=!1;try{t.document.addEventListener("test",null,{get passive(){n=!0}})}catch(t){}f=n}return!!f&&{passive:!0}}function s(t){t.hasAttribute("tabindex")&&t.setAttribute(c,t.getAttribute("tabindex")),t.setAttribute(l,!0)}function u(t){t.hasAttribute(l)&&(t.hasAttribute(c)?(t.setAttribute("tabindex",t.getAttribute(c)),t.removeAttribute(c)):t.removeAttribute("tabindex"),t.removeAttribute(l))}Object.defineProperty(e,"__esModule",{value:!0}),e.remapEvent=r,e.getTransformPropertyName=o,e.supportsCssCustomProperties=i,e.applyPassive=a,e.saveElementTabState=s,e.restoreElementTabState=u;var c="data-mdc-tabindex",l="data-mdc-tabindex-handled",d=void 0,f=void 0},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(40)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(13),o=n(41);n.d(e,"MDCTemporaryDrawer",function(){return o.a}),n.d(e,"MDCTemporaryDrawerFoundation",function(){return o.b});var i=n(46);n.d(e,"MDCPersistentDrawer",function(){return i.a}),n.d(e,"MDCPersistentDrawerFoundation",function(){return i.b}),n.d(e,"util",function(){return r})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(4),s=n(42),u=n(13);n.d(e,"b",function(){return s.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this,e=s.a.strings,n=e.FOCUSABLE_ELEMENTS,r=e.OPACITY_VAR_NAME;return new s.a({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},addBodyClass:function(t){return document.body.classList.add(t)},removeBodyClass:function(t){return document.body.classList.remove(t)},hasNecessaryDom:function(){return Boolean(t.drawer)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(u.remapEvent(e),n,u.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(u.remapEvent(e),n,u.applyPassive())},registerDrawerInteractionHandler:function(e,n){return t.drawer.addEventListener(u.remapEvent(e),n)},deregisterDrawerInteractionHandler:function(e,n){return t.drawer.removeEventListener(u.remapEvent(e),n)},registerTransitionEndHandler:function(e){return t.drawer.addEventListener("transitionend",e)},deregisterTransitionEndHandler:function(e){return t.drawer.removeEventListener("transitionend",e)},registerDocumentKeydownHandler:function(t){return document.addEventListener("keydown",t)},deregisterDocumentKeydownHandler:function(t){return document.removeEventListener("keydown",t)},getDrawerWidth:function(){return t.drawer.offsetWidth},setTranslateX:function(e){return t.drawer.style.setProperty(u.getTransformPropertyName(),null===e?null:"translateX("+e+"px)")},updateCssVariable:function(e){u.supportsCssCustomProperties()&&t.root_.style.setProperty(r,e)},getFocusableElements:function(){return t.drawer.querySelectorAll(n)},saveElementTabState:function(t){return u.saveElementTabState(t)},restoreElementTabState:function(t){return u.restoreElementTabState(t)},makeElementUntabbable:function(t){return t.setAttribute("tabindex",-1)},notifyOpen:function(){return t.emit(s.a.strings.OPEN_EVENT)},notifyClose:function(){return t.emit(s.a.strings.CLOSE_EVENT)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},isDrawer:function(e){return e===t.drawer}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()}},{key:"drawer",get:function(){return this.root_.querySelector(s.a.strings.DRAWER_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(11),s=n(45),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){function e(t){r(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t),e.cssClasses.ROOT,e.cssClasses.ANIMATING,e.cssClasses.OPEN));return n.componentClickHandler_=function(){return n.close()},n}return i(e,t),l(e,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return u(a.b.defaultAdapter,{addBodyClass:function(){},removeBodyClass:function(){},isDrawer:function(){return!1},updateCssVariable:function(){}})}}]),l(e,[{key:"init",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"init",this).call(this),this.adapter_.updateCssVariable(0),this.adapter_.registerInteractionHandler("click",this.componentClickHandler_)}},{key:"destroy",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this),this.adapter_.deregisterInteractionHandler("click",this.componentClickHandler_),this.enableScroll_()}},{key:"open",value:function(){this.disableScroll_(),this.adapter_.updateCssVariable(""),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"open",this).call(this)}},{key:"close",value:function(){this.adapter_.updateCssVariable(""),c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"close",this).call(this)}},{key:"prepareForTouchEnd_",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"prepareForTouchEnd_",this).call(this),this.adapter_.updateCssVariable("")}},{key:"updateDrawer_",value:function(){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"updateDrawer_",this).call(this);var t=Math.max(0,1+this.direction_*(this.newPosition_/this.drawerWidth_));this.adapter_.updateCssVariable(t)}},{key:"isRootTransitioningEventTarget_",value:function(t){return this.adapter_.isDrawer(t)}},{key:"handleTransitionEnd_",value:function(t){c(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"handleTransitionEnd_",this).call(this,t),this.isOpen_||this.enableScroll_()}},{key:"disableScroll_",value:function(){this.adapter_.addBodyClass(s.a.SCROLL_LOCK)}},{key:"enableScroll_",value:function(){this.adapter_.removeBodyClass(s.a.SCROLL_LOCK)}}]),e}(a.b);e.a=d},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]"},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return c});var a=n(4),s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=function(t){function e(t,n,i,a){r(this,e);var u=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s(e.defaultAdapter,t)));return u.rootCssClass_=n,u.animatingCssClass_=i,u.openCssClass_=a,u.transitionEndHandler_=function(t){return u.handleTransitionEnd_(t)},u.inert_=!1,u.drawerClickHandler_=function(t){return t.stopPropagation()},u.componentTouchStartHandler_=function(t){return u.handleTouchStart_(t)},u.componentTouchMoveHandler_=function(t){return u.handleTouchMove_(t)},u.componentTouchEndHandler_=function(t){return u.handleTouchEnd_(t)},u.documentKeydownHandler_=function(t){(t.key&&"Escape"===t.key||27===t.keyCode)&&u.close()},u}return i(e,t),u(e,null,[{key:"defaultAdapter",get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){},hasNecessaryDom:function(){return!1},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerDrawerInteractionHandler:function(){},deregisterDrawerInteractionHandler:function(){},registerTransitionEndHandler:function(){},deregisterTransitionEndHandler:function(){},registerDocumentKeydownHandler:function(){},deregisterDocumentKeydownHandler:function(){},setTranslateX:function(){},getFocusableElements:function(){},saveElementTabState:function(){},restoreElementTabState:function(){},makeElementUntabbable:function(){},notifyOpen:function(){},notifyClose:function(){},isRtl:function(){return!1},getDrawerWidth:function(){return 0}}}}]),u(e,[{key:"init",value:function(){var t=this.rootCssClass_,e=this.openCssClass_;if(!this.adapter_.hasClass(t))throw new Error(t+" class required in root element.");if(!this.adapter_.hasNecessaryDom())throw new Error("Required DOM nodes missing in "+t+" component.");this.adapter_.hasClass(e)?this.isOpen_=!0:(this.detabinate_(),this.isOpen_=!1),this.adapter_.registerDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.registerDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.registerInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.registerInteractionHandler("touchend",this.componentTouchEndHandler_)}},{key:"destroy",value:function(){this.adapter_.deregisterDrawerInteractionHandler("click",this.drawerClickHandler_),this.adapter_.deregisterDrawerInteractionHandler("touchstart",this.componentTouchStartHandler_),this.adapter_.deregisterInteractionHandler("touchmove",this.componentTouchMoveHandler_),this.adapter_.deregisterInteractionHandler("touchend",this.componentTouchEndHandler_),this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_)}},{key:"open",value:function(){this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.registerDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.addClass(this.animatingCssClass_),this.adapter_.addClass(this.openCssClass_),this.retabinate_(),this.isOpen_||this.adapter_.notifyOpen(),this.isOpen_=!0}},{key:"close",value:function(){this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_),this.adapter_.registerTransitionEndHandler(this.transitionEndHandler_),this.adapter_.addClass(this.animatingCssClass_),this.adapter_.removeClass(this.openCssClass_),this.detabinate_(),this.isOpen_&&this.adapter_.notifyClose(),this.isOpen_=!1}},{key:"isOpen",value:function(){return this.isOpen_}},{key:"detabinate_",value:function(){if(!this.inert_){var t=this.adapter_.getFocusableElements();if(t)for(var e=0;e<t.length;e++)this.adapter_.saveElementTabState(t[e]),this.adapter_.makeElementUntabbable(t[e]);this.inert_=!0}}},{key:"retabinate_",value:function(){if(this.inert_){var t=this.adapter_.getFocusableElements();if(t)for(var e=0;e<t.length;e++)this.adapter_.restoreElementTabState(t[e]);this.inert_=!1}}},{key:"handleTouchStart_",value:function(t){this.adapter_.hasClass(this.openCssClass_)&&(t.pointerType&&"touch"!==t.pointerType||(this.direction_=this.adapter_.isRtl()?-1:1,this.drawerWidth_=this.adapter_.getDrawerWidth(),this.startX_=t.touches?t.touches[0].pageX:t.pageX,this.currentX_=this.startX_,this.updateRaf_=requestAnimationFrame(this.updateDrawer_.bind(this))))}},{key:"handleTouchMove_",value:function(t){t.pointerType&&"touch"!==t.pointerType||(this.currentX_=t.touches?t.touches[0].pageX:t.pageX)}},{key:"handleTouchEnd_",value:function(t){t.pointerType&&"touch"!==t.pointerType||(this.prepareForTouchEnd_(),Math.abs(this.newPosition_/this.drawerWidth_)>=.5?this.close():this.open())}},{key:"prepareForTouchEnd_",value:function(){cancelAnimationFrame(this.updateRaf_),this.adapter_.setTranslateX(null)}},{key:"updateDrawer_",value:function(){this.updateRaf_=requestAnimationFrame(this.updateDrawer_.bind(this)),this.adapter_.setTranslateX(this.newPosition_)}},{key:"isRootTransitioningEventTarget_",value:function(){return!1}},{key:"handleTransitionEnd_",value:function(t){this.isRootTransitioningEventTarget_(t.target)&&(this.adapter_.removeClass(this.animatingCssClass_),this.adapter_.deregisterTransitionEndHandler(this.transitionEndHandler_))}},{key:"newPosition_",get:function(){return 1===this.direction_?Math.min(0,this.currentX_-this.startX_):Math.max(0,this.currentX_-this.startX_)}}]),e}(a.MDCFoundation)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var r=n(11),o={ROOT:"mdc-temporary-drawer",OPEN:"mdc-temporary-drawer--open",ANIMATING:"mdc-temporary-drawer--animating",SCROLL_LOCK:"mdc-drawer-scroll-lock"},i={DRAWER_SELECTOR:".mdc-temporary-drawer__drawer",OPACITY_VAR_NAME:"--mdc-temporary-drawer-opacity",FOCUSABLE_ELEMENTS:r.a,OPEN_EVENT:"MDCTemporaryDrawer:open",CLOSE_EVENT:"MDCTemporaryDrawer:close"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.d(e,"a",function(){return l});var a=n(4),s=n(47),u=n(13);n.d(e,"b",function(){return s.a});var c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return i(e,t),c(e,[{key:"getDefaultFoundation",value:function(){var t=this,e=s.a.strings.FOCUSABLE_ELEMENTS;return new s.a({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},hasNecessaryDom:function(){return Boolean(t.drawer)},registerInteractionHandler:function(e,n){return t.root_.addEventListener(u.remapEvent(e),n,u.applyPassive())},deregisterInteractionHandler:function(e,n){return t.root_.removeEventListener(u.remapEvent(e),n,u.applyPassive())},registerDrawerInteractionHandler:function(e,n){return t.drawer.addEventListener(u.remapEvent(e),n)},deregisterDrawerInteractionHandler:function(e,n){return t.drawer.removeEventListener(u.remapEvent(e),n)},registerTransitionEndHandler:function(e){return t.root_.addEventListener("transitionend",e)},deregisterTransitionEndHandler:function(e){return t.root_.removeEventListener("transitionend",e)},registerDocumentKeydownHandler:function(t){return document.addEventListener("keydown",t)},deregisterDocumentKeydownHandler:function(t){return document.removeEventListener("keydown",t)},getDrawerWidth:function(){return t.drawer.offsetWidth},setTranslateX:function(e){return t.drawer.style.setProperty(u.getTransformPropertyName(),null===e?null:"translateX("+e+"px)")},getFocusableElements:function(){return t.drawer.querySelectorAll(e)},saveElementTabState:function(t){return u.saveElementTabState(t)},restoreElementTabState:function(t){return u.restoreElementTabState(t)},makeElementUntabbable:function(t){return t.setAttribute("tabindex",-1)},notifyOpen:function(){return t.emit(s.a.strings.OPEN_EVENT)},notifyClose:function(){return t.emit(s.a.strings.CLOSE_EVENT)},isRtl:function(){return"rtl"===getComputedStyle(t.root_).getPropertyValue("direction")},isDrawer:function(e){return e===t.drawer}})}},{key:"open",get:function(){return this.foundation_.isOpen()},set:function(t){t?this.foundation_.open():this.foundation_.close()}},{key:"drawer",get:function(){return this.root_.querySelector(s.a.strings.DRAWER_SELECTOR)}}],[{key:"attachTo",value:function(t){return new e(t)}}]),e}(a.MDCComponent)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(11),s=n(48),u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t){function e(t){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u(e.defaultAdapter,t),e.cssClasses.ROOT,e.cssClasses.ANIMATING,e.cssClasses.OPEN))}return i(e,t),c(e,null,[{key:"cssClasses",get:function(){return s.a}},{key:"strings",get:function(){return s.b}},{key:"defaultAdapter",get:function(){return u(a.b.defaultAdapter,{isDrawer:function(){return!1}})}}]),c(e,[{key:"isRootTransitioningEventTarget_",value:function(t){return this.adapter_.isDrawer(t)}}]),e}(a.b);e.a=l},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var r=n(11),o={ROOT:"mdc-persistent-drawer",OPEN:"mdc-persistent-drawer--open",ANIMATING:"mdc-persistent-drawer--animating"},i={DRAWER_SELECTOR:".mdc-persistent-drawer__drawer",FOCUSABLE_ELEMENTS:r.a,OPEN_EVENT:"MDCPersistentDrawer:open",CLOSE_EVENT:"MDCPersistentDrawer:close"}}])});
{
"name": "@material/drawer",
"version": "0.5.4",
"version": "0.5.5",
"description": "The Material Components Web drawer component",

@@ -19,8 +19,8 @@ "license": "Apache-2.0",

"@material/animation": "^0.3.1",
"@material/base": "^0.2.3",
"@material/base": "^0.2.4",
"@material/elevation": "^0.1.11",
"@material/rtl": "^0.1.7",
"@material/theme": "^0.1.7",
"@material/theme": "^0.2.0",
"@material/typography": "^0.3.0"
}
}

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

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