Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 8

!function(e,t){"object"==typeof exports&&"object"==typeof module?

module.exports=t():"function"==typeof define&&define.amd?
define([],t):"object"==typeof exports?exports.list=t():(e.mdc=e.mdc||
{},e.mdc.list=t())}(this,function(){return s={},i.m=n={0:function(e,t,n){"use
strict";Object.defineProperty(t,"__esModule",{value:!0});var
s=(Object.defineProperty(i,"cssClasses",{get:function(){return{}},enumerable:!
0,configurable:!0}),Object.defineProperty(i,"strings",{get:function()
{return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"numbers",
{get:function(){return{}},enumerable:!0,configurable:!
0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{}},enumerable:!
0,configurable:!0}),i.prototype.init=function(){},i.prototype.destroy=function()
{},i);function i(e){void
0===e&&(e={}),this.adapter=e}t.MDCFoundation=s,t.default=s},1:function(e,t,n){"use
strict";var s=this&&this.__read||function(e,t){var n="function"==typeof
Symbol&&e[Symbol.iterator];if(!n)return e;var s,i,r=n.call(e),o=[];try{for(;(void
0===t||0<t--)&&!(s=r.next()).done;)o.push(s.value)}catch(e)
{i={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(i)throw
i.error}}return o},i=this&&this.__spread||function(){for(var
e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return
e};Object.defineProperty(t,"__esModule",{value:!0});var
r=n(0),o=(a.attachTo=function(e){return new a(e,new
r.MDCFoundation({}))},a.prototype.initialize=function(){for(var
e=[],t=0;t<arguments.length;t+
+)e[t]=arguments[t]},a.prototype.getDefaultFoundation=function(){throw new
Error("Subclasses must override getDefaultFoundation to return a properly
configured foundation class")},a.prototype.initialSyncWithDOM=function()
{},a.prototype.destroy=function()
{this.foundation.destroy()},a.prototype.listen=function(e,t,n)
{this.root.addEventListener(e,t,n)},a.prototype.unlisten=function(e,t,n)
{this.root.removeEventListener(e,t,n)},a.prototype.emit=function(e,t,n){var s;void
0===n&&(n=!1),"function"==typeof CustomEvent?s=new CustomEvent(e,
{bubbles:n,detail:t}):(s=document.createEvent("CustomEvent")).initCustomEvent(e,n,!
1,t),this.root.dispatchEvent(s)},a);function a(e,t){for(var
n=[],s=2;s<arguments.length;s++)n[s-
2]=arguments[s];this.root=e,this.initialize.apply(this,i(n)),this.foundation=void
0===t?
this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}t.MD
CComponent=o,t.default=o},12:function(e,t,n){"use strict";var
s,i=this&&this.__extends||(s=function(e,t){return(s=Object.setPrototypeOf||
{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var
n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n()
{this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):
(n.prototype=t.prototype,new n)}),r=this&&this.__assign||function()
{return(r=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n+
+)for(var i in
t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return
e}).apply(this,arguments)},o=this&&this.__importStar||function(e)
{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in
e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return
t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var
a=n(0),E=n(9),p=n(8),_=o(n(20)),A=n(13);var
d,u=(d=a.MDCFoundation,i(c,d),Object.defineProperty(c,"strings",{get:function()
{return p.strings},enumerable:!0,configurable:!
0}),Object.defineProperty(c,"cssClasses",{get:function(){return
p.cssClasses},enumerable:!0,configurable:!0}),Object.defineProperty(c,"numbers",
{get:function(){return p.numbers},enumerable:!0,configurable:!
0}),Object.defineProperty(c,"defaultAdapter",{get:function()
{return{addClassForElementIndex:function(){},focusItemAtIndex:function()
{},getAttributeForElementIndex:function(){return
null},getFocusedElementIndex:function(){return 0},getListItemCount:function()
{return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function()
{return!1},isCheckboxCheckedAtIndex:function(){return!
1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!
1},listItemAtIndexHasClass:function(){return!1},notifyAction:function()
{},removeClassForElementIndex:function(){},setAttributeForElementIndex:function()
{},setCheckedCheckboxOrRadioAtIndex:function()
{},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function()
{return""}}},enumerable:!0,configurable:!0}),c.prototype.layout=function(){0!
==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?
this.isCheckboxList_=!0:this.adapter.hasRadioAtIndex(0)&&(this.isRadioList_=!
0),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())
)},c.prototype.setWrapFocus=function(e)
{this.wrapFocus_=e},c.prototype.setVerticalOrientation=function(e)
{this.isVertical_=e},c.prototype.setSingleSelection=function(e)
{this.isSingleSelectionList_=e},c.prototype.setHasTypeahead=function(e)
{(this.hasTypeahead=e)&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex(
))},c.prototype.isTypeaheadInProgress=function(){return
this.hasTypeahead&&_.isTypingInProgress(this.typeaheadState)},c.prototype.setUseAct
ivatedClass=function(e)
{this.useActivatedClass_=e},c.prototype.getSelectedIndex=function(){return
this.selectedIndex_},c.prototype.setSelectedIndex=function(e)
{this.isIndexValid_(e)&&(this.isCheckboxList_?
this.setCheckboxAtIndex_(e):this.isRadioList_?
this.setRadioAtIndex_(e):this.setSingleSelectionAtIndex_(e))},c.prototype.handleFoc
usIn=function(e,t)
{0<=t&&(this.focusedItemIndex=t,this.adapter.setTabIndexForListItemChildren(t,"0"))
},c.prototype.handleFocusOut=function(e,t){var
n=this;0<=t&&this.adapter.setTabIndexForListItemChildren(t,"-
1"),setTimeout(function(){n.adapter.isFocusInsideList()||
n.setTabindexToFirstSelectedItem_()},0)},c.prototype.handleKeydown=function(e,t,n)
{var
s=this,i="ArrowLeft"===E.normalizeKey(e),r="ArrowUp"===E.normalizeKey(e),o="ArrowRi
ght"===E.normalizeKey(e),a="ArrowDown"===E.normalizeKey(e),d="Home"===E.normalizeKe
y(e),u="End"===E.normalizeKey(e),c="Enter"===E.normalizeKey(e),l="Spacebar"===E.nor
malizeKey(e);if(this.adapter.isRootFocused()){if(r||u?
(e.preventDefault(),this.focusLastElement()):(a||
d)&&(e.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var
f={event:e,focusItemAtIndex:function(e){s.focusItemAtIndex(e)},focusedItemIndex:-
1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtInd
exDisabled:function(e){return
s.adapter.listItemAtIndexHasClass(e,p.cssClasses.LIST_ITEM_DISABLED_CLASS)}};_.hand
leKeydown(f,this.typeaheadState)}}else{var
h=this.adapter.getFocusedElementIndex();if(!(-1===h&&(h=n)<0))
{if(this.isVertical_&&a||!
this.isVertical_&&o)A.preventDefaultEvent(e),this.focusNextElement(h);else
if(this.isVertical_&&r||!
this.isVertical_&&i)A.preventDefaultEvent(e),this.focusPrevElement(h);else
if(d)A.preventDefaultEvent(e),this.focusFirstElement();else
if(u)A.preventDefaultEvent(e),this.focusLastElement();else if((c||l)&&t){var
I=e.target;if(I&&"A"===I.tagName&&c)return;if(A.preventDefaultEvent(e),this.adapter
.listItemAtIndexHasClass(h,p.cssClasses.LIST_ITEM_DISABLED_CLASS))return;this.isTyp
eaheadInProgress()||
(this.isSelectableList_()&&this.setSelectedIndexOnAction_(h),this.adapter.notifyAct
ion(h))}this.hasTypeahead&&(f={event:e,focusItemAtIndex:function(e)
{s.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,s
ortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e)
{return
s.adapter.listItemAtIndexHasClass(e,p.cssClasses.LIST_ITEM_DISABLED_CLASS)}},_.hand
leKeydown(f,this.typeaheadState))}}},c.prototype.handleClick=function(e,t){e!
==p.numbers.UNSET_INDEX&&(this.setTabindexAtIndex_(e),this.focusedItemIndex=e,this.
adapter.listItemAtIndexHasClass(e,p.cssClasses.LIST_ITEM_DISABLED_CLASS)||
(this.isSelectableList_()&&this.setSelectedIndexOnAction_(e,t),this.adapter.notifyA
ction(e)))},c.prototype.focusNextElement=function(e){var
t=e+1;if(this.adapter.getListItemCount()<=t){if(!this.wrapFocus_)return
e;t=0}return this.focusItemAtIndex(t),t},c.prototype.focusPrevElement=function(e)
{var t=e-1;if(t<0){if(!this.wrapFocus_)return e;t=this.adapter.getListItemCount()-
1}return this.focusItemAtIndex(t),t},c.prototype.focusFirstElement=function()
{return this.focusItemAtIndex(0),0},c.prototype.focusLastElement=function(){var
e=this.adapter.getListItemCount()-1;return
this.focusItemAtIndex(e),e},c.prototype.setEnabled=function(e,t)
{this.isIndexValid_(e)&&(t?
(this.adapter.removeClassForElementIndex(e,p.cssClasses.LIST_ITEM_DISABLED_CLASS),t
his.adapter.setAttributeForElementIndex(e,p.strings.ARIA_DISABLED,"false")):
(this.adapter.addClassForElementIndex(e,p.cssClasses.LIST_ITEM_DISABLED_CLASS),this
.adapter.setAttributeForElementIndex(e,p.strings.ARIA_DISABLED,"true")))},c.prototy
pe.setSingleSelectionAtIndex_=function(e){if(this.selectedIndex_!==e){var
t=p.cssClasses.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(t=p.cssClasses.LI
ST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!
==p.numbers.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex
_,t),this.adapter.addClassForElementIndex(e,t),this.setAriaForSingleSelectionAtInde
x_(e),this.selectedIndex_=e}},c.prototype.setAriaForSingleSelectionAtIndex_=functio
n(e)
{this.selectedIndex_===p.numbers.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adap
ter.getAttributeForElementIndex(e,p.strings.ARIA_CURRENT));var t=null!
==this.ariaCurrentAttrValue_,n=t?
p.strings.ARIA_CURRENT:p.strings.ARIA_SELECTED;this.selectedIndex_!
==p.numbers.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedInde
x_,n,"false");var s=t?
this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,n,s)},
c.prototype.setRadioAtIndex_=function(e)
{this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),this.selectedIndex_!
==p.numbers.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedInde
x_,p.strings.ARIA_CHECKED,"false"),this.adapter.setAttributeForElementIndex(e,p.str
ings.ARIA_CHECKED,"true"),this.selectedIndex_=e},c.protot
ype.setCheckboxAtIndex_=function(e){for(var
t=0;t<this.adapter.getListItemCount();t++){var n=!1;0<=e.indexOf(t)&&(n=!
0),this.adapter.setCheckedCheckboxOrRadioAtIndex(t,n),this.adapter.setAttributeForE
lementIndex(t,p.strings.ARIA_CHECKED,n?"true":"false")}this.selectedIndex_=e},c.pro
totype.setTabindexAtIndex_=function(e)
{this.focusedItemIndex===p.numbers.UNSET_INDEX&&0!==e?
this.adapter.setAttributeForElementIndex(0,"tabindex","-
1"):0<=this.focusedItemIndex&&this.focusedItemIndex!
==e&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-
1"),this.adapter.setAttributeForElementIndex(e,"tabindex","0")},c.prototype.isSelec
tableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||
this.isRadioList_},c.prototype.setTabindexToFirstSelectedItem_=function(){var
e=0;this.isSelectableList_()&&("number"==typeof
this.selectedIndex_&&this.selectedIndex_!==p.numbers.UNSET_INDEX?
e=this.selectedIndex_:function(e){return e instanceof Array}
(this.selectedIndex_)&&0<this.selectedIndex_.length&&(e=this.selectedIndex_.reduce(
function(e,t){return
Math.min(e,t)}))),this.setTabindexAtIndex_(e)},c.prototype.isIndexValid_=function(e
){var t=this;if(e instanceof Array){if(!this.isCheckboxList_)throw new
Error("MDCListFoundation: Array of index is only supported for checkbox based
list");return 0===e.length||e.some(function(e){return
t.isIndexInRange_(e)})}if("number"!=typeof e)return!1;if(this.isCheckboxList_)throw
new Error("MDCListFoundation: Expected array of index for checkbox based list but
got number: "+e);return
this.isIndexInRange_(e)},c.prototype.isIndexInRange_=function(e){var
t=this.adapter.getListItemCount();return
0<=e&&e<t},c.prototype.setSelectedIndexOnAction_=function(e,t){void 0===t&&(t=!
0),this.isCheckboxList_?
this.toggleCheckboxAtIndex_(e,t):this.setSelectedIndex(e)},c.prototype.toggleCheckb
oxAtIndex_=function(t,e){var n=this.adapter.isCheckboxCheckedAtIndex(t);e&&(n=!
n,this.adapter.setCheckedCheckboxOrRadioAtIndex(t,n)),this.adapter.setAttributeForE
lementIndex(t,p.strings.ARIA_CHECKED,n?"true":"false");var
s=this.selectedIndex_===p.numbers.UNSET_INDEX?[]:this.selectedIndex_.slice();n?
s.push(t):s=s.filter(function(e){return e!
==t}),this.selectedIndex_=s},c.prototype.focusItemAtIndex=function(e)
{this.setTabindexAtIndex_(e),this.adapter.focusItemAtIndex(e),this.focusedItemIndex
=e},c.prototype.typeaheadMatchItem=function(e,t,n){var s=this;void 0===n&&(n=!
1);var i={focusItemAtIndex:function(e){s.focusItemAtIndex(e)},focusedItemIndex:t||
this.focusedItemIndex,nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar
,skipFocus:n,isItemAtIndexDisabled:function(e){return
s.adapter.listItemAtIndexHasClass(e,p.cssClasses.LIST_ITEM_DISABLED_CLASS)}};return
_.matchItem(i,this.typeaheadState)},c.prototype.typeaheadInitSortedIndex=function()
{return
_.initSortedIndex(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtInde
x)},c.prototype.clearTypeaheadBuffer=function()
{_.clearBuffer(this.typeaheadState)},c);function c(e){var
t=d.call(this,r(r({},c.defaultAdapter),e))||this;return t.wrapFocus_=!
1,t.isVertical_=!0,t.isSingleSelectionList_=!
1,t.selectedIndex_=p.numbers.UNSET_INDEX,t.focusedItemIndex=p.numbers.UNSET_INDEX,t
.useActivatedClass_=!1,t.ariaCurrentAttrValue_=null,t.isCheckboxList_=!
1,t.isRadioList_=!1,t.hasTypeahead=!
1,t.typeaheadState=_.initState(),t.sortedIndexByFirstChar=new
Map,t}t.MDCListFoundation=u,t.default=u},13:function(e,t,n){"use
strict";Object.defineProperty(t,"__esModule",{value:!0});var
s=["input","button","textarea","select"];t.preventDefaultEvent=function(e){var
t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-
1===s.indexOf(n)&&e.preventDefault()}}},136:function(e,n,t){"use strict";function
s(e){for(var t in e)n.hasOwnProperty(t)||
(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!
0}),s(t(19)),s(t(8)),s(t(12))},19:function(e,t,n){"use strict";var
s,i=this&&this.__extends||(s=function(e,t){return(s=Object.setPrototypeOf||
{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var
n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n()
{this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):
(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!
0});var
r,o=n(1),a=n(2),d=n(8),u=n(12),c=(r=o.MDCComponent,i(l,r),Object.defineProperty(l.p
rototype,"vertical",{set:function(e)
{this.foundation.setVerticalOrientation(e)},enumerable:!0,configurable:!
0}),Object.defineProperty(l.prototype,"listElements",{get:function()
{return[].slice.call(this.root.querySelectorAll("."+d.cssClasses.LIST_ITEM_CLASS))}
,enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"wrapFocus",
{set:function(e){this.foundation.setWrapFocus(e)},enumerable:!0,configurable:!
0}),Object.defineProperty(l.prototype,"typeaheadInProgress",{get:function(){return
this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!
0}),Object.defineProperty(l.prototype,"hasTypeahead",{set:function(e)
{this.foundation.setHasTypeahead(e)},enumerable:!0,configurable:!
0}),Object.defineProperty(l.prototype,"singleSelection",{set:function(e)
{this.foundation.setSingleSelection(e)},enumerable:!0,configurable:!
0}),Object.defineProperty(l.prototype,"selectedIndex",{get:function(){return
this.foundation.getSelectedIndex()},set:function(e)
{this.foundation.setSelectedIndex(e)},enumerable:!0,configurable:!
0}),l.attachTo=function(e){return new
l(e)},l.prototype.initialSyncWithDOM=function()
{this.handleClick_=this.handleClickEvent_.bind(this),this.handleKeydown_=this.handl
eKeydownEvent_.bind(this),this.focusInEventListener_=this.handleFocusInEvent_.bind(
this),this.focusOutEventListener_=this.handleFocusOutEvent_.bind(this),this.listen(
"keydown",this.handleKeydown_),this.listen("click",this.handleClick_),this.listen("
focusin",this.focusInEventListener_),this.listen("focusout",this.focusOutEventListe
ner_),this.layout(),this.initializeListType()},l.prototype.destroy=function()
{this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClic
k_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",th
is.focusOutEventListener_)},l.prototype.layout=function(){var
e=this.root.getAttribute(d.strings.ARIA_ORIENTATION);this.vertical=e!
==d.strings.ARIA_ORIENTATION_HORIZONTAL,
[].slice.call(this.root.querySelectorAll(".mdc-list-
item:not([tabindex])")).forEach(function(e){e.setAttribute("tabindex","-1")}),
[].slice.call(this.root.querySelectorAll(d.strings.FOCUSABLE_CHILD_ELEMENTS)).forEa
ch(function(e){return e.setAttribute("tabindex","-
1")}),this.foundation.layout()},l.prototype.getPrimaryText=function(e){var
t=e.querySelector("."+d.cssClasses.LIST_ITEM_PRIMARY_TEXT_CLASS);if(t)return
t.textContent||"";var
n=e.querySelector("."+d.cssClasses.LIST_ITEM_TEXT_CLASS);return
n&&n.textContent||""},l.prototype.initializeListType=function(){var
t=this,e=this.root.querySelectorAll(d.strings.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.r
oot.querySelector("\n ."+d.cssClasses.LIST_ITEM_ACTIVATED_CLASS+",\
n ."+d.cssClasses.LIST_ITEM_SELECTED_CLASS+"\n
"),s=this.root.querySelector(d.strings.ARIA_CHECKED_RADIO_SELECTOR);if(e.length)
{var
i=this.root.querySelectorAll(d.strings.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selecte
dIndex=[].map.call(i,function(e){return t.listElements.indexOf(e)})}else n?
(n.classList.contains(d.cssClasses.LIST_ITEM_ACTIVATED_CLASS)&&this.foundation.setU
seActivatedClass(!0),this.singleSelection=!
0,this.selectedIndex=this.listElements.indexOf(n)):s&&(this.selectedIndex=this.list
Elements.indexOf(s))},l.prototype.setEnabled=function(e,t)
{this.foundation.setEnabled(e,t)},l.prototype.typeaheadMatchItem=function(e,t)
{return this.foundation.typeaheadMatchItem(e,t,!
0)},l.prototype.getDefaultFoundation=function(){var
i=this,e={addClassForElementIndex:function(e,t){var
n=i.listElements[e];n&&n.classList.add(t)},focusItemAtIndex:function(e){var
t=i.listElements[e];t&&t.focus()},getAttributeForElementIndex:function(e,t){return
i.listElements[e].getAttribute(t)},getFocusedElementIndex:function(){return
i.listElements.indexOf(document.activeElement)},getListItemCount:function(){return
i.listElements.length},getPrimaryTextAtIndex:function(e){return
i.getPrimaryText(i.listElements[e])},hasCheckboxAtIndex:function(e){return!!
i.listElements[e].querySelector(d.strings.CHECKBOX_SELECTOR)},hasRadioAtIndex:funct
ion(e){return!!
i.listElements[e].querySelector(d.strings.RADIO_SELECTOR)},isCheckboxCheckedAtIndex
:function(e){return
i.listElements[e].querySelector(d.strings.CHECKBOX_SELECTOR).checked},isFocusInside
List:function(){return
i.root.contains(document.activeElement)},isRootFocused:function(){return
document.activeElement===i.root},listItemAtIndexHasClass:function(e,t){return
i.listElements[e].classList.contains(t)},notifyAction:function(e)
{i.emit(d.strings.ACTION_EVENT,{index:e},!
0)},removeClassForElementIndex:function(e,t){var
n=i.listElements[e];n&&n.classList.remove(t)},setAttributeForElementIndex:function(
e,t,n){var
s=i.listElements[e];s&&s.setAttribute(t,n)},setCheckedCheckboxOrRadioAtIndex:functi
on(e,t){var
n=i.listElements[e].querySelector(d.strings.CHECKBOX_RADIO_SELECTOR);n.checked=t;va
r s=document.createEvent("Event");s.initEvent("change",!0,!
0),n.dispatchEvent(s)},setTabIndexForListItemChildren:function(e,t){var
n=i.listElements[e];
[].slice.call(n.querySelectorAll(d.strings.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forE
ach(function(e){return e.setAttribute("tabindex",t)})}};return new
u.MDCListFoundation(e)},l.prototype.getListItemIndex_=function(e){var
t=e.target,n=a.closest(t,"."+d.cssClasses.LIST_ITEM_CLASS+", ."+d.cssClasses.ROOT);
return n&&a.matches(n,"."+d.cssClasses.LIST_ITEM_CLASS)?
this.listElements.indexOf(n):-1},l.prototype.handleFocusInEvent_=function(e){var
t=this.getListItemIndex_(e);this.foundation.handleFocusIn(e,t)},l.prototype.handleF
ocusOutEvent_=function(e){var
t=this.getListItemIndex_(e);this.foundation.handleFocusOut(e,t)},l.prototype.handle
KeydownEvent_=function(e){var

t=this.getListItemIndex_(e),n=e.target;this.foundation.handleKeydown(e,n.classList.
contains(d.cssClasses.LIST_ITEM_CLASS),t)},l.prototype.handleClickEvent_=function(e
){var t=this.getListItemIndex_(e),n=e.target,s=!
a.matches(n,d.strings.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,s)},l)
;function l(){return null!==r&&r.apply(this,arguments)||
this}t.MDCList=c},2:function(e,t,n){"use strict";function s(e,t){return(e.matches||
e.webkitMatchesSelector||
e.msMatchesSelector).call(e,t)}Object.defineProperty(t,"__esModule",{value:!
0}),t.closest=function(e,t){if(e.closest)return e.closest(t);for(var n=e;n;)
{if(s(n,t))return n;n=n.parentElement}return
null},t.matches=s,t.estimateScrollWidth=function(e){var t=e;if(null!
==t.offsetParent)return t.scrollWidth;var n=t.cloneNode(!
0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","tran
slate(-9999px, -9999px)"),document.documentElement.appendChild(n);var
s=n.scrollWidth;return
document.documentElement.removeChild(n),s}},20:function(e,t,n){"use
strict";Object.defineProperty(t,"__esModule",{value:!0});var
p=n(9),u=n(8),_=n(13);function A(e,t){var
n,s=e.nextChar,i=e.focusItemAtIndex,r=e.sortedIndexByFirstChar,o=e.focusedItemIndex
,a=e.skipFocus,d=e.isItemAtIndexDisabled;return
clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout(function()
{c(t)},u.numbers.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBu
ffer+s,-1===(n=1===t.typeaheadBuffer.length?function(e,t,n,s){var
i=s.typeaheadBuffer[0],r=e.get(i);if(!r)return-
1;if(i===s.currentFirstChar&&r[s.sortedIndexCursor].index===t)
{s.sortedIndexCursor=(s.sortedIndexCursor+1)%r.length;var
o=r[s.sortedIndexCursor].index;if(!n(o))return o}s.currentFirstChar=i;var a,d=-
1;for(a=0;a<r.length;a++)if(!n(r[a].index)){d=a;break}for(;a<r.length;a+
+)if(r[a].index>t&&!n(r[a].index)){d=a;break}return-1===d?-1:
(s.sortedIndexCursor=d,r[s.sortedIndexCursor].index)}(r,o,d,t):function(e,t,n){var
s=n.typeaheadBuffer[0],i=e.get(s);if(!i)return-1;var
r=i[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!
t(r.index))return r.index;var o=(n.sortedIndexCursor+1)%i.length,a=-1;for(;o!
==n.sortedIndexCursor;){var
d=i[o],u=0===d.text.lastIndexOf(n.typeaheadBuffer,0),c=!t(d.index);if(u&&c)
{a=o;break}o=(o+1)%i.length}return-1===a?-1:
(n.sortedIndexCursor=a,i[n.sortedIndexCursor].index)}(r,d,t))||a||i(n),n}function
x(e){return 0<e.typeaheadBuffer.length}function c(e)
{e.typeaheadBuffer=""}t.initState=function()
{return{bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffe
r:""}},t.initSortedIndex=function(e,t){for(var n=new Map,s=0;s<e;s++){var
i=t(s).trim();if(i){var r=i[0].toLowerCase();n.has(r)||n.set(r,
[]),n.get(r).push({text:i.toLowerCase(),index:s})}}return n.forEach(function(e)
{e.sort(function(e,t){return e.index-
t.index})}),n},t.matchItem=A,t.isTypingInProgress=x,t.clearBuffer=c,t.handleKeydown
=function(e,t){var
n=e.event,s=e.isTargetListItem,i=e.focusedItemIndex,r=e.focusItemAtIndex,o=e.sorted
IndexByFirstChar,a=e.isItemAtIndexDisabled,d="ArrowLeft"===p.normalizeKey(n),u="Arr
owUp"===p.normalizeKey(n),c="ArrowRight"===p.normalizeKey(n),l="ArrowDown"===p.norm
alizeKey(n),f="Home"===p.normalizeKey(n),h="End"===p.normalizeKey(n),I="Enter"===p.
normalizeKey(n),E="Spacebar"===p.normalizeKey(n);return d||u||c||l||f||h||I?-1:E||
1!==n.key.length?E?(s&&_.preventDefaultEvent(n),s&&x(t)?
A({focusItemAtIndex:r,focusedItemIndex:i,nextChar:"
",sortedIndexByFirstChar:o,skipFocus:!1,isItemAtIndexDisabled:a},t):-1):-1:
(_.preventDefaultEvent(n),A({focusItemAtIndex:r,focusedItemIndex:i,nextChar:n.key.t
oLowerCase(),sortedIndexByFirstChar:o,skipFocus:!
1,isItemAtIndexDisabled:a},t))}},8:function(e,t,n){"use
strict";Object.defineProperty(t,"__esModule",{value:!0});var
s={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-
item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--
disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--
selected",LIST_ITEM_TEXT_CLASS:"mdc-list-
item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-
list"},i={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-
checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-
checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-
checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-
disabled",ARIA_ORIENTATION:"aria-
orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'
[role="checkbox"]',ARIA_SELECTED:"aria-
selected",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"],
input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_T
OGGLE_TABINDEX:"\n ."+(t.cssClasses=s).LIST_ITEM_CLASS+" button:not(:disabled),\
n ."+s.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\
n ."+s.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+s.LIST_ITEM_CLASS+" a,\n
."+s.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\
n .'+s.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n
',RADIO_SELECTOR:'input[type="radio"]'};t.strings=i;t.numbers={UNSET_INDEX:-
1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300}},9:function(e,s,t){"use
strict";Object.defineProperty(s,"__esModule",{value:!
0}),s.KEY={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar
",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft
",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete
",ESCAPE:"Escape"};var i=new
Set;i.add(s.KEY.BACKSPACE),i.add(s.KEY.ENTER),i.add(s.KEY.SPACEBAR),i.add(s.KEY.PAG
E_UP),i.add(s.KEY.PAGE_DOWN),i.add(s.KEY.END),i.add(s.KEY.HOME),i.add(s.KEY.ARROW_L
EFT),i.add(s.KEY.ARROW_UP),i.add(s.KEY.ARROW_RIGHT),i.add(s.KEY.ARROW_DOWN),i.add(s
.KEY.DELETE),i.add(s.KEY.ESCAPE);var
n=8,r=13,o=32,a=33,d=34,u=35,c=36,l=37,f=38,h=39,I=40,E=46,p=27,_=new
Map;_.set(n,s.KEY.BACKSPACE),_.set(r,s.KEY.ENTER),_.set(o,s.KEY.SPACEBAR),_.set(a,s
.KEY.PAGE_UP),_.set(d,s.KEY.PAGE_DOWN),_.set(u,s.KEY.END),_.set(c,s.KEY.HOME),_.set
(l,s.KEY.ARROW_LEFT),_.set(f,s.KEY.ARROW_UP),_.set(h,s.KEY.ARROW_RIGHT),_.set(I,s.K
EY.ARROW_DOWN),_.set(E,s.KEY.DELETE),_.set(p,s.KEY.ESCAPE);var A=new Set;function
x(e){var t=e.key;if(i.has(t))return t;var n=_.get(e.keyCode);return n||
s.KEY.UNKNOWN}A.add(s.KEY.PAGE_UP),A.add(s.KEY.PAGE_DOWN),A.add(s.KEY.END),A.add(s.
KEY.HOME),A.add(s.KEY.ARROW_LEFT),A.add(s.KEY.ARROW_UP),A.add(s.KEY.ARROW_RIGHT),A.
add(s.KEY.ARROW_DOWN),s.normalizeKey=x,s.isNavigationEvent=function(e){return
A.has(x(e))}}},i.c=s,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,
{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof
Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!
0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof
t&&t&&t.__esModule)return t;var
n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!
0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return
t[e]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function()
{return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t)
{return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=136);function i(e)
{if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return
n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var n,s});

You might also like