@momentum-ui/web-components 3.2.17 → 3.2.19

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.
Files changed (127) hide show
  1. package/dist/2273.js +48 -46
  2. package/dist/7137.js +1 -1
  3. package/dist/7262.js +1 -1
  4. package/dist/8881.js +1 -1
  5. package/dist/comp/md-accordion-item-entry.js +1 -1
  6. package/dist/comp/md-accordion-item.js +1 -1
  7. package/dist/comp/md-button-group-entry.js +1 -1
  8. package/dist/comp/md-button-group.js +1 -1
  9. package/dist/comp/md-card-alert-entry.js +6 -6
  10. package/dist/comp/md-card-entry.js +1 -1
  11. package/dist/comp/md-card.js +1 -1
  12. package/dist/comp/md-checkbox-entry.js +1 -1
  13. package/dist/comp/md-checkbox.js +1 -1
  14. package/dist/comp/md-coachmark-entry.js +1 -1
  15. package/dist/comp/md-coachmark.js +1 -1
  16. package/dist/comp/md-combobox-entry.js +48 -46
  17. package/dist/comp/md-combobox.js +1 -1
  18. package/dist/comp/md-country-code-picker-entry.js +1 -1
  19. package/dist/comp/md-country-code-picker.js +1 -1
  20. package/dist/comp/md-draggable-item-entry.js +1 -1
  21. package/dist/comp/md-draggable-item.js +1 -1
  22. package/dist/comp/md-dropdown-entry.js +1 -1
  23. package/dist/comp/md-dropdown.js +1 -1
  24. package/dist/comp/md-favorite-entry.js +1 -1
  25. package/dist/comp/md-favorite.js +1 -1
  26. package/dist/comp/md-floating-minimize-entry.js +1 -1
  27. package/dist/comp/md-floating-minimize.js +1 -1
  28. package/dist/comp/md-floating-modal-entry.js +80 -53
  29. package/dist/comp/md-floating-modal.js +1 -1
  30. package/dist/comp/md-grabber-entry.js +1 -1
  31. package/dist/comp/md-grabber.js +1 -1
  32. package/dist/comp/md-list-item-entry.js +1 -1
  33. package/dist/comp/md-list-item.js +1 -1
  34. package/dist/comp/md-menu-entry.js +1 -1
  35. package/dist/comp/md-menu.js +1 -1
  36. package/dist/comp/md-modal-entry.js +1 -1
  37. package/dist/comp/md-modal.js +1 -1
  38. package/dist/comp/md-phone-input-entry.js +1 -1
  39. package/dist/comp/md-phone-input.js +1 -1
  40. package/dist/comp/md-radio-entry.js +1 -1
  41. package/dist/comp/md-radio.js +1 -1
  42. package/dist/comp/md-slider-entry.js +1 -1
  43. package/dist/comp/md-slider.js +1 -1
  44. package/dist/comp/md-tab-entry.js +1 -1
  45. package/dist/comp/md-tab-panel-entry.js +1 -1
  46. package/dist/comp/md-tab-panel.js +1 -1
  47. package/dist/comp/md-tab.js +1 -1
  48. package/dist/comp/md-tabs-entry.js +1 -1
  49. package/dist/comp/md-tabs.js +1 -1
  50. package/dist/comp/md-timepicker-entry.js +1 -1
  51. package/dist/comp/md-timepicker.js +1 -1
  52. package/dist/comp/md-toggle-switch-entry.js +1 -1
  53. package/dist/comp/md-toggle-switch.js +1 -1
  54. package/dist/esm/2273.js +48 -46
  55. package/dist/esm/3155.js +1 -1
  56. package/dist/esm/3648.js +1 -1
  57. package/dist/esm/4654.js +48 -46
  58. package/dist/esm/7137.js +1 -1
  59. package/dist/esm/comp/md-accordion-item-entry.js +1 -1
  60. package/dist/esm/comp/md-accordion-item.js +1 -1
  61. package/dist/esm/comp/md-button-group-entry.js +1 -1
  62. package/dist/esm/comp/md-button-group.js +1 -1
  63. package/dist/esm/comp/md-card-alert-entry.js +5 -5
  64. package/dist/esm/comp/md-card-entry.js +1 -1
  65. package/dist/esm/comp/md-card.js +1 -1
  66. package/dist/esm/comp/md-checkbox-entry.js +1 -1
  67. package/dist/esm/comp/md-checkbox.js +1 -1
  68. package/dist/esm/comp/md-coachmark-entry.js +1 -1
  69. package/dist/esm/comp/md-coachmark.js +1 -1
  70. package/dist/esm/comp/md-combobox-entry.js +1 -1
  71. package/dist/esm/comp/md-combobox.js +1 -1
  72. package/dist/esm/comp/md-country-code-picker-entry.js +1 -1
  73. package/dist/esm/comp/md-country-code-picker.js +1 -1
  74. package/dist/esm/comp/md-draggable-item-entry.js +1 -1
  75. package/dist/esm/comp/md-draggable-item.js +1 -1
  76. package/dist/esm/comp/md-dropdown-entry.js +1 -1
  77. package/dist/esm/comp/md-dropdown.js +1 -1
  78. package/dist/esm/comp/md-favorite-entry.js +1 -1
  79. package/dist/esm/comp/md-favorite.js +1 -1
  80. package/dist/esm/comp/md-floating-minimize-entry.js +1 -1
  81. package/dist/esm/comp/md-floating-minimize.js +1 -1
  82. package/dist/esm/comp/md-floating-modal-entry.js +71 -44
  83. package/dist/esm/comp/md-floating-modal.js +1 -1
  84. package/dist/esm/comp/md-grabber-entry.js +1 -1
  85. package/dist/esm/comp/md-grabber.js +1 -1
  86. package/dist/esm/comp/md-list-item-entry.js +1 -1
  87. package/dist/esm/comp/md-list-item.js +1 -1
  88. package/dist/esm/comp/md-menu-entry.js +1 -1
  89. package/dist/esm/comp/md-menu.js +1 -1
  90. package/dist/esm/comp/md-modal-entry.js +1 -1
  91. package/dist/esm/comp/md-modal.js +1 -1
  92. package/dist/esm/comp/md-phone-input-entry.js +1 -1
  93. package/dist/esm/comp/md-phone-input.js +1 -1
  94. package/dist/esm/comp/md-radio-entry.js +1 -1
  95. package/dist/esm/comp/md-radio.js +1 -1
  96. package/dist/esm/comp/md-slider-entry.js +1 -1
  97. package/dist/esm/comp/md-slider.js +1 -1
  98. package/dist/esm/comp/md-tab-entry.js +1 -1
  99. package/dist/esm/comp/md-tab-panel-entry.js +1 -1
  100. package/dist/esm/comp/md-tab-panel.js +1 -1
  101. package/dist/esm/comp/md-tab.js +1 -1
  102. package/dist/esm/comp/md-tabs-entry.js +1 -1
  103. package/dist/esm/comp/md-tabs.js +1 -1
  104. package/dist/esm/comp/md-timepicker-entry.js +1 -1
  105. package/dist/esm/comp/md-timepicker.js +1 -1
  106. package/dist/esm/comp/md-toggle-switch-entry.js +1 -1
  107. package/dist/esm/comp/md-toggle-switch.js +1 -1
  108. package/dist/esm/index-entry.js +242 -215
  109. package/dist/esm/index.js +1 -1
  110. package/dist/index-entry.js +129 -100
  111. package/dist/index.js +1 -1
  112. package/dist/types/[sandbox]/examples/editable-field.d.ts +1 -1
  113. package/dist/types/components/avatar/Avatar.d.ts +3 -3
  114. package/dist/types/components/badge/Badge.d.ts +1 -1
  115. package/dist/types/components/button/Button.d.ts +2 -2
  116. package/dist/types/components/card-alert/CardAlert.d.ts +6 -1
  117. package/dist/types/components/chip/Chip.d.ts +3 -3
  118. package/dist/types/components/combobox/ComboBox.d.ts +5 -3
  119. package/dist/types/components/dropdown/Dropdown.d.ts +2 -2
  120. package/dist/types/components/editable-textfield/EditableTextfield.d.ts +1 -1
  121. package/dist/types/components/floating-modal/FloatingModal.d.ts +8 -0
  122. package/dist/types/components/floating-modal/FloatingModal.stories.d.ts +4 -0
  123. package/dist/types/components/input/Input.d.ts +5 -5
  124. package/dist/types/components/radio/Radio.d.ts +1 -1
  125. package/dist/types/components/taskitem/TaskItem.utils.d.ts +1 -1
  126. package/dist/types/internal-components/color-table/ColorTable.d.ts +1 -1
  127. package/package.json +1 -1
