1import{B as K,R as S,W as D,af as b,aF as k,q as H,z as B,a7 as h,Q as l,J as E,c as u,o as c,a as p,k as g,l as v,L as I,K as w,U as m,F as P,m as A,t as L,a9 as O}from"./Cz8QIUAc.js";import{s as N}from"./zL9vs5L9.js";import{s as V}from"./FH6K6Gfv.js";import"./xZnWeH9A.js";var j=` 2 .p-tabview-tablist-container { 3 position: relative; 4 } 5 6 .p-tabview-scrollable > .p-tabview-tablist-container { 7 overflow: hidden; 8 } 9 10 .p-tabview-tablist-scroll-container { 11 overflow-x: auto; 12 overflow-y: hidden; 13 scroll-behavior: smooth; 14 scrollbar-width: none; 15 overscroll-behavior: contain auto; 16 } 17 18 .p-tabview-tablist-scroll-container::-webkit-scrollbar { 19 display: none; 20 } 21 22 .p-tabview-tablist { 23 display: flex; 24 margin: 0; 25 padding: 0; 26 list-style-type: none; 27 flex: 1 1 auto; 28 background: dt('tabview.tab.list.background'); 29 border: 1px solid dt('tabview.tab.list.border.color'); 30 border-width: 0 0 1px 0; 31 position: relative; 32 } 33 34 .p-tabview-tab-header { 35 cursor: pointer; 36 user-select: none; 37 display: flex; 38 align-items: center; 39 text-decoration: none; 40 position: relative; 41 overflow: hidden; 42 border-style: solid; 43 border-width: 0 0 1px 0; 44 border-color: transparent transparent dt('tabview.tab.border.color') transparent; 45 color: dt('tabview.tab.color'); 46 padding: 1rem 1.125rem; 47 font-weight: 600; 48 border-top-right-radius: dt('border.radius.md'); 49 border-top-left-radius: dt('border.radius.md'); 50 transition: 51 color dt('tabview.transition.duration'), 52 outline-color dt('tabview.transition.duration'); 53 margin: 0 0 -1px 0; 54 outline-color: transparent; 55 } 56 57 .p-tabview-tablist-item:not(.p-disabled) .p-tabview-tab-header:focus-visible { 58 outline: dt('focus.ring.width') dt('focus.ring.style') dt('focus.ring.color'); 59 outline-offset: -1px; 60 } 61 62 .p-tabview-tablist-item:not(.p-highlight):not(.p-disabled):hover > .p-tabview-tab-header { 63 color: dt('tabview.tab.hover.color'); 64 } 65 66 .p-tabview-tablist-item.p-highlight > .p-tabview-tab-header { 67 color: dt('tabview.tab.active.color'); 68 } 69 70 .p-tabview-tab-title { 71 line-height: 1; 72 white-space: nowrap; 73 } 74 75 .p-tabview-next-button, 76 .p-tabview-prev-button { 77 position: absolute; 78 top: 0; 79 margin: 0; 80 padding: 0; 81 z-index: 2; 82 height: 100%; 83 display: flex; 84 align-items: center; 85 justify-content: center; 86 background: dt('tabview.nav.button.background'); 87 color: dt('tabview.nav.button.color'); 88 width: 2.5rem; 89 border-radius: 0; 90 outline-color: transparent; 91 transition: 92 color dt('tabview.transition.duration'), 93 outline-color dt('tabview.transition.duration'); 94 box-shadow: dt('tabview.nav.button.shadow'); 95 border: none; 96 cursor: pointer; 97 user-select: none; 98 } 99 100 .p-tabview-next-button:focus-visible, 101 .p-tabview-prev-button:focus-visible { 102 outline: dt('focus.ring.width') dt('focus.ring.style') dt('focus.ring.color'); 103 outline-offset: dt('focus.ring.offset'); 104 } 105 106 .p-tabview-next-button:hover, 107 .p-tabview-prev-button:hover { 108 color: dt('tabview.nav.button.hover.color'); 109 } 110 111 .p-tabview-prev-button { 112 left: 0; 113 } 114 115 .p-tabview-next-button { 116 right: 0; 117 } 118 119 .p-tabview-panels { 120 background: dt('tabview.tab.panel.background'); 121 color: dt('tabview.tab.panel.color'); 122 padding: 0.875rem 1.125rem 1.125rem 1.125rem; 123 } 124 125 .p-tabview-ink-bar { 126 z-index: 1; 127 display: block; 128 position: absolute; 129 bottom: -1px; 130 height: 1px; 131 background: dt('tabview.tab.active.border.color'); 132 transition: 250ms cubic-bezier(0.35, 0, 0.25, 1); 133 } 134`,F={root:function(e){var n=e.props;return["p-tabview p-component",{"p-tabview-scrollable":n.scrollable}]},navContainer:"p-tabview-tablist-container",prevButton:"p-tabview-prev-button",navContent:"p-tabview-tablist-scroll-container",nav:"p-tabview-tablist",tab:{header:function(e){var n=e.instance,a=e.tab,o=e.index;return["p-tabview-tablist-item",n.getTabProp(a,"headerClass"),{"p-tabview-tablist-item-active":n.d_activeIndex===o,"p-disabled":n.getTabProp(a,"disabled")}]},headerAction:"p-tabview-tab-header",headerTitle:"p-tabview-tab-title",content:function(e){var n=e.instance,a=e.tab;return["p-tabview-panel",n.getTabProp(a,"contentClass")]}},inkbar:"p-tabview-ink-bar",nextButton:"p-tabview-next-button",panelContainer:"p-tabview-panels"},R=K.extend({name:"tabview",style:j,classes:F}),z={name:"BaseTabView",extends:D,props:{activeIndex:{type:Number,default:0},lazy:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},tabindex:{type:Number,default:0},selectOnFocus:{type:Boolean,default:!1},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null},prevIcon:{type:String,default:void 0},nextIcon:{type:String,default:void 0}},style:R,provide:function(){return{$pcTabs:void 0,$pcTabView:this,$parentInstance:this}}},W={name:"TabView",extends:z,inheritAttrs:!1,emits:["update:activeIndex","tab-change","tab-click"],data:function(){return{d_activeIndex:this.activeIndex,isPrevButtonDisabled:!0,isNextButtonDisabled:!1}},watch:{activeIndex:function(e){this.d_activeIndex=e,this.scrollInView({index:e})}},mounted:function(){console.warn("Deprecated since v4. Use Tabs component instead."),this.updateInkBar(),this.scrollable&&this.updateButtonState()},updated:function(){this.updateInkBar(),this.scrollable&&this.updateButtonState()},methods:{isTabPanel:function(e){return e.type.name==="TabPanel"},isTabActive:function(e){return this.d_activeIndex===e},getTabProp:function(e,n){return e.props?e.props[n]:void 0},getKey:function(e,n){return this.getTabProp(e,"header")||n},getTabHeaderActionId:function(e){return"".concat(this.$id,"_").concat(e,"_header_action")},getTabContentId:function(e){return"".concat(this.$id,"_").concat(e,"_content")},getTabPT:function(e,n,a){var o=this.tabs.length,r={props:e.props,parent:{instance:this,props:this.$props,state:this.$data},context:{index:a,count:o,first:a===0,last:a===o-1,active:this.isTabActive(a)}};return l(this.ptm("tabpanel.".concat(n),{tabpanel:r}),this.ptm("tabpanel.".concat(n),r),this.ptmo(this.getTabProp(e,"pt"),n,r))},onScroll:function(e){this.scrollable&&this.updateButtonState(),e.preventDefault()},onPrevButtonClick:function(){var e=this.$refs.content,n=b(e),a=e.scrollLeft-n;e.scrollLeft=a<=0?0:a},onNextButtonClick:function(){var e=this.$refs.content,n=b(e)-this.getVisibleButtonWidths(),a=e.scrollLeft+n,o=e.scrollWidth-n;e.scrollLeft=a>=o?o:a},onTabClick:function(e,n,a){this.changeActiveIndex(e,n,a),this.$emit("tab-click",{originalEvent:e,index:a})},onTabKeyDown:function(e,n,a){switch(e.code){case"ArrowLeft":this.onTabArrowLeftKey(e);break;case"ArrowRight":this.onTabArrowRightKey(e);break;case"Home":this.onTabHomeKey(e);break;case"End":this.onTabEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onTabEnterKey(e,n,a);break}},onTabArrowRightKey:function(e){var n=this.findNextHeaderAction(e.target.parentElement);n?this.changeFocusedTab(e,n):this.onTabHomeKey(e),e.preventDefault()},onTabArrowLeftKey:function(e){var n=this.findPrevHeaderAction(e.target.parentElement);n?this.changeFocusedTab(e,n):this.onTabEndKey(e),e.preventDefault()},onTabHomeKey:function(e){var n=this.findFirstHeaderAction();this.changeFocusedTab(e,n),e.preventDefault()},onTabEndKey:function(e){var n=this.findLastHeaderAction();this.changeFocusedTab(e,n),e.preventDefault()},onPageDownKey:function(e){this.scrollInView({index:this.$refs.nav.children.length-2}),e.preventDefault()},onPageUpKey:function(e){this.scrollInView({index:0}),e.preventDefault()},onTabEnterKey:function(e,n,a){this.changeActiveIndex(e,n,a),e.preventDefault()},findNextHeaderAction:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=n?e:e.nextElementSibling;return a?h(a,"data-p-disabled")||h(a,"data-pc-section")==="inkbar"?this.findNextHeaderAction(a):B(a,'[data-
134pc-section="headeraction"]'):null},findPrevHeaderAction:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=n?e:e.previousElementSibling;return a?h(a,"data-p-disabled")||h(a,"data-pc-section")==="inkbar"?this.findPrevHeaderAction(a):B(a,'[data-pc-section="headeraction"]'):null},findFirstHeaderAction:function(){return this.findNextHeaderAction(this.$refs.nav.firstElementChild,!0)},findLastHeaderAction:function(){return this.findPrevHeaderAction(this.$refs.nav.lastElementChild,!0)},changeActiveIndex:function(e,n,a){!this.getTabProp(n,"disabled")&&this.d_activeIndex!==a&&(this.d_activeIndex=a,this.$emit("update:activeIndex",a),this.$emit("tab-change",{originalEvent:e,index:a}),this.scrollInView({index:a}))},changeFocusedTab:function(e,n){if(n&&(H(n),this.scrollInView({element:n}),this.selectOnFocus)){var a=parseInt(n.parentElement.dataset.pcIndex,10),o=this.tabs[a];this.changeActiveIndex(e,o,a)}},scrollInView:function(e){var n=e.element,a=e.index,o=a===void 0?-1:a,r=n||this.$refs.nav.children[o];r&&r.scrollIntoView&&r.scrollIntoView({block:"nearest"})},updateInkBar:function(){var e=this.$refs.nav.children[this.d_activeIndex];this.$refs.inkbar.style.width=b(e)+"px",this.$refs.inkbar.style.left=k(e).left-k(this.$refs.nav).left+"px"},updateButtonState:function(){var e=this.$refs.content,n=e.scrollLeft,a=e.scrollWidth,o=b(e);this.isPrevButtonDisabled=n===0,this.isNextButtonDisabled=parseInt(n)===a-o},getVisibleButtonWidths:function(){var e=this.$refs,n=e.prevBtn,a=e.nextBtn;return[n,a].reduce(function(o,r){return r?o+b(r):o},0)}},computed:{tabs:function(){var e=this;return this.$slots.default().reduce(function(n,a){return e.isTabPanel(a)?n.push(a):a.children&&a.children instanceof Array&&a.children.forEach(function(o){e.isTabPanel(o)&&n.push(o)}),n},[])},prevButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.previous:void 0},nextButtonAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.next:void 0}},directives:{ripple:S},components:{ChevronLeftIcon:N,ChevronRightIcon:V}};function f(t){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(t)}function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?x(Object(n),!0).forEach(function(a){U(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function U(t,e,n){return(e=Q(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q(t){var e=q(t,"string");return f(e)=="symbol"?e:e+""}function q(t,e){if(f(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(f(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var J=["tabindex","aria-label"],M=["data-p-active","data-p-disabled","data-pc-index"],G=["id","tabindex","aria-disabled","aria-selected","aria-controls","onClick","onKeydown"],X=["tabindex","aria-label"],Y=["id","aria-labelledby","data-pc-index","data-p-active"];function Z(t,e,n,a,o,r){var y=E("ripple");return c(),u("div",l({class:t.cx("root"),role:"tablist"},t.ptmi("root")),[p("div",l({class:t.cx("navContainer")},t.ptm("navContainer")),[t.scrollable&&!o.isPrevButtonDisabled?g((c(),u("button",l({key:0,ref:"prevBtn",type:"button",class:t.cx("prevButton"),tabindex:t.tabindex,"aria-label":r.prevButtonAriaLabel,onClick:e[0]||(e[0]=function(){return r.onPrevButtonClick&&r.onPrevButtonClick.apply(r,arguments)})},d(d({},t.prevButtonProps),t.ptm("prevButton")),{"data-pc-group-section":"navbutton"}),[I(t.$slots,"previcon",{},function(){return[(c(),w(m(t.prevIcon?"span":"ChevronLeftIcon"),l({"aria-hidden":"true",class:t.prevIcon},t.ptm("prevIcon")),null,16,["class"]))]})],16,J)),[[y]]):v("",!0),p("div",l({ref:"content",class:t.cx("navContent"),onScroll:e[1]||(e[1]=function(){return r.onScroll&&r.onScroll.apply(r,arguments)})},t.ptm("navContent")),[p("ul",l({ref:"nav",class:t.cx("nav")},t.ptm("nav")),[(c(!0),u(P,null,A(r.tabs,function(i,s){return c(),u("li",l({key:r.getKey(i,s),style:r.getTabProp(i,"headerStyle"),class:t.cx("tab.header",{tab:i,index:s}),role:"presentation"},{ref_for:!0},d(d(d({},r.getTabProp(i,"headerProps")),r.getTabPT(i,"root",s)),r.getTabPT(i,"header",s)),{"data-pc-name":"tabpanel","data-p-active":o.d_activeIndex===s,"data-p-disabled":r.getTabProp(i,"disabled"),"data-pc-index":s}),[g((c(),u("a",l({id:r.getTabHeaderActionId(s),class:t.cx("tab.headerAction"),tabindex:r.getTabProp(i,"disabled")||!r.isTabActive(s)?-1:t.tabindex,role:"tab","aria-disabled":r.getTabProp(i,"disabled"),"aria-selected":r.isTabActive(s),"aria-controls":r.getTabContentId(s),onClick:function(T){return r.onTabClick(T,i,s)},onKeydown:function(T){return r.onTabKeyDown(T,i,s)}},{ref_for:!0},d(d({},r.getTabProp(i,"headerActionProps")),r.getTabPT(i,"headerAction",s))),[i.props&&i.props.header?(c(),u("span",l({key:0,class:t.cx("tab.headerTitle")},{ref_for:!0},r.getTabPT(i,"headerTitle",s)),L(i.props.header),17)):v("",!0),i.children&&i.children.header?(c(),w(m(i.children.header),{key:1})):v("",!0)],16,G)),[[y]])],16,M)}),128)),p("li",l({ref:"inkbar",class:t.cx("inkbar"),role:"presentation","aria-hidden":"true"},t.ptm("inkbar")),null,16)],16)],16),t.scrollable&&!o.isNextButtonDisabled?g((c(),u("button",l({key:1,ref:"nextBtn",type:"button",class:t.cx("nextButton"),tabindex:t.tabindex,"aria-label":r.nextButtonAriaLabel,onClick:e[2]||(e[2]=function(){return r.onNextButtonClick&&r.onNextButtonClick.apply(r,arguments)})},d(d({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navbutton"}),[I(t.$slots,"nexticon",{}
134,function(){return[(c(),w(m(t.nextIcon?"span":"ChevronRightIcon"),l({"aria-hidden":"true",class:t.nextIcon},t.ptm("nextIcon")),null,16,["class"]))]})],16,X)),[[y]]):v("",!0)],16),p("div",l({class:t.cx("panelContainer")},t.ptm("panelContainer")),[(c(!0),u(P,null,A(r.tabs,function(i,s){return c(),u(P,{key:r.getKey(i,s)},[!t.lazy||r.isTabActive(s)?g((c(),u("div",l({key:0,id:r.getTabContentId(s),style:r.getTabProp(i,"contentStyle"),class:t.cx("tab.content",{tab:i}),role:"tabpanel","aria-labelledby":r.getTabHeaderActionId(s)},{ref_for:!0},d(d(d({},r.getTabProp(i,"contentProps")),r.getTabPT(i,"root",s)),r.getTabPT(i,"content",s)),{"data-pc-name":"tabpanel","data-pc-index":s,"data-p-active":o.d_activeIndex===s}),[(c(),w(m(i)))],16,Y)),[[O,t.lazy?!0:r.isTabActive(s)]]):v("",!0)],64)}),128))],16)],16)}W.render=Z;export{W as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.