!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/if-defined.js"],t);else{var s="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("lit/directives/if-defined.js")):t(e.lit,e["lit/decorators.js"],e["lit/directives/if-defined.js"]);for(var i in s)("object"==typeof exports?exports:e)[i]=s[i]}}(self,(e,t,s)=>(()=>{"use strict";var i,r={6131(e,t,s){s.r(t),s.d(t,{List:()=>i});var i,r=s(2900),o=s(7704),l=s(9609),n=s(4084),d=s(7161),a=s(429),c=s(291),h=s(740),u=function(e,t,s,i){var r,o=arguments.length,l=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,s,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(l=(o<3?r(l):o>3?r(t,s,l):r(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};!function(e){let t=class extends((0,o.Io)(d.LitElement)){constructor(){super(...arguments),this.alignment="vertical",this.label="option",this.activated=-1,this._role="listbox"}firstUpdated(e){super.firstUpdated(e),"none"!==this._role&&this.setAttribute("aria-label",this.label)}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selected},bubbles:!0,composed:!0}))}isFocusable(e){return!e.hasAttribute("hidden")}connectedCallback(){super.connectedCallback();const e=this.getAttribute("role");this._role=e||"listbox",this.removeAttribute("role"),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("click",this.handleClick)}findListItemIndex(e){const t=e.composedPath();return this.slotted.findIndex(e=>t.includes(e))}switchListItemOnArrowPress(e,t=1){const s=super.getAvailableSelectedIndex(e,t);-1!==s&&(this.selected=s)}setActivated(e){-1!==e&&(this.activated=e,this.selected=e,this.setSelected(e))}findSelectedListItemIndex(){return this.slotted.findIndex(e=>e.selected)}setSelected(e){const t=this.findSelectedListItemIndex();-1!==t&&t!==e&&(this.slotted[t].selected=!1),this.slotted[e]&&(this.slotted[e].selected=!0)}updated(e){super.updated(e),e.has("slotted")&&this.setActivated(this.activated),e.has("activated")&&this.setActivated(this.activated),e.has("label")&&"none"!==this._role&&this.setAttribute("aria-label",this.label)}isListItemDisabled(e){var t;const s=this.slotted[e];return null===(t=null==s?void 0:s.disabled)||void 0===t||t}handleClick(e){const t=this.findListItemIndex(e);-1!==t&&(this.isListItemDisabled(t)||(this.setActivated(t),this.notifySelectedChange()))}shouldElementHandleKey(e,t){if(e.hasAttribute("data-handles-keys")||e.closest("[data-handles-keys]"))return!0;const s=e.tagName.toLowerCase(),i=e.nodeName.toLowerCase(),o="input"===i||"textarea"===i||"select"===i,l=e.getAttribute("role"),n=e.hasAttribute("contenteditable")||"false"===e.getAttribute("aria-readonly"),d=[r.Uz.ArrowUp,r.Uz.ArrowDown,r.Uz.ArrowLeft,r.Uz.ArrowRight],a=[r.Uz.Enter,r.Uz.Space];return d.includes(t)?o||n||"textbox"===l||"combobox"===l||"listbox"===l||"menu"===l||"slider"===l||"scrollbar"===l||"tablist"===l||s.startsWith("md-")&&("md-input"===s||"md-select"===s||"md-combobox"===s):a.includes(t)?"button"===l||"link"===l||"checkbox"===l||"radio"===l||"button"===s||"a"===s||"md-button"===s||"md-checkbox"===s||"md-radio"===s||o:(t===r.Uz.Home||t===r.Uz.End)&&(o||n||"textbox"===l||"md-input"===s)}handleKeyDown(e){const t=e.composedPath()[0];if(this.shouldElementHandleKey(t,e.code))return;const{code:s}=e;switch(s){case r.Uz.End:this.switchListItemOnArrowPress(this.slotted.length-1);break;case r.Uz.Home:this.switchListItemOnArrowPress(0);break;case r.Uz.ArrowUp:case r.Uz.ArrowLeft:e.preventDefault(),0===this.selected?this.switchListItemOnArrowPress(this.slotted.length-1,-1):this.switchListItemOnArrowPress(this.selected-1,-1);break;case r.Uz.ArrowDown:case r.Uz.ArrowRight:e.preventDefault(),this.selected===this.slotted.length-1?this.switchListItemOnArrowPress(0):this.switchListItemOnArrowPress(this.selected+1);break;case r.Uz.Enter:case r.Uz.Space:this.isListItemDisabled(this.selected)||(this.setActivated(this.selected),this.notifySelectedChange())}}get slotElement(){return this.listItemSlot}static get styles(){return[n.A,h.A]}render(){return d.html`
        <ul role=${(0,c.ifDefined)("list"!==this._role?this._role:void 0)} class="md-list" part="list">
          <slot name="list-item"></slot>
        </ul>
      `}};u([(0,a.property)({type:String,reflect:!0})],t.prototype,"alignment",void 0),u([(0,a.property)({type:String})],t.prototype,"label",void 0),u([(0,a.property)({type:Number,reflect:!0})],t.prototype,"activated",void 0),u([(0,a.query)("slot[name='list-item']")],t.prototype,"listItemSlot",void 0),t=u([(0,l.w)("md-list")],t),e.ELEMENT=t}(i||(i={}))},7161(t){t.exports=e},429(e){e.exports=t},291(e){e.exports=s}},o={};function l(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return r[e](s,s.exports,l),s.exports}l.m=r,i=[],l.O=(e,t,s,r)=>{if(!t){var o=1/0;for(c=0;c<i.length;c++){for(var[t,s,r]=i[c],n=!0,d=0;d<t.length;d++)(!1&r||o>=r)&&Object.keys(l.O).every(e=>l.O[e](t[d]))?t.splice(d--,1):(n=!1,r<o&&(o=r));if(n){i.splice(c--,1);var a=s();void 0!==a&&(e=a)}}return e}r=r||0;for(var c=i.length;c>0&&i[c-1][2]>r;c--)i[c]=i[c-1];i[c]=[t,s,r]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var s in t)l.o(t,s)&&!l.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6060:0};l.O.j=t=>0===e[t];var t=(t,s)=>{var i,r,[o,n,d]=s,a=0;if(o.some(t=>0!==e[t])){for(i in n)l.o(n,i)&&(l.m[i]=n[i]);if(d)var c=d(l)}for(t&&t(s);a<o.length;a++)r=o[a],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(c)},s=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})();var n=l.O(void 0,[9609,4084,2364,9938,5201,2900,608,3203,7162,740,2942],()=>l(6131));return l.O(n)})());