@@ -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,v,y,b,g,f,w,x,C,E,S,$,T,k,A,I,L,O)=>(()=>{"use strict";var M,D={3701(t,e,i){i.d(e,{Accordion:()=>o});var o,s=i(2900),r=i(7704),a=i(9609),n=i(4084),l=i(7161),d=i(429),h=i(742),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((0,r.TS)(l.LitElement)){constructor(){super(...arguments),this.multiple=!1,this.suppressContainerFocus=!1,this.doubleClickToExpand=!1,this.handleAccordionItemFocus=()=>{this.toggleAttribute("focusable",!0)},this.handleAccordionItemBlur=()=>{this.toggleAttribute("focusable",!1)}}get slotItem(){return this.accordionItemSlotElement}filterSlotted(){return this.accordionItemSlotElement.assignedElements()}switchFocusedAccordionItem(t){const e=this.slotted.findIndex(t=>t.hasAttribute("focus-visible")),i=this.slotted.length;let o=e;for(o=(i+o+t)%i;this.slotted[o].disabled;)o=(i+o+t)%i;this.focusAccordionItem(this.slotted[o])}focusAccordionItem(t){t.hasAttribute("focus-visible")||requestAnimationFrame(()=>t.header.focus())}setActiveAccordionItem(t){this.multiple?t.expanded=!t.expanded:(this.slotted.forEach(e=>{const i=e;i.expanded&&!e.isEqualNode(t)&&(i.expanded=!1)}),t.expanded=!0)}setupExpandedAccordionItems(){this.multiple||this.slotted.filter(t=>t.expanded).forEach((t,e)=>{const i=t;i.expanded&&e>0&&(i.expanded=!1)})}setupFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.addEventListener("focus",this.handleAccordionItemFocus),t.addEventListener("blur",this.handleAccordionItemBlur))})}removeFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.removeEventListener("focus",this.handleAccordionItemFocus),t.removeEventListener("blur",this.handleAccordionItemBlur))})}handleKeyDown(t){const{srcEvent:e}=t.detail,{code:i}=e;switch(i){case s.Uz.Space:case s.Uz.Enter:{const{target:e}=t;e&&this.setActiveAccordionItem(e);break}case s.Uz.ArrowDown:this.switchFocusedAccordionItem(1);break;case s.Uz.ArrowUp:this.switchFocusedAccordionItem(-1);break;case s.Uz.Home:{const t=this.slotted[0];this.focusAccordionItem(t);break}case s.Uz.End:{const t=this.slotted[this.slotted.length-1];this.focusAccordionItem(t);break}}}handleClick(t){const{target:e}=t,i=this.slotted.find(t=>t.isSameNode(e));i&&this.setActiveAccordionItem(i)}propagateDoubleClickSetting(){this.slotted.forEach(t=>{t.doubleClickToExpand=this.doubleClickToExpand})}updated(t){super.updated(t),t.has("slotted")&&(this.setupExpandedAccordionItems(),this.setupFocusAccordionItems(),this.propagateDoubleClickSetting())}connectedCallback(){super.connectedCallback(),this.addEventListener("accordion-item-keydown",this.handleKeyDown),this.addEventListener("accordion-item-click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accordion-item-keydown",this.handleKeyDown),this.removeEventListener("accordion-item-click",this.handleClick),this.removeFocusAccordionItems()}static get styles(){return[n.A,h.A]}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,v,y,b,g,f,w,x,C,E,S,$,T,A,k,I,L,O)=>(()=>{"use strict";var M,D={3701(t,e,i){i.d(e,{Accordion:()=>o});var o,s=i(2900),r=i(7704),a=i(9609),n=i(4084),l=i(7161),d=i(429),h=i(742),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((0,r.TS)(l.LitElement)){constructor(){super(...arguments),this.multiple=!1,this.suppressContainerFocus=!1,this.doubleClickToExpand=!1,this.handleAccordionItemFocus=()=>{this.toggleAttribute("focusable",!0)},this.handleAccordionItemBlur=()=>{this.toggleAttribute("focusable",!1)}}get slotItem(){return this.accordionItemSlotElement}filterSlotted(){return this.accordionItemSlotElement.assignedElements()}switchFocusedAccordionItem(t){const e=this.slotted.findIndex(t=>t.hasAttribute("focus-visible")),i=this.slotted.length;let o=e;for(o=(i+o+t)%i;this.slotted[o].disabled;)o=(i+o+t)%i;this.focusAccordionItem(this.slotted[o])}focusAccordionItem(t){t.hasAttribute("focus-visible")||requestAnimationFrame(()=>t.header.focus())}setActiveAccordionItem(t){this.multiple?t.expanded=!t.expanded:(this.slotted.forEach(e=>{const i=e;i.expanded&&!e.isEqualNode(t)&&(i.expanded=!1)}),t.expanded=!0)}setupExpandedAccordionItems(){this.multiple||this.slotted.filter(t=>t.expanded).forEach((t,e)=>{const i=t;i.expanded&&e>0&&(i.expanded=!1)})}setupFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.addEventListener("focus",this.handleAccordionItemFocus),t.addEventListener("blur",this.handleAccordionItemBlur))})}removeFocusAccordionItems(){this.slotted.forEach(t=>{this.suppressContainerFocus||(t.removeEventListener("focus",this.handleAccordionItemFocus),t.removeEventListener("blur",this.handleAccordionItemBlur))})}handleKeyDown(t){const{srcEvent:e}=t.detail,{code:i}=e;switch(i){case s.Uz.Space:case s.Uz.Enter:{const{target:e}=t;e&&this.setActiveAccordionItem(e);break}case s.Uz.ArrowDown:this.switchFocusedAccordionItem(1);break;case s.Uz.ArrowUp:this.switchFocusedAccordionItem(-1);break;case s.Uz.Home:{const t=this.slotted[0];this.focusAccordionItem(t);break}case s.Uz.End:{const t=this.slotted[this.slotted.length-1];this.focusAccordionItem(t);break}}}handleClick(t){const{target:e}=t,i=this.slotted.find(t=>t.isSameNode(e));i&&this.setActiveAccordionItem(i)}propagateDoubleClickSetting(){this.slotted.forEach(t=>{t.doubleClickToExpand=this.doubleClickToExpand})}updated(t){super.updated(t),t.has("slotted")&&(this.setupExpandedAccordionItems(),this.setupFocusAccordionItems(),this.propagateDoubleClickSetting())}connectedCallback(){super.connectedCallback(),this.addEventListener("accordion-item-keydown",this.handleKeyDown),this.addEventListener("accordion-item-click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("accordion-item-keydown",this.handleKeyDown),this.removeEventListener("accordion-item-click",this.handleClick),this.removeFocusAccordionItems()}static get styles(){return[n.A,h.A]}render(){return l.html`
2
2
  <div class="md-accordion" part="accordion">
3
3
  <slot name="accordion-item"></slot>
4
4
  </div>
@@ -638,7 +638,7 @@
638
638
  ${this.renderHeader()}
639
639
  <div class="content-margin">${this.renderCardText()} ${this.renderFooter()}</div>
640
640
  </div>
641
- `}};c([(0,l.property)({type:String})],e.prototype,"id",void 0),c([(0,l.property)({type:String})],e.prototype,"title",void 0),c([(0,l.property)({type:String})],e.prototype,"cardText",void 0),c([(0,l.property)({type:String})],e.prototype,"timestamp",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"summariseMoreVisible",void 0),c([(0,l.property)({type:String})],e.prototype,"variant",void 0),c([(0,l.state)()],e.prototype,"copyChecked",void 0),c([(0,l.state)()],e.prototype,"thumbsUpChecked",void 0),c([(0,l.state)()],e.prototype,"thumbsDownChecked",void 0),e=c([(0,r.w)("md-card-ai")],e),t.ELEMENT=e}(s||(s={}))},4882(t,e,i){i.d(e,{CardAlert:()=>u}),i(5983),i(2583),i(1821);var o,s=i(9609),r=i(4084),a=i(7161),n=i(429),l=i(5125),d=i(7137),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){t.CRITICAL="critical",t.MEDIUM="medium"}(o||(o={}));const c={[o.CRITICAL]:{icon:"flag-filled",color:"negative"},[o.MEDIUM]:{icon:"warning-filled",color:"warning"}},p={dismiss:"Dismiss",justNow:"Just now",minutesAgo:t=>`${t} ${1===t?"min":"mins"} ago`,hoursAgo:t=>`${t} ${1===t?"hour":"hours"} ago`,daysAgo:t=>`${t} ${1===t?"day":"days"} ago`};var u;!function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.severity="",this.category="",this.secondaryChip="",this.timestamp="",this.title="",this.queueName="",this.details=[],this.insight="",this.primaryActionLabel="Click",this.primaryActionDropdown=!1,this.detailsHeading="",this.showDismiss=!1,this.expanded=!1,this.relativeTime=""}static get styles(){return[r.A,d.A]}get normalizedSeverity(){var t;const e=(null!==(t=this.severity)&&void 0!==t?t:"").toLowerCase();return Object.values(o).includes(e)?e:void 0}get severityIcon(){return this.normalizedSeverity?c[this.normalizedSeverity].icon:"plus-circle-filled"}get severityColor(){return this.normalizedSeverity?c[this.normalizedSeverity].color:"neutral"}get hasInsight(){var t;return(null!==(t=this.insight)&&void 0!==t?t:"").trim().length>0}get detailRows(){return Array.isArray(this.details)?this.details:[]}get resolvedLocale(){return t=this.constructor.locale,Object.assign(Object.assign(Object.assign({},p),t),{dismiss:null!==(e=null==t?void 0:t.dismiss)&&void 0!==e?e:p.dismiss});var t,e}updateRelativeTime(){this.timestamp&&(this.relativeTime=this.formatRelativeTime(this.timestamp))}startTimer(){this.stopTimer(),this.timestamp&&(this.updateRelativeTime(),this.timerInterval=setInterval(()=>this.updateRelativeTime(),6e4))}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0)}willUpdate(t){t.has("timestamp")&&this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.stopTimer()}formatRelativeTime(t){const e=this.resolvedLocale,i=Date.now(),o="number"==typeof t?t:new Date(t).getTime();if(isNaN(o))return"";const s=i-o;if(s<0)return e.justNow;const r=Math.floor(s/6e4);if(r<1)return e.justNow;if(r<60)return e.minutesAgo(r);const a=Math.floor(r/60);if(a<24)return e.hoursAgo(a);const n=Math.floor(a/24);return e.daysAgo(n)}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action-clicked",{bubbles:!0,composed:!0}))}handleDismiss(){this.dispatchEvent(new CustomEvent("dismiss-clicked",{bubbles:!0,composed:!0}))}renderTimestamp(){return this.relativeTime?a.html`<span class="md-card-alert-timestamp">${this.relativeTime}</span>`:a.nothing}renderHeader(){return this.severity||this.category||this.timestamp?a.html`
641
+ `}};c([(0,l.property)({type:String})],e.prototype,"id",void 0),c([(0,l.property)({type:String})],e.prototype,"title",void 0),c([(0,l.property)({type:String})],e.prototype,"cardText",void 0),c([(0,l.property)({type:String})],e.prototype,"timestamp",void 0),c([(0,l.property)({type:Boolean})],e.prototype,"summariseMoreVisible",void 0),c([(0,l.property)({type:String})],e.prototype,"variant",void 0),c([(0,l.state)()],e.prototype,"copyChecked",void 0),c([(0,l.state)()],e.prototype,"thumbsUpChecked",void 0),c([(0,l.state)()],e.prototype,"thumbsDownChecked",void 0),e=c([(0,r.w)("md-card-ai")],e),t.ELEMENT=e}(s||(s={}))},4882(t,e,i){i.d(e,{CardAlert:()=>m}),i(5983),i(2583),i(1821);var o,s=i(9609),r=i(4084),a=i(7161),n=i(429),l=i(5125),d=i(7137),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){t.CRITICAL="critical",t.MEDIUM="medium"}(o||(o={}));const c={[o.CRITICAL]:{icon:"flag-filled",color:"negative"},[o.MEDIUM]:{icon:"warning-filled",color:"warning"}},p={dismiss:"Dismiss",justNow:"Just now",minutesAgo:t=>`${t} ${1===t?"min":"mins"} ago`,hoursAgo:t=>`${t} ${1===t?"hour":"hours"} ago`,daysAgo:t=>`${t} ${1===t?"day":"days"} ago`};var u,m;!function(t){t.POSITIVE="positive",t.NEGATIVE="negative",t.NEUTRAL="neutral"}(u||(u={})),function(t){let e=class extends a.LitElement{constructor(){super(...arguments),this.severity="",this.category="",this.secondaryChip="",this.timestamp="",this.title="",this.queueName="",this.details=[],this.insight="",this.primaryActionLabel="Click",this.primaryActionDropdown=!1,this.detailsHeading="",this.showDismiss=!1,this.expanded=!1,this.relativeTime=""}static get styles(){return[r.A,d.A]}get normalizedSeverity(){var t;const e=(null!==(t=this.severity)&&void 0!==t?t:"").toLowerCase();return Object.values(o).includes(e)?e:void 0}get severityIcon(){return this.normalizedSeverity?c[this.normalizedSeverity].icon:"plus-circle-filled"}get severityColor(){return this.normalizedSeverity?c[this.normalizedSeverity].color:"neutral"}get hasInsight(){var t;return(null!==(t=this.insight)&&void 0!==t?t:"").trim().length>0}get detailRows(){return Array.isArray(this.details)?this.details:[]}get resolvedLocale(){return t=this.constructor.locale,Object.assign(Object.assign(Object.assign({},p),t),{dismiss:null!==(e=null==t?void 0:t.dismiss)&&void 0!==e?e:p.dismiss});var t,e}updateRelativeTime(){this.timestamp&&(this.relativeTime=this.formatRelativeTime(this.timestamp))}startTimer(){this.stopTimer(),this.timestamp&&(this.updateRelativeTime(),this.timerInterval=setInterval(()=>this.updateRelativeTime(),6e4))}stopTimer(){this.timerInterval&&(clearInterval(this.timerInterval),this.timerInterval=void 0)}willUpdate(t){t.has("timestamp")&&this.startTimer()}disconnectedCallback(){super.disconnectedCallback(),this.stopTimer()}formatRelativeTime(t){const e=this.resolvedLocale,i=Date.now(),o="number"==typeof t?t:new Date(t).getTime();if(isNaN(o))return"";const s=i-o;if(s<0)return e.justNow;const r=Math.floor(s/6e4);if(r<1)return e.justNow;if(r<60)return e.minutesAgo(r);const a=Math.floor(r/60);if(a<24)return e.hoursAgo(a);const n=Math.floor(a/24);return e.daysAgo(n)}handlePrimaryAction(){this.dispatchEvent(new CustomEvent("primary-action-clicked",{bubbles:!0,composed:!0}))}handleDismiss(){this.dispatchEvent(new CustomEvent("dismiss-clicked",{bubbles:!0,composed:!0}))}renderTimestamp(){return this.relativeTime?a.html`<span class="md-card-alert-timestamp">${this.relativeTime}</span>`:a.nothing}renderHeader(){return this.severity||this.category||this.timestamp?a.html`
642
642
  <div class="md-card-alert-header">
643
643
  <div class="md-card-alert-chips">
644
644
  <md-chip color=${this.severityColor} value=${this.category} small>
@@ -671,11 +671,11 @@
671
671
  `:a.nothing}renderDetails(){return 0===this.detailRows.length?a.nothing:a.html`
672
672
  <div class="md-card-alert-details">
673
673
  <span class="md-card-alert-details-heading">${this.detailsHeading}</span>
674
- ${this.detailRows.map(t=>a.html`
674
+ ${this.detailRows.slice(0,3).map(t=>a.html`
675
675
  <div class="md-card-alert-detail-row">
676
676
  <span class="md-card-alert-detail-label">${t.label}</span>
677
677
  <span
678
- class=${(0,l.classMap)({"md-card-alert-detail-value":!0,"md-card-alert-detail-value--highlighted":!!t.highlighted})}
678
+ class=${(0,l.classMap)({"md-card-alert-detail-value":!0,"md-card-alert-detail-value--positive":t.impact===u.POSITIVE,"md-card-alert-detail-value--negative":t.impact===u.NEGATIVE})}
679
679
  >${t.value}</span
680
680
  >
681
681
  </div>
@@ -723,7 +723,7 @@
723
723
  ${this.renderHeader()} ${this.renderTitleSection()} ${this.renderDetails()} ${this.renderInsight()}
724
724
  ${this.renderActions()}
725
725
  </div>
726
- `}};e.locale=Object.assign({},p),h([(0,n.property)({type:String})],e.prototype,"severity",void 0),h([(0,n.property)({type:String})],e.prototype,"category",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryChip",void 0),h([(0,n.property)({type:String})],e.prototype,"timestamp",void 0),h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"queueName",void 0),h([(0,n.property)({type:Array})],e.prototype,"details",void 0),h([(0,n.property)({type:String})],e.prototype,"insight",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryActionLabel",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"primaryActionDropdown",void 0),h([(0,n.property)({type:String})],e.prototype,"detailsHeading",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"showDismiss",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"expanded",void 0),h([(0,n.state)()],e.prototype,"relativeTime",void 0),e=h([(0,s.w)("md-card-alert")],e),t.ELEMENT=e}(u||(u={}))},7540(t,e,i){i.d(e,{CardV2:()=>u}),i(5983),i(1821),i(9613);var o=i(9609),s=i(4084),r=i(7161),a=i(429),n=i(5125),l=i(5796),d=i(513),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};const c="hh:mm:ss";var p,u;!function(t){t.DEFAULT="default",t.ACTIVE="active",t.INACTIVE="inactive"}(p||(p={})),function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.state=p.DEFAULT,this.identifier=void 0,this.header=void 0,this.info=void 0,this.data=void 0,this.createdTime=0,this.active=!1,this.expandable=!1,this.expandAriaLabel="Expand for more details",this.renderedData=""}connectedCallback(){super.connectedCallback(),this.checkForExtraInfoSlot()}disconnectedCallback(){super.disconnectedCallback(),this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}static get styles(){return[s.A,d.A]}get isCardActive(){return this.state===p.ACTIVE}willUpdate(t){super.willUpdate(t),(t.has("active")||t.has("data")||t.has("createdTime"))&&this.calculateRenderedData()}expandCardToggled(){var t;this.state=this.isCardActive?p.DEFAULT:p.ACTIVE,this.dispatchEvent(new CustomEvent("expand-card-toggled",{detail:{identifier:null!==(t=this.identifier)&&void 0!==t?t:"",active:this.isCardActive},bubbles:!0,composed:!0}))}checkForExtraInfoSlot(){var t;(null===(t=this.extraInfoSlot)||void 0===t?void 0:t.assignedNodes().length)>0?this.setAttribute("has-extra-info",""):this.removeAttribute("has-extra-info")}handleExtraInfoSlotChange(t){this.checkForExtraInfoSlot()}get cardClassMap(){return{"md-card-v2":!0,[`md-card--${this.state}`]:!0}}get contentClassMap(){return{"md-card-v2-content":!0,inactive:this.state===p.INACTIVE}}get footerExpandClassMap(){return{"md-card-v2-footer-expand":!0,hidden:!this.expandable}}get expandCardHandler(){return this.expandable?this.expandCardToggled:null}renderHeader(){return r.html`
726
+ `}};e.locale=Object.assign({},p),h([(0,n.property)({type:String})],e.prototype,"severity",void 0),h([(0,n.property)({type:String})],e.prototype,"category",void 0),h([(0,n.property)({type:String})],e.prototype,"secondaryChip",void 0),h([(0,n.property)({type:String})],e.prototype,"timestamp",void 0),h([(0,n.property)({type:String})],e.prototype,"title",void 0),h([(0,n.property)({type:String})],e.prototype,"queueName",void 0),h([(0,n.property)({type:Array})],e.prototype,"details",void 0),h([(0,n.property)({type:String})],e.prototype,"insight",void 0),h([(0,n.property)({type:String})],e.prototype,"primaryActionLabel",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"primaryActionDropdown",void 0),h([(0,n.property)({type:String})],e.prototype,"detailsHeading",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"showDismiss",void 0),h([(0,n.property)({type:Boolean})],e.prototype,"expanded",void 0),h([(0,n.state)()],e.prototype,"relativeTime",void 0),e=h([(0,s.w)("md-card-alert")],e),t.ELEMENT=e}(m||(m={}))},7540(t,e,i){i.d(e,{CardV2:()=>u}),i(5983),i(1821),i(9613);var o=i(9609),s=i(4084),r=i(7161),a=i(429),n=i(5125),l=i(5796),d=i(513),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};const c="hh:mm:ss";var p,u;!function(t){t.DEFAULT="default",t.ACTIVE="active",t.INACTIVE="inactive"}(p||(p={})),function(t){let e=class extends r.LitElement{constructor(){super(...arguments),this.state=p.DEFAULT,this.identifier=void 0,this.header=void 0,this.info=void 0,this.data=void 0,this.createdTime=0,this.active=!1,this.expandable=!1,this.expandAriaLabel="Expand for more details",this.renderedData=""}connectedCallback(){super.connectedCallback(),this.checkForExtraInfoSlot()}disconnectedCallback(){super.disconnectedCallback(),this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=void 0)}static get styles(){return[s.A,d.A]}get isCardActive(){return this.state===p.ACTIVE}willUpdate(t){super.willUpdate(t),(t.has("active")||t.has("data")||t.has("createdTime"))&&this.calculateRenderedData()}expandCardToggled(){var t;this.state=this.isCardActive?p.DEFAULT:p.ACTIVE,this.dispatchEvent(new CustomEvent("expand-card-toggled",{detail:{identifier:null!==(t=this.identifier)&&void 0!==t?t:"",active:this.isCardActive},bubbles:!0,composed:!0}))}checkForExtraInfoSlot(){var t;(null===(t=this.extraInfoSlot)||void 0===t?void 0:t.assignedNodes().length)>0?this.setAttribute("has-extra-info",""):this.removeAttribute("has-extra-info")}handleExtraInfoSlotChange(t){this.checkForExtraInfoSlot()}get cardClassMap(){return{"md-card-v2":!0,[`md-card--${this.state}`]:!0}}get contentClassMap(){return{"md-card-v2-content":!0,inactive:this.state===p.INACTIVE}}get footerExpandClassMap(){return{"md-card-v2-footer-expand":!0,hidden:!this.expandable}}get expandCardHandler(){return this.expandable?this.expandCardToggled:null}renderHeader(){return r.html`
727
727
  <div class="md-card-v2-header-title">
728
728
  <h3>${this.header}</h3>
729
729
  ${this.info?r.html`
@@ -1005,7 +1005,7 @@
1005
1005
  <slot></slot>
1006
1006
  </div>
1007
1007
  </div>
1008
- `}};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={}))},2273(t,e,i){i.d(e,{ComboBox:()=>o}),i(7906),i(1821);var o,s=i(2900),r=i(7704),a=i(9609),n=i(2050),l=i(4084),d=i(7161),h=i(429),c=i(5125),p=i(291),u=i(8175),m=i(318),v=i(7103),y=i(4047),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)?String(t[this.optionValue]):t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?String(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);if(this.setSelectedAttribute(t),t)if(this.setSelectedOption(t),this.isMulti)this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected());else{const i=this.getOptionValue(t);this.inputValue=i,this.setInputValue(i),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;if(!this.readOnly)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){if(this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue))return void this.setCustomValue();this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);!e||this.showSelectedCount||this.isMulti||(this.inputValue=this.getOptionValue(e)),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()})}if(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,v.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,y.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`
1008
+ `}};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={}))},2273(t,e,i){i.d(e,{ComboBox:()=>o}),i(7906),i(1821);var o,s=i(2900),r=i(7704),a=i(9609),n=i(2050),l=i(93),d=i(4084),h=i(7161),c=i(429),p=i(5125),u=i(291),m=i(8175),v=i(318),y=i(7103),b=i(4047),g=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},f=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)(h.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._fallbackId=(0,l.O)("md-combobox"),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 messageId(){return`${this.htmlId||this._fallbackId}-message`}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)?String(t[this.optionValue]):t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?String(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 f(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 f(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);if(this.setSelectedAttribute(t),t)if(this.setSelectedOption(t),this.isMulti)this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected());else{const i=this.getOptionValue(t);this.inputValue=i,this.setInputValue(i),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;if(!this.readOnly)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){if(this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue))return void this.setCustomValue();this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);!e||this.showSelectedCount||this.isMulti||(this.inputValue=this.getOptionValue(e)),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()})}if(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[d.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 h.html`
1009
1009
  <md-icon
1010
1010
  name=${t}
1011
1011
  class=${e}
@@ -1014,7 +1014,7 @@
1014
1014
  aria-hidden="true"
1015
1015
  @click=${this.toggleVisualListBox}
1016
1016
  ></md-icon>
1017
- `}selectedOptionTemplate(t){return d.html`
1017
+ `}selectedOptionTemplate(t){return h.html`
1018
1018
  <div class="md-combobox-selected-item">
1019
1019
  <span>${this.getOptionValue(t)}</span>
1020
1020
  <md-icon
@@ -1026,7 +1026,7 @@
1026
1026
  @click=${()=>this.removeSelected(t)}
1027
1027
  ></md-icon>
1028
1028
  </div>
1029
- `}clearButtonTemplate(){return d.html`
1029
+ `}clearButtonTemplate(){return h.html`
1030
1030
  <button
1031
1031
  type="button"
1032
1032
  class="md-combobox-button clear"
@@ -1046,28 +1046,28 @@
1046
1046
  style="height: ${this.clearIconHeight};"
1047
1047
  ></md-icon>
1048
1048
  </button>
1049
- `}arrowButtonTemplate(){return d.html`
1049
+ `}arrowButtonTemplate(){return h.html`
1050
1050
  <button
1051
1051
  type="button"
1052
1052
  class="md-combobox-button arrow-down"
1053
1053
  part="combobox-button-arrow"
1054
1054
  aria-expanded=${this.expanded}
1055
- aria-label=${(0,p.ifDefined)("true"===this.popupChevronAriaHidden?void 0:this.arrowAriaLabel)}
1055
+ aria-label=${(0,u.ifDefined)("true"===this.popupChevronAriaHidden?void 0:this.arrowAriaLabel)}
1056
1056
  aria-controls="md-combobox-listbox"
1057
1057
  tabindex="-1"
1058
- aria-hidden=${(0,p.ifDefined)("true"===this.popupChevronAriaHidden?"true":void 0)}
1058
+ aria-hidden=${(0,u.ifDefined)("true"===this.popupChevronAriaHidden?"true":void 0)}
1059
1059
  ?disabled=${this.disabled}
1060
1060
  ?readonly=${this.readOnly}
1061
1061
  @click=${this.toggleVisualListBox}
1062
1062
  >
1063
1063
  <md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
1064
1064
  </button>
1065
- `}groupArrowButtonTemplate(t){const e=this.groupExpandedList.includes(t)?"arrow-up-bold":"arrow-down-bold";return d.html`
1065
+ `}groupArrowButtonTemplate(t){const e=this.groupExpandedList.includes(t)?"arrow-up-bold":"arrow-down-bold";return h.html`
1066
1066
  <button
1067
1067
  type="button"
1068
1068
  class="md-combobox-button"
1069
1069
  part="combobox-button-arrow"
1070
- aria-label=${(0,p.ifDefined)("true"===this.popupChevronAriaHidden?void 0:this.arrowAriaLabel)}
1070
+ aria-label=${(0,u.ifDefined)("true"===this.popupChevronAriaHidden?void 0:this.arrowAriaLabel)}
1071
1071
  aria-controls="md-combobox-listbox"
1072
1072
  tabindex="-1"
1073
1073
  aria-hidden=${"true"===this.popupChevronAriaHidden?"true":"false"}
@@ -1079,14 +1079,14 @@
1079
1079
  <md-icon name=${e} size="12" iconSet="momentumDesign" aria-hidden="true"></md-icon>
1080
1080
  </span>
1081
1081
  </button>
1082
- `}getSelectAllOption(){const t=this.checkForVirtualScroll()?`, 1 of ${this.options.length+1}`:"";return d.html`
1082
+ `}getSelectAllOption(){const t=this.checkForVirtualScroll()?`, 1 of ${this.options.length+1}`:"";return h.html`
1083
1083
  <div
1084
1084
  id="selectAll"
1085
1085
  part="combobox-option"
1086
- class="md-combobox-option ${(0,c.classMap)(this.listItemOptionMap)}"
1086
+ class="md-combobox-option ${(0,p.classMap)(this.listItemOptionMap)}"
1087
1087
  @click=${this.handleSelectAll}
1088
1088
  aria-label="${this.selectAllTextLocalization}${t}"
1089
- aria-checked=${(0,p.ifDefined)(this.isSelectAllChecked?"true":void 0)}
1089
+ aria-checked=${(0,u.ifDefined)(this.isSelectAllChecked?"true":void 0)}
1090
1090
  role="checkbox"
1091
1091
  >
1092
1092
  <span class="select-option" aria-hidden="true">
@@ -1095,9 +1095,9 @@
1095
1095
 
1096
1096
  <span part="label" class="select-label" aria-hidden="true">${this.selectAllTextLocalization}</span>
1097
1097
  </div>
1098
- `}getSelctedCount(){return 0===this.selectedOptions.length?d.nothing:this.isSelectAllSelected()?d.html` <span class="selected-count">${this.allTextLocalization}</span> `:d.html`
1098
+ `}getSelctedCount(){return 0===this.selectedOptions.length?h.nothing:this.isSelectAllSelected()?h.html` <span class="selected-count">${this.allTextLocalization}</span> `:h.html`
1099
1099
  <span class="selected-count">${this.selectedOptions.length} ${this.selectedTextLocalization}</span>
1100
- `}checkForVirtualScroll(){return this.useVirtualScroll&&!this.isOptGroup}rangeChanged(){this.updateFocusedIndex(this.focusedIndex),this.checkSelectedOptions(),this.resizeListbox()}getCustomErrorContent(){const t=this.querySelector("[slot]")||this.shadowRoot.querySelector("[slot]");return document.createRange().createContextualFragment(`${null==t?void 0:t.outerHTML}`)}getCustomContent(t){const e=this.getCustomContentName(t);if(this.isOptGroup){const t=[...this.querySelectorAll("[slot]")].find(t=>t.slot===e);return t?document.createRange().createContextualFragment(`${t.outerHTML}`):d.html``}return d.html` <slot name=${(0,p.ifDefined)(e)}></slot> `}renderGroupLabelHeader(t,e){return d.html`
1100
+ `}checkForVirtualScroll(){return this.useVirtualScroll&&!this.isOptGroup}rangeChanged(){this.updateFocusedIndex(this.focusedIndex),this.checkSelectedOptions(),this.resizeListbox()}getCustomErrorContent(){const t=this.querySelector("[slot]")||this.shadowRoot.querySelector("[slot]");return document.createRange().createContextualFragment(`${null==t?void 0:t.outerHTML}`)}getCustomContent(t){const e=this.getCustomContentName(t);if(this.isOptGroup){const t=[...this.querySelectorAll("[slot]")].find(t=>t.slot===e);return t?document.createRange().createContextualFragment(`${t.outerHTML}`):h.html``}return h.html` <slot name=${(0,u.ifDefined)(e)}></slot> `}renderGroupLabelHeader(t,e){return h.html`
1101
1101
  <div
1102
1102
  part="group-label"
1103
1103
  class="group-label"
@@ -1112,7 +1112,7 @@
1112
1112
  <span part="group-label">${t.value}</span>
1113
1113
  ${this.groupArrowButtonTemplate(t.value)}
1114
1114
  </div>
1115
- `}renderWithoutVirtualScroll(){return(0,u.repeat)(this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue),t=>this.getOptionId(t),(t,e)=>"string"!=typeof t&&this.isOptGroup&&"true"===t.isLabel?this.renderGroupLabelHeader(t,e):!this.isOptGroup||this.groupExpandedList.includes(this.getOptionGroupName(t))?this.renderItem(t,e):void 0)}highlightingSearchedText(t){return(0,n.ws)(this.getOptionValue(t),this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).map(({text:t,matching:e})=>e?d.html` <span class="highlight-text" part="select-label">${t}</span> `:d.html` <span class="selected-label-text" part="select-label">${t}</span> `)}addStyle(){const t=!this.expanded||this.options.length&&0===this.filteredOptions.length&&this.inputValue&&this.allowCustomValue;return this.checkForVirtualScroll()?(0,m.styleMap)({visibility:t?"hidden":"visible","z-index":t?"-1":"99",overflow:"hidden"}):(0,m.styleMap)({display:t?"none":"block","z-index":"99",overflow:"auto"})}renderItem(t,e){const i=this.allowSelectAll?e+2:e+1,o=this.allowSelectAll?this.options.length+1:this.options.length,s=this.checkForVirtualScroll()?`, ${i} of ${o}`:"";return d.html`
1115
+ `}renderWithoutVirtualScroll(){return(0,m.repeat)(this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue),t=>this.getOptionId(t),(t,e)=>"string"!=typeof t&&this.isOptGroup&&"true"===t.isLabel?this.renderGroupLabelHeader(t,e):!this.isOptGroup||this.groupExpandedList.includes(this.getOptionGroupName(t))?this.renderItem(t,e):void 0)}highlightingSearchedText(t){return(0,n.ws)(this.getOptionValue(t),this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).map(({text:t,matching:e})=>e?h.html` <span class="highlight-text" part="select-label">${t}</span> `:h.html` <span class="selected-label-text" part="select-label">${t}</span> `)}addStyle(){const t=!this.expanded||this.options.length&&0===this.filteredOptions.length&&this.inputValue&&this.allowCustomValue;return this.checkForVirtualScroll()?(0,v.styleMap)({visibility:t?"hidden":"visible","z-index":t?"-1":"99",overflow:"hidden"}):(0,v.styleMap)({display:t?"none":"block","z-index":"99",overflow:"auto"})}renderItem(t,e){const i=this.allowSelectAll?e+2:e+1,o=this.allowSelectAll?this.options.length+1:this.options.length,s=this.checkForVirtualScroll()?`, ${i} of ${o}`:"";return h.html`
1116
1116
  <div
1117
1117
  id=${this.getOptionId(t)}
1118
1118
  title="${this.getOptionValue(t)}"
@@ -1124,26 +1124,26 @@
1124
1124
  aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${s}"
1125
1125
  tabindex="-1"
1126
1126
  @click=${t=>this.handleListClick(t)}
1127
- aria-checked=${(0,p.ifDefined)(this.isMulti?this.isOptionChecked.call(this,t):void 0)}
1127
+ aria-checked=${(0,u.ifDefined)(this.isMulti?this.isOptionChecked.call(this,t):void 0)}
1128
1128
  >
1129
- ${this.isMulti?d.html`
1129
+ ${this.isMulti?h.html`
1130
1130
  <span class="select-option" aria-hidden="true">
1131
1131
  <md-icon name="check-bold" size="14" iconSet="momentumDesign"></md-icon>
1132
1132
  </span>
1133
- `:d.nothing}
1133
+ `:h.nothing}
1134
1134
  <span part="label" class="select-label" aria-hidden="true">
1135
1135
  ${this.isCustomContent?this.getCustomContent(t):this.highlightingSearchedText(t)}
1136
1136
  </span>
1137
1137
  </div>
1138
- `}inputTitle(){return this.isMulti?this.selectedOptions.length>0?`${this.selectedOptions.length} ${this.selectedTextLocalization}`:this.placeholder:this.selectedOptions.length>0?this.getOptionValue(this.selectedOptions[0]):this.placeholder}helpTextTemplate(){return this.helpText?d.html`
1138
+ `}inputTitle(){return this.isMulti?this.selectedOptions.length>0?`${this.selectedOptions.length} ${this.selectedTextLocalization}`:this.placeholder:this.selectedOptions.length>0?this.getOptionValue(this.selectedOptions[0]):this.placeholder}helpTextTemplate(){return this.helpText?h.html`
1139
1139
  <md-help-text
1140
- class="help-text ${(0,c.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
1140
+ class="help-text ${(0,p.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
1141
1141
  .message=${this.helpText}
1142
- style=${(0,m.styleMap)({width:"100%"})}
1142
+ style=${(0,v.styleMap)({width:"100%"})}
1143
1143
  ></md-help-text>
1144
- `:d.nothing}messagesTemplate(){return this.messages&&this.messages.length?d.html`
1145
- <div id="${this.htmlId}-message" part="message" class="md-combobox__messages">
1146
- ${(0,u.repeat)(this.messages,(t,e)=>d.html`
1144
+ `:h.nothing}messagesTemplate(){return this.messages&&this.messages.length?h.html`
1145
+ <div id="${this.messageId}" part="message" class="md-combobox__messages">
1146
+ ${(0,m.repeat)(this.messages,(t,e)=>h.html`
1147
1147
  <md-help-text
1148
1148
  .message=${t}
1149
1149
  .id=${this.messageArr[e].id||""}
@@ -1152,26 +1152,28 @@
1152
1152
  ></md-help-text>
1153
1153
  `)}
1154
1154
  </div>
1155
- `:d.nothing}get newArrowButtonTemplate(){return d.html`<div class="md-combobox-right-arrow">${this.arrowButtonTemplate()}</div>`}get renderNewMomentumArrow(){return d.html` ${this.isDropdownArrow?this.arrowButtonTemplate():this.newArrowButtonTemplate} `}get renderTrailingInputControls(){const t=!this.readOnly&&this.shouldChangeButton();return this.newMomentum?t&&this.isDropdownArrow?d.html`${this.clearButtonTemplate()}`:t?d.html`${this.clearButtonTemplate()} ${this.renderNewMomentumArrow}`:this.renderNewMomentumArrow:this.compact?d.html`${d.nothing}`:d.html`${t?this.clearButtonTemplate():this.arrowButtonTemplate()}`}get renderVirtualScroll(){return d.html`
1155
+ `:h.nothing}get newArrowButtonTemplate(){return h.html`<div class="md-combobox-right-arrow">${this.arrowButtonTemplate()}</div>`}get renderNewMomentumArrow(){return h.html` ${this.isDropdownArrow?this.arrowButtonTemplate():this.newArrowButtonTemplate} `}get renderTrailingInputControls(){const t=!this.readOnly&&this.shouldChangeButton();return this.newMomentum?t&&this.isDropdownArrow?h.html`${this.clearButtonTemplate()}`:t?h.html`${this.clearButtonTemplate()} ${this.renderNewMomentumArrow}`:this.renderNewMomentumArrow:this.compact?h.html`${h.nothing}`:h.html`${t?this.clearButtonTemplate():this.arrowButtonTemplate()}`}get renderVirtualScroll(){return h.html`
1156
1156
  <div class="virtual-scroll" @rangeChanged=${this.rangeChanged}>
1157
1157
  <lit-virtualizer
1158
1158
  .items=${this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue)}
