primevue
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primevue) [,t=require("primevue/basecomponent"),o=require("primevue/icons/arrowdown"),l=require("primevue/icons/arrowup"),n=require("primevue/icons/spinner"),i=require("primevue/paginator"),r=require("primevue/utils"),s=require("primevue/virtualscroller"),a=require("primevue/icons/chevrondown"),d=require("primevue/icons/chevronright"),c=require("primevue/icons/bars"),p=require("primevue/icons/check"),u=require("primevue/icons/pencil"),h=require("primevue/icons/times"),m=require("primevue/overlayeventbus"),f=require("primevue/ripple"),g=require("vue"),w=require("primevue/button"),y=require("primevue/dropdown"),b=require("primevue/focustrap"),C=require("primevue/icons/filter"),k=require("primevue/icons/filterslash"),v=require("primevue/icons/plus"),R=require("primevue/icons/trash"),x=require("primevue/portal"),S=require("primevue/icons/sortalt"),P=require("primevue/icons/sortamountdown"),E=require("primevue/icons/sortamountupalt");function B(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=B(t),M=B(o),$=B(l),I=B(n),O=B(i),T=B(s),F=B(a),z=B(d),L=B(c),H=B(p),K=B(u),_=B(h),A=B(m),V=B(f),G=B(w),N=B(y),j=B(b),U=B(C),W=B(k),q=B(v),X=B(R),Z=B(x),J=B(S),Y=B(P),Q=B(E),ee={name:"RowCheckbox",extends:D.default,emits:["change"],props:{value:null,checked:null,column:null,rowCheckboxIconTemplate:{type:Function,default:null}},data:()=>({focused:!1}),methods:{getColumnPTOptions(e){return this.ptmo(this.getColumnProp(),e,{props:this.column.props,parent:{props:this.$props,state:this.$data},context:{checked:this.checked,focused:this.focused,disabled:this.$attrs.disabled}})},getColumnProp(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},onClick(e){this.$attrs.disabled||(this.$emit("change",{originalEvent:e,data:this.value}),r.DomHandler.focus(this.$refs.input)),e.preventDefault()},onFocus(){this.focused=!0},onBlur(){this.focused=!1},onKeydown(e){if("Space"===e.code)this.onClick(e)}},computed:{checkboxAriaLabel(){return this.$primevue.config.locale.aria?this.checked?this.$primevue.config.locale.aria.selectRow:this.$primevue.config.locale.aria.unselectRow:void 0}},components:{CheckIcon:H.default}};const te=["checked","disabled","tabindex","aria-label"];ee.render=function(e,t,o,l,n,i){const r=g.resolveComponent("CheckIcon");return g.openBlock(),g.createElementBlock("div",g.mergeProps({class:["p-checkbox p-component",{"p-checkbox-focused":n.focused}],onClick:t[3]||(t[3]=(...e)=>i.onClick&&i.onClick(...e))},i.getColumnPTOptions("checkboxWrapper")),[g.createElementVNode("div",g.mergeProps({class:"p-hidden-accessible"},i.getColumnPTOptions("hiddenInputWrapper")),[g.createElementVNode("input",g.mergeProps({ref:"input",type:"checkbox",checked:o.checked,disabled:e.$attrs.disabled,tabindex:e.$attrs.disabled?null:"0","aria-label":i.checkboxAriaLabel,onFocus:t[0]||(t[0]=e=>i.onFocus(e)),onBlur:t[1]||(t[1]=e=>i.onBlur(e)),onKeydown:t[2]||(t[2]=(...e)=>i.onKeydown&&i.onKeydown(...e))},i.getColumnPTOptions("hiddenInput")),null,16,te)],16),g.createElementVNode("div",g.mergeProps({ref:"box",class:["p-checkbox-box p-component",{"p-highlight":o.checked,"p-disabled":e.$attrs.disabled,"p-focus":n.focused}]},i.getColumnPTOptions("checkbox")),[o.rowCheckboxIconTemplate?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.rowCheckboxIconTemplate),{key:0,checked:o.checked,class:"p-checkbox-icon"},null,8,["checked"])):(g.openBlock(),g.createBlock(r,g.mergeProps({key:1,class:"p-checkbox-icon"},i.getColumnPTOptions("checkboxIcon")),null,16))],16)],16)};var oe={name:"RowRadioButton",extends:D.default,inheritAttrs:!1,emits:["change"],props:{value:null,checked:null,name:null,column:null},data:()=>({focused:!1}),methods:{getColumnPTOptions(e){return this.ptmo(this.getColumnProp(),e,{props:this.column.props,parent:{props:this.$props,state:this.$data},context:{checked:this.checked,focused:this.focused,disabled:this.$attrs.disabled}})},getColumnProp(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},onClick(e){this.disabled||this.checked||(this.$emit("change",{originalEvent:e,data:this.value}),r.DomHandler.focus(this.$refs.input))},onFocus(){this.focused=!0},onBlur(){this.focused=!1}}};const le=["checked","disabled","name"];oe.render=function(e,t,o,l,n,i){return g.openBlock(),g.createElementBlock("div",g.mergeProps({class:["p-radiobutton p-component",{"p-radiobutton-focused":n.focused}],onClick:t[3]||(t[3]=(...e)=>i.onClick&&i.onClick(...e))},i.getColumnPTOptions("radiobuttonWrapper")),[g.createElementVNode("div",g.mergeProps({class:"p-hidden-accessible"},e.ptm("hiddenInputWrapper")),[g.createElementVNode("input",g.mergeProps({ref:"input",type:"radio",checked:o.checked,disabled:e.$attrs.disabled,name:o.name,tabindex:"0",onFocus:t[0]||(t[0]=e=>i.onFocus(e)),onBlur:t[1]||(t[1]=e=>i.onBlur(e)),onKeydown:t[2]||(t[2]=g.withKeys(g.withModifiers(((...e)=>i.onClick&&i.onClick(...e)),["prevent"]),["space"]))},i.getColumnPTOptions("hiddenInput")),null,16,le)],16),g.createElementVNode("div",g.mergeProps({ref:"box",class:["p-radiobutton-box p-component",{"p-highlight":o.checked,"p-disabled":e.$attrs.disabled,"p-focus":n.focused}]},i.getColumnPTOptions("radiobutton")),[g.createElementVNode("div",g.mergeProps({class:"p-radiobutton-icon"},i.getColumnPTOptions("radiobuttonIcon")),null,16)],16)],16)};var ne={name:"BodyCell",extends:D.default,emits:["cell-edit-init","cell-edit-complete","cell-edit-cancel","row-edit-init","row-edit-save","row-edit-cancel","row-toggle","radio-change","checkbox-change","editing-meta-change"],props:{rowData:{type:Object,default:null},column:{type:Object,default:null},frozenRow:{type:Boolean,default:!1},rowIndex:{type:Number,default:null},index:{type:Number,default:null},isRowExpanded:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},editing:{type:Boolean,default:!1},editingMeta:{type:Object,default:null},editMode:{type:String,default:null},responsiveLayout:{type:String,default:"stack"},virtualScrollerContentProps:{type:Object,default:null},ariaControls:{type:String,default:null},name:{type:String,default:null},expandedRowIcon:{type:String,default:null},collapsedRowIcon:{type:String,default:null}},documentEditListener:null,selfClick:!1,overlayEventListener:null,data(){return{d_editing:this.editing,styleObject:{}}},watch:{editing(e){this.d_editing=e},"$data.d_editing":function(e){this.$emit("editing-meta-change",{data:this.rowData,field:this.field||`field_${this.index}`,index:this.rowIndex,editing:e})}},mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition(),this.d_editing&&("cell"===this.editMode||"row"===this.editMode&&this.columnProp("rowEditor"))&&setTimeout((()=>{const e=r.DomHandler.getFirstFocusableElement(this.$el);e&&e.focus()}),1)},beforeUnmount(){this.overlayEventListener&&(A.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null)},methods:{columnProp(e){return r.ObjectUtils.getVNodeProp(this.column,e)},getColumnPTOptions(e,t){return this.ptmo(this.getColumnProp(e),t,{props:e.props,parent:{props:this.$props,state:this.$data}})},getColumnProp:e=>e.props&&e.props.pt?e.props.pt:void 0,resolveFieldData(){return r.ObjectUtils.resolveFieldData(this.rowData,this.field)},toggleRow(e){this.$emit("row-toggle",{originalEvent:e,data:this.rowData})},toggleRowWithRadio(e,t){this.$emit("radio-change",{originalEvent:e.originalEvent,index:t,data:e.data})},toggleRowWithCheckbox(e,t){this.$emit("checkbox-change",{originalEvent:e.originalEvent,index:t,data:e.data})},isEditable(){return this.column.children&&null!=this.column.children.editor},bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=e=>{this.selfClick||this.completeEdit(e,"outside"),this.selfClick=!1},document.addEventListener("click",this.documentEditListener))},unbindDocumentEditListener(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null,this.selfClick=!1)},switchCellToViewMode(){this.d_editing=!1,this.unbindDocumentEditListener(),A.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null},onClick(e){"cell"===this.editMode&&this.isEditable()&&(this.selfClick=!0,this.d_editing||(this.d_editing=!0,this.bindDocumentEditListener(),this.$emit("cell-edit-init",{originalEvent:e,data:this.rowData,field:this.field,index:this.rowIndex}),this.overlayEventListener=e=>{this.$el&&this.$el.contains(e.target)&&(this.selfClick=!0)},A.default.on("overlay-click",this.overlayEventListener)))},completeEdit(e,t){const o={originalEvent:e,data:this.rowData,newData:this.editingRowData,value:this.rowData[this.field],newValue:this.editingRowData[this.field],field:this.field,index:this.rowIndex,type:t,defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0}};this.$emit("cell-edit-complete",o),o.defaultPrevented||this.switchCellToViewMode()},onKeyDown(e){if("cell"===this.editMode)switch(e.code){case"Enter":this.completeEdit(e,"enter");break;case"Escape":this.switchCellToViewMode(),this.$emit("cell-edit-cancel",{originalEvent:e,data:this.rowData,field:this.field,index:this.rowIndex});break;case"Tab":this.completeEdit(e,"tab"),e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e)}},moveToPreviousCell(e){let t=this.findCell(e.target),o=this.findPreviousEditableColumn(t);o&&(r.DomHandler.invokeElementMethod(o,"click"),e.preventDefault())},moveToNextCell(e){let t=this.findCell(e.target),o=this.findNextEditableColumn(t);o&&(r.DomHandler.invokeElementMethod(o,"click"),e.preventDefault())},findCell(e){if(e){let t=e;for(;t&&!r.DomHandler.hasClass(t,"p-cell-editing");)t=t.parentElement;return t}return null},findPreviousEditableColumn(e){let t=e.previousElementSibling;if(!t){let o=e.parentElement.previousElementSibling;o&&(t=o.lastElementChild)}return t?r.DomHandler.hasClass(t,"p-editable-column")?t:this.findPreviousEditableColumn(t):null},findNextEditableColumn(e){let t=e.nextElementSibling;if(!t){let o=e.parentElement.nextElementSibling;o&&(t=o.firstElementChild)}return t?r.DomHandler.hasClass(t,"p-editable-column")?t:this.findNextEditableColumn(t):null},isEditingCellValid(){return 0===r.DomHandler.find(this.$el,".p-invalid").length},onRowEditInit(e){this.$emit("row-edit-init",{originalEvent:e,data:this.rowData,newData:this.editingRowData,field:this.field,index:this.rowIndex})},onRowEditSave(e){this.$emit("row-edit-save",{originalEvent:e,data:this.rowData,newData:this.editingRowData,field:this.field,index:this.rowIndex})},onRowEditCancel(e){this.$emit("row-edit-cancel",{originalEvent:e,data:this.rowData,newData:this.editingRowData,field:this.field,index:this.rowIndex})},editorInitCallback(e){this.$emit("row-edit-init",{originalEvent:e,data:this.rowData,newData:this.editingRowData,field:this.field,index:this.rowIndex})},editorSaveCallback(e){"row"===this.editMode?this.$emit("row-edit-save",{originalEvent:e,data:this.rowData,newData:this.editingRowData,field:this.field,index:this.rowIndex}):this.completeEdit(e,"enter")},editorCancelCallback(e){"row"===this.editMode?this.$emit("row-edit-cancel",{originalEvent:e,data:this.rowData,newData:this.editingRowData,field:this.field,index:this.rowIndex}):(this.switchCellToViewMode(),this.$emit("cell-edit-cancel",{originalEvent:e,data:this.rowData,field:this.field,index:this.rowIndex}))},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let e=0,t=this.$el.nextElementSibling;t&&(e=r.DomHandler.getOuterWidth(t)+parseFloat(t.style.right||0)),this.styleObject.right=e+"px"}else{let e=0,t=this.$el.previousElementSibling;t&&(e=r.DomHandler.getOuterWidth(t)+parseFloat(t.style.left||0)),this.styleObject.left=e+"px"}}},getVirtualScrollerProp(e){return this.virtualScrollerContentProps?this.virtualScrollerContentProps[e]:null}},computed:{editingRowData(){return this.editingMeta[this.rowIndex]?this.editingMeta[this.rowIndex].data:this.rowData},field(){return this.columnProp("field")},containerClass(){return[this.columnProp("bodyClass"),this.columnProp("class"),{"p-selection-column":null!=this.columnProp("selectionMode"),"p-editable-column":this.isEditable(),"p-cell-editing":this.d_editing,"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("bodyStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},loading(){return this.getVirtualScrollerProp("loading")},loadingOptions(){const e=this.getVirtualScrollerProp("getLoaderOptions");return e&&e(this.rowIndex,{cellIndex:this.index,cellFirst:0===this.index,cellLast:this.index===this.getVirtualScrollerProp("columns").length-1,cellEven:this.index%2==0,cellOdd:this.index%2!=0,column:this.column,field:this.field})},expandButtonAriaLabel(){return this.$primevue.config.locale.aria?this.isRowExpanded?this.$primevue.config.locale.aria.expandRow:this.$primevue.config.locale.aria.collapseRow:void 0},initButtonAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.editRow:void 0},saveButtonAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.saveEdit:void 0},cancelButtonAriaLabel(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.cancelEdit:void 0}},components:{DTRadioButton:oe,DTCheckbox:ee,ChevronDownIcon:F.default,ChevronRightIcon:z.default,BarsIcon:L.default,PencilIcon:K.default,CheckIcon:H.default,TimesIcon:_.default},directives:{ripple:V.default}};const ie=["aria-expanded","aria-controls","aria-label"],re=["aria-label"],se=["aria-label"],ae=["aria-label"];ne.render=function(e,t,o,l,n,i){const r=g.resolveComponent("DTRadioButton"),s=g.resolveComponent("DTCheckbox"),a=g.resolveComponent("ChevronDownIcon"),d=g.resolveComponent("ChevronRightIcon"),c=g.resolveDirective("ripple");return i.loading?(g.openBlock(),g.createElementBlock("td",g.mergeProps({key:0,style:i.containerStyle,class:i.containerClass,role:"cell"},{...i.getColumnPTOptions(o.column,"root"),...i.getColumnPTOptions(o.column,"bodyCell")}),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children.loading),{data:o.rowData,column:o.column,field:i.field,index:o.rowIndex,frozenRow:o.frozenRow,loadingOptions:i.loadingOptions},null,8,["data","column","field","index","frozenRow","loadingOptions"]))],16)):(g.openBlock(),g.createElementBlock("td",g.mergeProps({key:1,style:i.containerStyle,class:i.containerClass,onClick:t[6]||(t[6]=(...e)=>i.onClick&&i.onClick(...e)),onKeydown:t[7]||(t[7]=(...e)=>i.onKeyDown&&i.onKeyDown(...e)),role:"cell"},{...i.getColumnPTOptions(o.column,"root"),...i.getColumnPTOptions(o.column,"bodyCell")}),["stack"===o.responsiveLayout?(g.openBlock(),g.createElementBlock("span",g.mergeProps({key:0,class:"p-column-title"},i.getColumnPTOptions(o.column,"columnTitle")),g.toDisplayString(i.columnProp("header")),17)):g.createCommentVNode("",!0),o.column.children&&o.column.children.body&&!n.d_editing?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children.body),{key:1,data:o.rowData,column:o.column,field:i.field,index:o.rowIndex,frozenRow:o.frozenRow,editorInitCallback:i.editorInitCallback},null,8,["data","column","field","index","frozenRow","editorInitCallback"])):o.column.children&&o.column.children.editor&&n.d_editing?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children.editor),{key:2,data:i.editingRowData,column:o.column,field:i.field,index:o.rowIndex,frozenRow:o.frozenRow,editorSaveCallback:i.editorSaveCallback,editorCancelCallback:i.editorCancelCallback},null,8,["data","column","field","index","frozenRow","editorSaveCallback","editorCancelCallback"])):o.column.children&&o.column.children.body&&!o.column.children.editor&&n.d_editing?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children.body),{key:3,data:i.editingRowData,column:o.column,field:i.field,index:o.rowIndex,frozenRow:o.frozenRow},null,8,["data","column","field","index","frozenRow"])):i.columnProp("selectionMode")?(g.openBlock(),g.createElementBlock(g.Fragment,{key:4},["single"===i.columnProp("selectionMode")?(g.openBlock(),g.createBlock(r,{key:0,value:o.rowData,name:o.name,checked:o.selected,onChange:t[0]||(t[0]=e=>i.toggleRowWithRadio(e,o.rowIndex)),column:o.column,pt:e.pt},null,8,["value","name","checked","column","pt"])):"multiple"===i.columnProp("selectionMode")?(g.openBlock(),g.createBlock(s,{key:1,value:o.rowData,checked:o.selected,rowCheckboxIconTemplate:o.column.children&&o.column.children.rowcheckboxicon,"aria-selected":!!o.selected||void 0,onChange:t[1]||(t[1]=e=>i.toggleRowWithCheckbox(e,o.rowIndex)),column:o.column,pt:e.pt},null,8,["value","checked","rowCheckboxIconTemplate","aria-selected","column","pt"])):g.createCommentVNode("",!0)],64)):i.columnProp("rowReorder")?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children&&o.column.children.rowreordericon?o.column.children.rowreordericon:i.columnProp("rowReorderIcon")?"i":"BarsIcon"),{key:5,class:g.normalizeClass(["p-datatable-reorderablerow-handle",i.columnProp("rowReorderIcon")])},null,8,["class"])):i.columnProp("expander")?g.withDirectives((g.openBlock(),g.createElementBlock("button",g.mergeProps({key:6,class:"p-row-toggler p-link",type:"button","aria-expanded":o.isRowExpanded,"aria-controls":o.ariaControls,"aria-label":i.expandButtonAriaLabel,onClick:t[2]||(t[2]=(...e)=>i.toggleRow&&i.toggleRow(...e))},i.getColumnPTOptions(o.column,"rowToggler")),[o.column.children&&o.column.children.rowtogglericon?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children.rowtogglericon),{key:0,rowExpanded:o.isRowExpanded},null,8,["rowExpanded"])):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[o.isRowExpanded&&o.expandedRowIcon?(g.openBlock(),g.createElementBlock("span",{key:0,class:g.normalizeClass(["p-row-toggler-icon",o.expandedRowIcon])},null,2)):o.isRowExpanded&&!o.expandedRowIcon?(g.openBlock(),g.createBlock(a,g.mergeProps({key:1,class:"p-row-toggler-icon"},i.getColumnPTOptions(o.column,"rowTogglerIcon")),null,16)):!o.isRowExpanded&&o.collapsedRowIcon?(g.openBlock(),g.createElementBlock("span",{key:2,class:g.normalizeClass(["p-row-toggler-icon",o.collapsedRowIcon])},null,2)):o.isRowExpanded||o.collapsedRowIcon?g.createCommentVNode("",!0):(g.openBlock(),g.createBlock(d,g.mergeProps({key:3,class:"p-row-toggler-icon"},i.getColumnPTOptions(o.column,"rowTogglerIcon")),null,16))],64))],16,ie)),[[c]]):"row"===o.editMode&&i.columnProp("rowEditor")?(g.openBlock(),g.createElementBlock(g.Fragment,{key:7},[n.d_editing?g.createCommentVNode("",!0):g.withDirectives((g.openBlock(),g.createElementBlock("button",g.mergeProps({key:0,class:"p-row-editor-init p-link",type:"button","aria-label":i.initButtonAriaLabel,onClick:t[3]||(t[3]=(...e)=>i.onRowEditInit&&i.onRowEditInit(...e))},i.getColumnPTOptions(o.column,"rowEditorInitButton")),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children&&o.column.children.roweditoriniticon||"PencilIcon"),g.mergeProps({class:"p-row-editor-init-icon"},i.getColumnPTOptions(o.column,"rowEditorInitIcon")),null,16))],16,re)),[[c]]),n.d_editing?g.withDirectives((g.openBlock(),g.createElementBlock("button",g.mergeProps({key:1,class:"p-row-editor-save p-link",type:"button","aria-label":i.saveButtonAriaLabel,onClick:t[4]||(t[4]=(...e)=>i.onRowEditSave&&i.onRowEditSave(...e))},i.getColumnPTOptions(o.column,"rowEditorEditButton")),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children&&o.column.children.roweditorsaveicon||"CheckIcon"),g.mergeProps({class:"p-row-editor-save-icon"},i.getColumnPTOptions(o.column,"rowEditorEditIcon")),null,16))],16,se)),[[c]]):g.createCommentVNode("",!0),n.d_editing?g.withDirectives((g.openBlock(),g.createElementBlock("button",g.mergeProps({key:2,class:"p-row-editor-cancel p-link",type:"button","aria-label":i.cancelButtonAriaLabel,onClick:t[5]||(t[5]=(...e)=>i.onRowEditCancel&&i.onRowEditCancel(...e))},i.getColumnPTOptions(o.column,"rowEditorCancelButton")),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children&&o.column.children.roweditorcancelicon||"TimesIcon"),g.mergeProps({class:"p-row-editor-cancel-icon"},i.getColumnPTOptions(o.column,"rowEditorCancelIcon")),null,16))],16,ae)),[[c]]):g.createCommentVNode("",!0)],64)):(g.openBlock(),g.createElementBlock(g.Fragment,{key:8},[g.createTextVNode(g.toDisplayString(i.resolveFieldData()),1)],64))],16))};var de={name:"TableBody",extends:D.default,emits:["rowgroup-toggle","row-click","row-dblclick","row-rightclick","row-touchend","row-keydown","row-mousedown","row-dragstart","row-dragover","row-dragleave","row-dragend","row-drop","row-toggle","radio-change","checkbox-change","cell-edit-init","cell-edit-complete","cell-edit-cancel","row-edit-init","row-edit-save","row-edit-cancel","editing-meta-change"],props:{value:{type:Array,default:null},columns:{type:null,default:null},frozenRow:{type:Boolean,default:!1},empty:{type:Boolean,default:!1},rowGroupMode:{type:String,default:null},groupRowsBy:{type:[Array,String,Function],default:null},expandableRowGroups:{type:Boolean,default:!1},expandedRowGroups:{type:Array,default:null},first:{type:Number,default:0},dataKey:{type:String,default:null},expandedRowIcon:{type:String,default:null},collapsedRowIcon:{type:String,default:null},expandedRows:{type:Array,default:null},expandedRowKeys:{type:null,default:null},selection:{type:[Array,Object],default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},contextMenu:{type:Boolean,default:!1},contextMenuSelection:{type:Object,default:null},rowClass:{type:null,default:null},rowStyle:{type:null,default:null},editMode:{type:String,default:null},compareSelectionBy:{type:String,default:"deepEquals"},editingRows:{type:Array,default:null},editingRowKeys:{type:null,default:null},editingMeta:{type:Object,default:null},templates:{type:null,default:null},scrollable:{type:Boolean,default:!1},responsiveLayout:{type:String,default:"stack"},virtualScrollerContentProps:{type:Object,default:null},isVirtualScrollerDisabled:{type:Boolean,default:!1}},data:()=>({rowGroupHeaderStyleObject:{},tabindexArray:[],isARowSelected:!1}),mounted(){this.frozenRow&&this.updateFrozenRowStickyPosition(),this.scrollable&&"subheader"===this.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()},updated(){this.frozenRow&&this.updateFrozenRowStickyPosition(),this.scrollable&&"subheader"===this.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()},methods:{columnProp:(e,t)=>r.ObjectUtils.getVNodeProp(e,t),getColumnPTOptions(e,t){return this.ptmo(this.getColumnProp(e),t,{props:e.props,parent:{props:this.$props,state:this.$data}})},getColumnProp:e=>e.props&&e.props.pt?e.props.pt:void 0,shouldRenderRowGroupHeader(e,t,o){let l=r.ObjectUtils.resolveFieldData(t,this.groupRowsBy),n=e[o-1];if(n){return l!==r.ObjectUtils.resolveFieldData(n,this.groupRowsBy)}return!0},getRowKey(e,t){return this.dataKey?r.ObjectUtils.resolveFieldData(e,this.dataKey):this.getRowIndex(t)},getRowIndex(e){const t=this.getVirtualScrollerProp("getItemOptions");return t?t(e).index:this.first+e},getRowStyle(e){if(this.rowStyle)return this.rowStyle(e)},getRowClass(e){let t=[];if(this.selectionMode&&t.push("p-selectable-row"),this.selection&&t.push({"p-highlight":this.isSelected(e)}),this.contextMenuSelection&&t.push({"p-highlight-contextmenu":this.isSelectedWithContextMenu(e)}),this.rowClass){let o=this.rowClass(e);o&&t.push(o)}return t},shouldRenderRowGroupFooter(e,t,o){if(this.expandableRowGroups&&!this.isRowGroupExpanded(t))return!1;{let l=r.ObjectUtils.resolveFieldData(t,this.groupRowsBy),n=e[o+1];if(n){return l!==r.ObjectUtils.resolveFieldData(n,this.groupRowsBy)}return!0}},shouldRenderBodyCell(e,t,o){if(!this.rowGroupMode)return!this.columnProp(t,"hidden");if("subheader"===this.rowGroupMode)return this.groupRowsBy!==this.columnProp(t,"field");if("rowspan"===this.rowGroupMode){if(this.isGrouped(t)){let l=e[o-1];if(l){return r.ObjectUtils.resolveFieldData(e[o],this.columnProp(t,"field"))!==r.ObjectUtils.resolveFieldData(l,this.columnProp(t,"field"))}return!0}return!0}},calculateRowGroupSize(e,t,o){if(this.isGrouped(t)){let l=r.ObjectUtils.resolveFieldData(e[o],this.columnProp(t,"field")),n=l,i=0;for(;l===n;){i++;let l=e[++o];if(!l)break;n=r.ObjectUtils.resolveFieldData(l,this.columnProp(t,"field"))}return 1===i?null:i}return null},isGrouped(e){return!(!this.groupRowsBy||!this.columnProp(e,"field"))&&(Array.isArray(this.groupRowsBy)?this.groupRowsBy.indexOf(e.props.field)>-1:this.groupRowsBy===e.props.field)},isRowEditing(e){return!(!e||!this.editingRows)&&(this.dataKey?!!this.editingRowKeys&&void 0!==this.editingRowKeys[r.ObjectUtils.resolveFieldData(e,this.dataKey)]:this.findIndex(e,this.editingRows)>-1)},isRowExpanded(e){return!(!e||!this.expandedRows)&&(this.dataKey?!!this.expandedRowKeys&&void 0!==this.expandedRowKeys[r.ObjectUtils.resolveFieldData(e,this.dataKey)]:this.findIndex(e,this.expandedRows)>-1)},isRowGroupExpanded(e){if(this.expandableRowGroups&&this.expandedRowGroups){let t=r.ObjectUtils.resolveFieldData(e,this.groupRowsBy);return this.expandedRowGroups.indexOf(t)>-1}return!1},isSelected(e){return!(!e||!this.selection)&&(this.dataKey?!!this.selectionKeys&&void 0!==this.selectionKeys[r.ObjectUtils.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))},isSelectedWithContextMenu(e){return!(!e||!this.contextMenuSelection)&&this.equals(e,this.contextMenuSelection,this.dataKey)},findIndexInSelection(e){return this.findIndex(e,this.selection)},findIndex(e,t){let o=-1;if(t&&t.length)for(let l=0;l<t.length;l++)if(this.equals(e,t[l])){o=l;break}return o},equals(e,t){return"equals"===this.compareSelectionBy?e===t:r.ObjectUtils.equals(e,t,this.dataKey)},onRowGroupToggle(e,t){this.$emit("rowgroup-toggle",{originalEvent:e,data:t})},onRowClick(e,t,o){this.$emit("row-click",{originalEvent:e,data:t,index:o})},onRowDblClick(e,t,o){this.$emit("row-dblclick",{originalEvent:e,data:t,index:o})},onRowRightClick(e,t,o){this.$emit("row-rightclick",{originalEvent:e,data:t,index:o})},onRowTouchEnd(e){this.$emit("row-touchend",e)},onRowKeyDown(e,t,o){this.$emit("row-keydown",{originalEvent:e,data:t,index:o})},onRowMouseDown(e){this.$emit("row-mousedown",e)},onRowDragStart(e,t){this.$emit("row-dragstart",{originalEvent:e,index:t})},onRowDragOver(e,t){this.$emit("row-dragover",{originalEvent:e,index:t})},onRowDragLeave(e){this.$emit("row-dragleave",e)},onRowDragEnd(e){this.$emit("row-dragend",e)},onRowDrop(e){this.$emit("row-drop",e)},onRowToggle(e){this.$emit("row-toggle",e)},onRadioChange(e){this.$emit("radio-change",e)},onCheckboxChange(e){this.$emit("checkbox-change",e)},onCellEditInit(e){this.$emit("cell-edit-init",e)},onCellEditComplete(e){this.$emit("cell-edit-complete",e)},onCellEditCancel(e){this.$emit("cell-edit-cancel",e)},onRowEditInit(e){this.$emit("row-edit-init",e)},onRowEditSave(e){this.$emit("row-edit-save",e)},onRowEditCancel(e){this.$emit("row-edit-cancel",e)},onEditingMetaChange(e){this.$emit("editing-meta-change",e)},updateFrozenRowStickyPosition(){this.$el.style.top=r.DomHandler.getOuterHeight(this.$el.previousElementSibling)+"px"},updateFrozenRowGroupHeaderStickyPosition(){let e=r.DomHandler.getOuterHeight(this.$el.previousElementSibling);this.rowGroupHeaderStyleObject.top=e+"px"},getVirtualScrollerProp(e,t){return(t=t||this.virtualScrollerContentProps)?t[e]:null},bodyRef(e){const t=this.getVirtualScrollerProp("contentRef");t&&t(e)},setRowTabindex(e){return null!==this.selection||"single"!==this.selectionMode&&"multiple"!==this.selectionMode?-1:0===e?0:-1}},computed:{columnsLength(){let e=0;return this.columns.forEach((t=>{"single"===this.columnProp(t,"selectionMode")&&e--,this.columnProp(t,"hidden")&&e++})),this.columns?this.columns.length-e:0},rowGroupHeaderStyle(){return this.scrollable?{top:this.rowGroupHeaderStyleObject.top}:null},bodyStyle(){return this.getVirtualScrollerProp("contentStyle")},expandedRowId:()=>r.UniqueComponentId(),nameAttributeSelector:()=>r.UniqueComponentId()},components:{DTBodyCell:ne,ChevronDownIcon:F.default,ChevronRightIcon:z.default}};const ce=["colspan"],pe=["onClick"],ue=["tabindex","aria-selected","onClick","onDblclick","onContextmenu","onKeydown","onDragstart","onDragover"],he=["id"],me=["colspan"],fe=["colspan"],ge=["colspan"];de.render=function(e,t,o,l,n,i){const r=g.resolveComponent("ChevronDownIcon"),s=g.resolveComponent("ChevronRightIcon"),a=g.resolveComponent("DTBodyCell");return g.openBlock(),g.createElementBlock("tbody",g.mergeProps({ref:i.bodyRef,class:"p-datatable-tbody",role:"rowgroup",style:i.bodyStyle},e.ptm("tbody")),[o.empty?(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:1,class:"p-datatable-emptymessage",role:"row"},e.ptm("emptyMessage")),[g.createElementVNode("td",g.mergeProps({colspan:i.columnsLength},{...i.getColumnPTOptions("root"),...i.getColumnPTOptions("bodyCell")}),[o.templates.empty?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.templates.empty),{key:0})):g.createCommentVNode("",!0)],16,ge)],16)):(g.openBlock(!0),g.createElementBlock(g.Fragment,{key:0},g.renderList(o.value,((l,n)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[o.templates.groupheader&&"subheader"===o.rowGroupMode&&i.shouldRenderRowGroupHeader(o.value,l,i.getRowIndex(n))?(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:i.getRowKey(l,i.getRowIndex(n))+"_subheader",class:"p-rowgroup-header",style:i.rowGroupHeaderStyle,role:"row"},e.ptm("rowgroupHeader")),[g.createElementVNode("td",g.mergeProps({colspan:i.columnsLength-1},{...i.getColumnPTOptions("root"),...i.getColumnPTOptions("bodyCell")}),[o.expandableRowGroups?(g.openBlock(),g.createElementBlock("button",g.mergeProps({key:0,class:"p-row-toggler p-link",onClick:e=>i.onRowGroupToggle(e,l),type:"button"},i.getColumnPTOptions("rowGroupToggler")),[o.templates.rowgrouptogglericon?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.templates.rowgrouptogglericon),{key:0,expanded:i.isRowGroupExpanded(l)},null,8,["expanded"])):(g.openBlock(),g.createElementBlock(g.Fragment,{key:1},[i.isRowGroupExpanded(l)&&o.expandedRowIcon?(g.openBlock(),g.createElementBlock("span",{key:0,class:g.normalizeClass(["p-row-toggler-icon",o.expandedRowIcon])},null,2)):i.isRowGroupExpanded(l)&&!o.expandedRowIcon?(g.openBlock(),g.createBlock(r,g.mergeProps({key:1,class:"p-row-toggler-icon"},i.getColumnPTOptions("rowGroupTogglerIcon")),null,16)):!i.isRowGroupExpanded(l)&&o.collapsedRowIcon?(g.openBlock(),g.createElementBlock("span",{key:2,class:g.normalizeClass(["p-row-toggler-icon",o.collapsedRowIcon])},null,2)):i.isRowGroupExpanded(l)||o.collapsedRowIcon?g.createCommentVNode("",!0):(g.openBlock(),g.createBlock(s,g.mergeProps({key:3,class:"p-row-toggler-icon"},i.getColumnPTOptions("rowGroupTogglerIcon")),null,16))],64))],16,pe)):g.createCommentVNode("",!0),(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.templates.groupheader),{data:l,index:i.getRowIndex(n)},null,8,["data","index"]))],16,ce)],16)):g.createCommentVNode("",!0),!o.expandableRowGroups||i.isRowGroupExpanded(l)?(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:i.getRowKey(l,i.getRowIndex(n)),class:i.getRowClass(l),style:i.getRowStyle(l),tabindex:i.setRowTabindex(n),role:"row","aria-selected":o.selectionMode?i.isSelected(l):null,onClick:e=>i.onRowClick(e,l,i.getRowIndex(n)),onDblclick:e=>i.onRowDblClick(e,l,i.getRowIndex(n)),onContextmenu:e=>i.onRowRightClick(e,l,i.getRowIndex(n)),onTouchend:t[9]||(t[9]=e=>i.onRowTouchEnd(e)),onKeydown:e=>i.onRowKeyDown(e,l,i.getRowIndex(n)),onMousedown:t[10]||(t[10]=e=>i.onRowMouseDown(e)),onDragstart:e=>i.onRowDragStart(e,i.getRowIndex(n)),onDragover:e=>i.onRowDragOver(e,i.getRowIndex(n)),onDragleave:t[11]||(t[11]=e=>i.onRowDragLeave(e)),onDragend:t[12]||(t[12]=e=>i.onRowDragEnd(e)),onDrop:t[13]||(t[13]=e=>i.onRowDrop(e))},e.ptm("row")),[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(o.columns,((r,s)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[i.shouldRenderBodyCell(o.value,r,i.getRowIndex(n))?(g.openBlock(),g.createBlock(a,{key:i.columnProp(r,"columnKey")||i.columnProp(r,"field")||s,rowData:l,column:r,rowIndex:i.getRowIndex(n),index:s,selected:i.isSelected(l),frozenRow:o.frozenRow,rowspan:"rowspan"===o.rowGroupMode?i.calculateRowGroupSize(o.value,r,i.getRowIndex(n)):null,editMode:o.editMode,editing:"row"===o.editMode&&i.isRowEditing(l),editingMeta:o.editingMeta,responsiveLayout:o.responsiveLayout,virtualScrollerContentProps:o.virtualScrollerContentProps,ariaControls:i.expandedRowId+"_"+n+"_expansion",name:i.nameAttributeSelector,isRowExpanded:i.isRowExpanded(l),expandedRowIcon:o.expandedRowIcon,collapsedRowIcon:o.collapsedRowIcon,onRadioChange:t[0]||(t[0]=e=>i.onRadioChange(e)),onCheckboxChange:t[1]||(t[1]=e=>i.onCheckboxChange(e)),onRowToggle:t[2]||(t[2]=e=>i.onRowToggle(e)),onCellEditInit:t[3]||(t[3]=e=>i.onCellEditInit(e)),onCellEditComplete:t[4]||(t[4]=e=>i.onCellEditComplete(e)),onCellEditCancel:t[5]||(t[5]=e=>i.onCellEditCancel(e)),onRowEditInit:t[6]||(t[6]=e=>i.onRowEditInit(e)),onRowEditSave:t[7]||(t[7]=e=>i.onRowEditSave(e)),onRowEditCancel:t[8]||(t[8]=e=>i.onRowEditCancel(e)),onEditingMetaChange:i.onEditingMetaChange,pt:e.pt},null,8,["rowData","column","rowIndex","index","selected","frozenRow","rowspan","editMode","editing","editingMeta","responsiveLayout","virtualScrollerContentProps","ariaControls","name","isRowExpanded","expandedRowIcon","collapsedRowIcon","onEditingMetaChange","pt"])):g.createCommentVNode("",!0)],64)))),256))],16,ue)):g.createCommentVNode("",!0),o.templates.expansion&&o.expandedRows&&i.isRowExpanded(l)?(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:i.getRowKey(l,i.getRowIndex(n))+"_expansion",id:i.expandedRowId+"_"+n+"_expansion",class:"p-datatable-row-expansion",role:"row"},e.ptm("rowExpansion")),[g.createElementVNode("td",g.mergeProps({colspan:i.columnsLength},{...i.getColumnPTOptions("root"),...i.getColumnPTOptions("bodyCell")}),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.templates.expansion),{data:l,index:i.getRowIndex(n)},null,8,["data","index"]))],16,me)],16,he)):g.createCommentVNode("",!0),o.templates.groupfooter&&"subheader"===o.rowGroupMode&&i.shouldRenderRowGroupFooter(o.value,l,i.getRowIndex(n))?(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:i.getRowKey(l,i.getRowIndex(n))+"_subfooter",class:"p-rowgroup-footer",role:"row"},e.ptm("rowgroupFooter")),[g.createElementVNode("td",g.mergeProps({colspan:i.columnsLength-1},{...i.getColumnPTOptions("root"),...i.getColumnPTOptions("bodyCell")}),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.templates.groupfooter),{data:l,index:i.getRowIndex(n)},null,8,["data","index"]))],16,fe)],16)):g.createCommentVNode("",!0)],64)))),256))],16)};var we={name:"FooterCell",extends:D.default,props:{column:{type:Object,default:null}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(e){return r.ObjectUtils.getVNodeProp(this.column,e)},getColumnPTOptions(e){return this.ptmo(this.getColumnProp(),e,{props:this.column.props,parent:{props:this.$props,state:this.$data}})},getColumnProp(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let e=0,t=this.$el.nextElementSibling;t&&(e=r.DomHandler.getOuterWidth(t)+parseFloat(t.style.right||0)),this.styleObject.right=e+"px"}else{let e=0,t=this.$el.previousElementSibling;t&&(e=r.DomHandler.getOuterWidth(t)+parseFloat(t.style.left||0)),this.styleObject.left=e+"px"}}}},computed:{containerClass(){return[this.columnProp("footerClass"),this.columnProp("class"),{"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("footerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]}}};const ye=["colspan","rowspan"];we.render=function(e,t,o,l,n,i){return g.openBlock(),g.createElementBlock("td",g.mergeProps({style:i.containerStyle,class:i.containerClass,role:"cell",colspan:i.columnProp("colspan"),rowspan:i.columnProp("rowspan")},{...i.getColumnPTOptions("root"),...i.getColumnPTOptions("footerCell")}),[o.column.children&&o.column.children.footer?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.column.children.footer),{key:0,column:o.column},null,8,["column"])):g.createCommentVNode("",!0),g.createTextVNode(" "+g.toDisplayString(i.columnProp("footer")),1)],16,ye)};var be={name:"TableFooter",extends:D.default,props:{columnGroup:{type:null,default:null},columns:{type:Object,default:null}},methods:{columnProp:(e,t)=>r.ObjectUtils.getVNodeProp(e,t),getColumnGroupPTOptions(e){return this.ptmo(this.getColumnGroupProps(),e,{props:this.getColumnGroupProps(),parent:{props:this.$props,state:this.$data}})},getColumnGroupProps(){return this.columnGroup&&this.columnGroup.props&&this.columnGroup.props.pt?this.columnGroup.props.pt:void 0},getRowPTOptions(e,t){return this.ptmo(this.getRowProp(e),t,{props:e.props,parent:{props:this.$props,state:this.$data}})},getRowProp:e=>e.props&&e.props.pt?e.props.pt:void 0,getFooterRows(){let e=[],t=this.columnGroup;if(t.children&&t.children.default){for(let o of t.children.default())"Row"===o.type.name?e.push(o):o.children&&o.children instanceof Array&&(e=o.children);return e}},getFooterColumns(e){let t=[];if(e.children&&e.children.default)return e.children.default().forEach((e=>{e.children&&e.children instanceof Array?t=[...t,...e.children]:"Column"===e.type.name&&t.push(e)})),t}},computed:{hasFooter(){let e=!1;if(this.columnGroup)e=!0;else if(this.columns)for(let t of this.columns)if(this.columnProp(t,"footer")||t.children&&t.children.footer){e=!0;break}return e}},components:{DTFooterCell:we}};be.render=function(e,t,o,l,n,i){const r=g.resolveComponent("DTFooterCell");return i.hasFooter?(g.openBlock(),g.createElementBlock("tfoot",g.mergeProps({key:0,class:"p-datatable-tfoot",role:"rowgroup"},{...e.ptm("tfoot"),...i.getColumnGroupPTOptions("root")}),[o.columnGroup?(g.openBlock(!0),g.createElementBlock(g.Fragment,{key:1},g.renderList(i.getFooterRows(),((t,o)=>(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:o,role:"row"},i.getRowPTOptions(t,"root")),[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(i.getFooterColumns(t),((t,o)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:i.columnProp(t,"columnKey")||i.columnProp(t,"field")||o},[i.columnProp(t,"hidden")?g.createCommentVNode("",!0):(g.openBlock(),g.createBlock(r,{key:0,column:t,pt:e.pt},null,8,["column","pt"]))],64)))),128))],16)))),128)):(g.openBlock(),g.createElementBlock("tr",g.mergeProps({key:0,role:"row"},e.ptm("footerRow")),[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(o.columns,((t,o)=>(g.openBlock(),g.createElementBlock(g.Fragment,{key:i.columnProp(t,"columnKey")||i.columnProp(t,"field")||o},[i.columnProp(t,"hidden")?g.createCommentVNode("",!0):(g.openBlock(),g.createBlock(r,{key:0,column:t,pt:e.pt},null,8,["column","pt"]))],64)))),128))],16))],16)):g.createCommentVNode("",!0)};var Ce={name:"ColumnFilter",extends:D.default,emits:["filter-change","filter-apply","operator-change","matchmode-change","constraint-add","constraint-remove","filter-clear","apply-click"],props:{field:{type:String,default:null},type:{type:String,default:"text"},display:{type:String,default:null},showMenu:{type:Boolean,default:!0},matchMode:{type:String,default:null},showOperator:{type:Boolean,default:!0},showClearButton:{type:Boolean,default:!0},showApplyButton:{type:Boolean,default:!0},showMatchModes:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},matchModeOptions:{type:Array,default:null},maxConstraints:{type:Number,default:2},filterElement:{type:Function,default:null},filterHeaderTemplate:{type:Function,default:null},filterFooterTemplate:{type:Function,default:null},filterClearTemplate:{type:Function,default:null},filterApplyTemplate:{type:Function,default:null},filterIconTemplate:{type:Function,default:null},filterAddIconTemplate:{type:Function,default:null},filterRemoveIconTemplate:{type:Function,default:null},filterClearIconTemplate:{type:Function,default:null},filters:{type:Object,default:null},filtersStore:{type:Object,default:null},filterMenuClass:{type:String,default:null},filterMenuStyle:{type:null,default:null},filterInputProps:{type:null,default:null},column:null},data:()=>({overlayVisible:!1,defaultMatchMode:null,defaultOperator:null}),overlay:null,selfClick:!1,overlayEventListener:null,beforeUnmount(){this.overlayEventListener&&(A.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.onOverlayHide())},mounted(){if(this.filters&&this.filters[this.field]){let e=this.filters[this.field];e.operator?(this.defaultMatchMode=e.constraints[0].matchMode,this.defaultOperator=e.operator):this.defaultMatchMode=this.filters[this.field].matchMode}},methods:{getColumnPTOptions(e){return this.ptmo(this.getColumnProp(),e,{props:this.column.props,parent:{props:this.$props,state:this.$data}})},getColumnProp(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},clearFilter(){let e={...this.filters};e[this.field].operator?(e[this.field].constraints.splice(1),e[this.field].operator=this.defaultOperator,e[this.field].constraints[0]={value:null,matchMode:this.defaultMatchMode}):(e[this.field].value=null,e[this.field].matchMode=this.defaultMatchMode),this.$emit("filter-clear"),this.$emit("filter-change",e),this.$emit("filter-apply"),this.hide()},applyFilter(){this.$emit("apply-click",{field:this.field,constraints:this.filters[this.field]}),this.$emit("filter-apply"),this.hide()},hasFilter(){if(this.filtersStore){let e=this.filtersStore[this.field];if(e)return e.operator?!this.isFilterBlank(e.constraints[0].value):!this.isFilterBlank(e.value)}return!1},hasRowFilter(){return this.filters[this.field]&&!this.isFilterBlank(this.filters[this.field].value)},isFilterBlank:e=>null==e||("string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length),toggleMenu(){this.overlayVisible=!this.overlayVisible},onToggleButtonKeyDown(e){switch(e.code){case"Enter":case"Space":this.toggleMenu(),e.preventDefault();break;case"Escape":this.overlayVisible=!1}},onRowMatchModeChange(e){let t={...this.filters};t[this.field].matchMode=e,this.$emit("matchmode-change",{field:this.field,matchMode:e}),this.$emit("filter-change",t),this.$emit("filter-apply"),this.hide()},onRowMatchModeKeyDown(e){let t=e.target;switch(e.code){case"ArrowDown":var o=this.findNextItem(t);o&&(t.removeAttribute("tabindex"),o.tabIndex="0",o.focus()),e.preventDefault();break;case"ArrowUp":var l=this.findPrevItem(t);l&&(t.removeAttribute("tabindex"),l.tabIndex="0",l.focus()),e.preventDefault()}},isRowMatchModeSelected(e){return this.filters[this.field].matchMode===e},onOperatorChange(e){let t={...this.filters};t[this.field].operator=e,this.$emit("filter-change",t),this.$emit("operator-change",{field:this.field,operator:e}),this.showApplyButton||this.$emit("filter-apply")},onMenuMatchModeChange(e,t){({...this.filters})[this.field].constraints[t].matchMode=e,this.$emit("matchmode-change",{field:this.field,matchMode:e,index:t}),this.showApplyButton||this.$emit("filter-apply")},addConstraint(){let e={...this.filters},t={value:null,matchMode:this.defaultMatchMode};e[this.field].constraints.push(t),this.$emit("constraint-add",{field:this.field,constraing:t}),this.$emit("filter-change",e),this.showApplyButton||this.$emit("filter-apply")},removeConstraint(e){let t={...this.filters},o=t[this.field].constraints.splice(e,1);this.$emit("constraint-remove",{field:this.field,constraing:o}),this.$emit("filter-change",t),this.showApplyButton||this.$emit("filter-apply")},filterCallback(){this.$emit("filter-apply")},findNextItem(e){let t=e.nextElementSibling;return t?r.DomHandler.hasClass(t,"p-column-filter-separator")?this.findNextItem(t):t:e.parentElement.firstElementChild},findPrevItem(e){let t=e.previousElementSibling;return t?r.DomHandler.hasClass(t,"p-column-filter-separator")?this.findPrevItem(t):t:e.parentElement.lastElementChild},hide(){this.overlayVisible=!1,r.DomHandler.focus(this.$refs.icon)},onContentClick(e){this.selfClick=!0,A.default.emit("overlay-click",{originalEvent:e,target:this.overlay})},onContentMouseDown(){this.selfClick=!0},onOverlayEnter(e){this.filterMenuStyle&&r.DomHandler.applyStyle(this.overlay,this.filterMenuStyle),r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.absolutePosition(this.overlay,this.$refs.icon),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.overlayEventListener=e=>{this.isOutsideClicked(e.target)||(this.selfClick=!0)},A.default.on("overlay-click",this.overlayEventListener)},onOverlayLeave(){this.onOverlayHide()},onOverlayAfterLeave(e){r.ZIndexUtils.clear(e)},onOverlayHide(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.overlay=null,A.default.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null},overlayRef(e){this.overlay=e},isOutsideClicked(e){return!this.isTargetClicked(e)&&this.overlay&&!(this.overlay.isSameNode(e)||this.overlay.contains(e))},isTargetClicked(e){return this.$refs.icon&&(this.$refs.icon.isSameNode(e)||this.$refs.icon.contains(e))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{this.overlayVisible&&!this.selfClick&&this.isOutsideClicked(e.target)&&(this.overlayVisible=!1),this.selfClick=!1},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null,this.selfClick=!1)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.icon,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&!r.DomHandler.isTouchDevice()&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},computed:{containerClass(){return["p-column-filter p-fluid",{"p-column-filter-row":"row"===this.display,"p-column-filter-menu":"menu"===this.display}]},overlayClass(){return[this.filterMenuClass,{"p-column-filter-overlay p-component p-fluid":!0,"p-column-filter-overlay-menu":"menu"===this.display,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},showMenuButton(){return this.showMenu&&("row"!==this.display||"boolean"!==this.type)},overlayId:()=>r.UniqueComponentId(),matchModes(){return this.matchModeOptions||this.$primevue.config.filterMatchModeOptions[this.type].map((e=>({label:this.$primevue.config.locale[e],value:e})))},isShowMatchModes(){return"boolean"!==this.type&&this.showMatchModes&&this.matchModes},operatorOptions(){return[{label:this.$primevue.config.locale.matchAll,value:e.FilterOperator.AND},{label:this.$primevue.config.locale.matchAny,value:e.FilterOperator.OR}]},noFilterLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.noFilter:void 0},isShowOperator(){return this.showOperator&&this.filters[this.field].operator},operator(){return this.filters[this.field].operator},fieldConstraints(){return this.filters[this.field].constraints||[this.filters[this.field]]},showRemoveIcon(){return this.fieldConstraints.length>1},removeRuleButtonLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.removeRule:void 0},addRuleButtonLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.addRule:void 0},isShowAddConstraint(){return this.showAddButton&&this.filters[this.field].operator&&this.fieldConstraints&&this.fieldConstraints.length<this.maxConstraints},clearButtonLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.clear:void 0},applyButtonLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.apply:void 0},filterMenuButtonAriaLabel(){return this.$primevue.config.locale?this.overlayVisible?this.$primevue.config.locale.showFilterMenu:this.$primevue.config.locale.hideFilterMenu:void 0},filterOperatorAriaLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.filterOperator:void 0},filterConstraintAriaLabel(){return this.$primevue.config.locale?this.$primevue.config.locale.filterConstraint:void 0}},components:{CFDropdown:N.default,CFButton:G.default,Portal:Z.default,FilterSlashIcon:W.default,FilterIcon:U.default,TrashIcon:X.default,PlusIcon:q.default},directives:{focustrap:j.default}};const ke=["aria-label","aria-expanded","aria-controls"],ve=["id","aria-modal"],Re=["onClick","onKeydown","tabindex"];Ce.render=function(e,t,o,l,n,i){const r=g.resolveComponent("CFDropdown"),s=g.resolveComponent("CFButton"),a=g.resolveComponent("Portal"),d=g.resolveDirective("focustrap");return g.openBlock(),g.createElementBlock("div",g.mergeProps({class:i.containerClass},i.getColumnPTOptions("columnFilter")),["row"===o.display?(g.openBlock(),g.createElementBlock("div",g.mergeProps({key:0,class:"p-fluid p-column-filter-element"},{...o.filterInputProps,...i.getColumnPTOptions("filterInput")}),[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(o.filterElement),{field:o.field,filterModel:o.filters[o.field],filterCallback:i.filterCallback},null,8,["field","filterModel","filterCallback"]))],16)):g.createCommentVNode("",!0),i.showMenuButton?(g.openBlock(),g.createElementBlock("button",g.mergeProps({key:1