import*as e from"lit/decorators.js";var t,i,s={120(e,t,i){i.d(t,{y:()=>p});var s=i(2900),a=i(7704),o=i(9609),r=i(7154),n=i(4084),l=i(2927),d=i(8899),h=i(4955),b=i(3272),c=function(e,t,i,s){var a,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(r=(o<3?a(r):o>3?a(t,i,r):a(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const p=22;var u;!function(e){let t=class extends((0,a.yC)(l.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.ariaLabel="",this.closable="",this.name="",this.isCrossVisible=!1,this.role="tab",this.type="line",this.newMomentum=!1,this.onlyIcon=!1,this.variant="ghost",this.visibleTab=!1,this.size=28,this._disabled=!1,this._selected=0===this.tabIndex,this.vertical=!1,this.viewportHidden=!1}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,e?this.tabDisabled():this.tabEnabled(),this.requestUpdate("disabled",t)}tabDisabled(){-1!==this.tabIndex&&(this.tabIndex=-1),this.setAttribute("aria-disabled","true")}tabEnabled(){-1===this.tabIndex&&this.selected&&(this.tabIndex=0),this.removeAttribute("aria-disabled")}get selected(){return this._selected}set selected(e){const t=this._selected;this._selected=e,e?(this.setAttribute("aria-selected","true"),this.tabIndex=0,this.notifySelectedTab()):(this.tabIndex=-1,this.removeAttribute("aria-selected")),this.requestUpdate("selected",t)}static get styles(){return[n.A,b.A]}handleClick(e){e.preventDefault(),this.id&&this.dispatchEvent(new CustomEvent("tab-click",{detail:{id:this.id},bubbles:!0,composed:!0}))}handleKeydown(e){if((0,r.o)(e.code)){if(this.disabled)return void e.preventDefault();this.handleClick(e)}}handleCrossKeydown(e){e.stopPropagation(),e.code===s.Uz.Enter&&this.handleCrossEventDispatch()}handleCrossClick(e){e.preventDefault(),!0!==this.disabled&&this.handleCrossEventDispatch()}handleCrossEventDispatch(){this.id&&("auto"===this.closable?this.dispatchEvent(new CustomEvent("tab-cross-click",{detail:{id:this.id},bubbles:!0,composed:!0})):"custom"===this.closable&&this.dispatchEvent(new CustomEvent("tab-close-click",{detail:{id:this.id,name:this.name},bubbles:!0,composed:!0})))}notifySelectedTab(){this.dispatchEvent(new CustomEvent("focus-visible",{composed:!0,bubbles:!0}))}update(e){super.update(e),e.has("disabled")&&this.disabled&&(this.selected=!1)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeydown)}firstUpdated(e){super.firstUpdated(e)}renderCrossButton(){return l.html`
        <md-button
          variant="ghost"
          size="size-none"
          circle
          class="tab-action-button"
          ?disabled=${this.disabled}
          @click=${e=>this.handleCrossClick(e)}
          @keydown=${e=>this.handleCrossKeydown(e)}
        >
          <md-icon name="cancel-bold" size="14" iconSet="momentumDesign"></md-icon>
        </md-button>
      `}render(){return l.html`
        <div
          part="tab"
          class="${(0,h.classMap)({disabled:this.disabled,"md-tab-content":!0,closable:""!==this.closable,pill:"pill"===this.type,rounded:"rounded"===this.type,line:"line"===this.type,primary:"primary"===this.variant,newMomentum:this.newMomentum,onlyIcon:this.onlyIcon})}"
        >
          <slot class="tab-slot"></slot>
          ${this.isCrossVisible&&this.closable?this.renderCrossButton():""}
        </div>
        <div part="indicator"></div>
        <!-- Invisible button for legacy third party test compatibility -->
        <button
          type="button"
          class="test-compatibility-button"
          aria-hidden="true"
          @click=${e=>this.handleClick(e)}
          @keydown=${e=>this.handleKeydown(e)}
        ></button>
      `}};c([(0,d.property)({type:Number,reflect:!0})],t.prototype,"tabIndex",void 0),c([(0,d.property)({type:String,attribute:"aria-label"})],t.prototype,"ariaLabel",void 0),c([(0,d.property)({type:String,attribute:"closable"})],t.prototype,"closable",void 0),c([(0,d.property)({type:String,attribute:"name"})],t.prototype,"name",void 0),c([(0,d.property)({type:Boolean,attribute:"cross-visible"})],t.prototype,"isCrossVisible",void 0),c([(0,d.property)({type:String,attribute:"role",reflect:!0})],t.prototype,"role",void 0),c([(0,d.property)({type:String,reflect:!0})],t.prototype,"type",void 0),c([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),c([(0,d.property)({type:Boolean})],t.prototype,"onlyIcon",void 0),c([(0,d.property)({type:String})],t.prototype,"variant",void 0),c([(0,d.property)({type:Boolean,attribute:"visible-tab",reflect:!0})],t.prototype,"visibleTab",void 0),c([(0,d.property)({type:Number})],t.prototype,"size",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",null),c([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"selected",null),c([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"vertical",void 0),c([(0,d.property)({type:Boolean,reflect:!0})],t.prototype,"viewportHidden",void 0),t=c([(0,o.w)("md-tab")],t),e.ELEMENT=t}(u||(u={}))},8543(e,t,i){i.d(t,{T:()=>C,t:()=>F}),i(1821),i(708),i(9613);var s=i(2900),a=i(7704),o=i(2050),r=i(93),n=i(4084),l=i(2927),d=i(8899),h=i(4955),b=i(3517),c=i(2577),p=i(1156),u=i(7638),m=i(6933),v=i(7103),T=i(3272),f=i(120),y=function(e,t,i,s){var a,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(r=(o<3?a(r):o>3?a(t,i,r):a(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},g=function(e,t,i,s){return new(i||(i=Promise))(function(a,o){function r(e){try{l(s.next(e))}catch(e){o(e)}}function n(e){try{l(s.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(r,n)}l((s=s.apply(e,t||[])).next())})};const M="tab-more",C="more-menu-copy-",A="visibleToVisible",w="visibleToHidden",I="hiddenToVisible",E="hiddenToHidden",L="previous",S="next",H="fromMoreTabs";var F;!function(e){let t=class extends((0,a.UM)((0,a.Io)((0,a.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:e,scrollWidth:t,clientWidth:i}=this.tabsListElement;this.showLeftArrow=e>0,this.showRightArrow=e+i<t-5})},this.handleOnDragEnd=e=>g(this,void 0,void 0,function*(){var t,i,s,a,o,r,n,l,d,h;e.stopPropagation();const b=e.oldIndex,c=e.newIndex,p=[...this.tabsFilteredAsVisibleList],u=[...this.tabsFilteredAsHiddenList],m=this.getDragDirection(e);if(void 0!==b&&void 0!==c){switch(m){case w:{null===(i=null===(t=this.hiddenTabsContainerElement)||void 0===t?void 0:t.querySelector("#"+e.item.id))||void 0===i||i.remove();const s=p[b],a=u.slice(-1)[0],o=c===this.tabsFilteredAsHiddenList.length?c-1:c;u.splice(o,0,s),u.pop();const r=p.filter(t=>t.id!==this.getNormalizedTabId(e.item.id));r.push(a),this.tabsFilteredAsVisibleList=[...r],this.tabsFilteredAsHiddenList=[...u];break}case A:{const e=p[b];p.splice(b,1),p.splice(c,0,e),this.tabsFilteredAsVisibleList=p,c===this.tabsFilteredAsVisibleList.length-1&&(null===(a=null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children[this.visibleTabsContainerElement.children.length-1])||void 0===a||a.remove());const t=this.visibleTabsContainerElement.children[b],i=this.visibleTabsContainerElement.children[c];if(!t||!i)return;null===(o=this.visibleTabsContainerElement)||void 0===o||o.replaceChild(i,t),null===(r=this.visibleTabsContainerElement)||void 0===r||r.insertBefore(t,i);break}case I:{null===(l=null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.querySelector("#"+e.item.id))||void 0===l||l.remove();const t=u[b],i=p.slice(-1)[0];u.splice(b,1),u.splice(0,0,i);const s=c===this.tabsFilteredAsVisibleList.length?c-1:c;p.splice(s,0,t),p.pop(),this.tabsFilteredAsVisibleList=p,this.tabsFilteredAsHiddenList=u;break}case E:{const e=u[b];u.splice(b,1),u.splice(c,0,e),this.tabsFilteredAsHiddenList=u,c===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 e=[...this.tabsFilteredAsVisibleList,...this.tabsFilteredAsHiddenList],t=e.findIndex(e=>e.selected);this.storeSelectedTabIndex(t),this.tabsOrderPrefsArray=e.map(e=>e.name),localStorage.setItem(this.compUniqueId,this.tabsOrderPrefsArray.join(","))}}})}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){var t;if(-1===e)return;const i=this._selectedIndex;this._selectedIndex=e,i!==e&&(null===(t=this.tabs)||void 0===t?void 0:t.length)&&this.updateSelectedTab(e)}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(e){var t;return(null===(t=e.id)||void 0===t?void 0:t.startsWith(C))?`${C}${e.id}`:e.id}getAriaControlId(e){var t,i;return(null===(t=e.id)||void 0===t?void 0:t.startsWith(C))?`${C}${e.id}`:"tab_panel_"+(null===(i=e.id)||void 0===i?void 0:i.substring(4))}getTabIndex(e){var t,i;return this.isMoreTabMenuVisible&&0===this.getCurrentIndex(null==e?void 0:e.id)&&this.selected>(null===(t=this.tabsFilteredAsVisibleList)||void 0===t?void 0:t.length)-1||(null===(i=this.tabsFilteredAsVisibleList[this.selected])||void 0===i?void 0:i.id)===e.id?0:-1}getNormalizedTabId(e){return e.replace(C,"")}static get styles(){return[n.A,T.A]}ensureTabsUpdateComplete(e){return g(this,void 0,void 0,function*(){const t=e.map(e=>void 0!==e.updateComplete?e.updateComplete:null).filter(e=>null!==e);t.length&&(yield Promise.all(t))})}measureTabsOffsetWidth(){return this.justified||"vertical"===this.direction?this.tabs.map(e=>{e.setAttribute("measuringrealwidth","");const t=e.closable?e.offsetWidth+f.y:e.offsetWidth;return e.removeAttribute("measuringrealwidth"),t}):this.tabs.map(e=>e.closable?e.offsetWidth+f.y:e.offsetWidth)}updateIsMoreTabTruncated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".md-menu-overlay__overflow-label");if(t){const e=t.scrollWidth>t.clientWidth;this.isMoreTabTruncated!=e&&(this.isMoreTabTruncated=e)}}measureHiddenTabsCopiesOffsetHeight(){return this.tabsCopy.map(e=>e.offsetHeight)}manageOverflow(){return g(this,void 0,void 0,function*(){var e,t;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(e=>{var t,i,s,a,o,r;if((null===(t=e.children)||void 0===t?void 0:t.length)&&0===(null===(s=null===(i=e.children[0])||void 0===i?void 0:i.children)||void 0===s?void 0:s.length)){const t=null===(o=null===(a=null==e?void 0:e.querySelector("slot"))||void 0===a?void 0:a.assignedNodes({flatten:!0})[0])||void 0===o?void 0:o.cloneNode(!0);t&&(t.classList.add("tab-content"),null===(r=null==e?void 0:e.children[0])||void 0===r||r.appendChild(t))}});const s=i.length;if(this.tabsListElement&&s){const a=(null===(e=this.tabsSettingsElement)||void 0===e?void 0:e.offsetWidth)?this.tabsListElement.offsetWidth-(null===(t=this.tabsSettingsElement)||void 0===t?void 0:t.offsetWidth):this.tabsListElement.offsetWidth;yield this.ensureTabsUpdateComplete(this.tabs);const o=this.measureTabsOffsetWidth(),r=i.reduce((e,t,i)=>e+o[i],0);if(r){yield this.setupMoreTab();let e=!0;a<r&&(e=!1);const t=[];let n=0;i.forEach((i,r)=>{n+=o[r];const l=!e&&n+(r<s-1?this.moreTabMenuOffsetWidth:0)>a;t.push({isTabInViewportHidden:l,tabOffsetWidth:o[r]})}),this.tabsViewportDataList=t,this.tabsViewportDataList.forEach((e,t)=>this.tabs[t].viewportHidden=e.isTabInViewportHidden),this.isMoreTabMenuVisible=!!this.tabsViewportDataList.find(e=>e.isTabInViewportHidden),this.tabsFilteredAsVisibleList=i.filter((e,t)=>!this.tabsViewportDataList[t].isTabInViewportHidden),this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((e,t,i)=>(e[t.id]=i,e),{}),this.tabsFilteredAsHiddenList=i.filter((e,t)=>this.tabsViewportDataList[t].isTabInViewportHidden),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((e,t,i)=>(e[t.id]=i,e),{})}}this.updateIsMoreTabMenuSelected(),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget())}})}updateIsMoreTabMenuSelected(){this.isMoreTabMenuSelected=!!this.tabsFilteredAsHiddenList.find(e=>e.selected)}updateAriaControlsElements(){this.visibleTabsContainerElement&&this.visibleTabsContainerElement.querySelectorAll("md-tab").forEach(e=>{const t=this.getNormalizedTabId(e.id),i=this.tabPanelHash[t];i&&"ariaControlsElements"in e&&(e.ariaControlsElements=[i])}),this.hiddenTabsContainerElement&&this.hiddenTabsContainerElement.querySelectorAll("md-tab").forEach(e=>{const t=this.getNormalizedTabId(e.id),i=this.tabPanelHash[t];i&&"ariaControlsElements"in e&&(e.ariaControlsElements=[i])})}getHiddenTabFocusTarget(e){return e&&!e.disabled&&this.isTabInMoreMenu(e)?e:this.tabsFilteredAsHiddenList.find(e=>e.selected&&!e.disabled)||this.tabsFilteredAsHiddenList.find(e=>!e.disabled)}updateHiddenIdPositiveTabIndex(e){this.tabHiddenIdPositiveTabIndex=e?e.id:void 0}sortTabsAndPanes(){if(!this.tabsOrderPrefsArray.length)return;const e=(e,t)=>{var i,s;const a=null!==(i=e.getAttribute("name"))&&void 0!==i?i:"",o=null!==(s=t.getAttribute("name"))&&void 0!==s?s:"";return this.tabsOrderPrefsArray.indexOf(a)-this.tabsOrderPrefsArray.indexOf(o)};this.tabs.sort(e),this.panels.sort(e)}linkPanelsAndTabs(){return g(this,void 0,void 0,function*(){this.sortTabsAndPanes();const{tabs:e,panels:t}=this;if(0===e.length||0===t.length)return void console.warn("The tabs or panels count should't be equal zero.");e.length!==t.length&&console.warn(`The amount of tabs (${e.length}) doesn't match the amount of panels (${t.length}).`);const i="vertical"===this.direction,s=this.selectedIndex<0?0:this.selectedIndex;e.forEach((e,a)=>{const o=(0,r.O)("tabs"),n="tab_"+o,l="tab_panel_"+o;e.setAttribute("id",n),e.setAttribute("aria-controls",l),e.selected=s===a,e.newMomentum=this.newMomentum,e.type=this.type,e.variant=this.variant,e.size=this.newMomentum?this.size:void 0,this.scrollArrow&&(e.visibleTab=!0),e.vertical!==i&&(e.vertical=i),e.viewportHidden&&(i||this.scrollArrow)&&(e.viewportHidden=!1);const d=t[a];d?(d.setAttribute("id",l),d.setAttribute("aria-labelledby",n),d.selected=s===a,e.disabled&&(d.hidden=!0,d.selected=!1)):e.disabled=!0});let a=s;for(;a<e.length&&e[a].disabled;)a++;a=a===e.length?0:a,e[a].selected=!0,t[a].selected=!0,this.tabsHash=this.tabs.reduce((e,t)=>(e[t.id]=t,e),{}),this.tabsIdxHash=this.tabs.reduce((e,t,i)=>(e[t.id]=i,e),{}),this.tabPanelHash=this.tabs.reduce((e,i,s)=>(t[s]&&(e[i.id]=t[s]),e),{})})}get slotItem(){return this.tabSlotElement}filterSlotted(){return this.tabSlotElement.assignedElements()}handleResize(e){var t;null===(t=super.handleResize)||void 0===t||t.call(this,e),this.manageOverflow(),this.updateIsMoreTabTruncated(),this.scrollArrow&&this.updateArrowsVisibility()}getDragDirection(e){return e.from===this.visibleTabsContainerElement&&e.to===this.hiddenTabsContainerElement?w:e.from===this.visibleTabsContainerElement&&e.to===this.visibleTabsContainerElement?A:e.from===this.hiddenTabsContainerElement&&e.to===this.visibleTabsContainerElement?I:e.from===this.hiddenTabsContainerElement&&e.to===this.hiddenTabsContainerElement?E:void 0}makeTabCopyFocus(e){e&&e.focus()}handleTabClick(e){const{id:t}=e.detail;this.handleNewSelectedTab(t)}handleNewSelectedTab(e,t=!0){const i=this.tabsHash[this.getNormalizedTabId(e)];if(i&&!i.disabled){const e=this.tabsIdxHash[i.id];-1!==e&&this.updateSelectedTab(e,t);{const e=this.tabsCopyHash[this.getCopyTabId(i)];e&&t&&this.makeTabCopyFocus(e),this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(i))}}}handleTabCrossClick(e){const{id:t}=e.detail;this.handleTabCloseEvent(t)}handleTabCloseClick(e){const{id:t}=e.detail;this.handleTabCloseEvent(t)}handleTabCloseEvent(e){var t,i;const s=this.tabsHash[this.getNormalizedTabId(e)];if(s&&!s.disabled&&("auto"===s.closable||"custom"===s.closable)){const s=this.tabsFilteredAsVisibleList.findIndex(t=>this.getNormalizedTabId(t.id)===this.getNormalizedTabId(e));this.tabsFilteredAsVisibleList=this.tabsFilteredAsVisibleList.filter(t=>this.getNormalizedTabId(t.id)!==this.getNormalizedTabId(e)),null===(i=null===(t=this.visibleTabsContainerElement)||void 0===t?void 0:t.querySelector("#"+e))||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(s)}}handleUpdatedSeletedTabAfterCross(e){var t;let i=e;for(;i<this.tabsFilteredAsVisibleList.length&&(null===(t=this.tabsFilteredAsVisibleList[i])||void 0===t?void 0:t.disabled);)i++;if(void 0===this.tabsFilteredAsVisibleList[i]||e===this.tabsFilteredAsVisibleList.length)for(i=e-1;i>=0&&this.tabsFilteredAsVisibleList[i].disabled;)i--;if(-1!==i){const e=this.tabs.findIndex(e=>e.id===this.tabsFilteredAsVisibleList[i].id);this.updateSelectedTab(e)}else this.updateSelectedTab(i);this.noTabsVisible=0===this.tabsFilteredAsVisibleList.length&&0===this.tabsFilteredAsHiddenList.length,this.requestUpdate()}setSelectedAttribute(e,t,i=!1){t&&(t.selected=i),e&&(e.selected=i,i&&(this.isMoreTabMenuSelected=this.isTabInMoreMenu(e)),this.isTabInMoreMenu(e)&&(this.isMoreTabMenuSelected=!0))}isTabInMoreMenu(e){return void 0!==this.tabsFilteredAsHiddenList.find(t=>t.id===e.id)}updateSelectedTab(e,t=!0){const{tabs:i,panels:s}=this,a=this.tabs.findIndex(e=>e.hasAttribute("selected"));if(i&&s&&(this.setSelectedAttribute((0,o.Qx)(i,a),(0,o.Qx)(s,a),!1),this.setSelectedAttribute((0,o.Qx)(i,e),(0,o.Qx)(s,e),!0)),e>=0&&e<i.length){this.dispatchSelectedChangedEvent(e);const s=this.currentTabsLayout.findIndex(t=>t.id===i[e].id);this.changeSelectedTabIdx(s,t)}}dispatchSelectedChangedEvent(e){const t=this.currentTabsLayout,i=this.tabs[e].id;let s=t.findIndex(e=>e.id===i);-1===s&&(s=e);const a=[];t.forEach(e=>{a.push(e.name)}),this.dispatchEvent(new CustomEvent("selected-changed",{detail:{value:s,tabsOrder:a},composed:!0,bubbles:!0}))}changeSelectedTabIdx(e,t=!0){this.requestUpdate(),this.selected=e,this.updateComplete.then(()=>{var i,s;if(e<this.tabsFilteredAsVisibleList.length){if(t){const e=null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[this.selected];null==e||e.focus()}}else{const e=this.selected-this.tabsFilteredAsVisibleList.length,i=null===(s=this.hiddenTabsContainerElement)||void 0===s?void 0:s.children[e];t&&this.moveFocusToTab(i)}const a=e-this.tabsFilteredAsVisibleList.length,o=this.tabsFilteredAsHiddenList[a];this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget(o))}),this.updateIsMoreTabMenuSelected(),this.storeSelectedTabIndex(e)}storeSelectedTabIndex(e){this.persistSelection&&this.tabsId&&e>-1&&""!==this.tabsId.trim()&&sessionStorage.setItem(this.tabsId,`${e}`)}getCurrentIndex(e){var t,i,s;if(this.scrollArrow){const t=this.tabs.length;for(let i=0;i<t;i++)if(this.tabs[i].id===e)return i}const a=null!==(i=null===(t=this.visibleTabsContainerElement)||void 0===t?void 0:t.children.length)&&void 0!==i?i:0;for(let t=0;t<a;t++)if((null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children[t].id)===e)return t;return this.tabsVisibleIdxHash[e]}moveFocusToAdjacentTab(e,t){var i,s,a;const o=this.getCurrentIndex(e),r=this.slotItem.assignedElements();let n=0;if(this.scrollArrow){t===L?n=0===o?r.length-1:o-1:t===S&&(n=o===r.length-1?0:o+1),this.moveFocusToTab(r[n]);const e=r[n],s=e.getBoundingClientRect(),a=null===(i=this.tabsListElement)||void 0===i?void 0:i.getBoundingClientRect();return a&&(s.left>=a.left&&s.right<=a.right&&s.top>=a.top&&s.bottom<=a.bottom||e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})),this.updateArrowsVisibility(),void(0,v.setTimeout)(()=>this.moveFocusToTab(r[n]),0)}const l=null===(s=this.visibleTabsContainerElement)||void 0===s?void 0:s.children,d=null!==(a=null==l?void 0:l.length)&&void 0!==a?a:0;l&&0!==d&&(t===L?n=0===o?d-1:o-1:t===S?n=o===d-1?0:o+1:t===H&&(n=this.selected>=d?0:this.selected),this.moveFocusToTab(l[n]))}moveFocusToTab(e){(0,v.setTimeout)(()=>null==e?void 0:e.focus(),0)}handleOverlayClose(){(0,v.setTimeout)(()=>{this.menuOverlayElement&&(this.menuOverlayElement.isOpen=!1)},0)}dispatchKeydownEvent(e,t){t&&this.dispatchEvent(new CustomEvent("tab-keydown",{detail:{id:t,key:e.code,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,srcEvent:e},bubbles:!0,composed:!0}))}handleTabKeydown(e){var t,i,a,o,r,n,l,d,h;const b=e.target;if(e.target!=this&&!this.tabs.find(e=>e.id===(null==b?void 0:b.id)))return!1;let c;if((null===(t=e.composedPath())||void 0===t?void 0:t.length)>0?c=e.composedPath()[0].id:e.originalTarget&&(c=e.originalTarget.id),!c)return;const p=this.getNormalizedTabId(c);this.dispatchKeydownEvent(e,p);const u=e.code,{shiftKey:m}=e,v=!!this.isMoreTabMenuVisible&&p===M,T=v&&this.isMoreTabMenuVisible?this.moreTabMenuElement:this.tabsHash[this.getNormalizedTabId(p)],f=!this.isMoreTabMenuVisible||T&&this.tabsVisibleIdxHash[T.id]>-1,y=!!this.isMoreTabMenuVisible&&T&&this.tabsHiddenIdxHash[T.id]>-1,g=this.isMoreTabMenuVisible?this.tabsFilteredAsVisibleList.length-1:this.tabs.length-1;switch(u){case s.Uz.Tab:v&&!this.isMoreTabMenuOpen&&m&&(e.preventDefault(),this.moveFocusToAdjacentTab(c,H));break;case s.Uz.End:v||(f?(e.preventDefault(),this.moveFocusToTab(null===(i=this.visibleTabsContainerElement)||void 0===i?void 0:i.children[(null===(a=this.tabsFilteredAsVisibleList)||void 0===a?void 0:a.length)-1])):this.isMoreTabMenuOpen&&(e.preventDefault(),this.moveFocusToTab(null===(o=this.hiddenTabsContainerElement)||void 0===o?void 0:o.children[(null===(r=this.tabsFilteredAsHiddenList)||void 0===r?void 0:r.length)-1])));break;case s.Uz.Home:f?(e.preventDefault(),this.moveFocusToTab(null===(n=this.visibleTabsContainerElement)||void 0===n?void 0:n.children[0])):this.isMoreTabMenuOpen&&(e.preventDefault(),this.moveFocusToTab(null===(l=this.hiddenTabsContainerElement)||void 0===l?void 0:l.children[0]));break;case s.Uz.ArrowLeft:v||(f||this.scrollArrow)&&(e.stopPropagation(),this.moveFocusToAdjacentTab(c,this.isRtl?S:L));break;case s.Uz.ArrowRight:v||(f||this.scrollArrow)&&(e.stopPropagation(),this.moveFocusToAdjacentTab(c,this.isRtl?L:S));break;case s.Uz.ArrowUp:if(v);else if(f&&"vertical"===this.direction)e.preventDefault(),this.changeSelectedTabIdx(0===this.selected?g:this.selected-1);else if(y&&T){e.preventDefault(),e.stopPropagation();const t=this.tabsHiddenIdxHash[T.id],i=this.tabsFilteredAsHiddenList.length,s=(t-1+i)%i,a=this.tabsFilteredAsHiddenList[s];this.updateHiddenIdPositiveTabIndex(a),this.moveFocusToTab(null===(d=this.hiddenTabsContainerElement)||void 0===d?void 0:d.children[s])}break;case s.Uz.ArrowDown:if(v);else if(f&&"vertical"===this.direction)e.preventDefault(),this.changeSelectedTabIdx(this.selected===g?0:this.selected+1);else if(y&&T){e.preventDefault(),e.stopPropagation();const t=(this.tabsHiddenIdxHash[T.id]+1)%this.tabsFilteredAsHiddenList.length,i=this.tabsFilteredAsHiddenList[t];this.updateHiddenIdPositiveTabIndex(i),this.moveFocusToTab(null===(h=this.hiddenTabsContainerElement)||void 0===h?void 0:h.children[t])}break;case s.Uz.Enter:case s.Uz.NumpadEnter:case s.Uz.Space:if(v)this.updateHiddenIdPositiveTabIndex(this.getHiddenTabFocusTarget());else if(T&&!T.disabled){const t=this.tabsIdxHash[this.getNormalizedTabId(T.id)];-1!==t&&(e.preventDefault(),this.updateSelectedTab(t),y&&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(e){const{compUniqueId:t}=e.detail;t===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(e=>e.name)}setupMoreTab(){return g(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=m.default.create(this.visibleTabsContainerElement,this.generateOptions()),this.hiddenTabsSortableInstance=m.default.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 e;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 e=localStorage.getItem(this.tabsId);this.selected=e&&parseInt(e)>-1?parseInt(e):this.selected}this.compUniqueId&&(this.tabsOrderPrefsArray=(null===(e=localStorage.getItem(this.compUniqueId))||void 0===e?void 0:e.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 e=sessionStorage.getItem(this.tabsId);let t=0;if(e){const i=parseInt(e);t=i>-1?i:this.selected}const i=this.currentTabsLayout;i.length&&i[t].id?(this._selectedIndex=t,this.handleNewSelectedTab(i[t].id,!1)):this.selected=t}}disconnectedCallback(){super.disconnectedCallback(),this.teardownTabsEvents()}firstUpdated(e){var t;super.firstUpdated(e),this.setupPanelsAndTabs(),this.linkPanelsAndTabs(),this.selectTabFromStorage(),this.scrollArrow&&(this.updateArrowsVisibility(),null===(t=this.tabsListElement)||void 0===t||t.addEventListener("scroll",this.updateArrowsVisibility))}onDirectionChanged(){return g(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(e){var t,i;if(null===(t=super.willUpdate)||void 0===t||t.call(this,e),e.has("selectedIndex")&&(this.selected=this.selectedIndex),e.has("tabsFilteredAsHiddenList")&&(this.tabsCopy=Array.from((null===(i=this.tabsCopyHiddenListElements)||void 0===i?void 0:i.values())||[]),this.tabsCopyHash=this.tabsCopy.reduce((e,t)=>(e[t.id]=t,e),{})),(e.has("tabsFilteredAsVisibleList")||e.has("tabsFilteredAsHiddenList"))&&(this.tabsVisibleIdxHash=this.tabsFilteredAsVisibleList.reduce((e,t,i)=>(e[t.id]=i,e),{}),this.tabsHiddenIdxHash=this.tabsFilteredAsHiddenList.reduce((e,t,i)=>(e[t.id]=i,e),{})),e.has("isMoreTabMenuOpen")&&this.isMoreTabMenuVisible){const t=e.get("isMoreTabMenuOpen");this.isMoreTabMenuOpen&&!t&&(this.moreItemsScrollLimit<this.tabsCopy.length?(this.isMoreTabMenuScrollable=!0,this.moreTabMenuMaxHeight=`${this.measureHiddenTabsCopiesOffsetHeight().slice(0,this.moreItemsScrollLimit).reduce((e,t)=>e+t,0)}px`):(this.isMoreTabMenuScrollable=!1,this.moreTabMenuMaxHeight=null))}}updated(e){super.updated(e),e.has("direction")&&e.get("direction")!==this.direction&&this.onDirectionChanged(),e.has("slotted")&&this.initializeTabs(),!this.draggable||this.visibleTabsSortableInstance||this.hiddenTabsSortableInstance||this.initializeSortable(),e.has("tabsId")&&this.selectTabFromStorage(),e.has("selectedIndex")&&this.updateSelectedTab(this.selectedIndex,!1),e.has("overflowLabel")&&this.updateIsMoreTabTruncated(),e.has("scrollArrow")&&this.onDirectionChanged(),this.isMoreTabMenuVisible&&this.moreTabMenuElement&&(this.moreTabMenuElement.tabIndex=0),(this.visibleTabsContainerElement||this.hiddenTabsContainerElement)&&requestAnimationFrame(()=>this.updateAriaControlsElements())}scrollTabs(e){if(!this.tabsListElement||"vertical"===this.direction)return;const t="left"===e?-100:100;this.tabsListElement.scrollBy({left:t,behavior:"smooth"}),(0,v.setTimeout)(()=>this.updateArrowsVisibility(),300)}get moreMenuButtonTemplate(){return l.html`
        <md-tab
          slot="menu-trigger"
          id="${M}"
          size="${(0,b.ifDefined)(this.newMomentum?this.size:void 0)}"
          aria-label="${this.overflowLabel}"
          aria-haspopup="true"
          role="button"
          tabindex="${this.isMoreTabMenuVisible?0:-1}"
          ?selected=${!!this.isMoreTabMenuVisible&&this.isMoreTabMenuSelected}
          class="md-menu-overlay__more_tab ${(0,h.classMap)({"md-menu-overlay__more_tab--hidden":!this.isMoreTabMenuVisible})}"
          ?newMomentum=${this.newMomentum}
          type=${this.type}
          variant=${this.variant}
          visible-tab
        >
          <md-tooltip placement="top" message=${this.overflowLabel} ?disabled=${!this.isMoreTabTruncated}>
            <span class="md-menu-overlay__overflow-label">${this.overflowLabel}</span>
          </md-tooltip>
          <md-icon
            name="${this.isMoreTabMenuOpen?"arrow-up-bold":"arrow-down-bold"}"
            iconSet="momentumDesign"
            size="16"
            class="more-icon"
          ></md-icon>
        </md-tab>
      `}get moreMenuListTemplate(){return l.html`
        ${(0,c.repeat)(this.tabsFilteredAsHiddenList,()=>(0,r.O)("menuitem_tabs"),e=>l.html`
            <md-tab
              slot="draggable-item"
              ?disabled=${e.disabled}
              ?selected=${e.selected}
              name="${e.name}"
              id="${this.getCopyTabId(e)}"
              aria-label=${e.ariaLabel}
              @click=${this.handleOverlayClose}
              tabIndex="${this.tabHiddenIdPositiveTabIndex===e.id?0:-1}"
              role="menuitem"
              ?newMomentum=${this.newMomentum}
              variant=${e.variant}
              type=${e.type}
              ?onlyIcon=${e.onlyIcon}
            >
              ${(0,u.unsafeHTML)(e.innerHTML)}
            </md-tab>
          `)}
      `}get moreMenuTemplate(){return"vertical"===this.direction?l.nothing:l.html`
        <md-menu-overlay
          custom-width="${"226px"}"
          max-height="${"288px"}"
          class="md-menu-overlay__more ${(0,h.classMap)({"md-menu-overlay__more--hidden":this.isMoreTabMenuMeasured&&!this.isMoreTabMenuVisible})}"
          placement="bottom-end"
          @menu-overlay-open=${()=>this.isMoreTabMenuOpen=!0}
          @menu-overlay-close=${()=>this.isMoreTabMenuOpen=!1}
        >
          ${this.moreMenuButtonTemplate}
          <div
            id="tabs-more-list"
            part="tabs-more-list"
            class="md-tab__list md-menu-overlay__more_list"
            style="${(0,p.styleMap)(this.isMoreTabMenuScrollable&&this.moreTabMenuMaxHeight?{"overflow-y":"auto",height:this.moreTabMenuMaxHeight,"max-height":this.moreTabMenuMaxHeight}:{})}"
          >
            ${this.moreMenuListTemplate}
          </div>
        </md-menu-overlay>
      `}tabsButtonArrow(e){const t="left"===e?this.leftArrowAriaLabel:this.rightArrowAriaLabel;return l.html`<md-button
        class="tabs-${e}-arrow"
        @click=${()=>this.scrollTabs(e)}
        size="${this.size}"
        variant="ghost"
        circle
        ariaLabel="${t}"
      >
        <md-icon slot="icon" name="arrow-${e}-bold" iconSet="momentumDesign"></md-icon>
      </md-button>`}get renderTabSlot(){return l.html`
        <slot
          name="tab"
          class="${(0,h.classMap)({"visible-tabs-slot":"horizontal"===this.direction&&!this.scrollArrow})}"
        ></slot>
      `}get renderTabsWithMoreMenu(){return l.html`
        <div
          id="visible-tabs-list"
          class="visible-tabs-container ${(0,h.classMap)({"md-tab__justified":this.justified&&!this.isMoreTabMenuVisible,"md-tab__hug":this.hugTabs,"visible-new-tabs":this.newMomentum})}"
        >
          ${(0,c.repeat)(this.tabsFilteredAsVisibleList,(e,t)=>`${e.id}-${t}`,e=>l.html`
              <md-tab
                .closable="${e.closable}"
                .disabled="${e.disabled}"
                .selected="${e.selected}"
                name="${e.name}"
                id="${this.getCopyTabId(e)}"
                aria-label=${e.ariaLabel}
                .isCrossVisible=${!0}
                tabIndex="${this.getTabIndex(e)}"
                .newMomentum=${this.newMomentum}
                size="${(0,b.ifDefined)(this.newMomentum?this.size:void 0)}"
                variant=${this.variant}
                type=${this.type}
                .onlyIcon="${e.onlyIcon}"
                visible-tab
              >
                ${(0,u.unsafeHTML)(e.innerHTML)}
              </md-tab>
            `)}
        </div>
        ${this.moreMenuTemplate}
      `}render(){return l.html`
        <div class="md-tabs-wrapper" part="tabs-wrapper">
          ${this.scrollArrow&&this.showLeftArrow?this.tabsButtonArrow(this.isRtl?"right":"left"):l.nothing}
          <div
            part="tabs-list"
            class="md-tab__list ${(0,h.classMap)({"md-tab__justified":this.justified&&!this.isMoreTabMenuVisible,"md-tab__hug":this.hugTabs,"no-tabs-visible":this.noTabsVisible,"vertical-tab-list":"vertical"===this.direction,"tab-new-momentum":this.newMomentum})}"
            size="${(0,b.ifDefined)(this.newMomentum?this.size:void 0)}"
            role="tablist"
          >
            ${this.renderTabSlot}
            ${"horizontal"!==this.direction||this.scrollArrow?l.nothing:this.renderTabsWithMoreMenu}
            <div class="md-tabs__settings" part="md-tabs__settings">
              <slot name="settings"></slot>
            </div>
          </div>
          ${this.scrollArrow&&this.showRightArrow?this.tabsButtonArrow(this.isRtl?"left":"right"):l.nothing}
        </div>
        <div
          part="tabs-content"
          class="md-tab__content ${(0,h.classMap)({"no-tabs-visible":this.noTabsVisible})}"
        >
          <slot name="panel" @slotchange=${this.initializeTabs}></slot>
        </div>
      `}};y([(0,d.property)({type:Boolean})],t.prototype,"justified",void 0),y([(0,d.property)({type:Boolean,attribute:"hug-tabs"})],t.prototype,"hugTabs",void 0),y([(0,d.property)({type:String})],t.prototype,"overflowLabel",void 0),y([(0,d.property)({type:Boolean,attribute:"draggable"})],t.prototype,"draggable",void 0),y([(0,d.property)({type:String,reflect:!0})],t.prototype,"direction",void 0),y([(0,d.property)({type:Number,attribute:"more-items-scroll-limit"})],t.prototype,"moreItemsScrollLimit",void 0),y([(0,d.property)({type:Number,reflect:!0,attribute:"selected-index"})],t.prototype,"selectedIndex",null),y([(0,d.property)({type:Number})],t.prototype,"animation",void 0),y([(0,d.property)({type:String,attribute:"ghost-class"})],t.prototype,"ghostClass",void 0),y([(0,d.property)({type:String,attribute:"chosen-class"})],t.prototype,"chosenClass",void 0),y([(0,d.property)({type:Boolean,attribute:"force-fallback"})],t.prototype,"forceFallback",void 0),y([(0,d.property)({type:String,attribute:"fallback-class"})],t.prototype,"fallbackClass",void 0),y([(0,d.property)({type:String,attribute:"tabs-id"})],t.prototype,"tabsId",void 0),y([(0,d.property)({type:Boolean,attribute:"persist-selection"})],t.prototype,"persistSelection",void 0),y([(0,d.property)({type:String,attribute:"comp-unique-id"})],t.prototype,"compUniqueId",void 0),y([(0,d.property)({type:String})],t.prototype,"type",void 0),y([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),y([(0,d.property)({type:String})],t.prototype,"variant",void 0),y([(0,d.property)({type:Boolean,attribute:"scroll-arrow"})],t.prototype,"scrollArrow",void 0),y([(0,d.property)({type:String,attribute:"left-arrow-aria-label"})],t.prototype,"leftArrowAriaLabel",void 0),y([(0,d.property)({type:String,attribute:"right-arrow-aria-label"})],t.prototype,"rightArrowAriaLabel",void 0),y([(0,d.property)({type:Number})],t.prototype,"size",void 0),y([(0,d.state)()],t.prototype,"isMoreTabMenuVisible",void 0),y([(0,d.state)()],t.prototype,"isMoreTabMenuMeasured",void 0),y([(0,d.state)()],t.prototype,"isMoreTabMenuOpen",void 0),y([(0,d.state)()],t.prototype,"isMoreTabMenuSelected",void 0),y([(0,d.state)()],t.prototype,"isMoreTabMenuScrollable",void 0),y([(0,d.state)()],t.prototype,"moreTabMenuOffsetWidth",void 0),y([(0,d.state)()],t.prototype,"moreTabMenuMaxHeight",void 0),y([(0,d.state)()],t.prototype,"tabsViewportDataList",void 0),y([(0,d.state)()],t.prototype,"tabsFilteredAsVisibleList",void 0),y([(0,d.state)()],t.prototype,"tabsFilteredAsHiddenList",void 0),y([(0,d.state)()],t.prototype,"noTabsVisible",void 0),y([(0,d.state)()],t.prototype,"defaultTabsOrderArray",void 0),y([(0,d.state)()],t.prototype,"tabsOrderPrefsArray",void 0),y([(0,d.state)()],t.prototype,"isMoreTabTruncated",void 0),y([(0,d.state)()],t.prototype,"showLeftArrow",void 0),y([(0,d.state)()],t.prototype,"showRightArrow",void 0),y([(0,d.query)("slot[name='tab']")],t.prototype,"tabSlotElement",void 0),y([(0,d.query)("slot[name='panel']")],t.prototype,"panelSlotElement",void 0),y([(0,d.query)(".md-tab__list[part='tabs-list']")],t.prototype,"tabsListElement",void 0),y([(0,d.query)(".md-tabs__settings[part='md-tabs__settings']")],t.prototype,"tabsSettingsElement",void 0),y([(0,d.query)(".md-menu-overlay__more_tab")],t.prototype,"moreTabMenuElement",void 0),y([(0,d.query)("md-menu-overlay")],t.prototype,"menuOverlayElement",void 0),y([(0,d.query)(".md-tab__list[part='tabs-more-list']")],t.prototype,"tabsMoreListElement",void 0),y([(0,d.queryAll)(".md-menu-overlay__more_list md-tab")],t.prototype,"tabsCopyHiddenListElements",void 0),y([(0,d.query)("#visible-tabs-list")],t.prototype,"visibleTabsContainerElement",void 0),y([(0,d.query)("#tabs-more-list")],t.prototype,"hiddenTabsContainerElement",void 0),t=y([(0,a.wW)("md-tabs")],t),e.ELEMENT=t}(F||(F={}))},7704(e,t,i){i.d(t,{Io:()=>o.I,TS:()=>r.T,UM:()=>a.U,wW:()=>n.w,yC:()=>s.y}),i(2364);var s=i(3203),a=(i(9938),i(5201)),o=i(4781),r=i(608),n=i(9609)},2050(e,t,i){function s(e,t,i){let s;return function(...a){const o=this,r=i&&!s;clearTimeout(s),s=setTimeout(function(){s=null,i||e.apply(o,a)},t),r&&e.apply(o,a)}}function a(e,t){return t>=0&&t<e.length?e[t]:void 0}i.d(t,{Qx:()=>a,sg:()=>s})},8899(t,i,s){var a,o;t.exports=(a={property:()=>e.property,query:()=>e.query,queryAll:()=>e.queryAll,queryAssignedNodes:()=>e.queryAssignedNodes,state:()=>e.state},o={},s.d(o,a),o)}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return s[e].call(i.exports,i,i.exports,o),i.exports}o.m=s,t=[],o.O=(e,i,s,a)=>{if(!i){var r=1/0;for(h=0;h<t.length;h++){for(var[i,s,a]=t[h],n=!0,l=0;l<i.length;l++)(!1&a||r>=a)&&Object.keys(o.O).every(e=>o.O[e](i[l]))?i.splice(l--,1):(n=!1,a<r&&(r=a));if(n){t.splice(h--,1);var d=s();void 0!==d&&(e=d)}}return e}a=a||0;for(var h=t.length;h>0&&t[h-1][2]>a;h--)t[h]=t[h-1];t[h]=[i,s,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);export{o as __webpack_require__};i={561:0,1280:0,1528:0,1756:0,2050:0,2139:0,2942:0,4137:0,4431:0,4613:0,5323:0,6518:0,6812:0,6994:0,7704:0,8180:0,8899:0,9375:0,9669:0},o.C=e=>{var t,s,{__webpack_esm_ids__:a,__webpack_esm_modules__:r,__webpack_esm_runtime__:n}=e,l=0;for(t in r)o.o(r,t)&&(o.m[t]=r[t]);for(n&&n(o);l<a.length;l++)s=a[l],o.o(i,s)&&i[s]&&i[s][0](),i[a[l]]=0;o.O()},o.O.j=e=>0===i[e];import*as r from"../7103.js";o.C(r);import*as n from"../9609.js";o.C(n);import*as l from"../4084.js";o.C(l);import*as d from"../4955.js";o.C(d);import*as h from"../3517.js";o.C(h);import*as b from"../1156.js";o.C(b);import*as c from"../3305.js";o.C(c);import*as p from"../4739.js";o.C(p);import*as u from"../7154.js";o.C(u);import*as m from"../9773.js";o.C(m);import*as v from"../5983.js";o.C(v);import*as T from"../7755.js";o.C(T);import*as f from"../1821.js";o.C(f);import*as y from"../2364.js";o.C(y);import*as g from"../4980.js";o.C(g);import*as M from"../5308.js";o.C(M);import*as C from"../9500.js";o.C(C);import*as A from"../5584.js";o.C(A);import*as w from"../2900.js";o.C(w);import*as I from"../2577.js";o.C(I);import*as E from"../6343.js";o.C(E);import*as L from"../6525.js";o.C(L);import*as S from"../7582.js";o.C(S);import*as H from"../7162.js";o.C(H);import*as F from"../708.js";o.C(F);import*as x from"../9613.js";o.C(x);import*as _ from"../3272.js";o.C(_);import*as V from"../93.js";o.C(V);import*as $ from"../5846.js";o.C($);import*as k from"../6933.js";o.C(k);import*as O from"../7638.js";o.C(O);import*as z from"../7557.js";o.C(z);var j=o.O(void 0,[7103,9609,4084,4955,3517,1156,3305,4739,7154,9773,5983,7755,1821,2364,4980,5308,9500,5584,2900,2577,6343,6525,7582,7162,708,9613,3272,93,5846,6933,7638,7557],()=>o(8543));const P=(j=o.O(j)).T,D=j.t;export{P as MORE_MENU_TAB_COPY_ID_PREFIX,D as Tabs};