1159
1159
  .renderItem=${(t,e)=>this.renderItem(t,e)}
1160
1160
  ></lit-virtualizer>
1161
1161
  </div>
1162
- `}render(){return d.html`
1163
- <div part="combobox" class="md-combobox md-combobox-list ${(0,c.classMap)(this.comboBoxTemplateClassMap)}">
1164
- <div part="group" class="group ${(0,c.classMap)(this.listItemOptionMap)}">
1165
- ${this.searchable?this.searchIconTemplate():this.showFilterIcon?this.filterIconTemplate():d.nothing}
1162
+ `}render(){return h.html`
1163
+ <div part="combobox" class="md-combobox md-combobox-list ${(0,p.classMap)(this.comboBoxTemplateClassMap)}">
1164
+ <div part="group" class="group ${(0,p.classMap)(this.listItemOptionMap)}">
1165
+ ${this.searchable?this.searchIconTemplate():this.showFilterIcon?this.filterIconTemplate():h.nothing}
1166
1166
  <div class="md-combobox__multiwrap" part="multiwrap">
1167
- ${this.isMulti?this.isMulti&&!this.showSelectedCount?(0,u.repeat)(this.selectedOptions,t=>this.selectedOptionTemplate(t)):this.getSelctedCount():d.nothing}
1167
+ ${this.isMulti?this.isMulti&&!this.showSelectedCount?(0,m.repeat)(this.selectedOptions,t=>this.selectedOptionTemplate(t)):this.getSelctedCount():h.nothing}
1168
1168
  <input
1169
- id=${(0,p.ifDefined)(this.comboboxId||void 0)}
1169
+ id=${(0,u.ifDefined)(this.comboboxId||void 0)}
1170
1170
  class="md-combobox-listbox"
1171
1171
  type="text"
1172
1172
  role="combobox"
1173
1173
  aria-autocomplete="both"
1174
- aria-label=${(0,p.ifDefined)(this.inputValue&&this.selectedOptions.length>0?void 0:this.ariaLabelForComboBox)}
1174
+ aria-label=${(0,u.ifDefined)(this.inputValue&&this.selectedOptions.length>0?void 0:this.ariaLabelForComboBox)}
1175
+ aria-describedby=${(0,u.ifDefined)(this.messages&&this.messages.length?this.messageId:void 0)}
1176
+ aria-invalid=${(0,u.ifDefined)("error"===this.messageType?"true":void 0)}
1175
1177
  part="multiwrap-input"
1176
1178
  aria-expanded=${this.expanded}
1177
1179
  placeholder=${this.inputValue&&this.selectedOptions.length>0||this.isMulti&&this.showSelectedCount&&0!==this.selectedOptions.length?"":this.placeholder}
@@ -1179,7 +1181,7 @@
1179
1181
  ?readonly=${this.allowSelectAll||this.readOnly}
1180
1182
  ?disabled=${this.disabled}
1181
1183
  ?autofocus=${this.autofocus}
1182
- title=${(0,p.ifDefined)(this.inputValue&&this.selectedOptions.length>0?void 0:this.inputTitle())}
1184
+ title=${(0,u.ifDefined)(this.inputValue&&this.selectedOptions.length>0?void 0:this.inputTitle())}
1183
1185
  .value=${this.inputValue}
1184
1186
  @click=${this.toggleVisualListBox}
1185
1187
  @input=${this.handleInput}
@@ -1190,45 +1192,45 @@
1190
1192
  ${this.renderTrailingInputControls}
1191
1193
  </div>
1192
1194
 
