\r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TableCommon.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TableCommon.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TableCommon.vue?vue&type=template&id=2ed83457&\"\nimport script from \"./TableCommon.vue?vue&type=script&lang=js&\"\nexport * from \"./TableCommon.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","// Mixin to determine if an event listener has been registered\n// either via `v-on:name` (in the parent) or programmatically\n// via `vm.$on('name', ...)`\n// See: https://github.com/vuejs/vue/issues/10825\nimport { Vue } from '../vue';\nimport { isArray, isUndefined } from '../utils/inspect'; // @vue/component\n\nexport var hasListenerMixin = Vue.extend({\n methods: {\n hasListener: function hasListener(name) {\n // Only includes listeners registered via `v-on:name`\n var $listeners = this.$listeners || {}; // Includes `v-on:name` and `this.$on('name')` registered listeners\n // Note this property is not part of the public Vue API, but it is\n // the only way to determine if a listener was added via `vm.$on`\n\n var $events = this._events || {}; // Registered listeners in `this._events` are always an array,\n // but might be zero length\n\n return !isUndefined($listeners[name]) || isArray($events[name]) && $events[name].length > 0;\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TR } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Constants ---\n\nvar LIGHT = 'light';\nvar DARK = 'dark'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n variant: makeProp(PROP_TYPE_STRING)\n}, NAME_TR); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTr = /*#__PURE__*/Vue.extend({\n name: NAME_TR,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableTr: this\n };\n },\n inject: {\n bvTableRowGroup: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / ``\n inTbody: function inTbody() {\n return this.bvTableRowGroup.isTbody;\n },\n // Sniffed by `` / ``\n inThead: function inThead() {\n return this.bvTableRowGroup.isThead;\n },\n // Sniffed by `` / ``\n inTfoot: function inTfoot() {\n return this.bvTableRowGroup.isTfoot;\n },\n // Sniffed by `` / ``\n isDark: function isDark() {\n return this.bvTableRowGroup.isDark;\n },\n // Sniffed by `` / ``\n isStacked: function isStacked() {\n return this.bvTableRowGroup.isStacked;\n },\n // Sniffed by `` / ``\n isResponsive: function isResponsive() {\n return this.bvTableRowGroup.isResponsive;\n },\n // Sniffed by `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return this.bvTableRowGroup.isStickyHeader;\n },\n // Sniffed by / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTableRowGroup.hasStickyHeader;\n },\n // Sniffed by `` / ``\n tableVariant: function tableVariant() {\n return this.bvTableRowGroup.tableVariant;\n },\n // Sniffed by `` / ``\n headVariant: function headVariant() {\n return this.inThead ? this.bvTableRowGroup.headVariant : null;\n },\n // Sniffed by `` / ``\n footVariant: function footVariant() {\n return this.inTfoot ? this.bvTableRowGroup.footVariant : null;\n },\n isRowDark: function isRowDark() {\n return this.headVariant === LIGHT || this.footVariant === LIGHT ?\n /* istanbul ignore next */\n false : this.headVariant === DARK || this.footVariant === DARK ?\n /* istanbul ignore next */\n true : this.isDark;\n },\n trClasses: function trClasses() {\n var variant = this.variant;\n return [variant ? \"\".concat(this.isRowDark ? 'bg' : 'table', \"-\").concat(variant) : null];\n },\n trAttrs: function trAttrs() {\n return _objectSpread({\n role: 'row'\n }, this.bvAttrs);\n }\n },\n render: function render(h) {\n return h('tr', {\n class: this.trClasses,\n attrs: this.trAttrs,\n // Pass native listeners to child\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_BOTTOM_ROW } from '../../../constants/slots';\nimport { isFunction } from '../../../utils/inspect';\nimport { BTr } from '../tr'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var bottomRowMixin = Vue.extend({\n props: props,\n methods: {\n renderBottomRow: function renderBottomRow() {\n var fields = this.computedFields,\n stacked = this.stacked,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Static bottom row slot (hidden in visibly stacked mode as we can't control the data-label)\n // If in *always* stacked mode, we don't bother rendering the row\n\n if (!this.hasNormalizedSlot(SLOT_NAME_BOTTOM_ROW) || stacked === true || stacked === '') {\n return h();\n }\n\n return h(BTr, {\n staticClass: 'b-table-bottom-row',\n class: [isFunction(tbodyTrClass) ?\n /* istanbul ignore next */\n tbodyTrClass(null, 'row-bottom') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(null, 'row-bottom') : tbodyTrAttr,\n key: 'b-bottom-row'\n }, this.normalizeSlot(SLOT_NAME_BOTTOM_ROW, {\n columns: fields.length,\n fields: fields\n }));\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TABLE_CELL } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { isTag } from '../../utils/dom';\nimport { isUndefinedOrNull } from '../../utils/inspect';\nimport { toInteger } from '../../utils/number';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { toString } from '../../utils/string';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Helper methods ---\n// Parse a rowspan or colspan into a digit (or `null` if < `1` )\n\nvar parseSpan = function parseSpan(value) {\n value = toInteger(value, 0);\n return value > 0 ? value : null;\n};\n/* istanbul ignore next */\n\n\nvar spanValidator = function spanValidator(value) {\n return isUndefinedOrNull(value) || parseSpan(value) > 0;\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable({\n colspan: makeProp(PROP_TYPE_NUMBER_STRING, null, spanValidator),\n rowspan: makeProp(PROP_TYPE_NUMBER_STRING, null, spanValidator),\n stackedHeading: makeProp(PROP_TYPE_STRING),\n stickyColumn: makeProp(PROP_TYPE_BOOLEAN, false),\n variant: makeProp(PROP_TYPE_STRING)\n}, NAME_TABLE_CELL); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTd = /*#__PURE__*/Vue.extend({\n name: NAME_TABLE_CELL,\n // Mixin order is important!\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n inject: {\n bvTableTr: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Overridden by ``\n tag: function tag() {\n return 'td';\n },\n inTbody: function inTbody() {\n return this.bvTableTr.inTbody;\n },\n inThead: function inThead() {\n return this.bvTableTr.inThead;\n },\n inTfoot: function inTfoot() {\n return this.bvTableTr.inTfoot;\n },\n isDark: function isDark() {\n return this.bvTableTr.isDark;\n },\n isStacked: function isStacked() {\n return this.bvTableTr.isStacked;\n },\n // We only support stacked-heading in tbody in stacked mode\n isStackedCell: function isStackedCell() {\n return this.inTbody && this.isStacked;\n },\n isResponsive: function isResponsive() {\n return this.bvTableTr.isResponsive;\n },\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky headers only apply to cells in table `thead`\n isStickyHeader: function isStickyHeader() {\n return this.bvTableTr.isStickyHeader;\n },\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return this.bvTableTr.hasStickyHeader;\n },\n // Needed to handle background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky column cells are only available in responsive\n // mode (horizontal scrolling) or when sticky header mode\n // Applies to cells in `thead`, `tbody` and `tfoot`\n isStickyColumn: function isStickyColumn() {\n return !this.isStacked && (this.isResponsive || this.hasStickyHeader) && this.stickyColumn;\n },\n rowVariant: function rowVariant() {\n return this.bvTableTr.variant;\n },\n headVariant: function headVariant() {\n return this.bvTableTr.headVariant;\n },\n footVariant: function footVariant() {\n return this.bvTableTr.footVariant;\n },\n tableVariant: function tableVariant() {\n return this.bvTableTr.tableVariant;\n },\n computedColspan: function computedColspan() {\n return parseSpan(this.colspan);\n },\n computedRowspan: function computedRowspan() {\n return parseSpan(this.rowspan);\n },\n // We use computed props here for improved performance by caching\n // the results of the string interpolation\n cellClasses: function cellClasses() {\n var variant = this.variant,\n headVariant = this.headVariant,\n isStickyColumn = this.isStickyColumn;\n\n if (!variant && this.isStickyHeader && !headVariant || !variant && isStickyColumn && this.inTfoot && !this.footVariant || !variant && isStickyColumn && this.inThead && !headVariant || !variant && isStickyColumn && this.inTbody) {\n // Needed for sticky-header mode as Bootstrap v4 table cells do\n // not inherit parent's `background-color`\n variant = this.rowVariant || this.tableVariant || 'b-table-default';\n }\n\n return [variant ? \"\".concat(this.isDark ? 'bg' : 'table', \"-\").concat(variant) : null, isStickyColumn ? 'b-table-sticky-column' : null];\n },\n cellAttrs: function cellAttrs() {\n var stackedHeading = this.stackedHeading; // We use computed props here for improved performance by caching\n // the results of the object spread (Object.assign)\n\n var headOrFoot = this.inThead || this.inTfoot; // Make sure col/rowspan's are > 0 or null\n\n var colspan = this.computedColspan;\n var rowspan = this.computedRowspan; // Default role and scope\n\n var role = 'cell';\n var scope = null; // Compute role and scope\n // We only add scopes with an explicit span of 1 or greater\n\n if (headOrFoot) {\n // Header or footer cells\n role = 'columnheader';\n scope = colspan > 0 ? 'colspan' : 'col';\n } else if (isTag(this.tag, 'th')) {\n // th's in tbody\n role = 'rowheader';\n scope = rowspan > 0 ? 'rowgroup' : 'row';\n }\n\n return _objectSpread(_objectSpread({\n colspan: colspan,\n rowspan: rowspan,\n role: role,\n scope: scope\n }, this.bvAttrs), {}, {\n // Add in the stacked cell label data-attribute if in\n // stacked mode (if a stacked heading label is provided)\n 'data-label': this.isStackedCell && !isUndefinedOrNull(stackedHeading) ?\n /* istanbul ignore next */\n toString(stackedHeading) : null\n });\n }\n },\n render: function render(h) {\n var $content = [this.normalizeSlot()];\n return h(this.tag, {\n class: this.cellClasses,\n attrs: this.cellAttrs,\n // Transfer any native listeners\n on: this.bvListeners\n }, [this.isStackedCell ? h('div', [$content]) : $content]);\n }\n});","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { MODEL_EVENT_NAME_PREFIX } from '../../../constants/events';\nimport { PROP_TYPE_BOOLEAN } from '../../../constants/props';\nimport { SLOT_NAME_TABLE_BUSY } from '../../../constants/slots';\nimport { stopEvent } from '../../../utils/events';\nimport { isFunction } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { BTr } from '../tr';\nimport { BTd } from '../td'; // --- Constants ---\n\nvar MODEL_PROP_NAME_BUSY = 'busy';\nvar MODEL_EVENT_NAME_BUSY = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_BUSY; // --- Props ---\n\nexport var props = _defineProperty({}, MODEL_PROP_NAME_BUSY, makeProp(PROP_TYPE_BOOLEAN, false)); // --- Mixin ---\n// @vue/component\n\nexport var busyMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n localBusy: false\n };\n },\n computed: {\n computedBusy: function computedBusy() {\n return this[MODEL_PROP_NAME_BUSY] || this.localBusy;\n }\n },\n watch: {\n localBusy: function localBusy(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.$emit(MODEL_EVENT_NAME_BUSY, newValue);\n }\n }\n },\n methods: {\n // Event handler helper\n stopIfBusy: function stopIfBusy(event) {\n // If table is busy (via provider) then don't propagate\n if (this.computedBusy) {\n stopEvent(event);\n return true;\n }\n\n return false;\n },\n // Render the busy indicator or return `null` if not busy\n renderBusy: function renderBusy() {\n var tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Return a busy indicator row, or `null` if not busy\n\n if (this.computedBusy && this.hasNormalizedSlot(SLOT_NAME_TABLE_BUSY)) {\n return h(BTr, {\n staticClass: 'b-table-busy-slot',\n class: [isFunction(tbodyTrClass) ?\n /* istanbul ignore next */\n tbodyTrClass(null, SLOT_NAME_TABLE_BUSY) : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(null, SLOT_NAME_TABLE_BUSY) : tbodyTrAttr,\n key: 'table-busy-slot'\n }, [h(BTd, {\n props: {\n colspan: this.computedFields.length || null\n }\n }, [this.normalizeSlot(SLOT_NAME_TABLE_BUSY)])]);\n } // We return `null` here so that we can determine if we need to\n // render the table items rows or not\n\n\n return null;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_TABLE_CAPTION } from '../../../constants/slots';\nimport { htmlOrText } from '../../../utils/html';\nimport { makeProp } from '../../../utils/props'; // --- Props ---\n\nexport var props = {\n caption: makeProp(PROP_TYPE_STRING),\n captionHtml: makeProp(PROP_TYPE_STRING) // `caption-top` is part of table-render mixin (styling)\n // captionTop: makeProp(PROP_TYPE_BOOLEAN, false)\n\n}; // --- Mixin ---\n// @vue/component\n\nexport var captionMixin = Vue.extend({\n props: props,\n computed: {\n captionId: function captionId() {\n // Even though `this.safeId` looks like a method, it is a computed prop\n // that returns a new function if the underlying ID changes\n return this.isStacked ? this.safeId('_caption_') : null;\n }\n },\n methods: {\n renderCaption: function renderCaption() {\n var caption = this.caption,\n captionHtml = this.captionHtml;\n var h = this.$createElement;\n var $caption = h();\n var hasCaptionSlot = this.hasNormalizedSlot(SLOT_NAME_TABLE_CAPTION);\n\n if (hasCaptionSlot || caption || captionHtml) {\n $caption = h('caption', {\n attrs: {\n id: this.captionId\n },\n domProps: hasCaptionSlot ? {} : htmlOrText(captionHtml, caption),\n key: 'caption'\n }, this.normalizeSlot(SLOT_NAME_TABLE_CAPTION));\n }\n\n return $caption;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_TABLE_COLGROUP } from '../../../constants/slots'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var colgroupMixin = Vue.extend({\n methods: {\n renderColgroup: function renderColgroup() {\n var fields = this.computedFields;\n var h = this.$createElement;\n var $colgroup = h();\n\n if (this.hasNormalizedSlot(SLOT_NAME_TABLE_COLGROUP)) {\n $colgroup = h('colgroup', {\n key: 'colgroup'\n }, [this.normalizeSlot(SLOT_NAME_TABLE_COLGROUP, {\n columns: fields.length,\n fields: fields\n })]);\n }\n\n return $colgroup;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_EMPTY, SLOT_NAME_EMPTYFILTERED, SLOT_NAME_TABLE_BUSY } from '../../../constants/slots';\nimport { htmlOrText } from '../../../utils/html';\nimport { isFunction } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { BTr } from '../tr';\nimport { BTd } from '../td'; // --- Props ---\n\nexport var props = {\n emptyFilteredHtml: makeProp(PROP_TYPE_STRING),\n emptyFilteredText: makeProp(PROP_TYPE_STRING, 'There are no records matching your request'),\n emptyHtml: makeProp(PROP_TYPE_STRING),\n emptyText: makeProp(PROP_TYPE_STRING, 'There are no records to show'),\n showEmpty: makeProp(PROP_TYPE_BOOLEAN, false)\n}; // --- Mixin ---\n// @vue/component\n\nexport var emptyMixin = Vue.extend({\n props: props,\n methods: {\n renderEmpty: function renderEmpty() {\n var items = this.computedItems;\n var h = this.$createElement;\n var $empty = h();\n\n if (this.showEmpty && (!items || items.length === 0) && !(this.computedBusy && this.hasNormalizedSlot(SLOT_NAME_TABLE_BUSY))) {\n var fields = this.computedFields,\n isFiltered = this.isFiltered,\n emptyText = this.emptyText,\n emptyHtml = this.emptyHtml,\n emptyFilteredText = this.emptyFilteredText,\n emptyFilteredHtml = this.emptyFilteredHtml,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n $empty = this.normalizeSlot(isFiltered ? SLOT_NAME_EMPTYFILTERED : SLOT_NAME_EMPTY, {\n emptyFilteredHtml: emptyFilteredHtml,\n emptyFilteredText: emptyFilteredText,\n emptyHtml: emptyHtml,\n emptyText: emptyText,\n fields: fields,\n // Not sure why this is included, as it will always be an empty array\n items: items\n });\n\n if (!$empty) {\n $empty = h('div', {\n class: ['text-center', 'my-2'],\n domProps: isFiltered ? htmlOrText(emptyFilteredHtml, emptyFilteredText) : htmlOrText(emptyHtml, emptyText)\n });\n }\n\n $empty = h(BTd, {\n props: {\n colspan: fields.length || null\n }\n }, [h('div', {\n attrs: {\n role: 'alert',\n 'aria-live': 'polite'\n }\n }, [$empty])]);\n $empty = h(BTr, {\n staticClass: 'b-table-empty-row',\n class: [isFunction(tbodyTrClass) ?\n /* istanbul ignore next */\n tbodyTrClass(null, 'row-empty') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(null, 'row-empty') : tbodyTrAttr,\n key: isFiltered ? 'b-empty-filtered-row' : 'b-empty-row'\n }, [$empty]);\n }\n\n return $empty;\n }\n }\n});","import { isDate, isObject, isUndefinedOrNull } from './inspect';\nimport { keys } from './object';\nimport { toString } from './string'; // Recursively stringifies the values of an object, space separated, in an\n// SSR safe deterministic way (keys are sorted before stringification)\n//\n// ex:\n// { b: 3, c: { z: 'zzz', d: null, e: 2 }, d: [10, 12, 11], a: 'one' }\n// becomes\n// 'one 3 2 zzz 10 12 11'\n//\n// Strings are returned as-is\n// Numbers get converted to string\n// `null` and `undefined` values are filtered out\n// Dates are converted to their native string format\n\nexport var stringifyObjectValues = function stringifyObjectValues(value) {\n if (isUndefinedOrNull(value)) {\n return '';\n } // Arrays are also object, and keys just returns the array indexes\n // Date objects we convert to strings\n\n\n if (isObject(value) && !isDate(value)) {\n return keys(value).sort() // Sort to prevent SSR issues on pre-rendered sorted tables\n .map(function (k) {\n return stringifyObjectValues(value[k]);\n }).filter(function (v) {\n return !!v;\n }) // Ignore empty strings\n .join(' ');\n }\n\n return toString(value);\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Constants used by table helpers\nexport var FIELD_KEY_CELL_VARIANT = '_cellVariants';\nexport var FIELD_KEY_ROW_VARIANT = '_rowVariant';\nexport var FIELD_KEY_SHOW_DETAILS = '_showDetails'; // Object of item keys that should be ignored for headers and\n// stringification and filter events\n\nexport var IGNORED_FIELD_KEYS = [FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT, FIELD_KEY_SHOW_DETAILS].reduce(function (result, key) {\n return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, key, true));\n}, {}); // Filter CSS selector for click/dblclick/etc. events\n// If any of these selectors match the clicked element, we ignore the event\n\nexport var EVENT_FILTER = ['a', 'a *', // Include content inside links\n'button', 'button *', // Include content inside buttons\n'input:not(.disabled):not([disabled])', 'select:not(.disabled):not([disabled])', 'textarea:not(.disabled):not([disabled])', '[role=\"link\"]', '[role=\"link\"] *', '[role=\"button\"]', '[role=\"button\"] *', '[tabindex]:not(.disabled):not([disabled])'].join(',');","import { arrayIncludes } from '../../../utils/array';\nimport { isArray, isFunction } from '../../../utils/inspect';\nimport { clone, keys, pick } from '../../../utils/object';\nimport { IGNORED_FIELD_KEYS } from './constants'; // Return a copy of a row after all reserved fields have been filtered out\n\nexport var sanitizeRow = function sanitizeRow(row, ignoreFields, includeFields) {\n var fieldsObj = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n // We first need to format the row based on the field configurations\n // This ensures that we add formatted values for keys that may not\n // exist in the row itself\n var formattedRow = keys(fieldsObj).reduce(function (result, key) {\n var field = fieldsObj[key];\n var filterByFormatted = field.filterByFormatted;\n var formatter = isFunction(filterByFormatted) ?\n /* istanbul ignore next */\n filterByFormatted : filterByFormatted ?\n /* istanbul ignore next */\n field.formatter : null;\n\n if (isFunction(formatter)) {\n result[key] = formatter(row[key], key, row);\n }\n\n return result;\n }, clone(row)); // Determine the allowed keys:\n // - Ignore special fields that start with `_`\n // - Ignore fields in the `ignoreFields` array\n // - Include only fields in the `includeFields` array\n\n var allowedKeys = keys(formattedRow).filter(function (key) {\n return !IGNORED_FIELD_KEYS[key] && !(isArray(ignoreFields) && ignoreFields.length > 0 && arrayIncludes(ignoreFields, key)) && !(isArray(includeFields) && includeFields.length > 0 && !arrayIncludes(includeFields, key));\n });\n return pick(formattedRow, allowedKeys);\n};","import { isObject } from '../../../utils/inspect';\nimport { stringifyObjectValues } from '../../../utils/stringify-object-values';\nimport { sanitizeRow } from './sanitize-row'; // Stringifies the values of a record, ignoring any special top level field keys\n// TODO: Add option to stringify `scopedSlot` items\n\nexport var stringifyRecordValues = function stringifyRecordValues(row, ignoreFields, includeFields, fieldsObj) {\n return isObject(row) ? stringifyObjectValues(sanitizeRow(row, ignoreFields, includeFields, fieldsObj)) :\n /* istanbul ignore next */\n '';\n};","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { Vue } from '../../../vue';\nimport { NAME_TABLE } from '../../../constants/components';\nimport { EVENT_NAME_FILTERED } from '../../../constants/events';\nimport { PROP_TYPE_REG_EXP, PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_FUNCTION, PROP_TYPE_ARRAY, PROP_TYPE_NUMBER_STRING } from '../../../constants/props';\nimport { RX_DIGITS, RX_SPACES } from '../../../constants/regex';\nimport { concat } from '../../../utils/array';\nimport { cloneDeep } from '../../../utils/clone-deep';\nimport { identity } from '../../../utils/identity';\nimport { isFunction, isString, isRegExp } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { toInteger } from '../../../utils/number';\nimport { hasPropFunction, makeProp } from '../../../utils/props';\nimport { escapeRegExp } from '../../../utils/string';\nimport { warn } from '../../../utils/warn';\nimport { stringifyRecordValues } from './stringify-record-values'; // --- Constants ---\n\nvar DEBOUNCE_DEPRECATED_MSG = 'Prop \"filter-debounce\" is deprecated. Use the debounce feature of \"\" instead.'; // --- Props ---\n\nexport var props = {\n filter: makeProp([].concat(_toConsumableArray(PROP_TYPE_ARRAY_OBJECT_STRING), [PROP_TYPE_REG_EXP])),\n filterDebounce: makeProp(PROP_TYPE_NUMBER_STRING, 0, function (value) {\n return RX_DIGITS.test(String(value));\n }),\n filterFunction: makeProp(PROP_TYPE_FUNCTION),\n filterIgnoredFields: makeProp(PROP_TYPE_ARRAY, []),\n filterIncludedFields: makeProp(PROP_TYPE_ARRAY, [])\n}; // --- Mixin ---\n// @vue/component\n\nexport var filteringMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n // Flag for displaying which empty slot to show and some event triggering\n isFiltered: false,\n // Where we store the copy of the filter criteria after debouncing\n // We pre-set it with the sanitized filter value\n localFilter: this.filterSanitize(this.filter)\n };\n },\n computed: {\n computedFilterIgnored: function computedFilterIgnored() {\n return concat(this.filterIgnoredFields || []).filter(identity);\n },\n computedFilterIncluded: function computedFilterIncluded() {\n return concat(this.filterIncludedFields || []).filter(identity);\n },\n computedFilterDebounce: function computedFilterDebounce() {\n var ms = toInteger(this.filterDebounce, 0);\n /* istanbul ignore next */\n\n if (ms > 0) {\n warn(DEBOUNCE_DEPRECATED_MSG, NAME_TABLE);\n }\n\n return ms;\n },\n localFiltering: function localFiltering() {\n return this.hasProvider ? !!this.noProviderFiltering : true;\n },\n // For watching changes to `filteredItems` vs `localItems`\n filteredCheck: function filteredCheck() {\n var filteredItems = this.filteredItems,\n localItems = this.localItems,\n localFilter = this.localFilter;\n return {\n filteredItems: filteredItems,\n localItems: localItems,\n localFilter: localFilter\n };\n },\n // Sanitized/normalize filter-function prop\n localFilterFn: function localFilterFn() {\n // Return `null` to signal to use internal filter function\n var filterFunction = this.filterFunction;\n return hasPropFunction(filterFunction) ? filterFunction : null;\n },\n // Returns the records in `localItems` that match the filter criteria\n // Returns the original `localItems` array if not sorting\n filteredItems: function filteredItems() {\n // Note the criteria is debounced and sanitized\n var items = this.localItems,\n criteria = this.localFilter; // Resolve the filtering function, when requested\n // We prefer the provided filtering function and fallback to the internal one\n // When no filtering criteria is specified the filtering factories will return `null`\n\n var filterFn = this.localFiltering ? this.filterFnFactory(this.localFilterFn, criteria) || this.defaultFilterFnFactory(criteria) : null; // We only do local filtering when requested and there are records to filter\n\n return filterFn && items.length > 0 ? items.filter(filterFn) : items;\n }\n },\n watch: {\n // Watch for debounce being set to 0\n computedFilterDebounce: function computedFilterDebounce(newValue) {\n if (!newValue && this.$_filterTimer) {\n this.clearFilterTimer();\n this.localFilter = this.filterSanitize(this.filter);\n }\n },\n // Watch for changes to the filter criteria, and debounce if necessary\n filter: {\n // We need a deep watcher in case the user passes\n // an object when using `filter-function`\n deep: true,\n handler: function handler(newCriteria) {\n var _this = this;\n\n var timeout = this.computedFilterDebounce;\n this.clearFilterTimer();\n\n if (timeout && timeout > 0) {\n // If we have a debounce time, delay the update of `localFilter`\n this.$_filterTimer = setTimeout(function () {\n _this.localFilter = _this.filterSanitize(newCriteria);\n }, timeout);\n } else {\n // Otherwise, immediately update `localFilter` with `newFilter` value\n this.localFilter = this.filterSanitize(newCriteria);\n }\n }\n },\n // Watch for changes to the filter criteria and filtered items vs `localItems`\n // Set visual state and emit events as required\n filteredCheck: function filteredCheck(_ref) {\n var filteredItems = _ref.filteredItems,\n localFilter = _ref.localFilter;\n // Determine if the dataset is filtered or not\n var isFiltered = false;\n\n if (!localFilter) {\n // If filter criteria is falsey\n isFiltered = false;\n } else if (looseEqual(localFilter, []) || looseEqual(localFilter, {})) {\n // If filter criteria is an empty array or object\n isFiltered = false;\n } else if (localFilter) {\n // If filter criteria is truthy\n isFiltered = true;\n }\n\n if (isFiltered) {\n this.$emit(EVENT_NAME_FILTERED, filteredItems, filteredItems.length);\n }\n\n this.isFiltered = isFiltered;\n },\n isFiltered: function isFiltered(newValue, oldValue) {\n if (newValue === false && oldValue === true) {\n // We need to emit a filtered event if `isFiltered` transitions from `true` to\n // `false` so that users can update their pagination controls\n var localItems = this.localItems;\n this.$emit(EVENT_NAME_FILTERED, localItems, localItems.length);\n }\n }\n },\n created: function created() {\n var _this2 = this;\n\n // Create private non-reactive props\n this.$_filterTimer = null; // If filter is \"pre-set\", set the criteria\n // This will trigger any watchers/dependents\n // this.localFilter = this.filterSanitize(this.filter)\n // Set the initial filtered state in a `$nextTick()` so that\n // we trigger a filtered event if needed\n\n this.$nextTick(function () {\n _this2.isFiltered = Boolean(_this2.localFilter);\n });\n },\n beforeDestroy: function beforeDestroy() {\n this.clearFilterTimer();\n },\n methods: {\n clearFilterTimer: function clearFilterTimer() {\n clearTimeout(this.$_filterTimer);\n this.$_filterTimer = null;\n },\n filterSanitize: function filterSanitize(criteria) {\n // Sanitizes filter criteria based on internal or external filtering\n if (this.localFiltering && !this.localFilterFn && !(isString(criteria) || isRegExp(criteria))) {\n // If using internal filter function, which only accepts string or RegExp,\n // return '' to signify no filter\n return '';\n } // Could be a string, object or array, as needed by external filter function\n // We use `cloneDeep` to ensure we have a new copy of an object or array\n // without Vue's reactive observers\n\n\n return cloneDeep(criteria);\n },\n // Filter Function factories\n filterFnFactory: function filterFnFactory(filterFn, criteria) {\n // Wrapper factory for external filter functions\n // Wrap the provided filter-function and return a new function\n // Returns `null` if no filter-function defined or if criteria is falsey\n // Rather than directly grabbing `this.computedLocalFilterFn` or `this.filterFunction`\n // we have it passed, so that the caller computed prop will be reactive to changes\n // in the original filter-function (as this routine is a method)\n if (!filterFn || !isFunction(filterFn) || !criteria || looseEqual(criteria, []) || looseEqual(criteria, {})) {\n return null;\n } // Build the wrapped filter test function, passing the criteria to the provided function\n\n\n var fn = function fn(item) {\n // Generated function returns true if the criteria matches part\n // of the serialized data, otherwise false\n return filterFn(item, criteria);\n }; // Return the wrapped function\n\n\n return fn;\n },\n defaultFilterFnFactory: function defaultFilterFnFactory(criteria) {\n var _this3 = this;\n\n // Generates the default filter function, using the given filter criteria\n // Returns `null` if no criteria or criteria format not supported\n if (!criteria || !(isString(criteria) || isRegExp(criteria))) {\n // Built in filter can only support strings or RegExp criteria (at the moment)\n return null;\n } // Build the RegExp needed for filtering\n\n\n var regExp = criteria;\n\n if (isString(regExp)) {\n // Escape special RegExp characters in the string and convert contiguous\n // whitespace to \\s+ matches\n var pattern = escapeRegExp(criteria).replace(RX_SPACES, '\\\\s+'); // Build the RegExp (no need for global flag, as we only need\n // to find the value once in the string)\n\n regExp = new RegExp(\".*\".concat(pattern, \".*\"), 'i');\n } // Generate the wrapped filter test function to use\n\n\n var fn = function fn(item) {\n // This searches all row values (and sub property values) in the entire (excluding\n // special `_` prefixed keys), because we convert the record to a space-separated\n // string containing all the value properties (recursively), even ones that are\n // not visible (not specified in this.fields)\n // Users can ignore filtering on specific fields, or on only certain fields,\n // and can optionall specify searching results of fields with formatter\n //\n // TODO: Enable searching on scoped slots (optional, as it will be SLOW)\n //\n // Generated function returns true if the criteria matches part of\n // the serialized data, otherwise false\n //\n // We set `lastIndex = 0` on the `RegExp` in case someone specifies the `/g` global flag\n regExp.lastIndex = 0;\n return regExp.test(stringifyRecordValues(item, _this3.computedFilterIgnored, _this3.computedFilterIncluded, _this3.computedFieldsObj));\n }; // Return the generated function\n\n\n return fn;\n }\n }\n});","import { identity } from '../../../utils/identity';\nimport { isArray, isFunction, isObject, isString } from '../../../utils/inspect';\nimport { clone, keys } from '../../../utils/object';\nimport { startCase } from '../../../utils/string';\nimport { IGNORED_FIELD_KEYS } from './constants'; // Private function to massage field entry into common object format\n\nvar processField = function processField(key, value) {\n var field = null;\n\n if (isString(value)) {\n // Label shortcut\n field = {\n key: key,\n label: value\n };\n } else if (isFunction(value)) {\n // Formatter shortcut\n field = {\n key: key,\n formatter: value\n };\n } else if (isObject(value)) {\n field = clone(value);\n field.key = field.key || key;\n } else if (value !== false) {\n // Fallback to just key\n\n /* istanbul ignore next */\n field = {\n key: key\n };\n }\n\n return field;\n}; // We normalize fields into an array of objects\n// [ { key:..., label:..., ...}, {...}, ..., {..}]\n\n\nexport var normalizeFields = function normalizeFields(origFields, items) {\n var fields = [];\n\n if (isArray(origFields)) {\n // Normalize array Form\n origFields.filter(identity).forEach(function (f) {\n if (isString(f)) {\n fields.push({\n key: f,\n label: startCase(f)\n });\n } else if (isObject(f) && f.key && isString(f.key)) {\n // Full object definition. We use assign so that we don't mutate the original\n fields.push(clone(f));\n } else if (isObject(f) && keys(f).length === 1) {\n // Shortcut object (i.e. { 'foo_bar': 'This is Foo Bar' }\n var key = keys(f)[0];\n var field = processField(key, f[key]);\n\n if (field) {\n fields.push(field);\n }\n }\n });\n } // If no field provided, take a sample from first record (if exits)\n\n\n if (fields.length === 0 && isArray(items) && items.length > 0) {\n var sample = items[0];\n keys(sample).forEach(function (k) {\n if (!IGNORED_FIELD_KEYS[k]) {\n fields.push({\n key: k,\n label: startCase(k)\n });\n }\n });\n } // Ensure we have a unique array of fields and that they have String labels\n\n\n var memo = {};\n return fields.filter(function (f) {\n if (!memo[f.key]) {\n memo[f.key] = true;\n f.label = isString(f.label) ? f.label : startCase(f.key);\n return true;\n }\n\n return false;\n });\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_CONTEXT_CHANGED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY, PROP_TYPE_STRING } from '../../../constants/props';\nimport { isArray, isFunction, isString } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { mathMax } from '../../../utils/math';\nimport { makeModelMixin } from '../../../utils/model';\nimport { toInteger } from '../../../utils/number';\nimport { clone, sortKeys } from '../../../utils/object';\nimport { makeProp } from '../../../utils/props';\nimport { normalizeFields } from './normalize-fields'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n type: PROP_TYPE_ARRAY,\n defaultValue: []\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event;\n\nexport { MODEL_PROP_NAME, MODEL_EVENT_NAME }; // --- Props ---\n\nexport var props = sortKeys(_objectSpread(_objectSpread({}, modelProps), {}, _defineProperty({\n fields: makeProp(PROP_TYPE_ARRAY, null),\n // Provider mixin adds in `Function` type\n items: makeProp(PROP_TYPE_ARRAY, []),\n // Primary key for record\n // If provided the value in each row must be unique!\n primaryKey: makeProp(PROP_TYPE_STRING)\n}, MODEL_PROP_NAME, makeProp(PROP_TYPE_ARRAY, [])))); // --- Mixin ---\n// @vue/component\n\nexport var itemsMixin = Vue.extend({\n mixins: [modelMixin],\n props: props,\n data: function data() {\n var items = this.items;\n return {\n // Our local copy of the items\n // Must be an array\n localItems: isArray(items) ? items.slice() : []\n };\n },\n computed: {\n computedFields: function computedFields() {\n // We normalize fields into an array of objects\n // `[ { key:..., label:..., ...}, {...}, ..., {..}]`\n return normalizeFields(this.fields, this.localItems);\n },\n computedFieldsObj: function computedFieldsObj() {\n // Fields as a simple lookup hash object\n // Mainly for formatter lookup and use in `scopedSlots` for convenience\n // If the field has a formatter, it normalizes formatter to a\n // function ref or `undefined` if no formatter\n var $parent = this.$parent;\n return this.computedFields.reduce(function (obj, f) {\n // We use object spread here so we don't mutate the original field object\n obj[f.key] = clone(f);\n\n if (f.formatter) {\n // Normalize formatter to a function ref or `undefined`\n var formatter = f.formatter;\n\n if (isString(formatter) && isFunction($parent[formatter])) {\n formatter = $parent[formatter];\n } else if (!isFunction(formatter)) {\n /* istanbul ignore next */\n formatter = undefined;\n } // Return formatter function or `undefined` if none\n\n\n obj[f.key].formatter = formatter;\n }\n\n return obj;\n }, {});\n },\n computedItems: function computedItems() {\n // Fallback if various mixins not provided\n return (this.paginatedItems || this.sortedItems || this.filteredItems || this.localItems ||\n /* istanbul ignore next */\n []).slice();\n },\n context: function context() {\n // Current state of sorting, filtering and pagination props/values\n return {\n filter: this.localFilter,\n sortBy: this.localSortBy,\n sortDesc: this.localSortDesc,\n perPage: mathMax(toInteger(this.perPage, 0), 0),\n currentPage: mathMax(toInteger(this.currentPage, 0), 1),\n apiUrl: this.apiUrl\n };\n }\n },\n watch: {\n items: function items(newValue) {\n // Set `localItems`/`filteredItems` to a copy of the provided array\n this.localItems = isArray(newValue) ? newValue.slice() : [];\n },\n // Watch for changes on `computedItems` and update the `v-model`\n computedItems: function computedItems(newValue, oldValue) {\n if (!looseEqual(newValue, oldValue)) {\n this.$emit(MODEL_EVENT_NAME, newValue);\n }\n },\n // Watch for context changes\n context: function context(newValue, oldValue) {\n // Emit context information for external paging/filtering/sorting handling\n if (!looseEqual(newValue, oldValue)) {\n this.$emit(EVENT_NAME_CONTEXT_CHANGED, newValue);\n }\n }\n },\n mounted: function mounted() {\n // Initially update the `v-model` of displayed items\n this.$emit(MODEL_EVENT_NAME, this.computedItems);\n },\n methods: {\n // Method to get the formatter method for a given field key\n getFieldFormatter: function getFieldFormatter(key) {\n var field = this.computedFieldsObj[key]; // `this.computedFieldsObj` has pre-normalized the formatter to a\n // function ref if present, otherwise `undefined`\n\n return field ? field.formatter : undefined;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_NUMBER_STRING } from '../../../constants/props';\nimport { mathMax } from '../../../utils/math';\nimport { toInteger } from '../../../utils/number';\nimport { makeProp } from '../../../utils/props'; // --- Props ---\n\nexport var props = {\n currentPage: makeProp(PROP_TYPE_NUMBER_STRING, 1),\n perPage: makeProp(PROP_TYPE_NUMBER_STRING, 0)\n}; // --- Mixin ---\n// @vue/component\n\nexport var paginationMixin = Vue.extend({\n props: props,\n computed: {\n localPaging: function localPaging() {\n return this.hasProvider ? !!this.noProviderPaging : true;\n },\n paginatedItems: function paginatedItems() {\n var items = this.sortedItems || this.filteredItems || this.localItems || [];\n var currentPage = mathMax(toInteger(this.currentPage, 1), 1);\n var perPage = mathMax(toInteger(this.perPage, 0), 0); // Apply local pagination\n\n if (this.localPaging && perPage) {\n // Grab the current page of data (which may be past filtered items limit)\n items = items.slice((currentPage - 1) * perPage, currentPage * perPage);\n } // Return the items to display in the table\n\n\n return items;\n }\n }\n});","import { Vue } from '../../../vue';\nimport { NAME_TABLE } from '../../../constants/components';\nimport { EVENT_NAME_REFRESH, EVENT_NAME_REFRESHED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_FUNCTION, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { getRootActionEventName, getRootEventName } from '../../../utils/events';\nimport { isArray, isFunction, isPromise } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { clone } from '../../../utils/object';\nimport { makeProp } from '../../../utils/props';\nimport { warn } from '../../../utils/warn';\nimport { listenOnRootMixin } from '../../../mixins/listen-on-root'; // --- Constants ---\n\nvar ROOT_EVENT_NAME_REFRESHED = getRootEventName(NAME_TABLE, EVENT_NAME_REFRESHED);\nvar ROOT_ACTION_EVENT_NAME_REFRESH = getRootActionEventName(NAME_TABLE, EVENT_NAME_REFRESH); // --- Props ---\n\nexport var props = {\n // Passed to the context object\n // Not used by `` directly\n apiUrl: makeProp(PROP_TYPE_STRING),\n // Adds in 'Function' support\n items: makeProp(PROP_TYPE_ARRAY_FUNCTION, []),\n noProviderFiltering: makeProp(PROP_TYPE_BOOLEAN, false),\n noProviderPaging: makeProp(PROP_TYPE_BOOLEAN, false),\n noProviderSorting: makeProp(PROP_TYPE_BOOLEAN, false)\n}; // --- Mixin ---\n// @vue/component\n\nexport var providerMixin = Vue.extend({\n mixins: [listenOnRootMixin],\n props: props,\n computed: {\n hasProvider: function hasProvider() {\n return isFunction(this.items);\n },\n providerTriggerContext: function providerTriggerContext() {\n // Used to trigger the provider function via a watcher. Only the fields that\n // are needed for triggering a provider update are included. Note that the\n // regular this.context is sent to the provider during fetches though, as they\n // may need all the prop info.\n var ctx = {\n apiUrl: this.apiUrl,\n filter: null,\n sortBy: null,\n sortDesc: null,\n perPage: null,\n currentPage: null\n };\n\n if (!this.noProviderFiltering) {\n // Either a string, or could be an object or array.\n ctx.filter = this.localFilter;\n }\n\n if (!this.noProviderSorting) {\n ctx.sortBy = this.localSortBy;\n ctx.sortDesc = this.localSortDesc;\n }\n\n if (!this.noProviderPaging) {\n ctx.perPage = this.perPage;\n ctx.currentPage = this.currentPage;\n }\n\n return clone(ctx);\n }\n },\n watch: {\n // Provider update triggering\n items: function items(newValue) {\n // If a new provider has been specified, trigger an update\n if (this.hasProvider || isFunction(newValue)) {\n this.$nextTick(this._providerUpdate);\n }\n },\n providerTriggerContext: function providerTriggerContext(newValue, oldValue) {\n // Trigger the provider to update as the relevant context values have changed.\n if (!looseEqual(newValue, oldValue)) {\n this.$nextTick(this._providerUpdate);\n }\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n // Call the items provider if necessary\n if (this.hasProvider && (!this.localItems || this.localItems.length === 0)) {\n // Fetch on mount if localItems is empty\n this._providerUpdate();\n } // Listen for global messages to tell us to force refresh the table\n\n\n this.listenOnRoot(ROOT_ACTION_EVENT_NAME_REFRESH, function (id) {\n if (id === _this.id || id === _this) {\n _this.refresh();\n }\n });\n },\n methods: {\n refresh: function refresh() {\n var items = this.items,\n refresh = this.refresh; // Public Method: Force a refresh of the provider function\n\n this.$off(EVENT_NAME_REFRESHED, refresh);\n\n if (this.computedBusy) {\n // Can't force an update when forced busy by user (busy prop === true)\n if (this.localBusy && this.hasProvider) {\n // But if provider running (localBusy), re-schedule refresh once `refreshed` emitted\n this.$on(EVENT_NAME_REFRESHED, refresh);\n }\n } else {\n this.clearSelected();\n\n if (this.hasProvider) {\n this.$nextTick(this._providerUpdate);\n } else {\n /* istanbul ignore next */\n this.localItems = isArray(items) ? items.slice() : [];\n }\n }\n },\n // Provider related methods\n _providerSetLocal: function _providerSetLocal(items) {\n this.localItems = isArray(items) ? items.slice() : [];\n this.localBusy = false;\n this.$emit(EVENT_NAME_REFRESHED); // New root emit\n\n if (this.id) {\n this.emitOnRoot(ROOT_EVENT_NAME_REFRESHED, this.id);\n }\n },\n _providerUpdate: function _providerUpdate() {\n var _this2 = this;\n\n // Refresh the provider function items.\n if (!this.hasProvider) {\n // Do nothing if no provider\n return;\n } // If table is busy, wait until refreshed before calling again\n\n\n if (this.computedBusy) {\n // Schedule a new refresh once `refreshed` is emitted\n this.$nextTick(this.refresh);\n return;\n } // Set internal busy state\n\n\n this.localBusy = true; // Call provider function with context and optional callback after DOM is fully updated\n\n this.$nextTick(function () {\n try {\n // Call provider function passing it the context and optional callback\n var data = _this2.items(_this2.context, _this2._providerSetLocal);\n\n if (isPromise(data)) {\n // Provider returned Promise\n data.then(function (items) {\n // Provider resolved with items\n _this2._providerSetLocal(items);\n });\n } else if (isArray(data)) {\n // Provider returned Array data\n _this2._providerSetLocal(data);\n } else {\n /* istanbul ignore if */\n if (_this2.items.length !== 2) {\n // Check number of arguments provider function requested\n // Provider not using callback (didn't request second argument), so we clear\n // busy state as most likely there was an error in the provider function\n\n /* istanbul ignore next */\n warn(\"Provider function didn't request callback and did not return a promise or data.\", NAME_TABLE);\n _this2.localBusy = false;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n // Provider function borked on us, so we spew out a warning\n // and clear the busy state\n warn(\"Provider function error [\".concat(e.name, \"] \").concat(e.message, \".\"), NAME_TABLE);\n _this2.localBusy = false;\n\n _this2.$off(EVENT_NAME_REFRESHED, _this2.refresh);\n }\n });\n }\n }\n});","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_CONTEXT_CHANGED, EVENT_NAME_FILTERED, EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_SELECTED } from '../../../constants/events';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { arrayIncludes, createArray } from '../../../utils/array';\nimport { identity } from '../../../utils/identity';\nimport { isArray, isNumber } from '../../../utils/inspect';\nimport { looseEqual } from '../../../utils/loose-equal';\nimport { mathMax, mathMin } from '../../../utils/math';\nimport { makeProp } from '../../../utils/props';\nimport { sanitizeRow } from './sanitize-row'; // --- Constants ---\n\nvar SELECT_MODES = ['range', 'multi', 'single']; // --- Props ---\n\nexport var props = {\n // Disable use of click handlers for row selection\n noSelectOnClick: makeProp(PROP_TYPE_BOOLEAN, false),\n selectMode: makeProp(PROP_TYPE_STRING, 'multi', function (value) {\n return arrayIncludes(SELECT_MODES, value);\n }),\n selectable: makeProp(PROP_TYPE_BOOLEAN, false),\n selectedVariant: makeProp(PROP_TYPE_STRING, 'active')\n}; // --- Mixin ---\n// @vue/component\n\nexport var selectableMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n selectedRows: [],\n selectedLastRow: -1\n };\n },\n computed: {\n isSelectable: function isSelectable() {\n return this.selectable && this.selectMode;\n },\n hasSelectableRowClick: function hasSelectableRowClick() {\n return this.isSelectable && !this.noSelectOnClick;\n },\n supportsSelectableRows: function supportsSelectableRows() {\n return true;\n },\n selectableHasSelection: function selectableHasSelection() {\n var selectedRows = this.selectedRows;\n return this.isSelectable && selectedRows && selectedRows.length > 0 && selectedRows.some(identity);\n },\n selectableIsMultiSelect: function selectableIsMultiSelect() {\n return this.isSelectable && arrayIncludes(['range', 'multi'], this.selectMode);\n },\n selectableTableClasses: function selectableTableClasses() {\n var _ref;\n\n var isSelectable = this.isSelectable;\n return _ref = {\n 'b-table-selectable': isSelectable\n }, _defineProperty(_ref, \"b-table-select-\".concat(this.selectMode), isSelectable), _defineProperty(_ref, 'b-table-selecting', this.selectableHasSelection), _defineProperty(_ref, 'b-table-selectable-no-click', isSelectable && !this.hasSelectableRowClick), _ref;\n },\n selectableTableAttrs: function selectableTableAttrs() {\n return {\n // TODO:\n // Should this attribute not be included when no-select-on-click is set\n // since this attribute implies keyboard navigation?\n 'aria-multiselectable': !this.isSelectable ? null : this.selectableIsMultiSelect ? 'true' : 'false'\n };\n }\n },\n watch: {\n computedItems: function computedItems(newValue, oldValue) {\n // Reset for selectable\n var equal = false;\n\n if (this.isSelectable && this.selectedRows.length > 0) {\n // Quick check against array length\n equal = isArray(newValue) && isArray(oldValue) && newValue.length === oldValue.length;\n\n for (var i = 0; equal && i < newValue.length; i++) {\n // Look for the first non-loosely equal row, after ignoring reserved fields\n equal = looseEqual(sanitizeRow(newValue[i]), sanitizeRow(oldValue[i]));\n }\n }\n\n if (!equal) {\n this.clearSelected();\n }\n },\n selectable: function selectable(newValue) {\n this.clearSelected();\n this.setSelectionHandlers(newValue);\n },\n selectMode: function selectMode() {\n this.clearSelected();\n },\n hasSelectableRowClick: function hasSelectableRowClick(newValue) {\n this.clearSelected();\n this.setSelectionHandlers(!newValue);\n },\n selectedRows: function selectedRows(_selectedRows, oldValue) {\n var _this = this;\n\n if (this.isSelectable && !looseEqual(_selectedRows, oldValue)) {\n var items = []; // `.forEach()` skips over non-existent indices (on sparse arrays)\n\n _selectedRows.forEach(function (v, idx) {\n if (v) {\n items.push(_this.computedItems[idx]);\n }\n });\n\n this.$emit(EVENT_NAME_ROW_SELECTED, items);\n }\n }\n },\n beforeMount: function beforeMount() {\n // Set up handlers if needed\n if (this.isSelectable) {\n this.setSelectionHandlers(true);\n }\n },\n methods: {\n // Public methods\n selectRow: function selectRow(index) {\n // Select a particular row (indexed based on computedItems)\n if (this.isSelectable && isNumber(index) && index >= 0 && index < this.computedItems.length && !this.isRowSelected(index)) {\n var selectedRows = this.selectableIsMultiSelect ? this.selectedRows.slice() : [];\n selectedRows[index] = true;\n this.selectedLastClicked = -1;\n this.selectedRows = selectedRows;\n }\n },\n unselectRow: function unselectRow(index) {\n // Un-select a particular row (indexed based on `computedItems`)\n if (this.isSelectable && isNumber(index) && this.isRowSelected(index)) {\n var selectedRows = this.selectedRows.slice();\n selectedRows[index] = false;\n this.selectedLastClicked = -1;\n this.selectedRows = selectedRows;\n }\n },\n selectAllRows: function selectAllRows() {\n var length = this.computedItems.length;\n\n if (this.isSelectable && length > 0) {\n this.selectedLastClicked = -1;\n this.selectedRows = this.selectableIsMultiSelect ? createArray(length, true) : [true];\n }\n },\n isRowSelected: function isRowSelected(index) {\n // Determine if a row is selected (indexed based on `computedItems`)\n return !!(isNumber(index) && this.selectedRows[index]);\n },\n clearSelected: function clearSelected() {\n // Clear any active selected row(s)\n this.selectedLastClicked = -1;\n this.selectedRows = [];\n },\n // Internal private methods\n selectableRowClasses: function selectableRowClasses(index) {\n if (this.isSelectable && this.isRowSelected(index)) {\n var variant = this.selectedVariant;\n return _defineProperty({\n 'b-table-row-selected': true\n }, \"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(variant), variant);\n }\n\n return {};\n },\n selectableRowAttrs: function selectableRowAttrs(index) {\n return {\n 'aria-selected': !this.isSelectable ? null : this.isRowSelected(index) ? 'true' : 'false'\n };\n },\n setSelectionHandlers: function setSelectionHandlers(on) {\n var method = on && !this.noSelectOnClick ? '$on' : '$off'; // Handle row-clicked event\n\n this[method](EVENT_NAME_ROW_CLICKED, this.selectionHandler); // Clear selection on filter, pagination, and sort changes\n\n this[method](EVENT_NAME_FILTERED, this.clearSelected);\n this[method](EVENT_NAME_CONTEXT_CHANGED, this.clearSelected);\n },\n selectionHandler: function selectionHandler(item, index, event) {\n /* istanbul ignore if: should never happen */\n if (!this.isSelectable || this.noSelectOnClick) {\n // Don't do anything if table is not in selectable mode\n this.clearSelected();\n return;\n }\n\n var selectMode = this.selectMode,\n selectedLastRow = this.selectedLastRow;\n var selectedRows = this.selectedRows.slice();\n var selected = !selectedRows[index]; // Note 'multi' mode needs no special event handling\n\n if (selectMode === 'single') {\n selectedRows = [];\n } else if (selectMode === 'range') {\n if (selectedLastRow > -1 && event.shiftKey) {\n // range\n for (var idx = mathMin(selectedLastRow, index); idx <= mathMax(selectedLastRow, index); idx++) {\n selectedRows[idx] = true;\n }\n\n selected = true;\n } else {\n if (!(event.ctrlKey || event.metaKey)) {\n // Clear range selection if any\n selectedRows = [];\n selected = true;\n }\n\n this.selectedLastRow = selected ? index : -1;\n }\n }\n\n selectedRows[index] = selected;\n this.selectedRows = selectedRows;\n }\n }\n});","var _props, _watch;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_HEAD_CLICKED, EVENT_NAME_SORT_CHANGED, MODEL_EVENT_NAME_PREFIX } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_FUNCTION, PROP_TYPE_OBJECT, PROP_TYPE_STRING } from '../../../constants/props';\nimport { arrayIncludes } from '../../../utils/array';\nimport { isFunction, isUndefinedOrNull } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { stableSort } from '../../../utils/stable-sort';\nimport { trim } from '../../../utils/string';\nimport { defaultSortCompare } from './default-sort-compare'; // --- Constants ---\n\nvar MODEL_PROP_NAME_SORT_BY = 'sortBy';\nvar MODEL_EVENT_NAME_SORT_BY = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_SORT_BY;\nvar MODEL_PROP_NAME_SORT_DESC = 'sortDesc';\nvar MODEL_EVENT_NAME_SORT_DESC = MODEL_EVENT_NAME_PREFIX + MODEL_PROP_NAME_SORT_DESC;\nvar SORT_DIRECTION_ASC = 'asc';\nvar SORT_DIRECTION_DESC = 'desc';\nvar SORT_DIRECTION_LAST = 'last';\nvar SORT_DIRECTIONS = [SORT_DIRECTION_ASC, SORT_DIRECTION_DESC, SORT_DIRECTION_LAST]; // --- Props ---\n\nexport var props = (_props = {\n labelSortAsc: makeProp(PROP_TYPE_STRING, 'Click to sort Ascending'),\n labelSortClear: makeProp(PROP_TYPE_STRING, 'Click to clear sorting'),\n labelSortDesc: makeProp(PROP_TYPE_STRING, 'Click to sort Descending'),\n noFooterSorting: makeProp(PROP_TYPE_BOOLEAN, false),\n noLocalSorting: makeProp(PROP_TYPE_BOOLEAN, false),\n // Another prop that should have had a better name\n // It should be `noSortClear` (on non-sortable headers)\n // We will need to make sure the documentation is clear on what\n // this prop does (as well as in the code for future reference)\n noSortReset: makeProp(PROP_TYPE_BOOLEAN, false)\n}, _defineProperty(_props, MODEL_PROP_NAME_SORT_BY, makeProp(PROP_TYPE_STRING)), _defineProperty(_props, \"sortCompare\", makeProp(PROP_TYPE_FUNCTION)), _defineProperty(_props, \"sortCompareLocale\", makeProp(PROP_TYPE_ARRAY_STRING)), _defineProperty(_props, \"sortCompareOptions\", makeProp(PROP_TYPE_OBJECT, {\n numeric: true\n})), _defineProperty(_props, MODEL_PROP_NAME_SORT_DESC, makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_props, \"sortDirection\", makeProp(PROP_TYPE_STRING, SORT_DIRECTION_ASC, function (value) {\n return arrayIncludes(SORT_DIRECTIONS, value);\n})), _defineProperty(_props, \"sortIconLeft\", makeProp(PROP_TYPE_BOOLEAN, false)), _defineProperty(_props, \"sortNullLast\", makeProp(PROP_TYPE_BOOLEAN, false)), _props); // --- Mixin ---\n// @vue/component\n\nexport var sortingMixin = Vue.extend({\n props: props,\n data: function data() {\n return {\n localSortBy: this[MODEL_PROP_NAME_SORT_BY] || '',\n localSortDesc: this[MODEL_PROP_NAME_SORT_DESC] || false\n };\n },\n computed: {\n localSorting: function localSorting() {\n return this.hasProvider ? !!this.noProviderSorting : !this.noLocalSorting;\n },\n isSortable: function isSortable() {\n return this.computedFields.some(function (f) {\n return f.sortable;\n });\n },\n // Sorts the filtered items and returns a new array of the sorted items\n // When not sorted, the original items array will be returned\n sortedItems: function sortedItems() {\n var sortBy = this.localSortBy,\n sortDesc = this.localSortDesc,\n locale = this.sortCompareLocale,\n nullLast = this.sortNullLast,\n sortCompare = this.sortCompare,\n localSorting = this.localSorting;\n var items = (this.filteredItems || this.localItems || []).slice();\n\n var localeOptions = _objectSpread(_objectSpread({}, this.sortCompareOptions), {}, {\n usage: 'sort'\n });\n\n if (sortBy && localSorting) {\n var field = this.computedFieldsObj[sortBy] || {};\n var sortByFormatted = field.sortByFormatted;\n var formatter = isFunction(sortByFormatted) ?\n /* istanbul ignore next */\n sortByFormatted : sortByFormatted ? this.getFieldFormatter(sortBy) : undefined; // `stableSort` returns a new array, and leaves the original array intact\n\n return stableSort(items, function (a, b) {\n var result = null; // Call user provided `sortCompare` routine first\n\n if (isFunction(sortCompare)) {\n // TODO:\n // Change the `sortCompare` signature to the one of `defaultSortCompare`\n // with the next major version bump\n result = sortCompare(a, b, sortBy, sortDesc, formatter, localeOptions, locale);\n } // Fallback to built-in `defaultSortCompare` if `sortCompare`\n // is not defined or returns `null`/`false`\n\n\n if (isUndefinedOrNull(result) || result === false) {\n result = defaultSortCompare(a, b, {\n sortBy: sortBy,\n formatter: formatter,\n locale: locale,\n localeOptions: localeOptions,\n nullLast: nullLast\n });\n } // Negate result if sorting in descending order\n\n\n return (result || 0) * (sortDesc ? -1 : 1);\n });\n }\n\n return items;\n }\n },\n watch: (_watch = {\n /* istanbul ignore next: pain in the butt to test */\n isSortable: function isSortable(newValue) {\n if (newValue) {\n if (this.isSortable) {\n this.$on(EVENT_NAME_HEAD_CLICKED, this.handleSort);\n }\n } else {\n this.$off(EVENT_NAME_HEAD_CLICKED, this.handleSort);\n }\n }\n }, _defineProperty(_watch, MODEL_PROP_NAME_SORT_DESC, function (newValue) {\n /* istanbul ignore next */\n if (newValue === this.localSortDesc) {\n return;\n }\n\n this.localSortDesc = newValue || false;\n }), _defineProperty(_watch, MODEL_PROP_NAME_SORT_BY, function (newValue) {\n /* istanbul ignore next */\n if (newValue === this.localSortBy) {\n return;\n }\n\n this.localSortBy = newValue || '';\n }), _defineProperty(_watch, \"localSortDesc\", function localSortDesc(newValue, oldValue) {\n // Emit update to sort-desc.sync\n if (newValue !== oldValue) {\n this.$emit(MODEL_EVENT_NAME_SORT_DESC, newValue);\n }\n }), _defineProperty(_watch, \"localSortBy\", function localSortBy(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.$emit(MODEL_EVENT_NAME_SORT_BY, newValue);\n }\n }), _watch),\n created: function created() {\n if (this.isSortable) {\n this.$on(EVENT_NAME_HEAD_CLICKED, this.handleSort);\n }\n },\n methods: {\n // Handlers\n // Need to move from thead-mixin\n handleSort: function handleSort(key, field, event, isFoot) {\n var _this = this;\n\n if (!this.isSortable) {\n /* istanbul ignore next */\n return;\n }\n\n if (isFoot && this.noFooterSorting) {\n return;\n } // TODO: make this tri-state sorting\n // cycle desc => asc => none => desc => ...\n\n\n var sortChanged = false;\n\n var toggleLocalSortDesc = function toggleLocalSortDesc() {\n var sortDirection = field.sortDirection || _this.sortDirection;\n\n if (sortDirection === SORT_DIRECTION_ASC) {\n _this.localSortDesc = false;\n } else if (sortDirection === SORT_DIRECTION_DESC) {\n _this.localSortDesc = true;\n } else {// sortDirection === 'last'\n // Leave at last sort direction from previous column\n }\n };\n\n if (field.sortable) {\n var sortKey = !this.localSorting && field.sortKey ? field.sortKey : key;\n\n if (this.localSortBy === sortKey) {\n // Change sorting direction on current column\n this.localSortDesc = !this.localSortDesc;\n } else {\n // Start sorting this column ascending\n this.localSortBy = sortKey; // this.localSortDesc = false\n\n toggleLocalSortDesc();\n }\n\n sortChanged = true;\n } else if (this.localSortBy && !this.noSortReset) {\n this.localSortBy = '';\n toggleLocalSortDesc();\n sortChanged = true;\n }\n\n if (sortChanged) {\n // Sorting parameters changed\n this.$emit(EVENT_NAME_SORT_CHANGED, this.context);\n }\n },\n // methods to compute classes and attrs for thead>th cells\n sortTheadThClasses: function sortTheadThClasses(key, field, isFoot) {\n return {\n // If sortable and sortIconLeft are true, then place sort icon on the left\n 'b-table-sort-icon-left': field.sortable && this.sortIconLeft && !(isFoot && this.noFooterSorting)\n };\n },\n sortTheadThAttrs: function sortTheadThAttrs(key, field, isFoot) {\n if (!this.isSortable || isFoot && this.noFooterSorting) {\n // No attributes if not a sortable table\n return {};\n }\n\n var sortable = field.sortable; // Assemble the aria-sort attribute value\n\n var ariaSort = sortable && this.localSortBy === key ? this.localSortDesc ? 'descending' : 'ascending' : sortable ? 'none' : null; // Return the attribute\n\n return {\n 'aria-sort': ariaSort\n };\n },\n sortTheadThLabel: function sortTheadThLabel(key, field, isFoot) {\n // A label to be placed in an `.sr-only` element in the header cell\n if (!this.isSortable || isFoot && this.noFooterSorting) {\n // No label if not a sortable table\n return null;\n }\n\n var sortable = field.sortable; // The correctness of these labels is very important for screen-reader users.\n\n var labelSorting = '';\n\n if (sortable) {\n if (this.localSortBy === key) {\n // currently sorted sortable column.\n labelSorting = this.localSortDesc ? this.labelSortAsc : this.labelSortDesc;\n } else {\n // Not currently sorted sortable column.\n // Not using nested ternary's here for clarity/readability\n // Default for ariaLabel\n labelSorting = this.localSortDesc ? this.labelSortDesc : this.labelSortAsc; // Handle sortDirection setting\n\n var sortDirection = this.sortDirection || field.sortDirection;\n\n if (sortDirection === SORT_DIRECTION_ASC) {\n labelSorting = this.labelSortAsc;\n } else if (sortDirection === SORT_DIRECTION_DESC) {\n labelSorting = this.labelSortDesc;\n }\n }\n } else if (!this.noSortReset) {\n // Non sortable column\n labelSorting = this.localSortBy ? this.labelSortClear : '';\n } // Return the sr-only sort label or null if no label\n\n\n return trim(labelSorting) || null;\n }\n }\n});","import { get } from '../../../utils/get';\nimport { isDate, isFunction, isNumber, isNumeric, isUndefinedOrNull } from '../../../utils/inspect';\nimport { toFloat } from '../../../utils/number';\nimport { stringifyObjectValues } from '../../../utils/stringify-object-values';\n\nvar normalizeValue = function normalizeValue(value) {\n if (isUndefinedOrNull(value)) {\n return '';\n }\n\n if (isNumeric(value)) {\n return toFloat(value, value);\n }\n\n return value;\n}; // Default sort compare routine\n//\n// TODO:\n// Add option to sort by multiple columns (tri-state per column,\n// plus order of columns in sort) where `sortBy` could be an array\n// of objects `[ {key: 'foo', sortDir: 'asc'}, {key:'bar', sortDir: 'desc'} ...]`\n// or an array of arrays `[ ['foo','asc'], ['bar','desc'] ]`\n// Multisort will most likely be handled in `mixin-sort.js` by\n// calling this method for each sortBy\n\n\nexport var defaultSortCompare = function defaultSortCompare(a, b) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref$sortBy = _ref.sortBy,\n sortBy = _ref$sortBy === void 0 ? null : _ref$sortBy,\n _ref$formatter = _ref.formatter,\n formatter = _ref$formatter === void 0 ? null : _ref$formatter,\n _ref$locale = _ref.locale,\n locale = _ref$locale === void 0 ? undefined : _ref$locale,\n _ref$localeOptions = _ref.localeOptions,\n localeOptions = _ref$localeOptions === void 0 ? {} : _ref$localeOptions,\n _ref$nullLast = _ref.nullLast,\n nullLast = _ref$nullLast === void 0 ? false : _ref$nullLast;\n\n // Get the value by `sortBy`\n var aa = get(a, sortBy, null);\n var bb = get(b, sortBy, null); // Apply user-provided formatter\n\n if (isFunction(formatter)) {\n aa = formatter(aa, sortBy, a);\n bb = formatter(bb, sortBy, b);\n } // Internally normalize value\n // `null` / `undefined` => ''\n // `'0'` => `0`\n\n\n aa = normalizeValue(aa);\n bb = normalizeValue(bb);\n\n if (isDate(aa) && isDate(bb) || isNumber(aa) && isNumber(bb)) {\n // Special case for comparing dates and numbers\n // Internally dates are compared via their epoch number values\n return aa < bb ? -1 : aa > bb ? 1 : 0;\n } else if (nullLast && aa === '' && bb !== '') {\n // Special case when sorting `null` / `undefined` / '' last\n return 1;\n } else if (nullLast && aa !== '' && bb === '') {\n // Special case when sorting `null` / `undefined` / '' last\n return -1;\n } // Do localized string comparison\n\n\n return stringifyObjectValues(aa).localeCompare(stringifyObjectValues(bb), locale, localeOptions);\n};","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { PROP_TYPE_BOOLEAN_STRING } from '../../../constants/props';\nimport { makeProp } from '../../../utils/props'; // --- Props ---\n\nexport var props = {\n stacked: makeProp(PROP_TYPE_BOOLEAN_STRING, false)\n}; // --- Mixin ---\n// @vue/component\n\nexport var stackedMixin = Vue.extend({\n props: props,\n computed: {\n isStacked: function isStacked() {\n var stacked = this.stacked; // `true` when always stacked, or returns breakpoint specified\n\n return stacked === '' ? true : stacked;\n },\n isStackedAlways: function isStackedAlways() {\n return this.isStacked === true;\n },\n stackedTableClasses: function stackedTableClasses() {\n var isStackedAlways = this.isStackedAlways;\n return _defineProperty({\n 'b-table-stacked': isStackedAlways\n }, \"b-table-stacked-\".concat(this.stacked), !isStackedAlways && this.isStacked);\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_STRING } from '../../../constants/props';\nimport { identity } from '../../../utils/identity';\nimport { isBoolean } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { toString } from '../../../utils/string';\nimport { attrsMixin } from '../../../mixins/attrs'; // Main `
` render mixin\n// Includes all main table styling options\n// --- Props ---\n\nexport var props = {\n bordered: makeProp(PROP_TYPE_BOOLEAN, false),\n borderless: makeProp(PROP_TYPE_BOOLEAN, false),\n captionTop: makeProp(PROP_TYPE_BOOLEAN, false),\n dark: makeProp(PROP_TYPE_BOOLEAN, false),\n fixed: makeProp(PROP_TYPE_BOOLEAN, false),\n hover: makeProp(PROP_TYPE_BOOLEAN, false),\n noBorderCollapse: makeProp(PROP_TYPE_BOOLEAN, false),\n outlined: makeProp(PROP_TYPE_BOOLEAN, false),\n responsive: makeProp(PROP_TYPE_BOOLEAN_STRING, false),\n small: makeProp(PROP_TYPE_BOOLEAN, false),\n // If a string, it is assumed to be the table `max-height` value\n stickyHeader: makeProp(PROP_TYPE_BOOLEAN_STRING, false),\n striped: makeProp(PROP_TYPE_BOOLEAN, false),\n tableClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tableVariant: makeProp(PROP_TYPE_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var tableRendererMixin = Vue.extend({\n mixins: [attrsMixin],\n provide: function provide() {\n return {\n bvTable: this\n };\n },\n // Don't place attributes on root element automatically,\n // as table could be wrapped in responsive `
`\n inheritAttrs: false,\n props: props,\n computed: {\n // Layout related computed props\n isResponsive: function isResponsive() {\n var responsive = this.responsive;\n responsive = responsive === '' ? true : responsive;\n return this.isStacked ? false : responsive;\n },\n isStickyHeader: function isStickyHeader() {\n var stickyHeader = this.stickyHeader;\n stickyHeader = stickyHeader === '' ? true : stickyHeader;\n return this.isStacked ? false : stickyHeader;\n },\n wrapperClasses: function wrapperClasses() {\n var isResponsive = this.isResponsive;\n return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? \"table-responsive-\".concat(this.responsive) : ''].filter(identity);\n },\n wrapperStyles: function wrapperStyles() {\n var isStickyHeader = this.isStickyHeader;\n return isStickyHeader && !isBoolean(isStickyHeader) ? {\n maxHeight: isStickyHeader\n } : {};\n },\n tableClasses: function tableClasses() {\n var hover = this.hover,\n tableVariant = this.tableVariant;\n hover = this.isTableSimple ? hover : hover && this.computedItems.length > 0 && !this.computedBusy;\n return [// User supplied classes\n this.tableClass, // Styling classes\n {\n 'table-striped': this.striped,\n 'table-hover': hover,\n 'table-dark': this.dark,\n 'table-bordered': this.bordered,\n 'table-borderless': this.borderless,\n 'table-sm': this.small,\n // The following are b-table custom styles\n border: this.outlined,\n 'b-table-fixed': this.fixed,\n 'b-table-caption-top': this.captionTop,\n 'b-table-no-border-collapse': this.noBorderCollapse\n }, tableVariant ? \"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(tableVariant) : '', // Stacked table classes\n this.stackedTableClasses, // Selectable classes\n this.selectableTableClasses];\n },\n tableAttrs: function tableAttrs() {\n var items = this.computedItems,\n filteredItems = this.filteredItems,\n fields = this.computedFields,\n selectableTableAttrs = this.selectableTableAttrs; // Preserve user supplied aria-describedby, if provided in `$attrs`\n\n var adb = [(this.bvAttrs || {})['aria-describedby'], this.captionId].filter(identity).join(' ') || null;\n var ariaAttrs = this.isTableSimple ? {} : {\n 'aria-busy': this.computedBusy ? 'true' : 'false',\n 'aria-colcount': toString(fields.length),\n 'aria-describedby': adb\n };\n var rowCount = items && filteredItems && filteredItems.length > items.length ? toString(filteredItems.length) : null;\n return _objectSpread(_objectSpread(_objectSpread({\n // We set `aria-rowcount` before merging in `$attrs`,\n // in case user has supplied their own\n 'aria-rowcount': rowCount\n }, this.bvAttrs), {}, {\n // Now we can override any `$attrs` here\n id: this.safeId(),\n role: 'table'\n }, ariaAttrs), selectableTableAttrs);\n }\n },\n render: function render(h) {\n var wrapperClasses = this.wrapperClasses,\n renderCaption = this.renderCaption,\n renderColgroup = this.renderColgroup,\n renderThead = this.renderThead,\n renderTbody = this.renderTbody,\n renderTfoot = this.renderTfoot;\n var $content = [];\n\n if (this.isTableSimple) {\n $content.push(this.normalizeSlot());\n } else {\n // Build the `
`\n\n\n var $table = h('table', {\n staticClass: 'table b-table',\n class: this.tableClasses,\n attrs: this.tableAttrs,\n key: 'b-table'\n }, $content.filter(identity)); // Add responsive/sticky wrapper if needed and return table\n\n return wrapperClasses.length > 0 ? h('div', {\n class: wrapperClasses,\n style: this.wrapperStyles,\n key: 'wrap'\n }, [$table]) : $table;\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TBODY } from '../../constants/components';\nimport { PROP_TYPE_OBJECT } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n tbodyTransitionHandlers: makeProp(PROP_TYPE_OBJECT),\n tbodyTransitionProps: makeProp(PROP_TYPE_OBJECT)\n}, NAME_TBODY); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTbody = /*#__PURE__*/Vue.extend({\n name: NAME_TBODY,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isTbody: function isTbody() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return false;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n isTransitionGroup: function isTransitionGroup() {\n return this.tbodyTransitionProps || this.tbodyTransitionHandlers;\n },\n tbodyAttrs: function tbodyAttrs() {\n return _objectSpread({\n role: 'rowgroup'\n }, this.bvAttrs);\n },\n tbodyProps: function tbodyProps() {\n var tbodyTransitionProps = this.tbodyTransitionProps;\n return tbodyTransitionProps ? _objectSpread(_objectSpread({}, tbodyTransitionProps), {}, {\n tag: 'tbody'\n }) : {};\n }\n },\n render: function render(h) {\n var data = {\n props: this.tbodyProps,\n attrs: this.tbodyAttrs\n };\n\n if (this.isTransitionGroup) {\n // We use native listeners if a transition group for any delegated events\n data.on = this.tbodyTransitionHandlers || {};\n data.nativeOn = this.bvListeners;\n } else {\n // Otherwise we place any listeners on the tbody element\n data.on = this.bvListeners;\n }\n\n return h(this.isTransitionGroup ? 'transition-group' : 'tbody', data, this.normalizeSlot());\n }\n});","import { closest, getAttr, getById, matches, select } from '../../../utils/dom';\nimport { EVENT_FILTER } from './constants';\nvar TABLE_TAG_NAMES = ['TD', 'TH', 'TR']; // Returns `true` if we should ignore the click/double-click/keypress event\n// Avoids having the user need to use `@click.stop` on the form control\n\nexport var filterEvent = function filterEvent(event) {\n // Exit early when we don't have a target element\n if (!event || !event.target) {\n /* istanbul ignore next */\n return false;\n }\n\n var el = event.target; // Exit early when element is disabled or a table element\n\n if (el.disabled || TABLE_TAG_NAMES.indexOf(el.tagName) !== -1) {\n return false;\n } // Ignore the click when it was inside a dropdown menu\n\n\n if (closest('.dropdown-menu', el)) {\n return true;\n }\n\n var label = el.tagName === 'LABEL' ? el : closest('label', el); // If the label's form control is not disabled then we don't propagate event\n // Modern browsers have `label.control` that references the associated input, but IE 11\n // does not have this property on the label element, so we resort to DOM lookups\n\n if (label) {\n var labelFor = getAttr(label, 'for');\n var input = labelFor ? getById(labelFor) : select('input, select, textarea', label);\n\n if (input && !input.disabled) {\n return true;\n }\n } // Otherwise check if the event target matches one of the selectors in the\n // event filter (i.e. anchors, non disabled inputs, etc.)\n // Return `true` if we should ignore the event\n\n\n return matches(el, EVENT_FILTER);\n};","import { getSel, isElement } from '../../../utils/dom'; // Helper to determine if a there is an active text selection on the document page\n// Used to filter out click events caused by the mouse up at end of selection\n//\n// Accepts an element as only argument to test to see if selection overlaps or is\n// contained within the element\n\nexport var textSelectionActive = function textSelectionActive() {\n var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n var sel = getSel();\n return sel && sel.toString().trim() !== '' && sel.containsNode && isElement(el) ?\n /* istanbul ignore next */\n sel.containsNode(el, true) : false;\n};","import { Vue } from '../../vue';\nimport { NAME_TH } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { BTd, props as BTdProps } from './td'; // --- Props ---\n\nexport var props = makePropsConfigurable(BTdProps, NAME_TH); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTh = /*#__PURE__*/Vue.extend({\n name: NAME_TH,\n extends: BTd,\n props: props,\n computed: {\n tag: function tag() {\n return 'th';\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_HOVERED, EVENT_NAME_ROW_UNHOVERED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_FUNCTION, PROP_TYPE_OBJECT_FUNCTION } from '../../../constants/props';\nimport { SLOT_NAME_ROW_DETAILS } from '../../../constants/slots';\nimport { get } from '../../../utils/get';\nimport { isFunction, isString, isUndefinedOrNull } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { toString } from '../../../utils/string';\nimport { BTr } from '../tr';\nimport { BTd } from '../td';\nimport { BTh } from '../th';\nimport { FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT, FIELD_KEY_SHOW_DETAILS } from './constants'; // --- Props ---\n\nexport var props = {\n detailsTdClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tbodyTrAttr: makeProp(PROP_TYPE_OBJECT_FUNCTION),\n tbodyTrClass: makeProp([].concat(_toConsumableArray(PROP_TYPE_ARRAY_OBJECT_STRING), [PROP_TYPE_FUNCTION]))\n}; // --- Mixin ---\n// @vue/component\n\nexport var tbodyRowMixin = Vue.extend({\n props: props,\n methods: {\n // Methods for computing classes, attributes and styles for table cells\n getTdValues: function getTdValues(item, key, tdValue, defaultValue) {\n var $parent = this.$parent;\n\n if (tdValue) {\n var value = get(item, key, '');\n\n if (isFunction(tdValue)) {\n return tdValue(value, key, item);\n } else if (isString(tdValue) && isFunction($parent[tdValue])) {\n return $parent[tdValue](value, key, item);\n }\n\n return tdValue;\n }\n\n return defaultValue;\n },\n getThValues: function getThValues(item, key, thValue, type, defaultValue) {\n var $parent = this.$parent;\n\n if (thValue) {\n var value = get(item, key, '');\n\n if (isFunction(thValue)) {\n return thValue(value, key, item, type);\n } else if (isString(thValue) && isFunction($parent[thValue])) {\n return $parent[thValue](value, key, item, type);\n }\n\n return thValue;\n }\n\n return defaultValue;\n },\n // Method to get the value for a field\n getFormattedValue: function getFormattedValue(item, field) {\n var key = field.key;\n var formatter = this.getFieldFormatter(key);\n var value = get(item, key, null);\n\n if (isFunction(formatter)) {\n value = formatter(value, key, item);\n }\n\n return isUndefinedOrNull(value) ? '' : value;\n },\n // Factory function methods\n toggleDetailsFactory: function toggleDetailsFactory(hasDetailsSlot, item) {\n var _this = this;\n\n // Returns a function to toggle a row's details slot\n return function () {\n if (hasDetailsSlot) {\n _this.$set(item, FIELD_KEY_SHOW_DETAILS, !item[FIELD_KEY_SHOW_DETAILS]);\n }\n };\n },\n // Row event handlers\n rowHovered: function rowHovered(event) {\n // `mouseenter` handler (non-bubbling)\n // `this.tbodyRowEvtStopped` from tbody mixin\n if (!this.tbodyRowEvtStopped(event)) {\n // `this.emitTbodyRowEvent` from tbody mixin\n this.emitTbodyRowEvent(EVENT_NAME_ROW_HOVERED, event);\n }\n },\n rowUnhovered: function rowUnhovered(event) {\n // `mouseleave` handler (non-bubbling)\n // `this.tbodyRowEvtStopped` from tbody mixin\n if (!this.tbodyRowEvtStopped(event)) {\n // `this.emitTbodyRowEvent` from tbody mixin\n this.emitTbodyRowEvent(EVENT_NAME_ROW_UNHOVERED, event);\n }\n },\n // Renders a TD or TH for a row's field\n renderTbodyRowCell: function renderTbodyRowCell(field, colIndex, item, rowIndex) {\n var _this2 = this;\n\n var isStacked = this.isStacked;\n var key = field.key,\n label = field.label,\n isRowHeader = field.isRowHeader;\n var h = this.$createElement;\n var hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);\n var formatted = this.getFormattedValue(item, field);\n var stickyColumn = !isStacked && (this.isResponsive || this.stickyHeader) && field.stickyColumn; // We only uses the helper components for sticky columns to\n // improve performance of BTable/BTableLite by reducing the\n // total number of vue instances created during render\n\n var cellTag = stickyColumn ? isRowHeader ? BTh : BTd : isRowHeader ? 'th' : 'td';\n var cellVariant = item[FIELD_KEY_CELL_VARIANT] && item[FIELD_KEY_CELL_VARIANT][key] ? item[FIELD_KEY_CELL_VARIANT][key] : field.variant || null;\n var data = {\n // For the Vue key, we concatenate the column index and\n // field key (as field keys could be duplicated)\n // TODO: Although we do prevent duplicate field keys...\n // So we could change this to: `row-${rowIndex}-cell-${key}`\n class: [field.class ? field.class : '', this.getTdValues(item, key, field.tdClass, '')],\n props: {},\n attrs: _objectSpread({\n 'aria-colindex': String(colIndex + 1)\n }, isRowHeader ? this.getThValues(item, key, field.thAttr, 'row', {}) : this.getTdValues(item, key, field.tdAttr, {})),\n key: \"row-\".concat(rowIndex, \"-cell-\").concat(colIndex, \"-\").concat(key)\n };\n\n if (stickyColumn) {\n // We are using the helper BTd or BTh\n data.props = {\n stackedHeading: isStacked ? label : null,\n stickyColumn: true,\n variant: cellVariant\n };\n } else {\n // Using native TD or TH element, so we need to\n // add in the attributes and variant class\n data.attrs['data-label'] = isStacked && !isUndefinedOrNull(label) ? toString(label) : null;\n data.attrs.role = isRowHeader ? 'rowheader' : 'cell';\n data.attrs.scope = isRowHeader ? 'row' : null; // Add in the variant class\n\n if (cellVariant) {\n data.class.push(\"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(cellVariant));\n }\n }\n\n var slotScope = {\n item: item,\n index: rowIndex,\n field: field,\n unformatted: get(item, key, ''),\n value: formatted,\n toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item),\n detailsShowing: Boolean(item[FIELD_KEY_SHOW_DETAILS])\n }; // If table supports selectable mode, then add in the following scope\n // this.supportsSelectableRows will be undefined if mixin isn't loaded\n\n if (this.supportsSelectableRows) {\n slotScope.rowSelected = this.isRowSelected(rowIndex);\n\n slotScope.selectRow = function () {\n return _this2.selectRow(rowIndex);\n };\n\n slotScope.unselectRow = function () {\n return _this2.unselectRow(rowIndex);\n };\n } // The new `v-slot` syntax doesn't like a slot name starting with\n // a square bracket and if using in-document HTML templates, the\n // v-slot attributes are lower-cased by the browser.\n // Switched to round bracket syntax to prevent confusion with\n // dynamic slot name syntax.\n // We look for slots in this order: `cell(${key})`, `cell(${key.toLowerCase()})`, 'cell()'\n // Slot names are now cached by mixin tbody in `this.$_bodyFieldSlotNameCache`\n // Will be `null` if no slot (or fallback slot) exists\n\n\n var slotName = this.$_bodyFieldSlotNameCache[key];\n var $childNodes = slotName ? this.normalizeSlot(slotName, slotScope) : toString(formatted);\n\n if (this.isStacked) {\n // We wrap in a DIV to ensure rendered as a single cell when visually stacked!\n $childNodes = [h('div', [$childNodes])];\n } // Render either a td or th cell\n\n\n return h(cellTag, data, [$childNodes]);\n },\n // Renders an item's row (or rows if details supported)\n renderTbodyRow: function renderTbodyRow(item, rowIndex) {\n var _this3 = this;\n\n var fields = this.computedFields,\n striped = this.striped,\n primaryKey = this.primaryKey,\n currentPage = this.currentPage,\n perPage = this.perPage,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement;\n var hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);\n var rowShowDetails = item[FIELD_KEY_SHOW_DETAILS] && hasDetailsSlot;\n var hasRowClickHandler = this.$listeners[EVENT_NAME_ROW_CLICKED] || this.hasSelectableRowClick; // We can return more than one TR if rowDetails enabled\n\n var $rows = []; // Details ID needed for `aria-details` when details showing\n // We set it to `null` when not showing so that attribute\n // does not appear on the element\n\n var detailsId = rowShowDetails ? this.safeId(\"_details_\".concat(rowIndex, \"_\")) : null; // For each item data field in row\n\n var $tds = fields.map(function (field, colIndex) {\n return _this3.renderTbodyRowCell(field, colIndex, item, rowIndex);\n }); // Calculate the row number in the dataset (indexed from 1)\n\n var ariaRowIndex = null;\n\n if (currentPage && perPage && perPage > 0) {\n ariaRowIndex = String((currentPage - 1) * perPage + rowIndex + 1);\n } // Create a unique :key to help ensure that sub components are re-rendered rather than\n // re-used, which can cause issues. If a primary key is not provided we use the rendered\n // rows index within the tbody.\n // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2410\n\n\n var primaryKeyValue = toString(get(item, primaryKey)) || null;\n var rowKey = primaryKeyValue || toString(rowIndex); // If primary key is provided, use it to generate a unique ID on each tbody > tr\n // In the format of '{tableId}__row_{primaryKeyValue}'\n\n var rowId = primaryKeyValue ? this.safeId(\"_row_\".concat(primaryKeyValue)) : null; // Selectable classes and attributes\n\n var selectableClasses = this.selectableRowClasses ? this.selectableRowClasses(rowIndex) : {};\n var selectableAttrs = this.selectableRowAttrs ? this.selectableRowAttrs(rowIndex) : {}; // Additional classes and attributes\n\n var userTrClasses = isFunction(tbodyTrClass) ? tbodyTrClass(item, 'row') : tbodyTrClass;\n var userTrAttrs = isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(item, 'row') : tbodyTrAttr; // Add the item row\n\n $rows.push(h(BTr, {\n class: [userTrClasses, selectableClasses, rowShowDetails ? 'b-table-has-details' : ''],\n props: {\n variant: item[FIELD_KEY_ROW_VARIANT] || null\n },\n attrs: _objectSpread(_objectSpread({\n id: rowId\n }, userTrAttrs), {}, {\n // Users cannot override the following attributes\n tabindex: hasRowClickHandler ? '0' : null,\n 'data-pk': primaryKeyValue || null,\n 'aria-details': detailsId,\n 'aria-owns': detailsId,\n 'aria-rowindex': ariaRowIndex\n }, selectableAttrs),\n on: {\n // Note: These events are not A11Y friendly!\n mouseenter: this.rowHovered,\n mouseleave: this.rowUnhovered\n },\n key: \"__b-table-row-\".concat(rowKey, \"__\"),\n ref: 'item-rows',\n refInFor: true\n }, $tds)); // Row Details slot\n\n if (rowShowDetails) {\n var detailsScope = {\n item: item,\n index: rowIndex,\n fields: fields,\n toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item)\n }; // If table supports selectable mode, then add in the following scope\n // this.supportsSelectableRows will be undefined if mixin isn't loaded\n\n if (this.supportsSelectableRows) {\n detailsScope.rowSelected = this.isRowSelected(rowIndex);\n\n detailsScope.selectRow = function () {\n return _this3.selectRow(rowIndex);\n };\n\n detailsScope.unselectRow = function () {\n return _this3.unselectRow(rowIndex);\n };\n } // Render the details slot in a TD\n\n\n var $details = h(BTd, {\n props: {\n colspan: fields.length\n },\n class: this.detailsTdClass\n }, [this.normalizeSlot(SLOT_NAME_ROW_DETAILS, detailsScope)]); // Add a hidden row to keep table row striping consistent when details showing\n // Only added if the table is striped\n\n if (striped) {\n $rows.push( // We don't use `BTr` here as we don't need the extra functionality\n h('tr', {\n staticClass: 'd-none',\n attrs: {\n 'aria-hidden': 'true',\n role: 'presentation'\n },\n key: \"__b-table-details-stripe__\".concat(rowKey)\n }));\n } // Add the actual details row\n\n\n var userDetailsTrClasses = isFunction(this.tbodyTrClass) ?\n /* istanbul ignore next */\n this.tbodyTrClass(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrClass;\n var userDetailsTrAttrs = isFunction(this.tbodyTrAttr) ?\n /* istanbul ignore next */\n this.tbodyTrAttr(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrAttr;\n $rows.push(h(BTr, {\n staticClass: 'b-table-details',\n class: [userDetailsTrClasses],\n props: {\n variant: item[FIELD_KEY_ROW_VARIANT] || null\n },\n attrs: _objectSpread(_objectSpread({}, userDetailsTrAttrs), {}, {\n // Users cannot override the following attributes\n id: detailsId,\n tabindex: '-1'\n }),\n key: \"__b-table-details__\".concat(rowKey)\n }, [$details]));\n } else if (hasDetailsSlot) {\n // Only add the placeholder if a the table has a row-details slot defined (but not shown)\n $rows.push(h());\n\n if (striped) {\n // Add extra placeholder if table is striped\n $rows.push(h());\n }\n } // Return the row(s)\n\n\n return $rows;\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_CONTEXTMENU, EVENT_NAME_ROW_DBLCLICKED, EVENT_NAME_ROW_MIDDLE_CLICKED } from '../../../constants/events';\nimport { CODE_DOWN, CODE_END, CODE_ENTER, CODE_HOME, CODE_SPACE, CODE_UP } from '../../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING } from '../../../constants/props';\nimport { arrayIncludes, from as arrayFrom } from '../../../utils/array';\nimport { attemptFocus, closest, isActiveElement, isElement } from '../../../utils/dom';\nimport { stopEvent } from '../../../utils/events';\nimport { sortKeys } from '../../../utils/object';\nimport { makeProp, pluckProps } from '../../../utils/props';\nimport { BTbody, props as BTbodyProps } from '../tbody';\nimport { filterEvent } from './filter-event';\nimport { textSelectionActive } from './text-selection-active';\nimport { tbodyRowMixin, props as tbodyRowProps } from './mixin-tbody-row'; // --- Helper methods ---\n\nvar getCellSlotName = function getCellSlotName(value) {\n return \"cell(\".concat(value || '', \")\");\n}; // --- Props ---\n\n\nexport var props = sortKeys(_objectSpread(_objectSpread(_objectSpread({}, BTbodyProps), tbodyRowProps), {}, {\n tbodyClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n})); // --- Mixin ---\n// @vue/component\n\nexport var tbodyMixin = Vue.extend({\n mixins: [tbodyRowMixin],\n props: props,\n beforeDestroy: function beforeDestroy() {\n this.$_bodyFieldSlotNameCache = null;\n },\n methods: {\n // Returns all the item TR elements (excludes detail and spacer rows)\n // `this.$refs['item-rows']` is an array of item TR components/elements\n // Rows should all be `` components, but we map to TR elements\n // Also note that `this.$refs['item-rows']` may not always be in document order\n getTbodyTrs: function getTbodyTrs() {\n var $refs = this.$refs;\n var tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;\n var trs = ($refs['item-rows'] || []).map(function (tr) {\n return tr.$el || tr;\n });\n return tbody && tbody.children && tbody.children.length > 0 && trs && trs.length > 0 ? arrayFrom(tbody.children).filter(function (tr) {\n return arrayIncludes(trs, tr);\n }) :\n /* istanbul ignore next */\n [];\n },\n // Returns index of a particular TBODY item TR\n // We set `true` on closest to include self in result\n getTbodyTrIndex: function getTbodyTrIndex(el) {\n /* istanbul ignore next: should not normally happen */\n if (!isElement(el)) {\n return -1;\n }\n\n var tr = el.tagName === 'TR' ? el : closest('tr', el, true);\n return tr ? this.getTbodyTrs().indexOf(tr) : -1;\n },\n // Emits a row event, with the item object, row index and original event\n emitTbodyRowEvent: function emitTbodyRowEvent(type, event) {\n if (type && this.hasListener(type) && event && event.target) {\n var rowIndex = this.getTbodyTrIndex(event.target);\n\n if (rowIndex > -1) {\n // The array of TRs correlate to the `computedItems` array\n var item = this.computedItems[rowIndex];\n this.$emit(type, item, rowIndex, event);\n }\n }\n },\n tbodyRowEvtStopped: function tbodyRowEvtStopped(event) {\n return this.stopIfBusy && this.stopIfBusy(event);\n },\n // Delegated row event handlers\n onTbodyRowKeydown: function onTbodyRowKeydown(event) {\n // Keyboard navigation and row click emulation\n var target = event.target,\n keyCode = event.keyCode;\n\n if (this.tbodyRowEvtStopped(event) || target.tagName !== 'TR' || !isActiveElement(target) || target.tabIndex !== 0) {\n // Early exit if not an item row TR\n return;\n }\n\n if (arrayIncludes([CODE_ENTER, CODE_SPACE], keyCode)) {\n // Emulated click for keyboard users, transfer to click handler\n stopEvent(event);\n this.onTBodyRowClicked(event);\n } else if (arrayIncludes([CODE_UP, CODE_DOWN, CODE_HOME, CODE_END], keyCode)) {\n // Keyboard navigation\n var rowIndex = this.getTbodyTrIndex(target);\n\n if (rowIndex > -1) {\n stopEvent(event);\n var trs = this.getTbodyTrs();\n var shift = event.shiftKey;\n\n if (keyCode === CODE_HOME || shift && keyCode === CODE_UP) {\n // Focus first row\n attemptFocus(trs[0]);\n } else if (keyCode === CODE_END || shift && keyCode === CODE_DOWN) {\n // Focus last row\n attemptFocus(trs[trs.length - 1]);\n } else if (keyCode === CODE_UP && rowIndex > 0) {\n // Focus previous row\n attemptFocus(trs[rowIndex - 1]);\n } else if (keyCode === CODE_DOWN && rowIndex < trs.length - 1) {\n // Focus next row\n attemptFocus(trs[rowIndex + 1]);\n }\n }\n }\n },\n onTBodyRowClicked: function onTBodyRowClicked(event) {\n // Don't emit event when the table is busy, the user clicked\n // on a non-disabled control or is selecting text\n if (this.tbodyRowEvtStopped(event) || filterEvent(event) || textSelectionActive(this.$el)) {\n return;\n }\n\n this.emitTbodyRowEvent(EVENT_NAME_ROW_CLICKED, event);\n },\n onTbodyRowMiddleMouseRowClicked: function onTbodyRowMiddleMouseRowClicked(event) {\n if (!this.tbodyRowEvtStopped(event) && event.which === 2) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_MIDDLE_CLICKED, event);\n }\n },\n onTbodyRowContextmenu: function onTbodyRowContextmenu(event) {\n if (!this.tbodyRowEvtStopped(event)) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_CONTEXTMENU, event);\n }\n },\n onTbodyRowDblClicked: function onTbodyRowDblClicked(event) {\n if (!this.tbodyRowEvtStopped(event) && !filterEvent(event)) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_DBLCLICKED, event);\n }\n },\n // Render the tbody element and children\n // Note:\n // Row hover handlers are handled by the tbody-row mixin\n // As mouseenter/mouseleave events do not bubble\n renderTbody: function renderTbody() {\n var _this = this;\n\n var items = this.computedItems,\n renderBusy = this.renderBusy,\n renderTopRow = this.renderTopRow,\n renderEmpty = this.renderEmpty,\n renderBottomRow = this.renderBottomRow;\n var h = this.$createElement;\n var hasRowClickHandler = this.hasListener(EVENT_NAME_ROW_CLICKED) || this.hasSelectableRowClick; // Prepare the tbody rows\n\n var $rows = []; // Add the item data rows or the busy slot\n\n var $busy = renderBusy ? renderBusy() : null;\n\n if ($busy) {\n // If table is busy and a busy slot, then return only the busy \"row\" indicator\n $rows.push($busy);\n } else {\n // Table isn't busy, or we don't have a busy slot\n // Create a slot cache for improved performance when looking up cell slot names\n // Values will be keyed by the field's `key` and will store the slot's name\n // Slots could be dynamic (i.e. `v-if`), so we must compute on each render\n // Used by tbody-row mixin render helper\n var cache = {};\n var defaultSlotName = getCellSlotName();\n defaultSlotName = this.hasNormalizedSlot(defaultSlotName) ? defaultSlotName : null;\n this.computedFields.forEach(function (field) {\n var key = field.key;\n var slotName = getCellSlotName(key);\n var lowercaseSlotName = getCellSlotName(key.toLowerCase());\n cache[key] = _this.hasNormalizedSlot(slotName) ? slotName : _this.hasNormalizedSlot(lowercaseSlotName) ?\n /* istanbul ignore next */\n lowercaseSlotName : defaultSlotName;\n }); // Created as a non-reactive property so to not trigger component updates\n // Must be a fresh object each render\n\n this.$_bodyFieldSlotNameCache = cache; // Add static top row slot (hidden in visibly stacked mode\n // as we can't control `data-label` attr)\n\n $rows.push(renderTopRow ? renderTopRow() : h()); // Render the rows\n\n items.forEach(function (item, rowIndex) {\n // Render the individual item row (rows if details slot)\n $rows.push(_this.renderTbodyRow(item, rowIndex));\n }); // Empty items / empty filtered row slot (only shows if `items.length < 1`)\n\n $rows.push(renderEmpty ? renderEmpty() : h()); // Static bottom row slot (hidden in visibly stacked mode\n // as we can't control `data-label` attr)\n\n $rows.push(renderBottomRow ? renderBottomRow() : h());\n } // Note: these events will only emit if a listener is registered\n\n\n var handlers = {\n auxclick: this.onTbodyRowMiddleMouseRowClicked,\n // TODO:\n // Perhaps we do want to automatically prevent the\n // default context menu from showing if there is a\n // `row-contextmenu` listener registered\n contextmenu: this.onTbodyRowContextmenu,\n // The following event(s) is not considered A11Y friendly\n dblclick: this.onTbodyRowDblClicked // Hover events (`mouseenter`/`mouseleave`) are handled by `tbody-row` mixin\n\n }; // Add in click/keydown listeners if needed\n\n if (hasRowClickHandler) {\n handlers.click = this.onTBodyRowClicked;\n handlers.keydown = this.onTbodyRowKeydown;\n } // Assemble rows into the tbody\n\n\n var $tbody = h(BTbody, {\n class: this.tbodyClass || null,\n props: pluckProps(BTbodyProps, this.$props),\n // BTbody transfers all native event listeners to the root element\n // TODO: Only set the handlers if the table is not busy\n on: handlers,\n ref: 'tbody'\n }, $rows); // Return the assembled tbody\n\n return $tbody;\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TFOOT } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Supported values: 'lite', 'dark', or null\n footVariant: makeProp(PROP_TYPE_STRING)\n}, NAME_TFOOT); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTfoot = /*#__PURE__*/Vue.extend({\n name: NAME_TFOOT,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isTfoot: function isTfoot() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return false;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n tfootClasses: function tfootClasses() {\n return [this.footVariant ? \"thead-\".concat(this.footVariant) : null];\n },\n tfootAttrs: function tfootAttrs() {\n return _objectSpread(_objectSpread({}, this.bvAttrs), {}, {\n role: 'rowgroup'\n });\n }\n },\n render: function render(h) {\n return h('tfoot', {\n class: this.tfootClasses,\n attrs: this.tfootAttrs,\n // Pass down any native listeners\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_CUSTOM_FOOT } from '../../../constants/slots';\nimport { makeProp } from '../../../utils/props';\nimport { BTfoot } from '../tfoot'; // --- Props ---\n\nexport var props = {\n footClone: makeProp(PROP_TYPE_BOOLEAN, false),\n // Any Bootstrap theme variant (or custom)\n // Falls back to `headRowVariant`\n footRowVariant: makeProp(PROP_TYPE_STRING),\n // 'dark', 'light', or `null` (or custom)\n footVariant: makeProp(PROP_TYPE_STRING),\n tfootClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tfootTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var tfootMixin = Vue.extend({\n props: props,\n methods: {\n renderTFootCustom: function renderTFootCustom() {\n var h = this.$createElement;\n\n if (this.hasNormalizedSlot(SLOT_NAME_CUSTOM_FOOT)) {\n return h(BTfoot, {\n class: this.tfootClass || null,\n props: {\n footVariant: this.footVariant || this.headVariant || null\n },\n key: 'bv-tfoot-custom'\n }, this.normalizeSlot(SLOT_NAME_CUSTOM_FOOT, {\n items: this.computedItems.slice(),\n fields: this.computedFields.slice(),\n columns: this.computedFields.length\n }));\n }\n\n return h();\n },\n renderTfoot: function renderTfoot() {\n // Passing true to renderThead will make it render a tfoot\n return this.footClone ? this.renderThead(true) : this.renderTFootCustom();\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_THEAD } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Also sniffed by `` / `` / ``\n // Supported values: 'lite', 'dark', or `null`\n headVariant: makeProp(PROP_TYPE_STRING)\n}, NAME_THEAD); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BThead = /*#__PURE__*/Vue.extend({\n name: NAME_THEAD,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isThead: function isThead() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky headers only apply to cells in table `thead`\n isStickyHeader: function isStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n theadClasses: function theadClasses() {\n return [this.headVariant ? \"thead-\".concat(this.headVariant) : null];\n },\n theadAttrs: function theadAttrs() {\n return _objectSpread({\n role: 'rowgroup'\n }, this.bvAttrs);\n }\n },\n render: function render(h) {\n return h('thead', {\n class: this.theadClasses,\n attrs: this.theadAttrs,\n // Pass down any native listeners\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_HEAD_CLICKED } from '../../../constants/events';\nimport { CODE_ENTER, CODE_SPACE } from '../../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_THEAD_TOP } from '../../../constants/slots';\nimport { stopEvent } from '../../../utils/events';\nimport { htmlOrText } from '../../../utils/html';\nimport { identity } from '../../../utils/identity';\nimport { isUndefinedOrNull } from '../../../utils/inspect';\nimport { noop } from '../../../utils/noop';\nimport { makeProp } from '../../../utils/props';\nimport { startCase } from '../../../utils/string';\nimport { BThead } from '../thead';\nimport { BTfoot } from '../tfoot';\nimport { BTr } from '../tr';\nimport { BTh } from '../th';\nimport { filterEvent } from './filter-event';\nimport { textSelectionActive } from './text-selection-active'; // --- Helper methods ---\n\nvar getHeadSlotName = function getHeadSlotName(value) {\n return \"head(\".concat(value || '', \")\");\n};\n\nvar getFootSlotName = function getFootSlotName(value) {\n return \"foot(\".concat(value || '', \")\");\n}; // --- Props ---\n\n\nexport var props = {\n // Any Bootstrap theme variant (or custom)\n headRowVariant: makeProp(PROP_TYPE_STRING),\n // 'light', 'dark' or `null` (or custom)\n headVariant: makeProp(PROP_TYPE_STRING),\n theadClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n theadTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var theadMixin = Vue.extend({\n props: props,\n methods: {\n fieldClasses: function fieldClasses(field) {\n // Header field (
) classes\n return [field.class ? field.class : '', field.thClass ? field.thClass : ''];\n },\n headClicked: function headClicked(event, field, isFoot) {\n if (this.stopIfBusy && this.stopIfBusy(event)) {\n // If table is busy (via provider) then don't propagate\n return;\n } else if (filterEvent(event)) {\n // Clicked on a non-disabled control so ignore\n return;\n } else if (textSelectionActive(this.$el)) {\n // User is selecting text, so ignore\n\n /* istanbul ignore next: JSDOM doesn't support getSelection() */\n return;\n }\n\n stopEvent(event);\n this.$emit(EVENT_NAME_HEAD_CLICKED, field.key, field, event, isFoot);\n },\n renderThead: function renderThead() {\n var _this = this;\n\n var isFoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var fields = this.computedFields,\n isSortable = this.isSortable,\n isSelectable = this.isSelectable,\n headVariant = this.headVariant,\n footVariant = this.footVariant,\n headRowVariant = this.headRowVariant,\n footRowVariant = this.footRowVariant;\n var h = this.$createElement; // In always stacked mode, we don't bother rendering the head/foot\n // Or if no field headings (empty table)\n\n if (this.isStackedAlways || fields.length === 0) {\n return h();\n }\n\n var hasHeadClickListener = isSortable || this.hasListener(EVENT_NAME_HEAD_CLICKED); // Reference to `selectAllRows` and `clearSelected()`, if table is selectable\n\n var selectAllRows = isSelectable ? this.selectAllRows : noop;\n var clearSelected = isSelectable ? this.clearSelected : noop; // Helper function to generate a field
cell\n\n var makeCell = function makeCell(field, colIndex) {\n var label = field.label,\n labelHtml = field.labelHtml,\n variant = field.variant,\n stickyColumn = field.stickyColumn,\n key = field.key;\n var ariaLabel = null;\n\n if (!field.label.trim() && !field.headerTitle) {\n // In case field's label and title are empty/blank\n // We need to add a hint about what the column is about for non-sighted users\n\n /* istanbul ignore next */\n ariaLabel = startCase(field.key);\n }\n\n var on = {};\n\n if (hasHeadClickListener) {\n on.click = function (event) {\n _this.headClicked(event, field, isFoot);\n };\n\n on.keydown = function (event) {\n var keyCode = event.keyCode;\n\n if (keyCode === CODE_ENTER || keyCode === CODE_SPACE) {\n _this.headClicked(event, field, isFoot);\n }\n };\n }\n\n var sortAttrs = isSortable ? _this.sortTheadThAttrs(key, field, isFoot) : {};\n var sortClass = isSortable ? _this.sortTheadThClasses(key, field, isFoot) : null;\n var sortLabel = isSortable ? _this.sortTheadThLabel(key, field, isFoot) : null;\n var data = {\n class: [_this.fieldClasses(field), sortClass],\n props: {\n variant: variant,\n stickyColumn: stickyColumn\n },\n style: field.thStyle || {},\n attrs: _objectSpread(_objectSpread({\n // We only add a `tabindex` of `0` if there is a head-clicked listener\n // and the current field is sortable\n tabindex: hasHeadClickListener && field.sortable ? '0' : null,\n abbr: field.headerAbbr || null,\n title: field.headerTitle || null,\n 'aria-colindex': colIndex + 1,\n 'aria-label': ariaLabel\n }, _this.getThValues(null, key, field.thAttr, isFoot ? 'foot' : 'head', {})), sortAttrs),\n on: on,\n key: key\n }; // Handle edge case where in-document templates are used with new\n // `v-slot:name` syntax where the browser lower-cases the v-slot's\n // name (attributes become lower cased when parsed by the browser)\n // We have replaced the square bracket syntax with round brackets\n // to prevent confusion with dynamic slot names\n\n var slotNames = [getHeadSlotName(key), getHeadSlotName(key.toLowerCase()), getHeadSlotName()]; // Footer will fallback to header slot names\n\n if (isFoot) {\n slotNames = [getFootSlotName(key), getFootSlotName(key.toLowerCase()), getFootSlotName()].concat(_toConsumableArray(slotNames));\n }\n\n var scope = {\n label: label,\n column: key,\n field: field,\n isFoot: isFoot,\n // Add in row select methods\n selectAllRows: selectAllRows,\n clearSelected: clearSelected\n };\n var $content = _this.normalizeSlot(slotNames, scope) || h('div', {\n domProps: htmlOrText(labelHtml, label)\n });\n var $srLabel = sortLabel ? h('span', {\n staticClass: 'sr-only'\n }, \" (\".concat(sortLabel, \")\")) : null; // Return the header cell\n\n return h(BTh, data, [$content, $srLabel].filter(identity));\n }; // Generate the array of
cells\n\n\n var $cells = fields.map(makeCell).filter(identity); // Generate the row(s)\n\n var $trs = [];\n\n if (isFoot) {\n $trs.push(h(BTr, {\n class: this.tfootTrClass,\n props: {\n variant: isUndefinedOrNull(footRowVariant) ? headRowVariant :\n /* istanbul ignore next */\n footRowVariant\n }\n }, $cells));\n } else {\n var scope = {\n columns: fields.length,\n fields: fields,\n // Add in row select methods\n selectAllRows: selectAllRows,\n clearSelected: clearSelected\n };\n $trs.push(this.normalizeSlot(SLOT_NAME_THEAD_TOP, scope) || h());\n $trs.push(h(BTr, {\n class: this.theadTrClass,\n props: {\n variant: headRowVariant\n }\n }, $cells));\n }\n\n return h(isFoot ? BTfoot : BThead, {\n class: (isFoot ? this.tfootClass : this.theadClass) || null,\n props: isFoot ? {\n footVariant: footVariant || headVariant || null\n } : {\n headVariant: headVariant || null\n },\n key: isFoot ? 'bv-tfoot' : 'bv-thead'\n }, $trs);\n }\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_TOP_ROW } from '../../../constants/slots';\nimport { isFunction } from '../../../utils/inspect';\nimport { BTr } from '../tr'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var topRowMixin = Vue.extend({\n methods: {\n renderTopRow: function renderTopRow() {\n var fields = this.computedFields,\n stacked = this.stacked,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Add static Top Row slot (hidden in visibly stacked mode as we can't control the data-label)\n // If in *always* stacked mode, we don't bother rendering the row\n\n if (!this.hasNormalizedSlot(SLOT_NAME_TOP_ROW) || stacked === true || stacked === '') {\n return h();\n }\n\n return h(BTr, {\n staticClass: 'b-table-top-row',\n class: [isFunction(tbodyTrClass) ? tbodyTrClass(null, 'row-top') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ? tbodyTrAttr(null, 'row-top') : tbodyTrAttr,\n key: 'b-top-row'\n }, [this.normalizeSlot(SLOT_NAME_TOP_ROW, {\n columns: fields.length,\n fields: fields\n })]);\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TABLE } from '../../constants/components';\nimport { sortKeys } from '../../utils/object';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { hasListenerMixin } from '../../mixins/has-listener';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { bottomRowMixin, props as bottomRowProps } from './helpers/mixin-bottom-row';\nimport { busyMixin, props as busyProps } from './helpers/mixin-busy';\nimport { captionMixin, props as captionProps } from './helpers/mixin-caption';\nimport { colgroupMixin, props as colgroupProps } from './helpers/mixin-colgroup';\nimport { emptyMixin, props as emptyProps } from './helpers/mixin-empty';\nimport { filteringMixin, props as filteringProps } from './helpers/mixin-filtering';\nimport { itemsMixin, props as itemsProps } from './helpers/mixin-items';\nimport { paginationMixin, props as paginationProps } from './helpers/mixin-pagination';\nimport { providerMixin, props as providerProps } from './helpers/mixin-provider';\nimport { selectableMixin, props as selectableProps } from './helpers/mixin-selectable';\nimport { sortingMixin, props as sortingProps } from './helpers/mixin-sorting';\nimport { stackedMixin, props as stackedProps } from './helpers/mixin-stacked';\nimport { tableRendererMixin, props as tableRendererProps } from './helpers/mixin-table-renderer';\nimport { tbodyMixin, props as tbodyProps } from './helpers/mixin-tbody';\nimport { tfootMixin, props as tfootProps } from './helpers/mixin-tfoot';\nimport { theadMixin, props as theadProps } from './helpers/mixin-thead';\nimport { topRowMixin, props as topRowProps } from './helpers/mixin-top-row'; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), bottomRowProps), busyProps), captionProps), colgroupProps), emptyProps), filteringProps), itemsProps), paginationProps), providerProps), selectableProps), sortingProps), stackedProps), tableRendererProps), tbodyProps), tfootProps), theadProps), topRowProps)), NAME_TABLE); // --- Main component ---\n// @vue/component\n\nexport var BTable = /*#__PURE__*/Vue.extend({\n name: NAME_TABLE,\n // Order of mixins is important!\n // They are merged from first to last, followed by this component\n mixins: [// General mixins\n attrsMixin, hasListenerMixin, idMixin, normalizeSlotMixin, // Required table mixins\n itemsMixin, tableRendererMixin, stackedMixin, theadMixin, tfootMixin, tbodyMixin, // Table features mixins\n stackedMixin, filteringMixin, sortingMixin, paginationMixin, captionMixin, colgroupMixin, selectableMixin, emptyMixin, topRowMixin, bottomRowMixin, busyMixin, providerMixin],\n props: props // Render function is provided by `tableRendererMixin`\n\n});","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',_vm._g(_vm._b({attrs:{\"no-body\":\"\"}},'b-card',_vm.cardAttrs,false),_vm.$listeners),[_c('div',{staticClass:\"card-header\"},[_c('div',[_c('b-card-title',[_vm._v(_vm._s(_vm.$attrs.title))]),(_vm.$attrs['sub-title'])?_c('b-card-sub-title',[_vm._v(\" \"+_vm._s(_vm.$attrs['sub-title'])+\" \")]):_vm._e()],1),_c('i',{staticClass:\"code-toggler feather icon-code cursor-pointer\",attrs:{\"aria-expanded\":!_vm.code_visible ? 'true' : 'false',\"aria-controls\":_vm.parentID},on:{\"click\":function($event){_vm.code_visible = !_vm.code_visible}}})]),(_vm.$attrs['no-body'] !== undefined)?[_vm._t(\"default\"),_c('b-collapse',{staticClass:\"card-code\",attrs:{\"id\":_vm.parentID,\"visible\":_vm.code_visible},model:{value:(_vm.code_visible),callback:function ($$v) {_vm.code_visible=$$v},expression:\"code_visible\"}},[_c('b-card-body',[_c('prism',{attrs:{\"language\":_vm.codeLanguage}},[_vm._t(\"code\")],2)],1)],1)]:_c('b-card-body',[_vm._t(\"default\"),_c('b-collapse',{staticClass:\"card-code\",attrs:{\"id\":_vm.parentID,\"visible\":_vm.code_visible},model:{value:(_vm.code_visible),callback:function ($$v) {_vm.code_visible=$$v},expression:\"code_visible\"}},[_c('div',{staticClass:\"p-1\"}),_c('prism',{attrs:{\"language\":_vm.codeLanguage}},[_vm._t(\"code\")],2)],1)],2)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\n \r\n