@momentum-ui/web-components 3.0.0-beta.6 → 3.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,25 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("@lit-labs/virtualizer"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","@lit-labs/virtualizer"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("@lit-labs/virtualizer")):e(t.lit,t["lit/decorators.js"],t["@lit-labs/virtualizer"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i)=>(()=>{"use strict";var s,r={28307:(t,e,i)=>{i.r(e),i.d(e,{AdvanceList:()=>s});var s,r=i(90195),l=i(31890),o=i(32972),a=i(4313),d=(i(83048),i(87161)),n=i(70429),h=i(89312),c=function(t,e,i,s){var r,l=arguments.length,o=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(l<3?r(o):l>3?r(e,i,o):r(e,i))||o);return l>3&&o&&Object.defineProperty(e,i,o),o};!function(t){t.prefixId="item-";let e=class extends((0,o.y)(d.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.focusReset=!1,this.disabledItems=[],this.totalRecords=0,this.isNonSelectable=!1,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=e=>{var i,s,l;const{ArrowDown:o,ArrowUp:a,Tab:d,Space:n,Enter:h}=r.Uz,{code:c}=e,p=c===o,u=c===a,v=c===d,m=c===n,b=c===h;if(p||u){if(e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0&&""!==this.value[0])return void(this.activeId=this.value[0]);if(""===this.activeId&&!u&&this.items.length>0)return void(this.activeId=this.items[0].id);const t=this.items.findIndex(t=>t.id===this.activeId);p?t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id,null===(i=this.virtualizer)||void 0===i||i.scrollToIndex(this.scrollIndex,"start")):t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id,null===(s=this.virtualizer)||void 0===s||s.scrollToIndex(this.scrollIndex,"start"))}else if(v)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((m||b)&&(e.preventDefault(),this.activeId)){const e=null===(l=this.shadowRoot)||void 0===l?void 0:l.querySelector(`#${t.prefixId}${this.activeId}`);e&&("true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||this.updateItemSelection(e))}},this.handleRangeChange=t=>{const{last:e}=t;this.updateSelectedState(),this.items.length<this.totalRecords&&e>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1},this.renderItem=(e,i)=>"status-indicator"===e.id?d.html`
2
- <div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
3
- `:d.html`
4
- <div
5
- class="default-wrapper ${e.id} ${this.isNonSelectable?"non-selectable":""}"
6
- part="advance-list-item-wrapper"
7
- aria-setsize="${this.totalRecords}"
8
- aria-posinset="${i+1}"
9
- role="${this.ariaRoleListItem}"
10
- aria-label=${e.name}
11
- id="${t.prefixId}${e.id}"
12
- index="${i}"
13
- >
14
- ${e.template(e,i)}
15
- </div>
16
- `}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick)}static get styles(){return[a.A,h.A]}getStyles(){return d.html`
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("lit"),require("lit/decorators.js"),require("@lit-labs/virtualizer"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","@lit-labs/virtualizer"],t);else{var i="object"==typeof exports?t(require("lit"),require("lit/decorators.js"),require("@lit-labs/virtualizer")):t(e.lit,e["lit/decorators.js"],e["@lit-labs/virtualizer"]);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(self,(e,t,i)=>(()=>{"use strict";var s,r={28307:(e,t,i)=>{i.r(t),i.d(t,{AdvanceList:()=>s});var s,r=i(90195),l=i(31890),d=i(32972),a=i(4313),o=(i(83048),i(87161)),n=i(70429),h=i(89312),c=function(e,t,i,s){var r,l=arguments.length,d=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(d=(l<3?r(d):l>3?r(t,i,d):r(t,i))||d);return l>3&&d&&Object.defineProperty(t,i,d),d};!function(e){e.prefixId="item-";let t=class extends((0,d.y)(o.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.focusReset=!1,this.disabledItems=[],this.totalRecords=0,this.isNonSelectable=!1,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=t=>{var i,s,l;const{ArrowDown:d,ArrowUp:a,Tab:o,Space:n,Enter:h}=r.Uz,{code:c}=t,p=c===d,u=c===a,v=c===o,m=c===n,b=c===h;if(p||u){if(t.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0&&""!==this.value[0])return void(this.activeId=this.value[0]);if(""===this.activeId&&!u&&this.items.length>0)return void(this.activeId=this.items[0].id);const e=this.items.findIndex(e=>e.id===this.activeId);p?e<this.items.length-1&&!this.isNextElemenentStatusIndicator(e)&&(this.scrollIndex=e+1,this.activeId=this.items[this.scrollIndex].id,null===(i=this.virtualizer)||void 0===i||i.scrollToIndex(this.scrollIndex,"start")):e>0&&(this.scrollIndex=e-1,this.activeId=this.items[this.scrollIndex].id,null===(s=this.virtualizer)||void 0===s||s.scrollToIndex(this.scrollIndex,"start"))}else if(v)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((m||b)&&(t.preventDefault(),this.activeId)){const t=null===(l=this.shadowRoot)||void 0===l?void 0:l.querySelector(`#${e.prefixId}${this.activeId}`);t&&("true"===t.getAttribute("aria-disabled")||t.hasAttribute("disabled")||this.updateItemSelection(t))}},this.handleRangeChange=e=>{const{last:t}=e;this.updateSelectedState(),this.items.length<this.totalRecords&&t>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1},this.renderItem=(t,i)=>{if(!t)return o.html`<div class="default-wrapper-error">Invalid item</div>`;if(!t.id)return console.warn(`AdvanceList.renderItem: item missing id at index ${i}`,t),o.html`<div class="default-wrapper-error">Item missing ID</div>`;try{return"status-indicator"===t.id?o.html`
2
+ <div class="default-wrapper-status-indicator" id="status-indicator">${t.template(t,i)}</div>
3
+ `:o.html`
4
+ <div
5
+ class="default-wrapper ${t.id} ${this.isNonSelectable?"non-selectable":""}"
6
+ part="advance-list-item-wrapper"
7
+ aria-setsize="${this.totalRecords}"
8
+ aria-posinset="${i+1}"
9
+ role="${this.ariaRoleListItem}"
10
+ aria-label=${t.name||"Unknown item"}
11
+ id="${e.prefixId}${t.id}"
12
+ data-index="${i}"
13
+ >
14
+ ${t.template(t,i)}
15
+ </div>
16
+ `}catch(e){return console.error(`AdvanceList.renderItem: Error rendering item ${t.id} at index ${i}:`,e,t),o.html`<div class="default-wrapper-error">Error rendering item</div>`}}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick)}static get styles(){return[a.A,h.A]}getStyles(){return o.html`
17
17
  <style>
18
18
  :host .virtual-scroll {
19
19
  height: ${this.containerHeight};
20
20
  }
21
21
  </style>
22
- `}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&this.updateSelectedState(),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,s,r,l;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?null===(l=e.querySelector("md-checkbox"))||void 0===l||l.removeAttribute("checked"):null===(r=e.querySelector("md-checkbox"))||void 0===r||r.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,s;const r=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,r),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0"),(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(s=e.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),s=t.composedPath(),r=i.find(t=>s.includes(t));if(r)return(null==r?void 0:r.hasAttribute("disabled"))||"true"===(null==r?void 0:r.getAttribute("aria-disabled"))?0:r}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value[0]}`:""}render(){return d.html`
22
+ `}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(e=this.listContainer)||void 0===e||e.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(e){var t;super.firstUpdated(e),null===(t=this.listContainer)||void 0===t||t.addEventListener("keydown",this.handleKeyDown)}willUpdate(e){var t;null===(t=super.willUpdate)||void 0===t||t.call(this,e),e.has("value")&&(void 0!==e.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),e.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(e=>e&&e.id&&!this.disabledItems.includes(e.id)).map(e=>e.id)),e.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(e){super.updated(e),e.has("value")&&(void 0!==e.get("value")||this.value.length>0)&&this.updateSelectedState(),e.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(e,t){var i,s,r,l;!e||(null===(i=t.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(s=t.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?null===(l=t.querySelector("md-checkbox"))||void 0===l||l.removeAttribute("checked"):null===(r=t.querySelector("md-checkbox"))||void 0===r||r.setAttribute("checked","true")}updateWrapperAttributes(e,t){this.isMulti?this.setCheckboxAttributes(t,e):e.classList.toggle("selected",t),e.setAttribute("selected",t.toString()),e.setAttribute("aria-selected",t.toString()),e.setAttribute("tabindex",t?"0":"-1")}updateSelectedState(){var t;Array.from((null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".default-wrapper"))||[]).forEach(t=>{var i,s;const r=this.selectedItemsIds.some(i=>t.id===`${e.prefixId}${i}`);this.updateWrapperAttributes(t,r),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&t.id===`${e.prefixId}${this.lastSelectedIdByOrder}`?t.classList.add("selected-border-bottom"):t.classList.remove("selected-border-bottom"),t.id===`${e.prefixId}${this.activeId}`?(t.setAttribute("tabindex","0"),t.focus()):t.setAttribute("tabindex","-1"),""==this.activeId&&t.id===`${e.prefixId}${this.value[0]}`&&t.setAttribute("tabindex","0"),(null===(i=t.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(s=t.firstElementChild)||void 0===s?void 0:s.getAttribute("aria-disabled"))?(t.setAttribute("disabled",""),t.setAttribute("aria-disabled","true")):(t.removeAttribute("disabled"),t.removeAttribute("aria-disabled"))})}findClickedItem(e){var t;const i=Array.from((null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".default-wrapper"))||[]),s=e.composedPath(),r=i.find(e=>s.includes(e));if(r)return(null==r?void 0:r.hasAttribute("disabled"))||"true"===(null==r?void 0:r.getAttribute("aria-disabled"))?0:r}isNextElemenentStatusIndicator(e){return(this.isLoading||this.isError)&&e===this.items.length-2}updateItemForMultiSelect(e){const t=this.selectedItemsIds.indexOf(e);-1===t?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(t,1),this.selectAllItems=!1)}updateItemSelection(e){e&&(this.activeId=e.id.substring(e.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(e){e.preventDefault(),this.isUserNavigated=!1;const t=this.findClickedItem(e);t&&(this.scrollIndex=parseInt(t.getAttribute("index")||"0"),this.updateItemSelection(t))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${e.prefixId}${this.activeId}`:this.value?`${e.prefixId}${this.value[0]}`:""}render(){return o.html`
23
23
  ${this.getStyles()}
24
24
  <div
25
25
  class="md-advance-list-wrapper virtual-scroll"
@@ -32,7 +32,7 @@
32
32
  >
33
33
  <lit-virtualizer
34
34
  .items=${this.items}
35
- .renderItem=${(t,e)=>this.renderItem(t,e)}
35
+ .renderItem=${(e,t)=>this.renderItem(e,t)}
36
36
  ></lit-virtualizer>
37
37
  </div>
38
- `}};c([(0,n.property)({type:Array})],e.prototype,"items",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isLoading",void 0),c([(0,n.property)({type:Boolean,attribute:"is-multi"})],e.prototype,"isMulti",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"groupOnMultiSelect",void 0),c([(0,n.property)({type:Array})],e.prototype,"value",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaRoleList",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaRoleListItem",void 0),c([(0,n.property)({type:String})],e.prototype,"ariaLabelList",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isError",void 0),c([(0,n.property)({type:String})],e.prototype,"containerHeight",void 0),c([(0,n.property)({type:String})],e.prototype,"lastSelectedIdByOrder",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"selectAllItems",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"focusReset",void 0),c([(0,n.property)({type:Array})],e.prototype,"disabledItems",void 0),c([(0,n.property)({type:Number})],e.prototype,"totalRecords",void 0),c([(0,n.property)({type:Boolean})],e.prototype,"isNonSelectable",void 0),c([(0,n.query)(".virtual-scroll")],e.prototype,"listContainer",void 0),c([(0,n.query)("lit-virtualizer")],e.prototype,"virtualizer",void 0),c([(0,n.state)()],e.prototype,"scrollIndex",void 0),c([(0,n.state)()],e.prototype,"activeId",void 0),c([(0,n.state)()],e.prototype,"selectedItemsIds",void 0),c([(0,n.state)()],e.prototype,"isUserNavigated",void 0),e=c([(0,l.w)("md-advance-list")],e),t.ELEMENT=e}(s||(s={}))},70429:t=>{t.exports=e},83048:t=>{t.exports=i},87161:e=>{e.exports=t}},l={};function o(t){var e=l[t];if(void 0!==e)return e.exports;var i=l[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.m=r,s=[],o.O=(t,e,i,r)=>{if(!e){var l=1/0;for(h=0;h<s.length;h++){for(var[e,i,r]=s[h],a=!0,d=0;d<e.length;d++)(!1&r||l>=r)&&Object.keys(o.O).every(t=>o.O[t](e[d]))?e.splice(d--,1):(a=!1,r<l&&(l=r));if(a){s.splice(h--,1);var n=i();void 0!==n&&(t=n)}}return t}r=r||0;for(var h=s.length;h>0&&s[h-1][2]>r;h--)s[h]=s[h-1];s[h]=[e,i,r]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={3079:0};o.O.j=e=>0===t[e];var e=(e,i)=>{var s,r,[l,a,d]=i,n=0;if(l.some(e=>0!==t[e])){for(s in a)o.o(a,s)&&(o.m[s]=a[s]);if(d)var h=d(o)}for(e&&e(i);n<l.length;n++)r=l[n],o.o(t,r)&&t[r]&&t[r][0](),t[r]=0;return o.O(h)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var a=o.O(void 0,[1890,4313,2576,8210,1270,9312],()=>o(28307));return o.O(a)})());
38
+ `}};c([(0,n.property)({type:Array})],t.prototype,"items",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"isLoading",void 0),c([(0,n.property)({type:Boolean,attribute:"is-multi"})],t.prototype,"isMulti",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"groupOnMultiSelect",void 0),c([(0,n.property)({type:Array})],t.prototype,"value",void 0),c([(0,n.property)({type:String})],t.prototype,"ariaRoleList",void 0),c([(0,n.property)({type:String})],t.prototype,"ariaRoleListItem",void 0),c([(0,n.property)({type:String})],t.prototype,"ariaLabelList",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"isError",void 0),c([(0,n.property)({type:String})],t.prototype,"containerHeight",void 0),c([(0,n.property)({type:String})],t.prototype,"lastSelectedIdByOrder",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"selectAllItems",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"focusReset",void 0),c([(0,n.property)({type:Array})],t.prototype,"disabledItems",void 0),c([(0,n.property)({type:Number})],t.prototype,"totalRecords",void 0),c([(0,n.property)({type:Boolean})],t.prototype,"isNonSelectable",void 0),c([(0,n.query)(".virtual-scroll")],t.prototype,"listContainer",void 0),c([(0,n.query)("lit-virtualizer")],t.prototype,"virtualizer",void 0),c([(0,n.state)()],t.prototype,"scrollIndex",void 0),c([(0,n.state)()],t.prototype,"activeId",void 0),c([(0,n.state)()],t.prototype,"selectedItemsIds",void 0),c([(0,n.state)()],t.prototype,"isUserNavigated",void 0),t=c([(0,l.w)("md-advance-list")],t),e.ELEMENT=t}(s||(s={}))},70429:e=>{e.exports=t},83048:e=>{e.exports=i},87161:t=>{t.exports=e}},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var i=l[e]={exports:{}};return r[e](i,i.exports,d),i.exports}d.m=r,s=[],d.O=(e,t,i,r)=>{if(!t){var l=1/0;for(h=0;h<s.length;h++){for(var[t,i,r]=s[h],a=!0,o=0;o<t.length;o++)(!1&r||l>=r)&&Object.keys(d.O).every(e=>d.O[e](t[o]))?t.splice(o--,1):(a=!1,r<l&&(l=r));if(a){s.splice(h--,1);var n=i();void 0!==n&&(e=n)}}return e}r=r||0;for(var h=s.length;h>0&&s[h-1][2]>r;h--)s[h]=s[h-1];s[h]=[t,i,r]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var i in t)d.o(t,i)&&!d.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={3079:0};d.O.j=t=>0===e[t];var t=(t,i)=>{var s,r,[l,a,o]=i,n=0;if(l.some(t=>0!==e[t])){for(s in a)d.o(a,s)&&(d.m[s]=a[s]);if(o)var h=o(d)}for(t&&t(i);n<l.length;n++)r=l[n],d.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return d.O(h)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var a=d.O(void 0,[1890,4313,2576,8210,1270,9312],()=>d(28307));return d.O(a)})());
@@ -1,4 +1,4 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@lit-labs/virtualizer","lit/directives/until.js","lit/directives/repeat.js","luxon","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","@floating-ui/dom","highlight.js/lib/core","country-codes-list","country-flags-svg","sortablejs","dompurify","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/interact/index","@interactjs/modifiers","libphonenumber-js","lit/directives/unsafe-html.js","papaparse","@popperjs/core/lib"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["@lit-labs/virtualizer"],t["lit/directives/until.js"],t["lit/directives/repeat.js"],t.luxon,t["@popperjs/core/lib/modifiers/arrow"],t["@popperjs/core/lib/modifiers/flip"],t["@popperjs/core/lib/modifiers/offset"],t["@popperjs/core/lib/modifiers/preventOverflow"],t["@popperjs/core/lib/popper-lite"],t["@floating-ui/dom"],t["highlight.js/lib/core"],t["country-codes-list"],t["country-flags-svg"],t.sortablejs,t.dompurify,t["@interactjs/actions/drag"],t["@interactjs/actions/resize"],t["@interactjs/auto-start"],t["@interactjs/interact/index"],t["@interactjs/modifiers"],t["libphonenumber-js"],t["lit/directives/unsafe-html.js"],t.papaparse,t["@popperjs/core/lib"]);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,s,r,a,n,l,d,h,c,p,u,m,y,b,v,g,f,w,x,C,E,S,$,T,k,A,I,L,O)=>(()=>{"use strict";var M,D,P,R,_,B={860:t=>{t.exports=A},1072:(t,e,i)=>{i.d(e,{Theme:()=>o});var o,s=i(62848),r=i(31890),a=i(4893),n=i(4863),l=i(87161),d=i(70429),h=i(38161),c=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.darkTheme=!1,this.lumos=!1,this.activeTheme=h.dW,this.placement="bottom",this.popperInstance=null,this.activeTooltipTrigger=null,this.handleTooltipRemoved=()=>{this.hideVirtualTooltip(),this.activeTooltipTrigger=null}}setTheme(){return"momentum"===this.theme?this.darkTheme?h.Pm:h.f3:"lumos"===this.theme?this.darkTheme?h.Lu:h.dW:"momentumV2"===this.theme?this.darkTheme?h.Pm:h.f3:this.lumos?this.darkTheme?h.Lu:h.dW:this.darkTheme?h.Pm:h.f3}getStyleElement(){return document.createElement("style")}applyStyle(){const t=this.shadowRoot;if("adoptedStyleSheets"in document){const e=new CSSStyleSheet;e.replaceSync(this.activeTheme),t.adoptedStyleSheets=[e]}else{const e=this.getStyleElement();e.textContent=this.activeTheme.cssText,t.appendChild(e)}}removeChildFromVirtualPopper(){for(;this.virtualWrapper.firstElementChild;)this.virtualWrapper.firstElementChild.remove()}setInitStyleToVirtualReference(){const{style:t}=this.virtualReference;t.top="0",t.bottom="0",t.left="0",t.right="0",t.width="0",t.height="0",t.zIndex="-1"}setStyleToVirtualReference(t){const{style:e}=this.virtualReference,{top:i,bottom:o,left:s,right:r,width:a,height:n}=t;e.position="fixed",e.top=`${i}px`,e.bottom=`${o}px`,e.left=`${s}px`,e.right=`${r}px`,e.width=`${a}px`,e.height=`${n}px`,e.zIndex="-1"}setVirtualReferencePosition(t){const e=t.getBoundingClientRect();this.setStyleToVirtualReference(e)}initVirtualElements(t,e,i){const o=t.cloneNode(!0);this.virtualWrapper.hasChildNodes()&&this.removeChildFromVirtualPopper(),this.virtualWrapper.append(o),i&&this.setVirtualSlotContent(i),this.setVirtualReferencePosition(e)}setVirtualSlotContent(t){if(this.virtualTooltipContent){for(;this.virtualTooltipContent.firstElementChild;)this.virtualTooltipContent.firstElementChild.remove();t.forEach(t=>this.virtualTooltipContent.append(t))}}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.activeTheme=this.setTheme())}updated(t){super.updated(t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.dispatchEvent(new CustomEvent("theme-changed",{composed:!0,bubbles:!0,detail:{darkTheme:this.darkTheme,lumos:this.lumos,theme:this.theme}})),this.applyStyle())}handleVirtualTooltipCreate(t){t.stopPropagation();const{popper:e,placement:i,reference:o,slotContent:s}=t.detail;this.activeTooltipTrigger=o,this.placement=i,this.initVirtualElements(e,o,s),this.startContinuousPositionTracking(o),this.showVirtualTooltip()}startContinuousPositionTracking(t){this.stopContinuousPositionTracking();const e=()=>{this.activeTooltipTrigger===t&&this.popperInstance&&(this.setVirtualReferencePosition(t),this.popperInstance.update(),this.positionTrackingId=requestAnimationFrame(e))};this.positionTrackingId=requestAnimationFrame(e)}stopContinuousPositionTracking(){this.positionTrackingId&&(cancelAnimationFrame(this.positionTrackingId),this.positionTrackingId=void 0)}handleVirtualTooltipDestroy(t){t.stopPropagation(),this.hideVirtualTooltip(),this.activeTooltipTrigger===t.detail.reference&&(this.activeTooltipTrigger=null)}handleVirtualTooltipChangeMessage(t){var e;const{popper:i,reference:o}=t.detail;if(this.activeTooltipTrigger!==o)return;const s=i.querySelector(".md-tooltip__content"),r=this.virtualWrapper.querySelector(".md-tooltip__content");if(s&&r){const t=s.textContent,i=r.textContent;t&&i&&(r.textContent=t,null===(e=this.popperInstance)||void 0===e||e.update())}}handleVirtualTooltipSlotChange(t){const{slotContent:e}=t.detail;e&&this.setVirtualSlotContent(e)}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}createPopperInstance(t){if(this.virtualPopper){const e=8,i=4;this.popperInstance=(0,a.createPopper)(this.virtualReference,this.virtualPopper,{placement:t,modifiers:[...n.defaultModifiers,a.flip,a.offset,a.arrow,{name:"offset",options:{offset:({placement:t})=>{const o=e+i;return t.startsWith("left")||t.startsWith("right")||t.startsWith("top")||t.startsWith("bottom")?[0,o]:[8,8]}}},...this.virtualArrow?[{name:"arrow",options:{element:this.virtualArrow,padding:e}}]:[]]})}}get virtualPopper(){return this.shadowRoot.querySelector(".md-tooltip__popper")}get virtualArrow(){return this.shadowRoot.querySelector(".md-tooltip__arrow")}get virtualTooltipContent(){return this.shadowRoot.querySelector(".md-tooltip__content")}showVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!0),this.createPopperInstance(this.placement))}hideVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!1),this.destroyPopperInstance(),this.stopContinuousPositionTracking(),this.setInitStyleToVirtualReference())}setupEvents(){this.addEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.addEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.addEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.addEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.addEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}teardownEvents(){this.removeEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.removeEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.removeEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.removeEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.removeEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}disconnectedCallback(){super.disconnectedCallback(),this.stopContinuousPositionTracking(),this.teardownEvents()}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return i=this,o=void 0,r=function*(){e.firstUpdated.call(this,t),yield new Promise(t=>setTimeout(t,0)),this.setupEvents()},new((s=void 0)||(s=Promise))(function(t,e){function a(t){try{l(r.next(t))}catch(t){e(t)}}function n(t){try{l(r.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(a,n)}l((r=r.apply(i,o||[])).next())});var i,o,s,r}static get styles(){return[h.dW]}render(){return l.html`
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","@lit-labs/virtualizer","lit/directives/until.js","lit/directives/repeat.js","luxon","@popperjs/core/lib/modifiers/arrow","@popperjs/core/lib/modifiers/flip","@popperjs/core/lib/modifiers/offset","@popperjs/core/lib/modifiers/preventOverflow","@popperjs/core/lib/popper-lite","@floating-ui/dom","highlight.js/lib/core","country-codes-list","country-flags-svg","sortablejs","dompurify","@interactjs/actions/drag","@interactjs/actions/resize","@interactjs/auto-start","@interactjs/interact/index","@interactjs/modifiers","libphonenumber-js","lit/directives/unsafe-html.js","papaparse","@popperjs/core/lib"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("@lit-labs/virtualizer"),require("lit/directives/until.js"),require("lit/directives/repeat.js"),require("luxon"),require("@popperjs/core/lib/modifiers/arrow"),require("@popperjs/core/lib/modifiers/flip"),require("@popperjs/core/lib/modifiers/offset"),require("@popperjs/core/lib/modifiers/preventOverflow"),require("@popperjs/core/lib/popper-lite"),require("@floating-ui/dom"),require("highlight.js/lib/core"),require("country-codes-list"),require("country-flags-svg"),require("sortablejs"),require("dompurify"),require("@interactjs/actions/drag"),require("@interactjs/actions/resize"),require("@interactjs/auto-start"),require("@interactjs/interact/index"),require("@interactjs/modifiers"),require("libphonenumber-js"),require("lit/directives/unsafe-html.js"),require("papaparse"),require("@popperjs/core/lib")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["@lit-labs/virtualizer"],t["lit/directives/until.js"],t["lit/directives/repeat.js"],t.luxon,t["@popperjs/core/lib/modifiers/arrow"],t["@popperjs/core/lib/modifiers/flip"],t["@popperjs/core/lib/modifiers/offset"],t["@popperjs/core/lib/modifiers/preventOverflow"],t["@popperjs/core/lib/popper-lite"],t["@floating-ui/dom"],t["highlight.js/lib/core"],t["country-codes-list"],t["country-flags-svg"],t.sortablejs,t.dompurify,t["@interactjs/actions/drag"],t["@interactjs/actions/resize"],t["@interactjs/auto-start"],t["@interactjs/interact/index"],t["@interactjs/modifiers"],t["libphonenumber-js"],t["lit/directives/unsafe-html.js"],t.papaparse,t["@popperjs/core/lib"]);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(self,(t,e,i,o,s,r,a,n,l,d,h,c,p,u,m,y,v,b,g,f,w,x,C,E,S,$,T,k,A,I,L,O)=>(()=>{"use strict";var M,D,P,R,_,B={860:t=>{t.exports=A},1072:(t,e,i)=>{i.d(e,{Theme:()=>o});var o,s=i(62848),r=i(31890),a=i(4893),n=i(4863),l=i(87161),d=i(70429),h=i(38161),c=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.darkTheme=!1,this.lumos=!1,this.activeTheme=h.dW,this.placement="bottom",this.popperInstance=null,this.activeTooltipTrigger=null,this.handleTooltipRemoved=()=>{this.hideVirtualTooltip(),this.activeTooltipTrigger=null}}setTheme(){return"momentum"===this.theme?this.darkTheme?h.Pm:h.f3:"lumos"===this.theme?this.darkTheme?h.Lu:h.dW:"momentumV2"===this.theme?this.darkTheme?h.Pm:h.f3:this.lumos?this.darkTheme?h.Lu:h.dW:this.darkTheme?h.Pm:h.f3}getStyleElement(){return document.createElement("style")}applyStyle(){const t=this.shadowRoot;if("adoptedStyleSheets"in document){const e=new CSSStyleSheet;e.replaceSync(this.activeTheme),t.adoptedStyleSheets=[e]}else{const e=this.getStyleElement();e.textContent=this.activeTheme.cssText,t.appendChild(e)}}removeChildFromVirtualPopper(){for(;this.virtualWrapper.firstElementChild;)this.virtualWrapper.firstElementChild.remove()}setInitStyleToVirtualReference(){const{style:t}=this.virtualReference;t.top="0",t.bottom="0",t.left="0",t.right="0",t.width="0",t.height="0",t.zIndex="-1"}setStyleToVirtualReference(t){const{style:e}=this.virtualReference,{top:i,bottom:o,left:s,right:r,width:a,height:n}=t;e.position="fixed",e.top=`${i}px`,e.bottom=`${o}px`,e.left=`${s}px`,e.right=`${r}px`,e.width=`${a}px`,e.height=`${n}px`,e.zIndex="-1"}setVirtualReferencePosition(t){const e=t.getBoundingClientRect();this.setStyleToVirtualReference(e)}initVirtualElements(t,e,i){const o=t.cloneNode(!0);this.virtualWrapper.hasChildNodes()&&this.removeChildFromVirtualPopper(),this.virtualWrapper.append(o),i&&this.setVirtualSlotContent(i),this.setVirtualReferencePosition(e)}setVirtualSlotContent(t){if(this.virtualTooltipContent){for(;this.virtualTooltipContent.firstElementChild;)this.virtualTooltipContent.firstElementChild.remove();t.forEach(t=>this.virtualTooltipContent.append(t))}}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.activeTheme=this.setTheme())}updated(t){super.updated(t),(t.has("lumos")||t.has("darkTheme")||t.has("theme"))&&(this.dispatchEvent(new CustomEvent("theme-changed",{composed:!0,bubbles:!0,detail:{darkTheme:this.darkTheme,lumos:this.lumos,theme:this.theme}})),this.applyStyle())}handleVirtualTooltipCreate(t){t.stopPropagation();const{popper:e,placement:i,reference:o,slotContent:s}=t.detail;this.activeTooltipTrigger=o,this.placement=i,this.initVirtualElements(e,o,s),this.startContinuousPositionTracking(o),this.showVirtualTooltip()}startContinuousPositionTracking(t){this.stopContinuousPositionTracking();const e=()=>{this.activeTooltipTrigger===t&&this.popperInstance&&(this.setVirtualReferencePosition(t),this.popperInstance.update(),this.positionTrackingId=requestAnimationFrame(e))};this.positionTrackingId=requestAnimationFrame(e)}stopContinuousPositionTracking(){this.positionTrackingId&&(cancelAnimationFrame(this.positionTrackingId),this.positionTrackingId=void 0)}handleVirtualTooltipDestroy(t){t.stopPropagation(),this.hideVirtualTooltip(),this.activeTooltipTrigger===t.detail.reference&&(this.activeTooltipTrigger=null)}handleVirtualTooltipChangeMessage(t){var e;const{popper:i,reference:o}=t.detail;if(this.activeTooltipTrigger!==o)return;const s=i.querySelector(".md-tooltip__content"),r=this.virtualWrapper.querySelector(".md-tooltip__content");if(s&&r){const t=s.textContent,i=r.textContent;t&&i&&(r.textContent=t,null===(e=this.popperInstance)||void 0===e||e.update())}}handleVirtualTooltipSlotChange(t){const{slotContent:e}=t.detail;e&&this.setVirtualSlotContent(e)}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}createPopperInstance(t){if(this.virtualPopper){const e=8,i=4;this.popperInstance=(0,a.createPopper)(this.virtualReference,this.virtualPopper,{placement:t,modifiers:[...n.defaultModifiers,a.flip,a.offset,a.arrow,{name:"offset",options:{offset:({placement:t})=>{const o=e+i;return t.startsWith("left")||t.startsWith("right")||t.startsWith("top")||t.startsWith("bottom")?[0,o]:[8,8]}}},...this.virtualArrow?[{name:"arrow",options:{element:this.virtualArrow,padding:e}}]:[]]})}}get virtualPopper(){return this.shadowRoot.querySelector(".md-tooltip__popper")}get virtualArrow(){return this.shadowRoot.querySelector(".md-tooltip__arrow")}get virtualTooltipContent(){return this.shadowRoot.querySelector(".md-tooltip__content")}showVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!0),this.createPopperInstance(this.placement))}hideVirtualTooltip(){this.virtualPopper&&(this.virtualPopper.toggleAttribute("data-show",!1),this.destroyPopperInstance(),this.stopContinuousPositionTracking(),this.setInitStyleToVirtualReference())}setupEvents(){this.addEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.addEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.addEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.addEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.addEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}teardownEvents(){this.removeEventListener("tooltip-create",this.handleVirtualTooltipCreate),this.removeEventListener("tooltip-destroy",this.handleVirtualTooltipDestroy),this.removeEventListener("tooltip-message",this.handleVirtualTooltipChangeMessage),this.removeEventListener("tooltip-slot",this.handleVirtualTooltipSlotChange),document.removeEventListener("tooltip-disconnected",this.handleTooltipRemoved,!0)}disconnectedCallback(){super.disconnectedCallback(),this.stopContinuousPositionTracking(),this.teardownEvents()}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return i=this,o=void 0,r=function*(){e.firstUpdated.call(this,t),yield new Promise(t=>setTimeout(t,0)),this.setupEvents()},new((s=void 0)||(s=Promise))(function(t,e){function a(t){try{l(r.next(t))}catch(t){e(t)}}function n(t){try{l(r.throw(t))}catch(t){e(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(a,n)}l((r=r.apply(i,o||[])).next())});var i,o,s,r}static get styles(){return[h.dW]}render(){return l.html`
2
2
  <div class="theme-wrapper" part="theme-wrapper">