1193
- ${this.showLoader||this.showCustomError?d.html`
1195
+ ${this.showLoader||this.showCustomError?h.html`
1194
1196
  <div
1195
1197
  id="md-combobox-listbox"
1196
1198
  part="combobox-options"
1197
1199
  aria-label=${this.ariaLabel}
1198
- style=${(0,m.styleMap)({display:this.expanded?"block":"none","z-index":"99"})}
1200
+ style=${(0,v.styleMap)({display:this.expanded?"block":"none","z-index":"99"})}
1199
1201
  >
1200
1202
  ${this.getCustomErrorContent()}
1201
1203
  </div>
1202
- `:d.html`
1204
+ `:h.html`
1203
1205
  <div
1204
1206
  id="md-combobox-listbox"
1205
1207
  part="combobox-options"
1206
1208
  aria-label=${this.ariaLabel||this.label}
1207
1209
  style=${this.addStyle()}
1208
- role=${(0,p.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
1210
+ role=${(0,u.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
1209
1211
  >
1210
- ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():d.nothing}
1211
- ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:d.nothing:this.renderWithoutVirtualScroll()}
1212
- ${this.options.length&&0===this.filteredOptions.length&&this.inputValue&&!this.allowCustomValue?d.html`
1212
+ ${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():h.nothing}
1213
+ ${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:h.nothing:this.renderWithoutVirtualScroll()}
1214
+ ${this.options.length&&0===this.filteredOptions.length&&this.inputValue&&!this.allowCustomValue?h.html`
1213
1215
  <div class="no-result md-combobox-option" role="option" aria-selected="false" tabindex="-1">
1214
1216
  ${this.resultsTextLocalization.trim()}
1215
1217
  </div>
1216
- `:d.nothing}
1217
- ${0===this.options.length?d.html`
1218
+ `:h.nothing}
1219
+ ${0===this.options.length?h.html`
1218
1220
  <div class="no-result md-combobox-option" role="option" aria-selected="false" tabindex="-1">
1219
1221
  ${this.optionsTextLocalization.trim()}
1220
1222
  </div>
1221
- `:d.nothing}
1223
+ `:h.nothing}
1222
1224
  </div>
1223
1225
  `}
1224
1226
  </div>
1225
- ${this.invalid?d.html`
1226
- <div part="message" class="md-combobox-error ${(0,c.classMap)({"md-new-combobox-error":this.newMomentum})}">
1227
+ ${this.invalid?h.html`
1228
+ <div part="message" class="md-combobox-error ${(0,p.classMap)({"md-new-combobox-error":this.newMomentum})}">
1227
1229
  <md-help-text .message=${this.invalidText} messageType="error"></md-help-text>
1228
1230
  </div>
1229
- `:d.nothing}
1231
+ `:h.nothing}
1230
1232
  ${this.messagesTemplate()} ${this.helpTextTemplate()}
1231
- `}};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={}))},6709(t,e,i){i.d(e,{CountryCodePicker:()=>o}),i(2273);var o,s=i(9609),r=i(4084),a=i(3060),n=i(5875),l=i(7161),d=i(429),h=i(5125),c=i(8175),p=i(8373),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 l.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.ariaLabel="",this.clearAriaLabel="Clear Country Code",this.id="",this.newMomentum=!1,this.isDropdownArrow=!0,this.countryCode="US",this.codeList=[]}connectedCallback(){super.connectedCallback(),this.codeList=(0,a.customArray)({name:"{countryNameEn}",value:"{countryCallingCode}",code:"{countryCode}"}),""===this.id&&(this.id=`md-country-code-picker-${Math.random().toString(36).substring(2,6)}`)}getCountryFlag(t){return l.html`
1233
+ `}};g([(0,c.property)({type:String})],i.prototype,"label",void 0),g([(0,c.property)({type:Array})],i.prototype,"options",void 0),g([(0,c.property)({type:Array,attribute:"custom-options"})],i.prototype,"customOptions",void 0),g([(0,c.property)({type:String})],i.prototype,"placeholder",void 0),g([(0,c.property)({type:Boolean,attribute:"is-multi"})],i.prototype,"isMulti",void 0),g([(0,c.property)({type:Boolean,attribute:"use-virtual-scroll"})],i.prototype,"useVirtualScroll",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"ordered",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"expanded",void 0),g([(0,c.property)({type:Array,reflect:!0})],i.prototype,"groupExpandedList",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),g([(0,c.property)({type:Boolean,attribute:"no-clear-icon"})],i.prototype,"noClearIcon",void 0),g([(0,c.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),g([(0,c.property)({type:Array})],i.prototype,"selectedOptions",void 0),g([(0,c.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),g([(0,c.property)({type:String,attribute:"option-id",reflect:!0})],i.prototype,"optionId",void 0),g([(0,c.property)({type:String,attribute:"option-value",reflect:!0})],i.prototype,"optionValue",void 0),g([(0,c.property)({type:Boolean,attribute:"with-custom-content"})],i.prototype,"isCustomContent",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),g([(0,c.property)({type:String})],i.prototype,"shape",void 0),g([(0,c.property)({type:Array})],i.prototype,"value",void 0),g([(0,c.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),g([(0,c.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],i.prototype,"allowCustomValue",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),g([(0,c.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),g([(0,c.property)({type:String,attribute:"no-options-i18n"})],i.prototype,"optionsTextLocalization",void 0),g([(0,c.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"invalid",void 0),g([(0,c.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],i.prototype,"invalidText",void 0),g([(0,c.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),g([(0,c.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),g([(0,c.state)()],i.prototype,"ariaLabelForComboBox",void 0),g([(0,c.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),g([(0,c.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),g([(0,c.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),g([(0,c.property)({type:String,attribute:"all-i18n"})],i.prototype,"allTextLocalization",void 0),g([(0,c.property)({type:String,attribute:"select-all-i18n"})],i.prototype,"selectAllTextLocalization",void 0),g([(0,c.property)({type:String,attribute:"selected-all-i18n"})],i.prototype,"selectedTextLocalization",void 0),g([(0,c.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],i.prototype,"allowSelectAll",void 0),g([(0,c.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],i.prototype,"showCustomError",void 0),g([(0,c.property)({type:Boolean,attribute:"show-loader",reflect:!0})],i.prototype,"showLoader",void 0),g([(0,c.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],i.prototype,"showSelectedCount",void 0),g([(0,c.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"newMomentum",void 0),g([(0,c.property)({type:Boolean,attribute:"show-filter-icon"})],i.prototype,"showFilterIcon",void 0),g([(0,c.property)({type:Boolean,attribute:"prevent-filter"})],i.prototype,"preventFilter",void 0),g([(0,c.property)({type:Boolean,attribute:"is-dropdown-arrow"})],i.prototype,"isDropdownArrow",void 0),g([(0,c.property)({type:String})],i.prototype,"comboboxId",void 0),g([(0,c.property)({type:String})],i.prototype,"helpText",void 0),g([(0,c.property)({type:Array})],i.prototype,"messageArr",void 0),g([(0,c.property)({type:String})],i.prototype,"htmlId",void 0),g([(0,c.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),g([(0,c.state)()],i.prototype,"isOptGroup",void 0),g([(0,c.state)()],i.prototype,"isSelectAllChecked",void 0),g([(0,c.query)(".group")],i.prototype,"group",void 0),g([(0,c.query)(".md-combobox-listbox")],i.prototype,"input",void 0),g([(0,c.query)(".md-combobox-button")],i.prototype,"button",void 0),g([(0,c.query)("div#md-combobox-listbox")],i.prototype,"listBox",void 0),g([(0,c.query)(".virtual-scroll")],i.prototype,"virtualizer",void 0),g([(0,c.queryAll)("div.md-combobox-option")],i.prototype,"lists",void 0),g([(0,c.queryAll)(".group-label")],i.prototype,"labels",void 0),g([(0,c.queryAll)(".md-combobox-selected-item")],i.prototype,"selected",void 0),i=g([(0,a.w)("md-combobox")],i),t.ELEMENT=i}(o||(o={}))},6709(t,e,i){i.d(e,{CountryCodePicker:()=>o}),i(2273);var o,s=i(9609),r=i(4084),a=i(3060),n=i(5875),l=i(7161),d=i(429),h=i(5125),c=i(8175),p=i(8373),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 l.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.ariaLabel="",this.clearAriaLabel="Clear Country Code",this.id="",this.newMomentum=!1,this.isDropdownArrow=!0,this.countryCode="US",this.codeList=[]}connectedCallback(){super.connectedCallback(),this.codeList=(0,a.customArray)({name:"{countryNameEn}",value:"{countryCallingCode}",code:"{countryCode}"}),""===this.id&&(this.id=`md-country-code-picker-${Math.random().toString(36).substring(2,6)}`)}getCountryFlag(t){return l.html`
1232
1234
  <span class="flag-svg-wrapper">
1233
1235
  <img src="${(0,n.findFlagUrlByIso2Code)(t)}" />
1234
1236
  </span>
@@ -1649,7 +1651,7 @@
1649
1651
  </div>
1650
1652
  </div>
1651
1653
  `:c.nothing}
1652
- `}};v([(0,p.property)({type:String})],e.prototype,"heading",void 0),v([(0,p.property)({type:String})],e.prototype,"label",void 0),v([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),v([(0,p.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),v([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),v([(0,p.property)({type:String,attribute:"maximize-icon-aria-label"})],e.prototype,"maximizeIconAriaLabel",void 0),v([(0,p.property)({type:Object})],e.prototype,"minPosition",void 0),v([(0,p.query)(".md-floating")],e.prototype,"container",void 0),v([(0,p.query)(".md-floating__header")],e.prototype,"header",void 0),v([(0,p.state)()],e.prototype,"dragOccured",void 0),v([(0,p.state)()],e.prototype,"containerTransform",void 0),e=v([(0,a.w)("md-floating-modal-minimized")],e),t.ELEMENT=e}(o||(o={}))},4262(t,e,i){i.d(e,{FloatingModal:()=>o}),i(5983),i(1821);var o,s=i(2900),r=i(7704),a=i(9609),n=i(4084),l=(i(8088),i(7346),i(9e3),i(727)),d=i.n(l),h=(i(3288),i(7161)),c=i(429),p=i(291),u=(i(5958),i(7262)),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};!function(t){let e=class extends((0,r.yC)((0,r.TS)(h.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.moveAriaLabel="Move Modal",this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.previouslyFocusedElement=null,this.applyInitialPosition=!0,this.handleModalKeyDown=t=>{this.show&&t.code===s.Uz.Escape&&(t.preventDefault(),t.stopPropagation(),this.handleClose(t))},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()},this.MOVE_STEP=10,this.handleMoveKeyDown=t=>{if(!this.container)return;const{code:e}=t;let i=0,o=0;switch(e){case"ArrowUp":o=-this.MOVE_STEP;break;case"ArrowDown":o=this.MOVE_STEP;break;case"ArrowLeft":i=-this.MOVE_STEP;break;case"ArrowRight":i=this.MOVE_STEP;break;default:return}t.preventDefault(),t.stopPropagation();const s=parseFloat(this.container.getAttribute("data-x")||"0")+i,r=parseFloat(this.container.getAttribute("data-y")||"0")+o;this.setTargetPosition(this.container,s,r),this.containerTransform=`translate(${s}px, ${r}px)`,this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:`${s}`,y:`${r}`}}}))}}static get styles(){return[n.A,u.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.capturePreviouslyFocusedElement(),this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance(),this.focusModalOnOpen()):(this.cleanContainerStyles(),this.destroyInteractInstance(),this.restoreFocusAfterClose())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition(),t.has("minimize")&&!0===t.get("minimize")&&!1===this.minimize&&this.show&&this.focusModalOnOpen()}getDeepActiveElementFromDocument(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}capturePreviouslyFocusedElement(){var t;const e=this.getDeepActiveElementFromDocument();e&&e!==document.body?(null===(t=this.shadowRoot)||void 0===t?void 0:t.contains(e))||this.contains(e)||(this.previouslyFocusedElement=e):this.previouslyFocusedElement=null}focusModalOnOpen(){requestAnimationFrame(()=>{var t;if(!this.show||!this.container)return;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-floating__header md-button.md-floating__header-button");e?e.focus():(this.container.setAttribute("tabindex","-1"),this.container.focus())})}restoreFocusAfterClose(){const t=this.previouslyFocusedElement;this.previouslyFocusedElement=null,t&&t.isConnected&&requestAnimationFrame(()=>{t.isConnected&&t.focus()})}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&&(d()(this.container).draggable({autoScroll:!0,allowFrom:this.header,ignoreFrom:this.body,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&d()(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.aspectRatio?[d().modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[d().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&&d().isSet(this.container)&&d()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return h.html`
1654
+ `}};v([(0,p.property)({type:String})],e.prototype,"heading",void 0),v([(0,p.property)({type:String})],e.prototype,"label",void 0),v([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),v([(0,p.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),v([(0,p.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),v([(0,p.property)({type:String,attribute:"maximize-icon-aria-label"})],e.prototype,"maximizeIconAriaLabel",void 0),v([(0,p.property)({type:Object})],e.prototype,"minPosition",void 0),v([(0,p.query)(".md-floating")],e.prototype,"container",void 0),v([(0,p.query)(".md-floating__header")],e.prototype,"header",void 0),v([(0,p.state)()],e.prototype,"dragOccured",void 0),v([(0,p.state)()],e.prototype,"containerTransform",void 0),e=v([(0,a.w)("md-floating-modal-minimized")],e),t.ELEMENT=e}(o||(o={}))},4262(t,e,i){i.d(e,{FloatingModal:()=>o}),i(5983),i(1821),i(9613);var o,s=i(2900),r=i(7704),a=i(9609),n=i(4084),l=(i(8088),i(7346),i(9e3),i(727)),d=i.n(l),h=(i(3288),i(7161)),c=i(429),p=i(291),u=(i(5958),i(7262)),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};!function(t){let e=class extends((0,r.yC)((0,r.TS)(h.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.moveAriaLabel="Move Modal",this.hideMoveButton=!1,this.maximizable=!0,this.resizable=!0,this.minimize=!1,this.minimizable=!1,this.containerRect=null,this.dragOccured=!1,this.containerTransform="",this.previouslyFocusedElement=null,this.applyInitialPosition=!0,this.DRAG_HANDLE_SELECTOR=".md-floating__header, .md-floating__header *, [slot='header'], [slot='header'] *",this.DRAG_IGNORE_SELECTOR=["md-button:not(.md-floating__move)","md-tooltip:not(.md-floating__move-tooltip)","button","a[href]","input","select","textarea","[contenteditable='true']","[role='button']","[data-floating-modal-ignore-drag]","[data-floating-modal-ignore-drag] *"].join(", "),this.RESIZE_IGNORE_SELECTOR=["md-button","md-tooltip","button","a[href]","input","select","textarea","[contenteditable='true']","[role='button']","[data-floating-modal-ignore-resize]","[data-floating-modal-ignore-resize] *"].join(", "),this.getResizeMinimumRect=()=>{var t,e;const i=this.container?getComputedStyle(this.container):null,o=Number.parseFloat(null!==(t=null==i?void 0:i.minWidth)&&void 0!==t?t:"")||0,s=Number.parseFloat(null!==(e=null==i?void 0:i.minHeight)&&void 0!==e?e:"")||0;return{top:0,left:0,right:o,bottom:s,width:o,height:s}},this.handleModalKeyDown=t=>{this.show&&t.code===s.Uz.Escape&&(t.preventDefault(),t.stopPropagation(),this.handleClose(t))},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=>{var e;const i=null!==(e=this.container)&&void 0!==e?e:t.target,{x:o,y:s}=this.getTransformValues(t,i);this.setTargetPosition(i,o,s),this.applyInitialPosition=!1},this.dragEndListener=()=>{this.dragOccured=!0,this.setContainerRect()},this.MOVE_STEP=10,this.handleMoveKeyDown=t=>{if(!this.container)return;const{code:e}=t;let i=0,o=0;switch(e){case"ArrowUp":o=-this.MOVE_STEP;break;case"ArrowDown":o=this.MOVE_STEP;break;case"ArrowLeft":i=-this.MOVE_STEP;break;case"ArrowRight":i=this.MOVE_STEP;break;default:return}t.preventDefault(),t.stopPropagation();const s=parseFloat(this.container.getAttribute("data-x")||"0")+i,r=parseFloat(this.container.getAttribute("data-y")||"0")+o;this.setTargetPosition(this.container,s,r),this.containerTransform=`translate(${s}px, ${r}px)`,this.dispatchEvent(new CustomEvent("floating-modal-location",{composed:!0,bubbles:!0,detail:{transform:{x:`${s}`,y:`${r}`}}}))},this.handleHeaderMoveKeyDown=t=>{this.hideMoveButton&&t.target===this.header&&this.handleMoveKeyDown(t)}}static get styles(){return[n.A,u.A]}updated(t){super.updated(t),t.has("show")&&(this.container&&this.show?(this.capturePreviouslyFocusedElement(),this.applyInitialPosition=!0,this.setContainerRect(),this.setInteractInstance(),this.focusModalOnOpen()):(this.cleanContainerStyles(),this.destroyInteractInstance(),this.restoreFocusAfterClose())),this.container&&t.has("position")&&!t.has("show")&&this.setInitialTargetPosition(),t.has("minimize")&&!0===t.get("minimize")&&!1===this.minimize&&this.show&&this.focusModalOnOpen()}getDeepActiveElementFromDocument(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}capturePreviouslyFocusedElement(){var t;const e=this.getDeepActiveElementFromDocument();e&&e!==document.body?(null===(t=this.shadowRoot)||void 0===t?void 0:t.contains(e))||this.contains(e)||(this.previouslyFocusedElement=e):this.previouslyFocusedElement=null}focusModalOnOpen(){requestAnimationFrame(()=>{var t;if(!this.show||!this.container)return;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".md-floating__header md-button.md-floating__header-button");e?e.focus():(this.container.setAttribute("tabindex","-1"),this.container.focus())})}restoreFocusAfterClose(){const t=this.previouslyFocusedElement;this.previouslyFocusedElement=null,t&&t.isConnected&&requestAnimationFrame(()=>{t.isConnected&&t.focus()})}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.show&&this.container&&(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})}getResizeModifiers(){const t=d().modifiers.restrictSize({min:this.getResizeMinimumRect});return this.aspectRatio?[d().modifiers.aspectRatio({ratio:"preserve",equalDelta:!0,modifiers:[t,d().modifiers.restrictSize({max:"parent"})]})]:[t]}setInteractInstance(){requestAnimationFrame(()=>{this.show&&this.container&&(d()(this).draggable({autoScroll:!0,allowFrom:this.DRAG_HANDLE_SELECTOR,ignoreFrom:this.DRAG_IGNORE_SELECTOR,listeners:{move:this.dragMoveListener,end:this.dragEndListener}}),this.resizable&&d()(this.container).resizable({edges:{left:!0,right:!0,bottom:!0,top:!0},ignoreFrom:this.RESIZE_IGNORE_SELECTOR,listeners:{end:this.resizeEndListener,move:this.resizeMoveListener},modifiers:this.getResizeModifiers()}).preventDefault("always"))})}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,e){const{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(){d().isSet(this)&&d()(this).unset(),this.container&&d().isSet(this.container)&&d()(this.container).unset()}disconnectedCallback(){super.disconnectedCallback(),this.destroyInteractInstance()}renderedCallback(){this.containerTransform=this.position?`translate(${this.position.x}px, ${this.position.y}px)`:""}render(){return h.html`
1653
1655
  ${this.show?h.html`
1654
1656
  <div
1655
1657
  class="md-floating ${this.fixed?"fixed":""} ${this.minimize?"hide":""}"
@@ -1660,58 +1662,85 @@
1660
1662
  @keydown=${this.handleModalKeyDown}
1661
1663
  style=${(0,p.ifDefined)(this.containerRect?this.centered?`\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n ${this.full?"width: 100% !important; height: 100% !important;":""}\n `:`width: ${this.full?"100% !important":`${this.containerRect.width}px !important`};\n height: ${this.full?"100% !important":`${this.containerRect.height}px !important`};\n top: ${this.full?"0 !important":""};\n left: ${this.full?"0 !important":""};\n bottom: ${this.full?"0 !important":""};\n right: ${this.full?"0 !important":""};\n ${this.full?"transform: none !important":""};\n ${this.full?"":`transform: ${this.position?`translate(${this.position.x}px, ${this.position.y}px)`:this.containerTransform} !important`};`:void 0)}
1662
1664
  >
1663
- <div class="md-floating__header">
1665
+ <div
1666
+ class="md-floating__header ${this.hideMoveButton&&!this.full?"md-floating__header--move-handle":""}"
1667
+ tabindex=${(0,p.ifDefined)(this.hideMoveButton&&!this.full?"0":void 0)}
1668
+ role=${(0,p.ifDefined)(this.hideMoveButton&&!this.full?"group":void 0)}
1669
+ aria-label=${(0,p.ifDefined)(this.hideMoveButton&&!this.full?this.moveAriaLabel:void 0)}
1670
+ @keydown=${this.handleHeaderMoveKeyDown}
1671
+ >
1664
1672
  <div class="md-floating__header-text" aria-hidden="true">
1665
1673
  ${this.heading?h.html` ${this.heading} `:h.html`
1666
1674
  ${!this.minimize&&this.headerSlot}
1667
1675
  <slot name="header"></slot>
1668
1676
  `}
1669
1677
  </div>
1670
- ${this.full?h.nothing:h.html` <md-button
1671
- color="color-none"
1672
- size="20"
1673
- class="md-floating__move md-floating__header-button"
1674
- ariaLabel="${this.moveAriaLabel}"
1675
- circle
1676
- @keydown=${this.handleMoveKeyDown}
1678
+ ${this.full||this.hideMoveButton?h.nothing:h.html` <md-tooltip
1679
+ class="md-floating__move-tooltip"
1680
+ message=${this.moveAriaLabel}
1681
+ placement="bottom"
1682
+ ?disabled=${!this.moveAriaLabel}
1677
1683
  >
1678
- <md-icon name="drag-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
1679
- </md-button>`}
1680
- ${this.minimizable?h.html` <md-button
1681
- color="color-none"
1682
- size="20"
1683
- class="md-floating__minimize md-floating__header-button"
1684
- ariaLabel="${this.minimizeAriaLabel}"
1685
- circle
1686
- @click=${this.handleMinimize}
1684
+ <md-button
1685
+ color="color-none"
1686
+ size="20"
1687
+ class="md-floating__move md-floating__header-button"
1688
+ ariaLabel="${this.moveAriaLabel}"
1689
+ circle
1690
+ @keydown=${this.handleMoveKeyDown}
1691
+ >
1692
+ <md-icon name="drag-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
1693
+ </md-button>
1694
+ </md-tooltip>`}
1695
+ ${this.minimizable?h.html` <md-tooltip
1696
+ message=${this.minimizeAriaLabel}
1697
+ placement="bottom"
1698
+ ?disabled=${!this.minimizeAriaLabel}
1687
1699
  >
1688
- <md-icon name="minus-bold" size="16" iconSet="momentumDesign" ariaHidden="true"></md-icon>
1689
- </md-button>`:h.nothing}
1690
- ${!this.minimize&&this.maximizable?h.html` <md-button
1691
- color="color-none"
1692
- size="20"
1693
- class="md-floating__resize md-floating__header-button"
1694
- ariaLabel="${this.full?this.resizeAriaLabel:this.maximizeScreenLabel}"
1695
- circle
1696
- @click=${this.handleToggleExpandCollapse}
1700
+ <md-button
1701
+ color="color-none"
1702
+ size="20"
1703
+ class="md-floating__minimize md-floating__header-button"
1704
+ ariaLabel="${this.minimizeAriaLabel}"
1705
+ circle
1706
+ @click=${this.handleMinimize}
1707
+ >
1708
+ <md-icon name="minus-bold" size="16" iconSet="momentumDesign" ariaHidden="true"></md-icon>
1709
+ </md-button>
1710
+ </md-tooltip>`:h.nothing}
1711
+ ${!this.minimize&&this.maximizable?h.html` <md-tooltip
1712
+ message=${this.full?this.resizeAriaLabel:this.maximizeScreenLabel}
1713
+ placement="bottom"
1714
+ ?disabled=${!(this.full?this.resizeAriaLabel:this.maximizeScreenLabel)}
1697
1715
  >
1698
- <md-icon
1699
- name=${this.full?"minimize-bold":"maximize-bold"}
1700
- size="16"
1701
- iconSet="momentumDesign"
1702
- ></md-icon>
1703
- </md-button>`:""}
1716
+ <md-button
1717
+ color="color-none"
1718
+ size="20"
1719
+ class="md-floating__resize md-floating__header-button"
1720
+ ariaLabel="${this.full?this.resizeAriaLabel:this.maximizeScreenLabel}"
1721
+ circle
1722
+ @click=${this.handleToggleExpandCollapse}
1723
+ >
1724
+ <md-icon
1725
+ name=${this.full?"minimize-bold":"maximize-bold"}
1726
+ size="16"
1727
+ iconSet="momentumDesign"
1728
+ ></md-icon>
1729
+ </md-button>
1730
+ </md-tooltip>`:""}
1704
1731
 
1705
- <md-button
1706
- color="color-none"
1707
- size="20"
1708
- class="md-floating__close md-floating__header-button"
1709
- ariaLabel="${this.closeAriaLabel}"
1710
- circle
1711
- @click=${this.handleClose}
1712
- >
1713
- <md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
1714
- </md-button>
1732
+ <md-tooltip message=${this.closeAriaLabel} placement="bottom" ?disabled=${!this.closeAriaLabel}>
1733
+ <md-button
1734
+ color="color-none"
1735
+ size="20"
1736
+ class="md-floating__close md-floating__header-button"
1737
+ ariaLabel="${this.closeAriaLabel}"
1738
+ circle
1739
+ @click=${this.handleClose}
1740
+ >
1741
+ <md-icon name="cancel-bold" size="16" iconSet="momentumDesign"></md-icon>
1742
+ </md-button>
1743
+ </md-tooltip>
1715
1744
  </div>
1716
1745
  <div class="md-floating__body" part="floating-body">
1717
1746
  <slot></slot>
@@ -1734,7 +1763,7 @@
1734
1763
  </md-floating-modal-minimized>
1735
1764
  </div>`:h.nothing}
1736
1765
  `:h.nothing}
1737
- `}};m([(0,c.property)({type:String})],e.prototype,"heading",void 0),m([(0,c.property)({type:String})],e.prototype,"label",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"aspect-ratio"})],e.prototype,"aspectRatio",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"centered"})],e.prototype,"centered",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"fixed-strategy"})],e.prototype,"fixed",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"full-screen"})],e.prototype,"full",void 0),m([(0,c.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),m([(0,c.property)({type:String,attribute:"resize-aria-label"})],e.prototype,"resizeAriaLabel",void 0),m([(0,c.property)({type:String,attribute:"maximize-aria-label"})],e.prototype,"maximizeScreenLabel",void 0),m([(0,c.property)({type:String,attribute:"minimize-aria-label"})],e.prototype,"minimizeAriaLabel",void 0),m([(0,c.property)({type:String,attribute:"move-aria-label"})],e.prototype,"moveAriaLabel",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"maximizable",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"resizable",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),m([(0,c.property)({type:Object})],e.prototype,"position",void 0),m([(0,c.property)({type:Object})],e.prototype,"minPosition",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"minimizable",void 0),m([(0,c.property)({type:Object})],e.prototype,"containerRect",void 0),m([(0,c.state)()],e.prototype,"dragOccured",void 0),m([(0,c.query)(".md-floating")],e.prototype,"container",void 0),m([(0,c.query)(".md-floating__body")],e.prototype,"body",void 0),m([(0,c.query)(".md-floating__header")],e.prototype,"header",void 0),m([(0,c.query)(".md-floating-min-parent")],e.prototype,"minimizedHeader",void 0),m([(0,c.query)('slot[name="header"]')],e.prototype,"headerSlot",void 0),e=m([(0,a.w)("md-floating-modal")],e),t.ELEMENT=e}(o||(o={}))},9147(t,e,i){i.d(e,{Form:()=>o});var o,s=i(7704),r=i(7161),a=i(429),n=i(291),l=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)(r.LitElement)){constructor(){super(...arguments),this.rel="",this.name="",this.action="",this.label="",this.method="get",this.target="_self",this.enctype="application/x-www-form-urlencoded",this.novalidate=!1,this.charset="UTF-8",this.isvalid=!1,this.token="on",this.allowRedirect=!1,this.autofillname="input-name",this.formElement=[],this.handleSubmit=t=>{t.preventDefault(),this.validated()&&this.submitForm()},this.handleFormSubmit=t=>{this.allowRedirect||t.preventDefault(),this.dispatchEvent(new CustomEvent("form-submitted",{composed:!0,bubbles:!0}))}}get formMethod(){return"GET"===this.method?"get":"POST"===this.method?"post":this.method}isSubmittable(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement}isDisabled(t){return t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")}findSubmittable(t,e){const i=Array.from(t.children);for(const t of i)if(!this.isDisabled(t))if(this.isSubmittable(t)&&e.add(t),t.shadowRoot)this.findSubmittable(t.shadowRoot,e);else if("SLOT"===t.tagName){const i=t.assignedElements();if(i.length){const{parentElement:t}=i[0];t&&this.findSubmittable(t,e)}}else this.findSubmittable(t,e);return[...e]}validated(){return!!this.novalidate||this.isvalid}submitForm(){const{form:t}=this;t.requestSubmit?t.requestSubmit():t.submit()}get submitButton(){return this.querySelector("button[type='submit']")||this.querySelector("input[type='submit']")||this.querySelector("md-button[type='submit']")}disconnectedCallback(){super.disconnectedCallback(),this.cleanupWrappedForms(),this.teardownEvents()}deleteWrappedForm(t){t.removeEventListener("submit",this.handleFormSubmit)}cleanupWrappedForms(){const{formElement:t}=this;if(t.length)for(const e of t)this.deleteWrappedForm(e);this.formElement=[]}createWrappedForm(t){const e=document.createElement("form");e.addEventListener("submit",this.handleFormSubmit);const{parentNode:i}=t;t.autocomplete=this.token,t.id||(t.id=this.autofillname),t.name||(t.name=this.autofillname),i&&(this.formElement.push(e),i.insertBefore(e,t),e.append(t))}teardownEvents(){this.submitButton&&this.submitButton.removeEventListener("click",this.handleSubmit)}setupEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.handleSubmit)}setupSubmittable(){const t=this.findSubmittable(this.form,new Set);if(t.length)for(const e of t)this.createWrappedForm(e)}slottedChanged(){this.setupSubmittable(),this.setupEvents()}render(){return r.html`
1766
+ `}};m([(0,c.property)({type:String})],e.prototype,"heading",void 0),m([(0,c.property)({type:String})],e.prototype,"label",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"aspect-ratio"})],e.prototype,"aspectRatio",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"centered"})],e.prototype,"centered",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"fixed-strategy"})],e.prototype,"fixed",void 0),m([(0,c.property)({type:Boolean,reflect:!0,attribute:"full-screen"})],e.prototype,"full",void 0),m([(0,c.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),m([(0,c.property)({type:String,attribute:"resize-aria-label"})],e.prototype,"resizeAriaLabel",void 0),m([(0,c.property)({type:String,attribute:"maximize-aria-label"})],e.prototype,"maximizeScreenLabel",void 0),m([(0,c.property)({type:String,attribute:"minimize-aria-label"})],e.prototype,"minimizeAriaLabel",void 0),m([(0,c.property)({type:String,attribute:"move-aria-label"})],e.prototype,"moveAriaLabel",void 0),m([(0,c.property)({type:Boolean,attribute:"hide-move-button"})],e.prototype,"hideMoveButton",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"maximizable",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"resizable",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),m([(0,c.property)({type:Object})],e.prototype,"position",void 0),m([(0,c.property)({type:Object})],e.prototype,"minPosition",void 0),m([(0,c.property)({type:Boolean,reflect:!0})],e.prototype,"minimizable",void 0),m([(0,c.property)({type:Object})],e.prototype,"containerRect",void 0),m([(0,c.state)()],e.prototype,"dragOccured",void 0),m([(0,c.query)(".md-floating")],e.prototype,"container",void 0),m([(0,c.query)(".md-floating__body")],e.prototype,"body",void 0),m([(0,c.query)(".md-floating__header")],e.prototype,"header",void 0),m([(0,c.query)(".md-floating-min-parent")],e.prototype,"minimizedHeader",void 0),m([(0,c.query)('slot[name="header"]')],e.prototype,"headerSlot",void 0),e=m([(0,a.w)("md-floating-modal")],e),t.ELEMENT=e}(o||(o={}))},9147(t,e,i){i.d(e,{Form:()=>o});var o,s=i(7704),r=i(7161),a=i(429),n=i(291),l=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)(r.LitElement)){constructor(){super(...arguments),this.rel="",this.name="",this.action="",this.label="",this.method="get",this.target="_self",this.enctype="application/x-www-form-urlencoded",this.novalidate=!1,this.charset="UTF-8",this.isvalid=!1,this.token="on",this.allowRedirect=!1,this.autofillname="input-name",this.formElement=[],this.handleSubmit=t=>{t.preventDefault(),this.validated()&&this.submitForm()},this.handleFormSubmit=t=>{this.allowRedirect||t.preventDefault(),this.dispatchEvent(new CustomEvent("form-submitted",{composed:!0,bubbles:!0}))}}get formMethod(){return"GET"===this.method?"get":"POST"===this.method?"post":this.method}isSubmittable(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement}isDisabled(t){return t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled")}findSubmittable(t,e){const i=Array.from(t.children);for(const t of i)if(!this.isDisabled(t))if(this.isSubmittable(t)&&e.add(t),t.shadowRoot)this.findSubmittable(t.shadowRoot,e);else if("SLOT"===t.tagName){const i=t.assignedElements();if(i.length){const{parentElement:t}=i[0];t&&this.findSubmittable(t,e)}}else this.findSubmittable(t,e);return[...e]}validated(){return!!this.novalidate||this.isvalid}submitForm(){const{form:t}=this;t.requestSubmit?t.requestSubmit():t.submit()}get submitButton(){return this.querySelector("button[type='submit']")||this.querySelector("input[type='submit']")||this.querySelector("md-button[type='submit']")}disconnectedCallback(){super.disconnectedCallback(),this.cleanupWrappedForms(),this.teardownEvents()}deleteWrappedForm(t){t.removeEventListener("submit",this.handleFormSubmit)}cleanupWrappedForms(){const{formElement:t}=this;if(t.length)for(const e of t)this.deleteWrappedForm(e);this.formElement=[]}createWrappedForm(t){const e=document.createElement("form");e.addEventListener("submit",this.handleFormSubmit);const{parentNode:i}=t;t.autocomplete=this.token,t.id||(t.id=this.autofillname),t.name||(t.name=this.autofillname),i&&(this.formElement.push(e),i.insertBefore(e,t),e.append(t))}teardownEvents(){this.submitButton&&this.submitButton.removeEventListener("click",this.handleSubmit)}setupEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.handleSubmit)}setupSubmittable(){const t=this.findSubmittable(this.form,new Set);if(t.length)for(const e of t)this.createWrappedForm(e)}slottedChanged(){this.setupSubmittable(),this.setupEvents()}render(){return r.html`
1738
1767
  <form
1739
1768
  class="md-form"
1740
1769
  role="form"
@@ -2652,7 +2681,7 @@
2652
2681
  @click=${t=>this.handleClick(t)}
2653
2682
  @keydown=${t=>this.handleKeydown(t)}
2654
2683
  ></button>
2655
- `}};p([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([(0,d.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),p([(0,d.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),p([(0,d.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),p([(0,d.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),p([(0,d.property)({type:String,attribute:"role",reflect:!0})],e.prototype,"role",void 0),p([(0,d.property)({type:String,reflect:!0})],e.prototype,"type",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),p([(0,d.property)({type:String})],e.prototype,"variant",void 0),p([(0,d.property)({type:Boolean,attribute:"visible-tab",reflect:!0})],e.prototype,"visibleTab",void 0),p([(0,d.property)({type:Number})],e.prototype,"size",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"viewportHidden",void 0),e=p([(0,r.w)("md-tab")],e),t.ELEMENT=e}(m||(m={}))},6056(t,e,i){i.d(e,{TabPanel:()=>o});var o,s=i(7704),r=i(9609),a=i(4084),n=i(7161),l=i(429),d=i(3272),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((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.selected=!1,this.name="",this.focusablePanel="true"}static get styles(){return[a.A,d.A]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tabpanel")}firstUpdated(t){super.firstUpdated(t),"true"===this.focusablePanel&&this.setAttribute("tabindex","0")}render(){return n.html` <slot></slot> `}};h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),h([(0,l.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),h([(0,l.property)({type:String,attribute:"focusable-panel"})],e.prototype,"focusablePanel",void 0),e=h([(0,r.w)("md-tab-panel")],e),t.ELEMENT=e}(o||(o={}))},8543(t,e,i){i.d(e,{Tabs:()=>O}),i(1821),i(708),i(9613);var o=i(2900),s=i(7704),r=i(2050),a=i(93),n=i(4084),l=i(7161),d=i(429),h=i(5125),c=i(291),p=i(8175),u=i(318),m=i(6968),v=i(1891),y=i.n(v),b=i(7103),g=i(3272),f=i(120),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.tabPanelHash={},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],v=this.getDragDirection(t);if(void 0!==c&&void 0!==p){switch(v){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(),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget())}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateAriaControlsElements(){this.visibleTabsContainerElement&&this.visibleTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])}),this.hiddenTabsContainerElement&&this.hiddenTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])})}getHiddenTabFocusTarget(t){return t&&!t.disabled&&this.isTabInMoreMenu(t)?t:this.tabsFilteredAsHiddenList.find(t=>t.selected&&!t.disabled)||this.tabsFilteredAsHiddenList.find(t=>!t.disabled)}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),{}),this.tabPanelHash=this.tabs.reduce((t,i,o)=>(e[o]&&(t[i.id]=e[o]),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(this.getHiddenTabFocusTarget(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=t-this.tabsFilteredAsVisibleList.length,r=this.tabsFilteredAsHiddenList[s];this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(r))}),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,d,h;const c=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==c?void 0:c.id)))return!1;let p;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?p=t.composedPath()[0].id:t.originalTarget&&(p=t.originalTarget.id),!p)return;const u=this.getNormalizedTabId(p);this.dispatchKeydownEvent(t,u);const m=t.code,{shiftKey:v}=t,y=!!this.isMoreTabMenuVisible&&u===C,b=y&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(u)],g=!this.isMoreTabMenuVisible||b&&this.tabsVisibleIdxHash[b.id]>-1,f=!!this.isMoreTabMenuVisible&&b&&this.tabsHiddenIdxHash[b.id]>-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1;switch(m){case o.Uz.Tab:y&&!this.isMoreTabMenuOpen&&v&&(t.preventDefault(),this.moveFocusToAdjacentTab(p,L));break;case o.Uz.End:y||(g?(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:g?(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:y||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(p,this.isRtl?I:A));break;case o.Uz.ArrowRight:y||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(p,this.isRtl?A:I));break;case o.Uz.ArrowUp:if(y);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?w:this.selected-1);else if(f&&b){t.preventDefault(),t.stopPropagation();const e=this.tabsHiddenIdxHash[b.id],i=this.tabsFilteredAsHiddenList.length,o=(e-1+i)%i,s=this.tabsFilteredAsHiddenList[o];this.updateHiddenIdPositiveTabIndex(s),this.moveFocusToTab(null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[o])}break;case o.Uz.ArrowDown:if(y);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===w?0:this.selected+1);else if(f&&b){t.preventDefault(),t.stopPropagation();const e=(this.tabsHiddenIdxHash[b.id]+1)%this.tabsFilteredAsHiddenList.length,i=this.tabsFilteredAsHiddenList[e];this.updateHiddenIdPositiveTabIndex(i),this.moveFocusToTab(null===(h=this.hiddenTabsContainerElement)||void 0===h?void 0:h.children[e])}break;case o.Uz.Enter:case o.Uz.NumpadEnter:case o.Uz.Space:if(y)this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget());else if(b&&!b.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(b.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e),f&&this.handleOverlayClose())}}}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=y().create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=y().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(),this.isMoreTabMenuVisible&&this.moreTabMenuElement&&(this.moreTabMenuElement.tabIndex=0),(this.visibleTabsContainerElement||this.hiddenTabsContainerElement)&&requestAnimationFrame(()=>this.updateAriaControlsElements())}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`
2684
+ `}};p([(0,d.property)({type:Number,reflect:!0})],e.prototype,"tabIndex",void 0),p([(0,d.property)({type:String,attribute:"aria-label"})],e.prototype,"ariaLabel",void 0),p([(0,d.property)({type:String,attribute:"closable"})],e.prototype,"closable",void 0),p([(0,d.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),p([(0,d.property)({type:Boolean,attribute:"cross-visible"})],e.prototype,"isCrossVisible",void 0),p([(0,d.property)({type:String,attribute:"role",reflect:!0})],e.prototype,"role",void 0),p([(0,d.property)({type:String,reflect:!0})],e.prototype,"type",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"newMomentum",void 0),p([(0,d.property)({type:Boolean})],e.prototype,"onlyIcon",void 0),p([(0,d.property)({type:String})],e.prototype,"variant",void 0),p([(0,d.property)({type:Boolean,attribute:"visible-tab",reflect:!0})],e.prototype,"visibleTab",void 0),p([(0,d.property)({type:Number})],e.prototype,"size",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"selected",null),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"vertical",void 0),p([(0,d.property)({type:Boolean,reflect:!0})],e.prototype,"viewportHidden",void 0),e=p([(0,r.w)("md-tab")],e),t.ELEMENT=e}(m||(m={}))},6056(t,e,i){i.d(e,{TabPanel:()=>o});var o,s=i(7704),r=i(9609),a=i(4084),n=i(7161),l=i(429),d=i(3272),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((0,s.yC)(n.LitElement)){constructor(){super(...arguments),this.selected=!1,this.name="",this.focusablePanel="true"}static get styles(){return[a.A,d.A]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tabpanel")}firstUpdated(t){super.firstUpdated(t),"true"===this.focusablePanel&&this.setAttribute("tabindex","0")}render(){return n.html` <slot></slot> `}};h([(0,l.property)({type:Boolean,reflect:!0})],e.prototype,"selected",void 0),h([(0,l.property)({type:String,attribute:"name"})],e.prototype,"name",void 0),h([(0,l.property)({type:String,attribute:"focusable-panel"})],e.prototype,"focusablePanel",void 0),e=h([(0,r.w)("md-tab-panel")],e),t.ELEMENT=e}(o||(o={}))},8543(t,e,i){i.d(e,{Tabs:()=>O}),i(1821),i(708),i(9613);var o=i(2900),s=i(7704),r=i(2050),a=i(93),n=i(4084),l=i(7161),d=i(429),h=i(5125),c=i(291),p=i(8175),u=i(318),m=i(6968),v=i(1891),y=i.n(v),b=i(7103),g=i(3272),f=i(120),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",A="hiddenToHidden",k="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.tabPanelHash={},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],v=this.getDragDirection(t);if(void 0!==c&&void 0!==p){switch(v){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 A:{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(),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget())}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(t=>t.selected)}updateAriaControlsElements(){this.visibleTabsContainerElement&&this.visibleTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])}),this.hiddenTabsContainerElement&&this.hiddenTabsContainerElement.querySelectorAll("md-tab").forEach(t=>{const e=this.getNormalizedTabId(t.id),i=this.tabPanelHash[e];i&&"ariaControlsElements"in t&&(t.ariaControlsElements=[i])})}getHiddenTabFocusTarget(t){return t&&!t.disabled&&this.isTabInMoreMenu(t)?t:this.tabsFilteredAsHiddenList.find(t=>t.selected&&!t.disabled)||this.tabsFilteredAsHiddenList.find(t=>!t.disabled)}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),{}),this.tabPanelHash=this.tabs.reduce((t,i,o)=>(e[o]&&(t[i.id]=e[o]),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?A: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(this.getHiddenTabFocusTarget(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=t-this.tabsFilteredAsVisibleList.length,r=this.tabsFilteredAsHiddenList[s];this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(r))}),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===k?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===k?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,d,h;const c=t.target;if(t.target!=this&&!this.tabs.find(t=>t.id===(null==c?void 0:c.id)))return!1;let p;if((null===(e=t.composedPath())||void 0===e?void 0:e.length)>0?p=t.composedPath()[0].id:t.originalTarget&&(p=t.originalTarget.id),!p)return;const u=this.getNormalizedTabId(p);this.dispatchKeydownEvent(t,u);const m=t.code,{shiftKey:v}=t,y=!!this.isMoreTabMenuVisible&&u===C,b=y&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(u)],g=!this.isMoreTabMenuVisible||b&&this.tabsVisibleIdxHash[b.id]>-1,f=!!this.isMoreTabMenuVisible&&b&&this.tabsHiddenIdxHash[b.id]>-1,w=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1;switch(m){case o.Uz.Tab:y&&!this.isMoreTabMenuOpen&&v&&(t.preventDefault(),this.moveFocusToAdjacentTab(p,L));break;case o.Uz.End:y||(g?(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:g?(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:y||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(p,this.isRtl?I:k));break;case o.Uz.ArrowRight:y||(g||this.scrollArrow)&&(t.stopPropagation(),this.moveFocusToAdjacentTab(p,this.isRtl?k:I));break;case o.Uz.ArrowUp:if(y);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(0===this.selected?w:this.selected-1);else if(f&&b){t.preventDefault(),t.stopPropagation();const e=this.tabsHiddenIdxHash[b.id],i=this.tabsFilteredAsHiddenList.length,o=(e-1+i)%i,s=this.tabsFilteredAsHiddenList[o];this.updateHiddenIdPositiveTabIndex(s),this.moveFocusToTab(null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[o])}break;case o.Uz.ArrowDown:if(y);else if(g&&"vertical"===this.direction)t.preventDefault(),this.changeSelectedTabIdx(this.selected===w?0:this.selected+1);else if(f&&b){t.preventDefault(),t.stopPropagation();const e=(this.tabsHiddenIdxHash[b.id]+1)%this.tabsFilteredAsHiddenList.length,i=this.tabsFilteredAsHiddenList[e];this.updateHiddenIdPositiveTabIndex(i),this.moveFocusToTab(null===(h=this.hiddenTabsContainerElement)||void 0===h?void 0:h.children[e])}break;case o.Uz.Enter:case o.Uz.NumpadEnter:case o.Uz.Space:if(y)this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget());else if(b&&!b.disabled){const e=this.tabsIdxHash[this.getNormalizedTabId(b.id)];-1!==e&&(t.preventDefault(),this.updateSelectedTab(e),f&&this.handleOverlayClose())}}}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=y().create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=y().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(),this.isMoreTabMenuVisible&&this.moreTabMenuElement&&(this.moreTabMenuElement.tabIndex=0),(this.visibleTabsContainerElement||this.hiddenTabsContainerElement)&&requestAnimationFrame(()=>this.updateAriaControlsElements())}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`
2656
2685
  <md-tab
2657
2686
  slot="menu-trigger"
2658
2687
  id="${C}"
@@ -2949,7 +2978,7 @@
2949
2978
  <slot @slotchange=${this.handleSlotChanged}></slot>
2950
2979
  </div>
2951
2980
  </div>
2952
- `}static get styles(){return[l.A,p.A]}};u([(0,h.property)({type:String})],e.prototype,"message",void 0),u([(0,h.property)({type:String,reflect:!0})],e.prototype,"placement",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"opened",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"slot-to-tooltip"})],e.prototype,"slotToTooltip",void 0),u([(0,h.query)(".md-tooltip__popper")],e.prototype,"popper",void 0),u([(0,h.query)(".md-tooltip__reference")],e.prototype,"reference",void 0),e=u([(0,a.w)("md-tooltip")],e),t.ELEMENT=e}(o||(o={}))},2900(t,e,i){var o,s,r,a;i.d(e,{R5:()=>s,Uz:()=>o,iw:()=>a}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(o||(o={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(s||(s={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(r||(r={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(a||(a={}))},371(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,ArrayValidators:()=>yt,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>c.uW,Badge:()=>u.Badge,Breadcrumb:()=>S.Breadcrumb,Button:()=>T.Button,ButtonGroup:()=>$.ButtonGroup,Card:()=>L.Card,CardAi:()=>k.CardAi,CardAlert:()=>A.CardAlert,CardV2:()=>I.CardV2,ChatMessage:()=>O.ChatMessage,Checkbox:()=>M.Checkbox,CheckboxGroup:()=>D.CheckboxGroup,Chip:()=>P.Chip,Coachmark:()=>_.Coachmark,CoachmarkPopover:()=>R.CoachmarkPopover,CodeEditor:()=>N,ComboBox:()=>U.ComboBox,CompositeAvatar:()=>p.CompositeAvatar,CountryCodePicker:()=>q.CountryCodePicker,DatePicker:()=>K.DatePicker,DatePickerCalendar:()=>G.DatePickerCalendar,DatePickerDay:()=>Y.DatePickerDay,DatePickerMonth:()=>X.DatePickerMonth,DatePickerWeek:()=>Z.DatePickerWeek,DateRangePicker:()=>H.DateRangePicker,DateTimePicker:()=>W.DateTimePicker,Draggable:()=>Q.Draggable,DraggableItem:()=>J.DraggableItem,Dropdown:()=>tt.Dropdown,EditableTextfield:()=>et.EditableTextfield,Favorite:()=>it.Favorite,FloatingButtonBar:()=>nt,FloatingMinimizedModal:()=>lt.FloatingMinimizedModal,FloatingModal:()=>dt.FloatingModal,Form:()=>bt.Form,FormArray:()=>ct,FormControl:()=>pt,FormGroup:()=>ut,Grabber:()=>gt.Grabber,HelpText:()=>ft.HelpText,Icon:()=>f.Icon,Input:()=>xt.Input,InputFile:()=>wt.InputFile,Label:()=>Ct.Label,Link:()=>Et.Link,List:()=>Ot.List,ListItem:()=>Mt.ListItem,ListItemV2:()=>kt,ListV2:()=>It,Loading:()=>Dt.Loading,MeetingAlert:()=>Pt.MeetingAlert,Menu:()=>_t.Menu,MenuItem:()=>Bt.MenuItem,MenuOverlay:()=>Rt.MenuOverlay,Modal:()=>zt.Modal,NotificationBadge:()=>E,Pagination:()=>Ft.Pagination,PhoneInput:()=>Vt.PhoneInput,Popover:()=>Nt.Popover,PopoverController:()=>Nt.PopoverController,Presence:()=>jt.Presence,ProgressBar:()=>Ut.ProgressBar,Radio:()=>qt.Radio,RadioGroup:()=>Ht.RadioGroup,Skeleton:()=>Kt,Slider:()=>Yt.Slider,Spinner:()=>Xt.Spinner,Tab:()=>Jt.Tab,TabPanel:()=>te.TabPanel,Table:()=>Qt.Table,TableAdvanced:()=>Zt.TableAdvanced,Tabs:()=>ee.Tabs,TaskItem:()=>ie.TaskItem,Theme:()=>oe.Theme,ThemeManager:()=>ne.ThemeManager,TimePicker:()=>se.TimePicker,ToggleSwitch:()=>re.ToggleSwitch,Tooltip:()=>ot.Tooltip,Validators:()=>mt,iconUrlManager:()=>ae.O,registerThemeManagerGlobally:()=>ne.registerThemeManagerGlobally,themeManager:()=>ne.themeManager});var o=i(3701),s=i(4466),r=i(2160),a=i(9236),n=i(9144),l=i(5925),d=i(3764),h=i(2245),c=i(4470),p=i(9124),u=i(7901),m=i(7704),v=i(7161),y=i(429),b=i(5125),g=i(291),f=i(1821),w=i(4958);const x=v.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 v.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 v.html`
2981
+ `}static get styles(){return[l.A,p.A]}};u([(0,h.property)({type:String})],e.prototype,"message",void 0),u([(0,h.property)({type:String,reflect:!0})],e.prototype,"placement",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),u([(0,h.property)({type:Boolean,reflect:!0})],e.prototype,"opened",void 0),u([(0,h.property)({type:Boolean,reflect:!0,attribute:"slot-to-tooltip"})],e.prototype,"slotToTooltip",void 0),u([(0,h.query)(".md-tooltip__popper")],e.prototype,"popper",void 0),u([(0,h.query)(".md-tooltip__reference")],e.prototype,"reference",void 0),e=u([(0,a.w)("md-tooltip")],e),t.ELEMENT=e}(o||(o={}))},2900(t,e,i){var o,s,r,a;i.d(e,{R5:()=>s,Uz:()=>o,iw:()=>a}),function(t){t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.Backspace="Backspace",t.Delete="Delete",t.End="End",t.Enter="Enter",t.Escape="Escape",t.Home="Home",t.Space="Space",t.Tab="Tab",t.Digit1="Digit1",t.Digit2="Digit2",t.Digit3="Digit3",t.Digit4="Digit4",t.Digit5="Digit5",t.Digit6="Digit6",t.Digit7="Digit7",t.Digit8="Digit8",t.Digit9="Digit9",t.NumpadEnter="NumpadEnter"}(o||(o={})),function(t){t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.AM_PM="am_pm"}(s||(s={})),function(t){t.GRAMMAR="grammar",t.FALSE="false",t.SPELLING="spelling",t.TRUE="true"}(r||(r={})),function(t){t.AriaActivedescendant="aria-activedescendant"}(a||(a={}))},371(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,ArrayValidators:()=>yt,AudioPlayer:()=>d.AudioPlayer,Avatar:()=>h.Avatar,AvatarType:()=>c.uW,Badge:()=>u.Badge,Breadcrumb:()=>S.Breadcrumb,Button:()=>T.Button,ButtonGroup:()=>$.ButtonGroup,Card:()=>L.Card,CardAi:()=>A.CardAi,CardAlert:()=>k.CardAlert,CardV2:()=>I.CardV2,ChatMessage:()=>O.ChatMessage,Checkbox:()=>M.Checkbox,CheckboxGroup:()=>D.CheckboxGroup,Chip:()=>P.Chip,Coachmark:()=>_.Coachmark,CoachmarkPopover:()=>R.CoachmarkPopover,CodeEditor:()=>N,ComboBox:()=>U.ComboBox,CompositeAvatar:()=>p.CompositeAvatar,CountryCodePicker:()=>q.CountryCodePicker,DatePicker:()=>K.DatePicker,DatePickerCalendar:()=>G.DatePickerCalendar,DatePickerDay:()=>Y.DatePickerDay,DatePickerMonth:()=>X.DatePickerMonth,DatePickerWeek:()=>Z.DatePickerWeek,DateRangePicker:()=>H.DateRangePicker,DateTimePicker:()=>W.DateTimePicker,Draggable:()=>Q.Draggable,DraggableItem:()=>J.DraggableItem,Dropdown:()=>tt.Dropdown,EditableTextfield:()=>et.EditableTextfield,Favorite:()=>it.Favorite,FloatingButtonBar:()=>nt,FloatingMinimizedModal:()=>lt.FloatingMinimizedModal,FloatingModal:()=>dt.FloatingModal,Form:()=>bt.Form,FormArray:()=>ct,FormControl:()=>pt,FormGroup:()=>ut,Grabber:()=>gt.Grabber,HelpText:()=>ft.HelpText,Icon:()=>f.Icon,Input:()=>xt.Input,InputFile:()=>wt.InputFile,Label:()=>Ct.Label,Link:()=>Et.Link,List:()=>Ot.List,ListItem:()=>Mt.ListItem,ListItemV2:()=>At,ListV2:()=>It,Loading:()=>Dt.Loading,MeetingAlert:()=>Pt.MeetingAlert,Menu:()=>_t.Menu,MenuItem:()=>Bt.MenuItem,MenuOverlay:()=>Rt.MenuOverlay,Modal:()=>zt.Modal,NotificationBadge:()=>E,Pagination:()=>Ft.Pagination,PhoneInput:()=>Vt.PhoneInput,Popover:()=>Nt.Popover,PopoverController:()=>Nt.PopoverController,Presence:()=>jt.Presence,ProgressBar:()=>Ut.ProgressBar,Radio:()=>qt.Radio,RadioGroup:()=>Ht.RadioGroup,Skeleton:()=>Kt,Slider:()=>Yt.Slider,Spinner:()=>Xt.Spinner,Tab:()=>Jt.Tab,TabPanel:()=>te.TabPanel,Table:()=>Qt.Table,TableAdvanced:()=>Zt.TableAdvanced,Tabs:()=>ee.Tabs,TaskItem:()=>ie.TaskItem,Theme:()=>oe.Theme,ThemeManager:()=>ne.ThemeManager,TimePicker:()=>se.TimePicker,ToggleSwitch:()=>re.ToggleSwitch,Tooltip:()=>ot.Tooltip,Validators:()=>mt,iconUrlManager:()=>ae.O,registerThemeManagerGlobally:()=>ne.registerThemeManagerGlobally,themeManager:()=>ne.themeManager});var o=i(3701),s=i(4466),r=i(2160),a=i(9236),n=i(9144),l=i(5925),d=i(3764),h=i(2245),c=i(4470),p=i(9124),u=i(7901),m=i(7704),v=i(7161),y=i(429),b=i(5125),g=i(291),f=i(1821),w=i(4958);const x=v.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 v.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 v.html`
2953
2982
  <md-icon
2954
2983
  class="md-notification-badge-icon ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay,[`md-notification-badge-icon__${e}`]:!0})}"
2955
2984
  iconSet="momentumDesign"
@@ -2962,7 +2991,7 @@
2962
2991
  <div class="md-notification-badge-text ${(0,b.classMap)({"md-notification-badge-overlay":this.overlay})}">
2963
2992
  ${this.getCounterText(this.maxCounter,this.counter)}
2964
2993
  </div>
2965
- `}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,y.property)({type:String,reflect:!0})],E.prototype,"type",void 0),C([(0,y.property)({type:String,reflect:!0})],E.prototype,"variant",void 0),C([(0,y.property)({type:Number})],E.prototype,"counter",void 0),C([(0,y.property)({type:Number,attribute:"max-counter",reflect:!0})],E.prototype,"maxCounter",void 0),C([(0,y.property)({type:Boolean})],E.prototype,"overlay",void 0),C([(0,y.property)({type:String,attribute:"icon-name"})],E.prototype,"iconName",void 0),C([(0,y.property)({type:String,attribute:"aria-label"})],E.prototype,"ariaLabel",void 0),E=C([(0,m.wW)("md-notification-badge")],E);var S=i(3445),$=i(2890),T=i(5983),k=i(7224),A=i(4882),I=i(7540),L=i(1499),O=i(5558),M=i(8381),D=i(4870),P=i(2583),R=i(7744),_=i(1869),B=i(4084),z=i(5001),F=i.n(z);const V=v.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,j=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 v.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[B.A,V]}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),F().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,i=void 0,s=function*(){try{const{default:e}=yield import(`highlight.js/lib/languages/${t}`);F().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},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}getAllAcceptTypes(){const t=F().listLanguages();return t.length?t.map(t=>F().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 v.html`
2994
+ `}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,y.property)({type:String,reflect:!0})],E.prototype,"type",void 0),C([(0,y.property)({type:String,reflect:!0})],E.prototype,"variant",void 0),C([(0,y.property)({type:Number})],E.prototype,"counter",void 0),C([(0,y.property)({type:Number,attribute:"max-counter",reflect:!0})],E.prototype,"maxCounter",void 0),C([(0,y.property)({type:Boolean})],E.prototype,"overlay",void 0),C([(0,y.property)({type:String,attribute:"icon-name"})],E.prototype,"iconName",void 0),C([(0,y.property)({type:String,attribute:"aria-label"})],E.prototype,"ariaLabel",void 0),E=C([(0,m.wW)("md-notification-badge")],E);var S=i(3445),$=i(2890),T=i(5983),A=i(7224),k=i(4882),I=i(7540),L=i(1499),O=i(5558),M=i(8381),D=i(4870),P=i(2583),R=i(7744),_=i(1869),B=i(4084),z=i(5001),F=i.n(z);const V=v.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,j=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 v.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[B.A,V]}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),F().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,i=void 0,s=function*(){try{const{default:e}=yield import(`highlight.js/lib/languages/${t}`);F().registerLanguage(`${t}`,e),this.setAcceptTypes()}catch(t){console.warn("Please set correct language name")}},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}getAllAcceptTypes(){const t=F().listLanguages();return t.length?t.map(t=>F().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 v.html`
2966
2995
  <div class="md-code-editor" part="code-editor">
2967
2996
  <div class="md-code-editor-header">
2968
2997
  <div class="md-code-editor-name">
@@ -3027,7 +3056,7 @@
3027
3056
  `}getActionTemplate(t){return t.isIconOnly?this.getTooltipCircleButtonTemplate(t):this.getPillButtonTemplate(t)}getActionGroupTemplate(t){return v.html` ${this.separatorTemplate} ${t.actions.map(t=>this.getActionTemplate(t))} `}render(){return v.html`
3028
3057
  ${this.showCloseButton?this.closeButtonTemplate:v.nothing} ${this.getSecondaryLabelTemplate(this.leadingLabel)}
3029
3058
  ${this.actions.map(t=>this.getActionGroupTemplate(t))}
3030
- `}};at([(0,y.property)({type:String})],nt.prototype,"leadingLabel",void 0),at([(0,y.property)({type:String})],nt.prototype,"closeButtonAriaLabel",void 0),at([(0,y.property)({type:Boolean})],nt.prototype,"showCloseButton",void 0),at([(0,y.property)({type:Array})],nt.prototype,"actions",void 0),nt=at([(0,st.w)("md-floating-button-bar")],nt);var lt=i(5958),dt=i(4262);class ht{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 ct extends ht{constructor(t,e=[]){var i;super(),this.controls=t,this.arrayValidators=e,this.inArrayValidation=!1,this.childChanged=()=>{this.inArrayValidation||this.runArrayValidators(),this.emitChange()},this.arrayValidators=e;for(const t of this.controls)null===(i=t.onChange)||void 0===i||i.call(t,()=>{this.childChanged()}),this.childChanged()}at(t){return this.controls[t]}runArrayValidators(){if(this.arrayValidators.length){this.inArrayValidation=!0;try{for(const t of this.arrayValidators)t(this)}finally{this.inArrayValidation=!1}}}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>{this.childChanged()}),this.childChanged()}removeAt(t){this.controls.splice(t,1),this.childChanged()}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.childChanged()}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 pt extends ht{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.groupErrors=[],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&&0===this.groupErrors.length}get errors(){return[...this.touched?this.validationErrors:[],...this.groupErrors]}addGroupError(t){const e=this.groupErrors.filter(e=>e.type!==t.type);this.groupErrors=[...e,t],this.emitChange()}clearGroupErrorsByType(t){const e=this.groupErrors.filter(e=>e.type!==t);e.length!==this.groupErrors.length&&(this.groupErrors=e,this.emitChange())}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class ut extends ht{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 mt={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,nonNegative:()=>t=>null==t?null:t<0?{type:"nonNegative"}:null},vt="increasingOnly",yt={strictIncreasingOnly:function(t){return e=>{const i=e.getControls();let o=null;for(const e of i)t(e).clearGroupErrorsByType(vt);for(const e of i){const i=t(e),s=i.value;if(null==s||Number.isNaN(s))break;if(null!=o&&Number(s)<=Number(o)){i.addGroupError({type:vt,count:o});break}o=s}}}};var bt=i(9147),gt=i(8637),ft=i(7906),wt=i(6436),xt=i(9189),Ct=i(2369),Et=i(5095),St=i(2900),$t=i(7154);const Tt=v.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 kt,At=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 v.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return v.html`
3059
+ `}};at([(0,y.property)({type:String})],nt.prototype,"leadingLabel",void 0),at([(0,y.property)({type:String})],nt.prototype,"closeButtonAriaLabel",void 0),at([(0,y.property)({type:Boolean})],nt.prototype,"showCloseButton",void 0),at([(0,y.property)({type:Array})],nt.prototype,"actions",void 0),nt=at([(0,st.w)("md-floating-button-bar")],nt);var lt=i(5958),dt=i(4262);class ht{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 ct extends ht{constructor(t,e=[]){var i;super(),this.controls=t,this.arrayValidators=e,this.inArrayValidation=!1,this.childChanged=()=>{this.inArrayValidation||this.runArrayValidators(),this.emitChange()},this.arrayValidators=e;for(const t of this.controls)null===(i=t.onChange)||void 0===i||i.call(t,()=>{this.childChanged()}),this.childChanged()}at(t){return this.controls[t]}runArrayValidators(){if(this.arrayValidators.length){this.inArrayValidation=!0;try{for(const t of this.arrayValidators)t(this)}finally{this.inArrayValidation=!1}}}push(t){var e;this.controls.push(t),null===(e=t.onChange)||void 0===e||e.call(t,()=>{this.childChanged()}),this.childChanged()}removeAt(t){this.controls.splice(t,1),this.childChanged()}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.childChanged()}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 pt extends ht{constructor(t,e=[]){super(),this.validationErrors=[],this.touched=!1,this.groupErrors=[],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&&0===this.groupErrors.length}get errors(){return[...this.touched?this.validationErrors:[],...this.groupErrors]}addGroupError(t){const e=this.groupErrors.filter(e=>e.type!==t.type);this.groupErrors=[...e,t],this.emitChange()}clearGroupErrorsByType(t){const e=this.groupErrors.filter(e=>e.type!==t);e.length!==this.groupErrors.length&&(this.groupErrors=e,this.emitChange())}setValue(t){this.currentValue=t,this.markAsTouched()}validate(){this.emitChange(),this.validationErrors=this.validators.map(t=>t(this.currentValue)).filter(t=>null!==t)}}class ut extends ht{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 mt={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,nonNegative:()=>t=>null==t?null:t<0?{type:"nonNegative"}:null},vt="increasingOnly",yt={strictIncreasingOnly:function(t){return e=>{const i=e.getControls();let o=null;for(const e of i)t(e).clearGroupErrorsByType(vt);for(const e of i){const i=t(e),s=i.value;if(null==s||Number.isNaN(s))break;if(null!=o&&Number(s)<=Number(o)){i.addGroupError({type:vt,count:o});break}o=s}}}};var bt=i(9147),gt=i(8637),ft=i(7906),wt=i(6436),xt=i(9189),Ct=i(2369),Et=i(5095),St=i(2900),$t=i(7154);const Tt=v.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 At,kt=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 v.LitElement{constructor(){super(...arguments),this.expandable=!1,this.expanded=!1,this.disabled=!1,this.variant="full-width",this.expandLabel="Expand"}render(){return v.html`
3031
3060
  <slot name="content">
3032
3061
  <div class="header">
3033
3062
  <div part="header-leading">
@@ -3078,4 +3107,4 @@
3078
3107
  @click=${this.stopEventPropagation}
3079
3108
  @keyup=${this.stopEventPropagation}
3080
3109
  @keydown=${this.stopEventPropagation}
3081
- ></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,$t.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===St.Uz.ArrowRight||t===St.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,$t.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==St.Uz.ArrowRight||this.expanded?t.key===St.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return Tt}};At([(0,y.property)({type:String,reflect:!0})],e.prototype,"label",void 0),At([(0,y.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),At([(0,y.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),At([(0,y.property)({type:Boolean})],e.prototype,"expandable",void 0),At([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),At([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),At([(0,y.property)({type:String})],e.prototype,"variant",void 0),At([(0,y.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),At([(0,y.query)(".header")],e.prototype,"header",void 0),e=At([(0,st.w)("md-list-item-v2")],e),t.ELEMENT=e}(kt||(kt={}));var It,Lt=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 v.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return v.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof kt.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case St.Uz.ArrowDown:return(e+1)%i;case St.Uz.ArrowUp:return(e-1+i)%i;case St.Uz.Home:return 0;case St.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return Tt}};Lt([(0,y.property)({type:String})],e.prototype,"gap",void 0),Lt([(0,y.property)({type:String})],e.prototype,"orientation",void 0),Lt([(0,y.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=Lt([(0,st.w)("md-list-v2")],e),t.ELEMENT=e}(It||(It={}));var Ot=i(6131),Mt=i(8552),Dt=i(1161),Pt=i(7030),Rt=i(708),_t=i(4085),Bt=i(5410),zt=i(329),Ft=i(8751),Vt=i(5566),Nt=i(405),jt=i(3477),Ut=i(2708),qt=i(3949),Ht=i(8358);const Wt=v.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var Kt,Gt=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 v.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,v.html`<slot></slot>`}static get styles(){return[Wt]}};Gt([(0,y.property)({type:String})],e.prototype,"width",void 0),Gt([(0,y.property)({type:String})],e.prototype,"height",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"variant",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"animation",void 0),e=Gt([(0,st.w)("md-skeleton")],e),t.ELEMENT=e}(Kt||(Kt={}));var Yt=i(3773),Xt=i(9773),Zt=i(7936),Qt=i(3273),Jt=i(120),te=i(6056),ee=i(8543),ie=i(1479),oe=i(1853),se=i(2218),re=i(6328),ae=i(7253),ne=i(3876)},3876(t,e,i){i.d(e,{ThemeManager:()=>s,registerThemeManagerGlobally:()=>a,themeManager:()=>r});var o=i(5314);class s{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.backgroundMode="DEFAULT",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,o.makeObservable)(this,{isDarkMode:o.observable,themeName:o.observable,backgroundMode:o.observable,isVisualRebrandEnabled:o.observable,isMomentumAvatarEnabled:o.observable,isMomentumV2Enabled:o.computed,setDarkMode:o.action,setThemeName:o.action,setBackgroundMode:o.action,setVisualRebrandEnabled:o.action,setMomentumAvatar:o.action,update:o.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.backgroundMode&&(this.backgroundMode=t.backgroundMode),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setBackgroundMode(t){this.backgroundMode=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new s;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}},7704(t,e,i){i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(2364);var o=i(3203),s=i(9938),r=i(5201),a=i(4781),n=i(608),l=i(9609)},2050(t,e,i){i.d(e,{QZ:()=>r,Qx:()=>a,XI:()=>l,dw:()=>d,qi:()=>n,sg:()=>s,ws:()=>o});const o=(t,e)=>{const i=[];[e].forEach(e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const o=[],s=t.toLowerCase(),r=e.toLowerCase();let a=0,n=s.indexOf(r,a);for(;n>-1;)a=n+i,o.push([n,a]),n=s.indexOf(r,n+1);return o})(t,e))});const o=(([...t])=>{if(!t.length)return[];t.sort((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]);const e=[];let i=t[0][0],o=t[0][1];return t.shift(),t.forEach(([t,s])=>{t>=o?(e.push([i,o]),i=t,o=s):s>o&&(o=s)}),e.push([i,o]),e})(i),s=[];let r=0;return o.forEach(([e,i])=>{r!==e&&s.push({range:[e,i],matching:!1,text:t.slice(r,e)}),s.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i}),r!==t.length&&s.push({range:[r],matching:!1,text:t.slice(r)}),s};function s(t,e,i){let o;return function(...s){const r=this,a=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(r,s)},e),a&&t.apply(r,s)}}function r(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}function a(t,e){return e>=0&&e<t.length?t[e]:void 0}function n(t,e=document){var i;const o=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(o)return o;const s=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of s){const i=n(t,e);if(i)return i}return null}function l(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of i){const i=l(t,e);if(i)return i}return null}function d(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}},7154(t,e,i){i.d(e,{o:()=>r,q:()=>a});var o=i(2900);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)}},5784(t){t.exports=b},8088(t){t.exports=E},7346(t){t.exports=S},9e3(t){t.exports=$},727(t){t.exports=T},3288(t){t.exports=k},3048(t){t.exports=l},2022(t){t.exports=r},554(t){t.exports=a},4893(t){t.exports=O},2962(t){t.exports=p},6538(t){t.exports=u},8250(t){t.exports=m},9371(t){t.exports=v},4863(t){t.exports=y},3060(t){t.exports=f},5875(t){t.exports=w},1347(t){t.exports=C},5001(t){t.exports=g},860(t){t.exports=A},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=s},8175(t){t.exports=h},318(t){t.exports=o},6968(t){t.exports=I},9756(t){t.exports=d},5796(t){t.exports=c},5314(t){t.exports=n},8187(t){t.exports=L},1891(t){t.exports=x}},P={};function R(t){var e=P[t];if(void 0!==e)return e.exports;var i=P[t]={exports:{}};return D[t].call(i.exports,i,i.exports,R),i.exports}R.m=D,M=[],R.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<M.length;l++){for(var[e,i,o]=M[l],r=!0,a=0;a<e.length;a++)(!1&o||s>=o)&&Object.keys(R.O).every(t=>R.O[t](e[a]))?e.splice(a--,1):(r=!1,o<s&&(s=o));if(r){M.splice(l--,1);var n=i();void 0!==n&&(t=n)}}return t}o=o||0;for(var l=M.length;l>0&&M[l-1][2]>o;l--)M[l]=M[l-1];M[l]=[e,i,o]},R.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return R.d(e,{a:e}),e},R.d=(t,e)=>{for(var i in e)R.o(e,i)&&!R.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},R.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),R.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),R.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={378:0,445:0,502:0,519:0,555:0,561:0,708:0,762:0,801:0,953:0,1037:0,1266:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,1821:0,2050:0,2105:0,2139:0,2169:0,2245:0,2273:0,2330:0,2369:0,2434:0,2708:0,2779:0,2781:0,2900:0,2909:0,2942:0,3079:0,3413:0,3539:0,3639:0,3747:0,3876:0,3938:0,3943:0,4131:0,4139:0,4259:0,4431:0,4545:0,4908:0,4928:0,4958:0,4971:0,5156:0,5310:0,5323:0,5369:0,5517:0,5757:0,5983:0,6029:0,6060:0,6085:0,6132:0,6220:0,6433:0,6494:0,6587:0,6724:0,6753:0,6812:0,6834:0,6920:0,7145:0,7154:0,7219:0,7455:0,7684:0,7704:0,7711:0,7906:0,7927:0,8111:0,8115:0,8138:0,8180:0,8220:0,8334:0,8339:0,8371:0,8442:0,8510:0,8619:0,8654:0,8894:0,9189:0,9237:0,9613:0,9669:0,9773:0};R.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[r,a,n]=i,l=0;if(r.some(e=>0!==t[e])){for(o in a)R.o(a,o)&&(R.m[o]=a[o]);if(n)var d=n(R)}for(e&&e(i);l<r.length;l++)s=r[l],R.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return R.O(d)},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 _=R.O(void 0,[7103,9609,4084,3305,4739,9488,2364,8441,2797,4700,3970,6343,9336,9146,7582,3842,7162,6325,4449,1392,2492,4047,1618,3331,3272,740,6631,93,9558,3543,878,7231,5846,742,4973,476,8373,7262,6816,3051,9431,6573,8663,861,5057,6005,8687,8881,1816,887,4839,5410,226,7137,9404,2297,7155,2670,513,9940,4242,1928,9956,2927,3013,9316,6429,7911,2991,9485,6843,3241],()=>R(371));return R.O(_)})());
3110
+ ></slot>`}stopArrowKeyEventPropagation(t){t instanceof KeyboardEvent&&(0,$t.q)(t.key)&&t.stopPropagation()}isExpandCollapseKey(t){return t===St.Uz.ArrowRight||t===St.Uz.ArrowLeft}stopEventPropagation(t){(t instanceof KeyboardEvent&&((0,$t.o)(t.key)||this.isExpandCollapseKey(t.key))||t instanceof MouseEvent)&&t.stopPropagation()}setExpanded(t){this.expanded=t,this.setAttribute("aria-expanded",String(this.expanded)),this.dispatchEvent(new CustomEvent("list-item-expanded",{bubbles:!0,detail:this.expanded}))}_handleExpand(t){t.stopPropagation(),this.expandable&&this.setExpanded(!this.expanded)}_handleListItemClick(t){const e=t.composedPath(),i=e[0];!e.includes(this.header)&&i!==this||this.disabled||this.dispatchEvent(new CustomEvent("list-item-click",{bubbles:!0}))}_handleArrowKeyExpand(t){t.key!==St.Uz.ArrowRight||this.expanded?t.key===St.Uz.ArrowLeft&&this.expanded&&(t.stopPropagation(),this.setExpanded(!1)):(t.stopPropagation(),this.setExpanded(!0))}connectedCallback(){super.connectedCallback(),this.setAttribute("role","listitem"),this.setAttribute("tabindex","0"),this.addEventListener("click",this._handleListItemClick),this.expandable&&this.addEventListener("keydown",this._handleArrowKeyExpand)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._handleListItemClick),this.removeEventListener("keydown",this._handleArrowKeyExpand)}static get styles(){return Tt}};kt([(0,y.property)({type:String,reflect:!0})],e.prototype,"label",void 0),kt([(0,y.property)({type:String,reflect:!0,attribute:"secondary-label"})],e.prototype,"secondaryLabel",void 0),kt([(0,y.property)({type:String,reflect:!0,attribute:"tertiary-label"})],e.prototype,"tertiaryLabel",void 0),kt([(0,y.property)({type:Boolean})],e.prototype,"expandable",void 0),kt([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"expanded",void 0),kt([(0,y.property)({type:Boolean,reflect:!0})],e.prototype,"disabled",void 0),kt([(0,y.property)({type:String})],e.prototype,"variant",void 0),kt([(0,y.property)({type:String,attribute:"expand-label"})],e.prototype,"expandLabel",void 0),kt([(0,y.query)(".header")],e.prototype,"header",void 0),e=kt([(0,st.w)("md-list-item-v2")],e),t.ELEMENT=e}(At||(At={}));var It,Lt=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 v.LitElement{constructor(){super(...arguments),this.gap="none",this.orientation="vertical"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","list"),this.addEventListener("keydown",this.handleKeyDown)}render(){return v.html` <slot @click=${this.handleMouseClick}></slot>`}get listItems(){return Array.from(this.assignedNodes).filter(t=>t instanceof At.ELEMENT&&!t.disabled)}handleMouseClick(t){const e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}getNewIndexBasedOnKey(t,e,i){switch(t){case St.Uz.ArrowDown:return(e+1)%i;case St.Uz.ArrowUp:return(e-1+i)%i;case St.Uz.Home:return 0;case St.Uz.End:return i-1;default:return}}handleKeyDown(t){var e;const i=this.getCurrentIndex(t.target),o=this.getNewIndexBasedOnKey(t.key,i,this.listItems.length);void 0!==o&&(null===(e=this.listItems[o])||void 0===e||e.focus(),this.resetTabIndexAndSetActiveTabIndex(o))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,i)=>{const o=t===i?"0":"-1";e.setAttribute("tabindex",o)})}static get styles(){return Tt}};Lt([(0,y.property)({type:String})],e.prototype,"gap",void 0),Lt([(0,y.property)({type:String})],e.prototype,"orientation",void 0),Lt([(0,y.queryAssignedNodes)()],e.prototype,"assignedNodes",void 0),e=Lt([(0,st.w)("md-list-v2")],e),t.ELEMENT=e}(It||(It={}));var Ot=i(6131),Mt=i(8552),Dt=i(1161),Pt=i(7030),Rt=i(708),_t=i(4085),Bt=i(5410),zt=i(329),Ft=i(8751),Vt=i(5566),Nt=i(405),jt=i(3477),Ut=i(2708),qt=i(3949),Ht=i(8358);const Wt=v.css`:host{width:100%;height:100%;display:block;background-color:var(--md-textColor-primary);opacity:.5}:host([variant=circle]){border-radius:50%}:host([variant=rectangular]){border-radius:0}:host([variant=rounded]){border-radius:.5rem}:host([animation=none]){animation:none}:host([animation=pulse]){animation:skeleton-pulse 2s ease-in-out infinite}@keyframes skeleton-pulse{0%{opacity:.5}50%{opacity:.25}100%{opacity:.5}}`;var Kt,Gt=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 v.LitElement{constructor(){super(...arguments),this.variant="rounded",this.animation="pulse"}render(){var t,e;return this.style.width=null!==(t=this.width)&&void 0!==t?t:this.style.width,this.style.height=null!==(e=this.height)&&void 0!==e?e:this.style.height,v.html`<slot></slot>`}static get styles(){return[Wt]}};Gt([(0,y.property)({type:String})],e.prototype,"width",void 0),Gt([(0,y.property)({type:String})],e.prototype,"height",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"variant",void 0),Gt([(0,y.property)({reflect:!0})],e.prototype,"animation",void 0),e=Gt([(0,st.w)("md-skeleton")],e),t.ELEMENT=e}(Kt||(Kt={}));var Yt=i(3773),Xt=i(9773),Zt=i(7936),Qt=i(3273),Jt=i(120),te=i(6056),ee=i(8543),ie=i(1479),oe=i(1853),se=i(2218),re=i(6328),ae=i(7253),ne=i(3876)},3876(t,e,i){i.d(e,{ThemeManager:()=>s,registerThemeManagerGlobally:()=>a,themeManager:()=>r});var o=i(5314);class s{get isMomentumV2Enabled(){return"momentumV2"===this.themeName}constructor(t){this.isDarkMode=!1,this.themeName="lumos",this.backgroundMode="DEFAULT",this.isVisualRebrandEnabled=!1,this.isMomentumAvatarEnabled=!1,(0,o.makeObservable)(this,{isDarkMode:o.observable,themeName:o.observable,backgroundMode:o.observable,isVisualRebrandEnabled:o.observable,isMomentumAvatarEnabled:o.observable,isMomentumV2Enabled:o.computed,setDarkMode:o.action,setThemeName:o.action,setBackgroundMode:o.action,setVisualRebrandEnabled:o.action,setMomentumAvatar:o.action,update:o.action}),t&&this.update(t)}update(t){void 0!==t.isDarkMode&&(this.isDarkMode=t.isDarkMode),void 0!==t.themeName&&(this.themeName=t.themeName),void 0!==t.backgroundMode&&(this.backgroundMode=t.backgroundMode),void 0!==t.isVisualRebrandEnabled&&(this.isVisualRebrandEnabled=t.isVisualRebrandEnabled),void 0!==t.isMomentumAvatarEnabled&&(this.isMomentumAvatarEnabled=t.isMomentumAvatarEnabled)}setDarkMode(t){this.isDarkMode=t}setThemeName(t){this.themeName=t}setBackgroundMode(t){this.backgroundMode=t}setVisualRebrandEnabled(t){this.isVisualRebrandEnabled=t}setMomentumAvatar(t){this.isMomentumAvatarEnabled=t}}const r=new s;function a(t="MomentumUIThemeManager",e=r){"undefined"!=typeof globalThis&&(globalThis[t]=e),"undefined"!=typeof window&&(window[t]=e),void 0!==i.g&&(i.g[t]=e)}},7704(t,e,i){i.d(e,{Io:()=>a.I,TS:()=>n.T,UM:()=>r.U,dY:()=>s.d,wW:()=>l.w,yC:()=>o.y}),i(2364);var o=i(3203),s=i(9938),r=i(5201),a=i(4781),n=i(608),l=i(9609)},2050(t,e,i){i.d(e,{QZ:()=>r,Qx:()=>a,XI:()=>l,dw:()=>d,qi:()=>n,sg:()=>s,ws:()=>o});const o=(t,e)=>{const i=[];[e].forEach(e=>{i.push(...((t,e)=>{const i=e.length;if(0===i)return[];const o=[],s=t.toLowerCase(),r=e.toLowerCase();let a=0,n=s.indexOf(r,a);for(;n>-1;)a=n+i,o.push([n,a]),n=s.indexOf(r,n+1);return o})(t,e))});const o=(([...t])=>{if(!t.length)return[];t.sort((t,e)=>t[0]!==e[0]?t[0]-e[0]:t[1]-e[1]);const e=[];let i=t[0][0],o=t[0][1];return t.shift(),t.forEach(([t,s])=>{t>=o?(e.push([i,o]),i=t,o=s):s>o&&(o=s)}),e.push([i,o]),e})(i),s=[];let r=0;return o.forEach(([e,i])=>{r!==e&&s.push({range:[e,i],matching:!1,text:t.slice(r,e)}),s.push({range:[e,i],matching:!0,text:t.slice(e,i)}),r=i}),r!==t.length&&s.push({range:[r],matching:!1,text:t.slice(r)}),s};function s(t,e,i){let o;return function(...s){const r=this,a=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||t.apply(r,s)},e),a&&t.apply(r,s)}}function r(t,e){return function e(i){if(!i||i===document||i===window)return null;const o=i.closest(t);return null!=o?o:e(i.getRootNode().host)}(e)}function a(t,e){return e>=0&&e<t.length?t[e]:void 0}function n(t,e=document){var i;const o=e instanceof ShadowRoot||e instanceof Document?e.querySelector(t):null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(t);if(o)return o;const s=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of s){const i=n(t,e);if(i)return i}return null}function l(t,e=document){if(e instanceof ShadowRoot||e instanceof Document){const i=e.getElementById(t);if(i)return i}const i=Array.from(e.querySelectorAll("*")).map(t=>{var e;return null!==(e=t.shadowRoot)&&void 0!==e?e:null}).filter(t=>null!==t);for(const e of i){const i=l(t,e);if(i)return i}return null}function d(){var t;let e=document.activeElement;for(;null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement;)e=e.shadowRoot.activeElement;return e}},7154(t,e,i){i.d(e,{o:()=>r,q:()=>a});var o=i(2900);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)}},5784(t){t.exports=b},8088(t){t.exports=E},7346(t){t.exports=S},9e3(t){t.exports=$},727(t){t.exports=T},3288(t){t.exports=A},3048(t){t.exports=l},2022(t){t.exports=r},554(t){t.exports=a},4893(t){t.exports=O},2962(t){t.exports=p},6538(t){t.exports=u},8250(t){t.exports=m},9371(t){t.exports=v},4863(t){t.exports=y},3060(t){t.exports=f},5875(t){t.exports=w},1347(t){t.exports=C},5001(t){t.exports=g},860(t){t.exports=k},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=s},8175(t){t.exports=h},318(t){t.exports=o},6968(t){t.exports=I},9756(t){t.exports=d},5796(t){t.exports=c},5314(t){t.exports=n},8187(t){t.exports=L},1891(t){t.exports=x}},P={};function R(t){var e=P[t];if(void 0!==e)return e.exports;var i=P[t]={exports:{}};return D[t].call(i.exports,i,i.exports,R),i.exports}R.m=D,M=[],R.O=(t,e,i,o)=>{if(!e){var s=1/0;for(l=0;l<M.length;l++){for(var[e,i,o]=M[l],r=!0,a=0;a<e.length;a++)(!1&o||s>=o)&&Object.keys(R.O).every(t=>R.O[t](e[a]))?e.splice(a--,1):(r=!1,o<s&&(s=o));if(r){M.splice(l--,1);var n=i();void 0!==n&&(t=n)}}return t}o=o||0;for(var l=M.length;l>0&&M[l-1][2]>o;l--)M[l]=M[l-1];M[l]=[e,i,o]},R.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return R.d(e,{a:e}),e},R.d=(t,e)=>{for(var i in e)R.o(e,i)&&!R.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},R.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),R.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),R.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={378:0,445:0,502:0,519:0,555:0,561:0,708:0,762:0,801:0,953:0,1037:0,1266:0,1459:0,1462:0,1521:0,1528:0,1682:0,1745:0,1788:0,1807:0,1821:0,2050:0,2105:0,2139:0,2169:0,2245:0,2273:0,2330:0,2369:0,2434:0,2708:0,2779:0,2781:0,2900:0,2909:0,2942:0,3079:0,3413:0,3539:0,3639:0,3747:0,3876:0,3938:0,3943:0,4131:0,4139:0,4259:0,4431:0,4545:0,4908:0,4928:0,4958:0,4971:0,5156:0,5310:0,5323:0,5369:0,5517:0,5757:0,5983:0,6029:0,6060:0,6085:0,6132:0,6220:0,6433:0,6494:0,6587:0,6724:0,6753:0,6812:0,6834:0,6920:0,7145:0,7154:0,7219:0,7455:0,7684:0,7704:0,7711:0,7906:0,7927:0,8111:0,8115:0,8138:0,8180:0,8220:0,8334:0,8339:0,8371:0,8442:0,8510:0,8619:0,8654:0,8894:0,9189:0,9237:0,9613:0,9669:0,9773:0};R.O.j=e=>0===t[e];var e=(e,i)=>{var o,s,[r,a,n]=i,l=0;if(r.some(e=>0!==t[e])){for(o in a)R.o(a,o)&&(R.m[o]=a[o]);if(n)var d=n(R)}for(e&&e(i);l<r.length;l++)s=r[l],R.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return R.O(d)},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 _=R.O(void 0,[7103,9609,4084,3305,4739,9488,2364,8441,2797,4700,3970,6343,7582,9336,9146,93,3842,7162,6325,4449,1392,2492,4047,1618,3331,3272,740,6631,9558,3543,878,7231,5846,742,4973,476,7262,8373,6816,3051,9431,6573,8663,861,5057,6005,8687,8881,1816,887,4839,5410,226,7137,9404,2297,7155,2670,513,9940,4242,1928,9956,2927,3013,9316,6429,7911,2991,9485,6843,3241],()=>R(371));return R.O(_)})());