3
3
  <style>
4
4
  ${s.A} .theme-wrapper {
@@ -27,7 +27,7 @@
27
27
  ${this.checkboxBoxTemplate()}
28
28
  <slot></slot>
29
29
  </label>
30
- `}};c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"checked",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"indeterminate",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),c([(0,d.property)({type:String})],e.prototype,"label",void 0),c([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),c([(0,d.query)(".checkbox-input")],e.prototype,"input",void 0),e=c([(0,a.w)("md-checkbox")],e),t.ELEMENT=e}(o||(o={}))},4863:t=>{t.exports=b},4893:t=>{t.exports=O},4928:(t,e,i)=>{i.d(e,{ComboBox:()=>o}),i(20109),i(61200);var o,s=i(90195),r=i(3001),a=i(31890),n=i(66677),l=i(4313),d=i(87161),h=i(70429),c=i(85125),p=i(20291),u=i(58175),m=i(10318),y=i(97103),b=i(79270),v=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},g=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.yC)(d.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,n.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,n.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e,i,o,s;const r=this._focusedIndex;if(this.checkForVirtualScroll()){let r;r=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const a=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===r):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),a&&(null==a||a.toggleAttribute("focused",!0));const n=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("lit-virtualizer");n&&(-1===t?null===(o=n.element(t))||void 0===o||o.scrollIntoView({block:"start"}):null===(s=n.element(t))||void 0===s||s.scrollIntoView({block:"center"}))}else if(this.lists){const e=this.lists[r];e&&e.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",r)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const o=this.labels[t];o&&(o.toggleAttribute("focused",!0),o.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("options")&&this.expanded&&this.checkForVirtualScroll()&&this.updateOnNextFrame(()=>{this.resizeListbox()}),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),o=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of o){const o=i.getAttribute("aria-label"),s=i.getAttribute("display-value"),r=i.getAttribute("slot");o&&s&&e.push({[this.optionId]:o,[this.optionValue]:s,isLabel:"false",groupName:t,slot:r})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,o=0;const s=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),o=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+s}px`),this.virtualizer&&(this.virtualizer.style.height=`${o+s}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+s}px`,this.listBox.style.maxHeight=`${e.clientHeight+s}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:o,bottom:s}=this.listBox.getBoundingClientRect(),r=this.lists[this.focusedIndex],a=null===(t=this.lists[this.focusedIndex+1]||r)||void 0===t?void 0:t.getBoundingClientRect(),n=null===(e=this.lists[this.focusedIndex-1]||r)||void 0===e?void 0:e.getBoundingClientRect();(null==a?void 0:a.bottom)>s?i=a.bottom-s+2:(null==n?void 0:n.top)<o&&(i=n.top-o-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return g(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return g(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case s.Uz.Escape:break;case s.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case s.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let o=this.findOptionIndex(i);if(-1!==o){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?o+1:o,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(o-=1);const t=this.getFocusedItem(o);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case s.Uz.Backspace:this.focusedIndex=-1;break;case s.Uz.Tab:case s.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===s.Uz.Tab&&this.isMulti)return;break;case s.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case s.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case s.Uz.ArrowLeft:case s.Uz.ArrowRight:t.stopPropagation();break;case s.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(s.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case s.Uz.Home:this.setInputSelectionRange(0,0);break;case s.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case s.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(s.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case s.Uz.Tab:this.handleGroupFocus();break;case s.Uz.Enter:case s.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case s.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case s.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)))});break;case s.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-combobox-listbox");(0,y.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[l.A,b.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return d.html`
30
+ `}};c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"autofocus",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"checked",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"indeterminate",null),c([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),c([(0,d.property)({type:String})],e.prototype,"label",void 0),c([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),c([(0,d.query)(".checkbox-input")],e.prototype,"input",void 0),e=c([(0,a.w)("md-checkbox")],e),t.ELEMENT=e}(o||(o={}))},4863:t=>{t.exports=v},4893:t=>{t.exports=O},4928:(t,e,i)=>{i.d(e,{ComboBox:()=>o}),i(20109),i(61200);var o,s=i(90195),r=i(3001),a=i(31890),n=i(66677),l=i(4313),d=i(87161),h=i(70429),c=i(85125),p=i(20291),u=i(58175),m=i(10318),y=i(97103),v=i(79270),b=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},g=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.yC)(d.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,n.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,n.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e,i,o,s;const r=this._focusedIndex;if(this.checkForVirtualScroll()){let r;r=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const a=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===r):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),a&&(null==a||a.toggleAttribute("focused",!0));const n=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("lit-virtualizer");n&&(-1===t?null===(o=n.element(t))||void 0===o||o.scrollIntoView({block:"start"}):null===(s=n.element(t))||void 0===s||s.scrollIntoView({block:"center"}))}else if(this.lists){const e=this.lists[r];e&&e.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",r)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const o=this.labels[t];o&&(o.toggleAttribute("focused",!0),o.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("options")&&this.expanded&&this.checkForVirtualScroll()&&this.updateOnNextFrame(()=>{this.resizeListbox()}),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),o=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of o){const o=i.getAttribute("aria-label"),s=i.getAttribute("display-value"),r=i.getAttribute("slot");o&&s&&e.push({[this.optionId]:o,[this.optionValue]:s,isLabel:"false",groupName:t,slot:r})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?t[this.optionValue]:t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,o=0;const s=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),o=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+s}px`),this.virtualizer&&(this.virtualizer.style.height=`${o+s}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+s}px`,this.listBox.style.maxHeight=`${e.clientHeight+s}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:o,bottom:s}=this.listBox.getBoundingClientRect(),r=this.lists[this.focusedIndex],a=null===(t=this.lists[this.focusedIndex+1]||r)||void 0===t?void 0:t.getBoundingClientRect(),n=null===(e=this.lists[this.focusedIndex-1]||r)||void 0===e?void 0:e.getBoundingClientRect();(null==a?void 0:a.bottom)>s?i=a.bottom-s+2:(null==n?void 0:n.top)<o&&(i=n.top-o-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return g(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return g(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case s.Uz.Escape:break;case s.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case s.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let o=this.findOptionIndex(i);if(-1!==o){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?o+1:o,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(o-=1);const t=this.getFocusedItem(o);this.setSelectedAttribute(t),t&&(this.setSelectedOption(t),this.isMulti?this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()):(this.setInputValue(this.getOptionValue(t)),null===(e=this.input)||void 0===e||e.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(t))))}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;switch(t.code){case s.Uz.Backspace:this.focusedIndex=-1;break;case s.Uz.Tab:case s.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded&&this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue)?this.setCustomValue():(e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll())}),this.setVisualListbox(!1),t.code===s.Uz.Tab&&this.isMulti)return;break;case s.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case s.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case s.Uz.ArrowLeft:case s.Uz.ArrowRight:t.stopPropagation();break;case s.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(s.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case s.Uz.Home:this.setInputSelectionRange(0,0);break;case s.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case s.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(s.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case s.Uz.Tab:this.handleGroupFocus();break;case s.Uz.Enter:case s.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case s.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case s.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(e)))});break;case s.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-combobox-listbox");(0,y.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[l.A,v.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return d.html`
31
31
  <md-icon
32
32
  name=${t}
33
33
  class=${e}
@@ -247,7 +247,7 @@
247
247
  </div>
248
248
  `:d.nothing}
249
249
  ${this.messagesTemplate()} ${this.helpTextTemplate()}
250
- `}};v([(0,h.property)({type:String})],i.prototype,"label",void 0),v([(0,h.property)({type:Array})],i.prototype,"options",void 0),v([(0,h.property)({type:Array,attribute:"custom-options"})],i.prototype,"customOptions",void 0),v([(0,h.property)({type:String})],i.prototype,"placeholder",void 0),v([(0,h.property)({type:Boolean,attribute:"is-multi"})],i.prototype,"isMulti",void 0),v([(0,h.property)({type:Boolean,attribute:"use-virtual-scroll"})],i.prototype,"useVirtualScroll",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"ordered",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"expanded",void 0),v([(0,h.property)({type:Array,reflect:!0})],i.prototype,"groupExpandedList",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),v([(0,h.property)({type:Boolean,attribute:"no-clear-icon"})],i.prototype,"noClearIcon",void 0),v([(0,h.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),v([(0,h.property)({type:Array})],i.prototype,"selectedOptions",void 0),v([(0,h.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),v([(0,h.property)({type:String,attribute:"option-id",reflect:!0})],i.prototype,"optionId",void 0),v([(0,h.property)({type:String,attribute:"option-value",reflect:!0})],i.prototype,"optionValue",void 0),v([(0,h.property)({type:Boolean,attribute:"with-custom-content"})],i.prototype,"isCustomContent",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),v([(0,h.property)({type:String})],i.prototype,"shape",void 0),v([(0,h.property)({type:Array})],i.prototype,"value",void 0),v([(0,h.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),v([(0,h.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],i.prototype,"allowCustomValue",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),v([(0,h.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),v([(0,h.property)({type:String,attribute:"no-options-i18n"})],i.prototype,"optionsTextLocalization",void 0),v([(0,h.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"invalid",void 0),v([(0,h.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],i.prototype,"invalidText",void 0),v([(0,h.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),v([(0,h.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),v([(0,h.state)()],i.prototype,"ariaLabelForComboBox",void 0),v([(0,h.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),v([(0,h.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),v([(0,h.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),v([(0,h.property)({type:String,attribute:"all-i18n"})],i.prototype,"allTextLocalization",void 0),v([(0,h.property)({type:String,attribute:"select-all-i18n"})],i.prototype,"selectAllTextLocalization",void 0),v([(0,h.property)({type:String,attribute:"selected-all-i18n"})],i.prototype,"selectedTextLocalization",void 0),v([(0,h.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],i.prototype,"allowSelectAll",void 0),v([(0,h.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],i.prototype,"showCustomError",void 0),v([(0,h.property)({type:Boolean,attribute:"show-loader",reflect:!0})],i.prototype,"showLoader",void 0),v([(0,h.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],i.prototype,"showSelectedCount",void 0),v([(0,h.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"newMomentum",void 0),v([(0,h.property)({type:Boolean,attribute:"show-filter-icon"})],i.prototype,"showFilterIcon",void 0),v([(0,h.property)({type:Boolean,attribute:"prevent-filter"})],i.prototype,"preventFilter",void 0),v([(0,h.property)({type:Boolean,attribute:"is-dropdown-arrow"})],i.prototype,"isDropdownArrow",void 0),v([(0,h.property)({type:String})],i.prototype,"comboboxId",void 0),v([(0,h.property)({type:String})],i.prototype,"helpText",void 0),v([(0,h.property)({type:Array})],i.prototype,"messageArr",void 0),v([(0,h.property)({type:String})],i.prototype,"htmlId",void 0),v([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),v([(0,h.state)()],i.prototype,"isOptGroup",void 0),v([(0,h.state)()],i.prototype,"isSelectAllChecked",void 0),v([(0,h.query)(".group")],i.prototype,"group",void 0),v([(0,h.query)(".md-combobox-listbox")],i.prototype,"input",void 0),v([(0,h.query)(".md-combobox-button")],i.prototype,"button",void 0),v([(0,h.query)("div#md-combobox-listbox")],i.prototype,"listBox",void 0),v([(0,h.query)(".virtual-scroll")],i.prototype,"virtualizer",void 0),v([(0,h.queryAll)("div.md-combobox-option")],i.prototype,"lists",void 0),v([(0,h.queryAll)(".group-label")],i.prototype,"labels",void 0),v([(0,h.queryAll)(".md-combobox-selected-item")],i.prototype,"selected",void 0),i=v([(0,a.w)("md-combobox")],i),t.ELEMENT=i}(o||(o={}))},5784:t=>{t.exports=v},6396:(t,e,i)=>{i.d(e,{Label:()=>o});var o,s=i(31890),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(31013),h=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.label="",this.theme="",this.radioLabel=!1,this.checkboxLabel=!1,this.toggleSwitchLabel=!1,this.htmlFor="",this.active=!1,this.disabled=!1,this.indeterminate=!1,this.secondaryLabel=!1}static get styles(){return[r.A,d.A]}setFocus(){this.dispatchEvent(new CustomEvent("setFocus"))}get labelClassMap(){return{[`md-label--${this.theme}`]:!!this.theme,"md-radio__label":this.radioLabel,"md-checkbox__label":this.checkboxLabel,"md-secondary-label":this.secondaryLabel,active:this.active,disabled:this.disabled,indeterminate:this.indeterminate}}handleClick(){this.setFocus(),this.dispatchEvent(new CustomEvent("label-click",{composed:!0,bubbles:!0,detail:{htmlFor:this.htmlFor}}))}render(){return a.html`
250
+ `}};b([(0,h.property)({type:String})],i.prototype,"label",void 0),b([(0,h.property)({type:Array})],i.prototype,"options",void 0),b([(0,h.property)({type:Array,attribute:"custom-options"})],i.prototype,"customOptions",void 0),b([(0,h.property)({type:String})],i.prototype,"placeholder",void 0),b([(0,h.property)({type:Boolean,attribute:"is-multi"})],i.prototype,"isMulti",void 0),b([(0,h.property)({type:Boolean,attribute:"use-virtual-scroll"})],i.prototype,"useVirtualScroll",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"ordered",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"expanded",void 0),b([(0,h.property)({type:Array,reflect:!0})],i.prototype,"groupExpandedList",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),b([(0,h.property)({type:Boolean,attribute:"no-clear-icon"})],i.prototype,"noClearIcon",void 0),b([(0,h.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),b([(0,h.property)({type:Array})],i.prototype,"selectedOptions",void 0),b([(0,h.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),b([(0,h.property)({type:String,attribute:"option-id",reflect:!0})],i.prototype,"optionId",void 0),b([(0,h.property)({type:String,attribute:"option-value",reflect:!0})],i.prototype,"optionValue",void 0),b([(0,h.property)({type:Boolean,attribute:"with-custom-content"})],i.prototype,"isCustomContent",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),b([(0,h.property)({type:String})],i.prototype,"shape",void 0),b([(0,h.property)({type:Array})],i.prototype,"value",void 0),b([(0,h.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),b([(0,h.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],i.prototype,"allowCustomValue",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),b([(0,h.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),b([(0,h.property)({type:String,attribute:"no-options-i18n"})],i.prototype,"optionsTextLocalization",void 0),b([(0,h.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"invalid",void 0),b([(0,h.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],i.prototype,"invalidText",void 0),b([(0,h.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),b([(0,h.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),b([(0,h.state)()],i.prototype,"ariaLabelForComboBox",void 0),b([(0,h.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),b([(0,h.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),b([(0,h.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),b([(0,h.property)({type:String,attribute:"all-i18n"})],i.prototype,"allTextLocalization",void 0),b([(0,h.property)({type:String,attribute:"select-all-i18n"})],i.prototype,"selectAllTextLocalization",void 0),b([(0,h.property)({type:String,attribute:"selected-all-i18n"})],i.prototype,"selectedTextLocalization",void 0),b([(0,h.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],i.prototype,"allowSelectAll",void 0),b([(0,h.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],i.prototype,"showCustomError",void 0),b([(0,h.property)({type:Boolean,attribute:"show-loader",reflect:!0})],i.prototype,"showLoader",void 0),b([(0,h.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],i.prototype,"showSelectedCount",void 0),b([(0,h.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"newMomentum",void 0),b([(0,h.property)({type:Boolean,attribute:"show-filter-icon"})],i.prototype,"showFilterIcon",void 0),b([(0,h.property)({type:Boolean,attribute:"prevent-filter"})],i.prototype,"preventFilter",void 0),b([(0,h.property)({type:Boolean,attribute:"is-dropdown-arrow"})],i.prototype,"isDropdownArrow",void 0),b([(0,h.property)({type:String})],i.prototype,"comboboxId",void 0),b([(0,h.property)({type:String})],i.prototype,"helpText",void 0),b([(0,h.property)({type:Array})],i.prototype,"messageArr",void 0),b([(0,h.property)({type:String})],i.prototype,"htmlId",void 0),b([(0,h.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),b([(0,h.state)()],i.prototype,"isOptGroup",void 0),b([(0,h.state)()],i.prototype,"isSelectAllChecked",void 0),b([(0,h.query)(".group")],i.prototype,"group",void 0),b([(0,h.query)(".md-combobox-listbox")],i.prototype,"input",void 0),b([(0,h.query)(".md-combobox-button")],i.prototype,"button",void 0),b([(0,h.query)("div#md-combobox-listbox")],i.prototype,"listBox",void 0),b([(0,h.query)(".virtual-scroll")],i.prototype,"virtualizer",void 0),b([(0,h.queryAll)("div.md-combobox-option")],i.prototype,"lists",void 0),b([(0,h.queryAll)(".group-label")],i.prototype,"labels",void 0),b([(0,h.queryAll)(".md-combobox-selected-item")],i.prototype,"selected",void 0),i=b([(0,a.w)("md-combobox")],i),t.ELEMENT=i}(o||(o={}))},5784:t=>{t.exports=b},6396:(t,e,i)=>{i.d(e,{Label:()=>o});var o,s=i(31890),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(31013),h=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.label="",this.theme="",this.radioLabel=!1,this.checkboxLabel=!1,this.toggleSwitchLabel=!1,this.htmlFor="",this.active=!1,this.disabled=!1,this.indeterminate=!1,this.secondaryLabel=!1}static get styles(){return[r.A,d.A]}setFocus(){this.dispatchEvent(new CustomEvent("setFocus"))}get labelClassMap(){return{[`md-label--${this.theme}`]:!!this.theme,"md-radio__label":this.radioLabel,"md-checkbox__label":this.checkboxLabel,"md-secondary-label":this.secondaryLabel,active:this.active,disabled:this.disabled,indeterminate:this.indeterminate}}handleClick(){this.setFocus(),this.dispatchEvent(new CustomEvent("label-click",{composed:!0,bubbles:!0,detail:{htmlFor:this.htmlFor}}))}render(){return a.html`
251
251
  <label @click=${this.handleClick} class="md-label ${(0,l.classMap)(this.labelClassMap)}" for="${this.htmlFor}">
252
252
  ${this.label?a.html` <span>${this.label}</span> `:a.html` <slot></slot> `}
253
253
  </label>
@@ -351,17 +351,17 @@
351
351
  <slot name="footer"> </slot>
352
352
  </div>
353
353
  </div>
354
- `}};c([(0,h.property)({type:String})],e.prototype,"title",void 0),c([(0,h.property)({type:String})],e.prototype,"subtitle",void 0),c([(0,h.property)({type:String})],e.prototype,"id",void 0),c([(0,h.property)({type:String})],e.prototype,"info",void 0),c([(0,h.property)({type:String,attribute:"info-aria-label"})],e.prototype,"infoAriaLabel",void 0),c([(0,h.property)({type:String,attribute:"menu-aria-label"})],e.prototype,"menuAriaLabel",void 0),c([(0,h.property)({type:Array})],e.prototype,"menuOptions",void 0),e=c([(0,s.w)("md-card")],e),t.ELEMENT=e}(o||(o={}))},10981:(t,e,i)=>{i.r(e),i.d(e,{Accordion:()=>o.Accordion,AccordionItem:()=>s.AccordionItem,ActivityButton:()=>r.ActivityButton,AdvanceList:()=>a.AdvanceList,Alert:()=>l.Alert,AlertBanner:()=>n.AlertBanner,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>c,Badge:()=>u.Badge,Breadcrumb:()=>S.Breadcrumb,Button:()=>T.Button,ButtonGroup:()=>$.ButtonGroup,Card:()=>I.Card,CardAi:()=>k.CardAi,CardV2:()=>A.CardV2,ChatMessage:()=>L.ChatMessage,Checkbox:()=>O.Checkbox,CheckboxGroup:()=>M.CheckboxGroup,Chip:()=>D.Chip,Coachmark:()=>R.Coachmark,CoachmarkPopover:()=>P.CoachmarkPopover,CodeEditor:()=>N,ComboBox:()=>j.ComboBox,CompositeAvatar:()=>p.CompositeAvatar,CountryCodePicker:()=>U.CountryCodePicker,DatePicker:()=>K.DatePicker,DatePickerCalendar:()=>W.DatePickerCalendar,DatePickerDay:()=>G.DatePickerDay,DatePickerMonth:()=>Y.DatePickerMonth,DatePickerWeek:()=>X.DatePickerWeek,DateRangePicker:()=>q.DateRangePicker,DateTimePicker:()=>H.DateTimePicker,Draggable:()=>Z.Draggable,DraggableItem:()=>Q.DraggableItem,Dropdown:()=>J.Dropdown,EditableTextfield:()=>tt.EditableTextfield,Favorite:()=>et.Favorite,FloatingButtonBar:()=>at,FloatingMinimizedModal:()=>nt.FloatingMinimizedModal,FloatingModal:()=>lt.FloatingModal,Form:()=>mt.Form,FormArray:()=>ht,FormControl:()=>ct,FormGroup:()=>pt,Grabber:()=>yt.Grabber,HelpText:()=>bt.HelpText,Icon:()=>f.Icon,Input:()=>gt.Input,InputFile:()=>vt.InputFile,Label:()=>ft.Label,Link:()=>wt.Link,List:()=>At.List,ListItem:()=>It.ListItem,ListItemV2:()=>St,ListV2:()=>Tt,Loading:()=>Lt.Loading,MeetingAlert:()=>Ot.MeetingAlert,Menu:()=>Dt.Menu,MenuItem:()=>Pt.MenuItem,MenuOverlay:()=>Mt.MenuOverlay,Modal:()=>Rt.Modal,NotificationBadge:()=>E,Pagination:()=>_t.Pagination,PhoneInput:()=>Bt.PhoneInput,Popover:()=>zt.Popover,PopoverController:()=>zt.PopoverController,Presence:()=>Ft.Presence,ProgressBar:()=>Nt.ProgressBar,Radio:()=>Vt.Radio,RadioGroup:()=>jt.RadioGroup,Skeleton:()=>qt,Slider:()=>Kt.Slider,Spinner:()=>Wt.Spinner,Tab:()=>Xt.Tab,TabPanel:()=>Zt.TabPanel,Table:()=>Yt.Table,TableAdvanced:()=>Gt.TableAdvanced,Tabs:()=>Qt.Tabs,TaskItem:()=>Jt.TaskItem,Theme:()=>te.Theme,ThemeManager:()=>se.ThemeManager,TimePicker:()=>ee.TimePicker,ToggleSwitch:()=>ie.ToggleSwitch,Tooltip:()=>it.Tooltip,Validators:()=>ut,iconUrlManager:()=>oe.O,registerThemeManagerGlobally:()=>se.registerThemeManagerGlobally,themeManager:()=>se.themeManager});var o=i(33328),s=i(6779),r=i(94891),a=i(28307),n=i(19479),l=i(74896),d=i(23779),h=i(38028);const c=["bot","group","self","typing",""];var p=i(2207),u=i(63704),m=i(3001),y=i(87161),b=i(11873),v=i(54765),g=i(70429),f=i(61200),w=i(15427);const x=y.css`:host{color:var(--badge-notification-primary-foreground-color);font-size:var(--font-size-body-small,.75rem);font-weight:var(--brand-font-weight-medium,500);line-height:var(--font-lineheight-body-small,1rem);font-family:var(--brand-font-medium);box-sizing:border-box;align-items:center;display:flex;height:fit-content;justify-content:center;width:fit-content}.md-notification-badge-overlay{outline:.0625rem solid var(--badge-notification-overlay-border-color)}.md-notification-badge-text{box-sizing:border-box;padding:0 .25rem;border-radius:6.25rem;min-width:1rem;display:flex;justify-content:center;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-icon{padding:2px;size:1rem;border-radius:50%;box-sizing:border-box}.md-notification-badge-icon__primary{background-color:var(--badge-notification-primary-background-color);color:var(--badge-notification-primary-foreground-color)}.md-notification-badge-icon__success{background-color:var(--badge-notification-success-background-color);color:var(--badge-notification-success-foreground-color)}.md-notification-badge-icon__warning{background-color:var(--badge-notification-warning-background-color);color:var(--badge-notification-warning-foreground-color)}.md-notification-badge-icon__error{background-color:var(--badge-notification-error-background-color);color:var(--badge-notification-error-foreground-color)}.md-notification-badge-icon__secondary{background-color:var(--badge-notification-secondary-background-color);color:var(--badge-notification-secondary-foreground-color)}@media(forced-colors:active){.md-notification-badge-dot,.md-notification-badge-icon,.md-notification-badge-text{outline:.125rem solid}}`;var C=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let E=class extends y.LitElement{constructor(){super(...arguments),this.variant=w.zY.VARIANT,this.maxCounter=w.zY.MAX_COUNTER,this.overlay=!1,this.ariaLabel=null}static get styles(){return[x]}getCounterText(t,e){return void 0===e||"number"!=typeof e||0===t?"":e>t?`${t}+`:t>w.zY.MAX_COUNTER_LIMIT||e>w.zY.MAX_COUNTER_LIMIT?`${w.zY.MAX_COUNTER_LIMIT}+`:e.toString()}getBadgeIcon(t,e){return y.html`
354
+ `}};c([(0,h.property)({type:String})],e.prototype,"title",void 0),c([(0,h.property)({type:String})],e.prototype,"subtitle",void 0),c([(0,h.property)({type:String})],e.prototype,"id",void 0),c([(0,h.property)({type:String})],e.prototype,"info",void 0),c([(0,h.property)({type:String,attribute:"info-aria-label"})],e.prototype,"infoAriaLabel",void 0),c([(0,h.property)({type:String,attribute:"menu-aria-label"})],e.prototype,"menuAriaLabel",void 0),c([(0,h.property)({type:Array})],e.prototype,"menuOptions",void 0),e=c([(0,s.w)("md-card")],e),t.ELEMENT=e}(o||(o={}))},10981:(t,e,i)=>{i.r(e),i.d(e,{Accordion:()=>o.Accordion,AccordionItem:()=>s.AccordionItem,ActivityButton:()=>r.ActivityButton,AdvanceList:()=>a.AdvanceList,Alert:()=>l.Alert,AlertBanner:()=>n.AlertBanner,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>c,Badge:()=>u.Badge,Breadcrumb:()=>S.Breadcrumb,Button:()=>T.Button,ButtonGroup:()=>$.ButtonGroup,Card:()=>I.Card,CardAi:()=>k.CardAi,CardV2:()=>A.CardV2,ChatMessage:()=>L.ChatMessage,Checkbox:()=>O.Checkbox,CheckboxGroup:()=>M.CheckboxGroup,Chip:()=>D.Chip,Coachmark:()=>R.Coachmark,CoachmarkPopover:()=>P.CoachmarkPopover,CodeEditor:()=>N,ComboBox:()=>j.ComboBox,CompositeAvatar:()=>p.CompositeAvatar,CountryCodePicker:()=>U.CountryCodePicker,DatePicker:()=>K.DatePicker,DatePickerCalendar:()=>W.DatePickerCalendar,DatePickerDay:()=>G.DatePickerDay,DatePickerMonth:()=>Y.DatePickerMonth,DatePickerWeek:()=>X.DatePickerWeek,DateRangePicker:()=>q.DateRangePicker,DateTimePicker:()=>H.DateTimePicker,Draggable:()=>Z.Draggable,DraggableItem:()=>Q.DraggableItem,Dropdown:()=>J.Dropdown,EditableTextfield:()=>tt.EditableTextfield,Favorite:()=>et.Favorite,FloatingButtonBar:()=>at,FloatingMinimizedModal:()=>nt.FloatingMinimizedModal,FloatingModal:()=>lt.FloatingModal,Form:()=>mt.Form,FormArray:()=>ht,FormControl:()=>ct,FormGroup:()=>pt,Grabber:()=>yt.Grabber,HelpText:()=>vt.HelpText,Icon:()=>f.Icon,Input:()=>gt.Input,InputFile:()=>bt.InputFile,Label:()=>ft.Label,Link:()=>wt.Link,List:()=>At.List,ListItem:()=>It.ListItem,ListItemV2:()=>St,ListV2:()=>Tt,Loading:()=>Lt.Loading,MeetingAlert:()=>Ot.MeetingAlert,Menu:()=>Dt.Menu,MenuItem:()=>Pt.MenuItem,MenuOverlay:()=>Mt.MenuOverlay,Modal:()=>Rt.Modal,NotificationBadge:()=>E,Pagination:()=>_t.Pagination,PhoneInput:()=>Bt.PhoneInput,Popover:()=>zt.Popover,PopoverController:()=>zt.PopoverController,Presence:()=>Ft.Presence,ProgressBar:()=>Nt.ProgressBar,Radio:()=>Vt.Radio,RadioGroup:()=>jt.RadioGroup,Skeleton:()=>qt,Slider:()=>Kt.Slider,Spinner:()=>Wt.Spinner,Tab:()=>Xt.Tab,TabPanel:()=>Zt.TabPanel,Table:()=>Yt.Table,TableAdvanced:()=>Gt.TableAdvanced,Tabs:()=>Qt.Tabs,TaskItem:()=>Jt.TaskItem,Theme:()=>te.Theme,ThemeManager:()=>se.ThemeManager,TimePicker:()=>ee.TimePicker,ToggleSwitch:()=>ie.ToggleSwitch,Tooltip:()=>it.Tooltip,Validators:()=>ut,iconUrlManager:()=>oe.O,registerThemeManagerGlobally:()=>se.registerThemeManagerGlobally,themeManager:()=>se.themeManager});var o=i(33328),s=i(6779),r=i(94891),a=i(28307),n=i(19479),l=i(74896),d=i(23779),h=i(38028);const c=["bot","group","self","typing",""];var p=i(2207),u=i(63704),m=i(3001),y=i(87161),v=i(11873),b=i(54765),g=i(70429),f=i(61200),w=i(15427);const x=y.css`:host{color:var(--badge-notification-primary-foreground-color);font-size:var(--font-size-body-small,.75rem);font-weight:var(--brand-font-weight-medium,500);line-height:var(--font-lineheight-body-small,1rem);font-family:var(--brand-font-medium);box-sizing:border-box;align-items:center;display:flex;height:fit-content;justify-content:center;width:fit-content}.md-notification-badge-overlay{outline:.0625rem solid var(--badge-notification-overlay-border-color)}.md-notification-badge-text{box-sizing:border-box;padding:0 .25rem;border-radius:6.25rem;min-width:1rem;display:flex;justify-content:center;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--badge-notification-primary-background-color)}.md-notification-badge-icon{padding:2px;size:1rem;border-radius:50%;box-sizing:border-box}.md-notification-badge-icon__primary{background-color:var(--badge-notification-primary-background-color);color:var(--badge-notification-primary-foreground-color)}.md-notification-badge-icon__success{background-color:var(--badge-notification-success-background-color);color:var(--badge-notification-success-foreground-color)}.md-notification-badge-icon__warning{background-color:var(--badge-notification-warning-background-color);color:var(--badge-notification-warning-foreground-color)}.md-notification-badge-icon__error{background-color:var(--badge-notification-error-background-color);color:var(--badge-notification-error-foreground-color)}.md-notification-badge-icon__secondary{background-color:var(--badge-notification-secondary-background-color);color:var(--badge-notification-secondary-foreground-color)}@media(forced-colors:active){.md-notification-badge-dot,.md-notification-badge-icon,.md-notification-badge-text{outline:.125rem solid}}`;var C=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};let E=class extends y.LitElement{constructor(){super(...arguments),this.variant=w.zY.VARIANT,this.maxCounter=w.zY.MAX_COUNTER,this.overlay=!1,this.ariaLabel=null}static get styles(){return[x]}getCounterText(t,e){return void 0===e||"number"!=typeof e||0===t?"":e>t?`${t}+`:t>w.zY.MAX_COUNTER_LIMIT||e>w.zY.MAX_COUNTER_LIMIT?`${w.zY.MAX_COUNTER_LIMIT}+`:e.toString()}getBadgeIcon(t,e){return y.html`
355
355
  <md-icon
356
- class="md-notification-badge-icon ${(0,b.H)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
356
+ class="md-notification-badge-icon ${(0,v.H)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
357
357
  iconSet="momentumDesign"
358
- name="${(0,v.J)(t)}"
358
+ name="${(0,b.J)(t)}"
359
359
  size="${w.zY.ICON_SIZE}"
360
360
  ></md-icon>
361
361
  `}getBadgeDot(){return y.html`<div
362
- class="md-notification-badge-dot ${(0,b.H)({"md-notification-badge-overlay":this.overlay})}"
362
+ class="md-notification-badge-dot ${(0,v.H)({"md-notification-badge-overlay":this.overlay})}"
363
363
  ></div>`}getBadgeCounterText(){return y.html`
364
- <div class="md-notification-badge-text ${(0,b.H)({"md-notification-badge-overlay":this.overlay})}">
364
+ <div class="md-notification-badge-text ${(0,v.H)({"md-notification-badge-overlay":this.overlay})}">
365
365
  ${this.getCounterText(this.maxCounter,this.counter)}
366
366
  </div>
367
367
  `}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(w.M_).includes(this.variant)&&(this.variant=w.zY.VARIANT);const{iconName:t,type:e,variant:i}=this;switch(e){case w.ZE.ICON:return this.getBadgeIcon(t||"",i);case w.ZE.COUNTER:return this.getBadgeCounterText();case w.ZE.SUCCESS:return this.getBadgeIcon(w.UZ.SUCCESS_ICON_NAME,w.su.SUCCESS);case w.ZE.WARNING:return this.getBadgeIcon(w.UZ.WARNING_ICON_NAME,w.su.WARNING);case w.ZE.ERROR:return this.getBadgeIcon(w.UZ.ERROR_ICON_NAME,w.su.ERROR);case w.ZE.DOT:default:return this.type=w.ZE.DOT,this.getBadgeDot()}}update(t){super.update(t),t.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};C([(0,g.property)({type:String,reflect:!0})],E.prototype,"type",void 0),C([(0,g.property)({type:String,reflect:!0})],E.prototype,"variant",void 0),C([(0,g.property)({type:Number})],E.prototype,"counter",void 0),C([(0,g.property)({type:Number,attribute:"max-counter",reflect:!0})],E.prototype,"maxCounter",void 0),C([(0,g.property)({type:Boolean})],E.prototype,"overlay",void 0),C([(0,g.property)({type:String,attribute:"icon-name"})],E.prototype,"iconName",void 0),C([(0,g.property)({type:String,attribute:"aria-label"})],E.prototype,"ariaLabel",void 0),E=C([(0,m.wW)("md-notification-badge")],E);var S=i(92992),$=i(45629),T=i(96798),k=i(64311),A=i(90827),I=i(10654),L=i(95281),O=i(3664),M=i(55294),D=i(60046),P=i(29895),R=i(46312),_=i(4313),B=i(45001),z=i.n(B);const F=y.css`:host(md-code-editor) .md-code-editor{background:#091e26;border-radius:.25rem;color:#fff;min-height:18.75rem;overflow:hidden}:host(md-code-editor) .md-code-editor-header{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;background:#092d3b;flex:0 0 auto;font-size:14px;padding:.625rem}:host(md-code-editor) .md-code-editor-name{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-code-editor) .md-code-editor md-badge::part(badge){border-radius:.25rem;height:1.25rem;margin-right:.625rem;padding:.25rem .375rem;text-transform:capitalize}:host(md-code-editor) .md-code-editor-copy{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;line-height:1}:host(md-code-editor) .md-code-editor-copy-btn::part(button){background:0 0;color:#00a0d1;margin-left:.625rem}:host(md-code-editor) .md-code-editor-copy-btn[disabled]{cursor:not-allowed;opacity:.5}:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-quote{color:#ffecc2}:host(md-code-editor) .hljs-deletion,:host(md-code-editor) .hljs-name,:host(md-code-editor) .hljs-regexp,:host(md-code-editor) .hljs-selector-class,:host(md-code-editor) .hljs-selector-id,:host(md-code-editor) .hljs-tag,:host(md-code-editor) .hljs-template-variable,:host(md-code-editor) .hljs-variable{color:#ff9d52}:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-type{color:#fc9d03}:host(md-code-editor) .hljs-attribute{color:#ebd460}:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol{color:#93c437}:host(md-code-editor) .hljs-section,:host(md-code-editor) .hljs-title{color:#22c7d6}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{color:#f0e3fc}:host(md-code-editor) .hljs{background:rgba(0,0,0,0);color:#dedede;display:block;overflow-x:auto;padding:.5em}:host(md-code-editor) .hljs-emphasis{font-style:italic}:host(md-code-editor) .hljs-strong{font-weight:700}@media screen and (forced-colors:active){:host(md-code-editor) .hljs-addition,:host(md-code-editor) .hljs-attribute,:host(md-code-editor) .hljs-built_in,:host(md-code-editor) .hljs-builtin-name,:host(md-code-editor) .hljs-bullet,:host(md-code-editor) .hljs-comment,:host(md-code-editor) .hljs-link,:host(md-code-editor) .hljs-literal,:host(md-code-editor) .hljs-meta,:host(md-code-editor) .hljs-number,:host(md-code-editor) .hljs-params,:host(md-code-editor) .hljs-quote,:host(md-code-editor) .hljs-string,:host(md-code-editor) .hljs-symbol,:host(md-code-editor) .hljs-type{color:highlight}:host(md-code-editor) .hljs-keyword,:host(md-code-editor) .hljs-selector-tag{font-weight:700}}@media(forced-colors:active){:host(md-code-editor) .md-code-editor{outline:1px solid CanvasText}:host(md-code-editor) .md-code-editor-header{outline:1px solid CanvasText}}`;var N,V=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.copyLocalization="cURL",this.copiedLocalization="Copied",this.method="get",this.acceptLanguage="javascript",this.url="javascript",this.disableCopyButton=!0,this.acceptTypes="",this.copied=!1}static get styles(){return[_.A,F]}handleSlotChange(){if(this.slotNodes&&this.slotNodes.length){const t=this.slotNodes.find(t=>"CODE"===t.tagName);if(t){const e=t.textContent;e&&this.highlightBlock(e)}}}handleUrlSlotChange(){if(this.copied=!1,this.slotUrl&&this.slotUrl.length){const t=this.slotUrl.find(t=>t);if(t){const e=t.textContent;e&&this.copyUrl(e)}}}highlightBlock(t){t&&(this.codeBlock.innerText=t),z().highlightElement(this.codeBlock)}copyUrl(t){this.codeUrl.innerText=t,this.disableCopyButton=!1}copyClipboard(){this.disableCopyButton||this.selectTarget(this.codeUrl)}copyText(){try{document.execCommand("copy"),this.copied=!0}catch(t){console.warn("Copy text failed"),this.copied=!1}}select(t){const e=window.getSelection(),i=document.createRange();i.selectNodeContents(t),e&&(e.removeAllRanges(),e.addRange(i))}selectTarget(t){this.select(t),this.copyText()}importLanguage(t){return e=this,o=void 0,r=function*(){try{const{default:e}=yield i(29599)(`./${t}`);z().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},new((s=void 0)||(s=Promise))(function(t,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function n(t){try{l(r.throw(t))}catch(t){i(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof s?i:new s(function(t){t(i)})).then(a,n)}l((r=r.apply(e,o||[])).next())});var e,o,s,r}getAllAcceptTypes(){const t=z().listLanguages();return t.length?t.map(t=>z().getLanguage(`${t}`).aliases).map(t=>t.map(t=>`.${t}`)).join(","):""}setAcceptTypes(){this.acceptTypes=this.getAllAcceptTypes()}updated(t){super.updated(t),t.has("acceptLanguage")&&this.importLanguage(this.acceptLanguage),t.has("acceptTypes")&&this.highlightBlock()}render(){return y.html`
@@ -429,7 +429,7 @@
429
429
  `}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return y.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return y.html`
430
430
  ${this.showCloseButton?this.closeButtonTemplate:y.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
431
431
  ${this.actions.map(t=>this.getActionGroupTemplate(t))}
432
- `}};rt([(0,g.property)({type:String})],at.prototype,"leadingLabel",void 0),rt([(0,g.property)({type:String})],at.prototype,"closeButtonAriaLabel",void 0),rt([(0,g.property)({type:Boolean})],at.prototype,"showCloseButton",void 0),rt([(0,g.property)({type:Array})],at.prototype,"actions",void 0),at=rt([(0,g.customElement)("md-floating-button-bar")],at);var nt=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),bt=i(20109),vt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),xt=i(90195),Ct=i(26283);const Et=y.css`:host{--list-item-border-radius:0;--list-item-expand-duration:400ms;--list-item-hover-bg-color:var(--md-button-secondary-hover-bg-color);--list-item-active-bg-color:var(--md-button-secondary-pressed-bg-color);--list-item-disabled-bg-color:none;--list-item-disabled-text-color:var(--md-textColor-disabled);--list-item-primary-label-color:var(--md-textColor-primary);--list-item-secondary-label-color:var(--md-textColor-secondary);--list-item-primary-label-font-size:14px;--list-item-secondary-label-font-size:12px;--list-item-bg-color:none;border-radius:var(--list-item-border-radius);background-color:var(--list-item-bg-color)}:host(:focus-visible){box-shadow:none!important}:host([variant=inset-rectangle]){--list-item-border-radius:0.5rem}:host([variant=inset-pill]){--list-item-border-radius:3.125rem}:host([disabled]){--list-item-primary-label-color:var(--list-item-disabled-text-color);--list-item-secondary-label-color:var(--list-item-disabled-text-color);--list-item-bg-color:var(--list-item-disabled-bg-color)}.header{border-radius:var(--list-item-border-radius);padding:.5rem;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.header:hover:not(:disabled){background-color:var(--list-item-hover-bg-color)}.header:active:not(:disabled){background-color:var(--list-item-active-bg-color)}:host(:focus-visible) .header{box-shadow:0 0 0 .125rem var(--list-focus-border-color)}:host::part(header-leading),:host::part(header-trailing){display:flex;align-items:center;gap:.5rem}:host::part(primary-label),:host::part(secondary-label),:host::part(tertiary-label){display:block;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host::part(primary-label){font-size:var(--list-item-primary-label-font-size);color:var(--list-item-primary-label-color)}:host::part(secondary-label),:host::part(tertiary-label){font-size:var(--list-item-secondary-label-font-size);color:var(--list-item-secondary-label-color)}.expand-icon{transition:transform var(--list-item-expand-duration)}.panel-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--list-item-expand-duration) ease-out}.expandable-content{min-height:0;visibility:hidden;transform:translateY(-15px);margin:0 10px;transition:all var(--list-item-expand-duration)}:host([expanded]) .panel-container{padding-top:0;grid-template-rows:1fr}:host([expanded]) .expandable-content{visibility:visible;transform:translateY(0);margin:10px}:host([expanded]) .expand-icon{transform:rotate(90deg)}:host{--md-list-v2-gap:0;--md-list-v2-orientation:column;padding:0;margin:0;display:flex;flex-direction:var(--md-list-v2-orientation);gap:var(--md-list-v2-gap)}:host([orientation=horizontal]){--md-list-v2-orientation:row}:host([gap=sm]){--md-list-v2-gap:0.25rem}:host([gap=md]){--md-list-v2-gap:0.5rem}:host([gap=lg]){--md-list-v2-gap:1rem}`;var St,$t=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return y.html`
432
+ `}};rt([(0,g.property)({type:String})],at.prototype,"leadingLabel",void 0),rt([(0,g.property)({type:String})],at.prototype,"closeButtonAriaLabel",void 0),rt([(0,g.property)({type:Boolean})],at.prototype,"showCloseButton",void 0),rt([(0,g.property)({type:Array})],at.prototype,"actions",void 0),at=rt([(0,g.customElement)("md-floating-button-bar")],at);var nt=i(58871),lt=i(73093);class dt{constructor(){this.listeners=new Set}onChange(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}emitChange(){for(const t of Array.from(this.listeners))t(this)}}class ht extends dt{constructor(t){var e;super(),this.controls=t;for(const t of this.controls)null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange())}at(t){return this.controls[t]}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>this.emitChange()),this.emitChange()}removeAt(t){this.controls.splice(t,1),this.emitChange()}get value(){return this.controls.map(t=>t.value)}get valid(){return this.controls.every(t=>t.valid)}get length(){return this.controls.length}getControls(){return this.controls}validate(){this.controls.forEach(t=>t.validate()),this.emitChange()}markAllAsTouched(){this.controls.forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}class ct extends dt{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.currentValue=t,this.validators=e,this.validate()}get value(){return this.currentValue}markAsTouched(){this.touched=!0,this.validate()}get valid(){return 0===this.validationErrors.length}get errors(){return this.touched?this.validationErrors:[]}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class pt extends dt{constructor(t){var e;super(),this.controls=t;for(const t of Object.keys(this.controls)){const i=this.controls[t];null===(e=i.onChange)||void 0===e||e.call(i,()=>this.emitChange())}}get(t){return this.controls[t]}get value(){const t={};for(const e in this.controls)t[e]=this.controls[e].value;return t}get valid(){return Object.values(this.controls).every(t=>t.valid)}validate(){for(const t of Object.values(this.controls))t.validate();this.emitChange()}markAllAsTouched(){Object.values(this.controls).forEach(t=>{var e,i;null===(e=t.markAllAsTouched)||void 0===e||e.call(t),null===(i=t.markAsTouched)||void 0===i||i.call(t)})}}const ut={required:()=>t=>null==t||"string"==typeof t&&""===t.trim()?{type:"required"}:null,minLength:t=>e=>e.length<t?{type:"minLength",count:t}:null,maxLength:t=>e=>e.length>t?{type:"maxLength",count:t}:null};var mt=i(97866),yt=i(69112),vt=i(20109),bt=i(52619),gt=i(96408),ft=i(6396),wt=i(19026),xt=i(90195),Ct=i(26283);const Et=y.css`:host{--list-item-border-radius:0;--list-item-expand-duration:400ms;--list-item-hover-bg-color:var(--md-button-secondary-hover-bg-color);--list-item-active-bg-color:var(--md-button-secondary-pressed-bg-color);--list-item-disabled-bg-color:none;--list-item-disabled-text-color:var(--md-textColor-disabled);--list-item-primary-label-color:var(--md-textColor-primary);--list-item-secondary-label-color:var(--md-textColor-secondary);--list-item-primary-label-font-size:14px;--list-item-secondary-label-font-size:12px;--list-item-bg-color:none;border-radius:var(--list-item-border-radius);background-color:var(--list-item-bg-color)}:host(:focus-visible){box-shadow:none!important}:host([variant=inset-rectangle]){--list-item-border-radius:0.5rem}:host([variant=inset-pill]){--list-item-border-radius:3.125rem}:host([disabled]){--list-item-primary-label-color:var(--list-item-disabled-text-color);--list-item-secondary-label-color:var(--list-item-disabled-text-color);--list-item-bg-color:var(--list-item-disabled-bg-color)}.header{border-radius:var(--list-item-border-radius);padding:.5rem;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.header:hover:not(:disabled){background-color:var(--list-item-hover-bg-color)}.header:active:not(:disabled){background-color:var(--list-item-active-bg-color)}:host(:focus-visible) .header{box-shadow:0 0 0 .125rem var(--list-focus-border-color)}:host::part(header-leading),:host::part(header-trailing){display:flex;align-items:center;gap:.5rem}:host::part(primary-label),:host::part(secondary-label),:host::part(tertiary-label){display:block;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host::part(primary-label){font-size:var(--list-item-primary-label-font-size);color:var(--list-item-primary-label-color)}:host::part(secondary-label),:host::part(tertiary-label){font-size:var(--list-item-secondary-label-font-size);color:var(--list-item-secondary-label-color)}.expand-icon{transition:transform var(--list-item-expand-duration)}.panel-container{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows var(--list-item-expand-duration) ease-out}.expandable-content{min-height:0;visibility:hidden;transform:translateY(-15px);margin:0 10px;transition:all var(--list-item-expand-duration)}:host([expanded]) .panel-container{padding-top:0;grid-template-rows:1fr}:host([expanded]) .expandable-content{visibility:visible;transform:translateY(0);margin:10px}:host([expanded]) .expand-icon{transform:rotate(90deg)}:host{--md-list-v2-gap:0;--md-list-v2-orientation:column;padding:0;margin:0;display:flex;flex-direction:var(--md-list-v2-orientation);gap:var(--md-list-v2-gap)}:host([orientation=horizontal]){--md-list-v2-orientation:row}:host([gap=sm]){--md-list-v2-gap:0.25rem}:host([gap=md]){--md-list-v2-gap:0.5rem}:host([gap=lg]){--md-list-v2-gap:1rem}`;var St,$t=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends y.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return y.html`
433
433
  <slot name="content">
434
434
  <div class="header">
435
435
  <div part="header-leading">
@@ -487,13 +487,13 @@
487
487
  .filterParams=${this.filterParams}
488
488
  .datePickerProps=${this.datePickerProps}
489
489
  ></md-datepicker-day>
490
- `})}static get styles(){return[a.A,d.A]}render(){return n.html` <div class="md-datepicker__week">${this.renderDays()}</div> `}};h([(0,l.property)({attribute:!1})],e.prototype,"startOfWeekDay",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"viewAnchorMonth",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),e=h([(0,s.w)("md-datepicker-week")],e),t.ELEMENT=e}(o||(o={}))},11323:(t,e,i)=>{i.d(e,{MenuOverlay:()=>s});var o,s,r=i(90195),a=i(31890),n=i(28373),l=i(66677),d=i(22962),h=i.n(d),c=i(84157),p=i.n(c),u=i(68250),m=i.n(u),y=i(69371),b=i.n(y),v=i(4863),g=i(87161),f=i(70429),w=i(20291),x=i(47819),C=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},E=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){t.small="260px",t.large="370px"}(o||(o={})),function(t){let e=class extends((0,n.d)(g.LitElement)){constructor(){super(...arguments),this._isOpen=!1,this.size="large",this.maxHeight="",this.customWidth="",this.showArrow=!1,this.disabled=!1,this.placement="bottom",this.allowHoverToggle=!1,this.ariaRole="menu",this.ariaLabel="",this.isDatePicker=!1,this.overlayOffset=15,this.keepOpenOnWindowBlur=!1,this.positioningStrategy=void 0,this.popperInstance=null,this.triggerElement=null,this.updateActiveMenuOverlayOpened=e=>{var i;this===e.target&&(null===(i=t.ELEMENT.activeOverlay)||void 0===i||i.push(e.target))},this.updateActiveMenuOverlayClosed=e=>{var i,o;const s=t.ELEMENT.activeOverlay.indexOf(e.target);this===e.target&&-1!==s&&(t.ELEMENT.activeOverlay.splice(s,1),t.ELEMENT.activeOverlay.length>0?(null===(i=t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1])||void 0===i||i.setFocusableElements(),null===(o=t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1])||void 0===o||o.focusOnNestedTrigger(this.triggerElement)):this.setFocusableElements())},this.handleTriggerClick=()=>{this.toggleOverlay()},this.setOverlay=(0,l.sg)(t=>{this.disabled||(this.isOpen=t)},100),this.expandPopup=()=>{this.setOverlay(!0)},this.collapsePopup=()=>{this.setOverlay(!1)},this.handleOutsideOverlayKeydown=e=>E(this,void 0,void 0,function*(){let i=!1;const o=e.composedPath();o.length&&(i=!!o.find(t=>t===this),!i)||!this.overlayContainer||e.code!==r.Uz.Escape||(e.preventDefault(),(t.ELEMENT.activeOverlay.length>0?t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1]:void 0)===this&&(this.isOpen=!1,yield this.updateComplete,this.focusOnTrigger()))}),this.handleTriggerKeyDown=t=>E(this,void 0,void 0,function*(){switch(t.code){case r.Uz.Space:case r.Uz.Enter:t.preventDefault(),this.toggleOverlay(),this.isOpen||(yield this.updateComplete,this.focusOnTrigger())}}),this.handleOutsideOverlayClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.preventClickOutside||(this.isOpen=!1))}}get isOpen(){return this._isOpen}set isOpen(t){const e=this._isOpen;this._isOpen=t,this.handleInstance(t),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",t),this.requestUpdate("isOpen",e)}static get styles(){return[x.A,g.css`
490
+ `})}static get styles(){return[a.A,d.A]}render(){return n.html` <div class="md-datepicker__week">${this.renderDays()}</div> `}};h([(0,l.property)({attribute:!1})],e.prototype,"startOfWeekDay",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"viewAnchorMonth",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"filterParams",void 0),h([(0,l.property)({attribute:!1})],e.prototype,"datePickerProps",void 0),e=h([(0,s.w)("md-datepicker-week")],e),t.ELEMENT=e}(o||(o={}))},11323:(t,e,i)=>{i.d(e,{MenuOverlay:()=>s});var o,s,r=i(90195),a=i(31890),n=i(28373),l=i(66677),d=i(22962),h=i.n(d),c=i(84157),p=i.n(c),u=i(68250),m=i.n(u),y=i(69371),v=i.n(y),b=i(4863),g=i(87161),f=i(70429),w=i(20291),x=i(47819),C=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},E=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){t.small="260px",t.large="370px"}(o||(o={})),function(t){let e=class extends((0,n.d)(g.LitElement)){constructor(){super(...arguments),this._isOpen=!1,this.size="large",this.maxHeight="",this.customWidth="",this.showArrow=!1,this.disabled=!1,this.placement="bottom",this.allowHoverToggle=!1,this.ariaRole="menu",this.ariaLabel="",this.isDatePicker=!1,this.overlayOffset=15,this.keepOpenOnWindowBlur=!1,this.positioningStrategy=void 0,this.popperInstance=null,this.triggerElement=null,this.updateActiveMenuOverlayOpened=e=>{var i;this===e.target&&(null===(i=t.ELEMENT.activeOverlay)||void 0===i||i.push(e.target))},this.updateActiveMenuOverlayClosed=e=>{var i,o;const s=t.ELEMENT.activeOverlay.indexOf(e.target);this===e.target&&-1!==s&&(t.ELEMENT.activeOverlay.splice(s,1),t.ELEMENT.activeOverlay.length>0?(null===(i=t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1])||void 0===i||i.setFocusableElements(),null===(o=t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1])||void 0===o||o.focusOnNestedTrigger(this.triggerElement)):this.setFocusableElements())},this.handleTriggerClick=()=>{this.toggleOverlay()},this.setOverlay=(0,l.sg)(t=>{this.disabled||(this.isOpen=t)},100),this.expandPopup=()=>{this.setOverlay(!0)},this.collapsePopup=()=>{this.setOverlay(!1)},this.handleOutsideOverlayKeydown=e=>E(this,void 0,void 0,function*(){let i=!1;const o=e.composedPath();o.length&&(i=!!o.find(t=>t===this),!i)||!this.overlayContainer||e.code!==r.Uz.Escape||(e.preventDefault(),(t.ELEMENT.activeOverlay.length>0?t.ELEMENT.activeOverlay[t.ELEMENT.activeOverlay.length-1]:void 0)===this&&(this.isOpen=!1,yield this.updateComplete,this.focusOnTrigger()))}),this.handleTriggerKeyDown=t=>E(this,void 0,void 0,function*(){switch(t.code){case r.Uz.Space:case r.Uz.Enter:t.preventDefault(),this.toggleOverlay(),this.isOpen||(yield this.updateComplete,this.focusOnTrigger())}}),this.handleOutsideOverlayClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.preventClickOutside||(this.isOpen=!1))}}get isOpen(){return this._isOpen}set isOpen(t){const e=this._isOpen;this._isOpen=t,this.handleInstance(t),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",t),this.requestUpdate("isOpen",e)}static get styles(){return[x.A,g.css`
491
491
  .md-menu-overlay .overlay-content {
492
492
  max-height: var(--md-menu-overlay-max-height, calc(100vh - 48px));
493
493
  width: var(--md-menu-overlay-width, 370px);
494
494
  overflow-y: var(--md-menu-overlay-overflow-y, auto);
495
495
  }
496
- `]}updateCSSProperties(){const t=this.maxHeight||"calc(100vh - 48px)",e=this.isDatePicker?"visible":"auto";let i;i=this.customWidth?this.customWidth:"small"===this.size?o.small:o.large,this.style.setProperty("--md-menu-overlay-max-height",t),this.style.setProperty("--md-menu-overlay-width",i),this.style.setProperty("--md-menu-overlay-overflow-y",e)}firstUpdated(t){super.firstUpdated(t),this.updateCSSProperties()}updated(t){if(super.updated(t),(t.has("maxHeight")||t.has("customWidth")||t.has("size")||t.has("isDatePicker"))&&this.updateCSSProperties(),t.has("isOpen")){const e=t.get("isOpen");this.isOpen?(this.activateFocusTrap(),this.dispatchMenuOpen(),document.addEventListener("menu-item-click",this.handleTriggerClick),requestAnimationFrame(()=>{document.addEventListener("click",this.handleOutsideOverlayClick)}),this.updateTriggerElementAriaExpanded()):!0===e&&(this.deactivateFocusTrap(),this.dispatchMenuClose(),document.removeEventListener("menu-item-click",this.handleTriggerClick),document.removeEventListener("click",this.handleOutsideOverlayClick),this.updateTriggerElementAriaExpanded())}t.has("showArrow")&&this.arrow&&this.arrow.toggleAttribute("data-show",this.showArrow)}connectedCallback(){super.connectedCallback(),this.handleWindowBlurEvent=this.handleWindowBlurEvent.bind(this),window.addEventListener("blur",this.handleWindowBlurEvent),document.addEventListener("keydown",this.handleOutsideOverlayKeydown),this.addEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.addEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.updateComplete.then(()=>{this.handleTriggerSlotChange()})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideOverlayClick),document.removeEventListener("keydown",this.handleOutsideOverlayKeydown),window.removeEventListener("blur",this.handleWindowBlurEvent),this.removeEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.removeEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.removeTriggerEventListeners()}checkIsInputField(t){var e;return"md-input"===(null===(e=null==t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase())}updateTriggerElementAriaExpanded(){this.triggerElement&&(this.isOpen?(this.triggerElement.setAttribute("aria-expanded","true"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","true")):(this.triggerElement.removeAttribute("aria-expanded"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","false")))}handleTriggerSlotChange(){this.removeTriggerEventListeners(),this.setupTriggerEventListeners(),this.updateTriggerElementAriaExpanded(),this.popperInstance&&this.destroy(),this.isOpen&&(this.create(),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",this.isOpen))}removeTriggerEventListeners(){this.triggerElement&&(this.triggerElement.removeEventListener("click",this.handleTriggerClick),this.triggerElement.removeEventListener("keydown",this.handleTriggerKeyDown),this.allowHoverToggle&&(this.triggerElement.removeEventListener("mouseenter",this.expandPopup),this.triggerElement.removeEventListener("mouseleave",this.collapsePopup),this.overlayContainer.removeEventListener("mouseenter",this.expandPopup),this.overlayContainer.removeEventListener("mouseleave",this.collapsePopup)),this.triggerElement=null)}setupTriggerEventListeners(){if(this.trigger){if(this.triggerElement=this.trigger[0],!this.triggerElement)return;this.triggerElement.addEventListener("click",this.handleTriggerClick),this.allowHoverToggle&&(this.triggerElement.addEventListener("mouseenter",this.expandPopup),this.triggerElement.addEventListener("mouseleave",this.collapsePopup),this.overlayContainer.addEventListener("mouseenter",this.expandPopup),this.overlayContainer.addEventListener("mouseleave",this.collapsePopup)),this.arrow&&this.showArrow&&this.arrow.toggleAttribute("data-show",!0),this.checkIsInputField(this.triggerElement)||this.triggerElement.addEventListener("keydown",this.handleTriggerKeyDown),this.triggerElement.setAttribute("aria-haspopup","true")}}update(t){super.update(t)}dispatchMenuOpen(){this.dispatchEvent(new CustomEvent("menu-overlay-open",{composed:!0,bubbles:!0}))}dispatchMenuClose(){this.dispatchEvent(new CustomEvent("menu-overlay-close",{composed:!0,bubbles:!0}))}handleInstance(t){t?this.create():this.destroy()}create(){this.triggerElement&&(this.popperInstance=(0,v.createPopper)(this.triggerElement,this.overlayContainer,{onFirstUpdate:()=>E(this,void 0,void 0,function*(){var t;this.isOpen&&(null===(t=this.popperInstance)||void 0===t||t.update(),this.setFocusableElements(),yield this.updateComplete,this.focusInsideOverlay())}),placement:this.placement,strategy:this.positioningStrategy,modifiers:[...v.defaultModifiers,p(),m(),b(),h(),{name:"preventOverflow",options:{padding:16}},{name:"offset",options:{offset:({placement:t,reference:e})=>"left-end"===t||"right-end"===t?[e.height+e.y+3,14]:[0,this.overlayOffset]}},{name:"arrow",options:{element:this.arrow,padding:5}},{name:"computeStyles",options:{adaptive:!1}}]}))}destroy(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}toggleOverlay(){this.disabled||(this.isOpen=!this.isOpen)}focusOnTrigger(){requestAnimationFrame(()=>{var t;(null===(t=this.focusableElements)||void 0===t?void 0:t.length)&&this.focusableElements[0].focus()})}focusInsideOverlay(){this.focusableElements&&(this.focusableElements.length>1?this.setInitialFocus(1):this.focusableElements.length&&this.setInitialFocus())}focusOnNestedTrigger(t){var e;null===(e=this.setFocusOnTrigger)||void 0===e||e.call(this,t)}handleWindowBlurEvent(){this._isOpen&&!this.keepOpenOnWindowBlur&&(this.isOpen=!1)}render(){return g.html`
496
+ `]}updateCSSProperties(){const t=this.maxHeight||"calc(100vh - 48px)",e=this.isDatePicker?"visible":"auto";let i;i=this.customWidth?this.customWidth:"small"===this.size?o.small:o.large,this.style.setProperty("--md-menu-overlay-max-height",t),this.style.setProperty("--md-menu-overlay-width",i),this.style.setProperty("--md-menu-overlay-overflow-y",e)}firstUpdated(t){super.firstUpdated(t),this.updateCSSProperties()}updated(t){if(super.updated(t),(t.has("maxHeight")||t.has("customWidth")||t.has("size")||t.has("isDatePicker"))&&this.updateCSSProperties(),t.has("isOpen")){const e=t.get("isOpen");this.isOpen?(this.activateFocusTrap(),this.dispatchMenuOpen(),document.addEventListener("menu-item-click",this.handleTriggerClick),requestAnimationFrame(()=>{document.addEventListener("click",this.handleOutsideOverlayClick)}),this.updateTriggerElementAriaExpanded()):!0===e&&(this.deactivateFocusTrap(),this.dispatchMenuClose(),document.removeEventListener("menu-item-click",this.handleTriggerClick),document.removeEventListener("click",this.handleOutsideOverlayClick),this.updateTriggerElementAriaExpanded())}t.has("showArrow")&&this.arrow&&this.arrow.toggleAttribute("data-show",this.showArrow)}connectedCallback(){super.connectedCallback(),this.handleWindowBlurEvent=this.handleWindowBlurEvent.bind(this),window.addEventListener("blur",this.handleWindowBlurEvent),document.addEventListener("keydown",this.handleOutsideOverlayKeydown),this.addEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.addEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.updateComplete.then(()=>{this.handleTriggerSlotChange()})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideOverlayClick),document.removeEventListener("keydown",this.handleOutsideOverlayKeydown),window.removeEventListener("blur",this.handleWindowBlurEvent),this.removeEventListener("menu-overlay-open",this.updateActiveMenuOverlayOpened),this.removeEventListener("menu-overlay-close",this.updateActiveMenuOverlayClosed),this.removeTriggerEventListeners()}checkIsInputField(t){var e;return"md-input"===(null===(e=null==t?void 0:t.tagName)||void 0===e?void 0:e.toLowerCase())}updateTriggerElementAriaExpanded(){this.triggerElement&&(this.isOpen?(this.triggerElement.setAttribute("aria-expanded","true"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","true")):(this.triggerElement.removeAttribute("aria-expanded"),this.triggerElement.hasAttribute("ariaexpanded")&&this.triggerElement.setAttribute("ariaexpanded","false")))}handleTriggerSlotChange(){this.removeTriggerEventListeners(),this.setupTriggerEventListeners(),this.updateTriggerElementAriaExpanded(),this.popperInstance&&this.destroy(),this.isOpen&&(this.create(),this.overlayContainer&&this.overlayContainer.toggleAttribute("data-show",this.isOpen))}removeTriggerEventListeners(){this.triggerElement&&(this.triggerElement.removeEventListener("click",this.handleTriggerClick),this.triggerElement.removeEventListener("keydown",this.handleTriggerKeyDown),this.allowHoverToggle&&(this.triggerElement.removeEventListener("mouseenter",this.expandPopup),this.triggerElement.removeEventListener("mouseleave",this.collapsePopup),this.overlayContainer.removeEventListener("mouseenter",this.expandPopup),this.overlayContainer.removeEventListener("mouseleave",this.collapsePopup)),this.triggerElement=null)}setupTriggerEventListeners(){if(this.trigger){if(this.triggerElement=this.trigger[0],!this.triggerElement)return;this.triggerElement.addEventListener("click",this.handleTriggerClick),this.allowHoverToggle&&(this.triggerElement.addEventListener("mouseenter",this.expandPopup),this.triggerElement.addEventListener("mouseleave",this.collapsePopup),this.overlayContainer.addEventListener("mouseenter",this.expandPopup),this.overlayContainer.addEventListener("mouseleave",this.collapsePopup)),this.arrow&&this.showArrow&&this.arrow.toggleAttribute("data-show",!0),this.checkIsInputField(this.triggerElement)||this.triggerElement.addEventListener("keydown",this.handleTriggerKeyDown),this.triggerElement.setAttribute("aria-haspopup","true")}}update(t){super.update(t)}dispatchMenuOpen(){this.dispatchEvent(new CustomEvent("menu-overlay-open",{composed:!0,bubbles:!0}))}dispatchMenuClose(){this.dispatchEvent(new CustomEvent("menu-overlay-close",{composed:!0,bubbles:!0}))}handleInstance(t){t?this.create():this.destroy()}create(){this.triggerElement&&(this.popperInstance=(0,b.createPopper)(this.triggerElement,this.overlayContainer,{onFirstUpdate:()=>E(this,void 0,void 0,function*(){var t;this.isOpen&&(null===(t=this.popperInstance)||void 0===t||t.update(),this.setFocusableElements(),yield this.updateComplete,this.focusInsideOverlay())}),placement:this.placement,strategy:this.positioningStrategy,modifiers:[...b.defaultModifiers,p(),m(),v(),h(),{name:"preventOverflow",options:{padding:16}},{name:"offset",options:{offset:({placement:t,reference:e})=>"left-end"===t||"right-end"===t?[e.height+e.y+3,14]:[0,this.overlayOffset]}},{name:"arrow",options:{element:this.arrow,padding:5}},{name:"computeStyles",options:{adaptive:!1}}]}))}destroy(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}toggleOverlay(){this.disabled||(this.isOpen=!this.isOpen)}focusOnTrigger(){requestAnimationFrame(()=>{var t;(null===(t=this.focusableElements)||void 0===t?void 0:t.length)&&this.focusableElements[0].focus()})}focusInsideOverlay(){this.focusableElements&&(this.focusableElements.length>1?this.setInitialFocus(1):this.focusableElements.length&&this.setInitialFocus())}focusOnNestedTrigger(t){var e;null===(e=this.setFocusOnTrigger)||void 0===e||e.call(this,t)}handleWindowBlurEvent(){this._isOpen&&!this.keepOpenOnWindowBlur&&(this.isOpen=!1)}render(){return g.html`
497
497
  <div class="md-menu-overlay">
498
498
  <slot @slotchange=${this.handleTriggerSlotChange} name="menu-trigger"></slot>
499
499
  <div
@@ -834,7 +834,7 @@
834
834
  </md-button>
835
835
  `}
836
836
  </nav>
837
- `}};d([(0,n.property)({type:Boolean,attribute:"dots"})],e.prototype,"hasDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"only-dots"})],e.prototype,"onlyDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"no-navigation"})],e.prototype,"noNavigation",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"total-page"})],e.prototype,"totalPage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"visible-page"})],e.prototype,"visiblePage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"current-page"})],e.prototype,"currentPage",null),e=d([(0,s.w)("md-pagination")],e),t.ELEMENT=e}(o||(o={}))},23184:(t,e,i)=>{i.d(e,{Dropdown:()=>o}),i(61200);var o,s=i(90195),r=i(3001),a=i(66677),n=i(4313),l=i(87161),d=i(70429),h=i(85125),c=i(20291),p=i(58175),u=i(10318),m=i(84744),y=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},b=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case s.Uz.ArrowDown:this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape||s.Uz.Backspace:this.expanded&&(t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e){const t=this.dropdownRenderOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&(this.focusToIndex(t),this.searchable&&this.setInitialValue())}if("expanded"===e&&this.updateListDOM(),"focusedIndex"===e&&this.updateListDOM(),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;i&&(this.setInputValue(this.getOptionValue(i)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(this.getOptionValue(i)),this.requestUpdate())}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateListDOM(){return b(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return b(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled&&this.readOnly||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus()}}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){this.expanded=!0;const t=-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";document.dispatchEvent(new CustomEvent("on-widget-update")),this.label.setAttribute("aria-activedescendant",t),this.optionsList&&this.optionsList.focus(),-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1,this.searchable||this.label.setAttribute("aria-activedescendant","")}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.dropdownRenderOptions[this.focusedIndex],e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:t.option?t.option:t.key}})))}}onLabelClick(){this.label.focus(),this.toggle()}focusFirst(){this.dropdownRenderOptions.length&&(this.focusedIndex=0)}focusLast(){this.dropdownRenderOptions.length&&(this.focusedIndex=this.dropdownRenderOptions.length-1)}focusNext(){this.dropdownRenderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.dropdownRenderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.dropdownRenderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(t){this.dropdownRenderOptions.length&&t>=0&&t<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.dropdownRenderOptions.findIndex(e=>e.key===t.key);this.dropdownRenderOptions.length&&e>=0&&e<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return b(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],r=this.optionsListItems[t+1]||s,a=this.optionsListItems[t-1]||s,n=r.getBoundingClientRect(),l=a.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
837
+ `}};d([(0,n.property)({type:Boolean,attribute:"dots"})],e.prototype,"hasDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"only-dots"})],e.prototype,"onlyDots",void 0),d([(0,n.property)({type:Boolean,reflect:!0,attribute:"no-navigation"})],e.prototype,"noNavigation",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"total-page"})],e.prototype,"totalPage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"visible-page"})],e.prototype,"visiblePage",void 0),d([(0,n.property)({type:Number,reflect:!0,attribute:"current-page"})],e.prototype,"currentPage",null),e=d([(0,s.w)("md-pagination")],e),t.ELEMENT=e}(o||(o={}))},23184:(t,e,i)=>{i.d(e,{Dropdown:()=>o}),i(61200);var o,s=i(90195),r=i(3001),a=i(66677),n=i(4313),l=i(87161),d=i(70429),h=i(85125),c=i(20291),p=i(58175),u=i(10318),m=i(84744),y=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},v=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,r.yC)(l.LitElement)){constructor(){super(...arguments),this.title="Select...",this.options=[],this.optionId="",this.optionValue="",this.defaultOption="",this.disabled=!1,this.customTabIndex=0,this.allowUnselected=!1,this.visibleOptions=8,this.newMomentum=!1,this.compact=!1,this.searchable=!1,this.searchItem=!1,this.inputValue="",this.placeholder="Select...",this.readOnly=!1,this.autofocus=!1,this.leftIcon="",this.trimSpace=!1,this.resultsTextLocalization="No Results",this.pill=!1,this.helpText="",this.messageArr=[],this.htmlId="",this.clearAriaLabel="Clear",this.clearIconHeight="auto",this.arrowAriaLabel="Expand",this.popupChevronAriaHidden="true",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForDropdown="",this.dropdownRenderOptions=[],this.selectedKey="",this.expanded=!1,this.focusedIndex=-1,this.messageController=new e,this.lastMaxHeight="",this.onOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||this.expanded&&this.collapse())},this.onKeyDown=t=>{switch(t.code){case s.Uz.Tab:this.expanded&&(t.stopPropagation(),this.collapse());break;case s.Uz.Space:case s.Uz.Enter:this.expanded?(this.select(),this.collapse()):this.expand();break;case s.Uz.ArrowDown:this.expanded?this.focusNext():this.expand();break;case s.Uz.ArrowUp:this.expanded?this.focusPrev():this.expand();break;case s.Uz.Home:this.expanded?this.focusFirst():this.expand();break;case s.Uz.End:this.expanded?this.focusLast():this.expand();break;case s.Uz.Escape||s.Uz.Backspace:this.expanded&&(t.stopPropagation(),this.collapse())}},this.notifyInputValueChanged=(0,a.sg)(t=>{this.dispatchEvent(new CustomEvent("dropdown-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),requestAnimationFrame(()=>{this.input.focus()})},250)}connectedCallback(){super.connectedCallback(),this.setupEvents()}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}firstUpdated(t){super.firstUpdated(t),t.forEach((t,e)=>{if("defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}}),this.searchable&&this.setInitialValue()}updated(t){super.updated(t),t.forEach((t,e)=>{if("options"===e&&this.updateRenderOptions(),"selectedKey"===e){const t=this.dropdownRenderOptions.findIndex(t=>t.key===this.selectedKey);-1!==t&&(this.focusToIndex(t),this.searchable&&this.setInitialValue())}if("expanded"===e&&this.updateListDOM(),"focusedIndex"===e&&this.updateListDOM(),"defaultOption"===e&&this.defaultOption){const{key:t}=this.getOptionKeyValuePair(this.defaultOption);this.selectedKey=t}})}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForDropdown=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForDropdown=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForDropdown=`Dropdown Element, ${this.filteredOptions.length} results found.`}setInitialValue(){var t;if(this.options.length){const e=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey),i=null==e?void 0:e.option;i&&(this.setInputValue(this.getOptionValue(i)),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,this.getOptionId(i)),this.notifyInputValueChanged(this.getOptionValue(i)),this.requestUpdate())}}getOptionValue(t){return this.isOptionObject(t)&&!this.optionValue?Object.values(t)[0]:this.isOptionObject(t)?t[this.optionValue]:t}getOptionId(t){return this.isOptionObject(t)?t[this.optionId]:t}isOptionObject(t){return"object"==typeof t&&null!==t}updateRenderOptions(){const t=[];this.focusReset();const e=this.options.reduce((e,i)=>{const{key:o,value:s}=this.getOptionKeyValuePair(i);return-1!==t.indexOf(o)?console.error(`Dropdown already have option key: "${o}". Ignoring `):o?(t.push(o),e.push({key:o,value:s,option:i})):console.error(`Dropdown key is not defined: "${o}". (value: "${s}"). Ignoring `),e},[]);this.allowUnselected&&e.unshift({key:"",value:this.title}),this.dropdownRenderOptions=e}updateListDOM(){return v(this,void 0,void 0,function*(){this.expanded&&(yield this.resizeDropdownList(),yield this.scrollToIndex(this.focusedIndex))})}resizeDropdownList(){return v(this,void 0,void 0,function*(){yield new Promise(t=>requestAnimationFrame(()=>{if(this.optionsListItems)if(this.optionsListItems.length>this.visibleOptions){const t=`${[...this.optionsListItems].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}px`;this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}else{const t="auto";this.lastMaxHeight!==t&&(this.optionsList.style.maxHeight=t,this.lastMaxHeight=t)}t()}))})}handleFocusIn(t){var e;this.disabled&&this.readOnly||null===(e=super.handleFocusIn)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("dropdown-focus-out",{composed:!0,bubbles:!0}))}static get styles(){return[n.A,m.A]}get filteredOptions(){const t=this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue;if(!t.trim())return this.dropdownRenderOptions;const e=this.dropdownRenderOptions.filter(e=>e.value.toLowerCase().includes(t.toLowerCase()));return 0===e.length?[{key:"no-result",value:"No Result",disabled:!0}]:e}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}setVisualListbox(t){this.expanded=t}updateOnNextFrame(t){requestAnimationFrame(t)}setInputValue(t=""){this.input.value=t}shouldChangeButton(){const t=this.input&&this.input.value.length>0;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-dropdown-input"))t.target.focus();else if("md-icon"===t.target.localName){const o=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(o){const t=o.querySelector(".md-dropdown-input");setTimeout(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus()}}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}removeAllSelected(){var t;this.focusReset(),this.selectedKey="",this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(s.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus()}),this.dispatchEvent(new CustomEvent("dropdown-selection-removed",{composed:!0,bubbles:!0,detail:{}}))}setupEvents(){document.addEventListener("click",this.onOutsideClick),this.addEventListener("keydown",this.onKeyDown),this.addEventListener("remove-all-selected",this.removeAllSelected)}teardownEvents(){document.removeEventListener("click",this.onOutsideClick),this.removeEventListener("keydown",this.onKeyDown),this.removeEventListener("remove-all-selected",this.removeAllSelected)}expand(){this.expanded=!0;const t=-1!==this.focusedIndex?`combo-${this.focusedIndex}`:"";document.dispatchEvent(new CustomEvent("on-widget-update")),this.label.setAttribute("aria-activedescendant",t),this.optionsList&&this.optionsList.focus(),-1===this.focusedIndex&&this.focusNext()}collapse(){this.expanded=!1,this.searchable||this.label.setAttribute("aria-activedescendant","")}toggle(){this.expanded?this.collapse():this.expand()}select(){if(-1!==this.focusedIndex){const t=this.dropdownRenderOptions[this.focusedIndex],e=t.key;e!==this.selectedKey&&(this.selectedKey=e,this.dispatchEvent(new CustomEvent("dropdown-selected",{composed:!0,bubbles:!0,detail:{option:t.option?t.option:t.key}})))}}onLabelClick(){this.label.focus(),this.toggle()}focusFirst(){this.dropdownRenderOptions.length&&(this.focusedIndex=0)}focusLast(){this.dropdownRenderOptions.length&&(this.focusedIndex=this.dropdownRenderOptions.length-1)}focusNext(){this.dropdownRenderOptions.length&&(-1!==this.focusedIndex&&this.focusedIndex<this.dropdownRenderOptions.length-1?this.focusedIndex++:this.focusFirst())}focusPrev(){this.dropdownRenderOptions.length&&(this.focusedIndex>0?this.focusedIndex--:this.focusLast())}focusToIndex(t){this.dropdownRenderOptions.length&&t>=0&&t<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=t)}focusToIndexWithOption(t){const e=this.dropdownRenderOptions.findIndex(e=>e.key===t.key);this.dropdownRenderOptions.length&&e>=0&&e<=this.dropdownRenderOptions.length-1&&(this.focusedIndex=e)}focusReset(){this.focusedIndex=-1}scrollToIndex(t){return v(this,void 0,void 0,function*(){yield new Promise(e=>{requestAnimationFrame(()=>{if(this.optionsListItems&&this.optionsListItems.length>this.visibleOptions&&t>=0&&this.optionsListItems.length>t){let e=0;const{top:i,bottom:o}=this.optionsList.getBoundingClientRect(),s=this.optionsListItems[t],r=this.optionsListItems[t+1]||s,a=this.optionsListItems[t-1]||s,n=r.getBoundingClientRect(),l=a.getBoundingClientRect();n.bottom>o?e=n.bottom-o+2:l.top<i&&(e=l.top-i-2),this.optionsList.scrollTop+=e}e()})})})}getOptionKeyValuePair(t){if("string"==typeof t)return{key:t.trim(),value:t};if(t&&"object"==typeof t){const e=Object.keys(t),i=Object.values(t);if(e.length){if(1===e.length||!this.optionId)return{key:e[0],value:i[0]};if(this.optionId)return{key:t[this.optionId],value:t[this.optionValue||this.optionId]}}}return{key:"undefined",value:"undefined"}}get labelTitle(){if(this.selectedKey){const t=this.dropdownRenderOptions.find(t=>t.key===this.selectedKey);if(t)return t.value}return this.title}get dropDownClassMap(){return{"md-dropdown__expanded":this.expanded,[`md-${this.messageType}`]:!!this.messageType,"md-new-dropdown":this.newMomentum,"md-dropdown--pill":!0===this.pill}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}helpTextTemplate(){return this.helpText?l.html`
838
838
  <md-help-text
839
839
  class="help-text ${(0,h.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
840
840
  .message=${this.helpText}
@@ -1099,28 +1099,28 @@
1099
1099
  ></span>
1100
1100
  ${this.step?this.ticksTemplate():l.nothing} ${this.hideValue?l.nothing:this.displayValueTemplate()}
1101
1101
  </div>
1102
- `}};m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"min",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"max",void 0),m([(0,d.property)({type:Boolean,attribute:"hide-value"})],e.prototype,"hideValue",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"now",null),m([(0,d.property)({type:Number})],e.prototype,"text",void 0),m([(0,d.property)({type:String})],e.prototype,"label",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"step",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),m([(0,d.state)()],e.prototype,"dragging",void 0),e=m([(0,a.w)("md-slider")],e),t.ELEMENT=e}(o||(o={}))},26283:(t,e,i)=>{i.d(e,{o:()=>r,q:()=>a});var o=i(90195);const s=[o.Uz.ArrowDown,o.Uz.ArrowUp,o.Uz.ArrowLeft,o.Uz.ArrowRight,o.Uz.Home,o.Uz.End];function r(t){return t===o.Uz.Enter||t===o.Uz.Space||t===o.Uz.NumpadEnter}function a(t){return s.includes(t)}},28187:t=>{t.exports=L},28307:(t,e,i)=>{i.d(e,{AdvanceList:()=>o});var o,s=i(90195),r=i(31890),a=i(32972),n=i(4313),l=(i(83048),i(87161)),d=i(70429),h=i(89312),c=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.prefixId="item-";let e=class extends((0,a.y)(l.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.focusReset=!1,this.disabledItems=[],this.totalRecords=0,this.isNonSelectable=!1,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=e=>{var i,o,r;const{ArrowDown:a,ArrowUp:n,Tab:l,Space:d,Enter:h}=s.Uz,{code:c}=e,p=c===a,u=c===n,m=c===l,y=c===d,b=c===h;if(p||u){if(e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0&&""!==this.value[0])return void(this.activeId=this.value[0]);if(""===this.activeId&&!u&&this.items.length>0)return void(this.activeId=this.items[0].id);const t=this.items.findIndex(t=>t.id===this.activeId);p?t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id,null===(i=this.virtualizer)||void 0===i||i.scrollToIndex(this.scrollIndex,"start")):t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id,null===(o=this.virtualizer)||void 0===o||o.scrollToIndex(this.scrollIndex,"start"))}else if(m)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((y||b)&&(e.preventDefault(),this.activeId)){const e=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`#${t.prefixId}${this.activeId}`);e&&("true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||this.updateItemSelection(e))}},this.handleRangeChange=t=>{const{last:e}=t;this.updateSelectedState(),this.items.length<this.totalRecords&&e>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1},this.renderItem=(e,i)=>"status-indicator"===e.id?l.html`
1103
- <div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
1104
- `:l.html`
1105
- <div
1106
- class="default-wrapper ${e.id} ${this.isNonSelectable?"non-selectable":""}"
1107
- part="advance-list-item-wrapper"
1108
- aria-setsize="${this.totalRecords}"
1109
- aria-posinset="${i+1}"
1110
- role="${this.ariaRoleListItem}"
1111
- aria-label=${e.name}
1112
- id="${t.prefixId}${e.id}"
1113
- index="${i}"
1114
- >
1115
- ${e.template(e,i)}
1116
- </div>
1117
- `}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick)}static get styles(){return[n.A,h.A]}getStyles(){return l.html`
1102
+ `}};m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"min",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"max",void 0),m([(0,d.property)({type:Boolean,attribute:"hide-value"})],e.prototype,"hideValue",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"now",null),m([(0,d.property)({type:Number})],e.prototype,"text",void 0),m([(0,d.property)({type:String})],e.prototype,"label",void 0),m([(0,d.property)({type:Number,reflect:!0})],e.prototype,"step",void 0),m([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),m([(0,d.state)()],e.prototype,"dragging",void 0),e=m([(0,a.w)("md-slider")],e),t.ELEMENT=e}(o||(o={}))},26283:(t,e,i)=>{i.d(e,{o:()=>r,q:()=>a});var o=i(90195);const s=[o.Uz.ArrowDown,o.Uz.ArrowUp,o.Uz.ArrowLeft,o.Uz.ArrowRight,o.Uz.Home,o.Uz.End];function r(t){return t===o.Uz.Enter||t===o.Uz.Space||t===o.Uz.NumpadEnter}function a(t){return s.includes(t)}},28187:t=>{t.exports=L},28307:(t,e,i)=>{i.d(e,{AdvanceList:()=>o});var o,s=i(90195),r=i(31890),a=i(32972),n=i(4313),l=(i(83048),i(87161)),d=i(70429),h=i(89312),c=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){t.prefixId="item-";let e=class extends((0,a.y)(l.LitElement)){constructor(){super(...arguments),this.items=[],this.isLoading=!1,this.isMulti=!1,this.groupOnMultiSelect=!1,this.value=[],this.ariaRoleList="listbox",this.ariaRoleListItem="option",this.ariaLabelList="",this.isError=!1,this.containerHeight="292px",this.lastSelectedIdByOrder="",this.selectAllItems=!1,this.focusReset=!1,this.disabledItems=[],this.totalRecords=0,this.isNonSelectable=!1,this.scrollIndex=-1,this.activeId="",this.selectedItemsIds=[],this.isUserNavigated=!1,this.handleKeyDown=e=>{var i,o,r;const{ArrowDown:a,ArrowUp:n,Tab:l,Space:d,Enter:h}=s.Uz,{code:c}=e,p=c===a,u=c===n,m=c===l,y=c===d,v=c===h;if(p||u){if(e.preventDefault(),this.isUserNavigated=!0,""===this.activeId&&this.value.length>0&&""!==this.value[0])return void(this.activeId=this.value[0]);if(""===this.activeId&&!u&&this.items.length>0)return void(this.activeId=this.items[0].id);const t=this.items.findIndex(t=>t.id===this.activeId);p?t<this.items.length-1&&!this.isNextElemenentStatusIndicator(t)&&(this.scrollIndex=t+1,this.activeId=this.items[this.scrollIndex].id,null===(i=this.virtualizer)||void 0===i||i.scrollToIndex(this.scrollIndex,"start")):t>0&&(this.scrollIndex=t-1,this.activeId=this.items[this.scrollIndex].id,null===(o=this.virtualizer)||void 0===o||o.scrollToIndex(this.scrollIndex,"start"))}else if(m)""===this.activeId&&this.value.length>0&&(this.activeId=this.value[0]);else if((y||v)&&(e.preventDefault(),this.activeId)){const e=null===(r=this.shadowRoot)||void 0===r?void 0:r.querySelector(`#${t.prefixId}${this.activeId}`);e&&("true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||this.updateItemSelection(e))}},this.handleRangeChange=t=>{const{last:e}=t;this.updateSelectedState(),this.items.length<this.totalRecords&&e>=this.items.length-1&&!this.isLoading&&!this.isError&&this.dispatchEvent(new CustomEvent("load-more",{bubbles:!0,composed:!0})),this.isUserNavigated=!1},this.renderItem=(e,i)=>{if(!e)return l.html`<div class="default-wrapper-error">Invalid item</div>`;if(!e.id)return console.warn(`AdvanceList.renderItem: item missing id at index ${i}`,e),l.html`<div class="default-wrapper-error">Item missing ID</div>`;try{return"status-indicator"===e.id?l.html`
1103
+ <div class="default-wrapper-status-indicator" id="status-indicator">${e.template(e,i)}</div>
1104
+ `:l.html`
1105
+ <div
1106
+ class="default-wrapper ${e.id} ${this.isNonSelectable?"non-selectable":""}"
1107
+ part="advance-list-item-wrapper"
1108
+ aria-setsize="${this.totalRecords}"
1109
+ aria-posinset="${i+1}"
1110
+ role="${this.ariaRoleListItem}"
1111
+ aria-label=${e.name||"Unknown item"}
1112
+ id="${t.prefixId}${e.id}"
1113
+ data-index="${i}"
1114
+ >
1115
+ ${e.template(e,i)}
1116
+ </div>
1117
+ `}catch(t){return console.error(`AdvanceList.renderItem: Error rendering item ${e.id} at index ${i}:`,t,e),l.html`<div class="default-wrapper-error">Error rendering item</div>`}}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick)}static get styles(){return[n.A,h.A]}getStyles(){return l.html`
1118
1118
  <style>
1119
1119
  :host .virtual-scroll {
1120
1120
  height: ${this.containerHeight};
1121
1121
  }
1122
1122
  </style>
1123
- `}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&this.updateSelectedState(),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,o,s,r;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(o=e.firstElementChild)||void 0===o?void 0:o.getAttribute("aria-disabled"))?null===(r=e.querySelector("md-checkbox"))||void 0===r||r.removeAttribute("checked"):null===(s=e.querySelector("md-checkbox"))||void 0===s||s.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,o;const s=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,s),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0"),(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(o=e.firstElementChild)||void 0===o?void 0:o.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),o=t.composedPath(),s=i.find(t=>o.includes(t));if(s)return(null==s?void 0:s.hasAttribute("disabled"))||"true"===(null==s?void 0:s.getAttribute("aria-disabled"))?0:s}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value[0]}`:""}render(){return l.html`
1123
+ `}disconnectedCallback(){var t;super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),null===(t=this.listContainer)||void 0===t||t.removeEventListener("keydown",this.handleKeyDown)}firstUpdated(t){var e;super.firstUpdated(t),null===(e=this.listContainer)||void 0===e||e.addEventListener("keydown",this.handleKeyDown)}willUpdate(t){var e;null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&(this.selectedItemsIds=this.value),t.has("selectAllItems")&&this.selectAllItems&&(this.selectedItemsIds=this.items.filter(t=>t&&t.id&&!this.disabledItems.includes(t.id)).map(t=>t.id)),t.has("focusReset")&&this.focusReset&&(this.activeId="")}updated(t){super.updated(t),t.has("value")&&(void 0!==t.get("value")||this.value.length>0)&&this.updateSelectedState(),t.has("selectAllItems")&&this.selectAllItems&&(this.updateSelectedState(),this.notifySelectedChange())}setCheckboxAttributes(t,e){var i,o,s,r;!t||(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))&&"true"===(null===(o=e.firstElementChild)||void 0===o?void 0:o.getAttribute("aria-disabled"))?null===(r=e.querySelector("md-checkbox"))||void 0===r||r.removeAttribute("checked"):null===(s=e.querySelector("md-checkbox"))||void 0===s||s.setAttribute("checked","true")}updateWrapperAttributes(t,e){this.isMulti?this.setCheckboxAttributes(e,t):t.classList.toggle("selected",e),t.setAttribute("selected",e.toString()),t.setAttribute("aria-selected",e.toString()),t.setAttribute("tabindex",e?"0":"-1")}updateSelectedState(){var e;Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]).forEach(e=>{var i,o;const s=this.selectedItemsIds.some(i=>e.id===`${t.prefixId}${i}`);this.updateWrapperAttributes(e,s),this.groupOnMultiSelect&&this.value.length>0&&this.items.length!==this.value.length&&e.id===`${t.prefixId}${this.lastSelectedIdByOrder}`?e.classList.add("selected-border-bottom"):e.classList.remove("selected-border-bottom"),e.id===`${t.prefixId}${this.activeId}`?(e.setAttribute("tabindex","0"),e.focus()):e.setAttribute("tabindex","-1"),""==this.activeId&&e.id===`${t.prefixId}${this.value[0]}`&&e.setAttribute("tabindex","0"),(null===(i=e.firstElementChild)||void 0===i?void 0:i.hasAttribute("disabled"))||"true"===(null===(o=e.firstElementChild)||void 0===o?void 0:o.getAttribute("aria-disabled"))?(e.setAttribute("disabled",""),e.setAttribute("aria-disabled","true")):(e.removeAttribute("disabled"),e.removeAttribute("aria-disabled"))})}findClickedItem(t){var e;const i=Array.from((null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".default-wrapper"))||[]),o=t.composedPath(),s=i.find(t=>o.includes(t));if(s)return(null==s?void 0:s.hasAttribute("disabled"))||"true"===(null==s?void 0:s.getAttribute("aria-disabled"))?0:s}isNextElemenentStatusIndicator(t){return(this.isLoading||this.isError)&&t===this.items.length-2}updateItemForMultiSelect(t){const e=this.selectedItemsIds.indexOf(t);-1===e?(this.selectedItemsIds.push(this.activeId),this.selectedItemsIds.length===this.items.length-this.disabledItems.length&&(this.selectAllItems=!0)):(this.selectedItemsIds.splice(e,1),this.selectAllItems=!1)}updateItemSelection(t){t&&(this.activeId=t.id.substring(t.id.indexOf("-")+1),this.isMulti?this.updateItemForMultiSelect(this.activeId):this.selectedItemsIds=[this.activeId],this.updateSelectedState(),this.notifySelectedChange())}handleClick(t){t.preventDefault(),this.isUserNavigated=!1;const e=this.findClickedItem(t);e&&(this.scrollIndex=parseInt(e.getAttribute("index")||"0"),this.updateItemSelection(e))}notifySelectedChange(){this.dispatchEvent(new CustomEvent("list-item-change",{detail:{selected:this.selectedItemsIds},bubbles:!0,composed:!0}))}getActiveDescendant(){return this.activeId?`${t.prefixId}${this.activeId}`:this.value?`${t.prefixId}${this.value[0]}`:""}render(){return l.html`
1124
1124
  ${this.getStyles()}
1125
1125
  <div
1126
1126
  class="md-advance-list-wrapper virtual-scroll"
@@ -1398,7 +1398,7 @@
1398
1398
  <slot></slot>
1399
1399
  </div>
1400
1400
  </div>
1401
- `}};p([(0,d.property)({type:String})],e.prototype,"message",void 0),p([(0,d.property)({type:String})],e.prototype,"actionname",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"hidebutton",void 0),p([(0,d.property)({type:String})],e.prototype,"placement",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,d.property)({type:String})],e.prototype,"color",void 0),p([(0,d.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),p([(0,d.query)(".md-coachmark__reference")],e.prototype,"reference",void 0),e=p([(0,r.w)("md-coachmark")],e),t.ELEMENT=e}(o||(o={}))},49256:(t,e,i)=>{i.d(e,{TimePicker:()=>g}),i(4928),i(96408);var o=i(90195),s=i(31890),r=i(81625),a=i(74548),n=i(4313),l=i(87161),d=i(70429),h=i(85125),c=i(20291),p=i(65796),u=i(39238),m=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const y=[o.R5.HOUR,o.R5.MINUTE,o.R5.SECOND,o.R5.AM_PM],b=[o.R5.HOUR,o.R5.MINUTE,o.R5.SECOND],v={[o.R5.HOUR]:"HH",[o.R5.MINUTE]:"MM",[o.R5.SECOND]:"SS",[o.R5.AM_PM]:"AM"};var g;!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.twoDigitAutoTab=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=o.R5.SECOND,this.locale="en-US",this.value=null,this.showDefaultNowTime=!0,this.finalTwentyFourFormat=!1,this.timeObject=(0,r.tB)(),this.tabNext=!1,this.timeValue={[o.R5.HOUR]:"12",[o.R5.MINUTE]:"00",[o.R5.SECOND]:"00",[o.R5.AM_PM]:"AM"},this.timeValidity={[o.R5.HOUR]:!0,[o.R5.MINUTE]:!0,[o.R5.SECOND]:!0,[o.R5.AM_PM]:!0},this.addLeadingZeros=t=>{if(t){if(0===t.length)return"00";if(1===t.length)return`0${t}`}return t},this.formatAndValidate=(t,e)=>{if(t&&(this.updateValidity(t,e),this.timeValidity[e]))return this.addLeadingZeros(t)},this.getLocaleTimeFormat=t=>{const e=t.toFormat("tt"),[,i]=e.split(" ");return!i},this.updateTimeValues=()=>{let t;t=this.finalTwentyFourFormat?this.timeObject.toFormat("HH:mm:ss"):this.timeObject.toFormat("hh:mm:ss a");const[e,i]=t.split(" "),s=e.split(":");b.forEach(t=>{const e=this.formatAndValidate(s.shift(),t);e&&(t===o.R5.HOUR&&i&&(this.timeValue[o.R5.AM_PM]=i),this.timeValue[t]=e)})},this.updateValidity=(t,e)=>{let i=!0;if(!this.showDefaultNowTime&&!this.value&&!t)return void(this.timeValidity[e]=!0);const s=e=>{null===t.match(e)&&(i=!1)};switch(e){case o.R5.HOUR:this.finalTwentyFourFormat?s(new RegExp(a.b.twentyFourHourString)):s(new RegExp(a.b.hourString));break;case o.R5.MINUTE:case o.R5.SECOND:s(new RegExp(a.b.minuteSecondString));break;case o.R5.AM_PM:s(new RegExp(a.b.amPmString))}this.timeValidity[e]=i},this.to12HourFormat=(t,e)=>{if(!this.finalTwentyFourFormat&&this.timeValidity[o.R5.HOUR]&&this.timeValidity[o.R5.AM_PM]){let i=Number(e);return"PM"===t?i=12+i%12:i%=12,i}},this.isEntireTimeValid=()=>{const t=[o.R5.HOUR];this.timeSpecificity!==o.R5.MINUTE&&this.timeSpecificity!==o.R5.SECOND||t.push(o.R5.MINUTE),this.timeSpecificity===o.R5.SECOND&&t.push(o.R5.SECOND),this.finalTwentyFourFormat||t.push(o.R5.AM_PM);const e=t.every(t=>this.timeValidity[t]);return(this.showDefaultNowTime||this.value||t.every(t=>!!this.timeValue[t]))&&e},this.updateTimeUnit=t=>{var e,i;if(this.updateValidity(this.timeValue[t],t),this.showDefaultNowTime||this.value){if(this.timeObject&&this.timeValidity[t]){if(t!==o.R5.AM_PM)this.timeObject=null===(e=this.timeObject)||void 0===e?void 0:e.set({[t]:Number(this.timeValue[t])});else{const t=this.to12HourFormat(this.timeValue[o.R5.AM_PM],this.timeValue[o.R5.HOUR]);void 0!==t&&(this.timeObject=null===(i=this.timeObject)||void 0===i?void 0:i.set({hour:t}))}this.isEntireTimeValid()&&(this.value=this.timeObject.toISOTime({suppressMilliseconds:!0})||this.value,this.dispatchTimeChangeEvent())}}else{const t=this.timeValue[o.R5.HOUR]||"00",e=this.timeValue[o.R5.MINUTE]||"00",i=this.timeValue[o.R5.SECOND]||"00";try{let s=`${t}:${e}:${i}`;!this.finalTwentyFourFormat&&this.timeValue[o.R5.AM_PM]&&(s+=` ${this.timeValue[o.R5.AM_PM]}`),this.timeObject=p.DateTime.fromFormat(s,this.finalTwentyFourFormat?"HH:mm:ss":"hh:mm:ss a"),this.timeObject.isValid&&this.isEntireTimeValid()&&(this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.dispatchTimeChangeEvent())}catch(t){console.warn("Failed to construct time object:")}}},this.formatTimeUnit=t=>{if(1===this.timeValue[t].length)"0"!==this.timeValue[t]&&(this.timeValue[t]="0"+this.timeValue[t]);else if(this.timeValue[t].length>2&&"0"===this.timeValue[t][0]){const e=this.timeValue[t].substring(1);RegExp(a.b.noPrecedingZerosString).test(e)&&(this.timeValue[t]=e)}this.requestUpdate()},this.messageType=t=>t?"":"error",this.generateTimeBox=t=>{const e=(i=this.finalTwentyFourFormat,{[o.R5.HOUR]:{type:"number",min:i?0:1,max:i?23:12},[o.R5.MINUTE]:{type:"number",min:0,max:59},[o.R5.SECOND]:{type:"number",min:0,max:59},[o.R5.AM_PM]:{type:"text",min:void 0,max:void 0}})[t];var i;return l.html`
1401
+ `}};p([(0,d.property)({type:String})],e.prototype,"message",void 0),p([(0,d.property)({type:String})],e.prototype,"actionname",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"hidebutton",void 0),p([(0,d.property)({type:String})],e.prototype,"placement",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"show",void 0),p([(0,d.property)({type:String})],e.prototype,"color",void 0),p([(0,d.query)(".md-coachmark__popper")],e.prototype,"popper",void 0),p([(0,d.query)(".md-coachmark__reference")],e.prototype,"reference",void 0),e=p([(0,r.w)("md-coachmark")],e),t.ELEMENT=e}(o||(o={}))},49256:(t,e,i)=>{i.d(e,{TimePicker:()=>g}),i(4928),i(96408);var o=i(90195),s=i(31890),r=i(81625),a=i(74548),n=i(4313),l=i(87161),d=i(70429),h=i(85125),c=i(20291),p=i(65796),u=i(39238),m=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const y=[o.R5.HOUR,o.R5.MINUTE,o.R5.SECOND,o.R5.AM_PM],v=[o.R5.HOUR,o.R5.MINUTE,o.R5.SECOND],b={[o.R5.HOUR]:"HH",[o.R5.MINUTE]:"MM",[o.R5.SECOND]:"SS",[o.R5.AM_PM]:"AM"};var g;!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.twoDigitAutoTab=!1,this.twentyFourHourFormat=!1,this.timeSpecificity=o.R5.SECOND,this.locale="en-US",this.value=null,this.showDefaultNowTime=!0,this.finalTwentyFourFormat=!1,this.timeObject=(0,r.tB)(),this.tabNext=!1,this.timeValue={[o.R5.HOUR]:"12",[o.R5.MINUTE]:"00",[o.R5.SECOND]:"00",[o.R5.AM_PM]:"AM"},this.timeValidity={[o.R5.HOUR]:!0,[o.R5.MINUTE]:!0,[o.R5.SECOND]:!0,[o.R5.AM_PM]:!0},this.addLeadingZeros=t=>{if(t){if(0===t.length)return"00";if(1===t.length)return`0${t}`}return t},this.formatAndValidate=(t,e)=>{if(t&&(this.updateValidity(t,e),this.timeValidity[e]))return this.addLeadingZeros(t)},this.getLocaleTimeFormat=t=>{const e=t.toFormat("tt"),[,i]=e.split(" ");return!i},this.updateTimeValues=()=>{let t;t=this.finalTwentyFourFormat?this.timeObject.toFormat("HH:mm:ss"):this.timeObject.toFormat("hh:mm:ss a");const[e,i]=t.split(" "),s=e.split(":");v.forEach(t=>{const e=this.formatAndValidate(s.shift(),t);e&&(t===o.R5.HOUR&&i&&(this.timeValue[o.R5.AM_PM]=i),this.timeValue[t]=e)})},this.updateValidity=(t,e)=>{let i=!0;if(!this.showDefaultNowTime&&!this.value&&!t)return void(this.timeValidity[e]=!0);const s=e=>{null===t.match(e)&&(i=!1)};switch(e){case o.R5.HOUR:this.finalTwentyFourFormat?s(new RegExp(a.b.twentyFourHourString)):s(new RegExp(a.b.hourString));break;case o.R5.MINUTE:case o.R5.SECOND:s(new RegExp(a.b.minuteSecondString));break;case o.R5.AM_PM:s(new RegExp(a.b.amPmString))}this.timeValidity[e]=i},this.to12HourFormat=(t,e)=>{if(!this.finalTwentyFourFormat&&this.timeValidity[o.R5.HOUR]&&this.timeValidity[o.R5.AM_PM]){let i=Number(e);return"PM"===t?i=12+i%12:i%=12,i}},this.isEntireTimeValid=()=>{const t=[o.R5.HOUR];this.timeSpecificity!==o.R5.MINUTE&&this.timeSpecificity!==o.R5.SECOND||t.push(o.R5.MINUTE),this.timeSpecificity===o.R5.SECOND&&t.push(o.R5.SECOND),this.finalTwentyFourFormat||t.push(o.R5.AM_PM);const e=t.every(t=>this.timeValidity[t]);return(this.showDefaultNowTime||this.value||t.every(t=>!!this.timeValue[t]))&&e},this.updateTimeUnit=t=>{var e,i;if(this.updateValidity(this.timeValue[t],t),this.showDefaultNowTime||this.value){if(this.timeObject&&this.timeValidity[t]){if(t!==o.R5.AM_PM)this.timeObject=null===(e=this.timeObject)||void 0===e?void 0:e.set({[t]:Number(this.timeValue[t])});else{const t=this.to12HourFormat(this.timeValue[o.R5.AM_PM],this.timeValue[o.R5.HOUR]);void 0!==t&&(this.timeObject=null===(i=this.timeObject)||void 0===i?void 0:i.set({hour:t}))}this.isEntireTimeValid()&&(this.value=this.timeObject.toISOTime({suppressMilliseconds:!0})||this.value,this.dispatchTimeChangeEvent())}}else{const t=this.timeValue[o.R5.HOUR]||"00",e=this.timeValue[o.R5.MINUTE]||"00",i=this.timeValue[o.R5.SECOND]||"00";try{let s=`${t}:${e}:${i}`;!this.finalTwentyFourFormat&&this.timeValue[o.R5.AM_PM]&&(s+=` ${this.timeValue[o.R5.AM_PM]}`),this.timeObject=p.DateTime.fromFormat(s,this.finalTwentyFourFormat?"HH:mm:ss":"hh:mm:ss a"),this.timeObject.isValid&&this.isEntireTimeValid()&&(this.value=this.timeObject.toISOTime({suppressMilliseconds:!0}),this.dispatchTimeChangeEvent())}catch(t){console.warn("Failed to construct time object:")}}},this.formatTimeUnit=t=>{if(1===this.timeValue[t].length)"0"!==this.timeValue[t]&&(this.timeValue[t]="0"+this.timeValue[t]);else if(this.timeValue[t].length>2&&"0"===this.timeValue[t][0]){const e=this.timeValue[t].substring(1);RegExp(a.b.noPrecedingZerosString).test(e)&&(this.timeValue[t]=e)}this.requestUpdate()},this.messageType=t=>t?"":"error",this.generateTimeBox=t=>{const e=(i=this.finalTwentyFourFormat,{[o.R5.HOUR]:{type:"number",min:i?0:1,max:i?23:12},[o.R5.MINUTE]:{type:"number",min:0,max:59},[o.R5.SECOND]:{type:"number",min:0,max:59},[o.R5.AM_PM]:{type:"text",min:void 0,max:void 0}})[t];var i;return l.html`
1402
1402
  ${t===o.R5.MINUTE||t===o.R5.SECOND?l.html` <span class="colon-separator">:</span> `:l.nothing}
1403
1403
  <md-input
1404
1404
  newMomentum
@@ -1411,7 +1411,7 @@
1411
1411
  min=${(0,c.ifDefined)(e.min)}
1412
1412
  max=${(0,c.ifDefined)(e.max)}
1413
1413
  maxLength=${2}
1414
- placeholder="${v[t]}"
1414
+ placeholder="${b[t]}"
1415
1415
  @input-change=${e=>this.handleTimeChange(e,t)}
1416
1416
  @input-keydown=${e=>this.handleTimeKeyDown(e,t)}
1417
1417
  @input-blur=${e=>this.handleTimeBlur(e,t)}
@@ -1443,7 +1443,7 @@
1443
1443
  ${this.finalTwentyFourFormat?l.nothing:this.generateAmPmComboBox()}
1444
1444
  </div>
1445
1445
  </div>
1446
- `}};m([(0,d.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),m([(0,d.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),m([(0,d.property)({type:String})],e.prototype,"timeSpecificity",void 0),m([(0,d.property)({type:String})],e.prototype,"locale",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,d.property)({type:Boolean,attribute:"show-default-now-time"})],e.prototype,"showDefaultNowTime",void 0),m([(0,d.state)()],e.prototype,"finalTwentyFourFormat",void 0),m([(0,d.state)()],e.prototype,"timeObject",void 0),m([(0,d.state)()],e.prototype,"tabNext",void 0),m([(0,d.state)()],e.prototype,"timeValue",void 0),m([(0,d.state)()],e.prototype,"timeValidity",void 0),e=m([(0,s.w)("md-timepicker")],e),t.ELEMENT=e}(g||(g={}))},50226:(t,e,i)=>{i.d(e,{Tabs:()=>O}),i(61200),i(11323),i(83192);var o=i(90195),s=i(3001),r=i(66677),a=i(59164),n=i(4313),l=i(87161),d=i(54765),h=i(70429),c=i(85125),p=i(58175),u=i(10318),m=i(16968),y=i(41891),b=i.n(y),v=i(97103),g=i(2669),f=i(16643),w=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},x=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};const C="tab-more",E="more-menu-copy-",S="visibleToVisible",$="visibleToHidden",T="hiddenToVisible",k="hiddenToHidden",A="previous",I="next",L="fromMoreTabs";var O;!function(t){let e=class extends((0,s.UM)((0,s.Io)((0,s.TS)(l.LitElement)))){constructor(){super(...arguments),this.justified=!1,this.hugTabs=!1,this.overflowLabel="More Tabs",this.draggable=!1,this.direction="horizontal",this.moreItemsScrollLimit=Number.MAX_SAFE_INTEGER,this._selectedIndex=0,this.animation=100,this.ghostClass="",this.chosenClass="",this.forceFallback=!1,this.fallbackClass="",this.tabsId="",this.persistSelection=!1,this.compUniqueId="",this.type="line",this.newMomentum=!1,this.variant="ghost",this.scrollArrow=!1,this.leftArrowAriaLabel="Backward Button",this.rightArrowAriaLabel="Forward Button",this.size=28,this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1,this.isMoreTabMenuOpen=!1,this.isMoreTabMenuSelected=!1,this.isMoreTabMenuScrollable=!1,this.moreTabMenuOffsetWidth=0,this.moreTabMenuMaxHeight=null,this.tabsViewportDataList=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.noTabsVisible=!1,this.defaultTabsOrderArray=[],this.tabsOrderPrefsArray=[],this.isMoreTabTruncated=!1,this.showLeftArrow=!1,this.showRightArrow=!1,this.tabs=[],this.panels=[],this.tabsCopy=[],this.tabsHash={},this.tabsCopyHash={},this.tabsIdxHash={},this.tabsVisibleIdxHash={},this.tabsHiddenIdxHash={},this.visibleTabsSortableInstance=null,this.hiddenTabsSortableInstance=null,this.updateArrowsVisibility=()=>{this.tabsListElement&&requestAnimationFrame(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.tabsListElement;this.showLeftArrow=t>0,this.showRightArrow=t+i<e-5})},this.handleOnDragEnd=t=>x(this,void 0,void 0,function*(){var e,i,o,s,r,a,n,l,d,h;t.stopPropagation();const c=t.oldIndex,p=t.newIndex,u=[...this.tabsFilteredAsVisibleList],m=[...this.tabsFilteredAsHiddenList],y=this.getDragDirection(t);if(void 0!==c&&void 0!==p){switch(y){case $:{null===(i=null===(e=this.hiddenTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t.item.id))||void 0===i||i.remove();const o=u[c],s=m.slice(-1)[0],r=p===this.tabsFilteredAsHiddenList.length?p-1:p;m.splice(r,0,o),m.pop();const a=u.filter(e=>e.id!==this.getNormalizedTabId(t.item.id));a.push(s),this.tabsFilteredAsVisibleList=[...a],this.tabsFilteredAsHiddenList=[...m];break}case S:{const t=u[c];u.splice(c,1),u.splice(p,0,t),this.tabsFilteredAsVisibleList=u,p===this.tabsFilteredAsVisibleList.length-1&&(null===(s=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[this.visibleTabsContainerElement.children.length-1])||void 0===s||s.remove());const e=this.visibleTabsContainerElement.children[c],i=this.visibleTabsContainerElement.children[p];if(!e||!i)return;null===(r=this.visibleTabsContainerElement)||void 0===r||r.replaceChild(i,e),null===(a=this.visibleTabsContainerElement)||void 0===a||a.insertBefore(e,i);break}case T:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+t.item.id))||void 0===l||l.remove();const e=m[c],i=u.slice(-1)[0];m.splice(c,1),m.splice(0,0,i);const o=p===this.tabsFilteredAsVisibleList.length?p-1:p;u.splice(o,0,e),u.pop(),this.tabsFilteredAsVisibleList=u,this.tabsFilteredAsHiddenList=m;break}case k:{const t=m[c];m.splice(c,1),m.splice(p,0,t),this.tabsFilteredAsHiddenList=m,p===this.tabsFilteredAsHiddenList.length-1&&(null===(h=null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[this.hiddenTabsContainerElement.children.length-1])||void 0===h||h.remove());break}}if(this.compUniqueId){const t=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],e=t.findIndex(t=>t.selected);this.storeSelectedTabIndex(e),this.tabsOrderPrefsArray=t.map(t=>t.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){var e;if(-1===t)return;const i=this._selectedIndex;this._selectedIndex=t,i!==t&&(null===(e=this.tabs)||void 0===e?void 0:e.length)&&this.updateSelectedTab(t)}get isRtl(){return"rtl"===getComputedStyle(this).direction}generateOptions(){return{group:"shared",animation:10,swapThreshold:1,draggable:"md-tab",direction:this.direction,forceFallback:this.forceFallback,fallbackClass:this.fallbackClass,ghostClass:this.ghostClass,chosenClass:this.chosenClass,onEnd:this.handleOnDragEnd}}get currentTabsLayout(){return"horizontal"!==this.direction||this.scrollArrow?this.tabs:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList]}getCopyTabId(t){var e;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:t.id}getAriaControlId(t){var e,i;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:"tab_panel_"+(null===(i=t.id)||void 0===i?void 0:i.substring(4))}getTabIndex(t){var e,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==t?void 0:t.id)&&this.selected>(null===(e=this.tabsFilteredAsVisibleList)||void 0===e?void 0:e.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===t.id?0:-1}getNormalizedTabId(t){return t.replace(E,"")}static get styles(){return[n.A,g.A]}ensureTabsUpdateComplete(t){return x(this,void 0,void 0,function*(){const e=t.map(t=>void 0!==t.updateComplete?t.updateComplete:null).filter(t=>null!==t);e.length&&(yield Promise.all(e))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(t=>{t.setAttribute("measuringrealwidth","");const e=t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth;return t.removeAttribute("measuringrealwidth"),e}):this.tabs.map(t=>t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth)}updateIsMoreTabTruncated(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-menu-overlay__overflow-label");if(e){const t=e.scrollWidth>e.clientWidth;this.isMoreTabTruncated!=t&&(this.isMoreTabTruncated=t)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(t=>t.offsetHeight)}manageOverflow(){return x(this,void 0,void 0,function*(){var t,e;if("vertical"!==this.direction&&!this.scrollArrow){let i;i=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length?[...this.tabs]:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],i.forEach(t=>{var e,i,o,s,r,a;if((null===(e=t.children)||void 0===e?void 0:e.length)&&0===(null===(o=null===(i=t.children[0])||void 0===i?void 0:i.children)||void 0===o?void 0:o.length)){const e=null===(r=null===(s=null==t?void 0:t.querySelector("slot"))||void 0===s?void 0:s.assignedNodes({flatten:!0})[0])||void 0===r?void 0:r.cloneNode(!0);e&&(e.classList.add("tab-content"),null===(a=null==t?void 0:t.children[0])||void 0===a||a.appendChild(e))}});const o=i.length;if(this.tabsListElement&&o){const s=(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth)?this.tabsListElement.offsetWidth-(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const r=this.measureTabsOffsetWidth(),a=i.reduce((t,e,i)=>t+r[i],0);if(a){yield this.setupMoreTab();let t=!0;s<a&&(t=!1);const e=[];let n=0;i.forEach((i,a)=>{n+=r[a];const l=!t&&n+(a<o-1?this.moreTabMenuOffsetWidth:0)>s;e.push({isTabInViewportHidden:l,tabOffsetWidth:r[a]})}),this.tabsViewportDataList=e,this.tabsViewportDataList.forEach((t,e)=>this.tabs[e].viewportHidden=t.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(t=>t.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((t,e)=>!this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsFilteredAsHiddenList=i.filter((t,e)=>this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})}}this.updateIsMoreTabMenuSelected();const s=this.tabsFilteredAsHiddenList.find(t=>!t.disabled);this.updateHiddenIdPositiveTabIndex(s)}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateHiddenIdPositiveTabIndex(t){this.tabHiddenIdPositiveTabIndex=t?t.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const t=(t,e)=>{var i,o;const s=null!==(i=t.getAttribute("name"))&&void 0!==i?i:"",r=null!==(o=e.getAttribute("name"))&&void 0!==o?o:"";return this.tabsOrderPrefsArray.indexOf(s)-this.tabsOrderPrefsArray.indexOf(r)};this.tabs.sort(t),this.panels.sort(t)}linkPanelsAndTabs(){return x(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:t,panels:e}=this;if(0===t.length||0===e.length)return void console.warn("The tabs or panels count should't be equal zero.");t.length!==e.length&&console.warn(`The amount of tabs (${t.length}) doesn't match the amount of panels (${e.length}).`);const i="vertical"===this.direction,o=this.selectedIndex<0?0:this.selectedIndex;t.forEach((t,s)=>{const r=(0,a.O)("tabs"),n="tab_"+r,l="tab_panel_"+r;t.setAttribute("id",n),t.setAttribute("aria-controls",l),t.selected=o===s,t.newMomentum=this.newMomentum,t.type=this.type,t.variant=this.variant,t.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(t.visibleTab=!0),t.vertical!==i&&(t.vertical=i),t.viewportHidden&&(i||this.scrollArrow)&&(t.viewportHidden=!1);const d=e[s];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=o===s,t.disabled&&(d.hidden=!0,d.selected=!1)):t.disabled=!0});let s=o;for(;s<t.length&&t[s].disabled;)s++;s=s===t.length?0:s,t[s].selected=!0,e[s].selected=!0,this.tabsHash=this.tabs.reduce((t,e)=>(t[e.id]=e,t),{}),this.tabsIdxHash=this.tabs.reduce((t,e,i)=>(t[e.id]=i,t),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(t){return t.from===this.visibleTabsContainerElement&&t.to===this.hiddenTabsContainerElement?$:t.from===this.visibleTabsContainerElement&&t.to===this.visibleTabsContainerElement?S:t.from===this.hiddenTabsContainerElement&&t.to===this.visibleTabsContainerElement?T:t.from===this.hiddenTabsContainerElement&&t.to===this.hiddenTabsContainerElement?k:void 0}makeTabCopyFocus(t){t&&t.focus()}handleTabClick(t){const{id:e}=t.detail;this.handleNewSelectedTab(e)}handleNewSelectedTab(t,e=!0){const i=this.tabsHash[this.getNormalizedTabId(t)];if(i&&!i.disabled){const t=this.tabsIdxHash[i.id];-1!==t&&this.updateSelectedTab(t,e);{const t=this.tabsCopyHash[this.getCopyTabId(i)];t&&e&&this.makeTabCopyFocus(t),this.updateHiddenIdPositiveTabIndex(i)}}}handleTabCrossClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseEvent(t){var e,i;const o=this.tabsHash[this.getNormalizedTabId(t)];if(o&&!o.disabled&&("auto"===o.closable||"custom"===o.closable)){const o=this.tabsFilteredAsVisibleList.findIndex(e=>this.getNormalizedTabId(e.id)===this.getNormalizedTabId(t));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(e=>this.getNormalizedTabId(e.id)!==this.getNormalizedTabId(t)),null===(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t))||void 0===i||i.remove(),0!==this.tabsFilteredAsHiddenList.length&&(this.tabsFilteredAsVisibleList.push(this.tabsFilteredAsHiddenList[0]),this.tabsFilteredAsHiddenList.splice(0,1)),0===this.tabsFilteredAsHiddenList.length&&(this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1),this.handleUpdatedSeletedTabAfterCross(o)}}handleUpdatedSeletedTabAfterCross(t){var e;let i=t;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(e=this.tabsFilteredAsVisibleList[i])||void 0===e?void 0:e.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||t===this.tabsFilteredAsVisibleList.length)for(i=t-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const t=this.tabs.findIndex(t=>t.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(t)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(t,e,i=!1){e&&(e.selected=i),t&&(t.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(t)),this.isTabInMoreMenu(t)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(t){return void 0!==this.tabsFilteredAsHiddenList.find(e=>e.id===t.id)}updateSelectedTab(t,e=!0){const{tabs:i,panels:o}=this,s=this.tabs.findIndex(t=>t.hasAttribute("selected"));if(i&&o&&(this.setSelectedAttribute((0,r.Qx)(i,s),(0,r.Qx)(o,s),!1),this.setSelectedAttribute((0,r.Qx)(i,t),(0,r.Qx)(o,t),!0)),t>=0&&t<i.length){this.dispatchSelectedChangedEvent(t);const o=this.currentTabsLayout.findIndex(e=>e.id===i[t].id);this.changeSelectedTabIdx(o,e)}}dispatchSelectedChangedEvent(t){const e=this.currentTabsLayout,i=this.tabs[t].id;let o=e.findIndex(t=>t.id===i);-1===o&&(o=t);const s=[];e.forEach(t=>{s.push(t.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:o,tabsOrder:s},composed:!0,bubbles:!0}))}changeSelectedTabIdx(t,e=!0){this.requestUpdate(),this.selected=t,this.updateComplete.then(()=>{var i,o;if(t<this.tabsFilteredAsVisibleList.length){if(e){const t=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==t||t.focus()}}else{const t=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(o=this.hiddenTabsContainerElement)||void 0===o?void 0:o.children[t];e&&this.moveFocusToTab(i);const s=this.tabsFilteredAsHiddenList[t];(null==s?void 0:s.disabled)||this.updateHiddenIdPositiveTabIndex(s)}}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(t)}storeSelectedTabIndex(t){this.persistSelection&&this.tabsId&&t>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${t}`)}getCurrentIndex(t){var e,i,o;if(this.scrollArrow){const e=this.tabs.length;for(let i=0;i<e;i++)if(this.tabs[i].id===t)return i}const s=null!==(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.children.length)&&void 0!==i?i:0;for(let e=0;e<s;e++)if((null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[e].id)===t)return e;return this.tabsVisibleIdxHash[t]}moveFocusToAdjacentTab(t,e){var i,o,s;const r=this.getCurrentIndex(t),a=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){e===A?n=0===r?a.length-1:r-1:e===I&&(n=r===a.length-1?0:r+1),this.moveFocusToTab(a[n]);const t=a[n],o=t.getBoundingClientRect(),s=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return s&&(o.left>=s.left&&o.right<=s.right&&o.top>=s.top&&o.bottom<=s.bottom||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,v.setTimeout)(()=>this.moveFocusToTab(a[n]),0)}const l=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children,d=null!==(s=null==l?void 0:l.length)&&void 0!==s?s:0;l&&0!==d&&(e===A?n=0===r?d-1:r-1:e===I?n=r===d-1?0:r+1:e===L&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(t){(0,v.setTimeout)(()=>null==t?void 0:t.focus(),0)}handleOverlayClose(){(0,v.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(t,e){e&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:e,key:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,srcEvent:t},bubbles:!0,composed:!0}))}handleTabKeydown(t){var e,i,s,r,a,n,l;const d=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==d?void 0:d.id)))return!1;let h;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?h=t.composedPath()[0].id:t.originalTarget&&(h=t.originalTarget.id),!h)return;const c=this.getNormalizedTabId(h);this.dispatchKeydownEvent(t,c);const p=t.code,{shiftKey:u}=t,m=!!this.isMoreTabMenuVisible&&c===C,y=m&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(c)],b=!this.isMoreTabMenuVisible||y&&this.tabsVisibleIdxHash[y.id]>-1,v=!!this.isMoreTabMenuVisible&&y&&this.tabsHiddenIdxHash[y.id]>-1,g=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1,f=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length:-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length+this.tabsFilteredAsHiddenList.length-1:-1;switch(p){case o.Uz.Tab:m&&!this.isMoreTabMenuOpen&&u&&(t.preventDefault(),this.moveFocusToAdjacentTab(h,L));break;case o.Uz.End:m||(b?(t.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(s=this.tabsFilteredAsVisibleList)||void 0===s?void 0:s.length)-1])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(r=this.hiddenTabsContainerElement)||void 0===r?void 0:r.children[(null===(a=this.tabsFilteredAsHiddenList)||void 0===a?void 0:a.length)-1])));break;case o.Uz.Home:b?(t.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case o.Uz.ArrowLeft:m||(b||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?I:A));break;case o.Uz.ArrowRight:m||(b||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?A:I));break;case o.Uz.ArrowUp:if(m);else if(b&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?g:this.selected-1);else if(v){t.preventDefault();const e=this.selected===f?w:this.selected-1;this.changeSelectedTabIdx(e)}break;case o.Uz.ArrowDown:if(m);else if(b&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===g?0:this.selected+1);else if(v){t.preventDefault();const e=this.selected===w?f:this.selected+1;this.changeSelectedTabIdx(e)}break;case o.Uz.Enter:case o.Uz.NumpadEnter:case o.Uz.Space:if(m){const t=this.tabsFilteredAsHiddenList.filter(t=>!t.disabled),e=t.length?t.find(t=>t.selected)||t[0]:void 0;if(this.updateHiddenIdPositiveTabIndex(e),e){const t=this.tabsIdxHash[this.getNormalizedTabId(e.id)];-1!==t&&this.updateSelectedTab(t)}}else if(y&&!y.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(y.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e))}}}setupTabsEvents(){this.addEventListener("tab-click",this.handleTabClick),this.addEventListener("tab-cross-click",this.handleTabCrossClick),this.addEventListener("tab-close-click",this.handleTabCloseClick),this.addEventListener("keydown",this.handleTabKeydown),this.addEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}teardownTabsEvents(){this.removeEventListener("tab-click",this.handleTabClick),this.removeEventListener("tab-cross-click",this.handleTabCrossClick),this.removeEventListener("tab-close-click",this.handleTabCloseClick),this.removeEventListener("keydown",this.handleTabKeydown),this.removeEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}clearTabOrderPrefs(t){const{compUniqueId:e}=t.detail;e===this.compUniqueId&&(localStorage.removeItem(this.tabsId),sessionStorage.removeItem(this.tabsId),localStorage.removeItem(this.compUniqueId),this.tabsOrderPrefsArray=this.defaultTabsOrderArray,this.selected=0,this.initializeTabs(),this.dispatchSelectedChangedEvent(0))}setupPanelsAndTabs(){this.tabSlotElement&&(this.tabs=this.tabSlotElement.assignedElements()),this.panelSlotElement&&(this.panels=this.panelSlotElement.assignedElements()),this.defaultTabsOrderArray=this.tabs.map(t=>t.name)}setupMoreTab(){return x(this,void 0,void 0,function*(){"vertical"!==this.direction&&this.moreTabMenuElement&&!this.isMoreTabMenuMeasured&&(this.moreTabMenuElement.classList.add("md-menu-overlay__more_tab--measuring"),yield this.moreTabMenuElement.updateComplete,this.moreTabMenuElement.offsetWidth&&(this.moreTabMenuOffsetWidth=this.moreTabMenuElement.offsetWidth,this.isMoreTabMenuMeasured=!0),this.moreTabMenuElement.classList.remove("md-menu-overlay__more_tab--measuring"))})}initializeSortable(){this.visibleTabsContainerElement&&this.hiddenTabsContainerElement&&(this.visibleTabsSortableInstance=b().create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=b().create(this.hiddenTabsContainerElement,this.generateOptions()))}initializeTabs(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),this.manageOverflow()}connectedCallback(){var t;if(super.connectedCallback(),this.setupTabsEvents(),this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=localStorage.getItem(this.tabsId);this.selected=t&&parseInt(t)>-1?parseInt(t):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(t=localStorage.getItem(this.compUniqueId))||void 0===t?void 0:t.split(","))||[])}selectTabFromStorage(){if(this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=sessionStorage.getItem(this.tabsId);let e=0;if(t){const i=parseInt(t);e=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[e].id?(this._selectedIndex=e,this.handleNewSelectedTab(i[e].id,!1)):this.selected=e}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(t){var e;super.firstUpdated(t),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(e=this.tabsListElement)||void 0===e||e.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return x(this,void 0,void 0,function*(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),yield this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),"horizontal"===this.direction&&(yield this.manageOverflow()),this.selectTabFromStorage(),this.scrollArrow&&this.updateArrowsVisibility()})}willUpdate(t){var e,i;if(null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("selectedIndex")&&(this.selected=this.selectedIndex),t.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(i=this.tabsCopyHiddenListElements)||void 0===i?void 0:i.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((t,e)=>(t[e.id]=e,t),{})),(t.has("tabsFilteredAsVisibleList")||t.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})),t.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const e=t.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!e&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((t,e)=>t+e,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}}updated(t){super.updated(t),t.has("direction")&&t.get("direction")!==this.direction&&this.onDirectionChanged(),t.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),t.has("tabsId")&&this.selectTabFromStorage(),t.has("selectedIndex")&&this.updateSelectedTab(this.selectedIndex,!1),t.has("overflowLabel")&&this.updateIsMoreTabTruncated(),t.has("scrollArrow")&&this.onDirectionChanged()}scrollTabs(t){if(!this.tabsListElement||"vertical"===this.direction)return;const e="left"===t?-100:100;this.tabsListElement.scrollBy({left:e,behavior:"smooth"}),(0,v.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
1446
+ `}};m([(0,d.property)({type:Boolean,attribute:"two-digit-auto-tab"})],e.prototype,"twoDigitAutoTab",void 0),m([(0,d.property)({type:Boolean,attribute:"twenty-four-hour-format",reflect:!0})],e.prototype,"twentyFourHourFormat",void 0),m([(0,d.property)({type:String})],e.prototype,"timeSpecificity",void 0),m([(0,d.property)({type:String})],e.prototype,"locale",void 0),m([(0,d.property)({type:String,reflect:!0})],e.prototype,"value",void 0),m([(0,d.property)({type:Boolean,attribute:"show-default-now-time"})],e.prototype,"showDefaultNowTime",void 0),m([(0,d.state)()],e.prototype,"finalTwentyFourFormat",void 0),m([(0,d.state)()],e.prototype,"timeObject",void 0),m([(0,d.state)()],e.prototype,"tabNext",void 0),m([(0,d.state)()],e.prototype,"timeValue",void 0),m([(0,d.state)()],e.prototype,"timeValidity",void 0),e=m([(0,s.w)("md-timepicker")],e),t.ELEMENT=e}(g||(g={}))},50226:(t,e,i)=>{i.d(e,{Tabs:()=>O}),i(61200),i(11323),i(83192);var o=i(90195),s=i(3001),r=i(66677),a=i(59164),n=i(4313),l=i(87161),d=i(54765),h=i(70429),c=i(85125),p=i(58175),u=i(10318),m=i(16968),y=i(41891),v=i.n(y),b=i(97103),g=i(2669),f=i(16643),w=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},x=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};const C="tab-more",E="more-menu-copy-",S="visibleToVisible",$="visibleToHidden",T="hiddenToVisible",k="hiddenToHidden",A="previous",I="next",L="fromMoreTabs";var O;!function(t){let e=class extends((0,s.UM)((0,s.Io)((0,s.TS)(l.LitElement)))){constructor(){super(...arguments),this.justified=!1,this.hugTabs=!1,this.overflowLabel="More Tabs",this.draggable=!1,this.direction="horizontal",this.moreItemsScrollLimit=Number.MAX_SAFE_INTEGER,this._selectedIndex=0,this.animation=100,this.ghostClass="",this.chosenClass="",this.forceFallback=!1,this.fallbackClass="",this.tabsId="",this.persistSelection=!1,this.compUniqueId="",this.type="line",this.newMomentum=!1,this.variant="ghost",this.scrollArrow=!1,this.leftArrowAriaLabel="Backward Button",this.rightArrowAriaLabel="Forward Button",this.size=28,this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1,this.isMoreTabMenuOpen=!1,this.isMoreTabMenuSelected=!1,this.isMoreTabMenuScrollable=!1,this.moreTabMenuOffsetWidth=0,this.moreTabMenuMaxHeight=null,this.tabsViewportDataList=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.noTabsVisible=!1,this.defaultTabsOrderArray=[],this.tabsOrderPrefsArray=[],this.isMoreTabTruncated=!1,this.showLeftArrow=!1,this.showRightArrow=!1,this.tabs=[],this.panels=[],this.tabsCopy=[],this.tabsHash={},this.tabsCopyHash={},this.tabsIdxHash={},this.tabsVisibleIdxHash={},this.tabsHiddenIdxHash={},this.visibleTabsSortableInstance=null,this.hiddenTabsSortableInstance=null,this.updateArrowsVisibility=()=>{this.tabsListElement&&requestAnimationFrame(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.tabsListElement;this.showLeftArrow=t>0,this.showRightArrow=t+i<e-5})},this.handleOnDragEnd=t=>x(this,void 0,void 0,function*(){var e,i,o,s,r,a,n,l,d,h;t.stopPropagation();const c=t.oldIndex,p=t.newIndex,u=[...this.tabsFilteredAsVisibleList],m=[...this.tabsFilteredAsHiddenList],y=this.getDragDirection(t);if(void 0!==c&&void 0!==p){switch(y){case $:{null===(i=null===(e=this.hiddenTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t.item.id))||void 0===i||i.remove();const o=u[c],s=m.slice(-1)[0],r=p===this.tabsFilteredAsHiddenList.length?p-1:p;m.splice(r,0,o),m.pop();const a=u.filter(e=>e.id!==this.getNormalizedTabId(t.item.id));a.push(s),this.tabsFilteredAsVisibleList=[...a],this.tabsFilteredAsHiddenList=[...m];break}case S:{const t=u[c];u.splice(c,1),u.splice(p,0,t),this.tabsFilteredAsVisibleList=u,p===this.tabsFilteredAsVisibleList.length-1&&(null===(s=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[this.visibleTabsContainerElement.children.length-1])||void 0===s||s.remove());const e=this.visibleTabsContainerElement.children[c],i=this.visibleTabsContainerElement.children[p];if(!e||!i)return;null===(r=this.visibleTabsContainerElement)||void 0===r||r.replaceChild(i,e),null===(a=this.visibleTabsContainerElement)||void 0===a||a.insertBefore(e,i);break}case T:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+t.item.id))||void 0===l||l.remove();const e=m[c],i=u.slice(-1)[0];m.splice(c,1),m.splice(0,0,i);const o=p===this.tabsFilteredAsVisibleList.length?p-1:p;u.splice(o,0,e),u.pop(),this.tabsFilteredAsVisibleList=u,this.tabsFilteredAsHiddenList=m;break}case k:{const t=m[c];m.splice(c,1),m.splice(p,0,t),this.tabsFilteredAsHiddenList=m,p===this.tabsFilteredAsHiddenList.length-1&&(null===(h=null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[this.hiddenTabsContainerElement.children.length-1])||void 0===h||h.remove());break}}if(this.compUniqueId){const t=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],e=t.findIndex(t=>t.selected);this.storeSelectedTabIndex(e),this.tabsOrderPrefsArray=t.map(t=>t.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){var e;if(-1===t)return;const i=this._selectedIndex;this._selectedIndex=t,i!==t&&(null===(e=this.tabs)||void 0===e?void 0:e.length)&&this.updateSelectedTab(t)}get isRtl(){return"rtl"===getComputedStyle(this).direction}generateOptions(){return{group:"shared",animation:10,swapThreshold:1,draggable:"md-tab",direction:this.direction,forceFallback:this.forceFallback,fallbackClass:this.fallbackClass,ghostClass:this.ghostClass,chosenClass:this.chosenClass,onEnd:this.handleOnDragEnd}}get currentTabsLayout(){return"horizontal"!==this.direction||this.scrollArrow?this.tabs:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList]}getCopyTabId(t){var e;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:t.id}getAriaControlId(t){var e,i;return(null===(e=t.id)||void 0===e?void 0:e.startsWith(E))?`${E}${t.id}`:"tab_panel_"+(null===(i=t.id)||void 0===i?void 0:i.substring(4))}getTabIndex(t){var e,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==t?void 0:t.id)&&this.selected>(null===(e=this.tabsFilteredAsVisibleList)||void 0===e?void 0:e.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===t.id?0:-1}getNormalizedTabId(t){return t.replace(E,"")}static get styles(){return[n.A,g.A]}ensureTabsUpdateComplete(t){return x(this,void 0,void 0,function*(){const e=t.map(t=>void 0!==t.updateComplete?t.updateComplete:null).filter(t=>null!==t);e.length&&(yield Promise.all(e))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(t=>{t.setAttribute("measuringrealwidth","");const e=t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth;return t.removeAttribute("measuringrealwidth"),e}):this.tabs.map(t=>t.closable?t.offsetWidth+f.TAB_CROSS_WIDTH:t.offsetWidth)}updateIsMoreTabTruncated(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-menu-overlay__overflow-label");if(e){const t=e.scrollWidth>e.clientWidth;this.isMoreTabTruncated!=t&&(this.isMoreTabTruncated=t)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(t=>t.offsetHeight)}manageOverflow(){return x(this,void 0,void 0,function*(){var t,e;if("vertical"!==this.direction&&!this.scrollArrow){let i;i=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length?[...this.tabs]:[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],i.forEach(t=>{var e,i,o,s,r,a;if((null===(e=t.children)||void 0===e?void 0:e.length)&&0===(null===(o=null===(i=t.children[0])||void 0===i?void 0:i.children)||void 0===o?void 0:o.length)){const e=null===(r=null===(s=null==t?void 0:t.querySelector("slot"))||void 0===s?void 0:s.assignedNodes({flatten:!0})[0])||void 0===r?void 0:r.cloneNode(!0);e&&(e.classList.add("tab-content"),null===(a=null==t?void 0:t.children[0])||void 0===a||a.appendChild(e))}});const o=i.length;if(this.tabsListElement&&o){const s=(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth)?this.tabsListElement.offsetWidth-(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const r=this.measureTabsOffsetWidth(),a=i.reduce((t,e,i)=>t+r[i],0);if(a){yield this.setupMoreTab();let t=!0;s<a&&(t=!1);const e=[];let n=0;i.forEach((i,a)=>{n+=r[a];const l=!t&&n+(a<o-1?this.moreTabMenuOffsetWidth:0)>s;e.push({isTabInViewportHidden:l,tabOffsetWidth:r[a]})}),this.tabsViewportDataList=e,this.tabsViewportDataList.forEach((t,e)=>this.tabs[e].viewportHidden=t.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(t=>t.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((t,e)=>!this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsFilteredAsHiddenList=i.filter((t,e)=>this.tabsViewportDataList[e].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})}}this.updateIsMoreTabMenuSelected();const s=this.tabsFilteredAsHiddenList.find(t=>!t.disabled);this.updateHiddenIdPositiveTabIndex(s)}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateHiddenIdPositiveTabIndex(t){this.tabHiddenIdPositiveTabIndex=t?t.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const t=(t,e)=>{var i,o;const s=null!==(i=t.getAttribute("name"))&&void 0!==i?i:"",r=null!==(o=e.getAttribute("name"))&&void 0!==o?o:"";return this.tabsOrderPrefsArray.indexOf(s)-this.tabsOrderPrefsArray.indexOf(r)};this.tabs.sort(t),this.panels.sort(t)}linkPanelsAndTabs(){return x(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:t,panels:e}=this;if(0===t.length||0===e.length)return void console.warn("The tabs or panels count should't be equal zero.");t.length!==e.length&&console.warn(`The amount of tabs (${t.length}) doesn't match the amount of panels (${e.length}).`);const i="vertical"===this.direction,o=this.selectedIndex<0?0:this.selectedIndex;t.forEach((t,s)=>{const r=(0,a.O)("tabs"),n="tab_"+r,l="tab_panel_"+r;t.setAttribute("id",n),t.setAttribute("aria-controls",l),t.selected=o===s,t.newMomentum=this.newMomentum,t.type=this.type,t.variant=this.variant,t.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(t.visibleTab=!0),t.vertical!==i&&(t.vertical=i),t.viewportHidden&&(i||this.scrollArrow)&&(t.viewportHidden=!1);const d=e[s];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=o===s,t.disabled&&(d.hidden=!0,d.selected=!1)):t.disabled=!0});let s=o;for(;s<t.length&&t[s].disabled;)s++;s=s===t.length?0:s,t[s].selected=!0,e[s].selected=!0,this.tabsHash=this.tabs.reduce((t,e)=>(t[e.id]=e,t),{}),this.tabsIdxHash=this.tabs.reduce((t,e,i)=>(t[e.id]=i,t),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(t){var e;null===(e=super.handleResize)||void 0===e||e.call(this,t),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(t){return t.from===this.visibleTabsContainerElement&&t.to===this.hiddenTabsContainerElement?$:t.from===this.visibleTabsContainerElement&&t.to===this.visibleTabsContainerElement?S:t.from===this.hiddenTabsContainerElement&&t.to===this.visibleTabsContainerElement?T:t.from===this.hiddenTabsContainerElement&&t.to===this.hiddenTabsContainerElement?k:void 0}makeTabCopyFocus(t){t&&t.focus()}handleTabClick(t){const{id:e}=t.detail;this.handleNewSelectedTab(e)}handleNewSelectedTab(t,e=!0){const i=this.tabsHash[this.getNormalizedTabId(t)];if(i&&!i.disabled){const t=this.tabsIdxHash[i.id];-1!==t&&this.updateSelectedTab(t,e);{const t=this.tabsCopyHash[this.getCopyTabId(i)];t&&e&&this.makeTabCopyFocus(t),this.updateHiddenIdPositiveTabIndex(i)}}}handleTabCrossClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseClick(t){const{id:e}=t.detail;this.handleTabCloseEvent(e)}handleTabCloseEvent(t){var e,i;const o=this.tabsHash[this.getNormalizedTabId(t)];if(o&&!o.disabled&&("auto"===o.closable||"custom"===o.closable)){const o=this.tabsFilteredAsVisibleList.findIndex(e=>this.getNormalizedTabId(e.id)===this.getNormalizedTabId(t));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(e=>this.getNormalizedTabId(e.id)!==this.getNormalizedTabId(t)),null===(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.querySelector("#"+t))||void 0===i||i.remove(),0!==this.tabsFilteredAsHiddenList.length&&(this.tabsFilteredAsVisibleList.push(this.tabsFilteredAsHiddenList[0]),this.tabsFilteredAsHiddenList.splice(0,1)),0===this.tabsFilteredAsHiddenList.length&&(this.isMoreTabMenuVisible=!1,this.isMoreTabMenuMeasured=!1),this.handleUpdatedSeletedTabAfterCross(o)}}handleUpdatedSeletedTabAfterCross(t){var e;let i=t;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(e=this.tabsFilteredAsVisibleList[i])||void 0===e?void 0:e.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||t===this.tabsFilteredAsVisibleList.length)for(i=t-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const t=this.tabs.findIndex(t=>t.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(t)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(t,e,i=!1){e&&(e.selected=i),t&&(t.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(t)),this.isTabInMoreMenu(t)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(t){return void 0!==this.tabsFilteredAsHiddenList.find(e=>e.id===t.id)}updateSelectedTab(t,e=!0){const{tabs:i,panels:o}=this,s=this.tabs.findIndex(t=>t.hasAttribute("selected"));if(i&&o&&(this.setSelectedAttribute((0,r.Qx)(i,s),(0,r.Qx)(o,s),!1),this.setSelectedAttribute((0,r.Qx)(i,t),(0,r.Qx)(o,t),!0)),t>=0&&t<i.length){this.dispatchSelectedChangedEvent(t);const o=this.currentTabsLayout.findIndex(e=>e.id===i[t].id);this.changeSelectedTabIdx(o,e)}}dispatchSelectedChangedEvent(t){const e=this.currentTabsLayout,i=this.tabs[t].id;let o=e.findIndex(t=>t.id===i);-1===o&&(o=t);const s=[];e.forEach(t=>{s.push(t.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:o,tabsOrder:s},composed:!0,bubbles:!0}))}changeSelectedTabIdx(t,e=!0){this.requestUpdate(),this.selected=t,this.updateComplete.then(()=>{var i,o;if(t<this.tabsFilteredAsVisibleList.length){if(e){const t=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==t||t.focus()}}else{const t=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(o=this.hiddenTabsContainerElement)||void 0===o?void 0:o.children[t];e&&this.moveFocusToTab(i);const s=this.tabsFilteredAsHiddenList[t];(null==s?void 0:s.disabled)||this.updateHiddenIdPositiveTabIndex(s)}}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(t)}storeSelectedTabIndex(t){this.persistSelection&&this.tabsId&&t>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${t}`)}getCurrentIndex(t){var e,i,o;if(this.scrollArrow){const e=this.tabs.length;for(let i=0;i<e;i++)if(this.tabs[i].id===t)return i}const s=null!==(i=null===(e=this.visibleTabsContainerElement)||void 0===e?void 0:e.children.length)&&void 0!==i?i:0;for(let e=0;e<s;e++)if((null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children[e].id)===t)return e;return this.tabsVisibleIdxHash[t]}moveFocusToAdjacentTab(t,e){var i,o,s;const r=this.getCurrentIndex(t),a=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){e===A?n=0===r?a.length-1:r-1:e===I&&(n=r===a.length-1?0:r+1),this.moveFocusToTab(a[n]);const t=a[n],o=t.getBoundingClientRect(),s=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return s&&(o.left>=s.left&&o.right<=s.right&&o.top>=s.top&&o.bottom<=s.bottom||t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,b.setTimeout)(()=>this.moveFocusToTab(a[n]),0)}const l=null===(o=this.visibleTabsContainerElement)||void 0===o?void 0:o.children,d=null!==(s=null==l?void 0:l.length)&&void 0!==s?s:0;l&&0!==d&&(e===A?n=0===r?d-1:r-1:e===I?n=r===d-1?0:r+1:e===L&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(t){(0,b.setTimeout)(()=>null==t?void 0:t.focus(),0)}handleOverlayClose(){(0,b.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(t,e){e&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:e,key:t.code,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,srcEvent:t},bubbles:!0,composed:!0}))}handleTabKeydown(t){var e,i,s,r,a,n,l;const d=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==d?void 0:d.id)))return!1;let h;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?h=t.composedPath()[0].id:t.originalTarget&&(h=t.originalTarget.id),!h)return;const c=this.getNormalizedTabId(h);this.dispatchKeydownEvent(t,c);const p=t.code,{shiftKey:u}=t,m=!!this.isMoreTabMenuVisible&&c===C,y=m&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(c)],v=!this.isMoreTabMenuVisible||y&&this.tabsVisibleIdxHash[y.id]>-1,b=!!this.isMoreTabMenuVisible&&y&&this.tabsHiddenIdxHash[y.id]>-1,g=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1,f=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length:-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length+this.tabsFilteredAsHiddenList.length-1:-1;switch(p){case o.Uz.Tab:m&&!this.isMoreTabMenuOpen&&u&&(t.preventDefault(),this.moveFocusToAdjacentTab(h,L));break;case o.Uz.End:m||(v?(t.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(s=this.tabsFilteredAsVisibleList)||void 0===s?void 0:s.length)-1])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(r=this.hiddenTabsContainerElement)||void 0===r?void 0:r.children[(null===(a=this.tabsFilteredAsHiddenList)||void 0===a?void 0:a.length)-1])));break;case o.Uz.Home:v?(t.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(t.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case o.Uz.ArrowLeft:m||(v||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?I:A));break;case o.Uz.ArrowRight:m||(v||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(h,this.isRtl?A:I));break;case o.Uz.ArrowUp:if(m);else if(v&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?g:this.selected-1);else if(b){t.preventDefault();const e=this.selected===f?w:this.selected-1;this.changeSelectedTabIdx(e)}break;case o.Uz.ArrowDown:if(m);else if(v&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===g?0:this.selected+1);else if(b){t.preventDefault();const e=this.selected===w?f:this.selected+1;this.changeSelectedTabIdx(e)}break;case o.Uz.Enter:case o.Uz.NumpadEnter:case o.Uz.Space:if(m){const t=this.tabsFilteredAsHiddenList.filter(t=>!t.disabled),e=t.length?t.find(t=>t.selected)||t[0]:void 0;if(this.updateHiddenIdPositiveTabIndex(e),e){const t=this.tabsIdxHash[this.getNormalizedTabId(e.id)];-1!==t&&this.updateSelectedTab(t)}}else if(y&&!y.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(y.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e))}}}setupTabsEvents(){this.addEventListener("tab-click",this.handleTabClick),this.addEventListener("tab-cross-click",this.handleTabCrossClick),this.addEventListener("tab-close-click",this.handleTabCloseClick),this.addEventListener("keydown",this.handleTabKeydown),this.addEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}teardownTabsEvents(){this.removeEventListener("tab-click",this.handleTabClick),this.removeEventListener("tab-cross-click",this.handleTabCrossClick),this.removeEventListener("tab-close-click",this.handleTabCloseClick),this.removeEventListener("keydown",this.handleTabKeydown),this.removeEventListener("clear-tab-order-prefs",this.clearTabOrderPrefs)}clearTabOrderPrefs(t){const{compUniqueId:e}=t.detail;e===this.compUniqueId&&(localStorage.removeItem(this.tabsId),sessionStorage.removeItem(this.tabsId),localStorage.removeItem(this.compUniqueId),this.tabsOrderPrefsArray=this.defaultTabsOrderArray,this.selected=0,this.initializeTabs(),this.dispatchSelectedChangedEvent(0))}setupPanelsAndTabs(){this.tabSlotElement&&(this.tabs=this.tabSlotElement.assignedElements()),this.panelSlotElement&&(this.panels=this.panelSlotElement.assignedElements()),this.defaultTabsOrderArray=this.tabs.map(t=>t.name)}setupMoreTab(){return x(this,void 0,void 0,function*(){"vertical"!==this.direction&&this.moreTabMenuElement&&!this.isMoreTabMenuMeasured&&(this.moreTabMenuElement.classList.add("md-menu-overlay__more_tab--measuring"),yield this.moreTabMenuElement.updateComplete,this.moreTabMenuElement.offsetWidth&&(this.moreTabMenuOffsetWidth=this.moreTabMenuElement.offsetWidth,this.isMoreTabMenuMeasured=!0),this.moreTabMenuElement.classList.remove("md-menu-overlay__more_tab--measuring"))})}initializeSortable(){this.visibleTabsContainerElement&&this.hiddenTabsContainerElement&&(this.visibleTabsSortableInstance=v().create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=v().create(this.hiddenTabsContainerElement,this.generateOptions()))}initializeTabs(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),this.manageOverflow()}connectedCallback(){var t;if(super.connectedCallback(),this.setupTabsEvents(),this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=localStorage.getItem(this.tabsId);this.selected=t&&parseInt(t)>-1?parseInt(t):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(t=localStorage.getItem(this.compUniqueId))||void 0===t?void 0:t.split(","))||[])}selectTabFromStorage(){if(this.persistSelection){if(!this.tabsId||""===this.tabsId.trim())return void console.error("Unique tabs-id attribute is mandatory for persist the selection of tab");const t=sessionStorage.getItem(this.tabsId);let e=0;if(t){const i=parseInt(t);e=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[e].id?(this._selectedIndex=e,this.handleNewSelectedTab(i[e].id,!1)):this.selected=e}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(t){var e;super.firstUpdated(t),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(e=this.tabsListElement)||void 0===e||e.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return x(this,void 0,void 0,function*(){this.tabs=[],this.panels=[],this.tabsFilteredAsVisibleList=[],this.tabsFilteredAsHiddenList=[],this.isMoreTabMenuVisible=!1,this.setupPanelsAndTabs(),yield this.linkPanelsAndTabs(),this.draggable&&this.initializeSortable(),"horizontal"===this.direction&&(yield this.manageOverflow()),this.selectTabFromStorage(),this.scrollArrow&&this.updateArrowsVisibility()})}willUpdate(t){var e,i;if(null===(e=super.willUpdate)||void 0===e||e.call(this,t),t.has("selectedIndex")&&(this.selected=this.selectedIndex),t.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(i=this.tabsCopyHiddenListElements)||void 0===i?void 0:i.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((t,e)=>(t[e.id]=e,t),{})),(t.has("tabsFilteredAsVisibleList")||t.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((t,e,i)=>(t[e.id]=i,t),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((t,e,i)=>(t[e.id]=i,t),{})),t.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const e=t.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!e&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((t,e)=>t+e,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}}updated(t){super.updated(t),t.has("direction")&&t.get("direction")!==this.direction&&this.onDirectionChanged(),t.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),t.has("tabsId")&&this.selectTabFromStorage(),t.has("selectedIndex")&&this.updateSelectedTab(this.selectedIndex,!1),t.has("overflowLabel")&&this.updateIsMoreTabTruncated(),t.has("scrollArrow")&&this.onDirectionChanged()}scrollTabs(t){if(!this.tabsListElement||"vertical"===this.direction)return;const e="left"===t?-100:100;this.tabsListElement.scrollBy({left:e,behavior:"smooth"}),(0,b.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
1447
1447
  <md-tab
1448
1448
  slot="menu-trigger"
1449
1449
  id="${C}"
@@ -1737,7 +1737,7 @@
1737
1737
  <slot name="custom-right-content" part="chip-right"> </slot>
1738
1738
  </span>
1739
1739
  </md-tooltip>
1740
- `}};p([(0,l.property)({type:String})],e.prototype,"color",void 0),p([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,l.property)({type:String})],e.prototype,"textColor",void 0),p([(0,l.property)({type:String})],e.prototype,"height",void 0),p([(0,l.property)({type:String})],e.prototype,"icon",void 0),p([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),p([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),p([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),p([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),p([(0,l.state)()],e.prototype,"renderedText",void 0),e=p([(0,r.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},60554:t=>{t.exports=a},61200:(t,e,i)=>{i.d(e,{Icon:()=>o}),i(96798);var o,s=i(31890),r=i(4313),a=i(32022),n=i.n(a),l=i(60554),d=i.n(l),h=i(87161),c=i(70429),p=i(85125),u=i(20291),m=i(10318),y=i(57955),b=i(24480),v=i(81786),g=i(9223),f=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const o="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);o&&(this.svgIcon=o,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes())},new((o=void 0)||(o=Promise))(function(t,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:v.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:d()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":n().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[r.A,b.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return h.html`
1740
+ `}};p([(0,l.property)({type:String})],e.prototype,"color",void 0),p([(0,l.property)({type:String})],e.prototype,"bgColor",void 0),p([(0,l.property)({type:String})],e.prototype,"textColor",void 0),p([(0,l.property)({type:String})],e.prototype,"height",void 0),p([(0,l.property)({type:String})],e.prototype,"icon",void 0),p([(0,l.property)({type:String})],e.prototype,"iconColor",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSize",void 0),p([(0,l.property)({type:String})],e.prototype,"role",void 0),p([(0,l.property)({type:String,reflect:!0})],e.prototype,"id",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"small",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"readonly",void 0),p([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"disabled",void 0),p([(0,l.property)({type:Number})],e.prototype,"determinateProgress",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"indeterminateProgress",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipText",void 0),p([(0,l.property)({type:String})],e.prototype,"tooltipPlacement",void 0),p([(0,l.property)({type:String})],e.prototype,"iconSet",void 0),p([(0,l.property)({type:Boolean,attribute:"suppress-default-max-width"})],e.prototype,"suppressDefaultMaxWidth",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"decorative",void 0),p([(0,l.property)({type:Boolean})],e.prototype,"shouldTruncateValue",void 0),p([(0,l.property)({type:String,hasChanged:(t,e)=>t!==e})],e.prototype,"value",void 0),p([(0,l.state)({hasChanged:(t,e)=>t!==e})],e.prototype,"textOverflow",void 0),p([(0,l.state)()],e.prototype,"renderedText",void 0),e=p([(0,r.w)("md-chip")],e),t.ELEMENT=e}(o||(o={}))},60554:t=>{t.exports=a},61200:(t,e,i)=>{i.d(e,{Icon:()=>o}),i(96798);var o,s=i(31890),r=i(4313),a=i(32022),n=i.n(a),l=i(60554),d=i.n(l),h=i(87161),c=i(70429),p=i(85125),u=i(20291),m=i(10318),y=i(57955),v=i(24480),b=i(81786),g=i(9223),f=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){var e;let i=e=class extends h.LitElement{constructor(){super(...arguments),this.color="",this.description="",this.name="",this.id="",this.size="",this.title="",this.ariaHidden=null,this.type="",this.isActive=!1,this.isComboBoxIcon=!1,this.sizeOverrided=!1,this.iconSet="momentumUI",this.svgIcon=null,this._ariaLabel="",this.consoleHandler=(t,e)=>{switch(t){case"color-warn":console.warn(`[@momentum-ui/web-component] Icon: ${e} may not exist in the design system, please use a color name from https://momentum.design/styles/color/style`);break;case"name-error":console.warn(`[@momentum-ui/web-component] Icon: Icon ${e} does not exist in the design system. Visit https://momentum.design/icons for a list of available icons or to request a new icon.`)}}}isSvgAlreadyLoaded(t){var e,i;return!!this.svgIcon&&(null===(i=null===(e=this.svgIcon)||void 0===e?void 0:e.getAttribute("class"))||void 0===i?void 0:i.includes(t))}loadSvgIcon(t){return e=this,i=void 0,s=function*(){var e,i;if(this.isSvgAlreadyLoaded(t))return;const o="momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet?yield(0,g.Jp)(this.computedSvgPath,t,"svg"):yield(0,g.D6)(t);o&&(this.svgIcon=o,null===(e=this.svgIcon)||void 0===e||e.setAttribute("class",`icon ${t}`),null===(i=this.svgIcon)||void 0===i||i.setAttribute("part","icon"),this.setSvgIconAttributes())},new((o=void 0)||(o=Promise))(function(t,r){function a(t){try{l(s.next(t))}catch(t){r(t)}}function n(t){try{l(s.throw(t))}catch(t){r(t)}}function l(e){var i;e.done?t(e.value):(i=e.value,i instanceof o?i:new o(function(t){t(i)})).then(a,n)}l((s=s.apply(e,i||[])).next())});var e,i,o,s}setSvgIconAttributes(){this.svgIcon&&(this.iconFontSize&&this.svgIcon.setAttribute("width",`${this.iconFontSize}px`),this.iconFontSize&&this.svgIcon.setAttribute("height",`${this.iconFontSize}px`),this.color?this.svgIcon.setAttribute("fill",this.iconColor):this.svgIcon.setAttribute("fill","currentColor"))}get computedSvgPath(){return this.svgUrl?this.svgUrl:b.O.svgIconUrl}getIsMomentumDesignName(t){return t.endsWith("-filled")||t.endsWith("-light")||t.endsWith("-regular")||t.endsWith("-bold")}get svgIconName(){if("momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet)return this.name;if("preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name))return this.name;const t=this.momentumUIIconLookupName,i=e.designLookup.get(t);return null!=i?i:t}updated(t){if(super.updated(t),this.doesIconSetSupportSVG)if(t.has("name")||t.has("iconSet")){const t=this.svgIconName;t&&"Unknown"!==t&&this.loadSvgIcon(t)}else(t.has("iconFontSize")||t.has("color"))&&this.setSvgIconAttributes()}get ariaLabel(){return this._ariaLabel?this._ariaLabel:this.title&&this.description?`${this.title} ${this.description}`:this.title?this.title:this.description?this.description:"icon"}set ariaLabel(t){const e=this._ariaLabel;this._ariaLabel=t,this.requestUpdate("ariaLabel",e)}get buttonClassMap(){return{[`md-button--icon-${this.type}`]:!!this.type}}get iconFontSize(){const t=this.name.split("_")[1];return this.size||t||16}get iconColor(){return this.color.startsWith("#")?(this.consoleHandler("color-warn",this.color),this.color):this.color.startsWith("var(")?this.color:d()(this.color)}get iconClassMap(){return{"md-combobox-input__icon":this.isComboBoxIcon,"md-combobox-input__icon--active":this.isComboBoxIcon&&this.isActive,[`${this.iconName}`]:!!this.iconName}}get momentumUIIconLookupName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t=t.split("_")[0],t}getIconName(){let t=this.name;return t=t.startsWith("icon-")?t.substring(5):t,t}handleSizeOverride(t){return`${t.split("_")[0]}_${this.iconFontSize}`}get iconName(){const t=this.getIconName();return this.sizeOverrided?this.handleSizeOverride(t):"preferMomentumDesign"===this.iconSet&&this.getIsMomentumDesignName(this.name)?"":n().includes(t)||""===t?`icon-${t}`:this.consoleHandler("name-error",t)}get iconStyleMap(){return Object.assign(Object.assign({},this.iconFontSize&&{"font-size":`${this.iconFontSize}px`}),this.color&&{color:this.iconColor})}static get styles(){return[r.A,v.A]}handleIconClick(t){this.dispatchEvent(new CustomEvent("icon-click",{bubbles:!0,composed:!0,detail:{srcEvent:t}}))}get doesIconSetSupportSVG(){return"momentumDesign"===this.iconSet||"preferMomentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}get isSVGRender(){return this.svgIcon&&"preferMomentumDesign"===this.iconSet||"momentumDesign"===this.iconSet||"momentumBrandVisuals"===this.iconSet||"svg"===this.iconSet}render(){return this.isSVGRender?this.renderSVGIcon():this.renderFontIcon()}renderFontIcon(){var t;return h.html`
1741
1741
  <i
1742
1742
  part="icon"
1743
1743
  id=${this.id}
@@ -2005,7 +2005,7 @@
2005
2005
  <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
2006
2006
  <span class=${(0,l.classMap)(this.loadingIconClassMap)}></span>
2007
2007
  </div>
2008
- `}};h([(0,n.property)({type:String})],e.prototype,"size",void 0),e=h([(0,s.w)("md-loading")],e),t.ELEMENT=e}(o||(o={}))},70429:t=>{t.exports=e},71128:(t,e,i)=>{i.d(e,{Popover:()=>v,PopoverController:()=>b}),i(96798),i(61200);var o=i(31890),s=i(28373),r=i(66677),a=i(5784),n=i(87161),l=i(70429),d=i(68419),h=i(36365),c=i(3998),p=i(33759),u=i(86210),m=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},y=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};class b{show(t){}hide(){}toggle(){}isVisible(){return!1}}let v=class extends((0,s.d)(n.LitElement)){set controller(t){t?(t.show=(t=!1)=>this.showPopover(t),t.hide=()=>this.hidePopover(),t.toggle=()=>this.togglePopoverVisible(),t.isVisible=()=>this.visible,this._controller=t):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=d.zY.TRIGGER,this.placement=d.zY.PLACEMENT,this.strategy=d.zY.STRATEGY,this.color=d.zY.COLOR,this.visible=d.zY.VISIBLE,this.offset=d.zY.OFFSET,this.focusTrap=d.zY.FOCUS_TRAP,this.preventScroll=d.zY.PREVENT_SCROLL,this.showArrow=d.zY.ARROW,this.closeButton=d.zY.CLOSE_BUTTON,this.interactive=d.zY.INTERACTIVE,this.delay=d.zY.DELAY,this.hideOnEscape=d.zY.HIDE_ON_ESCAPE,this.hideOnBlur=d.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=d.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=d.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=d.zY.FOCUS_BACK,this.backdrop=d.zY.BACKDROP,this.flip=d.zY.FLIP,this.size=d.zY.SIZE,this.zIndex=d.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=d.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=d.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=d.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=t=>{const e=t.composedPath();this.triggerElement&&e.includes(this.triggerElement)||e.includes(this)||c.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=t=>{this.visible&&"Escape"===t.code&&(t.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=t=>{const e=t.relatedTarget;!e||this.isElementInPopover(e)?e||setTimeout(()=>{const t=(0,r.dw)();this.isElementInPopover(t)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(t=!1)=>{this.cancelCloseDelay(),t&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,r.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=t=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(t)||this.togglePopoverVisible()},this.utils=new p.h(this),this.preventClickOutside=!0}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return y(this,void 0,void 0,function*(){e.firstUpdated.call(this,t),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,h.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const t=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return y(this,void 0,void 0,function*(){t.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),h.T.onDestroyedPopover(this),c.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const t=this.getRootNode();if(this.triggerElement=(0,r.qi)(`[id="${this.triggerID}"]`,t),!this.triggerElement){const e=null==t?void 0:t.host;if(e){const t=e.querySelector("[slot]");(null==t?void 0:t.id)===this.triggerID&&(this.triggerElement=t)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==t||t.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==t||t.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(t){const e=Object.create(null,{updated:{get:()=>super.updated}});return y(this,void 0,void 0,function*(){if(e.updated.call(this,t),t.has("visible")){const e=t.get("visible")||!1;yield this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}if(t.has("placement")&&this.setAttribute("placement",Object.values(d.ME).includes(this.placement)?this.placement:d.zY.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("trigger")){const t=this.trigger.split(" ").filter(t=>Object.values(d.tr).includes(t));this.setAttribute("trigger",t.length>0?this.trigger:d.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}t.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),t.has("color")&&this.setAttribute("color",Object.values(d.o$).includes(this.color)?this.color:d.zY.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.setupAccessibility(),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(t){return!!t&&(!!this.contains(t)||(0,r.QZ)("md-popover",t)===this)}isOpenUpdated(t,e){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:t=>super.preventScroll=t}});return y(this,void 0,void 0,function*(){var o,s,r,a;if(t!==e&&this.triggerElement)if(e)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(o=this.activateFocusTrap)||void 0===o||o.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),h.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),c.S.removeItem(this),this.utils.handleAppendTo(!1),this.backdropElement&&(null===(s=this.backdropElement)||void 0===s||s.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const t=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==t&&"alertdialog"!==t||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(a=this.setFocusOnDeepestNestedElement)||void 0===a||a.call(this,this.triggerElement)),this.previousActiveElement=null,h.T.onHidePopover(this)}})}isRectOverTrigger(t,e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return!1}isMouseOverTrigger(t){const{clientX:e,clientY:i}=t instanceof MouseEvent?t:{clientX:0,clientY:0};return this.isRectOverTrigger(e,i)}setFocusableElements(){var t;null===(t=super.setFocusableElements)||void 0===t||t.call(this);const e=this.triggerElement;this.appendTo&&this.activeFocusTrap&&e&&this.focusableElements&&(this.focusableElements.includes(e)||this.focusableElements.push(e))}handleCreatePopoverFirstUpdate(){return y(this,void 0,void 0,function*(){var t,e;this.visible&&this.interactive&&(null===(t=this.setFocusableElements)||void 0===t||t.call(this),yield this.updateComplete,null===(e=this.setInitialFocus)||void 0===e||e.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const t=[(0,a.shift)()];let e=this.offset;if(this.flip&&t.push((0,a.flip)()),this.size){const e=this.renderRoot.querySelector('[part="popover-content"]');t.push((0,a.size)({apply({availableHeight:t}){e&&Object.assign(e.style,{maxHeight:`${t}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;e=Math.sqrt(2*i**2)/2+this.offset,t.push((0,a.arrow)({element:this.arrowElement,padding:12}))}t.push((0,a.offset)(e)),this.cleanupAutoUpdate=(0,a.autoUpdate)(this.triggerElement,this,()=>y(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:o,placement:s}=yield(0,a.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),o.arrow&&this.arrowElement&&this.utils.updateArrowStyle(o.arrow,s),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(s)}),{animationFrame:this.animationFrame})}render(){return n.html`
2008
+ `}};h([(0,n.property)({type:String})],e.prototype,"size",void 0),e=h([(0,s.w)("md-loading")],e),t.ELEMENT=e}(o||(o={}))},70429:t=>{t.exports=e},71128:(t,e,i)=>{i.d(e,{Popover:()=>b,PopoverController:()=>v}),i(96798),i(61200);var o=i(31890),s=i(28373),r=i(66677),a=i(5784),n=i(87161),l=i(70429),d=i(68419),h=i(36365),c=i(3998),p=i(33759),u=i(86210),m=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a},y=function(t,e,i,o){return new(i||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())})};class v{show(t){}hide(){}toggle(){}isVisible(){return!1}}let b=class extends((0,s.d)(n.LitElement)){set controller(t){t?(t.show=(t=!1)=>this.showPopover(t),t.hide=()=>this.hidePopover(),t.toggle=()=>this.togglePopoverVisible(),t.isVisible=()=>this.visible,this._controller=t):this._controller=null}get controller(){return this._controller}constructor(){super(),this.id="",this.triggerID="",this.trigger=d.zY.TRIGGER,this.placement=d.zY.PLACEMENT,this.strategy=d.zY.STRATEGY,this.color=d.zY.COLOR,this.visible=d.zY.VISIBLE,this.offset=d.zY.OFFSET,this.focusTrap=d.zY.FOCUS_TRAP,this.preventScroll=d.zY.PREVENT_SCROLL,this.showArrow=d.zY.ARROW,this.closeButton=d.zY.CLOSE_BUTTON,this.interactive=d.zY.INTERACTIVE,this.delay=d.zY.DELAY,this.hideOnEscape=d.zY.HIDE_ON_ESCAPE,this.hideOnBlur=d.zY.HIDE_ON_BLUR,this.hideOnWindowBlur=d.zY.HIDE_ON_WINDOW_BLUR,this.hideOnOutsideClick=d.zY.HIDE_ON_CLICK_OUTSIDE,this.focusBackToTrigger=d.zY.FOCUS_BACK,this.backdrop=d.zY.BACKDROP,this.flip=d.zY.FLIP,this.size=d.zY.SIZE,this.zIndex=d.zY.Z_INDEX,this.appendTo="",this.closeButtonAriaLabel=null,this.role=d.zY.ROLE,this.ariaLabelledby=null,this.ariaDescribedby=null,this.disableAriaExpanded=d.zY.DISABLE_ARIA_EXPANDED,this.animationFrame=d.zY.ANIMATION_FRAME,this._controller=null,this.arrowElement=null,this.triggerElement=null,this.hoverTimer=null,this.isTriggerClicked=!1,this.openDelay=0,this.closeDelay=0,this.backdropElement=null,this.useLegacyFindFocusable=()=>!1,this.cleanupAutoUpdate=null,this.previousActiveElement=null,this.onOutsidePopoverClick=t=>{const e=t.composedPath();this.triggerElement&&e.includes(this.triggerElement)||e.includes(this)||c.S.shouldDeferToTopForOutsideClick(this)||this.hideThisPopover()},this.hideThisPopover=()=>{setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.onEscapeKeydown=t=>{this.visible&&"Escape"===t.code&&(t.preventDefault(),this.hidePopover())},this.onPopoverFocusOut=t=>{const e=t.relatedTarget;!e||this.isElementInPopover(e)?e||setTimeout(()=>{const t=(0,r.dw)();this.isElementInPopover(t)||this.hidePopover()},0):this.hidePopover()},this.handleWindowBlurEvent=()=>{this.visible&&this.hidePopover()},this.startCloseDelay=()=>{if(this.interactive){if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}else this.hidePopover()},this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)},this.showPopover=(t=!1)=>{this.cancelCloseDelay(),t&&this.openDelay>0?setTimeout(()=>{this.utils.handleAppendTo(!0),this.visible=!0},this.openDelay):(this.utils.handleAppendTo(!0),this.visible=!0)},this.hidePopover=()=>{c.S.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1,this.utils.handleAppendTo(!1)},this.closeDelay)},this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)},this.onMouseEnterTrigger=()=>{this.trigger.includes("mouseenter")&&(this.visible||(this.previousActiveElement=(0,r.dw)()),this.showPopover(!0))},this.onFocusInTrigger=()=>{this.trigger.includes("focusin")&&this.showPopover(!1)},this.onTriggerClick=t=>{this.trigger.includes("mouseenter")&&this.isMouseOverTrigger(t)||this.togglePopoverVisible()},this.utils=new p.h(this),this.preventClickOutside=!0}firstUpdated(t){const e=Object.create(null,{firstUpdated:{get:()=>super.firstUpdated}});return y(this,void 0,void 0,function*(){e.firstUpdated.call(this,t),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,h.T.onCreatedPopover(this),this.visible&&(this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate())})}disconnectedCallback(){const t=Object.create(null,{disconnectedCallback:{get:()=>super.disconnectedCallback}});return y(this,void 0,void 0,function*(){t.disconnectedCallback.call(this),this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this._controller=null,this.previousActiveElement=null,this.removeEventListeners(),h.T.onDestroyedPopover(this),c.S.remove(this)})}setupTriggerListener(){if(!this.triggerID)return;const t=this.getRootNode();if(this.triggerElement=(0,r.qi)(`[id="${this.triggerID}"]`,t),!this.triggerElement){const e=null==t?void 0:t.host;if(e){const t=e.querySelector("[slot]");(null==t?void 0:t.id)===this.triggerID&&(this.triggerElement=t)}}if(this.triggerElement){if("mouseenter"===this.trigger&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.onTriggerClick),this.trigger.includes("mouseenter")){const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),null==t||t.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.onFocusInTrigger),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){if(!this.triggerElement)return;const t=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.onTriggerClick),this.triggerElement.removeEventListener("mouseenter",this.onMouseEnterTrigger),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.onFocusInTrigger),this.triggerElement.removeEventListener("focusout",this.hidePopover),null==t||t.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}updated(t){const e=Object.create(null,{updated:{get:()=>super.updated}});return y(this,void 0,void 0,function*(){if(e.updated.call(this,t),t.has("visible")){const e=t.get("visible")||!1;yield this.isOpenUpdated(e,this.visible),this.utils.updateAriaExpandedAttribute()}if(t.has("placement")&&this.setAttribute("placement",Object.values(d.ME).includes(this.placement)?this.placement:d.zY.PLACEMENT),t.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),t.has("trigger")){const t=this.trigger.split(" ").filter(t=>Object.values(d.tr).includes(t));this.setAttribute("trigger",t.length>0?this.trigger:d.zY.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}t.has("triggerID")&&(this.removeEventListeners(),this.setupTriggerListener(),this.utils.setupAccessibility()),t.has("color")&&this.setAttribute("color",Object.values(d.o$).includes(this.color)?this.color:d.zY.COLOR),t.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),(t.has("interactive")||t.has("aria-label")||t.has("aria-labelledby"))&&this.utils.setupAccessibility(),t.has("disableAriaExpanded")&&this.utils.updateAriaExpandedAttribute(),t.has("interactive")&&this.utils.updateAriaHasPopupAttribute()})}isElementInPopover(t){return!!t&&(!!this.contains(t)||(0,r.QZ)("md-popover",t)===this)}isOpenUpdated(t,e){const i=Object.create(null,{preventScroll:{get:()=>super.preventScroll,set:t=>super.preventScroll=t}});return y(this,void 0,void 0,function*(){var o,s,r,a;if(t!==e&&this.triggerElement)if(e)c.S.peek()!==this&&c.S.push(this),i.preventScroll=this.preventScroll,this.focusTrap&&(null===(o=this.activateFocusTrap)||void 0===o||o.call(this)),this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.utils.handleAppendTo(!0),this.positionPopover(),yield this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.addEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="none")),this.hideOnWindowBlur&&window.addEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),h.T.onShowPopover(this);else{if(this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),c.S.removeItem(this),this.utils.handleAppendTo(!1),this.backdropElement&&(null===(s=this.backdropElement)||void 0===s||s.remove(),this.backdropElement=null),this.hideOnBlur&&(this.removeEventListener("focusout",this.onPopoverFocusOut),"click"===this.trigger&&(this.triggerElement.style.pointerEvents="")),this.hideOnWindowBlur&&window.removeEventListener("blur",this.handleWindowBlurEvent),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),null===(r=this.deactivateFocusTrap)||void 0===r||r.call(this),this.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive){const t=this.triggerElement.getAttribute("aria-haspopup");"dialog"!==t&&"alertdialog"!==t||this.triggerElement.removeAttribute("aria-haspopup")}this.focusBackToTrigger&&(this.previousActiveElement instanceof HTMLElement?this.previousActiveElement.focus():null===(a=this.setFocusOnDeepestNestedElement)||void 0===a||a.call(this,this.triggerElement)),this.previousActiveElement=null,h.T.onHidePopover(this)}})}isRectOverTrigger(t,e){if(this.triggerElement&&"undefined"!=typeof window&&"undefined"!=typeof document){const i=this.triggerElement.getBoundingClientRect();return t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return!1}isMouseOverTrigger(t){const{clientX:e,clientY:i}=t instanceof MouseEvent?t:{clientX:0,clientY:0};return this.isRectOverTrigger(e,i)}setFocusableElements(){var t;null===(t=super.setFocusableElements)||void 0===t||t.call(this);const e=this.triggerElement;this.appendTo&&this.activeFocusTrap&&e&&this.focusableElements&&(this.focusableElements.includes(e)||this.focusableElements.push(e))}handleCreatePopoverFirstUpdate(){return y(this,void 0,void 0,function*(){var t,e;this.visible&&this.interactive&&(null===(t=this.setFocusableElements)||void 0===t||t.call(this),yield this.updateComplete,null===(e=this.setInitialFocus)||void 0===e||e.call(this))})}positionPopover(){if(!this.triggerElement)return;this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null);const t=[(0,a.shift)()];let e=this.offset;if(this.flip&&t.push((0,a.flip)()),this.size){const e=this.renderRoot.querySelector('[part="popover-content"]');t.push((0,a.size)({apply({availableHeight:t}){e&&Object.assign(e.style,{maxHeight:`${t}px`,overflowY:"auto"})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){const i=this.arrowElement.offsetHeight;e=Math.sqrt(2*i**2)/2+this.offset,t.push((0,a.arrow)({element:this.arrowElement,padding:12}))}t.push((0,a.offset)(e)),this.cleanupAutoUpdate=(0,a.autoUpdate)(this.triggerElement,this,()=>y(this,void 0,void 0,function*(){if(!this.triggerElement)return;const{x:e,y:i,middlewareData:o,placement:s}=yield(0,a.computePosition)(this.triggerElement,this,{placement:this.placement,middleware:t,strategy:this.strategy});this.utils.updatePopoverStyle(e,i),o.arrow&&this.arrowElement&&this.utils.updateArrowStyle(o.arrow,s),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(s)}),{animationFrame:this.animationFrame})}render(){return n.html`
2009
2009
  <div class="popover-hover-bridge"></div>
2010
2010
  ${this.closeButton?n.html` <md-button
2011
2011
  class="popover-close"
@@ -2021,7 +2021,7 @@
2021
2021
  <div part="popover-content">
2022
2022
  <slot></slot>
2023
2023
  </div>
2024
- `}static get styles(){return[u.A]}};m([(0,l.property)({type:String,reflect:!0})],v.prototype,"id",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"triggerID",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"trigger",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"placement",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"strategy",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"color",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],v.prototype,"visible",void 0),m([(0,l.property)({type:Number,reflect:!0})],v.prototype,"offset",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],v.prototype,"focusTrap",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],v.prototype,"preventScroll",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],v.prototype,"showArrow",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"close-button"})],v.prototype,"closeButton",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],v.prototype,"interactive",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"delay",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],v.prototype,"hideOnEscape",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],v.prototype,"hideOnBlur",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],v.prototype,"hideOnWindowBlur",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],v.prototype,"hideOnOutsideClick",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],v.prototype,"focusBackToTrigger",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],v.prototype,"backdrop",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],v.prototype,"flip",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],v.prototype,"size",void 0),m([(0,l.property)({type:Number,reflect:!0,attribute:"z-index"})],v.prototype,"zIndex",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"append-to"})],v.prototype,"appendTo",void 0),m([(0,l.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],v.prototype,"closeButtonAriaLabel",void 0),m([(0,l.property)({type:String,reflect:!0})],v.prototype,"role",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],v.prototype,"ariaLabelledby",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"aria-describedby"})],v.prototype,"ariaDescribedby",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],v.prototype,"disableAriaExpanded",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],v.prototype,"animationFrame",void 0),m([(0,l.property)({type:Object,attribute:!1})],v.prototype,"controller",null),v=m([(0,o.w)("md-popover")],v)},73093:(t,e,i)=>{i.d(e,{FloatingModal:()=>o}),i(96798),i(61200);var o,s=i(3001),r=i(31890),a=i(4313),n=(i(58088),i(57346),i(69e3),i(20727)),l=i.n(n),d=(i(3288),i(87161)),h=i(70429),c=i(20291),p=(i(58871),i(34659)),u=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,s.yC)((0,s.TS)(d.LitElement))){constructor(){super(...arguments),this.heading="",this.label="",this.show=!1,this.aspectRatio=!1,this.centered=!1,this.fixed=!1,this.full=!1,this.closeAriaLabel="Close Modal",this.resizeAriaLabel="Resize Modal",this.maximizeScreenLabel="Maximize Modal",this.minimizeAriaLabel="Minimize Modal",this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.applyInitialPosition=!0,this.resizeMoveListener=t=>{const{target:e}=t;let i=parseFloat(e.getAttribute("data-x"))||0,o=parseFloat(e.getAttribute("data-y"))||0;e.style.setProperty("width",`${t.rect.width}px`,"important"),e.style.setProperty("height",`${t.rect.height}px`,"important");const{initialX:s,initialY:r}=this.getInitialPosition();i+=t.deltaRect.left+s,o+=t.deltaRect.top+r,this.setTargetPosition(e,i,o),this.applyInitialPosition=!1},this.resizeEndListener=()=>{this.setContainerRect()},this.getInitialPosition=()=>{var t,e;return this.applyInitialPosition&&this.position?{initialX:Number(null===(t=this.position)||void 0===t?void 0:t.x),initialY:Number(null===(e=this.position)||void 0===e?void 0:e.y)}:{initialX:0,initialY:0}},this.dragMoveListener=t=>{const{target:e}=t,{x:i,y:o}=this.getTransformValues(t);this.setTargetPosition(e,i,o),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()}}static get styles(){return[a.A,p.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance()):(this.cleanContainerStyles(),this.destroyInteractInstance())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition()}isNewPositionNotSame(){var t,e,i,o;if(this.container)return Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-x"))!==(null===(e=this.position)||void 0===e?void 0:e.x)||Number(null===(i=this.container)||void 0===i?void 0:i.getAttribute("data-y"))!==(null===(o=this.position)||void 0===o?void 0:o.y)}setInitialTargetPosition(){var t,e;this.container&&this.isNewPositionNotSame()&&this.setTargetPosition(this.container,Number(null===(t=this.position)||void 0===t?void 0:t.x),Number(null===(e=this.position)||void 0===e?void 0:e.y))}cleanContainerStyles(){this.containerTransform=""}getContainerTransform(){const t=this.container.getAttribute("data-x"),e=this.container.getAttribute("data-y");return t&&e?(this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:t,y:e}}})),`translate(${t}px, ${e}px)`):this.container.style.transform}setContainerRect(){requestAnimationFrame(()=>{return t=this,e=void 0,o=function*(){yield this.updateComplete,this.containerRect=this.container.getBoundingClientRect(),this.dispatchEvent(new CustomEvent("floating-modal-resize",{composed:!0,bubbles:!0,detail:{size:this.containerRect}})),this.containerTransform=this.getContainerTransform()},new((i=void 0)||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())});var t,e,i,o})}setInteractInstance(){requestAnimationFrame(()=>{this.container&&(l()(this.container).draggable({autoScroll:!0,allowFrom:this.header,ignoreFrom:this.body,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&l()(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.aspectRatio?[l().modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[l().modifiers.restrictSize({max:"parent"})]})]:void 0}))})}handleClose(t){this.show=!1,this.full=!1,this.dispatchEvent(new CustomEvent("floating-modal-close",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleMinimize(){this.minimizable&&(this.dragOccured||(this.minimize=!this.minimize,this.dispatchEvent(new CustomEvent("floating-modal-minimize",{composed:!0,bubbles:!0,detail:{minimize:this.minimize}}))),this.dragOccured=!1)}handleToggleExpandCollapse(){this.full=!this.full}getTransformValues(t){const{target:e,dx:i,dy:o}=t,{initialX:s,initialY:r}=this.getInitialPosition();return{x:(parseFloat(e.getAttribute("data-x"))||0)+i+s,y:(parseFloat(e.getAttribute("data-y"))||0)+o+r}}setTargetPosition(t,e,i){t.style.transform=`translate(${e}px, ${i}px)`,t.setAttribute("data-x",`${e}`),t.setAttribute("data-y",`${i}`)}destroyInteractInstance(){this.container&&l().isSet(this.container)&&l()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return d.html`
2024
+ `}static get styles(){return[u.A]}};m([(0,l.property)({type:String,reflect:!0})],b.prototype,"id",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"triggerID",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"trigger",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"placement",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"strategy",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"color",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],b.prototype,"visible",void 0),m([(0,l.property)({type:Number,reflect:!0})],b.prototype,"offset",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-trap"})],b.prototype,"focusTrap",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],b.prototype,"preventScroll",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"show-arrow"})],b.prototype,"showArrow",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"close-button"})],b.prototype,"closeButton",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],b.prototype,"interactive",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"delay",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],b.prototype,"hideOnEscape",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],b.prototype,"hideOnBlur",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-window-blur"})],b.prototype,"hideOnWindowBlur",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],b.prototype,"hideOnOutsideClick",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],b.prototype,"focusBackToTrigger",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],b.prototype,"backdrop",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],b.prototype,"flip",void 0),m([(0,l.property)({type:Boolean,reflect:!0})],b.prototype,"size",void 0),m([(0,l.property)({type:Number,reflect:!0,attribute:"z-index"})],b.prototype,"zIndex",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"append-to"})],b.prototype,"appendTo",void 0),m([(0,l.property)({type:String,attribute:"close-button-aria-label",reflect:!0})],b.prototype,"closeButtonAriaLabel",void 0),m([(0,l.property)({type:String,reflect:!0})],b.prototype,"role",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"aria-labelledby"})],b.prototype,"ariaLabelledby",void 0),m([(0,l.property)({type:String,reflect:!0,attribute:"aria-describedby"})],b.prototype,"ariaDescribedby",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],b.prototype,"disableAriaExpanded",void 0),m([(0,l.property)({type:Boolean,reflect:!0,attribute:"animation-frame"})],b.prototype,"animationFrame",void 0),m([(0,l.property)({type:Object,attribute:!1})],b.prototype,"controller",null),b=m([(0,o.w)("md-popover")],b)},73093:(t,e,i)=>{i.d(e,{FloatingModal:()=>o}),i(96798),i(61200);var o,s=i(3001),r=i(31890),a=i(4313),n=(i(58088),i(57346),i(69e3),i(20727)),l=i.n(n),d=(i(3288),i(87161)),h=i(70429),c=i(20291),p=(i(58871),i(34659)),u=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,s.yC)((0,s.TS)(d.LitElement))){constructor(){super(...arguments),this.heading="",this.label="",this.show=!1,this.aspectRatio=!1,this.centered=!1,this.fixed=!1,this.full=!1,this.closeAriaLabel="Close Modal",this.resizeAriaLabel="Resize Modal",this.maximizeScreenLabel="Maximize Modal",this.minimizeAriaLabel="Minimize Modal",this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.applyInitialPosition=!0,this.resizeMoveListener=t=>{const{target:e}=t;let i=parseFloat(e.getAttribute("data-x"))||0,o=parseFloat(e.getAttribute("data-y"))||0;e.style.setProperty("width",`${t.rect.width}px`,"important"),e.style.setProperty("height",`${t.rect.height}px`,"important");const{initialX:s,initialY:r}=this.getInitialPosition();i+=t.deltaRect.left+s,o+=t.deltaRect.top+r,this.setTargetPosition(e,i,o),this.applyInitialPosition=!1},this.resizeEndListener=()=>{this.setContainerRect()},this.getInitialPosition=()=>{var t,e;return this.applyInitialPosition&&this.position?{initialX:Number(null===(t=this.position)||void 0===t?void 0:t.x),initialY:Number(null===(e=this.position)||void 0===e?void 0:e.y)}:{initialX:0,initialY:0}},this.dragMoveListener=t=>{const{target:e}=t,{x:i,y:o}=this.getTransformValues(t);this.setTargetPosition(e,i,o),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()}}static get styles(){return[a.A,p.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance()):(this.cleanContainerStyles(),this.destroyInteractInstance())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition()}isNewPositionNotSame(){var t,e,i,o;if(this.container)return Number(null===(t=this.container)||void 0===t?void 0:t.getAttribute("data-x"))!==(null===(e=this.position)||void 0===e?void 0:e.x)||Number(null===(i=this.container)||void 0===i?void 0:i.getAttribute("data-y"))!==(null===(o=this.position)||void 0===o?void 0:o.y)}setInitialTargetPosition(){var t,e;this.container&&this.isNewPositionNotSame()&&this.setTargetPosition(this.container,Number(null===(t=this.position)||void 0===t?void 0:t.x),Number(null===(e=this.position)||void 0===e?void 0:e.y))}cleanContainerStyles(){this.containerTransform=""}getContainerTransform(){const t=this.container.getAttribute("data-x"),e=this.container.getAttribute("data-y");return t&&e?(this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:t,y:e}}})),`translate(${t}px, ${e}px)`):this.container.style.transform}setContainerRect(){requestAnimationFrame(()=>{return t=this,e=void 0,o=function*(){yield this.updateComplete,this.containerRect=this.container.getBoundingClientRect(),this.dispatchEvent(new CustomEvent("floating-modal-resize",{composed:!0,bubbles:!0,detail:{size:this.containerRect}})),this.containerTransform=this.getContainerTransform()},new((i=void 0)||(i=Promise))(function(s,r){function a(t){try{l(o.next(t))}catch(t){r(t)}}function n(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(a,n)}l((o=o.apply(t,e||[])).next())});var t,e,i,o})}setInteractInstance(){requestAnimationFrame(()=>{this.container&&(l()(this.container).draggable({autoScroll:!0,allowFrom:this.header,ignoreFrom:this.body,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&l()(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.aspectRatio?[l().modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[l().modifiers.restrictSize({max:"parent"})]})]:void 0}))})}handleClose(t){this.show=!1,this.full=!1,this.dispatchEvent(new CustomEvent("floating-modal-close",{composed:!0,bubbles:!0,detail:{srcEvent:t}}))}handleMinimize(){this.minimizable&&(this.dragOccured||(this.minimize=!this.minimize,this.dispatchEvent(new CustomEvent("floating-modal-minimize",{composed:!0,bubbles:!0,detail:{minimize:this.minimize}}))),this.dragOccured=!1)}handleToggleExpandCollapse(){this.full=!this.full}getTransformValues(t){const{target:e,dx:i,dy:o}=t,{initialX:s,initialY:r}=this.getInitialPosition();return{x:(parseFloat(e.getAttribute("data-x"))||0)+i+s,y:(parseFloat(e.getAttribute("data-y"))||0)+o+r}}setTargetPosition(t,e,i){t.style.transform=`translate(${e}px, ${i}px)`,t.setAttribute("data-x",`${e}`),t.setAttribute("data-y",`${i}`)}destroyInteractInstance(){this.container&&l().isSet(this.container)&&l()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return d.html`
2025
2025
  ${this.show?d.html`
2026
2026
  <div
2027
2027
  class="md-floating ${this.fixed?"fixed":""} ${this.minimize?"hide":""}"
@@ -2215,7 +2215,7 @@
2215
2215
  </div>
2216
2216
  ${this.primaryButton||this.secondaryButton||this.link?this.renderNewAlertDefaultFooter():this.renderSlottedFooter()}
2217
2217
  </div>
2218
- `}get alertRender(){return this.newMomentum?this.newRender():this.legacyRender()}render(){return a.html` ${this.show?this.alertRender:a.nothing} `}};h([(0,n.property)({type:Boolean})],e.prototype,"closable",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"internalClose",void 0),h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"btnlabel",void 0),h([(0,n.property)({type:String})],e.prototype,"type",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"inline",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"newMomentum",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButtonVariant",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButtonColor",void 0),h([(0,n.property)()],e.prototype,"primaryButtonClickFunction",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)()],e.prototype,"secondaryButtonClickFunction",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"link",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"showMore",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)('slot[name="alert-footer"]')],e.prototype,"alertFooterSlot",void 0),h([(0,n.state)()],e.prototype,"hasFooterSlotContent",void 0),e=h([(0,s.w)("md-alert")],e),t.ELEMENT=e}(o||(o={}))},77935:(t,e,i)=>{i.d(e,{TableAdvanced:()=>g}),i(96798),i(61200),i(11323);var o=i(31890),s=i(28373),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(20291),h=i(16968),c=i(28187),p=i.n(c),u=i(32932),m=i(56076),y=i(21796),b=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const v=document.createElement("img");var g;v.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(t){let e=class extends((0,s.d)(a.LitElement)){constructor(){super(...arguments),this.isRowFocusable="true",this.error="",this.COLS=[],this.ROWS=[],this.updCols=()=>this.requestUpdate("COLS"),this.updRows=()=>this.requestUpdate("ROWS"),this.dragRow=-1,this.dropRow=-1,this.drops=[],this.dragRowElem=null,this.dragCol=-1,this.dropCol=-1,this.isResizing=!1,this.isSelectable=!1,this.selected={},this.expandedRowIdx={},this.dragover=t=>t.preventDefault(),this.eX=0,this.onResize=(t,e)=>{var i;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const o=t.target;null===(i=t.dataTransfer)||void 0===i||i.setDragImage(v,0,0);const s=this.COLS.map(t=>this.shadowRoot.querySelector(`th.col-index-${t.index}`));this.COLS.forEach((t,e)=>t.width=s[e].offsetWidth+"px"),this.updCols();const r=t.x;this.eX=t.x;let a=-1,n=-1,l=-1;const d=this.COLS[e.index-1],h=s[e.index],c=s[e.index-1],p=h.offsetWidth,u=c.offsetWidth,m=()=>{const t=this.eX;if(a!=t&&0!=t){a=t;const i=a-r;n=p-i,l=u+i,e.width=n+"px",d.width=l+"px",this.updCols()}},y=t=>this.eX=t.x,b=()=>{this.isResizing=!1,o.removeEventListener("drag",m),o.removeEventListener("dragend",b),document.removeEventListener("dragover",y)};o.addEventListener("drag",m),o.addEventListener("dragend",b),document.addEventListener("dragover",y)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}update(t){super.update(t),t.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(t){console.error("[INVALID_JSON_FORMAT] Please recheck the config json")}else this.tableData=Object.assign({},this.data)}updateTableConfig(){if("string"==typeof this.config)try{this.tableConfig=JSON.parse(this.config)}catch(t){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var t;let e=0;const i=(t,i)=>{var o,s,r,a;const n=t.filters||(null===(s=null===(o=this.tableConfig.default)||void 0===o?void 0:o.col)||void 0===s?void 0:s.filters),l=n?"forString"==n?y.d.optionsString:"forNumber"==n?y.d.optionsNumber:n.length?n:null:null;this.COLS.push({options:Object.assign({},t),index:e++,group:i,sort:"default",sorter:t.sorter||(null===(a=null===(r=this.tableConfig.default)||void 0===r?void 0:r.col)||void 0===a?void 0:a.sorter),isCollapsable:this.tableConfig.cols.collapse==t.id,filter:l?{list:l,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(t=>{"children"in t?t.children.forEach(e=>i(e,{name:t.groupName,length:t.children.length})):i(t)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)}populateData(){const t=this.COLS.length;if("csv"in this.tableData){const t=p().parse(this.tableData.csv,{skipEmptyLines:!0,transform:t=>t.trim()});if(t.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(t.errors,null,2));{const e=t.data;this.ROWS=e.map(t=>t.map(t=>({text:t})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(t=>t.map(t=>({text:t})));else{for(;this.tableData.list.length>t;)this.ROWS.push(this.tableData.list.splice(0,t).map(t=>({text:t})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(t=>({text:t})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const t=this.COLS.length;this.ROWS.reduce((t,e)=>t+e.length,0)%t==0?this.ROWS.forEach((e,i)=>{const o=e.length;o!=t&&(this.error=`DATA ERROR: Total number of cols (=${t}) and data[${i}] length (=${o}) mismatch`)}):this.error=this.error="DATA ERROR: Data length mismatch. You must provide (numberOfRows * numberOfColumns) amount of data values."}populateTemplate(){const t=this.tableConfig.cellTemplates,e=Object.keys(t||{});t&&e.length&&this.ROWS.forEach((e,i)=>{e.forEach((e,o)=>{for(const s in t){const r=e.text.indexOf(s);if(-1!=r){const a=t[s],n=this.querySelector(`#${a.templateName}`);if(null==n){console.warn(`cellTemplates["${s}"]: Missing '${a.templateName}' template.`);continue}let l=e.text.replace(s,"");a.contentCb&&(l=a.contentCb({col:o,row:i,content:l,insertIndex:r})),this.ROWS[i][o]={text:l,template:{template:n,templateCb:a.templateCb,insertIndex:"replace"==a.contentUse?-1:r}};break}}})})}setDefaultFilterAndSort(){var t,e;const i=null===(t=this.tableConfig.default)||void 0===t?void 0:t.sort;if(i){const t=this.COLS.find(t=>t.options.id==i.colId);t?this.sort(t,i.order):console.warn(`Cant find ${i.colId} col - for sorting`)}const o=null===(e=this.tableConfig.default)||void 0===e?void 0:e.filter;if(o){const t=this.COLS.find(t=>t.options.id==o.colId);t?t.filter?(t.filter.selectedIndex=o.selectedIndex,t.filter.input=o.input,this.updCols(),this.filter(t)):console.warn(`Cant find filters on ${o.colId} col`):console.warn(`Cant find ${o.colId} col - for filtering`)}}populateTable(){this.populateColumns(),this.populateData(),this.validateData(),this.setDefaultFilterAndSort(),this.populateTemplate()}updateDataInTable(){this.populateData(),this.validateData(),this.populateTemplate()}onDropRow(){this.dragRow!=this.dropRow&&this.drops.push([this.dragRow,this.dropRow]),this.dragRow=-1,this.dropRow=-1,this.dragRowElem&&(this.dragRowElem.setAttribute("draggable","false"),this.dragRowElem=null)}onDropCol(){if(this.dragCol!=this.dropCol){const t=this.COLS[this.dragCol],e=this.COLS[this.dropCol],i=t.group,o=e.group,s=t.index,r=e.index;t.group=o,e.group=i,t.index=r,e.index=s,this.COLS[this.dragCol]=e,this.COLS[this.dropCol]=t,this.ROWS.forEach(t=>{const e=t[this.dragCol],i=t[this.dropCol];t[this.dragCol]=i,t[this.dropCol]=e}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(t,e){t.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(i=>{i.options.id==t.options.id?i.sort=e||("default"==i.sort?"ascending":"ascending"==i.sort?"descending":"default"):i.sort="default"}),this.updCols(),this.requestUpdate(),this["md-table-advanced-change"].emit({type:"sort",order:t.sort}))}filter(t){if(!t.filter)return;this.clearSelection(),this.drops=[];const e=t.filter.input.trim(),i=t.filter.list[t.filter.selectedIndex];t.filter.active=!!e,this.requestUpdate(),e?this["md-table-advanced-change"].emit({type:"filter-on",filter:i,input:e}):this["md-table-advanced-change"].emit({type:"filter-off",filter:t.filter.list[t.filter.selectedIndex]})}selectRow(t){var e;const i=t.row.idx,o=Object.prototype.hasOwnProperty.call(this.selected,i);"multiple"==(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)?(t.metaKey?o?delete this.selected[i]:this.selected[i]=!0:t.shiftKey||(this.selected={[i]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(t=>+t)})):o?this.clearSelection():(this.selected={[i]:!0},this["md-table-advanced-change"].emit({type:"select",index:i})),this.requestUpdate("selected")}clearSelection(){this.selected={},this.requestUpdate("selected")}collapseToggle(t,e){t.stopPropagation(),this.expandedRowIdx[e]?(delete this.expandedRowIdx[e],this["md-table-advanced-change"].emit({type:"collapse",row:e})):(this.expandedRowIdx[e]=!0,this["md-table-advanced-change"].emit({type:"expand",row:e})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return a.html` <div>${this.error}</div> `;const{head:t}=this.tableConfig,e=(0,l.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return a.html`
2218
+ `}get alertRender(){return this.newMomentum?this.newRender():this.legacyRender()}render(){return a.html` ${this.show?this.alertRender:a.nothing} `}};h([(0,n.property)({type:Boolean})],e.prototype,"closable",void 0),h([(0,n.property)({type:String})],e.prototype,"message",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"show",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"internalClose",void 0),h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"btnlabel",void 0),h([(0,n.property)({type:String})],e.prototype,"type",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"inline",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"newMomentum",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButton",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButtonVariant",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryButtonColor",void 0),h([(0,n.property)()],e.prototype,"primaryButtonClickFunction",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryButton",void 0),h([(0,n.property)()],e.prototype,"secondaryButtonClickFunction",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"link",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"showMore",void 0),h([(0,n.property)({type:String})],e.prototype,"href",void 0),h([(0,n.query)('slot[name="alert-footer"]')],e.prototype,"alertFooterSlot",void 0),h([(0,n.state)()],e.prototype,"hasFooterSlotContent",void 0),e=h([(0,s.w)("md-alert")],e),t.ELEMENT=e}(o||(o={}))},77935:(t,e,i)=>{i.d(e,{TableAdvanced:()=>g}),i(96798),i(61200),i(11323);var o=i(31890),s=i(28373),r=i(4313),a=i(87161),n=i(70429),l=i(85125),d=i(20291),h=i(16968),c=i(28187),p=i.n(c),u=i(32932),m=i(56076),y=i(21796),v=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};const b=document.createElement("img");var g;b.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(t){let e=class extends((0,s.d)(a.LitElement)){constructor(){super(...arguments),this.isRowFocusable="true",this.error="",this.COLS=[],this.ROWS=[],this.updCols=()=>this.requestUpdate("COLS"),this.updRows=()=>this.requestUpdate("ROWS"),this.dragRow=-1,this.dropRow=-1,this.drops=[],this.dragRowElem=null,this.dragCol=-1,this.dropCol=-1,this.isResizing=!1,this.isSelectable=!1,this.selected={},this.expandedRowIdx={},this.dragover=t=>t.preventDefault(),this.eX=0,this.onResize=(t,e)=>{var i;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const o=t.target;null===(i=t.dataTransfer)||void 0===i||i.setDragImage(b,0,0);const s=this.COLS.map(t=>this.shadowRoot.querySelector(`th.col-index-${t.index}`));this.COLS.forEach((t,e)=>t.width=s[e].offsetWidth+"px"),this.updCols();const r=t.x;this.eX=t.x;let a=-1,n=-1,l=-1;const d=this.COLS[e.index-1],h=s[e.index],c=s[e.index-1],p=h.offsetWidth,u=c.offsetWidth,m=()=>{const t=this.eX;if(a!=t&&0!=t){a=t;const i=a-r;n=p-i,l=u+i,e.width=n+"px",d.width=l+"px",this.updCols()}},y=t=>this.eX=t.x,v=()=>{this.isResizing=!1,o.removeEventListener("drag",m),o.removeEventListener("dragend",v),document.removeEventListener("dragover",y)};o.addEventListener("drag",m),o.addEventListener("dragend",v),document.addEventListener("dragover",y)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}update(t){super.update(t),t.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(t){console.error("[INVALID_JSON_FORMAT] Please recheck the config json")}else this.tableData=Object.assign({},this.data)}updateTableConfig(){if("string"==typeof this.config)try{this.tableConfig=JSON.parse(this.config)}catch(t){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var t;let e=0;const i=(t,i)=>{var o,s,r,a;const n=t.filters||(null===(s=null===(o=this.tableConfig.default)||void 0===o?void 0:o.col)||void 0===s?void 0:s.filters),l=n?"forString"==n?y.d.optionsString:"forNumber"==n?y.d.optionsNumber:n.length?n:null:null;this.COLS.push({options:Object.assign({},t),index:e++,group:i,sort:"default",sorter:t.sorter||(null===(a=null===(r=this.tableConfig.default)||void 0===r?void 0:r.col)||void 0===a?void 0:a.sorter),isCollapsable:this.tableConfig.cols.collapse==t.id,filter:l?{list:l,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(t=>{"children"in t?t.children.forEach(e=>i(e,{name:t.groupName,length:t.children.length})):i(t)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)}populateData(){const t=this.COLS.length;if("csv"in this.tableData){const t=p().parse(this.tableData.csv,{skipEmptyLines:!0,transform:t=>t.trim()});if(t.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(t.errors,null,2));{const e=t.data;this.ROWS=e.map(t=>t.map(t=>({text:t})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(t=>t.map(t=>({text:t})));else{for(;this.tableData.list.length>t;)this.ROWS.push(this.tableData.list.splice(0,t).map(t=>({text:t})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(t=>({text:t})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const t=this.COLS.length;this.ROWS.reduce((t,e)=>t+e.length,0)%t==0?this.ROWS.forEach((e,i)=>{const o=e.length;o!=t&&(this.error=`DATA ERROR: Total number of cols (=${t}) and data[${i}] length (=${o}) mismatch`)}):this.error=this.error="DATA ERROR: Data length mismatch. You must provide (numberOfRows * numberOfColumns) amount of data values."}populateTemplate(){const t=this.tableConfig.cellTemplates,e=Object.keys(t||{});t&&e.length&&this.ROWS.forEach((e,i)=>{e.forEach((e,o)=>{for(const s in t){const r=e.text.indexOf(s);if(-1!=r){const a=t[s],n=this.querySelector(`#${a.templateName}`);if(null==n){console.warn(`cellTemplates["${s}"]: Missing '${a.templateName}' template.`);continue}let l=e.text.replace(s,"");a.contentCb&&(l=a.contentCb({col:o,row:i,content:l,insertIndex:r})),this.ROWS[i][o]={text:l,template:{template:n,templateCb:a.templateCb,insertIndex:"replace"==a.contentUse?-1:r}};break}}})})}setDefaultFilterAndSort(){var t,e;const i=null===(t=this.tableConfig.default)||void 0===t?void 0:t.sort;if(i){const t=this.COLS.find(t=>t.options.id==i.colId);t?this.sort(t,i.order):console.warn(`Cant find ${i.colId} col - for sorting`)}const o=null===(e=this.tableConfig.default)||void 0===e?void 0:e.filter;if(o){const t=this.COLS.find(t=>t.options.id==o.colId);t?t.filter?(t.filter.selectedIndex=o.selectedIndex,t.filter.input=o.input,this.updCols(),this.filter(t)):console.warn(`Cant find filters on ${o.colId} col`):console.warn(`Cant find ${o.colId} col - for filtering`)}}populateTable(){this.populateColumns(),this.populateData(),this.validateData(),this.setDefaultFilterAndSort(),this.populateTemplate()}updateDataInTable(){this.populateData(),this.validateData(),this.populateTemplate()}onDropRow(){this.dragRow!=this.dropRow&&this.drops.push([this.dragRow,this.dropRow]),this.dragRow=-1,this.dropRow=-1,this.dragRowElem&&(this.dragRowElem.setAttribute("draggable","false"),this.dragRowElem=null)}onDropCol(){if(this.dragCol!=this.dropCol){const t=this.COLS[this.dragCol],e=this.COLS[this.dropCol],i=t.group,o=e.group,s=t.index,r=e.index;t.group=o,e.group=i,t.index=r,e.index=s,this.COLS[this.dragCol]=e,this.COLS[this.dropCol]=t,this.ROWS.forEach(t=>{const e=t[this.dragCol],i=t[this.dropCol];t[this.dragCol]=i,t[this.dropCol]=e}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(t,e){t.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(i=>{i.options.id==t.options.id?i.sort=e||("default"==i.sort?"ascending":"ascending"==i.sort?"descending":"default"):i.sort="default"}),this.updCols(),this.requestUpdate(),this["md-table-advanced-change"].emit({type:"sort",order:t.sort}))}filter(t){if(!t.filter)return;this.clearSelection(),this.drops=[];const e=t.filter.input.trim(),i=t.filter.list[t.filter.selectedIndex];t.filter.active=!!e,this.requestUpdate(),e?this["md-table-advanced-change"].emit({type:"filter-on",filter:i,input:e}):this["md-table-advanced-change"].emit({type:"filter-off",filter:t.filter.list[t.filter.selectedIndex]})}selectRow(t){var e;const i=t.row.idx,o=Object.prototype.hasOwnProperty.call(this.selected,i);"multiple"==(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)?(t.metaKey?o?delete this.selected[i]:this.selected[i]=!0:t.shiftKey||(this.selected={[i]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(t=>+t)})):o?this.clearSelection():(this.selected={[i]:!0},this["md-table-advanced-change"].emit({type:"select",index:i})),this.requestUpdate("selected")}clearSelection(){this.selected={},this.requestUpdate("selected")}collapseToggle(t,e){t.stopPropagation(),this.expandedRowIdx[e]?(delete this.expandedRowIdx[e],this["md-table-advanced-change"].emit({type:"collapse",row:e})):(this.expandedRowIdx[e]=!0,this["md-table-advanced-change"].emit({type:"expand",row:e})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return a.html` <div>${this.error}</div> `;const{head:t}=this.tableConfig,e=(0,l.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return a.html`
2219
2219
  <div class="md-table-advanced">
2220
2220
  <slot></slot>
2221
2221
  <table class=${e} summary=${(0,d.ifDefined)(null==t?void 0:t.summary)}>
@@ -2380,7 +2380,7 @@
2380
2380
  </div>
2381
2381
  `;return r.options.isHeader?a.html` <th part="cell-ishead" scope="row" title="${i.text}">${u}</th> `:a.html` <td part=${0===o?"first-cell":"cell"} title="${i.text}">${u}</td> `})}
2382
2382
  </tr>
2383
- `}static get styles(){return[r.A,u.A]}};b([(0,n.property)({attribute:"config"})],e.prototype,"config",void 0),b([(0,n.property)({attribute:"data"})],e.prototype,"data",void 0),b([(0,n.property)({type:String})],e.prototype,"isRowFocusable",void 0),b([(0,m.Wj)()],e.prototype,"md-table-advanced-change",void 0),b([(0,n.state)()],e.prototype,"tableConfig",void 0),b([(0,n.state)()],e.prototype,"tableData",void 0),b([(0,n.state)()],e.prototype,"error",void 0),b([(0,n.state)()],e.prototype,"COLS",void 0),b([(0,n.state)()],e.prototype,"ROWS",void 0),b([(0,n.state)()],e.prototype,"dragRow",void 0),b([(0,n.state)()],e.prototype,"dropRow",void 0),b([(0,n.state)()],e.prototype,"drops",void 0),b([(0,n.state)()],e.prototype,"dragCol",void 0),b([(0,n.state)()],e.prototype,"dropCol",void 0),b([(0,n.queryAll)("tr[tabindex]")],e.prototype,"tableRaws",void 0),b([(0,m.sg)(500)],e.prototype,"filter",null),e=b([(0,o.w)("md-table-advanced")],e),t.ELEMENT=e}(g||(g={}))},80072:(t,e,i)=>{i.d(e,{Draggable:()=>o});var o,s=i(3001),r=i(66677),a=i(4313),n=i(87161),l=i(70429),d=i(41891),h=i.n(d),c=i(43852),p=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,s.TS)(n.LitElement)){constructor(){super(...arguments),this.delay=0,this.animation=0,this.handle="",this.filter="",this.easing="",this.direction="vertical",this.group=null,this.draggableItems="md-draggable-item",this.ghostClass="",this.chosenClass="",this.dragClass="",this.fallbackClass="",this.swapThreshold=1,this.touchStartThreshold=0,this.forceFallback=!1,this.sort=!1,this.disabled=!1,this.editable=!1,this.sortableInstance=null,this.handleOnChange=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-change",t)},this.handleOnClone=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-clone",t)},this.handleOnUnchoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-unchoose",t)},this.handleOnRemove=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-remove",t)},this.handleOnAdd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-add",t)},this.handleOnChoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-choose",t)},this.handleOnEnd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-end",t)},this.handleOnMove=(0,r.sg)(t=>{t.stopPropagation(),this.dispatchDragEvent("drag-move",t)},100),this.handleOnStart=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-start",t)}}static get styles(){return[a.A,c.A]}get slotElement(){return this.draggableSlot}generateOptions(){return Object.assign(Object.assign({},this.group&&{group:this.group}),{disabled:this.disabled,animation:this.animation,sort:this.sort,delay:this.delay,handle:this.handle,easing:this.easing,filter:this.filter,swapThreshold:this.swapThreshold,touchStartThreshold:this.touchStartThreshold,draggable:this.draggableItems,direction:this.direction,ghostClass:this.ghostClass,chosenClass:this.chosenClass,dragClass:this.dragClass,fallbackClass:this.fallbackClass,forceFallback:this.forceFallback,onStart:this.handleOnStart,onMove:this.handleOnMove,onEnd:this.handleOnEnd,onChoose:this.handleOnChoose,onAdd:this.handleOnAdd,onRemove:this.handleOnRemove,onUnchoose:this.handleOnUnchoose,onClone:this.handleOnClone,onChange:this.handleOnChange})}initializeSortable(){this.sortableInstance||(this.sortableInstance=h().create(this,this.generateOptions()))}dispatchDragEvent(t,e){this.dispatchEvent(new CustomEvent(t,{composed:!0,bubbles:!0,detail:{srcEvent:e}}))}cleanupSortable(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)}connectedCallback(){super.connectedCallback(),this.initializeSortable()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupSortable()}setSortableOption(t,e){this.sortableInstance&&void 0!==this.sortableInstance.option(t)&&this.sortableInstance.option(t,e)}updateSortableInstance(t){for(const e of t.keys()){const t=this[e];this.setSortableOption(e,t)}}updated(t){super.updated(t),this.updateSortableInstance(t)}slottedChanged(){this.initializeSortable()}render(){return n.html`
2383
+ `}static get styles(){return[r.A,u.A]}};v([(0,n.property)({attribute:"config"})],e.prototype,"config",void 0),v([(0,n.property)({attribute:"data"})],e.prototype,"data",void 0),v([(0,n.property)({type:String})],e.prototype,"isRowFocusable",void 0),v([(0,m.Wj)()],e.prototype,"md-table-advanced-change",void 0),v([(0,n.state)()],e.prototype,"tableConfig",void 0),v([(0,n.state)()],e.prototype,"tableData",void 0),v([(0,n.state)()],e.prototype,"error",void 0),v([(0,n.state)()],e.prototype,"COLS",void 0),v([(0,n.state)()],e.prototype,"ROWS",void 0),v([(0,n.state)()],e.prototype,"dragRow",void 0),v([(0,n.state)()],e.prototype,"dropRow",void 0),v([(0,n.state)()],e.prototype,"drops",void 0),v([(0,n.state)()],e.prototype,"dragCol",void 0),v([(0,n.state)()],e.prototype,"dropCol",void 0),v([(0,n.queryAll)("tr[tabindex]")],e.prototype,"tableRaws",void 0),v([(0,m.sg)(500)],e.prototype,"filter",null),e=v([(0,o.w)("md-table-advanced")],e),t.ELEMENT=e}(g||(g={}))},80072:(t,e,i)=>{i.d(e,{Draggable:()=>o});var o,s=i(3001),r=i(66677),a=i(4313),n=i(87161),l=i(70429),d=i(41891),h=i.n(d),c=i(43852),p=function(t,e,i,o){var s,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(r<3?s(a):r>3?s(e,i,a):s(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a};!function(t){let e=class extends((0,s.TS)(n.LitElement)){constructor(){super(...arguments),this.delay=0,this.animation=0,this.handle="",this.filter="",this.easing="",this.direction="vertical",this.group=null,this.draggableItems="md-draggable-item",this.ghostClass="",this.chosenClass="",this.dragClass="",this.fallbackClass="",this.swapThreshold=1,this.touchStartThreshold=0,this.forceFallback=!1,this.sort=!1,this.disabled=!1,this.editable=!1,this.sortableInstance=null,this.handleOnChange=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-change",t)},this.handleOnClone=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-clone",t)},this.handleOnUnchoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-unchoose",t)},this.handleOnRemove=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-remove",t)},this.handleOnAdd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-add",t)},this.handleOnChoose=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-choose",t)},this.handleOnEnd=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-end",t)},this.handleOnMove=(0,r.sg)(t=>{t.stopPropagation(),this.dispatchDragEvent("drag-move",t)},100),this.handleOnStart=t=>{t.stopPropagation(),this.dispatchDragEvent("drag-start",t)}}static get styles(){return[a.A,c.A]}get slotElement(){return this.draggableSlot}generateOptions(){return Object.assign(Object.assign({},this.group&&{group:this.group}),{disabled:this.disabled,animation:this.animation,sort:this.sort,delay:this.delay,handle:this.handle,easing:this.easing,filter:this.filter,swapThreshold:this.swapThreshold,touchStartThreshold:this.touchStartThreshold,draggable:this.draggableItems,direction:this.direction,ghostClass:this.ghostClass,chosenClass:this.chosenClass,dragClass:this.dragClass,fallbackClass:this.fallbackClass,forceFallback:this.forceFallback,onStart:this.handleOnStart,onMove:this.handleOnMove,onEnd:this.handleOnEnd,onChoose:this.handleOnChoose,onAdd:this.handleOnAdd,onRemove:this.handleOnRemove,onUnchoose:this.handleOnUnchoose,onClone:this.handleOnClone,onChange:this.handleOnChange})}initializeSortable(){this.sortableInstance||(this.sortableInstance=h().create(this,this.generateOptions()))}dispatchDragEvent(t,e){this.dispatchEvent(new CustomEvent(t,{composed:!0,bubbles:!0,detail:{srcEvent:e}}))}cleanupSortable(){this.sortableInstance&&(this.sortableInstance.destroy(),this.sortableInstance=null)}connectedCallback(){super.connectedCallback(),this.initializeSortable()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupSortable()}setSortableOption(t,e){this.sortableInstance&&void 0!==this.sortableInstance.option(t)&&this.sortableInstance.option(t,e)}updateSortableInstance(t){for(const e of t.keys()){const t=this[e];this.setSortableOption(e,t)}}updated(t){super.updated(t),this.updateSortableInstance(t)}slottedChanged(){this.initializeSortable()}render(){return n.html`
2384
2384
  <div class="md-draggable" part="draggable" aria-disabled=${this.disabled}>
2385
2385
  <slot name="draggable-item"></slot>
2386
2386
  </div>
@@ -203,7 +203,7 @@ export declare namespace ComboBox {
203
203
  checkForVirtualScroll(): boolean;
204
204
  rangeChanged(): void;
205
205
  getCustomErrorContent(): DocumentFragment;
206
- getCustomContent(option: string | OptionMember): TemplateResult<1> | DocumentFragment;
206
+ getCustomContent(option: string | OptionMember): DocumentFragment | TemplateResult<1>;
207
207
  renderGroupLabelHeader(option: OptionMember, optionIndex: number): TemplateResult<1>;
208
208
  renderWithoutVirtualScroll(): unknown;
209
209
  highlightingSearchedText(option: OptionMember | string): TemplateResult<1>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "3.0.0-beta.6",
3
+ "version": "3.0.0-beta.7",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",