diff --git a/README.md b/README.md index bc58391..02fcd3c 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,15 @@ BootstrapVue Editable Table provides new features to [BootstrapVue Table](https://bootstrap-vue.org/docs/components/table) that easily enable cell/row editing, input validation, and other gems while keeping existing functionalities of the original table intact! -* [Get Started](https://b-editable-table.muhimasri.com) -* **Examples on CodeSandbox**: - * [Edit Cell](https://codesandbox.io/s/bootstrap-vue-editable-table-wx012?file=/src/App.vue) - * [Edit Row](https://codesandbox.io/s/bootstrap-vue-row-editing-7w1scn?file=/src/App.vue) - * [Add, Update and Remove Rows](https://codesandbox.io/s/vue-add-remove-table-rows-chtnj?file=/src/App.vue) - * [Input Validation](https://codesandbox.io/s/vue-table-validation-pcysqz?file=/src/App.vue) - * [Load Data via Rest API](https://codesandbox.io/s/vue-table-load-data-api-cub6i) +- **Get Started**: + - [Setup](https://b-editable-table.muhimasri.com/guide/) + - [Basic Usage](https://b-editable-table.muhimasri.com/guide/basic-usage.html) + - [Playground](https://b-editable-table.muhimasri.com/) +- **Code Examples**: + - [Edit Cell](https://b-editable-table.muhimasri.com/guide/basic-usage.html) + - [Edit Row](https://b-editable-table.muhimasri.com/guide/row-editing.html) + - [Add, Update and Remove Rows](https://b-editable-table.muhimasri.com/guide/add-update-and-remove-rows.html) + - [Input Validation](https://b-editable-table.muhimasri.com/guide/input-validation.html) + - [Load Data via Rest API](https://b-editable-table.muhimasri.com/guide/load-data-via-rest-api.html) -![Demo](https://github.com/muhimasri/b-editable-table/blob/main/images/demo.gif) \ No newline at end of file +![Demo](https://github.com/muhimasri/b-editable-table/blob/main/images/demo.gif) diff --git a/dist/b-editable-table.esm.js b/dist/b-editable-table.esm.js index 848329b..25970bc 100644 --- a/dist/b-editable-table.esm.js +++ b/dist/b-editable-table.esm.js @@ -49,7 +49,6 @@ IS_BROWSER && 'IntersectionObserver' in WINDOW && 'IntersectionObserverEntry' in 'intersectionRatio' in WINDOW.IntersectionObserverEntry.prototype; var PROP_NAME = '$bvConfig'; -var DEFAULT_BREAKPOINT = ['xs', 'sm', 'md', 'lg', 'xl']; // --- General --- var RX_ARRAY_NOTATION = /\[(\d+)]/g; @@ -230,9 +229,6 @@ function _defineProperty$G(obj, key, value) { if (key in obj) { Object.definePro var assign = function assign() { return Object.assign.apply(Object, arguments); }; -var create = function create(proto, optionalProps) { - return Object.create(proto, optionalProps); -}; var defineProperties = function defineProperties(obj, props) { return Object.defineProperties(obj, props); }; @@ -844,18 +840,6 @@ var attemptBlur = function attemptBlur(el) { return !isActiveElement(el); }; -var memoize = function memoize(fn) { - var cache = create(null); - return function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var argsKey = JSON.stringify(args); - return cache[argsKey] = cache[argsKey] || fn.apply(null, args); - }; -}; - var VueProto = Vue.prototype; // --- Getter methods --- var getConfigValue = function getConfigValue(key) { @@ -872,26 +856,6 @@ var getComponentConfig = function getComponentConfig(key) { return propKey ? getConfigValue("".concat(key, ".").concat(propKey), defaultValue) : getConfigValue(key, {}); }; // Get all breakpoint names -var getBreakpoints = function getBreakpoints() { - return getConfigValue('breakpoints', DEFAULT_BREAKPOINT); -}; // Private method for caching breakpoint names - -var _getBreakpointsCached = memoize(function () { - return getBreakpoints(); -}); // Get all breakpoint names (cached) - - -var getBreakpointsCached = function getBreakpointsCached() { - return cloneDeep(_getBreakpointsCached()); -}; // Get breakpoints with the smallest breakpoint set as '' -// Useful for components that create breakpoint specific props - -memoize(function () { - var breakpoints = getBreakpointsCached(); - breakpoints[0] = ''; - return breakpoints; -}); // Get breakpoints with the largest breakpoint set as '' - function ownKeys$x(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; } function _objectSpread$x(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$x(Object(source), true).forEach(function (key) { _defineProperty$E(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$x(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -5947,8 +5911,6 @@ Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; Popper.placements = placements; Popper.Defaults = Defaults; -var Popper$1 = Popper; - var PLACEMENT_TOP_START = 'top-start'; var PLACEMENT_TOP_END = 'top-end'; var PLACEMENT_BOTTOM_START = 'bottom-start'; @@ -6281,7 +6243,7 @@ var dropdownMixin = Vue.extend({ if (!this.inNavbar) { - if (typeof Popper$1 === 'undefined') { + if (typeof Popper === 'undefined') { /* istanbul ignore next */ warn('Popper.js not found. Falling back to CSS positioning', NAME_DROPDOWN); } else { @@ -6315,7 +6277,7 @@ var dropdownMixin = Vue.extend({ }, createPopper: function createPopper(element) { this.destroyPopper(); - this.$_popper = new Popper$1(element, this.$refs.menu, this.getPopperConfig()); + this.$_popper = new Popper(element, this.$refs.menu, this.getPopperConfig()); }, // Ensure popper event listeners are removed cleanly destroyPopper: function destroyPopper() { @@ -9043,7 +9005,7 @@ var BVPopper = /*#__PURE__*/Vue.extend({ this.destroyPopper(); // We use `el` rather than `this.$el` just in case the original // mountpoint root element type was changed by the template - this.$_popper = new Popper$1(this.target, el, this.popperConfig); + this.$_popper = new Popper(this.target, el, this.popperConfig); }, destroyPopper: function destroyPopper() { this.$_popper && this.$_popper.destroy(); @@ -14436,8 +14398,6 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({ staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined); -var component = __vue_component__; - // Import vue component // Default export is installable instance of component. @@ -14445,7 +14405,7 @@ var component = __vue_component__; // to be registered via Vue.use() as well as Vue.component(), var entry_esm = /*#__PURE__*/(() => { // Assign InstallableComponent type - const installable = component; // Attach install function executed by Vue.use() + const installable = __vue_component__; // Attach install function executed by Vue.use() installable.install = Vue => { Vue.component('BEditableTable', installable); @@ -14456,4 +14416,4 @@ var entry_esm = /*#__PURE__*/(() => { // also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; // export const RollupDemoDirective = directive; -export { entry_esm as default }; +export default entry_esm; diff --git a/dist/b-editable-table.min.js b/dist/b-editable-table.min.js index a078317..77f253e 100644 --- a/dist/b-editable-table.min.js +++ b/dist/b-editable-table.min.js @@ -1 +1,12221 @@ -var BEditableTable=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);n]+)>)/gi,x=/\B([A-Z])/g,$=/([a-z])([A-Z])/g,E=/^[0-9]*\.?[0-9]+$/,F=/[-/\\^$*+?.()|[\]{}]/g,I=/[\s\uFEFF\xA0]+/g,M=/(\s|^)(\w)/g,_=/_/g,L=/-(\w)/g,R=/^\d+-\d\d?-\d\d?(?:\s|T|$)/,V=/-|\s|T/,A=/%2C/g,B=/[!'()*]/g,H=/^BIcon/,N=/-u-.+/;function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function Y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&J(t,e)}function W(t){var e=X();return function(){var n,i=Z(t);if(e){var r=Z(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return U(this,n)}}function U(t,e){return!e||"object"!==z(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function q(t){var e="function"==typeof Map?new Map:void 0;return q=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return K(t,arguments,Z(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),J(i,t)},q(t)}function K(t,e,n){return K=X()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&J(r,n.prototype),r},K.apply(null,arguments)}function X(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function J(t,e){return J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},J(t,e)}function Z(t){return Z=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Z(t)}var Q=b?g.Element:function(t){G(n,t);var e=W(n);function n(){return Y(this,n),e.apply(this,arguments)}return n}(q(Object)),tt=b?g.HTMLElement:function(t){G(n,t);var e=W(n);function n(){return Y(this,n),e.apply(this,arguments)}return n}(Q),et=b?g.SVGElement:function(t){G(n,t);var e=W(n);function n(){return Y(this,n),e.apply(this,arguments)}return n}(Q);function nt(t){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt(t)}b&&g.File;var it=function(t){return nt(t)},rt=function(t){return void 0===t},ot=function(t){return null===t},at=function(t){return rt(t)||ot(t)},st=function(t){return"function"===it(t)},lt=function(t){return"boolean"===it(t)},ct=function(t){return"string"===it(t)},ut=function(t){return"number"===it(t)},dt=function(t){return Array.isArray(t)},ht=function(t){return null!==t&&"object"===nt(t)},ft=function(t){return"[object Object]"===Object.prototype.toString.call(t)},pt=function(t){return t instanceof Date},bt=function(t){return t instanceof Event},mt=function(t){return"RegExp"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)};function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function yt(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:e;return dt(e)?e.reduce((function(e,n){return[].concat(It(e),[t(n,n)])}),[]):ft(e)?St(e).reduce((function(n,i){return Et(Et({},n),{},Ft({},i,t(e[i],e[i])))}),{}):n},Lt=function(t){return t},Rt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!(e=dt(e)?e.join("."):e)||!ht(t))return n;if(e in t)return t[e];var i=(e=String(e).replace(k,".$1")).split(".").filter(Lt);return 0===i.length?n:i.every((function(e){return ht(t)&&e in t&&!at(t=t[e])}))?t:ot(t)?null:n},Vt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=Rt(t,e);return at(i)?n:i},At=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="undefined"!=typeof process&&process&&process.env||{};return t?n[t]||e:n},Bt=function(){return At("BOOTSTRAP_VUE_NO_WARN")||"production"===At("NODE_ENV")},Ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Bt()||console.warn("[BootstrapVue warn]: ".concat(e?"".concat(e," - "):"").concat(t))},Nt="BButton",zt="BCalendar",Yt="BDropdown",Gt="BFormCheckbox",Wt="BFormDatepicker",Ut="BFormInput",qt="BFormRating",Kt="BFormSelect",Xt="BFormSelectOption",Jt="BFormSelectOptionGroup",Zt="BIcon",Qt="BLink",te="BTable",ee="BTableCell",ne="BTbody",ie="BTfoot",re="BThead",oe="BTooltip",ae="change",se="click",le="close",ce="context",ue="context-changed",de="disable",he="disabled",fe="enable",pe="enabled",be="filtered",me="focusin",ve="focusout",ye="head-clicked",ge="hidden",Oe="hide",we="input",Te="mouseenter",Se="mouseleave",je="open",ke="refreshed",Pe="row-clicked",De="selected",Ce="show",xe="shown",$e="hook:beforeDestroy",Ee="hook:destroyed",Fe="bv",Ie={passive:!0,capture:!1},Me=void 0,_e=Array,Le=Boolean,Re=Date,Ve=Function,Ae=Number,Be=Object,He=RegExp,Ne=String,ze=[_e,Ve],Ye=[_e,Be],Ge=[_e,Be,Ne],We=[_e,Ne],Ue=[Le,Ne],qe=[Re,Ne],Ke=[Ae,Ne],Xe=[Ae,Be,Ne],Je=[Be,Ve],Ze=[Be,Ne],Qe="bottom-row",tn="button-content",en="custom-foot",nn="default",rn="first",on="row-details",an="table-busy",sn="table-caption",ln="table-colgroup",cn="thead-top",un="top-row",dn=function(){return Array.from.apply(Array,arguments)},hn=function(t,e){return-1!==t.indexOf(e)},fn=function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:NaN,n=parseInt(t,10);return isNaN(n)?e:n},bn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,n=parseFloat(t);return isNaN(n)?e:n},mn=function(t){return t.replace(x,"-$1").toLowerCase()},vn=function(t){return(t=mn(t).replace(L,(function(t,e){return e?e.toUpperCase():""}))).charAt(0).toUpperCase()+t.slice(1)},yn=function(t){return t.replace(_," ").replace($,(function(t,e,n){return e+" "+n})).replace(M,(function(t,e,n){return e+n.toUpperCase()}))},gn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return at(t)?"":dt(t)||ft(t)&&t.toString===Object.prototype.toString?JSON.stringify(t,null,e):String(t)},On=function(t){return gn(t).trim()},wn=Q.prototype,Tn=wn.matches||wn.msMatchesSelector||wn.webkitMatchesSelector,Sn=wn.closest||function(t){var e=this;do{if($n(e,t))return e;e=e.parentElement||e.parentNode}while(!ot(e)&&e.nodeType===Node.ELEMENT_NODE);return null},jn=g.requestAnimationFrame||g.webkitRequestAnimationFrame||g.mozRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame||function(t){return setTimeout(t,16)};g.MutationObserver||g.WebKitMutationObserver||g.MozMutationObserver;var kn=function(t){return!(!t||t.nodeType!==Node.ELEMENT_NODE)},Pn=function(t,e){return gn(t).toLowerCase()===gn(e).toLowerCase()},Dn=function(t){return kn(t)&&t===function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=O.activeElement;return e&&!t.some((function(t){return t===e}))?e:null}()},Cn=function(t){if(!kn(t)||!t.parentNode||!Fn(O.body,t))return!1;if("none"===An(t,"display"))return!1;var e=Bn(t);return!!(e&&e.height>0&&e.width>0)},xn=function(t,e){return(kn(e)?e:O).querySelector(t)||null},$n=function(t,e){return!!kn(t)&&Tn.call(t,e)},En=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!kn(e))return null;var i=Sn.call(e,t);return n?i:i===e?null:i},Fn=function(t,e){return!(!t||!st(t.contains))&&t.contains(e)},In=function(t){return O.getElementById(/^#/.test(t)?t.slice(1):t)||null},Mn=function(t,e){return!!(e&&kn(t)&&t.classList)&&t.classList.contains(e)},_n=function(t,e,n){e&&kn(t)&&t.setAttribute(e,n)},Ln=function(t,e){e&&kn(t)&&t.removeAttribute(e)},Rn=function(t,e){return e&&kn(t)?t.getAttribute(e):null},Vn=function(t,e){return e&&kn(t)?t.hasAttribute(e):null},An=function(t,e){return e&&kn(t)&&t.style[e]||null},Bn=function(t){return kn(t)?t.getBoundingClientRect():null},Hn=function(){return g.getSelection?g.getSelection():null},Nn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{t.focus(e)}catch(t){}return Dn(t)},zn=function(t){try{t.blur()}catch(t){}return!Dn(t)},Yn=function(t){var e,n,i=(e=null,Object.create(e,n));return function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:void 0,n=Gn.$bvConfig;return n?n.getConfigValue(t,e):_t(e)},Un=Yn((function(){return Wn("breakpoints",j)}));function qn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Kn(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:Me,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,r=!0===n;return i=r?i:n,Kn(Kn(Kn({},t?{type:t}:{}),r?{required:r}:rt(e)?{}:{default:ht(e)?function(){return e}:e}),rt(i)?{}:{validator:i})},Zn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Lt;return(dt(t)?t.slice():St(t)).reduce((function(t,i){return t[n(i)]=e[i],t}),{})},Qn=function(t,e,n){return Kn(Kn({},_t(t)),{},{default:function(){var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return e?Wn("".concat(t,".").concat(e),n):Wn(t,{})}(n,e,t.default);return st(i)?i():i}})},ti=function(t,e){return St(t).reduce((function(n,i){return Kn(Kn({},n),{},Xn({},i,Qn(t[i],i,e)))}),{})},ei=Qn({},"","").default.name,ni=function(t){return st(t)&&t.name!==ei};function ii(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ri=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.type,r=void 0===i?Me:i,o=e.defaultValue,a=void 0===o?void 0:o,s=e.validator,l=void 0===s?void 0:s,c=e.event,u=void 0===c?we:c,d=ii({},t,Jn(r,a,l)),h=n.default.extend({model:{prop:t,event:u},props:d});return{mixin:h,props:d,prop:t,event:u}},oi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(t=fn(t).filter(Lt)).some((function(t){return e[t]||n[t]}))},ai=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=fn(t).filter(Lt);for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:nn,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$scopedSlots,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.$slots;return oi(t,e,n)},normalizeSlot:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nn,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.$scopedSlots,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.$slots,r=ai(t,e,n,i);return r?fn(r):r}}}),li=function(t){return S?ht(t)?t:{capture:!!t||!1}:!!(ht(t)?t.capture:t)},ci=function(t,e,n,i){t&&t.addEventListener&&t.addEventListener(e,n,li(i))},ui=function(t,e,n,i){t&&t.removeEventListener&&t.removeEventListener(e,n,li(i))},di=function(t){for(var e=t?ci:ui,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.preventDefault,i=void 0===n||n,r=e.propagation,o=void 0===r||r,a=e.immediatePropagation,s=void 0!==a&&a;i&&t.preventDefault(),o&&t.stopPropagation(),s&&t.stopImmediatePropagation()},fi=function(t){return mn(t.replace(P,""))},pi=function(t,e){return[Fe,fi(t),e].join("::")},bi=function(t,e){return[Fe,e,fi(t)].join("::")};function mi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function vi(t){for(var e=1;e'),Bi=Ri("CalendarFill",''),Hi=Ri("ChevronBarLeft",''),Ni=Ri("ChevronDoubleLeft",''),zi=Ri("ChevronDown",''),Yi=Ri("ChevronLeft",''),Gi=Ri("CircleFill",''),Wi=Ri("Star",''),Ui=Ri("StarFill",''),qi=Ri("StarHalf",''),Ki=Ri("X",'');function Xi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ji(t){for(var e=1;e1?n-1:0),r=1;rt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=t.rel;return"_blank"===e&&ot(n)?"noopener":n||null}({target:this.target,rel:this.rel})},computedHref:function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.href,n=t.to,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(e)return e;if(Ci(i))return null;if(ct(n))return n||o;if(ft(n)&&(n.path||n.query||n.hash)){var a=gn(n.path),s=Di(n.query),l=gn(n.hash);return l=l&&"#"!==l.charAt(0)?"#".concat(l):l,"".concat(a).concat(s).concat(l)||o}return r}({to:this.to,href:this.href},this.computedTag)},computedProps:function(){var t=this.prefetch;return this.isRouterLink?gr(gr({},Zn(gr(gr({},Tr),Sr),this)),{},{prefetch:lt(t)?t:void 0,tag:this.routerTag}):{}},computedAttrs:function(){var t=this.bvAttrs,e=this.computedHref,n=this.computedRel,i=this.disabled,r=this.target,o=this.routerTag,a=this.isRouterLink;return gr(gr(gr(gr({},t),e?{href:e}:{}),a&&!Pn(o,"a")?{}:{rel:n,target:r}),{},{tabindex:i?"-1":rt(t.tabindex)?null:t.tabindex,"aria-disabled":i?"true":null})},computedListeners:function(){return gr(gr({},this.bvListeners),{},{click:this.onClick})}},methods:{onClick:function(t){var e=arguments,n=bt(t),i=this.isRouterLink,r=this.bvListeners.click;n&&this.disabled?hi(t,{immediatePropagation:!0}):(i&&t.currentTarget.__vue__&&t.currentTarget.__vue__.$emit(se,t),fn(r).filter((function(t){return st(t)})).forEach((function(t){t.apply(void 0,mr(e))})),this.emitOnRoot(wr,t),this.emitOnRoot("clicked::link",t)),n&&!i&&"#"===this.computedHref&&hi(t,{propagation:!1})},focus:function(){Nn(this.$el)},blur:function(){zn(this.$el)}},render:function(t){var e=this.active,n=this.disabled;return t(this.computedTag,Or({class:{active:e,disabled:n},attrs:this.computedAttrs,props:this.computedProps},this.isRouterLink?"nativeOn":"on",this.computedListeners),this.normalizeSlot())}});function Pr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Dr(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(C,"")},Hr=function(t,e){return t?{innerHTML:t}:e?{textContent:e}:{}},Nr="gregory",zr="long",Yr="short",Gr="2-digit",Wr="numeric";function Ur(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return qr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t=to(t),e=to(e)||t,n=to(n)||t,t?tn?n:t:null},bo=["ar","az","ckb","fa","he","ks","lrc","mzn","ps","sd","te","ug","ur","yi"].map((function(t){return t.toLowerCase()})),mo=function(t){var e=gn(t).toLowerCase().replace(N,"").split("-"),n=e.slice(0,2).join("-"),i=e[0];return hn(bo,n)||hn(bo,i)},vo={id:Jn(Ne)},yo=n.default.extend({props:vo,data:function(){return{localId_:null}},computed:{safeId:function(){var t=this.id||this.localId_;return function(e){return t?(e=String(e||"").replace(/\s+/g,"_"))?t+"_"+e:t:null}}},mounted:function(){var t=this;this.$nextTick((function(){t.localId_="__BVID__".concat(t._uid)}))}});function go(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Oo(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Nr;return t=fn(t).filter(Lt),new Intl.DateTimeFormat(t,{calendar:e}).resolvedOptions().locale}(fn(this.locale).filter(Lt),Nr)},computedDateDisabledFn:function(){var t=this.dateDisabledFn;return ni(t)?t:function(){return!1}},computedDateInfoFn:function(){var t=this.dateInfoFn;return ni(t)?t:function(){return{}}},calendarLocale:function(){var t=new Intl.DateTimeFormat(this.computedLocale,{calendar:Nr}),e=t.resolvedOptions().calendar,n=t.resolvedOptions().locale;return e!==Nr&&(n=n.replace(/-u-.+$/i,"").concat("-u-ca-gregory")),n},calendarYear:function(){return this.activeDate.getFullYear()},calendarMonth:function(){return this.activeDate.getMonth()},calendarFirstDay:function(){return Qr(this.calendarYear,this.calendarMonth,1,12)},calendarDaysInMonth:function(){var t=Qr(this.calendarFirstDay);return t.setMonth(t.getMonth()+1,0),t.getDate()},computedVariant:function(){return"btn-".concat(this.selectedVariant||"primary")},computedTodayVariant:function(){return"btn-outline-".concat(this.todayVariant||this.selectedVariant||"primary")},computedNavButtonVariant:function(){return"btn-outline-".concat(this.navButtonVariant||"primary")},isRTL:function(){var t=gn(this.direction).toLowerCase();return"rtl"===t||"ltr"!==t&&mo(this.computedLocale)},context:function(){var t=this.selectedYMD,e=this.activeYMD,n=to(t),i=to(e);return{selectedYMD:t,selectedDate:n,selectedFormatted:n?this.formatDateString(n):this.labelNoDateSelected,activeYMD:e,activeDate:i,activeFormatted:i?this.formatDateString(i):"",disabled:this.dateDisabled(i),locale:this.computedLocale,calendarLocale:this.calendarLocale,rtl:this.isRTL}},dateOutOfRange:function(){var t=this.computedMin,e=this.computedMax;return function(n){return n=to(n),t&&ne}},dateDisabled:function(){var t=this,e=this.dateOutOfRange;return function(n){n=to(n);var i=eo(n);return!(!e(n)&&!t.computedDateDisabledFn(i,n))}},formatDateString:function(){return no(this.calendarLocale,Oo(Oo({year:Wr,month:Gr,day:Gr},this.dateFormatOptions),{},{hour:void 0,minute:void 0,second:void 0,calendar:Nr}))},formatYearMonth:function(){return no(this.calendarLocale,{year:Wr,month:zr,calendar:Nr})},formatWeekdayName:function(){return no(this.calendarLocale,{weekday:zr,calendar:Nr})},formatWeekdayNameShort:function(){return no(this.calendarLocale,{weekday:this.weekdayHeaderFormat||Yr,calendar:Nr})},formatDay:function(){var t=new Intl.NumberFormat([this.computedLocale],{style:"decimal",minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:0,notation:"standard"});return function(e){return t.format(e.getDate())}},prevDecadeDisabled:function(){var t=this.computedMin;return this.disabled||t&&oo(ho(this.activeDate))t},nextYearDisabled:function(){var t=this.computedMax;return this.disabled||t&&ro(uo(this.activeDate))>t},nextDecadeDisabled:function(){var t=this.computedMax;return this.disabled||t&&ro(fo(this.activeDate))>t},calendar:function(){for(var t=[],e=this.calendarFirstDay,n=e.getFullYear(),i=e.getMonth(),r=this.calendarDaysInMonth,o=e.getDay(),a=0-((this.computedWeekStarts>o?7:0)-this.computedWeekStarts)-o,s=0;s<6&&a=0)return 1;return 0}();var Fo=$o&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),Eo))}};function Io(t){return t&&"[object Function]"==={}.toString.call(t)}function Mo(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function _o(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function Lo(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=Mo(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/(auto|scroll|overlay)/.test(n+r+i)?t:Lo(_o(t))}function Ro(t){return t&&t.referenceNode?t.referenceNode:t}var Vo=$o&&!(!window.MSInputMethodContext||!document.documentMode),Ao=$o&&/MSIE 10/.test(navigator.userAgent);function Bo(t){return 11===t?Vo:10===t?Ao:Vo||Ao}function Ho(t){if(!t)return document.documentElement;for(var e=Bo(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===Mo(n,"position")?Ho(n):n:t?t.ownerDocument.documentElement:document.documentElement}function No(t){return null!==t.parentNode?No(t.parentNode):t}function zo(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,r=n?e:t,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var a,s,l=o.commonAncestorContainer;if(t!==l&&e!==l||i.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&Ho(a.firstElementChild)!==a?Ho(l):l;var c=No(t);return c.host?zo(c.host,e):zo(t,No(e).host)}function Yo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var r=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||r;return o[n]}return t[n]}function Go(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Yo(e,"top"),r=Yo(e,"left"),o=n?-1:1;return t.top+=i*o,t.bottom+=i*o,t.left+=r*o,t.right+=r*o,t}function Wo(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function Uo(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],Bo(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function qo(t){var e=t.body,n=t.documentElement,i=Bo(10)&&getComputedStyle(n);return{height:Uo("Height",e,n,i),width:Uo("Width",e,n,i)}}var Ko=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Xo=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],i=Bo(10),r="HTML"===e.nodeName,o=ta(t),a=ta(e),s=Lo(t),l=Mo(e),c=parseFloat(l.borderTopWidth),u=parseFloat(l.borderLeftWidth);n&&r&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=Qo({top:o.top-a.top-c,left:o.left-a.left-u,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!i&&r){var h=parseFloat(l.marginTop),f=parseFloat(l.marginLeft);d.top-=c-h,d.bottom-=c-h,d.left-=u-f,d.right-=u-f,d.marginTop=h,d.marginLeft=f}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=Go(d,e)),d}function na(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=ea(t,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:Yo(n),s=e?0:Yo(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:r,height:o};return Qo(l)}function ia(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===Mo(t,"position"))return!0;var n=_o(t);return!!n&&ia(n)}function ra(t){if(!t||!t.parentElement||Bo())return document.documentElement;for(var e=t.parentElement;e&&"none"===Mo(e,"transform");)e=e.parentElement;return e||document.documentElement}function oa(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=r?ra(t):zo(t,Ro(e));if("viewport"===i)o=na(a,r);else{var s=void 0;"scrollParent"===i?"BODY"===(s=Lo(_o(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=ea(s,a,r);if("HTML"!==s.nodeName||ia(a))o=l;else{var c=qo(t.ownerDocument),u=c.height,d=c.width;o.top+=l.top-l.marginTop,o.bottom=u+l.top,o.left+=l.left-l.marginLeft,o.right=d+l.left}}var h="number"==typeof(n=n||0);return o.left+=h?n:n.left||0,o.top+=h?n:n.top||0,o.right-=h?n:n.right||0,o.bottom-=h?n:n.bottom||0,o}function aa(t){return t.width*t.height}function sa(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=oa(n,i,o,r),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return Zo({key:t},s[t],{area:aa(s[t])})})).sort((function(t,e){return e.area-t.area})),c=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=t.split("-")[1];return u+(d?"-"+d:"")}function la(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=i?ra(e):zo(e,Ro(n));return ea(n,r,i)}function ca(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function ua(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function da(t,e,n){n=n.split("-")[0];var i=ca(t),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return r[a]=e[a]+e[l]/2-i[l]/2,r[s]=n===s?e[s]-i[c]:e[ua(s)],r}function ha(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function fa(t,e,n){var i=void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var i=ha(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n));return i.forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&Io(n)&&(e.offsets.popper=Qo(e.offsets.popper),e.offsets.reference=Qo(e.offsets.reference),e=n(e,t))})),e}function pa(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=la(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=sa(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=da(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=fa(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function ba(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function ma(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i1&&void 0!==arguments[1]&&arguments[1],n=Ca.indexOf(t),i=Ca.slice(n+1).concat(Ca.slice(0,n));return e?i.reverse():i}var $a="flip",Ea="clockwise",Fa="counterclockwise";function Ia(t,e,n,i){var r=[0,0],o=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(ha(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return c=c.map((function(t,i){var r=(1===i?!o:o)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],a=r[2];if(!o)return t;if(0===a.indexOf("%")){return Qo("%p"===a?n:i)[e]/100*o}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,r,e,n)}))})),c.forEach((function(t,e){t.forEach((function(n,i){Sa(n)&&(r[e]+=n*("-"===t[i-1]?-1:1))}))})),r}var Ma={shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var r=t.offsets,o=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:Jo({},l,o[l]),end:Jo({},l,o[l]+o[c]-a[c])};t.offsets.popper=Zo({},a,u[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,r=t.offsets,o=r.popper,a=r.reference,s=i.split("-")[0],l=void 0;return l=Sa(+n)?[+n,0]:Ia(n,o,a,s),"left"===s?(o.top+=l[0],o.left-=l[1]):"right"===s?(o.top+=l[0],o.left+=l[1]):"top"===s?(o.left+=l[0],o.top-=l[1]):"bottom"===s&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||Ho(t.instance.popper);t.instance.reference===n&&(n=Ho(n));var i=ma("transform"),r=t.instance.popper.style,o=r.top,a=r.left,s=r[i];r.top="",r.left="",r[i]="";var l=oa(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);r.top=o,r.left=a,r[i]=s,e.boundaries=l;var c=e.priority,u=t.offsets.popper,d={primary:function(t){var n=u[t];return u[t]l[t]&&!e.escapeWithReference&&(i=Math.min(u[n],l[t]-("right"===t?u.width:u.height))),Jo({},n,i)}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";u=Zo({},u,d[e](t))})),t.offsets.popper=u,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,r=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]o(i[s])&&(t.offsets.popper[l]=o(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!Pa(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(r),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),h=l?"left":"top",f=l?"bottom":"right",p=ca(i)[c];s[f]-pa[f]&&(t.offsets.popper[d]+=s[d]+p-a[f]),t.offsets.popper=Qo(t.offsets.popper);var b=s[d]+s[c]/2-p/2,m=Mo(t.instance.popper),v=parseFloat(m["margin"+u]),y=parseFloat(m["border"+u+"Width"]),g=b-t.offsets.popper[d]-v-y;return g=Math.max(Math.min(a[c]-p,g),0),t.arrowElement=i,t.offsets.arrow=(Jo(n={},d,Math.round(g)),Jo(n,h,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(ba(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=oa(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],r=ua(i),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case $a:a=[i,r];break;case Ea:a=xa(i);break;case Fa:a=xa(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],r=ua(i);var c=t.offsets.popper,u=t.offsets.reference,d=Math.floor,h="left"===i&&d(c.right)>d(u.left)||"right"===i&&d(c.left)d(u.top)||"bottom"===i&&d(c.top)d(n.right),b=d(c.top)d(n.bottom),v="left"===i&&f||"right"===i&&p||"top"===i&&b||"bottom"===i&&m,y=-1!==["top","bottom"].indexOf(i),g=!!e.flipVariations&&(y&&"start"===o&&f||y&&"end"===o&&p||!y&&"start"===o&&b||!y&&"end"===o&&m),O=!!e.flipVariationsByContent&&(y&&"start"===o&&p||y&&"end"===o&&f||!y&&"start"===o&&m||!y&&"end"===o&&b),w=g||O;(h||v||w)&&(t.flipped=!0,(h||v)&&(i=a[l+1]),w&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=i+(o?"-"+o:""),t.offsets.popper=Zo({},t.offsets.popper,da(t.instance.popper,t.offsets.reference,t.placement)),t=fa(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,r=i.popper,o=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=o[n]-(s?r[a?"width":"height"]:0),t.placement=ua(e),t.offsets.popper=Qo(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!Pa(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=ha(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};Ko(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=Fo(this.update.bind(this)),this.options=Zo({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Zo({},t.Defaults.modifiers,r.modifiers)).forEach((function(e){i.options.modifiers[e]=Zo({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return Zo({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&Io(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return Xo(t,[{key:"update",value:function(){return pa.call(this)}},{key:"destroy",value:function(){return va.call(this)}},{key:"enableEventListeners",value:function(){return wa.call(this)}},{key:"disableEventListeners",value:function(){return Ta.call(this)}}]),t}();La.Utils=("undefined"!=typeof window?window:global).PopperUtils,La.placements=Da,La.Defaults=_a;var Ra=La;function Va(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Aa(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(Va(this,t),!e)throw new TypeError("Failed to construct '".concat(this.constructor.name,"'. 1 argument required, ").concat(arguments.length," given."));Ot(this,t.Defaults,this.constructor.Defaults,n,{type:e}),wt(this,{type:{enumerable:!0,configurable:!1,writable:!1},cancelable:{enumerable:!0,configurable:!1,writable:!1},nativeEvent:{enumerable:!0,configurable:!1,writable:!1},target:{enumerable:!0,configurable:!1,writable:!1},relatedTarget:{enumerable:!0,configurable:!1,writable:!1},vueTarget:{enumerable:!0,configurable:!1,writable:!1},componentId:{enumerable:!0,configurable:!1,writable:!1}});var i=!1;this.preventDefault=function(){this.cancelable&&(i=!0)},Tt(this,"defaultPrevented",{enumerable:!0,get:function(){return i}})}var e,n,i;return e=t,i=[{key:"Defaults",get:function(){return{type:"",cancelable:!0,nativeEvent:null,target:null,relatedTarget:null,vueTarget:null,componentId:null}}}],(n=null)&&Aa(e.prototype,n),i&&Aa(e,i),t}(),Ha=n.default.extend({data:function(){return{listenForClickOut:!1}},watch:{listenForClickOut:function(t,e){t!==e&&(ui(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Ie),t&&ci(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Ie))}},beforeCreate:function(){this.clickOutElement=null,this.clickOutEventName=null},mounted:function(){this.clickOutElement||(this.clickOutElement=document),this.clickOutEventName||(this.clickOutEventName="click"),this.listenForClickOut&&ci(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Ie)},beforeDestroy:function(){ui(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,Ie)},methods:{isClickOut:function(t){return!Fn(this.$el,t.target)},_clickOutHandler:function(t){this.clickOutHandler&&this.isClickOut(t)&&this.clickOutHandler(t)}}}),Na=n.default.extend({data:function(){return{listenForFocusIn:!1}},watch:{listenForFocusIn:function(t,e){t!==e&&(ui(this.focusInElement,"focusin",this._focusInHandler,Ie),t&&ci(this.focusInElement,"focusin",this._focusInHandler,Ie))}},beforeCreate:function(){this.focusInElement=null},mounted:function(){this.focusInElement||(this.focusInElement=document),this.listenForFocusIn&&ci(this.focusInElement,"focusin",this._focusInHandler,Ie)},beforeDestroy:function(){ui(this.focusInElement,"focusin",this._focusInHandler,Ie)},methods:{_focusInHandler:function(t){this.focusInHandler&&this.focusInHandler(t)}}});function za(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ya(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];this.disabled||(this.visible=!1,t&&this.$once(ge,this.focusToggler))},toggle:function(t){var e=t=t||{},n=e.type,i=e.keyCode;("click"===n||"keydown"===n&&-1!==[rr,or,ir].indexOf(i))&&(this.disabled?this.visible=!1:(this.$emit("toggle",t),hi(t),this.visible?this.hide(!0):this.show()))},onMousedown:function(t){hi(t,{propagation:!1})},onKeydown:function(t){var e=t.keyCode;27===e?this.onEsc(t):e===ir?this.focusNext(t,!1):e===ar&&this.focusNext(t,!0)},onEsc:function(t){this.visible&&(this.visible=!1,hi(t),this.$once(ge,this.focusToggler))},onSplitClick:function(t){this.disabled?this.visible=!1:this.$emit(se,t)},hideHandler:function(t){var e=this,n=t.target;!this.visible||Fn(this.$refs.menu,n)||Fn(this.toggler,n)||(this.clearHideTimeout(),this.$_hideTimeout=setTimeout((function(){return e.hide()}),this.inNavbar?300:0))},clickOutHandler:function(t){this.hideHandler(t)},focusInHandler:function(t){this.hideHandler(t)},focusNext:function(t,e){var n=this,i=t.target;!this.visible||t&&En(".dropdown form",i)||(hi(t),this.$nextTick((function(){var t=n.getItems();if(!(t.length<1)){var r=t.indexOf(i);e&&r>0?r--:!e&&r1&&void 0!==arguments[1]?arguments[1]:null;if(ft(t)){var n=Vt(t,this.valueField),i=Vt(t,this.textField);return{value:rt(n)?e||i:n,text:Br(String(rt(i)?e:i)),html:Vt(t,this.htmlField),disabled:Boolean(Vt(t,this.disabledField))}}return{value:e||t,text:Br(String(t)),disabled:!1}},normalizeOptions:function(t){var e=this;return dt(t)?t.map((function(t){return e.normalizeOption(t)})):ft(t)?(Ht('Setting prop "options" to an object is deprecated. Use the array format instead.',this.$options.name),St(t).map((function(n){return e.normalizeOption(t[n]||{},n)}))):[]}}}),es=function(t,e){for(var n=0;n-1:lr(e,t)},isRadio:function(){return!1}},watch:js({},ks,(function(t,e){lr(t,e)||this.setIndeterminate(t)})),mounted:function(){this.setIndeterminate(this.indeterminate)},methods:{computedLocalCheckedWatcher:function(t,e){if(!lr(t,e)){this.$emit(gs,t);var n=this.$refs.input;n&&this.$emit(Ps,n.indeterminate)}},handleChange:function(t){var e=this,n=t.target,i=n.checked,r=n.indeterminate,o=this.value,a=this.uncheckedValue,s=this.computedLocalChecked;if(dt(s)){var l=es(s,o);i&&l<0?s=s.concat(o):!i&&l>-1&&(s=s.slice(0,l).concat(s.slice(l+1)))}else s=i?o:a;this.computedLocalChecked=s,this.$nextTick((function(){e.$emit(ae,s),e.isGroup&&e.bvGroup.$emit(ae,s),e.$emit(Ps,r)}))},setIndeterminate:function(t){dt(this.computedLocalChecked)&&(t=!1);var e=this.$refs.input;e&&(e.indeterminate=t,this.$emit(Ps,t))}}}),xs="__BV_hover_handler__",$s="mouseenter",Es=function(t,e,n){di(t,e,$s,n,Ie),di(t,e,"mouseleave",n,Ie)},Fs=function(t,e){var n=e.value,i=void 0===n?null:n;if(y){var r=t[xs],o=st(r),a=!(o&&r.fn===i);o&&a&&(Es(!1,t,r),delete t[xs]),st(i)&&a&&(t[xs]=function(t){var e=function(e){t(e.type===$s,e)};return e.fn=t,e}(i),Es(!0,t,t[xs]))}},Is={bind:Fs,componentUpdated:Fs,unbind:function(t){Fs(t,{value:null})}};function Ms(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function _s(t){for(var e=1;e0&&(l=[t("div",{staticClass:"b-form-date-controls d-flex flex-wrap",class:{"justify-content-between":l.length>1,"justify-content-end":l.length<2}},l)]);var h=t(Co,{staticClass:"b-form-date-calendar w-100",props:Hs(Hs({},Zn(qs,o)),{},{hidden:!this.isVisible,value:e,valueAsDate:!1,width:this.calendarWidth}),on:{selected:this.onSelected,input:this.onInput,context:this.onContext},scopedSlots:Pt(a,["nav-prev-decade","nav-prev-year","nav-prev-month","nav-this-month","nav-next-month","nav-next-year","nav-next-decade"]),key:"calendar",ref:"calendar"},l);return t(As,{staticClass:"b-form-datepicker",props:Hs(Hs({},Zn(Ks,o)),{},{formattedValue:e?this.formattedValue:"",id:this.safeId(),lang:this.computedLang,menuClass:[{"bg-dark":r,"text-light":r},this.menuClass],placeholder:s,rtl:this.isRTL,value:e}),on:{show:this.onShow,shown:this.onShown,hidden:this.onHidden},scopedSlots:Ns({},tn,a["button-content"]||this.defaultButtonFn),ref:"control"},[h])}}),Zs=n.default.extend({computed:{selectionStart:{cache:!1,get:function(){return this.$refs.input.selectionStart},set:function(t){this.$refs.input.selectionStart=t}},selectionEnd:{cache:!1,get:function(){return this.$refs.input.selectionEnd},set:function(t){this.$refs.input.selectionEnd=t}},selectionDirection:{cache:!1,get:function(){return this.$refs.input.selectionDirection},set:function(t){this.$refs.input.selectionDirection=t}}},methods:{select:function(){var t;(t=this.$refs.input).select.apply(t,arguments)},setSelectionRange:function(){var t;(t=this.$refs.input).setSelectionRange.apply(t,arguments)},setRangeText:function(){var t;(t=this.$refs.input).setRangeText.apply(t,arguments)}}});function Qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function tl(t){for(var e=1;e2&&void 0!==arguments[2]&&arguments[2];return t=gn(t),!this.hasFormatter||this.lazyFormatter&&!n||(t=this.formatter(t,e)),t},modifyValue:function(t){return t=gn(t),this.trim&&(t=t.trim()),this.number&&(t=bn(t,t)),t},updateValue:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.lazy;if(!i||n){this.clearDebounce();var r=function(){if((t=e.modifyValue(t))!==e.vModelValue)e.vModelValue=t,e.$emit(al,t);else if(e.hasFormatter){var n=e.$refs.input;n&&t!==n.value&&(n.value=t)}},o=this.computedDebounce;o>0&&!i&&!n?this.$_inputDebounceTimer=setTimeout(r,o):r()}},onInput:function(t){if(!t.target.composing){var e=t.target.value,n=this.formatValue(e,t);!1===n||t.defaultPrevented?hi(t,{propagation:!1}):(this.localValue=n,this.updateValue(n),this.$emit(we,n))}},onChange:function(t){var e=t.target.value,n=this.formatValue(e,t);!1===n||t.defaultPrevented?hi(t,{propagation:!1}):(this.localValue=n,this.updateValue(n,!0),this.$emit(ae,n))},onBlur:function(t){var e=t.target.value,n=this.formatValue(e,t,!0);!1!==n&&(this.localValue=gn(this.modifyValue(n)),this.updateValue(n,!0)),this.$emit("blur",t)},focus:function(){this.disabled||Nn(this.$el)},blur:function(){this.disabled||zn(this.$el)}}}),cl=n.default.extend({computed:{validity:{cache:!1,get:function(){return this.$refs.input.validity}},validationMessage:{cache:!1,get:function(){return this.$refs.input.validationMessage}},willValidate:{cache:!1,get:function(){return this.$refs.input.willValidate}}},methods:{setCustomValidity:function(){var t;return(t=this.$refs.input).setCustomValidity.apply(t,arguments)},checkValidity:function(){var t;return(t=this.$refs.input).checkValidity.apply(t,arguments)},reportValidity:function(){var t;return(t=this.$refs.input).reportValidity.apply(t,arguments)}}});function ul(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function dl(t){for(var e=1;e=n?"full":e>=n-.5?"half":"empty",u={variant:o,disabled:a,readonly:s};return t("span",{staticClass:"b-rating-star",class:{focused:i&&e===n||!pn(e)&&n===l,"b-rating-star-empty":"empty"===c,"b-rating-star-half":"half"===c,"b-rating-star-full":"full"===c},attrs:{tabindex:a||s?null:"-1"},on:{click:this.onClick}},[t("span",{staticClass:"b-rating-icon"},[this.normalizeSlot(c,u)])])}}),Cl=ti(xt(yl(yl(yl(yl(yl({},vo),Tl),Dt(is,["required","autofocus"])),ss),{},{color:Jn(Ne),iconClear:Jn(Ne,"x"),iconEmpty:Jn(Ne,"star"),iconFull:Jn(Ne,"star-fill"),iconHalf:Jn(Ne,"star-half"),inline:Jn(Le,!1),locale:Jn(We),noBorder:Jn(Le,!1),precision:Jn(Ke),readonly:Jn(Le,!1),showClear:Jn(Le,!1),showValue:Jn(Le,!1),showValueMax:Jn(Le,!1),stars:Jn(Ke,5,(function(t){return pn(t)>=3})),variant:Jn(Ne)})),qt),xl=n.default.extend({name:qt,components:{BIconStar:Wi,BIconStarHalf:qi,BIconStarFill:Ui,BIconX:Ki},mixins:[yo,wl,ls],props:Cl,data:function(){var t=bn(this[Sl],null),e=kl(this.stars);return{localValue:ot(t)?null:Pl(t,0,e),hasFocus:!1}},computed:{computedStars:function(){return kl(this.stars)},computedRating:function(){var t=bn(this.localValue,0),e=pn(this.precision,3);return Pl(bn(t.toFixed(e)),0,this.computedStars)},computedLocale:function(){var t=fn(this.locale).filter(Lt);return new Intl.NumberFormat(t).resolvedOptions().locale},isInteractive:function(){return!this.disabled&&!this.readonly},isRTL:function(){return mo(this.computedLocale)},formattedRating:function(){var t=pn(this.precision),e=this.showValueMax,n=this.computedLocale,i={notation:"standard",minimumFractionDigits:isNaN(t)?0:t,maximumFractionDigits:isNaN(t)?3:t},r=this.computedStars.toLocaleString(n),o=this.localValue;return o=ot(o)?e?"-":"":o.toLocaleString(n,i),e?"".concat(o,"/").concat(r):o}},watch:(fl={},gl(fl,Sl,(function(t,e){if(t!==e){var n=bn(t,null);this.localValue=ot(n)?null:Pl(n,0,this.computedStars)}})),gl(fl,"localValue",(function(t,e){t!==e&&t!==(this.value||0)&&this.$emit(jl,t||null)})),gl(fl,"disabled",(function(t){t&&(this.hasFocus=!1,this.blur())})),fl),methods:{focus:function(){this.disabled||Nn(this.$el)},blur:function(){this.disabled||zn(this.$el)},onKeydown:function(t){var e=t.keyCode;if(this.isInteractive&&hn([37,ir,39,ar],e)){hi(t,{propagation:!1});var n=pn(this.localValue,0),i=this.showClear?0:1,r=this.computedStars,o=this.isRTL?-1:1;37===e?this.localValue=Pl(n-o,i,r)||null:39===e?this.localValue=Pl(n+o,i,r):e===ir?this.localValue=Pl(n-1,i,r)||null:e===ar&&(this.localValue=Pl(n+1,i,r))}},onSelected:function(t){this.isInteractive&&(this.localValue=t)},onFocus:function(t){this.hasFocus=!!this.isInteractive&&"focus"===t.type},renderIcon:function(t){return this.$createElement(nr,{props:{icon:t,variant:this.disabled||this.color?null:this.variant||null}})},iconEmptyFn:function(){return this.renderIcon(this.iconEmpty)},iconHalfFn:function(){return this.renderIcon(this.iconHalf)},iconFullFn:function(){return this.renderIcon(this.iconFull)},iconClearFn:function(){return this.$createElement(nr,{props:{icon:this.iconClear}})}},render:function(t){var e=this,n=this.disabled,i=this.readonly,r=this.name,o=this.form,a=this.inline,s=this.variant,l=this.color,c=this.noBorder,u=this.hasFocus,d=this.computedRating,h=this.computedStars,f=this.formattedRating,p=this.showClear,b=this.isRTL,m=this.isInteractive,v=this.$scopedSlots,y=[];if(p&&!n&&!i){var g=t("span",{staticClass:"b-rating-icon"},[(v["icon-clear"]||this.iconClearFn)()]);y.push(t("span",{staticClass:"b-rating-star b-rating-star-clear flex-grow-1",class:{focused:u&&0===d},attrs:{tabindex:m?"-1":null},on:{click:function(){return e.onSelected(null)}},key:"clear"},[g]))}for(var O=0;O1&&void 0!==arguments[1]?arguments[1]:null;if(ft(t)){var n=Vt(t,this.valueField),i=Vt(t,this.textField),r=Vt(t,this.optionsField,null);return ot(r)?{value:rt(n)?e||i:n,text:String(rt(i)?e:i),html:Vt(t,this.htmlField),disabled:Boolean(Vt(t,this.disabledField))}:{label:String(Vt(t,this.labelField)||i),options:this.normalizeOptions(r)}}return{value:e||t,text:String(t),disabled:!1}}}}),Bl=ti({disabled:Jn(Le,!1),value:Jn(Me,void 0,!0)},Xt),Hl=n.default.extend({name:Xt,functional:!0,props:Bl,render:function(t,e){var n=e.props,i=e.data,r=e.children,o=n.value;return t("option",p(i,{attrs:{disabled:n.disabled},domProps:{value:o}}),r)}});function Nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function zl(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null;return t&&t.$options._scopeId||e};var Ql=n.default.extend({computed:{scopedStyleAttrs:function(){var t,e,n,i=Zl(this.$parent);return i?(n="",(e=i)in(t={})?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t):{}}}}),tc={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOPLEFT:"top",TOPRIGHT:"top",RIGHTTOP:"right",RIGHTBOTTOM:"right",BOTTOMLEFT:"bottom",BOTTOMRIGHT:"bottom",LEFTTOP:"left",LEFTBOTTOM:"left"},ec={AUTO:0,TOPLEFT:-1,TOP:0,TOPRIGHT:1,RIGHTTOP:-1,RIGHT:0,RIGHTBOTTOM:1,BOTTOMLEFT:-1,BOTTOM:0,BOTTOMRIGHT:1,LEFTTOP:-1,LEFT:0,LEFTBOTTOM:1},nc={arrowPadding:Jn(Ke,6),boundary:Jn([tt,Ne],"scrollParent"),boundaryPadding:Jn(Ke,5),fallbackPlacement:Jn(We,"flip"),offset:Jn(Ke,0),placement:Jn(Ne,"top"),target:Jn([tt,et])},ic=n.default.extend({name:"BVPopper",props:nc,data:function(){return{noFade:!1,localShow:!0,attachment:this.getAttachment(this.placement)}},computed:{templateType:function(){return"unknown"},popperConfig:function(){var t=this,e=this.placement;return{placement:this.getAttachment(e),modifiers:{offset:{offset:this.getOffset(e)},flip:{behavior:this.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{padding:this.boundaryPadding,boundariesElement:this.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t.popperPlacementChange(e)},onUpdate:function(e){t.popperPlacementChange(e)}}}},created:function(){var t=this;this.$_popper=null,this.localShow=!0,this.$on(Ce,(function(e){t.popperCreate(e)}));var e=function(){t.$nextTick((function(){jn((function(){t.$destroy()}))}))};this.$parent.$once(Ee,e),this.$once(ge,e)},beforeMount:function(){this.attachment=this.getAttachment(this.placement)},updated:function(){this.updatePopper()},beforeDestroy:function(){this.destroyPopper()},destroyed:function(){var t=this.$el;t&&t.parentNode&&t.parentNode.removeChild(t)},methods:{hide:function(){this.localShow=!1},getAttachment:function(t){return tc[String(t).toUpperCase()]||"auto"},getOffset:function(t){if(!this.offset){var e=this.$refs.arrow||xn(".arrow",this.$el),n=bn(function(t){var e=g.getComputedStyle;return e&&kn(t)?e(t):{}}(e).width,0)+bn(this.arrowPadding,0);switch(ec[String(t).toUpperCase()]||0){case 1:return"+50%p - ".concat(n,"px");case-1:return"-50%p + ".concat(n,"px");default:return 0}}return this.offset},popperCreate:function(t){this.destroyPopper(),this.$_popper=new Ra(this.target,t,this.popperConfig)},destroyPopper:function(){this.$_popper&&this.$_popper.destroy(),this.$_popper=null},updatePopper:function(){this.$_popper&&this.$_popper.scheduleUpdate()},popperPlacementChange:function(t){this.attachment=this.getAttachment(t.placement)},renderTemplate:function(t){return t("div")}},render:function(t){var e=this,n=this.noFade;return t(Ti,{props:{appear:!0,noFade:n},on:{beforeEnter:function(t){return e.$emit(Ce,t)},afterEnter:function(t){return e.$emit(xe,t)},beforeLeave:function(t){return e.$emit(Oe,t)},afterLeave:function(t){return e.$emit(ge,t)}}},[this.localShow?this.renderTemplate(t):t()])}});function rc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function oc(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},n=!1;St(yc).forEach((function(i){rt(e[i])||t[i]===e[i]||(t[i]=e[i],"title"===i&&(n=!0))})),n&&this.localShow&&this.fixTitle()},createTemplateAndShow:function(){var t=this.getContainer(),e=this.getTemplate(),n=this.$_tip=new e({parent:this,propsData:{id:this.computedId,html:this.html,placement:this.placement,fallbackPlacement:this.fallbackPlacement,target:this.getPlacementTarget(),boundary:this.getBoundary(),offset:pn(this.offset,0),arrowPadding:pn(this.arrowPadding,0),boundaryPadding:pn(this.boundaryPadding,0)}});this.handleTemplateUpdate(),n.$once(Ce,this.onTemplateShow),n.$once(xe,this.onTemplateShown),n.$once(Oe,this.onTemplateHide),n.$once(ge,this.onTemplateHidden),n.$once(Ee,this.destroyTemplate),n.$on(me,this.handleEvent),n.$on(ve,this.handleEvent),n.$on(Te,this.handleEvent),n.$on(Se,this.handleEvent),n.$mount(t.appendChild(document.createElement("div")))},hideTemplate:function(){this.$_tip&&this.$_tip.hide(),this.clearActiveTriggers(),this.$_hoverState=""},destroyTemplate:function(){this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.$_hoverState="",this.clearActiveTriggers(),this.localPlacementTarget=null;try{this.$_tip.$destroy()}catch(t){}this.$_tip=null,this.removeAriaDescribedby(),this.restoreTitle(),this.localShow=!1},getTemplateElement:function(){return this.$_tip?this.$_tip.$el:null},handleTemplateUpdate:function(){var t=this,e=this.$_tip;if(e){["title","content","variant","customClass","noFade","interactive"].forEach((function(n){e[n]!==t[n]&&(e[n]=t[n])}))}},show:function(){var t=this.getTarget();if(t&&Fn(document.body,t)&&Cn(t)&&!this.dropdownOpen()&&(!at(this.title)&&""!==this.title||!at(this.content)&&""!==this.content)&&!this.$_tip&&!this.localShow){this.localShow=!0;var e=this.buildEvent(Ce,{cancelable:!0});this.emitEvent(e),e.defaultPrevented?this.destroyTemplate():(this.fixTitle(),this.addAriaDescribedby(),this.createTemplateAndShow())}},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getTemplateElement();if(e&&this.localShow){var n=this.buildEvent(Oe,{cancelable:!t});this.emitEvent(n),n.defaultPrevented||this.hideTemplate()}else this.restoreTitle()},forceHide:function(){this.getTemplateElement()&&this.localShow&&(this.setWhileOpenListeners(!1),this.clearHoverTimeout(),this.$_hoverState="",this.clearActiveTriggers(),this.$_tip&&(this.$_tip.noFade=!0),this.hide(!0))},enable:function(){this.$_enabled=!0,this.emitEvent(this.buildEvent(pe))},disable:function(){this.$_enabled=!1,this.emitEvent(this.buildEvent(he))},onTemplateShow:function(){this.setWhileOpenListeners(!0)},onTemplateShown:function(){var t=this.$_hoverState;this.$_hoverState="","out"===t&&this.leave(null),this.emitEvent(this.buildEvent(xe))},onTemplateHide:function(){this.setWhileOpenListeners(!1)},onTemplateHidden:function(){this.destroyTemplate(),this.emitEvent(this.buildEvent(ge))},getTarget:function(){var t=this.target;return ct(t)?t=In(t.replace(/^#/,"")):st(t)?t=t():t&&(t=t.$el||t),kn(t)?t:null},getPlacementTarget:function(){return this.getTarget()},getTargetId:function(){var t=this.getTarget();return t&&t.id?t.id:null},getContainer:function(){var t=!!this.container&&(this.container.$el||this.container),e=document.body,n=this.getTarget();return!1===t?En(mc,n)||e:ct(t)&&In(t.replace(/^#/,""))||e},getBoundary:function(){return this.boundary?this.boundary.$el||this.boundary:"scrollParent"},isInModal:function(){var t=this.getTarget();return t&&En(pc,t)},isDropdown:function(){var t=this.getTarget();return t&&Mn(t,"dropdown")},dropdownOpen:function(){var t=this.getTarget();return this.isDropdown()&&t&&xn(".dropdown-menu.show",t)},clearHoverTimeout:function(){clearTimeout(this.$_hoverTimeout),this.$_hoverTimeout=null},clearVisibilityInterval:function(){clearInterval(this.$_visibleInterval),this.$_visibleInterval=null},clearActiveTriggers:function(){for(var t in this.activeTrigger)this.activeTrigger[t]=!1},addAriaDescribedby:function(){var t=this.getTarget(),e=Rn(t,"aria-describedby")||"";e=e.split(/\s+/).concat(this.computedId).join(" ").trim(),_n(t,"aria-describedby",e)},removeAriaDescribedby:function(){var t=this,e=this.getTarget(),n=Rn(e,"aria-describedby")||"";(n=n.split(/\s+/).filter((function(e){return e!==t.computedId})).join(" ").trim())?_n(e,"aria-describedby",n):Ln(e,"aria-describedby")},fixTitle:function(){var t=this.getTarget();if(Vn(t,"title")){var e=Rn(t,"title");_n(t,"title",""),e&&_n(t,vc,e)}},restoreTitle:function(){var t=this.getTarget();if(Vn(t,vc)){var e=Rn(t,vc);Ln(t,vc),e&&_n(t,"title",e)}},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Ba(t,uc({cancelable:!1,target:this.getTarget(),relatedTarget:this.getTemplateElement()||null,componentId:this.computedId,vueTarget:this},e))},emitEvent:function(t){var e=t.type;this.emitOnRoot(pi(this.templateType,e),t),this.$emit(e,t)},listen:function(){var t=this,e=this.getTarget();e&&(this.setRootListener(!0),this.computedTriggers.forEach((function(n){"click"===n?ci(e,"click",t.handleEvent,Ie):"focus"===n?(ci(e,"focusin",t.handleEvent,Ie),ci(e,"focusout",t.handleEvent,Ie)):"blur"===n?ci(e,"focusout",t.handleEvent,Ie):"hover"===n&&(ci(e,"mouseenter",t.handleEvent,Ie),ci(e,"mouseleave",t.handleEvent,Ie))}),this))},unListen:function(){var t=this,e=this.getTarget();this.setRootListener(!1),["click","focusin","focusout","mouseenter","mouseleave"].forEach((function(n){e&&ui(e,n,t.handleEvent,Ie)}),this)},setRootListener:function(t){var e=this.$root;if(e){var n=t?"$on":"$off",i=this.templateType;e[n](bi(i,Oe),this.doHide),e[n](bi(i,Ce),this.doShow),e[n](bi(i,de),this.doDisable),e[n](bi(i,fe),this.doEnable)}},setWhileOpenListeners:function(t){this.setModalListener(t),this.setDropdownListener(t),this.visibleCheck(t),this.setOnTouchStartListener(t)},visibleCheck:function(t){var e=this;this.clearVisibilityInterval();var n=this.getTarget(),i=this.getTemplateElement();t&&(this.$_visibleInterval=setInterval((function(){!i||!e.localShow||n.parentNode&&Cn(n)||e.forceHide()}),100))},setModalListener:function(t){this.isInModal()&&this.$root[t?"$on":"$off"](bc,this.forceHide)},setOnTouchStartListener:function(t){var e=this;"ontouchstart"in document.documentElement&&dn(document.body.children).forEach((function(n){di(t,n,"mouseover",e.$_noop)}))},setDropdownListener:function(t){var e=this.getTarget();e&&this.$root&&this.isDropdown&&e.__vue__&&e.__vue__[t?"$on":"$off"](xe,this.forceHide)},handleEvent:function(t){var e=this.getTarget();if(e&&(kn(n=e)&&!n.disabled&&!Vn(n,"disabled")&&!Mn(n,"disabled"))&&this.$_enabled&&!this.dropdownOpen()){var n,i=t.type,r=this.computedTriggers;if("click"===i&&hn(r,"click"))this.click(t);else if("mouseenter"===i&&hn(r,"hover"))this.enter(t);else if("focusin"===i&&hn(r,"focus"))this.enter(t);else if("focusout"===i&&(hn(r,"focus")||hn(r,"blur"))||"mouseleave"===i&&hn(r,"hover")){var o=this.getTemplateElement(),a=t.target,s=t.relatedTarget;if(o&&Fn(o,a)&&Fn(e,s)||o&&Fn(e,a)&&Fn(o,s)||o&&Fn(o,a)&&Fn(o,s)||Fn(e,a)&&Fn(e,s))return;this.leave(t)}}},doHide:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.forceHide()},doShow:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.show()},doDisable:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.disable()},doEnable:function(t){t&&this.getTargetId()!==t&&this.computedId!==t||this.enable()},click:function(t){this.$_enabled&&!this.dropdownOpen()&&(Nn(t.currentTarget),this.activeTrigger.click=!this.activeTrigger.click,this.isWithActiveTrigger?this.enter(null):this.leave(null))},toggle:function(){this.$_enabled&&!this.dropdownOpen()&&(this.localShow?this.leave(null):this.enter(null))},enter:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(this.activeTrigger["focusin"===e.type?"focus":"hover"]=!0),this.localShow||"in"===this.$_hoverState?this.$_hoverState="in":(this.clearHoverTimeout(),this.$_hoverState="in",this.computedDelay.show?(this.fixTitle(),this.$_hoverTimeout=setTimeout((function(){"in"===t.$_hoverState?t.show():t.localShow||t.restoreTitle()}),this.computedDelay.show)):this.show())},leave:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&(this.activeTrigger["focusout"===e.type?"focus":"hover"]=!1,"focusout"===e.type&&hn(this.computedTriggers,"blur")&&(this.activeTrigger.click=!1,this.activeTrigger.hover=!1)),this.isWithActiveTrigger||(this.clearHoverTimeout(),this.$_hoverState="out",this.computedDelay.hide?this.$_hoverTimeout=setTimeout((function(){"out"===t.$_hoverState&&t.hide()}),this.computedDelay.hide):this.hide())}}});function Oc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function wc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tc="disabled",Sc="update:disabled",jc="show",kc=ti((wc(hc={boundary:Jn([tt,Be,Ne],"scrollParent"),boundaryPadding:Jn(Ke,50),container:Jn([tt,Be,Ne]),customClass:Jn(Ne),delay:Jn(Xe,50)},Tc,Jn(Le,!1)),wc(hc,"fallbackPlacement",Jn(We,"flip")),wc(hc,"id",Jn(Ne)),wc(hc,"noFade",Jn(Le,!1)),wc(hc,"noninteractive",Jn(Le,!1)),wc(hc,"offset",Jn(Ke,0)),wc(hc,"placement",Jn(Ne,"top")),wc(hc,jc,Jn(Le,!1)),wc(hc,"target",Jn([tt,et,Ve,Be,Ne],void 0,!0)),wc(hc,"title",Jn(Ne)),wc(hc,"triggers",Jn(We,"hover focus")),wc(hc,"variant",Jn(Ne)),hc),oe),Pc=n.default.extend({name:oe,mixins:[si],inheritAttrs:!1,props:kc,data:function(){return{localShow:this.show,localTitle:"",localContent:""}},computed:{templateData:function(){return function(t){for(var e=1;e0}}});function Cc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function xc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $c="light",Ec="dark",Fc=ti({variant:Jn(Ne)},"BTr"),Ic=n.default.extend({name:"BTr",mixins:[fr,br,si],provide:function(){return{bvTableTr:this}},inject:{bvTableRowGroup:{default:function(){return{}}}},inheritAttrs:!1,props:Fc,computed:{inTbody:function(){return this.bvTableRowGroup.isTbody},inThead:function(){return this.bvTableRowGroup.isThead},inTfoot:function(){return this.bvTableRowGroup.isTfoot},isDark:function(){return this.bvTableRowGroup.isDark},isStacked:function(){return this.bvTableRowGroup.isStacked},isResponsive:function(){return this.bvTableRowGroup.isResponsive},isStickyHeader:function(){return this.bvTableRowGroup.isStickyHeader},hasStickyHeader:function(){return!this.isStacked&&this.bvTableRowGroup.hasStickyHeader},tableVariant:function(){return this.bvTableRowGroup.tableVariant},headVariant:function(){return this.inThead?this.bvTableRowGroup.headVariant:null},footVariant:function(){return this.inTfoot?this.bvTableRowGroup.footVariant:null},isRowDark:function(){return this.headVariant!==$c&&this.footVariant!==$c&&(this.headVariant===Ec||this.footVariant===Ec||this.isDark)},trClasses:function(){var t=this.variant;return[t?"".concat(this.isRowDark?"bg":"table","-").concat(t):null]},trAttrs:function(){return function(t){for(var e=1;e0?t:null},Bc=function(t){return at(t)||Ac(t)>0},Hc=ti({colspan:Jn(Ke,null,Bc),rowspan:Jn(Ke,null,Bc),stackedHeading:Jn(Ne),stickyColumn:Jn(Le,!1),variant:Jn(Ne)},ee),Nc=n.default.extend({name:ee,mixins:[fr,br,si],inject:{bvTableTr:{default:function(){return{}}}},inheritAttrs:!1,props:Hc,computed:{tag:function(){return"td"},inTbody:function(){return this.bvTableTr.inTbody},inThead:function(){return this.bvTableTr.inThead},inTfoot:function(){return this.bvTableTr.inTfoot},isDark:function(){return this.bvTableTr.isDark},isStacked:function(){return this.bvTableTr.isStacked},isStackedCell:function(){return this.inTbody&&this.isStacked},isResponsive:function(){return this.bvTableTr.isResponsive},isStickyHeader:function(){return this.bvTableTr.isStickyHeader},hasStickyHeader:function(){return this.bvTableTr.hasStickyHeader},isStickyColumn:function(){return!this.isStacked&&(this.isResponsive||this.hasStickyHeader)&&this.stickyColumn},rowVariant:function(){return this.bvTableTr.variant},headVariant:function(){return this.bvTableTr.headVariant},footVariant:function(){return this.bvTableTr.footVariant},tableVariant:function(){return this.bvTableTr.tableVariant},computedColspan:function(){return Ac(this.colspan)},computedRowspan:function(){return Ac(this.rowspan)},cellClasses:function(){var t=this.variant,e=this.headVariant,n=this.isStickyColumn;return(!t&&this.isStickyHeader&&!e||!t&&n&&this.inTfoot&&!this.footVariant||!t&&n&&this.inThead&&!e||!t&&n&&this.inTbody)&&(t=this.rowVariant||this.tableVariant||"b-table-default"),[t?"".concat(this.isDark?"bg":"table","-").concat(t):null,n?"b-table-sticky-column":null]},cellAttrs:function(){var t=this.stackedHeading,e=this.inThead||this.inTfoot,n=this.computedColspan,i=this.computedRowspan,r="cell",o=null;return e?(r="columnheader",o=n>0?"colspan":"col"):Pn(this.tag,"th")&&(r="rowheader",o=i>0?"rowgroup":"row"),Rc(Rc({colspan:n,rowspan:i,role:r,scope:o},this.bvAttrs),{},{"data-label":this.isStackedCell&&!at(t)?gn(t):null})}},render:function(t){var e=[this.normalizeSlot()];return t(this.tag,{class:this.cellClasses,attrs:this.cellAttrs,on:this.bvListeners},[this.isStackedCell?t("div",[e]):e])}});var zc,Yc,Gc,Wc="busy",Uc=(zc={},Yc=Wc,Gc=Jn(Le,!1),Yc in zc?Object.defineProperty(zc,Yc,{value:Gc,enumerable:!0,configurable:!0,writable:!0}):zc[Yc]=Gc,zc),qc=n.default.extend({props:Uc,data:function(){return{localBusy:!1}},computed:{computedBusy:function(){return this.busy||this.localBusy}},watch:{localBusy:function(t,e){t!==e&&this.$emit("update:busy",t)}},methods:{stopIfBusy:function(t){return!!this.computedBusy&&(hi(t),!0)},renderBusy:function(){var t=this.tbodyTrClass,e=this.tbodyTrAttr,n=this.$createElement;return this.computedBusy&&this.hasNormalizedSlot(an)?n(Ic,{staticClass:"b-table-busy-slot",class:[st(t)?t(null,an):t],attrs:st(e)?e(null,an):e,key:"table-busy-slot"},[n(Nc,{props:{colspan:this.computedFields.length||null}},[this.normalizeSlot(an)])]):null}}}),Kc={caption:Jn(Ne),captionHtml:Jn(Ne)},Xc=n.default.extend({props:Kc,computed:{captionId:function(){return this.isStacked?this.safeId("_caption_"):null}},methods:{renderCaption:function(){var t=this.caption,e=this.captionHtml,n=this.$createElement,i=n(),r=this.hasNormalizedSlot(sn);return(r||t||e)&&(i=n("caption",{attrs:{id:this.captionId},domProps:r?{}:Hr(e,t),key:"caption",ref:"caption"},this.normalizeSlot(sn))),i}}}),Jc=n.default.extend({methods:{renderColgroup:function(){var t=this.computedFields,e=this.$createElement,n=e();return this.hasNormalizedSlot(ln)&&(n=e("colgroup",{key:"colgroup"},[this.normalizeSlot(ln,{columns:t.length,fields:t})])),n}}}),Zc={emptyFilteredHtml:Jn(Ne),emptyFilteredText:Jn(Ne,"There are no records matching your request"),emptyHtml:Jn(Ne),emptyText:Jn(Ne,"There are no records to show"),showEmpty:Jn(Le,!1)},Qc=n.default.extend({props:Zc,methods:{renderEmpty:function(){var t=this.computedItems,e=this.$createElement,n=e();if(this.showEmpty&&(!t||0===t.length)&&(!this.computedBusy||!this.hasNormalizedSlot(an))){var i=this.computedFields,r=this.isFiltered,o=this.emptyText,a=this.emptyHtml,s=this.emptyFilteredText,l=this.emptyFilteredHtml,c=this.tbodyTrClass,u=this.tbodyTrAttr;(n=this.normalizeSlot(r?"emptyfiltered":"empty",{emptyFilteredHtml:l,emptyFilteredText:s,emptyHtml:a,emptyText:o,fields:i,items:t}))||(n=e("div",{class:["text-center","my-2"],domProps:r?Hr(l,s):Hr(a,o)})),n=e(Nc,{props:{colspan:i.length||null}},[e("div",{attrs:{role:"alert","aria-live":"polite"}},[n])]),n=e(Ic,{staticClass:"b-table-empty-row",class:[st(c)?c(null,"row-empty"):c],attrs:st(u)?u(null,"row-empty"):u,key:r?"b-empty-filtered-row":"b-empty-row"},[n])}return n}}}),tu=function t(e){return at(e)?"":ht(e)&&!pt(e)?St(e).sort().map((function(n){return t(e[n])})).filter((function(t){return!!t})).join(" "):gn(e)};function eu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function nu(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:{},r=St(i).reduce((function(e,n){var r=i[n],o=r.filterByFormatted,a=st(o)?o:o?r.formatter:null;return st(a)&&(e[n]=a(t[n],n,t)),e}),kt(t)),o=St(r).filter((function(t){return!(su[t]||dt(e)&&e.length>0&&hn(e,t)||dt(n)&&n.length>0&&!hn(n,t))}));return Pt(r,o)};function uu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&Ht('Prop "filter-debounce" is deprecated. Use the debounce feature of "" instead.',te),t},localFiltering:function(){return!this.hasProvider||!!this.noProviderFiltering},filteredCheck:function(){return{filteredItems:this.filteredItems,localItems:this.localItems,localFilter:this.localFilter}},localFilterFn:function(){var t=this.filterFunction;return ni(t)?t:null},filteredItems:function(){var t=this.localItems,e=this.localFilter,n=this.localFiltering?this.filterFnFactory(this.localFilterFn,e)||this.defaultFilterFnFactory(e):null;return n&&t.length>0?t.filter(n):t}},watch:{computedFilterDebounce:function(t){!t&&this.$_filterTimer&&(this.clearFilterTimer(),this.localFilter=this.filterSanitize(this.filter))},filter:{deep:!0,handler:function(t){var e=this,n=this.computedFilterDebounce;this.clearFilterTimer(),n&&n>0?this.$_filterTimer=setTimeout((function(){e.localFilter=e.filterSanitize(t)}),n):this.localFilter=this.filterSanitize(t)}},filteredCheck:function(t){var e=t.filteredItems,n=t.localFilter,i=!1;n?lr(n,[])||lr(n,{})?i=!1:n&&(i=!0):i=!1,i&&this.$emit(be,e,e.length),this.isFiltered=i},isFiltered:function(t,e){if(!1===t&&!0===e){var n=this.localItems;this.$emit(be,n,n.length)}}},created:function(){var t=this;this.$_filterTimer=null,this.$nextTick((function(){t.isFiltered=Boolean(t.localFilter)}))},beforeDestroy:function(){this.clearFilterTimer()},methods:{clearFilterTimer:function(){clearTimeout(this.$_filterTimer),this.$_filterTimer=null},filterSanitize:function(t){return!this.localFiltering||this.localFilterFn||ct(t)||mt(t)?_t(t):""},filterFnFactory:function(t,e){if(!t||!st(t)||!e||lr(e,[])||lr(e,{}))return null;return function(n){return t(n,e)}},defaultFilterFnFactory:function(t){var e=this;if(!t||!ct(t)&&!mt(t))return null;var n,i=t;if(ct(i)){var r=(n=t,n.replace(F,"\\$&")).replace(I,"\\s+");i=new RegExp(".*".concat(r,".*"),"i")}return function(t){return i.lastIndex=0,i.test((n=t,r=e.computedFilterIgnored,o=e.computedFilterIncluded,a=e.computedFieldsObj,ht(n)?tu(cu(n,r,o,a)):""));var n,r,o,a}}}}),pu=function(t,e){var n=[];if(dt(t)&&t.filter(Lt).forEach((function(t){if(ct(t))n.push({key:t,label:yn(t)});else if(ht(t)&&t.key&&ct(t.key))n.push(kt(t));else if(ht(t)&&1===St(t).length){var e=St(t)[0],i=function(t,e){var n=null;return ct(e)?n={key:t,label:e}:st(e)?n={key:t,formatter:e}:ht(e)?(n=kt(e)).key=n.key||t:!1!==e&&(n={key:t}),n}(e,t[e]);i&&n.push(i)}})),0===n.length&&dt(e)&&e.length>0){var i=e[0];St(i).forEach((function(t){su[t]||n.push({key:t,label:yn(t)})}))}var r={};return n.filter((function(t){return!r[t.key]&&(r[t.key]=!0,t.label=ct(t.label)?t.label:yn(t.key),!0)}))};function bu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function mu(t){for(var e=1;e0&&t.some(Lt)},selectableIsMultiSelect:function(){return this.isSelectable&&hn(["range","multi"],this.selectMode)},selectableTableClasses:function(){var t,e=this.isSelectable;return Eu(t={"b-table-selectable":e},"b-table-select-".concat(this.selectMode),e),Eu(t,"b-table-selecting",this.selectableHasSelection),Eu(t,"b-table-selectable-no-click",e&&!this.hasSelectableRowClick),t},selectableTableAttrs:function(){return{"aria-multiselectable":this.isSelectable?this.selectableIsMultiSelect?"true":"false":null}}},watch:{computedItems:function(t,e){var n=!1;if(this.isSelectable&&this.selectedRows.length>0){n=dt(t)&&dt(e)&&t.length===e.length;for(var i=0;n&&i=0&&t0&&(this.selectedLastClicked=-1,this.selectedRows=this.selectableIsMultiSelect?function(t,e){var n=st(e)?e:function(){return e};return Array.apply(null,{length:t}).map(n)}(t,!0):[!0])},isRowSelected:function(t){return!(!ut(t)||!this.selectedRows[t])},clearSelected:function(){this.selectedLastClicked=-1,this.selectedRows=[]},selectableRowClasses:function(t){if(this.isSelectable&&this.isRowSelected(t)){var e=this.selectedVariant;return Eu({"b-table-row-selected":!0},"".concat(this.dark?"bg":"table","-").concat(e),e)}return{}},selectableRowAttrs:function(t){return{"aria-selected":this.isSelectable?this.isRowSelected(t)?"true":"false":null}},setSelectionHandlers:function(t){var e=t&&!this.noSelectOnClick?"$on":"$off";this[e](Pe,this.selectionHandler),this[e](be,this.clearSelected),this[e](ue,this.clearSelected)},selectionHandler:function(t,e,n){if(this.isSelectable&&!this.noSelectOnClick){var i=this.selectMode,r=this.selectedLastRow,o=this.selectedRows.slice(),a=!o[e];if("single"===i)o=[];else if("range"===i)if(r>-1&&n.shiftKey){for(var s=Si(r,e);s<=ji(r,e);s++)o[s]=!0;a=!0}else n.ctrlKey||n.metaKey||(o=[],a=!0),this.selectedLastRow=a?e:-1;o[e]=a,this.selectedRows=o}else this.clearSelected()}}}),Ru=function(t){return at(t)?"":function(t){return E.test(String(t))}(t)?bn(t,t):t};function Vu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Au(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},i=n.sortBy,r=void 0===i?null:i,o=n.formatter,a=void 0===o?null:o,s=n.locale,l=void 0===s?void 0:s,c=n.localeOptions,u=void 0===c?{}:c,d=n.nullLast,h=void 0!==d&&d,f=Vt(t,r,null),p=Vt(e,r,null);return st(a)&&(f=a(f,r,t),p=a(p,r,e)),f=Ru(f),p=Ru(p),pt(f)&&pt(p)||ut(f)&&ut(p)?fp?1:0:h&&""===f&&""!==p?1:h&&""!==f&&""===p?-1:tu(f).localeCompare(tu(p),l,u)}(t,a,{sortBy:e,formatter:u,locale:i,localeOptions:l,nullLast:r})),(s||0)*(n?-1:1)},s.map((function(t,e){return[e,t]})).sort(function(t,e){return this(t[1],e[1])||t[0]-e[0]}.bind(t)).map((function(t){return t[1]}))}return s}},watch:(Iu={isSortable:function(t){t?this.isSortable&&this.$on(ye,this.handleSort):this.$off(ye,this.handleSort)}},Bu(Iu,Nu,(function(t){t!==this.localSortDesc&&(this.localSortDesc=t||!1)})),Bu(Iu,Hu,(function(t){t!==this.localSortBy&&(this.localSortBy=t||"")})),Bu(Iu,"localSortDesc",(function(t,e){t!==e&&this.$emit("update:sortDesc",t)})),Bu(Iu,"localSortBy",(function(t,e){t!==e&&this.$emit("update:sortBy",t)})),Iu),created:function(){this.isSortable&&this.$on(ye,this.handleSort)},methods:{handleSort:function(t,e,n,i){var r=this;if(this.isSortable&&(!i||!this.noFooterSorting)){var o=!1,a=function(){var t=e.sortDirection||r.sortDirection;t===zu?r.localSortDesc=!1:t===Yu&&(r.localSortDesc=!0)};if(e.sortable){var s=!this.localSorting&&e.sortKey?e.sortKey:t;this.localSortBy===s?this.localSortDesc=!this.localSortDesc:(this.localSortBy=s,a()),o=!0}else this.localSortBy&&!this.noSortReset&&(this.localSortBy="",a(),o=!0);o&&this.$emit("sort-changed",this.context)}},sortTheadThClasses:function(t,e,n){return{"b-table-sort-icon-left":e.sortable&&this.sortIconLeft&&!(n&&this.noFooterSorting)}},sortTheadThAttrs:function(t,e,n){if(!this.isSortable||n&&this.noFooterSorting)return{};var i=e.sortable;return{"aria-sort":i&&this.localSortBy===t?this.localSortDesc?"descending":"ascending":i?"none":null}},sortTheadThLabel:function(t,e,n){if(!this.isSortable||n&&this.noFooterSorting)return null;var i="";if(e.sortable)if(this.localSortBy===t)i=this.localSortDesc?this.labelSortAsc:this.labelSortDesc;else{i=this.localSortDesc?this.labelSortDesc:this.labelSortAsc;var r=this.sortDirection||e.sortDirection;r===zu?i=this.labelSortAsc:r===Yu&&(i=this.labelSortDesc)}else this.noSortReset||(i=this.localSortBy?this.labelSortClear:"");return On(i)||null}}});var qu={stacked:Jn(Ue,!1)},Ku=n.default.extend({props:qu,computed:{isStacked:function(){var t=this.stacked;return""===t||t},isStackedAlways:function(){return!0===this.isStacked},stackedTableClasses:function(){var t=this.isStackedAlways;return function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({"b-table-stacked":t},"b-table-stacked-".concat(this.stacked),!t&&this.isStacked)}}});function Xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Ju(t){for(var e=1;e0&&!this.computedBusy,[this.tableClass,{"table-striped":this.striped,"table-hover":t,"table-dark":this.dark,"table-bordered":this.bordered,"table-borderless":this.borderless,"table-sm":this.small,border:this.outlined,"b-table-fixed":this.fixed,"b-table-caption-top":this.captionTop,"b-table-no-border-collapse":this.noBorderCollapse},e?"".concat(this.dark?"bg":"table","-").concat(e):"",this.stackedTableClasses,this.selectableTableClasses]},tableAttrs:function(){var t=this.computedItems,e=this.filteredItems,n=this.computedFields,i=this.selectableTableAttrs,r=this.isTableSimple?{}:{"aria-busy":this.computedBusy?"true":"false","aria-colcount":gn(n.length),"aria-describedby":this.bvAttrs["aria-describedby"]||this.$refs.caption?this.captionId:null};return Ju(Ju(Ju({"aria-rowcount":t&&e&&e.length>t.length?gn(e.length):null},this.bvAttrs),{},{id:this.safeId(),role:"table"},r),i)}},render:function(t){var e=this.wrapperClasses,n=this.renderCaption,i=this.renderColgroup,r=this.renderThead,o=this.renderTbody,a=this.renderTfoot,s=[];this.isTableSimple?s.push(this.normalizeSlot()):(s.push(n?n():null),s.push(i?i():null),s.push(r?r():null),s.push(o?o():null),s.push(a?a():null));var l=t("table",{staticClass:"table b-table",class:this.tableClasses,attrs:this.tableAttrs,key:"b-table"},s.filter(Lt));return e.length>0?t("div",{class:e,style:this.wrapperStyles,key:"wrap"},[l]):l}});function ed(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function nd(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:document,e=Hn();return!!(e&&""!==e.toString().trim()&&e.containsNode&&kn(t))&&e.containsNode(t,!0)},cd=ti(Hc,"BTh"),ud=n.default.extend({name:"BTh",extends:Nc,props:cd,computed:{tag:function(){return"th"}}});function dd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function hd(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&(v=String((a-1)*s+e+1));var y=gn(Vt(t,o))||null,g=y||gn(e),O=y?this.safeId("_row_".concat(y)):null,w=this.selectableRowClasses?this.selectableRowClasses(e):{},T=this.selectableRowAttrs?this.selectableRowAttrs(e):{},S=st(l)?l(t,"row"):l,j=st(c)?c(t,"row"):c;if(p.push(u(Ic,{class:[S,w,h?"b-table-has-details":""],props:{variant:t[ou]||null},attrs:hd(hd({id:O},j),{},{tabindex:f?"0":null,"data-pk":y||null,"aria-details":b,"aria-owns":b,"aria-rowindex":v},T),on:{mouseenter:this.rowHovered,mouseleave:this.rowUnhovered},key:"__b-table-row-".concat(g,"__"),ref:"item-rows",refInFor:!0},m)),h){var k={item:t,index:e,fields:i,toggleDetails:this.toggleDetailsFactory(d,t)};this.supportsSelectableRows&&(k.rowSelected=this.isRowSelected(e),k.selectRow=function(){return n.selectRow(e)},k.unselectRow=function(){return n.unselectRow(e)});var P=u(Nc,{props:{colspan:i.length},class:this.detailsTdClass},[this.normalizeSlot(on,k)]);r&&p.push(u("tr",{staticClass:"d-none",attrs:{"aria-hidden":"true",role:"presentation"},key:"__b-table-details-stripe__".concat(g)}));var D=st(this.tbodyTrClass)?this.tbodyTrClass(t,on):this.tbodyTrClass,C=st(this.tbodyTrAttr)?this.tbodyTrAttr(t,on):this.tbodyTrAttr;p.push(u(Ic,{staticClass:"b-table-details",class:[D],props:{variant:t[ou]||null},attrs:hd(hd({},C),{},{id:b,tabindex:"-1"}),key:"__b-table-details__".concat(g)},[P]))}else d&&(p.push(u()),r&&p.push(u()));return p}}});function vd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function yd(t){for(var e=1;e0&&n&&n.length>0?dn(e.children).filter((function(t){return hn(n,t)})):[]},getTbodyTrIndex:function(t){if(!kn(t))return-1;var e="TR"===t.tagName?t:En("tr",t,!0);return e?this.getTbodyTrs().indexOf(e):-1},emitTbodyRowEvent:function(t,e){if(t&&this.hasListener(t)&&e&&e.target){var n=this.getTbodyTrIndex(e.target);if(n>-1){var i=this.computedItems[n];this.$emit(t,i,n,e)}}},tbodyRowEvtStopped:function(t){return this.stopIfBusy&&this.stopIfBusy(t)},onTbodyRowKeydown:function(t){var e=t.target,n=t.keyCode;if(!this.tbodyRowEvtStopped(t)&&"TR"===e.tagName&&Dn(e)&&0===e.tabIndex)if(hn([rr,or],n))hi(t),this.onTBodyRowClicked(t);else if(hn([ar,ir,36,35],n)){var i=this.getTbodyTrIndex(e);if(i>-1){hi(t);var r=this.getTbodyTrs(),o=t.shiftKey;36===n||o&&n===ar?Nn(r[0]):35===n||o&&n===ir?Nn(r[r.length-1]):n===ar&&i>0?Nn(r[i-1]):n===ir&&it.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&void 0!==arguments[0]&&arguments[0],n=this.computedFields,i=this.isSortable,r=this.isSelectable,o=this.headVariant,a=this.footVariant,s=this.headRowVariant,l=this.footRowVariant,c=this.$createElement;if(this.isStackedAlways||0===n.length)return c();var u=i||this.hasListener(ye),d=r?this.selectAllRows:xo,h=r?this.clearSelected:xo,f=function(n,r){var o=n.label,a=n.labelHtml,s=n.variant,l=n.stickyColumn,f=n.key,p=null;n.label.trim()||n.headerTitle||(p=yn(n.key));var b={};u&&(b.click=function(i){t.headClicked(i,n,e)},b.keydown=function(i){var r=i.keyCode;r!==rr&&r!==or||t.headClicked(i,n,e)});var m=i?t.sortTheadThAttrs(f,n,e):{},v=i?t.sortTheadThClasses(f,n,e):null,y=i?t.sortTheadThLabel(f,n,e):null,g={class:[t.fieldClasses(n),v],props:{variant:s,stickyColumn:l},style:n.thStyle||{},attrs:Rd(Rd({tabindex:u&&n.sortable?"0":null,abbr:n.headerAbbr||null,title:n.headerTitle||null,"aria-colindex":r+1,"aria-label":p},t.getThValues(null,f,n.thAttr,e?"foot":"head",{})),m),on:b,key:f},O=[Ad(f),Ad(f.toLowerCase()),Ad()];e&&(O=[Bd(f),Bd(f.toLowerCase()),Bd()].concat(Md(O)));var w={label:o,column:f,field:n,isFoot:e,selectAllRows:d,clearSelected:h},T=t.normalizeSlot(O,w)||c("div",{domProps:Hr(a,o)}),S=y?c("span",{staticClass:"sr-only"}," (".concat(y,")")):null;return c(ud,g,[T,S].filter(Lt))},p=n.map(f).filter(Lt),b=[];if(e)b.push(c(Ic,{class:this.tfootTrClass,props:{variant:at(l)?s:l}},p));else{var m={columns:n.length,fields:n,selectAllRows:d,clearSelected:h};b.push(this.normalizeSlot(cn,m)||c()),b.push(c(Ic,{class:this.theadTrClass,props:{variant:s}},p))}return c(e?Dd:Id,{class:(e?this.tfootClass:this.theadClass)||null,props:e?{footVariant:a||o||null}:{headVariant:o||null},key:e?"bv-tfoot":"bv-thead"},b)}}}),zd=n.default.extend({methods:{renderTopRow:function(){var t=this.computedFields,e=this.stacked,n=this.tbodyTrClass,i=this.tbodyTrAttr,r=this.$createElement;return this.hasNormalizedSlot(un)&&!0!==e&&""!==e?r(Ic,{staticClass:"b-table-top-row",class:[st(n)?n(null,"row-top"):n],attrs:st(i)?i(null,"row-top"):i,key:"b-top-row"},[this.normalizeSlot(un,{columns:t.length,fields:t})]):r()}}});function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Gd(t){for(var e=1;e1&&r>0&&(n=(i-1)*r+n),o.tableItems[n][t]=e.value}))}a&&this.$emit("input",this.tableItems),delete this.localChanges[t||s]},handleListeners:function(t){var e={input:!0,"input-change":!0};return Object.keys(t).reduce((function(n,i){return e[i]?n:r(r({},n),{},o({},i,t[i]))}),{})},getCellValue:function(t,e){var n=this.tableMap[t.item.id],i=n&&n.fields[e.key]?n.fields[e.key].value:"";if(t.field.options){var r=t.field.options.find((function(t){return t.value===i}));i=r?r.text:i}return i},getCellData:function(t){return r(r({},t),{},{isEdit:this.tableMap[t.item.id].isEdit,id:t.item.id})},getValidity:function(t,e){return this.tableMap[t.item.id].fields[e.key].validity},showField:function(t,e,n){var i;return t.type===n&&(null===(i=this.tableMap[e.item.id])||void 0===i?void 0:i.isEdit)&&(this.selectedCell===t.key||"row"===this.editMode)&&t.editable},getFieldValue:function(t,e){var n;return null===(n=this.tableMap[e.item.id].fields[t.key])||void 0===n?void 0:n.value},enableFocus:function(t){return"cell"===this.editMode&&t},clearEditMode:function(t){if(t)this.tableMap[t].isEdit=!1;else for(var e in this.localChanges)this.tableMap[e].isEdit=!1},createTableItems:function(t){var e=this;this.tableItems=t.map((function(t){return r({},t)})),this.tableMap=t.reduce((function(t,n){return r(r({},t),{},o({},n.id,{id:n.id,isEdit:!!e.tableMap[n.id]&&e.tableMap[n.id].isEdit,fields:Object.keys(n).reduce((function(t,i){var a,s;return r(r({},t),{},o({},i,{value:n[i],validity:null!==(a=e.tableMap[n.id])&&void 0!==a&&null!==(s=a.fields[i])&&void 0!==s&&s.validity?e.tableMap[n.id].fields[i].validity:{valid:!0}}))}),{})}))}),{})}}});function Xd(t,e,n,i,r,o,a,s,l,c){"boolean"!=typeof a&&(l=s,s=a,a=!1);const u="function"==typeof n?n.options:n;let d;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),i&&(u._scopeId=i),o?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=d):e&&(d=a?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),d)if(u.functional){const t=u.render;u.render=function(e,n){return d.call(n),t(e,n)}}else{const t=u.beforeCreate;u.beforeCreate=t?[].concat(t,d):[d]}return n}const Jd="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function Zd(t){return(t,e)=>function(t,e){const n=Jd?e.media||"default":t,i=th[n]||(th[n]={ids:new Set,styles:[]});if(!i.ids.has(t)){i.ids.add(t);let n=e.source;if(e.map&&(n+="\n/*# sourceURL="+e.map.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),i.element||(i.element=document.createElement("style"),i.element.type="text/css",e.media&&i.element.setAttribute("media",e.media),void 0===Qd&&(Qd=document.head||document.getElementsByTagName("head")[0]),Qd.appendChild(i.element)),"styleSheet"in i.element)i.styles.push(n),i.element.styleSheet.cssText=i.styles.filter(Boolean).join("\n");else{const t=i.ids.size-1,e=document.createTextNode(n),r=i.element.childNodes;r[t]&&i.element.removeChild(r[t]),r.length?i.element.insertBefore(e,r[t]):i.element.appendChild(e)}}}(t,e)}let Qd;const th={};var eh=Xd({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-table",t._g(t._b({directives:[{name:"click-outside",rawName:"v-click-outside",value:t.handleClickOut,expression:"handleClickOut"}],attrs:{items:t.tableItems},scopedSlots:t._u([t._l(t.$scopedSlots,(function(e,n){return{key:n,fn:function(e){return[t._t(n,null,null,e)]}}})),t._l(t.fields,(function(e,i){return{key:"cell("+e.key+")",fn:function(r){return[t.showField(e,r,"date")?n("div",{key:i},[n("b-form-datepicker",t._b({directives:[{name:"focus",rawName:"v-focus",value:t.enableFocus("date"),expression:"enableFocus('date')"}],key:i,attrs:{id:e.key+"-"+r.item.id,type:e.type,value:t.getFieldValue(e,r),state:!!t.getValidity(r,e).valid&&null},on:{input:function(n){return t.inputHandler(n,r,e.key)}},nativeOn:{keydown:function(e){return t.handleKeydown(e,i,r)}}},"b-form-datepicker",Object.assign({},e),!1)),t._v(" "),t.getValidity(r,e).errorMessage?n("b-tooltip",{attrs:{target:e.key+"-"+r.item.id,variant:"danger",show:!t.getValidity(r,e).valid,disabled:!0}},[t._v("\n "+t._s(t.getValidity(r,e).errorMessage)+"\n ")]):t._e()],1):t.showField(e,r,"select")?n("div",{key:i},[n("b-form-select",t._b({directives:[{name:"focus",rawName:"v-focus",value:t.enableFocus(),expression:"enableFocus()"}],attrs:{id:e.key+"-"+r.item.id,value:t.getFieldValue(e,r),state:!!t.getValidity(r,e).valid&&null},on:{change:function(n){return t.inputHandler(n,r,e.key,e.options)}},nativeOn:{keydown:function(e){return t.handleKeydown(e,i,r)}}},"b-form-select",Object.assign({},e),!1)),t._v(" "),t.getValidity(r,e).errorMessage?n("b-tooltip",{attrs:{target:e.key+"-"+r.item.id,variant:"danger",show:!t.getValidity(r,e).valid,disabled:!0}},[t._v("\n "+t._s(t.getValidity(r,e).errorMessage)+"\n ")]):t._e()],1):t.showField(e,r,"checkbox")?n("b-form-checkbox",t._b({directives:[{name:"focus",rawName:"v-focus",value:t.enableFocus("checkbox"),expression:"enableFocus('checkbox')"}],key:i,attrs:{id:e.key+"-"+r.item.id,checked:t.getFieldValue(e,r)},on:{change:function(n){return t.inputHandler(n,r,e.key)}},nativeOn:{keydown:function(e){return t.handleKeydown(e,i,r)}}},"b-form-checkbox",Object.assign({},e),!1)):t.showField(e,r,"rating")?n("b-form-rating",t._b({directives:[{name:"focus",rawName:"v-focus",value:t.enableFocus(),expression:"enableFocus()"}],key:i,attrs:{id:e.key+"-"+r.item.id,value:t.getFieldValue(e,r)},on:{change:function(n){return t.inputHandler(n,r,e.key)}},nativeOn:{keydown:function(e){return t.handleKeydown(e,i,r)}}},"b-form-rating",Object.assign({},e),!1)):t.showField(e,r,"textarea")?n("div",{key:i},[n("b-form-textarea",t._b({directives:[{name:"focus",rawName:"v-focus",value:t.enableFocus(),expression:"enableFocus()"}],attrs:{id:e.key+"-"+r.item.id,type:e.type,value:t.getFieldValue(e,r),state:!!t.getValidity(r,e).valid&&null},on:{keydown:function(e){return t.handleKeydown(e,i,r)},input:function(n){return t.inputHandler(n,r,e.key)},change:function(n){return t.changeHandler(n,r,e.key)}}},"b-form-textarea",Object.assign({},e),!1)),t._v(" "),t.getValidity(r,e).errorMessage?n("b-tooltip",{attrs:{target:e.key+"-"+r.item.id,variant:"danger",show:!t.getValidity(r,e).valid,disabled:!0}},[t._v("\n "+t._s(t.getValidity(r,e).errorMessage)+"\n ")]):t._e()],1):t.showField(e,r,e.type)?n("div",{key:i},[n("b-form-input",t._b({directives:[{name:"focus",rawName:"v-focus",value:t.enableFocus(),expression:"enableFocus()"}],attrs:{id:e.key+"-"+r.item.id,type:e.type,value:t.getFieldValue(e,r),state:!!t.getValidity(r,e).valid&&null},on:{keydown:function(e){return t.handleKeydown(e,i,r)},input:function(n){return t.inputHandler(n,r,e.key)},change:function(n){return t.changeHandler(n,r,e.key)}}},"b-form-input",Object.assign({},e),!1)),t._v(" "),t.getValidity(r,e).errorMessage?n("b-tooltip",{attrs:{target:e.key+"-"+r.item.id,variant:"danger",show:!t.getValidity(r,e).valid,disabled:!0}},[t._v("\n "+t._s(t.getValidity(r,e).errorMessage)+"\n ")]):t._e()],1):n("div",{key:i,staticClass:"data-cell",on:t._d({},[t.editTrigger,function(n){return t.handleEditCell(n,r.item.id,e.key,e.editable)}])},[t.$scopedSlots["cell("+e.key+")"]?t._t("cell("+e.key+")",null,null,t.getCellData(r)):[t._v(t._s(t.getCellValue(r,e)))]],2)]}}}))],null,!0)},"b-table",Object.assign({},t.$props,t.$attrs),!1),t.handleListeners(t.$listeners)))},staticRenderFns:[]},(function(t){t&&t("data-v-27f38362_0",{source:"table.b-table{width:unset}table.b-table td{padding:0}.data-cell{display:flex;width:100%;height:100%}",map:void 0,media:void 0})}),Kd,undefined,false,undefined,!1,Zd,void 0,void 0),nh=eh,ih=function(){var t=nh;return t.install=function(e){e.component("BEditableTable",t)},t}(),rh=Object.freeze({__proto__:null,default:ih});return Object.entries(rh).forEach((function(t){var e=a(t,2),n=e[0],i=e[1];"default"!==n&&(ih[n]=i)})),ih}(Vue); \ No newline at end of file +var BEditableTable = (function (t) { + "use strict"; + function e(t) { + return t && "object" == typeof t && "default" in t ? t : { default: t }; + } + var n = e(t); + function i(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function r(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? i(Object(n), !0).forEach(function (e) { + o(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : i(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function o(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + function a(t, e) { + return ( + (function (t) { + if (Array.isArray(t)) return t; + })(t) || + (function (t, e) { + var n = + null == t + ? null + : ("undefined" != typeof Symbol && t[Symbol.iterator]) || + t["@@iterator"]; + if (null == n) return; + var i, + r, + o = [], + a = !0, + s = !1; + try { + for ( + n = n.call(t); + !(a = (i = n.next()).done) && + (o.push(i.value), !e || o.length !== e); + a = !0 + ); + } catch (t) { + (s = !0), (r = t); + } finally { + try { + a || null == n.return || n.return(); + } finally { + if (s) throw r; + } + } + return o; + })(t, e) || + (function (t, e) { + if (!t) return; + if ("string" == typeof t) return s(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + "Object" === n && t.constructor && (n = t.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(t); + if ( + "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ) + return s(t, e); + })(t, e) || + (function () { + throw new TypeError( + "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + } + function s(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + var l = function () { + return (l = + Object.assign || + function (t) { + for (var e, n = 1, i = arguments.length; n < i; n++) + for (var r in (e = arguments[n])) + Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); + return t; + }).apply(this, arguments); + }, + c = /-(\w)/g, + u = /:(.*)/, + d = /;(?![^(]*\))/g; + function h(t, e) { + return e ? e.toUpperCase() : ""; + } + function f(t) { + for (var e, n = {}, i = 0, r = t.split(d); i < r.length; i++) { + var o = r[i].split(u), + a = o[0], + s = o[1]; + (a = a.trim()) && + ("string" == typeof s && (s = s.trim()), + (n[((e = a), e.replace(c, h))] = s)); + } + return n; + } + function p() { + for (var t, e, n = {}, i = arguments.length; i--; ) + for (var r = 0, o = Object.keys(arguments[i]); r < o.length; r++) + switch ((t = o[r])) { + case "class": + case "style": + case "directives": + if ((Array.isArray(n[t]) || (n[t] = []), "style" === t)) { + var a = void 0; + a = Array.isArray(arguments[i].style) + ? arguments[i].style + : [arguments[i].style]; + for (var s = 0; s < a.length; s++) { + var c = a[s]; + "string" == typeof c && (a[s] = f(c)); + } + arguments[i].style = a; + } + n[t] = n[t].concat(arguments[i][t]); + break; + case "staticClass": + if (!arguments[i][t]) break; + void 0 === n[t] && (n[t] = ""), + n[t] && (n[t] += " "), + (n[t] += arguments[i][t].trim()); + break; + case "on": + case "nativeOn": + n[t] || (n[t] = {}); + for ( + var u = 0, d = Object.keys(arguments[i][t] || {}); + u < d.length; + u++ + ) + (e = d[u]), + n[t][e] + ? (n[t][e] = [].concat(n[t][e], arguments[i][t][e])) + : (n[t][e] = arguments[i][t][e]); + break; + case "attrs": + case "props": + case "domProps": + case "scopedSlots": + case "staticStyle": + case "hook": + case "transition": + n[t] || (n[t] = {}), (n[t] = l({}, arguments[i][t], n[t])); + break; + default: + n[t] || (n[t] = arguments[i][t]); + } + return n; + } + var b = "undefined" != typeof window, + m = "undefined" != typeof document, + v = "undefined" != typeof navigator, + y = b && m && v, + g = b ? window : {}, + O = m ? document : {}, + w = v ? navigator : {}, + T = (w.userAgent || "").toLowerCase(); + T.indexOf("jsdom"), /msie|trident/.test(T); + var S = (function () { + var t = !1; + if (y) + try { + var e = { + get passive() { + t = !0; + }, + }; + g.addEventListener("test", e, e), g.removeEventListener("test", e, e); + } catch (e) { + t = !1; + } + return t; + })(); + y && ("ontouchstart" in O.documentElement || w.maxTouchPoints), + y && Boolean(g.PointerEvent || g.MSPointerEvent), + y && + "IntersectionObserver" in g && + "IntersectionObserverEntry" in g && + g.IntersectionObserverEntry.prototype; + var j = ["xs", "sm", "md", "lg", "xl"], + k = /\[(\d+)]/g, + P = /^(BV?)/, + D = /^\d+$/, + C = /(<([^>]+)>)/gi, + x = /\B([A-Z])/g, + $ = /([a-z])([A-Z])/g, + E = /^[0-9]*\.?[0-9]+$/, + F = /[-/\\^$*+?.()|[\]{}]/g, + I = /[\s\uFEFF\xA0]+/g, + M = /(\s|^)(\w)/g, + _ = /_/g, + L = /-(\w)/g, + R = /^\d+-\d\d?-\d\d?(?:\s|T|$)/, + V = /-|\s|T/, + A = /%2C/g, + B = /[!'()*]/g, + H = /^BIcon/, + N = /-u-.+/; + function z(t) { + return ( + (z = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (t) { + return typeof t; + } + : function (t) { + return t && + "function" == typeof Symbol && + t.constructor === Symbol && + t !== Symbol.prototype + ? "symbol" + : typeof t; + }), + z(t) + ); + } + function Y(t, e) { + if (!(t instanceof e)) + throw new TypeError("Cannot call a class as a function"); + } + function G(t, e) { + if ("function" != typeof e && null !== e) + throw new TypeError("Super expression must either be null or a function"); + (t.prototype = Object.create(e && e.prototype, { + constructor: { value: t, writable: !0, configurable: !0 }, + })), + e && J(t, e); + } + function W(t) { + var e = X(); + return function () { + var n, + i = Z(t); + if (e) { + var r = Z(this).constructor; + n = Reflect.construct(i, arguments, r); + } else n = i.apply(this, arguments); + return U(this, n); + }; + } + function U(t, e) { + return !e || ("object" !== z(e) && "function" != typeof e) + ? (function (t) { + if (void 0 === t) + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + return t; + })(t) + : e; + } + function q(t) { + var e = "function" == typeof Map ? new Map() : void 0; + return ( + (q = function (t) { + if ( + null === t || + ((n = t), -1 === Function.toString.call(n).indexOf("[native code]")) + ) + return t; + var n; + if ("function" != typeof t) + throw new TypeError( + "Super expression must either be null or a function" + ); + if (void 0 !== e) { + if (e.has(t)) return e.get(t); + e.set(t, i); + } + function i() { + return K(t, arguments, Z(this).constructor); + } + return ( + (i.prototype = Object.create(t.prototype, { + constructor: { + value: i, + enumerable: !1, + writable: !0, + configurable: !0, + }, + })), + J(i, t) + ); + }), + q(t) + ); + } + function K(t, e, n) { + return ( + (K = X() + ? Reflect.construct + : function (t, e, n) { + var i = [null]; + i.push.apply(i, e); + var r = new (Function.bind.apply(t, i))(); + return n && J(r, n.prototype), r; + }), + K.apply(null, arguments) + ); + } + function X() { + if ("undefined" == typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" == typeof Proxy) return !0; + try { + return ( + Date.prototype.toString.call( + Reflect.construct(Date, [], function () {}) + ), + !0 + ); + } catch (t) { + return !1; + } + } + function J(t, e) { + return ( + (J = + Object.setPrototypeOf || + function (t, e) { + return (t.__proto__ = e), t; + }), + J(t, e) + ); + } + function Z(t) { + return ( + (Z = Object.setPrototypeOf + ? Object.getPrototypeOf + : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }), + Z(t) + ); + } + var Q = b + ? g.Element + : (function (t) { + G(n, t); + var e = W(n); + function n() { + return Y(this, n), e.apply(this, arguments); + } + return n; + })(q(Object)), + tt = b + ? g.HTMLElement + : (function (t) { + G(n, t); + var e = W(n); + function n() { + return Y(this, n), e.apply(this, arguments); + } + return n; + })(Q), + et = b + ? g.SVGElement + : (function (t) { + G(n, t); + var e = W(n); + function n() { + return Y(this, n), e.apply(this, arguments); + } + return n; + })(Q); + function nt(t) { + return ( + (nt = + "function" == typeof Symbol && "symbol" == typeof Symbol.iterator + ? function (t) { + return typeof t; + } + : function (t) { + return t && + "function" == typeof Symbol && + t.constructor === Symbol && + t !== Symbol.prototype + ? "symbol" + : typeof t; + }), + nt(t) + ); + } + b && g.File; + var it = function (t) { + return nt(t); + }, + rt = function (t) { + return void 0 === t; + }, + ot = function (t) { + return null === t; + }, + at = function (t) { + return rt(t) || ot(t); + }, + st = function (t) { + return "function" === it(t); + }, + lt = function (t) { + return "boolean" === it(t); + }, + ct = function (t) { + return "string" === it(t); + }, + ut = function (t) { + return "number" === it(t); + }, + dt = function (t) { + return Array.isArray(t); + }, + ht = function (t) { + return null !== t && "object" === nt(t); + }, + ft = function (t) { + return "[object Object]" === Object.prototype.toString.call(t); + }, + pt = function (t) { + return t instanceof Date; + }, + bt = function (t) { + return t instanceof Event; + }, + mt = function (t) { + return ( + "RegExp" === + (function (t) { + return Object.prototype.toString.call(t).slice(8, -1); + })(t) + ); + }; + function vt(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function yt(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? vt(Object(n), !0).forEach(function (e) { + gt(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : vt(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function gt(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Ot = function () { + return Object.assign.apply(Object, arguments); + }, + wt = function (t, e) { + return Object.defineProperties(t, e); + }, + Tt = function (t, e, n) { + return Object.defineProperty(t, e, n); + }, + St = function (t) { + return Object.keys(t); + }, + jt = function (t, e) { + return Object.prototype.hasOwnProperty.call(t, e); + }, + kt = function (t) { + return yt({}, t); + }, + Pt = function (t, e) { + return St(t) + .filter(function (t) { + return -1 !== e.indexOf(t); + }) + .reduce(function (e, n) { + return yt(yt({}, e), {}, gt({}, n, t[n])); + }, {}); + }, + Dt = function (t, e) { + return St(t) + .filter(function (t) { + return -1 === e.indexOf(t); + }) + .reduce(function (e, n) { + return yt(yt({}, e), {}, gt({}, n, t[n])); + }, {}); + }, + Ct = function t(e, n) { + return ( + ht(e) && + ht(n) && + St(n).forEach(function (i) { + ht(n[i]) + ? ((e[i] && ht(e[i])) || (e[i] = n[i]), t(e[i], n[i])) + : Ot(e, gt({}, i, n[i])); + }), + e + ); + }, + xt = function (t) { + return St(t) + .sort() + .reduce(function (e, n) { + return yt(yt({}, e), {}, gt({}, n, t[n])); + }, {}); + }; + function $t(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Et(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? $t(Object(n), !0).forEach(function (e) { + Ft(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : $t(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Ft(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + function It(t) { + return ( + (function (t) { + if (Array.isArray(t)) return Mt(t); + })(t) || + (function (t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) + return Array.from(t); + })(t) || + (function (t, e) { + if (!t) return; + if ("string" == typeof t) return Mt(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + "Object" === n && t.constructor && (n = t.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(t); + if ( + "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ) + return Mt(t, e); + })(t) || + (function () { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + } + function Mt(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + var _t = function t(e) { + var n = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e; + return dt(e) + ? e.reduce(function (e, n) { + return [].concat(It(e), [t(n, n)]); + }, []) + : ft(e) + ? St(e).reduce(function (n, i) { + return Et(Et({}, n), {}, Ft({}, i, t(e[i], e[i]))); + }, {}) + : n; + }, + Lt = function (t) { + return t; + }, + Rt = function (t, e) { + var n = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0; + if (!(e = dt(e) ? e.join(".") : e) || !ht(t)) return n; + if (e in t) return t[e]; + var i = (e = String(e).replace(k, ".$1")).split(".").filter(Lt); + return 0 === i.length + ? n + : i.every(function (e) { + return ht(t) && e in t && !at((t = t[e])); + }) + ? t + : ot(t) + ? null + : n; + }, + Vt = function (t, e) { + var n = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null, + i = Rt(t, e); + return at(i) ? n : i; + }, + At = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + n = ("undefined" != typeof process && process && process.env) || {}; + return t ? n[t] || e : n; + }, + Bt = function () { + return At("BOOTSTRAP_VUE_NO_WARN") || "production" === At("NODE_ENV"); + }, + Ht = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + Bt() || + console.warn( + "[BootstrapVue warn]: ".concat(e ? "".concat(e, " - ") : "").concat(t) + ); + }, + Nt = "BButton", + zt = "BCalendar", + Yt = "BDropdown", + Gt = "BFormCheckbox", + Wt = "BFormDatepicker", + Ut = "BFormInput", + qt = "BFormRating", + Kt = "BFormSelect", + Xt = "BFormSelectOption", + Jt = "BFormSelectOptionGroup", + Zt = "BIcon", + Qt = "BLink", + te = "BTable", + ee = "BTableCell", + ne = "BTbody", + ie = "BTfoot", + re = "BThead", + oe = "BTooltip", + ae = "change", + se = "click", + le = "close", + ce = "context", + ue = "context-changed", + de = "disable", + he = "disabled", + fe = "enable", + pe = "enabled", + be = "filtered", + me = "focusin", + ve = "focusout", + ye = "head-clicked", + ge = "hidden", + Oe = "hide", + we = "input", + Te = "mouseenter", + Se = "mouseleave", + je = "open", + ke = "refreshed", + Pe = "row-clicked", + De = "selected", + Ce = "show", + xe = "shown", + $e = "hook:beforeDestroy", + Ee = "hook:destroyed", + Fe = "bv", + Ie = { passive: !0, capture: !1 }, + Me = void 0, + _e = Array, + Le = Boolean, + Re = Date, + Ve = Function, + Ae = Number, + Be = Object, + He = RegExp, + Ne = String, + ze = [_e, Ve], + Ye = [_e, Be], + Ge = [_e, Be, Ne], + We = [_e, Ne], + Ue = [Le, Ne], + qe = [Re, Ne], + Ke = [Ae, Ne], + Xe = [Ae, Be, Ne], + Je = [Be, Ve], + Ze = [Be, Ne], + Qe = "bottom-row", + tn = "button-content", + en = "custom-foot", + nn = "default", + rn = "first", + on = "row-details", + an = "table-busy", + sn = "table-caption", + ln = "table-colgroup", + cn = "thead-top", + un = "top-row", + dn = function () { + return Array.from.apply(Array, arguments); + }, + hn = function (t, e) { + return -1 !== t.indexOf(e); + }, + fn = function () { + for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) + e[n] = arguments[n]; + return Array.prototype.concat.apply([], e); + }, + pn = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : NaN, + n = parseInt(t, 10); + return isNaN(n) ? e : n; + }, + bn = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : NaN, + n = parseFloat(t); + return isNaN(n) ? e : n; + }, + mn = function (t) { + return t.replace(x, "-$1").toLowerCase(); + }, + vn = function (t) { + return ( + (t = mn(t).replace(L, function (t, e) { + return e ? e.toUpperCase() : ""; + })) + .charAt(0) + .toUpperCase() + t.slice(1) + ); + }, + yn = function (t) { + return t + .replace(_, " ") + .replace($, function (t, e, n) { + return e + " " + n; + }) + .replace(M, function (t, e, n) { + return e + n.toUpperCase(); + }); + }, + gn = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2; + return at(t) + ? "" + : dt(t) || (ft(t) && t.toString === Object.prototype.toString) + ? JSON.stringify(t, null, e) + : String(t); + }, + On = function (t) { + return gn(t).trim(); + }, + wn = Q.prototype, + Tn = wn.matches || wn.msMatchesSelector || wn.webkitMatchesSelector, + Sn = + wn.closest || + function (t) { + var e = this; + do { + if ($n(e, t)) return e; + e = e.parentElement || e.parentNode; + } while (!ot(e) && e.nodeType === Node.ELEMENT_NODE); + return null; + }, + jn = + g.requestAnimationFrame || + g.webkitRequestAnimationFrame || + g.mozRequestAnimationFrame || + g.msRequestAnimationFrame || + g.oRequestAnimationFrame || + function (t) { + return setTimeout(t, 16); + }; + g.MutationObserver || g.WebKitMutationObserver || g.MozMutationObserver; + var kn = function (t) { + return !(!t || t.nodeType !== Node.ELEMENT_NODE); + }, + Pn = function (t, e) { + return gn(t).toLowerCase() === gn(e).toLowerCase(); + }, + Dn = function (t) { + return ( + kn(t) && + t === + (function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : [], + e = O.activeElement; + return e && + !t.some(function (t) { + return t === e; + }) + ? e + : null; + })() + ); + }, + Cn = function (t) { + if (!kn(t) || !t.parentNode || !Fn(O.body, t)) return !1; + if ("none" === An(t, "display")) return !1; + var e = Bn(t); + return !!(e && e.height > 0 && e.width > 0); + }, + xn = function (t, e) { + return (kn(e) ? e : O).querySelector(t) || null; + }, + $n = function (t, e) { + return !!kn(t) && Tn.call(t, e); + }, + En = function (t, e) { + var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (!kn(e)) return null; + var i = Sn.call(e, t); + return n ? i : i === e ? null : i; + }, + Fn = function (t, e) { + return !(!t || !st(t.contains)) && t.contains(e); + }, + In = function (t) { + return O.getElementById(/^#/.test(t) ? t.slice(1) : t) || null; + }, + Mn = function (t, e) { + return !!(e && kn(t) && t.classList) && t.classList.contains(e); + }, + _n = function (t, e, n) { + e && kn(t) && t.setAttribute(e, n); + }, + Ln = function (t, e) { + e && kn(t) && t.removeAttribute(e); + }, + Rn = function (t, e) { + return e && kn(t) ? t.getAttribute(e) : null; + }, + Vn = function (t, e) { + return e && kn(t) ? t.hasAttribute(e) : null; + }, + An = function (t, e) { + return (e && kn(t) && t.style[e]) || null; + }, + Bn = function (t) { + return kn(t) ? t.getBoundingClientRect() : null; + }, + Hn = function () { + return g.getSelection ? g.getSelection() : null; + }, + Nn = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + try { + t.focus(e); + } catch (t) {} + return Dn(t); + }, + zn = function (t) { + try { + t.blur(); + } catch (t) {} + return !Dn(t); + }, + Yn = function (t) { + var e, + n, + i = ((e = null), Object.create(e, n)); + return function () { + for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++) + n[r] = arguments[r]; + var o = JSON.stringify(n); + return (i[o] = i[o] || t.apply(null, n)); + }; + }, + Gn = n.default.prototype, + Wn = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : void 0, + n = Gn.$bvConfig; + return n ? n.getConfigValue(t, e) : _t(e); + }, + Un = Yn(function () { + return Wn("breakpoints", j); + }); + function qn(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Kn(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? qn(Object(n), !0).forEach(function (e) { + Xn(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : qn(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Xn(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + Yn(function () { + var t = _t(Un()); + return (t[0] = ""), t; + }); + var Jn = function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Me, + e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : void 0, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : void 0, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : void 0, + r = !0 === n; + return ( + (i = r ? i : n), + Kn( + Kn( + Kn({}, t ? { type: t } : {}), + r + ? { required: r } + : rt(e) + ? {} + : { + default: ht(e) + ? function () { + return e; + } + : e, + } + ), + rt(i) ? {} : { validator: i } + ) + ); + }, + Zn = function (t, e) { + var n = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Lt; + return (dt(t) ? t.slice() : St(t)).reduce(function (t, i) { + return (t[n(i)] = e[i]), t; + }, {}); + }, + Qn = function (t, e, n) { + return Kn( + Kn({}, _t(t)), + {}, + { + default: function () { + var i = (function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : null, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : void 0; + return e ? Wn("".concat(t, ".").concat(e), n) : Wn(t, {}); + })(n, e, t.default); + return st(i) ? i() : i; + }, + } + ); + }, + ti = function (t, e) { + return St(t).reduce(function (n, i) { + return Kn(Kn({}, n), {}, Xn({}, i, Qn(t[i], i, e))); + }, {}); + }, + ei = Qn({}, "", "").default.name, + ni = function (t) { + return st(t) && t.name !== ei; + }; + function ii(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var ri = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + i = e.type, + r = void 0 === i ? Me : i, + o = e.defaultValue, + a = void 0 === o ? void 0 : o, + s = e.validator, + l = void 0 === s ? void 0 : s, + c = e.event, + u = void 0 === c ? we : c, + d = ii({}, t, Jn(r, a, l)), + h = n.default.extend({ model: { prop: t, event: u }, props: d }); + return { mixin: h, props: d, prop: t, event: u }; + }, + oi = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; + return (t = fn(t).filter(Lt)).some(function (t) { + return e[t] || n[t]; + }); + }, + ai = function (t) { + var e, + n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}, + r = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}; + t = fn(t).filter(Lt); + for (var o = 0; o < t.length && !e; o++) { + var a = t[o]; + e = i[a] || r[a]; + } + return st(e) ? e(n) : e; + }, + si = n.default.extend({ + methods: { + hasNormalizedSlot: function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : nn, + e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : this.$scopedSlots, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : this.$slots; + return oi(t, e, n); + }, + normalizeSlot: function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : nn, + e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : {}, + n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : this.$scopedSlots, + i = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : this.$slots, + r = ai(t, e, n, i); + return r ? fn(r) : r; + }, + }, + }), + li = function (t) { + return S + ? ht(t) + ? t + : { capture: !!t || !1 } + : !!(ht(t) ? t.capture : t); + }, + ci = function (t, e, n, i) { + t && t.addEventListener && t.addEventListener(e, n, li(i)); + }, + ui = function (t, e, n, i) { + t && t.removeEventListener && t.removeEventListener(e, n, li(i)); + }, + di = function (t) { + for ( + var e = t ? ci : ui, + n = arguments.length, + i = new Array(n > 1 ? n - 1 : 0), + r = 1; + r < n; + r++ + ) + i[r - 1] = arguments[r]; + e.apply(void 0, i); + }, + hi = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, + n = e.preventDefault, + i = void 0 === n || n, + r = e.propagation, + o = void 0 === r || r, + a = e.immediatePropagation, + s = void 0 !== a && a; + i && t.preventDefault(), + o && t.stopPropagation(), + s && t.stopImmediatePropagation(); + }, + fi = function (t) { + return mn(t.replace(P, "")); + }, + pi = function (t, e) { + return [Fe, fi(t), e].join("::"); + }, + bi = function (t, e) { + return [Fe, e, fi(t)].join("::"); + }; + function mi(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function vi(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? mi(Object(n), !0).forEach(function (e) { + yi(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : mi(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function yi(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var gi = { + name: "", + enterClass: "", + enterActiveClass: "", + enterToClass: "show", + leaveClass: "show", + leaveActiveClass: "", + leaveToClass: "", + }, + Oi = vi( + vi({}, gi), + {}, + { enterActiveClass: "fade", leaveActiveClass: "fade" } + ), + wi = { + appear: Jn(Le, !1), + mode: Jn(Ne), + noFade: Jn(Le, !1), + transProps: Jn(Be), + }, + Ti = n.default.extend({ + name: "BVTransition", + functional: !0, + props: wi, + render: function (t, e) { + var n = e.children, + i = e.data, + r = e.props, + o = r.transProps; + return ( + ft(o) || + ((o = r.noFade ? gi : Oi), + r.appear && + (o = vi( + vi({}, o), + {}, + { + appear: !0, + appearClass: o.enterClass, + appearActiveClass: o.enterActiveClass, + appearToClass: o.enterToClass, + } + ))), + t( + "transition", + p(i, { props: (o = vi(vi({ mode: r.mode }, o), {}, { css: !0 })) }), + n + ) + ); + }, + }), + Si = Math.min, + ji = Math.max, + ki = function (t) { + return "%" + t.charCodeAt(0).toString(16); + }, + Pi = function (t) { + return encodeURIComponent(gn(t)).replace(B, ki).replace(A, ","); + }, + Di = function (t) { + if (!ft(t)) return ""; + var e = St(t) + .map(function (e) { + var n = t[e]; + return rt(n) + ? "" + : ot(n) + ? Pi(e) + : dt(n) + ? n + .reduce(function (t, n) { + return ( + ot(n) + ? t.push(Pi(e)) + : rt(n) || t.push(Pi(e) + "=" + Pi(n)), + t + ); + }, []) + .join("&") + : Pi(e) + "=" + Pi(n); + }) + .filter(function (t) { + return t.length > 0; + }) + .join("&"); + return e ? "?".concat(e) : ""; + }, + Ci = function (t) { + return !(!t || Pn(t, "a")); + }; + function xi(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var $i = { + viewBox: "0 0 16 16", + width: "1em", + height: "1em", + focusable: "false", + role: "img", + "aria-label": "icon", + }, + Ei = { + width: null, + height: null, + focusable: null, + role: null, + "aria-label": null, + }, + Fi = { + animation: Jn(Ne), + content: Jn(Ne), + flipH: Jn(Le, !1), + flipV: Jn(Le, !1), + fontScale: Jn(Ke, 1), + rotate: Jn(Ke, 0), + scale: Jn(Ke, 1), + shiftH: Jn(Ke, 0), + shiftV: Jn(Ke, 0), + stacked: Jn(Le, !1), + title: Jn(Ne), + variant: Jn(Ne), + }, + Ii = n.default.extend({ + name: "BIconBase", + functional: !0, + props: Fi, + render: function (t, e) { + var n, + i = e.data, + r = e.props, + o = e.children, + a = r.animation, + s = r.content, + l = r.flipH, + c = r.flipV, + u = r.stacked, + d = r.title, + h = r.variant, + f = ji(bn(r.fontScale, 1), 0) || 1, + b = ji(bn(r.scale, 1), 0) || 1, + m = bn(r.rotate, 0), + v = bn(r.shiftH, 0), + y = bn(r.shiftV, 0), + g = l || c || 1 !== b, + O = g || m, + w = v || y, + T = !at(s), + S = t( + "g", + { + attrs: { + transform: + [ + O ? "translate(8 8)" : null, + g + ? "scale(" + .concat((l ? -1 : 1) * b, " ") + .concat((c ? -1 : 1) * b, ")") + : null, + m ? "rotate(".concat(m, ")") : null, + O ? "translate(-8 -8)" : null, + ] + .filter(Lt) + .join(" ") || null, + }, + domProps: T ? { innerHTML: s || "" } : {}, + }, + o + ); + w && + (S = t( + "g", + { + attrs: { + transform: "translate(" + .concat((16 * v) / 16, " ") + .concat((-16 * y) / 16, ")"), + }, + }, + [S] + )), + u && (S = t("g", [S])); + var j = [d ? t("title", d) : null, S].filter(Lt); + return t( + "svg", + p( + { + staticClass: "b-icon bi", + class: + ((n = {}), + xi(n, "text-".concat(h), h), + xi(n, "b-icon-animation-".concat(a), a), + n), + attrs: $i, + style: u + ? {} + : { fontSize: 1 === f ? null : "".concat(100 * f, "%") }, + }, + i, + u ? { attrs: Ei } : {}, + { + attrs: { + xmlns: u ? null : "http://www.w3.org/2000/svg", + fill: "currentColor", + }, + } + ), + j + ); + }, + }); + function Mi(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function _i(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Mi(Object(n), !0).forEach(function (e) { + Li(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Mi(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Li(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Ri = function (t, e) { + var i = mn(t), + r = "BIcon".concat(vn(t)), + o = "bi-".concat(i), + a = i.replace(/-/g, " "), + s = On(e || ""); + return n.default.extend({ + name: r, + functional: !0, + props: Dt(Fi, ["content"]), + render: function (t, e) { + var n = e.data, + i = e.props; + return t( + Ii, + p({ props: { title: a }, attrs: { "aria-label": a } }, n, { + staticClass: o, + props: _i(_i({}, i), {}, { content: s }), + }) + ); + }, + }); + }, + Vi = Ri("Blank", ""), + Ai = Ri( + "Calendar", + '' + ), + Bi = Ri( + "CalendarFill", + '' + ), + Hi = Ri( + "ChevronBarLeft", + '' + ), + Ni = Ri( + "ChevronDoubleLeft", + '' + ), + zi = Ri( + "ChevronDown", + '' + ), + Yi = Ri( + "ChevronLeft", + '' + ), + Gi = Ri("CircleFill", ''), + Wi = Ri( + "Star", + '' + ), + Ui = Ri( + "StarFill", + '' + ), + qi = Ri( + "StarHalf", + '' + ), + Ki = Ri( + "X", + '' + ); + function Xi(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Ji(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Xi(Object(n), !0).forEach(function (e) { + Zi(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Xi(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Zi(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Qi = function t(e, n) { + return e ? (e.$options || {}).components[n] || t(e.$parent, n) : null; + }, + tr = Dt(Fi, ["content"]), + er = ti(xt(Ji(Ji({}, tr), {}, { icon: Jn(Ne) })), Zt), + nr = n.default.extend({ + name: Zt, + functional: !0, + props: er, + render: function (t, e) { + var n = e.data, + i = e.props, + r = e.parent, + o = vn(On(i.icon || "")).replace(H, ""); + return t( + (o && Qi(r, "BIcon".concat(o))) || Vi, + p(n, { props: Zn(tr, i) }) + ); + }, + }), + ir = 40, + rr = 13, + or = 32, + ar = 38, + sr = function (t, e) { + if (t.length !== e.length) return !1; + for (var n = !0, i = 0; n && i < t.length; i++) n = lr(t[i], e[i]); + return n; + }, + lr = function t(e, n) { + if (e === n) return !0; + var i = pt(e), + r = pt(n); + if (i || r) return !(!i || !r) && e.getTime() === n.getTime(); + if (((i = dt(e)), (r = dt(n)), i || r)) return !(!i || !r) && sr(e, n); + if (((i = ht(e)), (r = ht(n)), i || r)) { + if (!i || !r) return !1; + if (St(e).length !== St(n).length) return !1; + for (var o in e) { + var a = jt(e, o), + s = jt(n, o); + if ((a && !s) || (!a && s) || !t(e[o], n[o])) return !1; + } + } + return String(e) === String(n); + }; + function cr(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var ur = function (t) { + return !t || 0 === St(t).length; + }, + dr = function (t) { + return { + handler: function (e, n) { + if (!lr(e, n)) + if (ur(e) || ur(n)) this[t] = _t(e); + else { + for (var i in n) jt(e, i) || this.$delete(this.$data[t], i); + for (var r in e) this.$set(this.$data[t], r, e[r]); + } + }, + }; + }, + hr = function (t, e) { + return n.default.extend({ + data: function () { + return cr({}, e, _t(this[t])); + }, + watch: cr({}, t, dr(e)), + }); + }, + fr = hr("$attrs", "bvAttrs"), + pr = n.default.extend({ + methods: { + listenOnRoot: function (t, e) { + var n = this; + this.$root.$on(t, e), + this.$on($e, function () { + n.$root.$off(t, e); + }); + }, + listenOnRootOnce: function (t, e) { + var n = this; + this.$root.$once(t, e), + this.$on($e, function () { + n.$root.$off(t, e); + }); + }, + emitOnRoot: function (t) { + for ( + var e, + n = arguments.length, + i = new Array(n > 1 ? n - 1 : 0), + r = 1; + r < n; + r++ + ) + i[r - 1] = arguments[r]; + (e = this.$root).$emit.apply(e, [t].concat(i)); + }, + }, + }), + br = hr("$listeners", "bvListeners"); + function mr(t) { + return ( + (function (t) { + if (Array.isArray(t)) return vr(t); + })(t) || + (function (t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) + return Array.from(t); + })(t) || + (function (t, e) { + if (!t) return; + if ("string" == typeof t) return vr(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + "Object" === n && t.constructor && (n = t.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(t); + if ( + "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ) + return vr(t, e); + })(t) || + (function () { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + } + function vr(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + function yr(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function gr(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? yr(Object(n), !0).forEach(function (e) { + Or(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : yr(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Or(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var wr = pi(Qt, "clicked"), + Tr = { + activeClass: Jn(Ne), + append: Jn(Le, !1), + event: Jn(We, se), + exact: Jn(Le, !1), + exactActiveClass: Jn(Ne), + replace: Jn(Le, !1), + routerTag: Jn(Ne, "a"), + to: Jn(Ze), + }, + Sr = { noPrefetch: Jn(Le, !1), prefetch: Jn(Le, null) }, + jr = ti( + xt( + gr( + gr(gr({}, Sr), Tr), + {}, + { + active: Jn(Le, !1), + disabled: Jn(Le, !1), + href: Jn(Ne), + rel: Jn(Ne, null), + routerComponentName: Jn(Ne), + target: Jn(Ne, "_self"), + } + ) + ), + Qt + ), + kr = n.default.extend({ + name: Qt, + mixins: [fr, br, pr, si], + inheritAttrs: !1, + props: jr, + computed: { + computedTag: function () { + return (function (t, e) { + var n = t.to, + i = t.disabled, + r = t.routerComponentName, + o = !!e.$router; + return !o || (o && (i || !n)) + ? "a" + : r || (e.$nuxt ? "nuxt-link" : "router-link"); + })( + { + to: this.to, + disabled: this.disabled, + routerComponentName: this.routerComponentName, + }, + this + ); + }, + isRouterLink: function () { + return Ci(this.computedTag); + }, + computedRel: function () { + return (function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + e = t.target, + n = t.rel; + return "_blank" === e && ot(n) ? "noopener" : n || null; + })({ target: this.target, rel: this.rel }); + }, + computedHref: function () { + return (function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + e = t.href, + n = t.to, + i = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : "a", + r = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : "#", + o = + arguments.length > 3 && void 0 !== arguments[3] + ? arguments[3] + : "/"; + if (e) return e; + if (Ci(i)) return null; + if (ct(n)) return n || o; + if (ft(n) && (n.path || n.query || n.hash)) { + var a = gn(n.path), + s = Di(n.query), + l = gn(n.hash); + return ( + (l = l && "#" !== l.charAt(0) ? "#".concat(l) : l), + "".concat(a).concat(s).concat(l) || o + ); + } + return r; + })({ to: this.to, href: this.href }, this.computedTag); + }, + computedProps: function () { + var t = this.prefetch; + return this.isRouterLink + ? gr( + gr({}, Zn(gr(gr({}, Tr), Sr), this)), + {}, + { prefetch: lt(t) ? t : void 0, tag: this.routerTag } + ) + : {}; + }, + computedAttrs: function () { + var t = this.bvAttrs, + e = this.computedHref, + n = this.computedRel, + i = this.disabled, + r = this.target, + o = this.routerTag, + a = this.isRouterLink; + return gr( + gr( + gr(gr({}, t), e ? { href: e } : {}), + a && !Pn(o, "a") ? {} : { rel: n, target: r } + ), + {}, + { + tabindex: i ? "-1" : rt(t.tabindex) ? null : t.tabindex, + "aria-disabled": i ? "true" : null, + } + ); + }, + computedListeners: function () { + return gr(gr({}, this.bvListeners), {}, { click: this.onClick }); + }, + }, + methods: { + onClick: function (t) { + var e = arguments, + n = bt(t), + i = this.isRouterLink, + r = this.bvListeners.click; + n && this.disabled + ? hi(t, { immediatePropagation: !0 }) + : (i && + t.currentTarget.__vue__ && + t.currentTarget.__vue__.$emit(se, t), + fn(r) + .filter(function (t) { + return st(t); + }) + .forEach(function (t) { + t.apply(void 0, mr(e)); + }), + this.emitOnRoot(wr, t), + this.emitOnRoot("clicked::link", t)), + n && !i && "#" === this.computedHref && hi(t, { propagation: !1 }); + }, + focus: function () { + Nn(this.$el); + }, + blur: function () { + zn(this.$el); + }, + }, + render: function (t) { + var e = this.active, + n = this.disabled; + return t( + this.computedTag, + Or( + { + class: { active: e, disabled: n }, + attrs: this.computedAttrs, + props: this.computedProps, + }, + this.isRouterLink ? "nativeOn" : "on", + this.computedListeners + ), + this.normalizeSlot() + ); + }, + }); + function Pr(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Dr(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Pr(Object(n), !0).forEach(function (e) { + Cr(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Pr(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Cr(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var xr = Dt(jr, ["event", "routerTag"]); + delete xr.href.default, delete xr.to.default; + var $r = ti( + xt( + Dr( + Dr({}, xr), + {}, + { + block: Jn(Le, !1), + disabled: Jn(Le, !1), + pill: Jn(Le, !1), + pressed: Jn(Le, null), + size: Jn(Ne), + squared: Jn(Le, !1), + tag: Jn(Ne, "button"), + type: Jn(Ne, "button"), + variant: Jn(Ne, "secondary"), + } + ) + ), + Nt + ), + Er = function (t) { + var e, n; + "focusin" === t.type + ? ((e = t.target), + (n = "focus") && kn(e) && e.classList && e.classList.add(n)) + : "focusout" === t.type && + (function (t, e) { + e && kn(t) && t.classList && t.classList.remove(e); + })(t.target, "focus"); + }, + Fr = function (t) { + return ( + (function (t) { + return !(!t.href && !t.to); + })(t) || Pn(t.tag, "a") + ); + }, + Ir = function (t) { + return lt(t.pressed); + }, + Mr = function (t) { + return !(Fr(t) || (t.tag && !Pn(t.tag, "button"))); + }, + _r = function (t) { + return !Fr(t) && !Mr(t); + }, + Lr = function (t) { + var e; + return [ + "btn-".concat(t.variant || "secondary"), + ((e = {}), + Cr(e, "btn-".concat(t.size), t.size), + Cr(e, "btn-block", t.block), + Cr(e, "rounded-pill", t.pill), + Cr(e, "rounded-0", t.squared && !t.pill), + Cr(e, "disabled", t.disabled), + Cr(e, "active", t.pressed), + e), + ]; + }, + Rr = function (t) { + return Fr(t) ? Zn(xr, t) : {}; + }, + Vr = function (t, e) { + var n = Mr(t), + i = Fr(t), + r = Ir(t), + o = _r(t), + a = i && "#" === t.href, + s = e.attrs && e.attrs.role ? e.attrs.role : null, + l = e.attrs ? e.attrs.tabindex : null; + return ( + (o || a) && (l = "0"), + { + type: n && !i ? t.type : null, + disabled: n ? t.disabled : null, + role: o || a ? "button" : s, + "aria-disabled": o ? String(t.disabled) : null, + "aria-pressed": r ? String(t.pressed) : null, + autocomplete: r ? "off" : null, + tabindex: t.disabled && !n ? "-1" : l, + } + ); + }, + Ar = n.default.extend({ + name: Nt, + functional: !0, + props: $r, + render: function (t, e) { + var n = e.props, + i = e.data, + r = e.listeners, + o = e.children, + a = Ir(n), + s = Fr(n), + l = _r(n), + c = s && "#" === n.href, + u = { + keydown: function (t) { + if (!n.disabled && (l || c)) { + var e = t.keyCode; + if (e === or || (e === rr && l)) { + var i = t.currentTarget || t.target; + hi(t, { propagation: !1 }), i.click(); + } + } + }, + click: function (t) { + n.disabled && bt(t) + ? hi(t) + : a && + r && + r["update:pressed"] && + fn(r["update:pressed"]).forEach(function (t) { + st(t) && t(!n.pressed); + }); + }, + }; + a && ((u.focusin = Er), (u.focusout = Er)); + var d = { + staticClass: "btn", + class: Lr(n), + props: Rr(n), + attrs: Vr(n, i), + on: u, + }; + return t(s ? kr : n.tag, p(i, d), o); + }, + }), + Br = function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ""; + return String(t).replace(C, ""); + }, + Hr = function (t, e) { + return t ? { innerHTML: t } : e ? { textContent: e } : {}; + }, + Nr = "gregory", + zr = "long", + Yr = "short", + Gr = "2-digit", + Wr = "numeric"; + function Ur(t, e) { + return ( + (function (t) { + if (Array.isArray(t)) return t; + })(t) || + (function (t, e) { + if ("undefined" == typeof Symbol || !(Symbol.iterator in Object(t))) + return; + var n = [], + i = !0, + r = !1, + o = void 0; + try { + for ( + var a, s = t[Symbol.iterator](); + !(i = (a = s.next()).done) && + (n.push(a.value), !e || n.length !== e); + i = !0 + ); + } catch (t) { + (r = !0), (o = t); + } finally { + try { + i || null == s.return || s.return(); + } finally { + if (r) throw o; + } + } + return n; + })(t, e) || + (function (t, e) { + if (!t) return; + if ("string" == typeof t) return qr(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + "Object" === n && t.constructor && (n = t.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(t); + if ( + "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ) + return qr(t, e); + })(t, e) || + (function () { + throw new TypeError( + "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + } + function qr(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + function Kr(t, e, n) { + return ( + (Kr = Xr() + ? Reflect.construct + : function (t, e, n) { + var i = [null]; + i.push.apply(i, e); + var r = new (Function.bind.apply(t, i))(); + return n && Jr(r, n.prototype), r; + }), + Kr.apply(null, arguments) + ); + } + function Xr() { + if ("undefined" == typeof Reflect || !Reflect.construct) return !1; + if (Reflect.construct.sham) return !1; + if ("function" == typeof Proxy) return !0; + try { + return ( + Date.prototype.toString.call( + Reflect.construct(Date, [], function () {}) + ), + !0 + ); + } catch (t) { + return !1; + } + } + function Jr(t, e) { + return ( + (Jr = + Object.setPrototypeOf || + function (t, e) { + return (t.__proto__ = e), t; + }), + Jr(t, e) + ); + } + var Zr, + Qr = function () { + for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) + e[n] = arguments[n]; + return Kr(Date, e); + }, + to = function (t) { + if (ct(t) && R.test(t.trim())) { + var e = Ur( + t.split(V).map(function (t) { + return pn(t, 1); + }), + 3 + ), + n = e[0], + i = e[1], + r = e[2]; + return Qr(n, i - 1, r); + } + return pt(t) ? Qr(t.getFullYear(), t.getMonth(), t.getDate()) : null; + }, + eo = function (t) { + if (!(t = to(t))) return null; + var e = t.getFullYear(), + n = "0".concat(t.getMonth() + 1).slice(-2), + i = "0".concat(t.getDate()).slice(-2); + return "".concat(e, "-").concat(n, "-").concat(i); + }, + no = function (t, e) { + return new Intl.DateTimeFormat(t, e).format; + }, + io = function (t, e) { + return eo(t) === eo(e); + }, + ro = function (t) { + return (t = Qr(t)).setDate(1), t; + }, + oo = function (t) { + return (t = Qr(t)).setMonth(t.getMonth() + 1), t.setDate(0), t; + }, + ao = function (t, e) { + var n = (t = Qr(t)).getMonth(); + return ( + t.setFullYear(t.getFullYear() + e), + t.getMonth() !== n && t.setDate(0), + t + ); + }, + so = function (t) { + var e = (t = Qr(t)).getMonth(); + return t.setMonth(e - 1), t.getMonth() === e && t.setDate(0), t; + }, + lo = function (t) { + var e = (t = Qr(t)).getMonth(); + return ( + t.setMonth(e + 1), t.getMonth() === (e + 2) % 12 && t.setDate(0), t + ); + }, + co = function (t) { + return ao(t, -1); + }, + uo = function (t) { + return ao(t, 1); + }, + ho = function (t) { + return ao(t, -10); + }, + fo = function (t) { + return ao(t, 10); + }, + po = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null, + n = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null; + return ( + (t = to(t)), + (e = to(e) || t), + (n = to(n) || t), + t ? (t < e ? e : t > n ? n : t) : null + ); + }, + bo = [ + "ar", + "az", + "ckb", + "fa", + "he", + "ks", + "lrc", + "mzn", + "ps", + "sd", + "te", + "ug", + "ur", + "yi", + ].map(function (t) { + return t.toLowerCase(); + }), + mo = function (t) { + var e = gn(t).toLowerCase().replace(N, "").split("-"), + n = e.slice(0, 2).join("-"), + i = e[0]; + return hn(bo, n) || hn(bo, i); + }, + vo = { id: Jn(Ne) }, + yo = n.default.extend({ + props: vo, + data: function () { + return { localId_: null }; + }, + computed: { + safeId: function () { + var t = this.id || this.localId_; + return function (e) { + return t + ? (e = String(e || "").replace(/\s+/g, "_")) + ? t + "_" + e + : t + : null; + }; + }, + }, + mounted: function () { + var t = this; + this.$nextTick(function () { + t.localId_ = "__BVID__".concat(t._uid); + }); + }, + }); + function go(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Oo(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? go(Object(n), !0).forEach(function (e) { + wo(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : go(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function wo(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var To = ri("value", { type: qe }), + So = To.mixin, + jo = To.props, + ko = To.prop, + Po = To.event, + Do = ti( + xt( + Oo( + Oo(Oo({}, vo), jo), + {}, + { + ariaControls: Jn(Ne), + block: Jn(Le, !1), + dateDisabledFn: Jn(Ve), + dateFormatOptions: Jn(Be, { + year: Wr, + month: zr, + day: Wr, + weekday: zr, + }), + dateInfoFn: Jn(Ve), + direction: Jn(Ne), + disabled: Jn(Le, !1), + hidden: Jn(Le, !1), + hideHeader: Jn(Le, !1), + initialDate: Jn(qe), + labelCalendar: Jn(Ne, "Calendar"), + labelCurrentMonth: Jn(Ne, "Current month"), + labelHelp: Jn(Ne, "Use cursor keys to navigate calendar dates"), + labelNav: Jn(Ne, "Calendar navigation"), + labelNextDecade: Jn(Ne, "Next decade"), + labelNextMonth: Jn(Ne, "Next month"), + labelNextYear: Jn(Ne, "Next year"), + labelNoDateSelected: Jn(Ne, "No date selected"), + labelPrevDecade: Jn(Ne, "Previous decade"), + labelPrevMonth: Jn(Ne, "Previous month"), + labelPrevYear: Jn(Ne, "Previous year"), + labelSelected: Jn(Ne, "Selected date"), + labelToday: Jn(Ne, "Today"), + locale: Jn(We), + max: Jn(qe), + min: Jn(qe), + navButtonVariant: Jn(Ne, "secondary"), + noHighlightToday: Jn(Le, !1), + noKeyNav: Jn(Le, !1), + readonly: Jn(Le, !1), + roleDescription: Jn(Ne), + selectedVariant: Jn(Ne, "primary"), + showDecadeNav: Jn(Le, !1), + startWeekday: Jn(Ke, 0), + todayVariant: Jn(Ne), + valueAsDate: Jn(Le, !1), + weekdayHeaderFormat: Jn(Ne, Yr, function (t) { + return hn([zr, Yr, "narrow"], t); + }), + width: Jn(Ne, "270px"), + } + ) + ), + zt + ), + Co = n.default.extend({ + name: zt, + mixins: [fr, yo, So, si], + props: Do, + data: function () { + var t = eo(this[ko]) || ""; + return { + selectedYMD: t, + activeYMD: + t || + eo(po(this.initialDate || this.getToday()), this.min, this.max), + gridHasFocus: !1, + isLive: !1, + }; + }, + computed: { + valueId: function () { + return this.safeId(); + }, + widgetId: function () { + return this.safeId("_calendar-wrapper_"); + }, + navId: function () { + return this.safeId("_calendar-nav_"); + }, + gridId: function () { + return this.safeId("_calendar-grid_"); + }, + gridCaptionId: function () { + return this.safeId("_calendar-grid-caption_"); + }, + gridHelpId: function () { + return this.safeId("_calendar-grid-help_"); + }, + activeId: function () { + return this.activeYMD + ? this.safeId("_cell-".concat(this.activeYMD, "_")) + : null; + }, + selectedDate: function () { + return to(this.selectedYMD); + }, + activeDate: function () { + return to(this.activeYMD); + }, + computedMin: function () { + return to(this.min); + }, + computedMax: function () { + return to(this.max); + }, + computedWeekStarts: function () { + return ji(pn(this.startWeekday, 0), 0) % 7; + }, + computedLocale: function () { + return (function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : Nr; + return ( + (t = fn(t).filter(Lt)), + new Intl.DateTimeFormat(t, { calendar: e }).resolvedOptions() + .locale + ); + })(fn(this.locale).filter(Lt), Nr); + }, + computedDateDisabledFn: function () { + var t = this.dateDisabledFn; + return ni(t) + ? t + : function () { + return !1; + }; + }, + computedDateInfoFn: function () { + var t = this.dateInfoFn; + return ni(t) + ? t + : function () { + return {}; + }; + }, + calendarLocale: function () { + var t = new Intl.DateTimeFormat(this.computedLocale, { + calendar: Nr, + }), + e = t.resolvedOptions().calendar, + n = t.resolvedOptions().locale; + return ( + e !== Nr && (n = n.replace(/-u-.+$/i, "").concat("-u-ca-gregory")), + n + ); + }, + calendarYear: function () { + return this.activeDate.getFullYear(); + }, + calendarMonth: function () { + return this.activeDate.getMonth(); + }, + calendarFirstDay: function () { + return Qr(this.calendarYear, this.calendarMonth, 1, 12); + }, + calendarDaysInMonth: function () { + var t = Qr(this.calendarFirstDay); + return t.setMonth(t.getMonth() + 1, 0), t.getDate(); + }, + computedVariant: function () { + return "btn-".concat(this.selectedVariant || "primary"); + }, + computedTodayVariant: function () { + return "btn-outline-".concat( + this.todayVariant || this.selectedVariant || "primary" + ); + }, + computedNavButtonVariant: function () { + return "btn-outline-".concat(this.navButtonVariant || "primary"); + }, + isRTL: function () { + var t = gn(this.direction).toLowerCase(); + return "rtl" === t || ("ltr" !== t && mo(this.computedLocale)); + }, + context: function () { + var t = this.selectedYMD, + e = this.activeYMD, + n = to(t), + i = to(e); + return { + selectedYMD: t, + selectedDate: n, + selectedFormatted: n + ? this.formatDateString(n) + : this.labelNoDateSelected, + activeYMD: e, + activeDate: i, + activeFormatted: i ? this.formatDateString(i) : "", + disabled: this.dateDisabled(i), + locale: this.computedLocale, + calendarLocale: this.calendarLocale, + rtl: this.isRTL, + }; + }, + dateOutOfRange: function () { + var t = this.computedMin, + e = this.computedMax; + return function (n) { + return (n = to(n)), (t && n < t) || (e && n > e); + }; + }, + dateDisabled: function () { + var t = this, + e = this.dateOutOfRange; + return function (n) { + n = to(n); + var i = eo(n); + return !(!e(n) && !t.computedDateDisabledFn(i, n)); + }; + }, + formatDateString: function () { + return no( + this.calendarLocale, + Oo( + Oo({ year: Wr, month: Gr, day: Gr }, this.dateFormatOptions), + {}, + { hour: void 0, minute: void 0, second: void 0, calendar: Nr } + ) + ); + }, + formatYearMonth: function () { + return no(this.calendarLocale, { year: Wr, month: zr, calendar: Nr }); + }, + formatWeekdayName: function () { + return no(this.calendarLocale, { weekday: zr, calendar: Nr }); + }, + formatWeekdayNameShort: function () { + return no(this.calendarLocale, { + weekday: this.weekdayHeaderFormat || Yr, + calendar: Nr, + }); + }, + formatDay: function () { + var t = new Intl.NumberFormat([this.computedLocale], { + style: "decimal", + minimumIntegerDigits: 1, + minimumFractionDigits: 0, + maximumFractionDigits: 0, + notation: "standard", + }); + return function (e) { + return t.format(e.getDate()); + }; + }, + prevDecadeDisabled: function () { + var t = this.computedMin; + return this.disabled || (t && oo(ho(this.activeDate)) < t); + }, + prevYearDisabled: function () { + var t = this.computedMin; + return this.disabled || (t && oo(co(this.activeDate)) < t); + }, + prevMonthDisabled: function () { + var t = this.computedMin; + return this.disabled || (t && oo(so(this.activeDate)) < t); + }, + thisMonthDisabled: function () { + return this.disabled; + }, + nextMonthDisabled: function () { + var t = this.computedMax; + return this.disabled || (t && ro(lo(this.activeDate)) > t); + }, + nextYearDisabled: function () { + var t = this.computedMax; + return this.disabled || (t && ro(uo(this.activeDate)) > t); + }, + nextDecadeDisabled: function () { + var t = this.computedMax; + return this.disabled || (t && ro(fo(this.activeDate)) > t); + }, + calendar: function () { + for ( + var t = [], + e = this.calendarFirstDay, + n = e.getFullYear(), + i = e.getMonth(), + r = this.calendarDaysInMonth, + o = e.getDay(), + a = + 0 - + ((this.computedWeekStarts > o ? 7 : 0) - + this.computedWeekStarts) - + o, + s = 0; + s < 6 && a < r; + s++ + ) { + t[s] = []; + for (var l = 0; l < 7; l++) { + a++; + var c = Qr(n, i, a), + u = c.getMonth(), + d = eo(c), + h = this.dateDisabled(c), + f = this.computedDateInfoFn(d, to(d)); + (f = + ct(f) || dt(f) + ? { class: f } + : ft(f) + ? Oo({ class: "" }, f) + : { class: "" }), + t[s].push({ + ymd: d, + day: this.formatDay(c), + label: this.formatDateString(c), + isThisMonth: u === i, + isDisabled: h, + info: f, + }); + } + } + return t; + }, + calendarHeadings: function () { + var t = this; + return this.calendar[0].map(function (e) { + return { + text: t.formatWeekdayNameShort(to(e.ymd)), + label: t.formatWeekdayName(to(e.ymd)), + }; + }); + }, + }, + watch: + ((Zr = {}), + wo(Zr, ko, function (t, e) { + var n = eo(t) || "", + i = eo(e) || ""; + io(n, i) || + ((this.activeYMD = n || this.activeYMD), (this.selectedYMD = n)); + }), + wo(Zr, "selectedYMD", function (t, e) { + t !== e && this.$emit(Po, this.valueAsDate ? to(t) || null : t || ""); + }), + wo(Zr, "context", function (t, e) { + lr(t, e) || this.$emit(ce, t); + }), + wo(Zr, "hidden", function (t) { + (this.activeYMD = + this.selectedYMD || + eo( + this[ko] || + this.constrainDate(this.initialDate || this.getToday()) + )), + this.setLive(!t); + }), + Zr), + created: function () { + var t = this; + this.$nextTick(function () { + t.$emit(ce, t.context); + }); + }, + mounted: function () { + this.setLive(!0); + }, + activated: function () { + this.setLive(!0); + }, + deactivated: function () { + this.setLive(!1); + }, + beforeDestroy: function () { + this.setLive(!1); + }, + methods: { + focus: function () { + this.disabled || Nn(this.$refs.grid); + }, + blur: function () { + this.disabled || zn(this.$refs.grid); + }, + setLive: function (t) { + var e = this; + t + ? this.$nextTick(function () { + jn(function () { + e.isLive = !0; + }); + }) + : (this.isLive = !1); + }, + getToday: function () { + return to(Qr()); + }, + constrainDate: function (t) { + return po(t, this.computedMin, this.computedMax); + }, + emitSelected: function (t) { + var e = this; + this.$nextTick(function () { + e.$emit(De, eo(t) || "", to(t) || null); + }); + }, + setGridFocusFlag: function (t) { + this.gridHasFocus = !this.disabled && "focus" === t.type; + }, + onKeydownWrapper: function (t) { + if (!this.noKeyNav) { + var e = t.altKey, + n = t.ctrlKey, + i = t.keyCode; + if (hn([33, 34, 35, 36, 37, ar, 39, ir], i)) { + hi(t); + var r = Qr(this.activeDate), + o = Qr(this.activeDate), + a = r.getDate(), + s = this.constrainDate(this.getToday()), + l = this.isRTL; + 33 === i + ? ((r = (e ? (n ? ho : co) : so)(r)), (o = Qr(r)).setDate(1)) + : 34 === i + ? ((r = (e ? (n ? fo : uo) : lo)(r)), + (o = Qr(r)).setMonth(o.getMonth() + 1), + o.setDate(0)) + : 37 === i + ? (r.setDate(a + (l ? 1 : -1)), (o = r = this.constrainDate(r))) + : 39 === i + ? (r.setDate(a + (l ? -1 : 1)), (o = r = this.constrainDate(r))) + : i === ar + ? (r.setDate(a - 7), (o = r = this.constrainDate(r))) + : i === ir + ? (r.setDate(a + 7), (o = r = this.constrainDate(r))) + : 36 === i + ? (o = r = s) + : 35 === i && (o = r = to(this.selectedDate) || s), + this.dateOutOfRange(o) || + io(r, this.activeDate) || + (this.activeYMD = eo(r)), + this.focus(); + } + } + }, + onKeydownGrid: function (t) { + var e = t.keyCode, + n = this.activeDate; + (e !== rr && e !== or) || + (hi(t), + this.disabled || + this.readonly || + this.dateDisabled(n) || + ((this.selectedYMD = eo(n)), this.emitSelected(n)), + this.focus()); + }, + onClickDay: function (t) { + var e = this.selectedDate, + n = this.activeDate, + i = to(t.ymd); + this.disabled || + t.isDisabled || + this.dateDisabled(i) || + (this.readonly || + ((this.selectedYMD = eo(io(i, e) ? e : i)), this.emitSelected(i)), + (this.activeYMD = eo(io(i, n) ? n : Qr(i))), + this.focus()); + }, + gotoPrevDecade: function () { + this.activeYMD = eo(this.constrainDate(ho(this.activeDate))); + }, + gotoPrevYear: function () { + this.activeYMD = eo(this.constrainDate(co(this.activeDate))); + }, + gotoPrevMonth: function () { + this.activeYMD = eo(this.constrainDate(so(this.activeDate))); + }, + gotoCurrentMonth: function () { + this.activeYMD = eo(this.constrainDate(this.getToday())); + }, + gotoNextMonth: function () { + this.activeYMD = eo(this.constrainDate(lo(this.activeDate))); + }, + gotoNextYear: function () { + this.activeYMD = eo(this.constrainDate(uo(this.activeDate))); + }, + gotoNextDecade: function () { + this.activeYMD = eo(this.constrainDate(fo(this.activeDate))); + }, + onHeaderClick: function () { + this.disabled || + ((this.activeYMD = this.selectedYMD || eo(this.getToday())), + this.focus()); + }, + }, + render: function (t) { + var e = this; + if (this.hidden) return t(); + var n = this.valueId, + i = this.widgetId, + r = this.navId, + o = this.gridId, + a = this.gridCaptionId, + s = this.gridHelpId, + l = this.activeId, + c = this.disabled, + u = this.noKeyNav, + d = this.isLive, + h = this.isRTL, + f = this.activeYMD, + p = this.selectedYMD, + b = this.safeId, + m = !this.showDecadeNav, + v = eo(this.getToday()), + y = !this.noHighlightToday, + g = t( + "output", + { + staticClass: "form-control form-control-sm text-center", + class: { "text-muted": c, readonly: this.readonly || c }, + attrs: { + id: n, + for: o, + role: "status", + tabindex: c ? null : "-1", + "data-selected": gn(p), + "aria-live": d ? "polite" : "off", + "aria-atomic": d ? "true" : null, + }, + on: { click: this.onHeaderClick, focus: this.onHeaderClick }, + }, + this.selectedDate + ? [ + t( + "bdi", + { staticClass: "sr-only" }, + " (".concat(gn(this.labelSelected), ") ") + ), + t("bdi", this.formatDateString(this.selectedDate)), + ] + : this.labelNoDateSelected || " " + ); + g = t( + "header", + { + staticClass: "b-calendar-header", + class: { "sr-only": this.hideHeader }, + attrs: { + title: (this.selectedDate && this.labelSelectedDate) || null, + }, + }, + [g] + ); + var O = { isRTL: h }, + w = { shiftV: 0.5 }, + T = Oo(Oo({}, w), {}, { flipH: h }), + S = Oo(Oo({}, w), {}, { flipH: !h }), + j = this.normalizeSlot("nav-prev-decade", O) || t(Hi, { props: T }), + k = this.normalizeSlot("nav-prev-year", O) || t(Ni, { props: T }), + P = this.normalizeSlot("nav-prev-month", O) || t(Yi, { props: T }), + D = this.normalizeSlot("nav-this-month", O) || t(Gi, { props: w }), + C = this.normalizeSlot("nav-next-month", O) || t(Yi, { props: S }), + x = this.normalizeSlot("nav-next-year", O) || t(Ni, { props: S }), + $ = this.normalizeSlot("nav-next-decade", O) || t(Hi, { props: S }), + E = function (n, i, r, o, a) { + return t( + "button", + { + staticClass: "btn btn-sm border-0 flex-fill", + class: [e.computedNavButtonVariant, { disabled: o }], + attrs: { + title: i || null, + type: "button", + tabindex: u ? "-1" : null, + "aria-label": i || null, + "aria-disabled": o ? "true" : null, + "aria-keyshortcuts": a || null, + }, + on: o ? {} : { click: r }, + }, + [t("div", { attrs: { "aria-hidden": "true" } }, [n])] + ); + }, + F = t( + "div", + { + staticClass: "b-calendar-nav d-flex", + attrs: { + id: r, + role: "group", + tabindex: u ? "-1" : null, + "aria-hidden": c ? "true" : null, + "aria-label": this.labelNav || null, + "aria-controls": o, + }, + }, + [ + m + ? t() + : E( + j, + this.labelPrevDecade, + this.gotoPrevDecade, + this.prevDecadeDisabled, + "Ctrl+Alt+PageDown" + ), + E( + k, + this.labelPrevYear, + this.gotoPrevYear, + this.prevYearDisabled, + "Alt+PageDown" + ), + E( + P, + this.labelPrevMonth, + this.gotoPrevMonth, + this.prevMonthDisabled, + "PageDown" + ), + E( + D, + this.labelCurrentMonth, + this.gotoCurrentMonth, + this.thisMonthDisabled, + "Home" + ), + E( + C, + this.labelNextMonth, + this.gotoNextMonth, + this.nextMonthDisabled, + "PageUp" + ), + E( + x, + this.labelNextYear, + this.gotoNextYear, + this.nextYearDisabled, + "Alt+PageUp" + ), + m + ? t() + : E( + $, + this.labelNextDecade, + this.gotoNextDecade, + this.nextDecadeDisabled, + "Ctrl+Alt+PageUp" + ), + ] + ), + I = t( + "header", + { + staticClass: + "b-calendar-grid-caption text-center font-weight-bold", + class: { "text-muted": c }, + attrs: { + id: a, + "aria-live": d ? "polite" : null, + "aria-atomic": d ? "true" : null, + }, + key: "grid-caption", + }, + this.formatYearMonth(this.calendarFirstDay) + ), + M = t( + "div", + { + staticClass: + "b-calendar-grid-weekdays row no-gutters border-bottom", + attrs: { "aria-hidden": "true" }, + }, + this.calendarHeadings.map(function (e, n) { + return t( + "small", + { + staticClass: "col text-truncate", + class: { "text-muted": c }, + attrs: { + title: e.label === e.text ? null : e.label, + "aria-label": e.label, + }, + key: n, + }, + e.text + ); + }) + ), + _ = this.calendar.map(function (n) { + var i = n.map(function (n, i) { + var r, + o = n.ymd === p, + a = n.ymd === f, + s = n.ymd === v, + l = b("_cell-".concat(n.ymd, "_")), + u = t( + "span", + { + staticClass: "btn border-0 rounded-circle text-nowrap", + class: + ((r = { + focus: a && e.gridHasFocus, + disabled: n.isDisabled || c, + active: o, + }), + wo(r, e.computedVariant, o), + wo( + r, + e.computedTodayVariant, + s && y && !o && n.isThisMonth + ), + wo(r, "btn-outline-light", !((s && y) || o || a)), + wo(r, "btn-light", !(s && y) && !o && a), + wo(r, "text-muted", !n.isThisMonth && !o), + wo( + r, + "text-dark", + !(s && y) && !o && !a && n.isThisMonth + ), + wo( + r, + "font-weight-bold", + (o || n.isThisMonth) && !n.isDisabled + ), + r), + on: { + click: function () { + return e.onClickDay(n); + }, + }, + }, + n.day + ); + return t( + "div", + { + staticClass: "col p-0", + class: n.isDisabled ? "bg-light" : n.info.class || "", + attrs: { + id: l, + role: "button", + "data-date": n.ymd, + "aria-hidden": n.isThisMonth ? null : "true", + "aria-disabled": n.isDisabled || c ? "true" : null, + "aria-label": [ + n.label, + o ? "(".concat(e.labelSelected, ")") : null, + s ? "(".concat(e.labelToday, ")") : null, + ] + .filter(Lt) + .join(" "), + "aria-selected": o ? "true" : null, + "aria-current": o ? "date" : null, + }, + key: i, + }, + [u] + ); + }); + return t( + "div", + { staticClass: "row no-gutters", key: n[0].ymd }, + i + ); + }); + _ = t( + "div", + { + staticClass: "b-calendar-grid-body", + style: c ? { pointerEvents: "none" } : {}, + }, + _ + ); + var L = t( + "footer", + { + staticClass: + "b-calendar-grid-help border-top small text-muted text-center bg-light", + attrs: { id: s }, + }, + [t("div", { staticClass: "small" }, this.labelHelp)] + ), + R = t( + "div", + { + staticClass: "b-calendar-grid form-control h-auto text-center", + attrs: { + id: o, + role: "application", + tabindex: u ? "-1" : c ? null : "0", + "data-month": f.slice(0, -3), + "aria-roledescription": this.labelCalendar || null, + "aria-labelledby": a, + "aria-describedby": s, + "aria-disabled": c ? "true" : null, + "aria-activedescendant": l, + }, + on: { + keydown: this.onKeydownGrid, + focus: this.setGridFocusFlag, + blur: this.setGridFocusFlag, + }, + ref: "grid", + }, + [I, M, _, L] + ), + V = this.normalizeSlot(); + V = V ? t("footer", { staticClass: "b-calendar-footer" }, V) : t(); + var A = t( + "div", + { + staticClass: "b-calendar-inner", + style: this.block ? {} : { width: this.width }, + attrs: { + id: i, + dir: h ? "rtl" : "ltr", + lang: this.computedLocale || null, + role: "group", + "aria-disabled": c ? "true" : null, + "aria-controls": this.ariaControls || null, + "aria-roledescription": this.roleDescription || null, + "aria-describedby": [this.bvAttrs["aria-describedby"], n, s] + .filter(Lt) + .join(" "), + }, + on: { keydown: this.onKeydownWrapper }, + }, + [g, F, R, V] + ); + return t( + "div", + { staticClass: "b-calendar", class: { "d-block": this.block } }, + [A] + ); + }, + }), + xo = function () {}, + $o = + "undefined" != typeof window && + "undefined" != typeof document && + "undefined" != typeof navigator, + Eo = (function () { + for (var t = ["Edge", "Trident", "Firefox"], e = 0; e < t.length; e += 1) + if ($o && navigator.userAgent.indexOf(t[e]) >= 0) return 1; + return 0; + })(); + var Fo = + $o && window.Promise + ? function (t) { + var e = !1; + return function () { + e || + ((e = !0), + window.Promise.resolve().then(function () { + (e = !1), t(); + })); + }; + } + : function (t) { + var e = !1; + return function () { + e || + ((e = !0), + setTimeout(function () { + (e = !1), t(); + }, Eo)); + }; + }; + function Io(t) { + return t && "[object Function]" === {}.toString.call(t); + } + function Mo(t, e) { + if (1 !== t.nodeType) return []; + var n = t.ownerDocument.defaultView.getComputedStyle(t, null); + return e ? n[e] : n; + } + function _o(t) { + return "HTML" === t.nodeName ? t : t.parentNode || t.host; + } + function Lo(t) { + if (!t) return document.body; + switch (t.nodeName) { + case "HTML": + case "BODY": + return t.ownerDocument.body; + case "#document": + return t.body; + } + var e = Mo(t), + n = e.overflow, + i = e.overflowX, + r = e.overflowY; + return /(auto|scroll|overlay)/.test(n + r + i) ? t : Lo(_o(t)); + } + function Ro(t) { + return t && t.referenceNode ? t.referenceNode : t; + } + var Vo = $o && !(!window.MSInputMethodContext || !document.documentMode), + Ao = $o && /MSIE 10/.test(navigator.userAgent); + function Bo(t) { + return 11 === t ? Vo : 10 === t ? Ao : Vo || Ao; + } + function Ho(t) { + if (!t) return document.documentElement; + for ( + var e = Bo(10) ? document.body : null, n = t.offsetParent || null; + n === e && t.nextElementSibling; + + ) + n = (t = t.nextElementSibling).offsetParent; + var i = n && n.nodeName; + return i && "BODY" !== i && "HTML" !== i + ? -1 !== ["TH", "TD", "TABLE"].indexOf(n.nodeName) && + "static" === Mo(n, "position") + ? Ho(n) + : n + : t + ? t.ownerDocument.documentElement + : document.documentElement; + } + function No(t) { + return null !== t.parentNode ? No(t.parentNode) : t; + } + function zo(t, e) { + if (!(t && t.nodeType && e && e.nodeType)) return document.documentElement; + var n = t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING, + i = n ? t : e, + r = n ? e : t, + o = document.createRange(); + o.setStart(i, 0), o.setEnd(r, 0); + var a, + s, + l = o.commonAncestorContainer; + if ((t !== l && e !== l) || i.contains(r)) + return "BODY" === (s = (a = l).nodeName) || + ("HTML" !== s && Ho(a.firstElementChild) !== a) + ? Ho(l) + : l; + var c = No(t); + return c.host ? zo(c.host, e) : zo(t, No(e).host); + } + function Yo(t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "top", + n = "top" === e ? "scrollTop" : "scrollLeft", + i = t.nodeName; + if ("BODY" === i || "HTML" === i) { + var r = t.ownerDocument.documentElement, + o = t.ownerDocument.scrollingElement || r; + return o[n]; + } + return t[n]; + } + function Go(t, e) { + var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], + i = Yo(e, "top"), + r = Yo(e, "left"), + o = n ? -1 : 1; + return ( + (t.top += i * o), + (t.bottom += i * o), + (t.left += r * o), + (t.right += r * o), + t + ); + } + function Wo(t, e) { + var n = "x" === e ? "Left" : "Top", + i = "Left" === n ? "Right" : "Bottom"; + return ( + parseFloat(t["border" + n + "Width"]) + + parseFloat(t["border" + i + "Width"]) + ); + } + function Uo(t, e, n, i) { + return Math.max( + e["offset" + t], + e["scroll" + t], + n["client" + t], + n["offset" + t], + n["scroll" + t], + Bo(10) + ? parseInt(n["offset" + t]) + + parseInt(i["margin" + ("Height" === t ? "Top" : "Left")]) + + parseInt(i["margin" + ("Height" === t ? "Bottom" : "Right")]) + : 0 + ); + } + function qo(t) { + var e = t.body, + n = t.documentElement, + i = Bo(10) && getComputedStyle(n); + return { height: Uo("Height", e, n, i), width: Uo("Width", e, n, i) }; + } + var Ko = function (t, e) { + if (!(t instanceof e)) + throw new TypeError("Cannot call a class as a function"); + }, + Xo = (function () { + function t(t, e) { + for (var n = 0; n < e.length; n++) { + var i = e[n]; + (i.enumerable = i.enumerable || !1), + (i.configurable = !0), + "value" in i && (i.writable = !0), + Object.defineProperty(t, i.key, i); + } + } + return function (e, n, i) { + return n && t(e.prototype, n), i && t(e, i), e; + }; + })(), + Jo = function (t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + }, + Zo = + Object.assign || + function (t) { + for (var e = 1; e < arguments.length; e++) { + var n = arguments[e]; + for (var i in n) + Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]); + } + return t; + }; + function Qo(t) { + return Zo({}, t, { right: t.left + t.width, bottom: t.top + t.height }); + } + function ta(t) { + var e = {}; + try { + if (Bo(10)) { + e = t.getBoundingClientRect(); + var n = Yo(t, "top"), + i = Yo(t, "left"); + (e.top += n), (e.left += i), (e.bottom += n), (e.right += i); + } else e = t.getBoundingClientRect(); + } catch (t) {} + var r = { + left: e.left, + top: e.top, + width: e.right - e.left, + height: e.bottom - e.top, + }, + o = "HTML" === t.nodeName ? qo(t.ownerDocument) : {}, + a = o.width || t.clientWidth || r.width, + s = o.height || t.clientHeight || r.height, + l = t.offsetWidth - a, + c = t.offsetHeight - s; + if (l || c) { + var u = Mo(t); + (l -= Wo(u, "x")), (c -= Wo(u, "y")), (r.width -= l), (r.height -= c); + } + return Qo(r); + } + function ea(t, e) { + var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], + i = Bo(10), + r = "HTML" === e.nodeName, + o = ta(t), + a = ta(e), + s = Lo(t), + l = Mo(e), + c = parseFloat(l.borderTopWidth), + u = parseFloat(l.borderLeftWidth); + n && r && ((a.top = Math.max(a.top, 0)), (a.left = Math.max(a.left, 0))); + var d = Qo({ + top: o.top - a.top - c, + left: o.left - a.left - u, + width: o.width, + height: o.height, + }); + if (((d.marginTop = 0), (d.marginLeft = 0), !i && r)) { + var h = parseFloat(l.marginTop), + f = parseFloat(l.marginLeft); + (d.top -= c - h), + (d.bottom -= c - h), + (d.left -= u - f), + (d.right -= u - f), + (d.marginTop = h), + (d.marginLeft = f); + } + return ( + (i && !n ? e.contains(s) : e === s && "BODY" !== s.nodeName) && + (d = Go(d, e)), + d + ); + } + function na(t) { + var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], + n = t.ownerDocument.documentElement, + i = ea(t, n), + r = Math.max(n.clientWidth, window.innerWidth || 0), + o = Math.max(n.clientHeight, window.innerHeight || 0), + a = e ? 0 : Yo(n), + s = e ? 0 : Yo(n, "left"), + l = { + top: a - i.top + i.marginTop, + left: s - i.left + i.marginLeft, + width: r, + height: o, + }; + return Qo(l); + } + function ia(t) { + var e = t.nodeName; + if ("BODY" === e || "HTML" === e) return !1; + if ("fixed" === Mo(t, "position")) return !0; + var n = _o(t); + return !!n && ia(n); + } + function ra(t) { + if (!t || !t.parentElement || Bo()) return document.documentElement; + for (var e = t.parentElement; e && "none" === Mo(e, "transform"); ) + e = e.parentElement; + return e || document.documentElement; + } + function oa(t, e, n, i) { + var r = arguments.length > 4 && void 0 !== arguments[4] && arguments[4], + o = { top: 0, left: 0 }, + a = r ? ra(t) : zo(t, Ro(e)); + if ("viewport" === i) o = na(a, r); + else { + var s = void 0; + "scrollParent" === i + ? "BODY" === (s = Lo(_o(e))).nodeName && + (s = t.ownerDocument.documentElement) + : (s = "window" === i ? t.ownerDocument.documentElement : i); + var l = ea(s, a, r); + if ("HTML" !== s.nodeName || ia(a)) o = l; + else { + var c = qo(t.ownerDocument), + u = c.height, + d = c.width; + (o.top += l.top - l.marginTop), + (o.bottom = u + l.top), + (o.left += l.left - l.marginLeft), + (o.right = d + l.left); + } + } + var h = "number" == typeof (n = n || 0); + return ( + (o.left += h ? n : n.left || 0), + (o.top += h ? n : n.top || 0), + (o.right -= h ? n : n.right || 0), + (o.bottom -= h ? n : n.bottom || 0), + o + ); + } + function aa(t) { + return t.width * t.height; + } + function sa(t, e, n, i, r) { + var o = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : 0; + if (-1 === t.indexOf("auto")) return t; + var a = oa(n, i, o, r), + s = { + top: { width: a.width, height: e.top - a.top }, + right: { width: a.right - e.right, height: a.height }, + bottom: { width: a.width, height: a.bottom - e.bottom }, + left: { width: e.left - a.left, height: a.height }, + }, + l = Object.keys(s) + .map(function (t) { + return Zo({ key: t }, s[t], { area: aa(s[t]) }); + }) + .sort(function (t, e) { + return e.area - t.area; + }), + c = l.filter(function (t) { + var e = t.width, + i = t.height; + return e >= n.clientWidth && i >= n.clientHeight; + }), + u = c.length > 0 ? c[0].key : l[0].key, + d = t.split("-")[1]; + return u + (d ? "-" + d : ""); + } + function la(t, e, n) { + var i = + arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, + r = i ? ra(e) : zo(e, Ro(n)); + return ea(n, r, i); + } + function ca(t) { + var e = t.ownerDocument.defaultView.getComputedStyle(t), + n = parseFloat(e.marginTop || 0) + parseFloat(e.marginBottom || 0), + i = parseFloat(e.marginLeft || 0) + parseFloat(e.marginRight || 0); + return { width: t.offsetWidth + i, height: t.offsetHeight + n }; + } + function ua(t) { + var e = { left: "right", right: "left", bottom: "top", top: "bottom" }; + return t.replace(/left|right|bottom|top/g, function (t) { + return e[t]; + }); + } + function da(t, e, n) { + n = n.split("-")[0]; + var i = ca(t), + r = { width: i.width, height: i.height }, + o = -1 !== ["right", "left"].indexOf(n), + a = o ? "top" : "left", + s = o ? "left" : "top", + l = o ? "height" : "width", + c = o ? "width" : "height"; + return ( + (r[a] = e[a] + e[l] / 2 - i[l] / 2), + (r[s] = n === s ? e[s] - i[c] : e[ua(s)]), + r + ); + } + function ha(t, e) { + return Array.prototype.find ? t.find(e) : t.filter(e)[0]; + } + function fa(t, e, n) { + var i = + void 0 === n + ? t + : t.slice( + 0, + (function (t, e, n) { + if (Array.prototype.findIndex) + return t.findIndex(function (t) { + return t[e] === n; + }); + var i = ha(t, function (t) { + return t[e] === n; + }); + return t.indexOf(i); + })(t, "name", n) + ); + return ( + i.forEach(function (t) { + t.function && + console.warn("`modifier.function` is deprecated, use `modifier.fn`!"); + var n = t.function || t.fn; + t.enabled && + Io(n) && + ((e.offsets.popper = Qo(e.offsets.popper)), + (e.offsets.reference = Qo(e.offsets.reference)), + (e = n(e, t))); + }), + e + ); + } + function pa() { + if (!this.state.isDestroyed) { + var t = { + instance: this, + styles: {}, + arrowStyles: {}, + attributes: {}, + flipped: !1, + offsets: {}, + }; + (t.offsets.reference = la( + this.state, + this.popper, + this.reference, + this.options.positionFixed + )), + (t.placement = sa( + this.options.placement, + t.offsets.reference, + this.popper, + this.reference, + this.options.modifiers.flip.boundariesElement, + this.options.modifiers.flip.padding + )), + (t.originalPlacement = t.placement), + (t.positionFixed = this.options.positionFixed), + (t.offsets.popper = da(this.popper, t.offsets.reference, t.placement)), + (t.offsets.popper.position = this.options.positionFixed + ? "fixed" + : "absolute"), + (t = fa(this.modifiers, t)), + this.state.isCreated + ? this.options.onUpdate(t) + : ((this.state.isCreated = !0), this.options.onCreate(t)); + } + } + function ba(t, e) { + return t.some(function (t) { + var n = t.name; + return t.enabled && n === e; + }); + } + function ma(t) { + for ( + var e = [!1, "ms", "Webkit", "Moz", "O"], + n = t.charAt(0).toUpperCase() + t.slice(1), + i = 0; + i < e.length; + i++ + ) { + var r = e[i], + o = r ? "" + r + n : t; + if (void 0 !== document.body.style[o]) return o; + } + return null; + } + function va() { + return ( + (this.state.isDestroyed = !0), + ba(this.modifiers, "applyStyle") && + (this.popper.removeAttribute("x-placement"), + (this.popper.style.position = ""), + (this.popper.style.top = ""), + (this.popper.style.left = ""), + (this.popper.style.right = ""), + (this.popper.style.bottom = ""), + (this.popper.style.willChange = ""), + (this.popper.style[ma("transform")] = "")), + this.disableEventListeners(), + this.options.removeOnDestroy && + this.popper.parentNode.removeChild(this.popper), + this + ); + } + function ya(t) { + var e = t.ownerDocument; + return e ? e.defaultView : window; + } + function ga(t, e, n, i) { + var r = "BODY" === t.nodeName, + o = r ? t.ownerDocument.defaultView : t; + o.addEventListener(e, n, { passive: !0 }), + r || ga(Lo(o.parentNode), e, n, i), + i.push(o); + } + function Oa(t, e, n, i) { + (n.updateBound = i), + ya(t).addEventListener("resize", n.updateBound, { passive: !0 }); + var r = Lo(t); + return ( + ga(r, "scroll", n.updateBound, n.scrollParents), + (n.scrollElement = r), + (n.eventsEnabled = !0), + n + ); + } + function wa() { + this.state.eventsEnabled || + (this.state = Oa( + this.reference, + this.options, + this.state, + this.scheduleUpdate + )); + } + function Ta() { + var t, e; + this.state.eventsEnabled && + (cancelAnimationFrame(this.scheduleUpdate), + (this.state = + ((t = this.reference), + (e = this.state), + ya(t).removeEventListener("resize", e.updateBound), + e.scrollParents.forEach(function (t) { + t.removeEventListener("scroll", e.updateBound); + }), + (e.updateBound = null), + (e.scrollParents = []), + (e.scrollElement = null), + (e.eventsEnabled = !1), + e))); + } + function Sa(t) { + return "" !== t && !isNaN(parseFloat(t)) && isFinite(t); + } + function ja(t, e) { + Object.keys(e).forEach(function (n) { + var i = ""; + -1 !== ["width", "height", "top", "right", "bottom", "left"].indexOf(n) && + Sa(e[n]) && + (i = "px"), + (t.style[n] = e[n] + i); + }); + } + var ka = $o && /Firefox/i.test(navigator.userAgent); + function Pa(t, e, n) { + var i = ha(t, function (t) { + return t.name === e; + }), + r = + !!i && + t.some(function (t) { + return t.name === n && t.enabled && t.order < i.order; + }); + if (!r) { + var o = "`" + e + "`", + a = "`" + n + "`"; + console.warn( + a + + " modifier is required by " + + o + + " modifier in order to work, be sure to include it before " + + o + + "!" + ); + } + return r; + } + var Da = [ + "auto-start", + "auto", + "auto-end", + "top-start", + "top", + "top-end", + "right-start", + "right", + "right-end", + "bottom-end", + "bottom", + "bottom-start", + "left-end", + "left", + "left-start", + ], + Ca = Da.slice(3); + function xa(t) { + var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], + n = Ca.indexOf(t), + i = Ca.slice(n + 1).concat(Ca.slice(0, n)); + return e ? i.reverse() : i; + } + var $a = "flip", + Ea = "clockwise", + Fa = "counterclockwise"; + function Ia(t, e, n, i) { + var r = [0, 0], + o = -1 !== ["right", "left"].indexOf(i), + a = t.split(/(\+|\-)/).map(function (t) { + return t.trim(); + }), + s = a.indexOf( + ha(a, function (t) { + return -1 !== t.search(/,|\s/); + }) + ); + a[s] && + -1 === a[s].indexOf(",") && + console.warn( + "Offsets separated by white space(s) are deprecated, use a comma (,) instead." + ); + var l = /\s*,\s*|\s+/, + c = + -1 !== s + ? [ + a.slice(0, s).concat([a[s].split(l)[0]]), + [a[s].split(l)[1]].concat(a.slice(s + 1)), + ] + : [a]; + return ( + (c = c.map(function (t, i) { + var r = (1 === i ? !o : o) ? "height" : "width", + a = !1; + return t + .reduce(function (t, e) { + return "" === t[t.length - 1] && -1 !== ["+", "-"].indexOf(e) + ? ((t[t.length - 1] = e), (a = !0), t) + : a + ? ((t[t.length - 1] += e), (a = !1), t) + : t.concat(e); + }, []) + .map(function (t) { + return (function (t, e, n, i) { + var r = t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/), + o = +r[1], + a = r[2]; + if (!o) return t; + if (0 === a.indexOf("%")) { + return (Qo("%p" === a ? n : i)[e] / 100) * o; + } + if ("vh" === a || "vw" === a) + return ( + (("vh" === a + ? Math.max( + document.documentElement.clientHeight, + window.innerHeight || 0 + ) + : Math.max( + document.documentElement.clientWidth, + window.innerWidth || 0 + )) / + 100) * + o + ); + return o; + })(t, r, e, n); + }); + })), + c.forEach(function (t, e) { + t.forEach(function (n, i) { + Sa(n) && (r[e] += n * ("-" === t[i - 1] ? -1 : 1)); + }); + }), + r + ); + } + var Ma = { + shift: { + order: 100, + enabled: !0, + fn: function (t) { + var e = t.placement, + n = e.split("-")[0], + i = e.split("-")[1]; + if (i) { + var r = t.offsets, + o = r.reference, + a = r.popper, + s = -1 !== ["bottom", "top"].indexOf(n), + l = s ? "left" : "top", + c = s ? "width" : "height", + u = { + start: Jo({}, l, o[l]), + end: Jo({}, l, o[l] + o[c] - a[c]), + }; + t.offsets.popper = Zo({}, a, u[i]); + } + return t; + }, + }, + offset: { + order: 200, + enabled: !0, + fn: function (t, e) { + var n = e.offset, + i = t.placement, + r = t.offsets, + o = r.popper, + a = r.reference, + s = i.split("-")[0], + l = void 0; + return ( + (l = Sa(+n) ? [+n, 0] : Ia(n, o, a, s)), + "left" === s + ? ((o.top += l[0]), (o.left -= l[1])) + : "right" === s + ? ((o.top += l[0]), (o.left += l[1])) + : "top" === s + ? ((o.left += l[0]), (o.top -= l[1])) + : "bottom" === s && ((o.left += l[0]), (o.top += l[1])), + (t.popper = o), + t + ); + }, + offset: 0, + }, + preventOverflow: { + order: 300, + enabled: !0, + fn: function (t, e) { + var n = e.boundariesElement || Ho(t.instance.popper); + t.instance.reference === n && (n = Ho(n)); + var i = ma("transform"), + r = t.instance.popper.style, + o = r.top, + a = r.left, + s = r[i]; + (r.top = ""), (r.left = ""), (r[i] = ""); + var l = oa( + t.instance.popper, + t.instance.reference, + e.padding, + n, + t.positionFixed + ); + (r.top = o), (r.left = a), (r[i] = s), (e.boundaries = l); + var c = e.priority, + u = t.offsets.popper, + d = { + primary: function (t) { + var n = u[t]; + return ( + u[t] < l[t] && + !e.escapeWithReference && + (n = Math.max(u[t], l[t])), + Jo({}, t, n) + ); + }, + secondary: function (t) { + var n = "right" === t ? "left" : "top", + i = u[n]; + return ( + u[t] > l[t] && + !e.escapeWithReference && + (i = Math.min( + u[n], + l[t] - ("right" === t ? u.width : u.height) + )), + Jo({}, n, i) + ); + }, + }; + return ( + c.forEach(function (t) { + var e = + -1 !== ["left", "top"].indexOf(t) ? "primary" : "secondary"; + u = Zo({}, u, d[e](t)); + }), + (t.offsets.popper = u), + t + ); + }, + priority: ["left", "right", "top", "bottom"], + padding: 5, + boundariesElement: "scrollParent", + }, + keepTogether: { + order: 400, + enabled: !0, + fn: function (t) { + var e = t.offsets, + n = e.popper, + i = e.reference, + r = t.placement.split("-")[0], + o = Math.floor, + a = -1 !== ["top", "bottom"].indexOf(r), + s = a ? "right" : "bottom", + l = a ? "left" : "top", + c = a ? "width" : "height"; + return ( + n[s] < o(i[l]) && (t.offsets.popper[l] = o(i[l]) - n[c]), + n[l] > o(i[s]) && (t.offsets.popper[l] = o(i[s])), + t + ); + }, + }, + arrow: { + order: 500, + enabled: !0, + fn: function (t, e) { + var n; + if (!Pa(t.instance.modifiers, "arrow", "keepTogether")) return t; + var i = e.element; + if ("string" == typeof i) { + if (!(i = t.instance.popper.querySelector(i))) return t; + } else if (!t.instance.popper.contains(i)) + return ( + console.warn( + "WARNING: `arrow.element` must be child of its popper element!" + ), + t + ); + var r = t.placement.split("-")[0], + o = t.offsets, + a = o.popper, + s = o.reference, + l = -1 !== ["left", "right"].indexOf(r), + c = l ? "height" : "width", + u = l ? "Top" : "Left", + d = u.toLowerCase(), + h = l ? "left" : "top", + f = l ? "bottom" : "right", + p = ca(i)[c]; + s[f] - p < a[d] && (t.offsets.popper[d] -= a[d] - (s[f] - p)), + s[d] + p > a[f] && (t.offsets.popper[d] += s[d] + p - a[f]), + (t.offsets.popper = Qo(t.offsets.popper)); + var b = s[d] + s[c] / 2 - p / 2, + m = Mo(t.instance.popper), + v = parseFloat(m["margin" + u]), + y = parseFloat(m["border" + u + "Width"]), + g = b - t.offsets.popper[d] - v - y; + return ( + (g = Math.max(Math.min(a[c] - p, g), 0)), + (t.arrowElement = i), + (t.offsets.arrow = + (Jo((n = {}), d, Math.round(g)), Jo(n, h, ""), n)), + t + ); + }, + element: "[x-arrow]", + }, + flip: { + order: 600, + enabled: !0, + fn: function (t, e) { + if (ba(t.instance.modifiers, "inner")) return t; + if (t.flipped && t.placement === t.originalPlacement) return t; + var n = oa( + t.instance.popper, + t.instance.reference, + e.padding, + e.boundariesElement, + t.positionFixed + ), + i = t.placement.split("-")[0], + r = ua(i), + o = t.placement.split("-")[1] || "", + a = []; + switch (e.behavior) { + case $a: + a = [i, r]; + break; + case Ea: + a = xa(i); + break; + case Fa: + a = xa(i, !0); + break; + default: + a = e.behavior; + } + return ( + a.forEach(function (s, l) { + if (i !== s || a.length === l + 1) return t; + (i = t.placement.split("-")[0]), (r = ua(i)); + var c = t.offsets.popper, + u = t.offsets.reference, + d = Math.floor, + h = + ("left" === i && d(c.right) > d(u.left)) || + ("right" === i && d(c.left) < d(u.right)) || + ("top" === i && d(c.bottom) > d(u.top)) || + ("bottom" === i && d(c.top) < d(u.bottom)), + f = d(c.left) < d(n.left), + p = d(c.right) > d(n.right), + b = d(c.top) < d(n.top), + m = d(c.bottom) > d(n.bottom), + v = + ("left" === i && f) || + ("right" === i && p) || + ("top" === i && b) || + ("bottom" === i && m), + y = -1 !== ["top", "bottom"].indexOf(i), + g = + !!e.flipVariations && + ((y && "start" === o && f) || + (y && "end" === o && p) || + (!y && "start" === o && b) || + (!y && "end" === o && m)), + O = + !!e.flipVariationsByContent && + ((y && "start" === o && p) || + (y && "end" === o && f) || + (!y && "start" === o && m) || + (!y && "end" === o && b)), + w = g || O; + (h || v || w) && + ((t.flipped = !0), + (h || v) && (i = a[l + 1]), + w && + (o = (function (t) { + return "end" === t ? "start" : "start" === t ? "end" : t; + })(o)), + (t.placement = i + (o ? "-" + o : "")), + (t.offsets.popper = Zo( + {}, + t.offsets.popper, + da(t.instance.popper, t.offsets.reference, t.placement) + )), + (t = fa(t.instance.modifiers, t, "flip"))); + }), + t + ); + }, + behavior: "flip", + padding: 5, + boundariesElement: "viewport", + flipVariations: !1, + flipVariationsByContent: !1, + }, + inner: { + order: 700, + enabled: !1, + fn: function (t) { + var e = t.placement, + n = e.split("-")[0], + i = t.offsets, + r = i.popper, + o = i.reference, + a = -1 !== ["left", "right"].indexOf(n), + s = -1 === ["top", "left"].indexOf(n); + return ( + (r[a ? "left" : "top"] = + o[n] - (s ? r[a ? "width" : "height"] : 0)), + (t.placement = ua(e)), + (t.offsets.popper = Qo(r)), + t + ); + }, + }, + hide: { + order: 800, + enabled: !0, + fn: function (t) { + if (!Pa(t.instance.modifiers, "hide", "preventOverflow")) return t; + var e = t.offsets.reference, + n = ha(t.instance.modifiers, function (t) { + return "preventOverflow" === t.name; + }).boundaries; + if ( + e.bottom < n.top || + e.left > n.right || + e.top > n.bottom || + e.right < n.left + ) { + if (!0 === t.hide) return t; + (t.hide = !0), (t.attributes["x-out-of-boundaries"] = ""); + } else { + if (!1 === t.hide) return t; + (t.hide = !1), (t.attributes["x-out-of-boundaries"] = !1); + } + return t; + }, + }, + computeStyle: { + order: 850, + enabled: !0, + fn: function (t, e) { + var n = e.x, + i = e.y, + r = t.offsets.popper, + o = ha(t.instance.modifiers, function (t) { + return "applyStyle" === t.name; + }).gpuAcceleration; + void 0 !== o && + console.warn( + "WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!" + ); + var a = void 0 !== o ? o : e.gpuAcceleration, + s = Ho(t.instance.popper), + l = ta(s), + c = { position: r.position }, + u = (function (t, e) { + var n = t.offsets, + i = n.popper, + r = n.reference, + o = Math.round, + a = Math.floor, + s = function (t) { + return t; + }, + l = o(r.width), + c = o(i.width), + u = -1 !== ["left", "right"].indexOf(t.placement), + d = -1 !== t.placement.indexOf("-"), + h = e ? (u || d || l % 2 == c % 2 ? o : a) : s, + f = e ? o : s; + return { + left: h( + l % 2 == 1 && c % 2 == 1 && !d && e ? i.left - 1 : i.left + ), + top: f(i.top), + bottom: f(i.bottom), + right: h(i.right), + }; + })(t, window.devicePixelRatio < 2 || !ka), + d = "bottom" === n ? "top" : "bottom", + h = "right" === i ? "left" : "right", + f = ma("transform"), + p = void 0, + b = void 0; + if ( + ((b = + "bottom" === d + ? "HTML" === s.nodeName + ? -s.clientHeight + u.bottom + : -l.height + u.bottom + : u.top), + (p = + "right" === h + ? "HTML" === s.nodeName + ? -s.clientWidth + u.right + : -l.width + u.right + : u.left), + a && f) + ) + (c[f] = "translate3d(" + p + "px, " + b + "px, 0)"), + (c[d] = 0), + (c[h] = 0), + (c.willChange = "transform"); + else { + var m = "bottom" === d ? -1 : 1, + v = "right" === h ? -1 : 1; + (c[d] = b * m), (c[h] = p * v), (c.willChange = d + ", " + h); + } + var y = { "x-placement": t.placement }; + return ( + (t.attributes = Zo({}, y, t.attributes)), + (t.styles = Zo({}, c, t.styles)), + (t.arrowStyles = Zo({}, t.offsets.arrow, t.arrowStyles)), + t + ); + }, + gpuAcceleration: !0, + x: "bottom", + y: "right", + }, + applyStyle: { + order: 900, + enabled: !0, + fn: function (t) { + var e, n; + return ( + ja(t.instance.popper, t.styles), + (e = t.instance.popper), + (n = t.attributes), + Object.keys(n).forEach(function (t) { + !1 !== n[t] ? e.setAttribute(t, n[t]) : e.removeAttribute(t); + }), + t.arrowElement && + Object.keys(t.arrowStyles).length && + ja(t.arrowElement, t.arrowStyles), + t + ); + }, + onLoad: function (t, e, n, i, r) { + var o = la(r, e, t, n.positionFixed), + a = sa( + n.placement, + o, + e, + t, + n.modifiers.flip.boundariesElement, + n.modifiers.flip.padding + ); + return ( + e.setAttribute("x-placement", a), + ja(e, { position: n.positionFixed ? "fixed" : "absolute" }), + n + ); + }, + gpuAcceleration: void 0, + }, + }, + _a = { + placement: "bottom", + positionFixed: !1, + eventsEnabled: !0, + removeOnDestroy: !1, + onCreate: function () {}, + onUpdate: function () {}, + modifiers: Ma, + }, + La = (function () { + function t(e, n) { + var i = this, + r = + arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; + Ko(this, t), + (this.scheduleUpdate = function () { + return requestAnimationFrame(i.update); + }), + (this.update = Fo(this.update.bind(this))), + (this.options = Zo({}, t.Defaults, r)), + (this.state = { isDestroyed: !1, isCreated: !1, scrollParents: [] }), + (this.reference = e && e.jquery ? e[0] : e), + (this.popper = n && n.jquery ? n[0] : n), + (this.options.modifiers = {}), + Object.keys(Zo({}, t.Defaults.modifiers, r.modifiers)).forEach( + function (e) { + i.options.modifiers[e] = Zo( + {}, + t.Defaults.modifiers[e] || {}, + r.modifiers ? r.modifiers[e] : {} + ); + } + ), + (this.modifiers = Object.keys(this.options.modifiers) + .map(function (t) { + return Zo({ name: t }, i.options.modifiers[t]); + }) + .sort(function (t, e) { + return t.order - e.order; + })), + this.modifiers.forEach(function (t) { + t.enabled && + Io(t.onLoad) && + t.onLoad(i.reference, i.popper, i.options, t, i.state); + }), + this.update(); + var o = this.options.eventsEnabled; + o && this.enableEventListeners(), (this.state.eventsEnabled = o); + } + return ( + Xo(t, [ + { + key: "update", + value: function () { + return pa.call(this); + }, + }, + { + key: "destroy", + value: function () { + return va.call(this); + }, + }, + { + key: "enableEventListeners", + value: function () { + return wa.call(this); + }, + }, + { + key: "disableEventListeners", + value: function () { + return Ta.call(this); + }, + }, + ]), + t + ); + })(); + (La.Utils = ("undefined" != typeof window ? window : global).PopperUtils), + (La.placements = Da), + (La.Defaults = _a); + var Ra = La; + function Va(t, e) { + if (!(t instanceof e)) + throw new TypeError("Cannot call a class as a function"); + } + function Aa(t, e) { + for (var n = 0; n < e.length; n++) { + var i = e[n]; + (i.enumerable = i.enumerable || !1), + (i.configurable = !0), + "value" in i && (i.writable = !0), + Object.defineProperty(t, i.key, i); + } + } + var Ba = (function () { + function t(e) { + var n = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + if ((Va(this, t), !e)) + throw new TypeError( + "Failed to construct '" + .concat(this.constructor.name, "'. 1 argument required, ") + .concat(arguments.length, " given.") + ); + Ot(this, t.Defaults, this.constructor.Defaults, n, { type: e }), + wt(this, { + type: { enumerable: !0, configurable: !1, writable: !1 }, + cancelable: { enumerable: !0, configurable: !1, writable: !1 }, + nativeEvent: { enumerable: !0, configurable: !1, writable: !1 }, + target: { enumerable: !0, configurable: !1, writable: !1 }, + relatedTarget: { enumerable: !0, configurable: !1, writable: !1 }, + vueTarget: { enumerable: !0, configurable: !1, writable: !1 }, + componentId: { enumerable: !0, configurable: !1, writable: !1 }, + }); + var i = !1; + (this.preventDefault = function () { + this.cancelable && (i = !0); + }), + Tt(this, "defaultPrevented", { + enumerable: !0, + get: function () { + return i; + }, + }); + } + var e, n, i; + return ( + (e = t), + (i = [ + { + key: "Defaults", + get: function () { + return { + type: "", + cancelable: !0, + nativeEvent: null, + target: null, + relatedTarget: null, + vueTarget: null, + componentId: null, + }; + }, + }, + ]), + (n = null) && Aa(e.prototype, n), + i && Aa(e, i), + t + ); + })(), + Ha = n.default.extend({ + data: function () { + return { listenForClickOut: !1 }; + }, + watch: { + listenForClickOut: function (t, e) { + t !== e && + (ui( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + Ie + ), + t && + ci( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + Ie + )); + }, + }, + beforeCreate: function () { + (this.clickOutElement = null), (this.clickOutEventName = null); + }, + mounted: function () { + this.clickOutElement || (this.clickOutElement = document), + this.clickOutEventName || (this.clickOutEventName = "click"), + this.listenForClickOut && + ci( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + Ie + ); + }, + beforeDestroy: function () { + ui( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + Ie + ); + }, + methods: { + isClickOut: function (t) { + return !Fn(this.$el, t.target); + }, + _clickOutHandler: function (t) { + this.clickOutHandler && this.isClickOut(t) && this.clickOutHandler(t); + }, + }, + }), + Na = n.default.extend({ + data: function () { + return { listenForFocusIn: !1 }; + }, + watch: { + listenForFocusIn: function (t, e) { + t !== e && + (ui(this.focusInElement, "focusin", this._focusInHandler, Ie), + t && ci(this.focusInElement, "focusin", this._focusInHandler, Ie)); + }, + }, + beforeCreate: function () { + this.focusInElement = null; + }, + mounted: function () { + this.focusInElement || (this.focusInElement = document), + this.listenForFocusIn && + ci(this.focusInElement, "focusin", this._focusInHandler, Ie); + }, + beforeDestroy: function () { + ui(this.focusInElement, "focusin", this._focusInHandler, Ie); + }, + methods: { + _focusInHandler: function (t) { + this.focusInHandler && this.focusInHandler(t); + }, + }, + }); + function za(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Ya(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? za(Object(n), !0).forEach(function (e) { + Ga(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : za(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Ga(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Wa, + Ua, + qa = pi(Yt, xe), + Ka = pi(Yt, ge), + Xa = [".dropdown-item", ".b-dropdown-form"] + .map(function (t) { + return "".concat(t, ":not(.disabled):not([disabled])"); + }) + .join(", "), + Ja = ti( + xt( + Ya( + Ya({}, vo), + {}, + { + boundary: Jn([tt, Ne], "scrollParent"), + disabled: Jn(Le, !1), + dropleft: Jn(Le, !1), + dropright: Jn(Le, !1), + dropup: Jn(Le, !1), + noFlip: Jn(Le, !1), + offset: Jn(Ke, 0), + popperOpts: Jn(Be, {}), + right: Jn(Le, !1), + } + ) + ), + Yt + ), + Za = n.default.extend({ + mixins: [yo, pr, Ha, Na], + provide: function () { + return { bvDropdown: this }; + }, + inject: { bvNavbar: { default: null } }, + props: Ja, + data: function () { + return { visible: !1, visibleChangePrevented: !1 }; + }, + computed: { + inNavbar: function () { + return !ot(this.bvNavbar); + }, + toggler: function () { + var t = this.$refs.toggle; + return t ? t.$el || t : null; + }, + directionClass: function () { + return this.dropup + ? "dropup" + : this.dropright + ? "dropright" + : this.dropleft + ? "dropleft" + : ""; + }, + boundaryClass: function () { + return "scrollParent" === this.boundary || this.inNavbar + ? "" + : "position-static"; + }, + }, + watch: { + visible: function (t, e) { + if (this.visibleChangePrevented) this.visibleChangePrevented = !1; + else if (t !== e) { + var n = new Ba(t ? Ce : Oe, { + cancelable: !0, + vueTarget: this, + target: this.$refs.menu, + relatedTarget: null, + componentId: this.safeId ? this.safeId() : this.id || null, + }); + if ((this.emitEvent(n), n.defaultPrevented)) + return ( + (this.visibleChangePrevented = !0), + (this.visible = e), + void this.$off(ge, this.focusToggler) + ); + t ? this.showMenu() : this.hideMenu(); + } + }, + disabled: function (t, e) { + t !== e && t && this.visible && (this.visible = !1); + }, + }, + created: function () { + (this.$_popper = null), (this.$_hideTimeout = null); + }, + deactivated: function () { + (this.visible = !1), this.whileOpenListen(!1), this.destroyPopper(); + }, + beforeDestroy: function () { + (this.visible = !1), + this.whileOpenListen(!1), + this.destroyPopper(), + this.clearHideTimeout(); + }, + methods: { + emitEvent: function (t) { + var e = t.type; + this.emitOnRoot(pi(Yt, e), t), this.$emit(e, t); + }, + showMenu: function () { + var t = this; + if (!this.disabled) { + if (!this.inNavbar) + if (void 0 === Ra) + Ht("Popper.js not found. Falling back to CSS positioning", Yt); + else { + var e = + (this.dropup && this.right) || this.split + ? this.$el + : this.$refs.toggle; + (e = e.$el || e), this.createPopper(e); + } + this.emitOnRoot(qa, this), + this.whileOpenListen(!0), + this.$nextTick(function () { + t.focusMenu(), t.$emit(xe); + }); + } + }, + hideMenu: function () { + this.whileOpenListen(!1), + this.emitOnRoot(Ka, this), + this.$emit(ge), + this.destroyPopper(); + }, + createPopper: function (t) { + this.destroyPopper(), + (this.$_popper = new Ra( + t, + this.$refs.menu, + this.getPopperConfig() + )); + }, + destroyPopper: function () { + this.$_popper && this.$_popper.destroy(), (this.$_popper = null); + }, + updatePopper: function () { + try { + this.$_popper.scheduleUpdate(); + } catch (t) {} + }, + clearHideTimeout: function () { + clearTimeout(this.$_hideTimeout), (this.$_hideTimeout = null); + }, + getPopperConfig: function () { + var t = "bottom-start"; + this.dropup + ? (t = this.right ? "top-end" : "top-start") + : this.dropright + ? (t = "right-start") + : this.dropleft + ? (t = "left-start") + : this.right && (t = "bottom-end"); + var e = { + placement: t, + modifiers: { + offset: { offset: this.offset || 0 }, + flip: { enabled: !this.noFlip }, + }, + }, + n = this.boundary; + return ( + n && (e.modifiers.preventOverflow = { boundariesElement: n }), + Ct(e, this.popperOpts || {}) + ); + }, + whileOpenListen: function (t) { + (this.listenForClickOut = t), (this.listenForFocusIn = t); + var e = t ? "$on" : "$off"; + this.$root[e](qa, this.rootCloseListener); + }, + rootCloseListener: function (t) { + t !== this && (this.visible = !1); + }, + show: function () { + var t = this; + this.disabled || + jn(function () { + t.visible = !0; + }); + }, + hide: function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + this.disabled || + ((this.visible = !1), t && this.$once(ge, this.focusToggler)); + }, + toggle: function (t) { + var e = (t = t || {}), + n = e.type, + i = e.keyCode; + ("click" === n || + ("keydown" === n && -1 !== [rr, or, ir].indexOf(i))) && + (this.disabled + ? (this.visible = !1) + : (this.$emit("toggle", t), + hi(t), + this.visible ? this.hide(!0) : this.show())); + }, + onMousedown: function (t) { + hi(t, { propagation: !1 }); + }, + onKeydown: function (t) { + var e = t.keyCode; + 27 === e + ? this.onEsc(t) + : e === ir + ? this.focusNext(t, !1) + : e === ar && this.focusNext(t, !0); + }, + onEsc: function (t) { + this.visible && + ((this.visible = !1), hi(t), this.$once(ge, this.focusToggler)); + }, + onSplitClick: function (t) { + this.disabled ? (this.visible = !1) : this.$emit(se, t); + }, + hideHandler: function (t) { + var e = this, + n = t.target; + !this.visible || + Fn(this.$refs.menu, n) || + Fn(this.toggler, n) || + (this.clearHideTimeout(), + (this.$_hideTimeout = setTimeout( + function () { + return e.hide(); + }, + this.inNavbar ? 300 : 0 + ))); + }, + clickOutHandler: function (t) { + this.hideHandler(t); + }, + focusInHandler: function (t) { + this.hideHandler(t); + }, + focusNext: function (t, e) { + var n = this, + i = t.target; + !this.visible || + (t && En(".dropdown form", i)) || + (hi(t), + this.$nextTick(function () { + var t = n.getItems(); + if (!(t.length < 1)) { + var r = t.indexOf(i); + e && r > 0 ? r-- : !e && r < t.length - 1 && r++, + r < 0 && (r = 0), + n.focusItem(r, t); + } + })); + }, + focusItem: function (t, e) { + var n = e.find(function (e, n) { + return n === t; + }); + Nn(n); + }, + getItems: function () { + return ( + (t = Xa), + (e = this.$refs.menu), + (dn((kn(e) ? e : O).querySelectorAll(t)) || []).filter(Cn) + ); + var t, e; + }, + focusMenu: function () { + Nn(this.$refs.menu); + }, + focusToggler: function () { + var t = this; + this.$nextTick(function () { + Nn(t.toggler); + }); + }, + }, + }), + Qa = ti( + { + disabledField: Jn(Ne, "disabled"), + htmlField: Jn(Ne, "html"), + options: Jn(Ye, []), + textField: Jn(Ne, "text"), + valueField: Jn(Ne, "value"), + }, + "formOptionControls" + ), + ts = n.default.extend({ + props: Qa, + computed: { + formOptions: function () { + return this.normalizeOptions(this.options); + }, + }, + methods: { + normalizeOption: function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : null; + if (ft(t)) { + var n = Vt(t, this.valueField), + i = Vt(t, this.textField); + return { + value: rt(n) ? e || i : n, + text: Br(String(rt(i) ? e : i)), + html: Vt(t, this.htmlField), + disabled: Boolean(Vt(t, this.disabledField)), + }; + } + return { value: e || t, text: Br(String(t)), disabled: !1 }; + }, + normalizeOptions: function (t) { + var e = this; + return dt(t) + ? t.map(function (t) { + return e.normalizeOption(t); + }) + : ft(t) + ? (Ht( + 'Setting prop "options" to an object is deprecated. Use the array format instead.', + this.$options.name + ), + St(t).map(function (n) { + return e.normalizeOption(t[n] || {}, n); + })) + : []; + }, + }, + }), + es = function (t, e) { + for (var n = 0; n < t.length; n++) if (lr(t[n], e)) return n; + return -1; + }, + ns = "input, textarea, select", + is = ti( + { + autofocus: Jn(Le, !1), + disabled: Jn(Le, !1), + form: Jn(Ne), + id: Jn(Ne), + name: Jn(Ne), + required: Jn(Le, !1), + }, + "formControls" + ), + rs = n.default.extend({ + props: is, + mounted: function () { + this.handleAutofocus(); + }, + activated: function () { + this.handleAutofocus(); + }, + methods: { + handleAutofocus: function () { + var t = this; + this.$nextTick(function () { + jn(function () { + var e = t.$el; + t.autofocus && Cn(e) && ($n(e, ns) || (e = xn(ns, e)), Nn(e)); + }); + }); + }, + }, + }), + os = ti({ plain: Jn(Le, !1) }, "formControls"), + as = n.default.extend({ + props: os, + computed: { + custom: function () { + return !this.plain; + }, + }, + }), + ss = ti({ size: Jn(Ne) }, "formControls"), + ls = n.default.extend({ + props: ss, + computed: { + sizeFormClass: function () { + return [this.size ? "form-control-".concat(this.size) : null]; + }, + }, + }), + cs = ti({ state: Jn(Le, null) }, "formState"), + us = n.default.extend({ + props: cs, + computed: { + computedState: function () { + return lt(this.state) ? this.state : null; + }, + stateClass: function () { + var t = this.computedState; + return !0 === t ? "is-valid" : !1 === t ? "is-invalid" : null; + }, + computedAriaInvalid: function () { + var t = this.ariaInvalid; + return !0 === t || + "true" === t || + "" === t || + !1 === this.computedState + ? "true" + : t; + }, + }, + }); + function ds(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function hs(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? ds(Object(n), !0).forEach(function (e) { + fs(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : ds(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function fs(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var ps, + bs = ri("checked", { defaultValue: null }), + ms = bs.mixin, + vs = bs.props, + ys = bs.prop, + gs = bs.event, + Os = ti( + xt( + hs( + hs(hs(hs(hs(hs(hs({}, vo), vs), is), ss), cs), os), + {}, + { + ariaLabel: Jn(Ne), + ariaLabelledby: Jn(Ne), + button: Jn(Le, !1), + buttonVariant: Jn(Ne), + inline: Jn(Le, !1), + value: Jn(Me), + } + ) + ), + "formRadioCheckControls" + ), + ws = n.default.extend({ + mixins: [fr, yo, ms, si, rs, ls, us, as], + inheritAttrs: !1, + props: Os, + data: function () { + return { + localChecked: this.isGroup ? this.bvGroup[ys] : this[ys], + hasFocus: !1, + }; + }, + computed: { + computedLocalChecked: { + get: function () { + return this.isGroup ? this.bvGroup.localChecked : this.localChecked; + }, + set: function (t) { + this.isGroup + ? (this.bvGroup.localChecked = t) + : (this.localChecked = t); + }, + }, + isChecked: function () { + return lr(this.value, this.computedLocalChecked); + }, + isRadio: function () { + return !0; + }, + isGroup: function () { + return !!this.bvGroup; + }, + isBtnMode: function () { + return this.isGroup ? this.bvGroup.buttons : this.button; + }, + isPlain: function () { + return ( + !this.isBtnMode && (this.isGroup ? this.bvGroup.plain : this.plain) + ); + }, + isCustom: function () { + return !this.isBtnMode && !this.isPlain; + }, + isSwitch: function () { + return ( + !(this.isBtnMode || this.isRadio || this.isPlain) && + (this.isGroup ? this.bvGroup.switches : this.switch) + ); + }, + isInline: function () { + return this.isGroup ? this.bvGroup.inline : this.inline; + }, + isDisabled: function () { + return (this.isGroup && this.bvGroup.disabled) || this.disabled; + }, + isRequired: function () { + return ( + this.computedName && + (this.isGroup ? this.bvGroup.required : this.required) + ); + }, + computedName: function () { + return (this.isGroup ? this.bvGroup.groupName : this.name) || null; + }, + computedForm: function () { + return (this.isGroup ? this.bvGroup.form : this.form) || null; + }, + computedSize: function () { + return (this.isGroup ? this.bvGroup.size : this.size) || ""; + }, + computedState: function () { + return this.isGroup + ? this.bvGroup.computedState + : lt(this.state) + ? this.state + : null; + }, + computedButtonVariant: function () { + var t = this.buttonVariant; + return ( + t || + (this.isGroup && this.bvGroup.buttonVariant + ? this.bvGroup.buttonVariant + : "secondary") + ); + }, + buttonClasses: function () { + var t, + e = this.computedSize; + return [ + "btn", + "btn-".concat(this.computedButtonVariant), + ((t = {}), + fs(t, "btn-".concat(e), e), + fs(t, "disabled", this.isDisabled), + fs(t, "active", this.isChecked), + fs(t, "focus", this.hasFocus), + t), + ]; + }, + computedAttrs: function () { + var t = this.isDisabled, + e = this.isRequired; + return hs( + hs({}, this.bvAttrs), + {}, + { + id: this.safeId(), + type: this.isRadio ? "radio" : "checkbox", + name: this.computedName, + form: this.computedForm, + disabled: t, + required: e, + "aria-required": e || null, + "aria-label": this.ariaLabel || null, + "aria-labelledby": this.ariaLabelledby || null, + } + ); + }, + }, + watch: + ((Wa = {}), + fs(Wa, ys, function () { + this["".concat(ys, "Watcher")].apply(this, arguments); + }), + fs(Wa, "computedLocalChecked", function () { + this.computedLocalCheckedWatcher.apply(this, arguments); + }), + Wa), + methods: + ((Ua = {}), + fs(Ua, "".concat(ys, "Watcher"), function (t) { + lr(t, this.computedLocalChecked) || (this.computedLocalChecked = t); + }), + fs(Ua, "computedLocalCheckedWatcher", function (t, e) { + lr(t, e) || this.$emit(gs, t); + }), + fs(Ua, "handleChange", function (t) { + var e = this, + n = t.target.checked, + i = this.value, + r = n ? i : null; + (this.computedLocalChecked = i), + this.$nextTick(function () { + e.$emit(ae, r), e.isGroup && e.bvGroup.$emit(ae, r); + }); + }), + fs(Ua, "handleFocus", function (t) { + t.target && + ("focus" === t.type + ? (this.hasFocus = !0) + : "blur" === t.type && (this.hasFocus = !1)); + }), + fs(Ua, "focus", function () { + this.isDisabled || Nn(this.$refs.input); + }), + fs(Ua, "blur", function () { + this.isDisabled || zn(this.$refs.input); + }), + Ua), + render: function (t) { + var e = this.isRadio, + n = this.isBtnMode, + i = this.isPlain, + r = this.isCustom, + o = this.isInline, + a = this.isSwitch, + s = this.computedSize, + l = this.bvAttrs, + c = this.normalizeSlot(), + u = t("input", { + class: [ + { + "form-check-input": i, + "custom-control-input": r, + "position-static": i && !c, + }, + n ? "" : this.stateClass, + ], + directives: [{ name: "model", value: this.computedLocalChecked }], + attrs: this.computedAttrs, + domProps: { value: this.value, checked: this.isChecked }, + on: hs( + { change: this.handleChange }, + n ? { focus: this.handleFocus, blur: this.handleFocus } : {} + ), + key: "input", + ref: "input", + }); + if (n) { + var d = t("label", { class: this.buttonClasses }, [u, c]); + return ( + this.isGroup || + (d = t("div", { class: ["btn-group-toggle", "d-inline-block"] }, [ + d, + ])), + d + ); + } + var h = t(); + return ( + (i && !c) || + (h = t( + "label", + { + class: { "form-check-label": i, "custom-control-label": r }, + attrs: { for: this.safeId() }, + }, + c + )), + t( + "div", + { + class: [ + fs( + { + "form-check": i, + "form-check-inline": i && o, + "custom-control": r, + "custom-control-inline": r && o, + "custom-checkbox": r && !e && !a, + "custom-switch": a, + "custom-radio": r && e, + }, + "b-custom-control-".concat(s), + s && !n + ), + l.class, + ], + style: l.style, + }, + [u, h] + ) + ); + }, + }); + function Ts(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Ss(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Ts(Object(n), !0).forEach(function (e) { + js(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Ts(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function js(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var ks = "indeterminate", + Ps = "update:indeterminate", + Ds = ti( + xt( + Ss( + Ss({}, Os), + {}, + (js((ps = {}), ks, Jn(Le, !1)), + js(ps, "switch", Jn(Le, !1)), + js(ps, "uncheckedValue", Jn(Me, !1)), + js(ps, "value", Jn(Me, !0)), + ps) + ) + ), + Gt + ), + Cs = n.default.extend({ + name: Gt, + mixins: [ws], + inject: { bvGroup: { from: "bvCheckGroup", default: null } }, + props: Ds, + computed: { + isChecked: function () { + var t = this.value, + e = this.computedLocalChecked; + return dt(e) ? es(e, t) > -1 : lr(e, t); + }, + isRadio: function () { + return !1; + }, + }, + watch: js({}, ks, function (t, e) { + lr(t, e) || this.setIndeterminate(t); + }), + mounted: function () { + this.setIndeterminate(this.indeterminate); + }, + methods: { + computedLocalCheckedWatcher: function (t, e) { + if (!lr(t, e)) { + this.$emit(gs, t); + var n = this.$refs.input; + n && this.$emit(Ps, n.indeterminate); + } + }, + handleChange: function (t) { + var e = this, + n = t.target, + i = n.checked, + r = n.indeterminate, + o = this.value, + a = this.uncheckedValue, + s = this.computedLocalChecked; + if (dt(s)) { + var l = es(s, o); + i && l < 0 + ? (s = s.concat(o)) + : !i && l > -1 && (s = s.slice(0, l).concat(s.slice(l + 1))); + } else s = i ? o : a; + (this.computedLocalChecked = s), + this.$nextTick(function () { + e.$emit(ae, s), + e.isGroup && e.bvGroup.$emit(ae, s), + e.$emit(Ps, r); + }); + }, + setIndeterminate: function (t) { + dt(this.computedLocalChecked) && (t = !1); + var e = this.$refs.input; + e && ((e.indeterminate = t), this.$emit(Ps, t)); + }, + }, + }), + xs = "__BV_hover_handler__", + $s = "mouseenter", + Es = function (t, e, n) { + di(t, e, $s, n, Ie), di(t, e, "mouseleave", n, Ie); + }, + Fs = function (t, e) { + var n = e.value, + i = void 0 === n ? null : n; + if (y) { + var r = t[xs], + o = st(r), + a = !(o && r.fn === i); + o && a && (Es(!1, t, r), delete t[xs]), + st(i) && + a && + ((t[xs] = (function (t) { + var e = function (e) { + t(e.type === $s, e); + }; + return (e.fn = t), e; + })(i)), + Es(!0, t, t[xs])); + } + }, + Is = { + bind: Fs, + componentUpdated: Fs, + unbind: function (t) { + Fs(t, { value: null }); + }, + }; + function Ms(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function _s(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Ms(Object(n), !0).forEach(function (e) { + Ls(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Ms(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Ls(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Rs, + Vs = xt( + _s( + _s( + _s(_s(_s(_s({}, vo), ss), cs), Dt(Ja, ["disabled"])), + Dt(is, ["autofocus"]) + ), + {}, + { + buttonOnly: Jn(Le, !1), + buttonVariant: Jn(Ne, "secondary"), + formattedValue: Jn(Ne), + labelSelected: Jn(Ne), + lang: Jn(Ne), + menuClass: Jn(Ge), + placeholder: Jn(Ne), + readonly: Jn(Le, !1), + rtl: Jn(Le, null), + value: Jn(Ne, ""), + } + ) + ), + As = n.default.extend({ + name: "BVFormBtnLabelControl", + directives: { "b-hover": Is }, + mixins: [yo, ls, us, Za, si], + props: Vs, + data: function () { + return { isHovered: !1, hasFocus: !1 }; + }, + computed: { + idButton: function () { + return this.safeId(); + }, + idLabel: function () { + return this.safeId("_value_"); + }, + idMenu: function () { + return this.safeId("_dialog_"); + }, + idWrapper: function () { + return this.safeId("_outer_"); + }, + computedDir: function () { + return !0 === this.rtl ? "rtl" : !1 === this.rtl ? "ltr" : null; + }, + }, + methods: { + focus: function () { + this.disabled || Nn(this.$refs.toggle); + }, + blur: function () { + this.disabled || zn(this.$refs.toggle); + }, + setFocus: function (t) { + this.hasFocus = "focus" === t.type; + }, + handleHover: function (t) { + this.isHovered = t; + }, + }, + render: function (t) { + var e, + n = this.idButton, + i = this.idLabel, + r = this.idMenu, + o = this.idWrapper, + a = this.disabled, + s = this.readonly, + l = this.required, + c = this.name, + u = this.state, + d = this.visible, + h = this.size, + f = this.isHovered, + p = this.hasFocus, + b = this.labelSelected, + m = this.buttonVariant, + v = this.buttonOnly, + y = gn(this.value) || "", + g = !1 === u || (l && !y), + O = { isHovered: f, hasFocus: p, state: u, opened: d }, + w = t( + "button", + { + staticClass: "btn", + class: + ((e = {}), + Ls(e, "btn-".concat(m), v), + Ls(e, "btn-".concat(h), h), + Ls(e, "h-auto", !v), + Ls(e, "dropdown-toggle", v), + Ls(e, "dropdown-toggle-no-caret", v), + e), + attrs: { + id: n, + type: "button", + disabled: a, + "aria-haspopup": "dialog", + "aria-expanded": d ? "true" : "false", + "aria-invalid": g ? "true" : null, + "aria-required": l ? "true" : null, + }, + directives: [{ name: "b-hover", value: this.handleHover }], + on: { + mousedown: this.onMousedown, + click: this.toggle, + keydown: this.toggle, + "!focus": this.setFocus, + "!blur": this.setFocus, + }, + ref: "toggle", + }, + [ + this.hasNormalizedSlot(tn) + ? this.normalizeSlot(tn, O) + : t(zi, { props: { scale: 1.25 } }), + ] + ), + T = t(); + c && + !a && + (T = t("input", { + attrs: { + type: "hidden", + name: c || null, + form: this.form || null, + value: y, + }, + })); + var S = t( + "div", + { + staticClass: "dropdown-menu", + class: [ + this.menuClass, + { show: d, "dropdown-menu-right": this.right }, + ], + attrs: { + id: r, + role: "dialog", + tabindex: "-1", + "aria-modal": "false", + "aria-labelledby": i, + }, + on: { keydown: this.onKeydown }, + ref: "menu", + }, + [this.normalizeSlot(nn, { opened: d })] + ), + j = t( + "label", + { + class: v + ? "sr-only" + : [ + "form-control", + { "text-muted": !y }, + this.stateClass, + this.sizeFormClass, + ], + attrs: { + id: i, + for: n, + "aria-invalid": g ? "true" : null, + "aria-required": l ? "true" : null, + }, + directives: [{ name: "b-hover", value: this.handleHover }], + on: { + "!click": function (t) { + hi(t, { preventDefault: !1 }); + }, + }, + }, + [ + y ? this.formattedValue || y : this.placeholder || "", + y && b ? t("bdi", { staticClass: "sr-only" }, b) : "", + ] + ); + return t( + "div", + { + staticClass: "b-form-btn-label-control dropdown", + class: [ + this.directionClass, + this.boundaryClass, + [ + { + "btn-group": v, + "form-control": !v, + focus: p && !v, + show: d, + "is-valid": !0 === u, + "is-invalid": !1 === u, + }, + v ? null : this.sizeFormClass, + ], + ], + attrs: { + id: o, + role: v ? null : "group", + lang: this.lang || null, + dir: this.computedDir, + "aria-disabled": a, + "aria-readonly": s && !a, + "aria-labelledby": i, + "aria-invalid": !1 === u || (l && !y) ? "true" : null, + "aria-required": l ? "true" : null, + }, + }, + [w, T, S, j] + ); + }, + }); + function Bs(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Hs(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Bs(Object(n), !0).forEach(function (e) { + Ns(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Bs(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Ns(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var zs = ri("value", { type: qe }), + Ys = zs.mixin, + Gs = zs.props, + Ws = zs.prop, + Us = zs.event, + qs = Dt(Do, [ + "block", + "hidden", + "id", + "noKeyNav", + "roleDescription", + "value", + "width", + ]), + Ks = Dt(Vs, ["formattedValue", "id", "lang", "rtl", "value"]), + Xs = ti( + xt( + Hs( + Hs(Hs(Hs(Hs({}, vo), Gs), qs), Ks), + {}, + { + calendarWidth: Jn(Ne, "270px"), + closeButton: Jn(Le, !1), + closeButtonVariant: Jn(Ne, "outline-secondary"), + dark: Jn(Le, !1), + labelCloseButton: Jn(Ne, "Close"), + labelResetButton: Jn(Ne, "Reset"), + labelTodayButton: Jn(Ne, "Select today"), + noCloseOnSelect: Jn(Le, !1), + resetButton: Jn(Le, !1), + resetButtonVariant: Jn(Ne, "outline-danger"), + resetValue: Jn(qe), + todayButton: Jn(Le, !1), + todayButtonVariant: Jn(Ne, "outline-primary"), + } + ) + ), + Wt + ), + Js = n.default.extend({ + name: Wt, + mixins: [yo, Ys], + props: Xs, + data: function () { + return { + localYMD: eo(this[Ws]) || "", + isVisible: !1, + localLocale: null, + isRTL: !1, + formattedValue: "", + activeYMD: "", + }; + }, + computed: { + calendarYM: function () { + return this.activeYMD.slice(0, -3); + }, + computedLang: function () { + return (this.localLocale || "").replace(/-u-.*$/i, "") || null; + }, + computedResetValue: function () { + return eo(po(this.resetValue)) || ""; + }, + }, + watch: + ((Rs = {}), + Ns(Rs, Ws, function (t) { + this.localYMD = eo(t) || ""; + }), + Ns(Rs, "localYMD", function (t) { + this.isVisible && + this.$emit(Us, this.valueAsDate ? to(t) || null : t || ""); + }), + Ns(Rs, "calendarYM", function (t, e) { + if (t !== e && e) + try { + this.$refs.control.updatePopper(); + } catch (t) {} + }), + Rs), + methods: { + focus: function () { + this.disabled || Nn(this.$refs.control); + }, + blur: function () { + this.disabled || zn(this.$refs.control); + }, + setAndClose: function (t) { + var e = this; + (this.localYMD = t), + this.noCloseOnSelect || + this.$nextTick(function () { + e.$refs.control.hide(!0); + }); + }, + onSelected: function (t) { + var e = this; + this.$nextTick(function () { + e.setAndClose(t); + }); + }, + onInput: function (t) { + this.localYMD !== t && (this.localYMD = t); + }, + onContext: function (t) { + var e = t.activeYMD, + n = t.isRTL, + i = t.locale, + r = t.selectedYMD, + o = t.selectedFormatted; + (this.isRTL = n), + (this.localLocale = i), + (this.formattedValue = o), + (this.localYMD = r), + (this.activeYMD = e), + this.$emit(ce, t); + }, + onTodayButton: function () { + this.setAndClose(eo(po(Qr(), this.min, this.max))); + }, + onResetButton: function () { + this.setAndClose(this.computedResetValue); + }, + onCloseButton: function () { + this.$refs.control.hide(!0); + }, + onShow: function () { + this.isVisible = !0; + }, + onShown: function () { + var t = this; + this.$nextTick(function () { + Nn(t.$refs.calendar), t.$emit(xe); + }); + }, + onHidden: function () { + (this.isVisible = !1), this.$emit(ge); + }, + defaultButtonFn: function (t) { + var e = t.isHovered, + n = t.hasFocus; + return this.$createElement(e || n ? Bi : Ai, { + attrs: { "aria-hidden": "true" }, + }); + }, + }, + render: function (t) { + var e = this.localYMD, + n = this.disabled, + i = this.readonly, + r = this.dark, + o = this.$props, + a = this.$scopedSlots, + s = at(this.placeholder) + ? this.labelNoDateSelected + : this.placeholder, + l = []; + if (this.todayButton) { + var c = this.labelTodayButton; + l.push( + t( + Ar, + { + props: { + disabled: n || i, + size: "sm", + variant: this.todayButtonVariant, + }, + attrs: { "aria-label": c || null }, + on: { click: this.onTodayButton }, + }, + c + ) + ); + } + if (this.resetButton) { + var u = this.labelResetButton; + l.push( + t( + Ar, + { + props: { + disabled: n || i, + size: "sm", + variant: this.resetButtonVariant, + }, + attrs: { "aria-label": u || null }, + on: { click: this.onResetButton }, + }, + u + ) + ); + } + if (this.closeButton) { + var d = this.labelCloseButton; + l.push( + t( + Ar, + { + props: { + disabled: n, + size: "sm", + variant: this.closeButtonVariant, + }, + attrs: { "aria-label": d || null }, + on: { click: this.onCloseButton }, + }, + d + ) + ); + } + l.length > 0 && + (l = [ + t( + "div", + { + staticClass: "b-form-date-controls d-flex flex-wrap", + class: { + "justify-content-between": l.length > 1, + "justify-content-end": l.length < 2, + }, + }, + l + ), + ]); + var h = t( + Co, + { + staticClass: "b-form-date-calendar w-100", + props: Hs( + Hs({}, Zn(qs, o)), + {}, + { + hidden: !this.isVisible, + value: e, + valueAsDate: !1, + width: this.calendarWidth, + } + ), + on: { + selected: this.onSelected, + input: this.onInput, + context: this.onContext, + }, + scopedSlots: Pt(a, [ + "nav-prev-decade", + "nav-prev-year", + "nav-prev-month", + "nav-this-month", + "nav-next-month", + "nav-next-year", + "nav-next-decade", + ]), + key: "calendar", + ref: "calendar", + }, + l + ); + return t( + As, + { + staticClass: "b-form-datepicker", + props: Hs( + Hs({}, Zn(Ks, o)), + {}, + { + formattedValue: e ? this.formattedValue : "", + id: this.safeId(), + lang: this.computedLang, + menuClass: [{ "bg-dark": r, "text-light": r }, this.menuClass], + placeholder: s, + rtl: this.isRTL, + value: e, + } + ), + on: { + show: this.onShow, + shown: this.onShown, + hidden: this.onHidden, + }, + scopedSlots: Ns( + {}, + tn, + a["button-content"] || this.defaultButtonFn + ), + ref: "control", + }, + [h] + ); + }, + }), + Zs = n.default.extend({ + computed: { + selectionStart: { + cache: !1, + get: function () { + return this.$refs.input.selectionStart; + }, + set: function (t) { + this.$refs.input.selectionStart = t; + }, + }, + selectionEnd: { + cache: !1, + get: function () { + return this.$refs.input.selectionEnd; + }, + set: function (t) { + this.$refs.input.selectionEnd = t; + }, + }, + selectionDirection: { + cache: !1, + get: function () { + return this.$refs.input.selectionDirection; + }, + set: function (t) { + this.$refs.input.selectionDirection = t; + }, + }, + }, + methods: { + select: function () { + var t; + (t = this.$refs.input).select.apply(t, arguments); + }, + setSelectionRange: function () { + var t; + (t = this.$refs.input).setSelectionRange.apply(t, arguments); + }, + setRangeText: function () { + var t; + (t = this.$refs.input).setRangeText.apply(t, arguments); + }, + }, + }); + function Qs(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function tl(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Qs(Object(n), !0).forEach(function (e) { + el(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Qs(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function el(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var nl = ri("value", { type: Ke, defaultValue: "", event: "update" }), + il = nl.mixin, + rl = nl.props, + ol = nl.prop, + al = nl.event, + sl = ti( + xt( + tl( + tl({}, rl), + {}, + { + ariaInvalid: Jn(Ue, !1), + autocomplete: Jn(Ne), + debounce: Jn(Ke, 0), + formatter: Jn(Ve), + lazy: Jn(Le, !1), + lazyFormatter: Jn(Le, !1), + number: Jn(Le, !1), + placeholder: Jn(Ne), + plaintext: Jn(Le, !1), + readonly: Jn(Le, !1), + trim: Jn(Le, !1), + } + ) + ), + "formTextControls" + ), + ll = n.default.extend({ + mixins: [il], + props: sl, + data: function () { + var t = this[ol]; + return { localValue: gn(t), vModelValue: this.modifyValue(t) }; + }, + computed: { + computedClass: function () { + var t = this.plaintext, + e = this.type, + n = "range" === e, + i = "color" === e; + return [ + { + "custom-range": n, + "form-control-plaintext": t && !n && !i, + "form-control": i || (!t && !n), + }, + this.sizeFormClass, + this.stateClass, + ]; + }, + computedDebounce: function () { + return ji(pn(this.debounce, 0), 0); + }, + hasFormatter: function () { + return ni(this.formatter); + }, + }, + watch: el({}, ol, function (t) { + var e = gn(t), + n = this.modifyValue(t); + (e === this.localValue && n === this.vModelValue) || + (this.clearDebounce(), (this.localValue = e), (this.vModelValue = n)); + }), + created: function () { + this.$_inputDebounceTimer = null; + }, + mounted: function () { + this.$on($e, this.clearDebounce); + }, + beforeDestroy: function () { + this.clearDebounce(); + }, + methods: { + clearDebounce: function () { + clearTimeout(this.$_inputDebounceTimer), + (this.$_inputDebounceTimer = null); + }, + formatValue: function (t, e) { + var n = + arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return ( + (t = gn(t)), + !this.hasFormatter || + (this.lazyFormatter && !n) || + (t = this.formatter(t, e)), + t + ); + }, + modifyValue: function (t) { + return ( + (t = gn(t)), + this.trim && (t = t.trim()), + this.number && (t = bn(t, t)), + t + ); + }, + updateValue: function (t) { + var e = this, + n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], + i = this.lazy; + if (!i || n) { + this.clearDebounce(); + var r = function () { + if ((t = e.modifyValue(t)) !== e.vModelValue) + (e.vModelValue = t), e.$emit(al, t); + else if (e.hasFormatter) { + var n = e.$refs.input; + n && t !== n.value && (n.value = t); + } + }, + o = this.computedDebounce; + o > 0 && !i && !n + ? (this.$_inputDebounceTimer = setTimeout(r, o)) + : r(); + } + }, + onInput: function (t) { + if (!t.target.composing) { + var e = t.target.value, + n = this.formatValue(e, t); + !1 === n || t.defaultPrevented + ? hi(t, { propagation: !1 }) + : ((this.localValue = n), this.updateValue(n), this.$emit(we, n)); + } + }, + onChange: function (t) { + var e = t.target.value, + n = this.formatValue(e, t); + !1 === n || t.defaultPrevented + ? hi(t, { propagation: !1 }) + : ((this.localValue = n), + this.updateValue(n, !0), + this.$emit(ae, n)); + }, + onBlur: function (t) { + var e = t.target.value, + n = this.formatValue(e, t, !0); + !1 !== n && + ((this.localValue = gn(this.modifyValue(n))), + this.updateValue(n, !0)), + this.$emit("blur", t); + }, + focus: function () { + this.disabled || Nn(this.$el); + }, + blur: function () { + this.disabled || zn(this.$el); + }, + }, + }), + cl = n.default.extend({ + computed: { + validity: { + cache: !1, + get: function () { + return this.$refs.input.validity; + }, + }, + validationMessage: { + cache: !1, + get: function () { + return this.$refs.input.validationMessage; + }, + }, + willValidate: { + cache: !1, + get: function () { + return this.$refs.input.willValidate; + }, + }, + }, + methods: { + setCustomValidity: function () { + var t; + return (t = this.$refs.input).setCustomValidity.apply(t, arguments); + }, + checkValidity: function () { + var t; + return (t = this.$refs.input).checkValidity.apply(t, arguments); + }, + reportValidity: function () { + var t; + return (t = this.$refs.input).reportValidity.apply(t, arguments); + }, + }, + }); + function ul(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function dl(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? ul(Object(n), !0).forEach(function (e) { + hl(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : ul(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function hl(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var fl, + pl = [ + "text", + "password", + "email", + "number", + "url", + "tel", + "search", + "range", + "color", + "date", + "time", + "datetime", + "datetime-local", + "month", + "week", + ], + bl = ti( + xt( + dl( + dl(dl(dl(dl(dl({}, vo), is), ss), cs), sl), + {}, + { + list: Jn(Ne), + max: Jn(Ke), + min: Jn(Ke), + noWheel: Jn(Le, !1), + step: Jn(Ke), + type: Jn(Ne, "text", function (t) { + return hn(pl, t); + }), + } + ) + ), + Ut + ), + ml = n.default.extend({ + name: Ut, + mixins: [br, yo, rs, ls, us, ll, Zs, cl], + props: bl, + computed: { + localType: function () { + var t = this.type; + return hn(pl, t) ? t : "text"; + }, + computedAttrs: function () { + var t = this.localType, + e = this.name, + n = this.form, + i = this.disabled, + r = this.placeholder, + o = this.required, + a = this.min, + s = this.max, + l = this.step; + return { + id: this.safeId(), + name: e, + form: n, + type: t, + disabled: i, + placeholder: r, + required: o, + autocomplete: this.autocomplete || null, + readonly: this.readonly || this.plaintext, + min: a, + max: s, + step: l, + list: "password" !== t ? this.list : null, + "aria-required": o ? "true" : null, + "aria-invalid": this.computedAriaInvalid, + }; + }, + computedListeners: function () { + return dl( + dl({}, this.bvListeners), + {}, + { input: this.onInput, change: this.onChange, blur: this.onBlur } + ); + }, + }, + watch: { + noWheel: function (t) { + this.setWheelStopper(t); + }, + }, + mounted: function () { + this.setWheelStopper(this.noWheel); + }, + deactivated: function () { + this.setWheelStopper(!1); + }, + activated: function () { + this.setWheelStopper(this.noWheel); + }, + beforeDestroy: function () { + this.setWheelStopper(!1); + }, + methods: { + setWheelStopper: function (t) { + var e = this.$el; + di(t, e, "focus", this.onWheelFocus), + di(t, e, "blur", this.onWheelBlur), + t || ui(document, "wheel", this.stopWheel); + }, + onWheelFocus: function () { + ci(document, "wheel", this.stopWheel); + }, + onWheelBlur: function () { + ui(document, "wheel", this.stopWheel); + }, + stopWheel: function (t) { + hi(t, { propagation: !1 }), zn(this.$el); + }, + }, + render: function (t) { + return t("input", { + class: this.computedClass, + attrs: this.computedAttrs, + domProps: { value: this.localValue }, + on: this.computedListeners, + ref: "input", + }); + }, + }); + function vl(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function yl(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? vl(Object(n), !0).forEach(function (e) { + gl(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : vl(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function gl(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Ol = ri("value", { type: Ke, event: ae }), + wl = Ol.mixin, + Tl = Ol.props, + Sl = Ol.prop, + jl = Ol.event, + kl = function (t) { + return ji(3, pn(t, 5)); + }, + Pl = function (t, e, n) { + return ji(Si(t, n), e); + }, + Dl = n.default.extend({ + name: "BVFormRatingStar", + mixins: [si], + props: { + disabled: Jn(Le, !1), + focused: Jn(Le, !1), + hasClear: Jn(Le, !1), + rating: Jn(Ae, 0), + readonly: Jn(Le, !1), + star: Jn(Ae, 0), + variant: Jn(Ne), + }, + methods: { + onClick: function (t) { + this.disabled || + this.readonly || + (hi(t, { propagation: !1 }), this.$emit(De, this.star)); + }, + }, + render: function (t) { + var e = this.rating, + n = this.star, + i = this.focused, + r = this.hasClear, + o = this.variant, + a = this.disabled, + s = this.readonly, + l = r ? 0 : 1, + c = e >= n ? "full" : e >= n - 0.5 ? "half" : "empty", + u = { variant: o, disabled: a, readonly: s }; + return t( + "span", + { + staticClass: "b-rating-star", + class: { + focused: (i && e === n) || (!pn(e) && n === l), + "b-rating-star-empty": "empty" === c, + "b-rating-star-half": "half" === c, + "b-rating-star-full": "full" === c, + }, + attrs: { tabindex: a || s ? null : "-1" }, + on: { click: this.onClick }, + }, + [ + t("span", { staticClass: "b-rating-icon" }, [ + this.normalizeSlot(c, u), + ]), + ] + ); + }, + }), + Cl = ti( + xt( + yl( + yl(yl(yl(yl({}, vo), Tl), Dt(is, ["required", "autofocus"])), ss), + {}, + { + color: Jn(Ne), + iconClear: Jn(Ne, "x"), + iconEmpty: Jn(Ne, "star"), + iconFull: Jn(Ne, "star-fill"), + iconHalf: Jn(Ne, "star-half"), + inline: Jn(Le, !1), + locale: Jn(We), + noBorder: Jn(Le, !1), + precision: Jn(Ke), + readonly: Jn(Le, !1), + showClear: Jn(Le, !1), + showValue: Jn(Le, !1), + showValueMax: Jn(Le, !1), + stars: Jn(Ke, 5, function (t) { + return pn(t) >= 3; + }), + variant: Jn(Ne), + } + ) + ), + qt + ), + xl = n.default.extend({ + name: qt, + components: { + BIconStar: Wi, + BIconStarHalf: qi, + BIconStarFill: Ui, + BIconX: Ki, + }, + mixins: [yo, wl, ls], + props: Cl, + data: function () { + var t = bn(this[Sl], null), + e = kl(this.stars); + return { localValue: ot(t) ? null : Pl(t, 0, e), hasFocus: !1 }; + }, + computed: { + computedStars: function () { + return kl(this.stars); + }, + computedRating: function () { + var t = bn(this.localValue, 0), + e = pn(this.precision, 3); + return Pl(bn(t.toFixed(e)), 0, this.computedStars); + }, + computedLocale: function () { + var t = fn(this.locale).filter(Lt); + return new Intl.NumberFormat(t).resolvedOptions().locale; + }, + isInteractive: function () { + return !this.disabled && !this.readonly; + }, + isRTL: function () { + return mo(this.computedLocale); + }, + formattedRating: function () { + var t = pn(this.precision), + e = this.showValueMax, + n = this.computedLocale, + i = { + notation: "standard", + minimumFractionDigits: isNaN(t) ? 0 : t, + maximumFractionDigits: isNaN(t) ? 3 : t, + }, + r = this.computedStars.toLocaleString(n), + o = this.localValue; + return ( + (o = ot(o) ? (e ? "-" : "") : o.toLocaleString(n, i)), + e ? "".concat(o, "/").concat(r) : o + ); + }, + }, + watch: + ((fl = {}), + gl(fl, Sl, function (t, e) { + if (t !== e) { + var n = bn(t, null); + this.localValue = ot(n) ? null : Pl(n, 0, this.computedStars); + } + }), + gl(fl, "localValue", function (t, e) { + t !== e && t !== (this.value || 0) && this.$emit(jl, t || null); + }), + gl(fl, "disabled", function (t) { + t && ((this.hasFocus = !1), this.blur()); + }), + fl), + methods: { + focus: function () { + this.disabled || Nn(this.$el); + }, + blur: function () { + this.disabled || zn(this.$el); + }, + onKeydown: function (t) { + var e = t.keyCode; + if (this.isInteractive && hn([37, ir, 39, ar], e)) { + hi(t, { propagation: !1 }); + var n = pn(this.localValue, 0), + i = this.showClear ? 0 : 1, + r = this.computedStars, + o = this.isRTL ? -1 : 1; + 37 === e + ? (this.localValue = Pl(n - o, i, r) || null) + : 39 === e + ? (this.localValue = Pl(n + o, i, r)) + : e === ir + ? (this.localValue = Pl(n - 1, i, r) || null) + : e === ar && (this.localValue = Pl(n + 1, i, r)); + } + }, + onSelected: function (t) { + this.isInteractive && (this.localValue = t); + }, + onFocus: function (t) { + this.hasFocus = !!this.isInteractive && "focus" === t.type; + }, + renderIcon: function (t) { + return this.$createElement(nr, { + props: { + icon: t, + variant: + this.disabled || this.color ? null : this.variant || null, + }, + }); + }, + iconEmptyFn: function () { + return this.renderIcon(this.iconEmpty); + }, + iconHalfFn: function () { + return this.renderIcon(this.iconHalf); + }, + iconFullFn: function () { + return this.renderIcon(this.iconFull); + }, + iconClearFn: function () { + return this.$createElement(nr, { props: { icon: this.iconClear } }); + }, + }, + render: function (t) { + var e = this, + n = this.disabled, + i = this.readonly, + r = this.name, + o = this.form, + a = this.inline, + s = this.variant, + l = this.color, + c = this.noBorder, + u = this.hasFocus, + d = this.computedRating, + h = this.computedStars, + f = this.formattedRating, + p = this.showClear, + b = this.isRTL, + m = this.isInteractive, + v = this.$scopedSlots, + y = []; + if (p && !n && !i) { + var g = t("span", { staticClass: "b-rating-icon" }, [ + (v["icon-clear"] || this.iconClearFn)(), + ]); + y.push( + t( + "span", + { + staticClass: "b-rating-star b-rating-star-clear flex-grow-1", + class: { focused: u && 0 === d }, + attrs: { tabindex: m ? "-1" : null }, + on: { + click: function () { + return e.onSelected(null); + }, + }, + key: "clear", + }, + [g] + ) + ); + } + for (var O = 0; O < h; O++) { + var w = O + 1; + y.push( + t(Dl, { + staticClass: "flex-grow-1", + style: l && !n ? { color: l } : {}, + props: { + rating: d, + star: w, + variant: n ? null : s || null, + disabled: n, + readonly: i, + focused: u, + hasClear: p, + }, + on: { selected: this.onSelected }, + scopedSlots: { + empty: v["icon-empty"] || this.iconEmptyFn, + half: v["icon-half"] || this.iconHalfFn, + full: v["icon-full"] || this.iconFullFn, + }, + key: O, + }) + ); + } + return ( + r && + y.push( + t("input", { + attrs: { + type: "hidden", + value: ot(this.localValue) ? "" : d, + name: r, + form: o || null, + }, + key: "hidden", + }) + ), + this.showValue && + y.push( + t( + "b", + { + staticClass: "b-rating-value flex-grow-1", + attrs: { "aria-hidden": "true" }, + key: "value", + }, + gn(f) + ) + ), + t( + "output", + { + staticClass: "b-rating form-control align-items-center", + class: [ + { + "d-inline-flex": a, + "d-flex": !a, + "border-0": c, + disabled: n, + readonly: !n && i, + }, + this.sizeFormClass, + ], + attrs: { + id: this.safeId(), + dir: b ? "rtl" : "ltr", + tabindex: n ? null : "0", + disabled: n, + role: "slider", + "aria-disabled": n ? "true" : null, + "aria-readonly": !n && i ? "true" : null, + "aria-live": "off", + "aria-valuemin": p ? "0" : "1", + "aria-valuemax": gn(h), + "aria-valuenow": d ? gn(d) : null, + }, + on: { + keydown: this.onKeydown, + focus: this.onFocus, + blur: this.onFocus, + }, + }, + y + ) + ); + }, + }), + $l = ri("value"), + El = $l.mixin, + Fl = $l.props, + Il = $l.prop, + Ml = $l.event; + function _l(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Ll(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? _l(Object(n), !0).forEach(function (e) { + Rl(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : _l(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Rl(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Vl = ti( + xt( + Ll( + Ll({}, Qa), + {}, + { labelField: Jn(Ne, "label"), optionsField: Jn(Ne, "options") } + ) + ), + "formOptions" + ), + Al = n.default.extend({ + mixins: [ts], + props: Vl, + methods: { + normalizeOption: function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] + ? arguments[1] + : null; + if (ft(t)) { + var n = Vt(t, this.valueField), + i = Vt(t, this.textField), + r = Vt(t, this.optionsField, null); + return ot(r) + ? { + value: rt(n) ? e || i : n, + text: String(rt(i) ? e : i), + html: Vt(t, this.htmlField), + disabled: Boolean(Vt(t, this.disabledField)), + } + : { + label: String(Vt(t, this.labelField) || i), + options: this.normalizeOptions(r), + }; + } + return { value: e || t, text: String(t), disabled: !1 }; + }, + }, + }), + Bl = ti({ disabled: Jn(Le, !1), value: Jn(Me, void 0, !0) }, Xt), + Hl = n.default.extend({ + name: Xt, + functional: !0, + props: Bl, + render: function (t, e) { + var n = e.props, + i = e.data, + r = e.children, + o = n.value; + return t( + "option", + p(i, { attrs: { disabled: n.disabled }, domProps: { value: o } }), + r + ); + }, + }); + function Nl(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function zl(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Nl(Object(n), !0).forEach(function (e) { + Yl(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Nl(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Yl(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Gl = ti(xt(zl(zl({}, Qa), {}, { label: Jn(Ne, void 0, !0) })), Jt), + Wl = n.default.extend({ + name: Jt, + mixins: [si, ts], + props: Gl, + render: function (t) { + var e = this.label, + n = this.formOptions.map(function (e, n) { + var i = e.value, + r = e.text, + o = e.html, + a = e.disabled; + return t(Hl, { + attrs: { value: i, disabled: a }, + domProps: Hr(o, r), + key: "option_".concat(n), + }); + }); + return t("optgroup", { attrs: { label: e } }, [ + this.normalizeSlot(rn), + n, + this.normalizeSlot(), + ]); + }, + }); + function Ul(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function ql(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Ul(Object(n), !0).forEach(function (e) { + Kl(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Ul(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Kl(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Xl = ti( + xt( + ql( + ql(ql(ql(ql(ql(ql({}, vo), Fl), is), os), ss), cs), + {}, + { + ariaInvalid: Jn(Ue, !1), + multiple: Jn(Le, !1), + selectSize: Jn(Ae, 0), + } + ) + ), + Kt + ), + Jl = n.default.extend({ + name: Kt, + mixins: [yo, El, rs, ls, us, as, Al, si], + props: Xl, + data: function () { + return { localValue: this[Il] }; + }, + computed: { + computedSelectSize: function () { + return this.plain || 0 !== this.selectSize ? this.selectSize : null; + }, + inputClass: function () { + return [ + this.plain ? "form-control" : "custom-select", + this.size && this.plain ? "form-control-".concat(this.size) : null, + this.size && !this.plain + ? "custom-select-".concat(this.size) + : null, + this.stateClass, + ]; + }, + }, + watch: { + value: function (t) { + this.localValue = t; + }, + localValue: function () { + this.$emit(Ml, this.localValue); + }, + }, + methods: { + focus: function () { + Nn(this.$refs.input); + }, + blur: function () { + zn(this.$refs.input); + }, + onChange: function (t) { + var e = this, + n = t.target, + i = dn(n.options) + .filter(function (t) { + return t.selected; + }) + .map(function (t) { + return "_value" in t ? t._value : t.value; + }); + (this.localValue = n.multiple ? i : i[0]), + this.$nextTick(function () { + e.$emit(ae, e.localValue); + }); + }, + }, + render: function (t) { + var e = this.name, + n = this.disabled, + i = this.required, + r = this.computedSelectSize, + o = this.localValue, + a = this.formOptions.map(function (e, n) { + var i = e.value, + r = e.label, + o = e.options, + a = e.disabled, + s = "option_".concat(n); + return dt(o) + ? t(Wl, { props: { label: r, options: o }, key: s }) + : t(Hl, { + props: { value: i, disabled: a }, + domProps: Hr(e.html, e.text), + key: s, + }); + }); + return t( + "select", + { + class: this.inputClass, + attrs: { + id: this.safeId(), + name: e, + form: this.form || null, + multiple: this.multiple || null, + size: r, + disabled: n, + required: i, + "aria-required": i ? "true" : null, + "aria-invalid": this.computedAriaInvalid, + }, + on: { change: this.onChange }, + directives: [{ name: "model", value: o }], + ref: "input", + }, + [this.normalizeSlot(rn), a, this.normalizeSlot()] + ); + }, + }), + Zl = function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + return (t && t.$options._scopeId) || e; + }; + var Ql = n.default.extend({ + computed: { + scopedStyleAttrs: function () { + var t, + e, + n, + i = Zl(this.$parent); + return i + ? ((n = ""), + (e = i) in (t = {}) + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t) + : {}; + }, + }, + }), + tc = { + AUTO: "auto", + TOP: "top", + RIGHT: "right", + BOTTOM: "bottom", + LEFT: "left", + TOPLEFT: "top", + TOPRIGHT: "top", + RIGHTTOP: "right", + RIGHTBOTTOM: "right", + BOTTOMLEFT: "bottom", + BOTTOMRIGHT: "bottom", + LEFTTOP: "left", + LEFTBOTTOM: "left", + }, + ec = { + AUTO: 0, + TOPLEFT: -1, + TOP: 0, + TOPRIGHT: 1, + RIGHTTOP: -1, + RIGHT: 0, + RIGHTBOTTOM: 1, + BOTTOMLEFT: -1, + BOTTOM: 0, + BOTTOMRIGHT: 1, + LEFTTOP: -1, + LEFT: 0, + LEFTBOTTOM: 1, + }, + nc = { + arrowPadding: Jn(Ke, 6), + boundary: Jn([tt, Ne], "scrollParent"), + boundaryPadding: Jn(Ke, 5), + fallbackPlacement: Jn(We, "flip"), + offset: Jn(Ke, 0), + placement: Jn(Ne, "top"), + target: Jn([tt, et]), + }, + ic = n.default.extend({ + name: "BVPopper", + props: nc, + data: function () { + return { + noFade: !1, + localShow: !0, + attachment: this.getAttachment(this.placement), + }; + }, + computed: { + templateType: function () { + return "unknown"; + }, + popperConfig: function () { + var t = this, + e = this.placement; + return { + placement: this.getAttachment(e), + modifiers: { + offset: { offset: this.getOffset(e) }, + flip: { behavior: this.fallbackPlacement }, + arrow: { element: ".arrow" }, + preventOverflow: { + padding: this.boundaryPadding, + boundariesElement: this.boundary, + }, + }, + onCreate: function (e) { + e.originalPlacement !== e.placement && t.popperPlacementChange(e); + }, + onUpdate: function (e) { + t.popperPlacementChange(e); + }, + }; + }, + }, + created: function () { + var t = this; + (this.$_popper = null), + (this.localShow = !0), + this.$on(Ce, function (e) { + t.popperCreate(e); + }); + var e = function () { + t.$nextTick(function () { + jn(function () { + t.$destroy(); + }); + }); + }; + this.$parent.$once(Ee, e), this.$once(ge, e); + }, + beforeMount: function () { + this.attachment = this.getAttachment(this.placement); + }, + updated: function () { + this.updatePopper(); + }, + beforeDestroy: function () { + this.destroyPopper(); + }, + destroyed: function () { + var t = this.$el; + t && t.parentNode && t.parentNode.removeChild(t); + }, + methods: { + hide: function () { + this.localShow = !1; + }, + getAttachment: function (t) { + return tc[String(t).toUpperCase()] || "auto"; + }, + getOffset: function (t) { + if (!this.offset) { + var e = this.$refs.arrow || xn(".arrow", this.$el), + n = + bn( + (function (t) { + var e = g.getComputedStyle; + return e && kn(t) ? e(t) : {}; + })(e).width, + 0 + ) + bn(this.arrowPadding, 0); + switch (ec[String(t).toUpperCase()] || 0) { + case 1: + return "+50%p - ".concat(n, "px"); + case -1: + return "-50%p + ".concat(n, "px"); + default: + return 0; + } + } + return this.offset; + }, + popperCreate: function (t) { + this.destroyPopper(), + (this.$_popper = new Ra(this.target, t, this.popperConfig)); + }, + destroyPopper: function () { + this.$_popper && this.$_popper.destroy(), (this.$_popper = null); + }, + updatePopper: function () { + this.$_popper && this.$_popper.scheduleUpdate(); + }, + popperPlacementChange: function (t) { + this.attachment = this.getAttachment(t.placement); + }, + renderTemplate: function (t) { + return t("div"); + }, + }, + render: function (t) { + var e = this, + n = this.noFade; + return t( + Ti, + { + props: { appear: !0, noFade: n }, + on: { + beforeEnter: function (t) { + return e.$emit(Ce, t); + }, + afterEnter: function (t) { + return e.$emit(xe, t); + }, + beforeLeave: function (t) { + return e.$emit(Oe, t); + }, + afterLeave: function (t) { + return e.$emit(ge, t); + }, + }, + }, + [this.localShow ? this.renderTemplate(t) : t()] + ); + }, + }); + function rc(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function oc(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? rc(Object(n), !0).forEach(function (e) { + ac(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : rc(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function ac(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var sc = { html: Jn(Le, !1), id: Jn(Ne) }, + lc = n.default.extend({ + name: "BVTooltipTemplate", + extends: ic, + mixins: [Ql], + props: sc, + data: function () { + return { + title: "", + content: "", + variant: null, + customClass: null, + interactive: !0, + }; + }, + computed: { + templateType: function () { + return "tooltip"; + }, + templateClasses: function () { + var t, + e = this.variant, + n = this.attachment, + i = this.templateType; + return [ + ((t = { noninteractive: !this.interactive }), + ac(t, "b-".concat(i, "-").concat(e), e), + ac(t, "bs-".concat(i, "-").concat(n), n), + t), + this.customClass, + ]; + }, + templateAttributes: function () { + var t = this.id; + return oc( + oc({}, this.$parent.$parent.$attrs), + {}, + { id: t, role: "tooltip", tabindex: "-1" }, + this.scopedStyleAttrs + ); + }, + templateListeners: function () { + var t = this; + return { + mouseenter: function (e) { + t.$emit(Te, e); + }, + mouseleave: function (e) { + t.$emit(Se, e); + }, + focusin: function (e) { + t.$emit(me, e); + }, + focusout: function (e) { + t.$emit(ve, e); + }, + }; + }, + }, + methods: { + renderTemplate: function (t) { + var e = this.title, + n = st(e) ? e({}) : e, + i = this.html && !st(e) ? { innerHTML: e } : {}; + return t( + "div", + { + staticClass: "tooltip b-tooltip", + class: this.templateClasses, + attrs: this.templateAttributes, + on: this.templateListeners, + }, + [ + t("div", { staticClass: "arrow", ref: "arrow" }), + t("div", { staticClass: "tooltip-inner", domProps: i }, [n]), + ] + ); + }, + }, + }); + function cc(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function uc(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? cc(Object(n), !0).forEach(function (e) { + dc(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : cc(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function dc(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var hc, + fc, + pc = ".modal-content", + bc = pi("BModal", ge), + mc = [pc, ".b-sidebar"].join(", "), + vc = "data-original-title", + yc = { + title: "", + content: "", + variant: null, + customClass: null, + triggers: "", + placement: "auto", + fallbackPlacement: "flip", + target: null, + container: null, + noFade: !1, + boundary: "scrollParent", + boundaryPadding: 5, + offset: 0, + delay: 0, + arrowPadding: 6, + interactive: !0, + disabled: !1, + id: null, + html: !1, + }, + gc = n.default.extend({ + name: "BVTooltip", + mixins: [pr], + data: function () { + return uc( + uc({}, yc), + {}, + { activeTrigger: { hover: !1, click: !1, focus: !1 }, localShow: !1 } + ); + }, + computed: { + templateType: function () { + return "tooltip"; + }, + computedId: function () { + return ( + this.id || + "__bv_".concat(this.templateType, "_").concat(this._uid, "__") + ); + }, + computedDelay: function () { + var t = { show: 0, hide: 0 }; + return ( + ft(this.delay) + ? ((t.show = ji(pn(this.delay.show, 0), 0)), + (t.hide = ji(pn(this.delay.hide, 0), 0))) + : (ut(this.delay) || ct(this.delay)) && + (t.show = t.hide = ji(pn(this.delay, 0), 0)), + t + ); + }, + computedTriggers: function () { + return fn(this.triggers) + .filter(Lt) + .join(" ") + .trim() + .toLowerCase() + .split(/\s+/) + .sort(); + }, + isWithActiveTrigger: function () { + for (var t in this.activeTrigger) + if (this.activeTrigger[t]) return !0; + return !1; + }, + computedTemplateData: function () { + return { + title: this.title, + content: this.content, + variant: this.variant, + customClass: this.customClass, + noFade: this.noFade, + interactive: this.interactive, + }; + }, + }, + watch: { + computedTriggers: function (t, e) { + var n = this; + lr(t, e) || + this.$nextTick(function () { + n.unListen(), + e.forEach(function (e) { + hn(t, e) || (n.activeTrigger[e] && (n.activeTrigger[e] = !1)); + }), + n.listen(); + }); + }, + computedTemplateData: function () { + this.handleTemplateUpdate(); + }, + title: function (t, e) { + t === e || t || this.hide(); + }, + disabled: function (t) { + t ? this.disable() : this.enable(); + }, + }, + created: function () { + var t = this; + (this.$_tip = null), + (this.$_hoverTimeout = null), + (this.$_hoverState = ""), + (this.$_visibleInterval = null), + (this.$_enabled = !this.disabled), + (this.$_noop = xo.bind(this)), + this.$parent && + this.$parent.$once($e, function () { + t.$nextTick(function () { + jn(function () { + t.$destroy(); + }); + }); + }), + this.$nextTick(function () { + var e = t.getTarget(); + e && Fn(document.body, e) + ? ((t.scopeId = Zl(t.$parent)), t.listen()) + : Ht( + ct(t.target) + ? 'Unable to find target element by ID "#'.concat( + t.target, + '" in document.' + ) + : "The provided target is no valid HTML element.", + t.templateType + ); + }); + }, + updated: function () { + this.$nextTick(this.handleTemplateUpdate); + }, + deactivated: function () { + this.forceHide(); + }, + beforeDestroy: function () { + this.unListen(), + this.setWhileOpenListeners(!1), + this.clearHoverTimeout(), + this.clearVisibilityInterval(), + this.destroyTemplate(), + (this.$_noop = null); + }, + methods: { + getTemplate: function () { + return lc; + }, + updateData: function () { + var t = this, + e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : {}, + n = !1; + St(yc).forEach(function (i) { + rt(e[i]) || + t[i] === e[i] || + ((t[i] = e[i]), "title" === i && (n = !0)); + }), + n && this.localShow && this.fixTitle(); + }, + createTemplateAndShow: function () { + var t = this.getContainer(), + e = this.getTemplate(), + n = (this.$_tip = new e({ + parent: this, + propsData: { + id: this.computedId, + html: this.html, + placement: this.placement, + fallbackPlacement: this.fallbackPlacement, + target: this.getPlacementTarget(), + boundary: this.getBoundary(), + offset: pn(this.offset, 0), + arrowPadding: pn(this.arrowPadding, 0), + boundaryPadding: pn(this.boundaryPadding, 0), + }, + })); + this.handleTemplateUpdate(), + n.$once(Ce, this.onTemplateShow), + n.$once(xe, this.onTemplateShown), + n.$once(Oe, this.onTemplateHide), + n.$once(ge, this.onTemplateHidden), + n.$once(Ee, this.destroyTemplate), + n.$on(me, this.handleEvent), + n.$on(ve, this.handleEvent), + n.$on(Te, this.handleEvent), + n.$on(Se, this.handleEvent), + n.$mount(t.appendChild(document.createElement("div"))); + }, + hideTemplate: function () { + this.$_tip && this.$_tip.hide(), + this.clearActiveTriggers(), + (this.$_hoverState = ""); + }, + destroyTemplate: function () { + this.setWhileOpenListeners(!1), + this.clearHoverTimeout(), + (this.$_hoverState = ""), + this.clearActiveTriggers(), + (this.localPlacementTarget = null); + try { + this.$_tip.$destroy(); + } catch (t) {} + (this.$_tip = null), + this.removeAriaDescribedby(), + this.restoreTitle(), + (this.localShow = !1); + }, + getTemplateElement: function () { + return this.$_tip ? this.$_tip.$el : null; + }, + handleTemplateUpdate: function () { + var t = this, + e = this.$_tip; + if (e) { + [ + "title", + "content", + "variant", + "customClass", + "noFade", + "interactive", + ].forEach(function (n) { + e[n] !== t[n] && (e[n] = t[n]); + }); + } + }, + show: function () { + var t = this.getTarget(); + if ( + t && + Fn(document.body, t) && + Cn(t) && + !this.dropdownOpen() && + ((!at(this.title) && "" !== this.title) || + (!at(this.content) && "" !== this.content)) && + !this.$_tip && + !this.localShow + ) { + this.localShow = !0; + var e = this.buildEvent(Ce, { cancelable: !0 }); + this.emitEvent(e), + e.defaultPrevented + ? this.destroyTemplate() + : (this.fixTitle(), + this.addAriaDescribedby(), + this.createTemplateAndShow()); + } + }, + hide: function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] && arguments[0], + e = this.getTemplateElement(); + if (e && this.localShow) { + var n = this.buildEvent(Oe, { cancelable: !t }); + this.emitEvent(n), n.defaultPrevented || this.hideTemplate(); + } else this.restoreTitle(); + }, + forceHide: function () { + this.getTemplateElement() && + this.localShow && + (this.setWhileOpenListeners(!1), + this.clearHoverTimeout(), + (this.$_hoverState = ""), + this.clearActiveTriggers(), + this.$_tip && (this.$_tip.noFade = !0), + this.hide(!0)); + }, + enable: function () { + (this.$_enabled = !0), this.emitEvent(this.buildEvent(pe)); + }, + disable: function () { + (this.$_enabled = !1), this.emitEvent(this.buildEvent(he)); + }, + onTemplateShow: function () { + this.setWhileOpenListeners(!0); + }, + onTemplateShown: function () { + var t = this.$_hoverState; + (this.$_hoverState = ""), + "out" === t && this.leave(null), + this.emitEvent(this.buildEvent(xe)); + }, + onTemplateHide: function () { + this.setWhileOpenListeners(!1); + }, + onTemplateHidden: function () { + this.destroyTemplate(), this.emitEvent(this.buildEvent(ge)); + }, + getTarget: function () { + var t = this.target; + return ( + ct(t) + ? (t = In(t.replace(/^#/, ""))) + : st(t) + ? (t = t()) + : t && (t = t.$el || t), + kn(t) ? t : null + ); + }, + getPlacementTarget: function () { + return this.getTarget(); + }, + getTargetId: function () { + var t = this.getTarget(); + return t && t.id ? t.id : null; + }, + getContainer: function () { + var t = !!this.container && (this.container.$el || this.container), + e = document.body, + n = this.getTarget(); + return !1 === t + ? En(mc, n) || e + : (ct(t) && In(t.replace(/^#/, ""))) || e; + }, + getBoundary: function () { + return this.boundary + ? this.boundary.$el || this.boundary + : "scrollParent"; + }, + isInModal: function () { + var t = this.getTarget(); + return t && En(pc, t); + }, + isDropdown: function () { + var t = this.getTarget(); + return t && Mn(t, "dropdown"); + }, + dropdownOpen: function () { + var t = this.getTarget(); + return this.isDropdown() && t && xn(".dropdown-menu.show", t); + }, + clearHoverTimeout: function () { + clearTimeout(this.$_hoverTimeout), (this.$_hoverTimeout = null); + }, + clearVisibilityInterval: function () { + clearInterval(this.$_visibleInterval), + (this.$_visibleInterval = null); + }, + clearActiveTriggers: function () { + for (var t in this.activeTrigger) this.activeTrigger[t] = !1; + }, + addAriaDescribedby: function () { + var t = this.getTarget(), + e = Rn(t, "aria-describedby") || ""; + (e = e.split(/\s+/).concat(this.computedId).join(" ").trim()), + _n(t, "aria-describedby", e); + }, + removeAriaDescribedby: function () { + var t = this, + e = this.getTarget(), + n = Rn(e, "aria-describedby") || ""; + (n = n + .split(/\s+/) + .filter(function (e) { + return e !== t.computedId; + }) + .join(" ") + .trim()) + ? _n(e, "aria-describedby", n) + : Ln(e, "aria-describedby"); + }, + fixTitle: function () { + var t = this.getTarget(); + if (Vn(t, "title")) { + var e = Rn(t, "title"); + _n(t, "title", ""), e && _n(t, vc, e); + } + }, + restoreTitle: function () { + var t = this.getTarget(); + if (Vn(t, vc)) { + var e = Rn(t, vc); + Ln(t, vc), e && _n(t, "title", e); + } + }, + buildEvent: function (t) { + var e = + arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return new Ba( + t, + uc( + { + cancelable: !1, + target: this.getTarget(), + relatedTarget: this.getTemplateElement() || null, + componentId: this.computedId, + vueTarget: this, + }, + e + ) + ); + }, + emitEvent: function (t) { + var e = t.type; + this.emitOnRoot(pi(this.templateType, e), t), this.$emit(e, t); + }, + listen: function () { + var t = this, + e = this.getTarget(); + e && + (this.setRootListener(!0), + this.computedTriggers.forEach(function (n) { + "click" === n + ? ci(e, "click", t.handleEvent, Ie) + : "focus" === n + ? (ci(e, "focusin", t.handleEvent, Ie), + ci(e, "focusout", t.handleEvent, Ie)) + : "blur" === n + ? ci(e, "focusout", t.handleEvent, Ie) + : "hover" === n && + (ci(e, "mouseenter", t.handleEvent, Ie), + ci(e, "mouseleave", t.handleEvent, Ie)); + }, this)); + }, + unListen: function () { + var t = this, + e = this.getTarget(); + this.setRootListener(!1), + [ + "click", + "focusin", + "focusout", + "mouseenter", + "mouseleave", + ].forEach(function (n) { + e && ui(e, n, t.handleEvent, Ie); + }, this); + }, + setRootListener: function (t) { + var e = this.$root; + if (e) { + var n = t ? "$on" : "$off", + i = this.templateType; + e[n](bi(i, Oe), this.doHide), + e[n](bi(i, Ce), this.doShow), + e[n](bi(i, de), this.doDisable), + e[n](bi(i, fe), this.doEnable); + } + }, + setWhileOpenListeners: function (t) { + this.setModalListener(t), + this.setDropdownListener(t), + this.visibleCheck(t), + this.setOnTouchStartListener(t); + }, + visibleCheck: function (t) { + var e = this; + this.clearVisibilityInterval(); + var n = this.getTarget(), + i = this.getTemplateElement(); + t && + (this.$_visibleInterval = setInterval(function () { + !i || !e.localShow || (n.parentNode && Cn(n)) || e.forceHide(); + }, 100)); + }, + setModalListener: function (t) { + this.isInModal() && + this.$root[t ? "$on" : "$off"](bc, this.forceHide); + }, + setOnTouchStartListener: function (t) { + var e = this; + "ontouchstart" in document.documentElement && + dn(document.body.children).forEach(function (n) { + di(t, n, "mouseover", e.$_noop); + }); + }, + setDropdownListener: function (t) { + var e = this.getTarget(); + e && + this.$root && + this.isDropdown && + e.__vue__ && + e.__vue__[t ? "$on" : "$off"](xe, this.forceHide); + }, + handleEvent: function (t) { + var e = this.getTarget(); + if ( + e && + kn((n = e)) && + !n.disabled && + !Vn(n, "disabled") && + !Mn(n, "disabled") && + this.$_enabled && + !this.dropdownOpen() + ) { + var n, + i = t.type, + r = this.computedTriggers; + if ("click" === i && hn(r, "click")) this.click(t); + else if ("mouseenter" === i && hn(r, "hover")) this.enter(t); + else if ("focusin" === i && hn(r, "focus")) this.enter(t); + else if ( + ("focusout" === i && (hn(r, "focus") || hn(r, "blur"))) || + ("mouseleave" === i && hn(r, "hover")) + ) { + var o = this.getTemplateElement(), + a = t.target, + s = t.relatedTarget; + if ( + (o && Fn(o, a) && Fn(e, s)) || + (o && Fn(e, a) && Fn(o, s)) || + (o && Fn(o, a) && Fn(o, s)) || + (Fn(e, a) && Fn(e, s)) + ) + return; + this.leave(t); + } + } + }, + doHide: function (t) { + (t && this.getTargetId() !== t && this.computedId !== t) || + this.forceHide(); + }, + doShow: function (t) { + (t && this.getTargetId() !== t && this.computedId !== t) || + this.show(); + }, + doDisable: function (t) { + (t && this.getTargetId() !== t && this.computedId !== t) || + this.disable(); + }, + doEnable: function (t) { + (t && this.getTargetId() !== t && this.computedId !== t) || + this.enable(); + }, + click: function (t) { + this.$_enabled && + !this.dropdownOpen() && + (Nn(t.currentTarget), + (this.activeTrigger.click = !this.activeTrigger.click), + this.isWithActiveTrigger ? this.enter(null) : this.leave(null)); + }, + toggle: function () { + this.$_enabled && + !this.dropdownOpen() && + (this.localShow ? this.leave(null) : this.enter(null)); + }, + enter: function () { + var t = this, + e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null; + e && + (this.activeTrigger["focusin" === e.type ? "focus" : "hover"] = !0), + this.localShow || "in" === this.$_hoverState + ? (this.$_hoverState = "in") + : (this.clearHoverTimeout(), + (this.$_hoverState = "in"), + this.computedDelay.show + ? (this.fixTitle(), + (this.$_hoverTimeout = setTimeout(function () { + "in" === t.$_hoverState + ? t.show() + : t.localShow || t.restoreTitle(); + }, this.computedDelay.show))) + : this.show()); + }, + leave: function () { + var t = this, + e = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : null; + e && + ((this.activeTrigger["focusout" === e.type ? "focus" : "hover"] = + !1), + "focusout" === e.type && + hn(this.computedTriggers, "blur") && + ((this.activeTrigger.click = !1), + (this.activeTrigger.hover = !1))), + this.isWithActiveTrigger || + (this.clearHoverTimeout(), + (this.$_hoverState = "out"), + this.computedDelay.hide + ? (this.$_hoverTimeout = setTimeout(function () { + "out" === t.$_hoverState && t.hide(); + }, this.computedDelay.hide)) + : this.hide()); + }, + }, + }); + function Oc(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function wc(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Tc = "disabled", + Sc = "update:disabled", + jc = "show", + kc = ti( + (wc( + (hc = { + boundary: Jn([tt, Be, Ne], "scrollParent"), + boundaryPadding: Jn(Ke, 50), + container: Jn([tt, Be, Ne]), + customClass: Jn(Ne), + delay: Jn(Xe, 50), + }), + Tc, + Jn(Le, !1) + ), + wc(hc, "fallbackPlacement", Jn(We, "flip")), + wc(hc, "id", Jn(Ne)), + wc(hc, "noFade", Jn(Le, !1)), + wc(hc, "noninteractive", Jn(Le, !1)), + wc(hc, "offset", Jn(Ke, 0)), + wc(hc, "placement", Jn(Ne, "top")), + wc(hc, jc, Jn(Le, !1)), + wc(hc, "target", Jn([tt, et, Ve, Be, Ne], void 0, !0)), + wc(hc, "title", Jn(Ne)), + wc(hc, "triggers", Jn(We, "hover focus")), + wc(hc, "variant", Jn(Ne)), + hc), + oe + ), + Pc = n.default.extend({ + name: oe, + mixins: [si], + inheritAttrs: !1, + props: kc, + data: function () { + return { localShow: this.show, localTitle: "", localContent: "" }; + }, + computed: { + templateData: function () { + return (function (t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Oc(Object(n), !0).forEach(function (e) { + wc(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties( + t, + Object.getOwnPropertyDescriptors(n) + ) + : Oc(Object(n)).forEach(function (e) { + Object.defineProperty( + t, + e, + Object.getOwnPropertyDescriptor(n, e) + ); + }); + } + return t; + })( + { + title: this.localTitle, + content: this.localContent, + interactive: !this.noninteractive, + }, + Pt(this.$props, [ + "boundary", + "boundaryPadding", + "container", + "customClass", + "delay", + "fallbackPlacement", + "id", + "noFade", + "offset", + "placement", + "target", + "target", + "triggers", + "variant", + Tc, + ]) + ); + }, + templateTitleContent: function () { + return { title: this.title, content: this.content }; + }, + }, + watch: + ((fc = {}), + wc(fc, jc, function (t, e) { + t !== e && + t !== this.localShow && + this.$_toolpop && + (t ? this.$_toolpop.show() : this.$_toolpop.forceHide()); + }), + wc(fc, Tc, function (t) { + t ? this.doDisable() : this.doEnable(); + }), + wc(fc, "localShow", function (t) { + this.$emit("update:show", t); + }), + wc(fc, "templateData", function () { + var t = this; + this.$nextTick(function () { + t.$_toolpop && t.$_toolpop.updateData(t.templateData); + }); + }), + wc(fc, "templateTitleContent", function () { + this.$nextTick(this.updateContent); + }), + fc), + created: function () { + this.$_toolpop = null; + }, + updated: function () { + this.$nextTick(this.updateContent); + }, + beforeDestroy: function () { + this.$off(je, this.doOpen), + this.$off(le, this.doClose), + this.$off(de, this.doDisable), + this.$off(fe, this.doEnable), + this.$_toolpop && + (this.$_toolpop.$destroy(), (this.$_toolpop = null)); + }, + mounted: function () { + var t = this; + this.$nextTick(function () { + var e = t.getComponent(); + t.updateContent(); + var n = Zl(t) || Zl(t.$parent), + i = (t.$_toolpop = new e({ parent: t, _scopeId: n || void 0 })); + i.updateData(t.templateData), + i.$on(Ce, t.onShow), + i.$on(xe, t.onShown), + i.$on(Oe, t.onHide), + i.$on(ge, t.onHidden), + i.$on(he, t.onDisabled), + i.$on(pe, t.onEnabled), + t.disabled && t.doDisable(), + t.$on(je, t.doOpen), + t.$on(le, t.doClose), + t.$on(de, t.doDisable), + t.$on(fe, t.doEnable), + t.localShow && i.show(); + }); + }, + methods: { + getComponent: function () { + return gc; + }, + updateContent: function () { + this.setTitle(this.normalizeSlot() || this.title); + }, + setTitle: function (t) { + (t = at(t) ? "" : t), this.localTitle !== t && (this.localTitle = t); + }, + setContent: function (t) { + (t = at(t) ? "" : t), + this.localContent !== t && (this.localContent = t); + }, + onShow: function (t) { + this.$emit(Ce, t), t && (this.localShow = !t.defaultPrevented); + }, + onShown: function (t) { + (this.localShow = !0), this.$emit(xe, t); + }, + onHide: function (t) { + this.$emit(Oe, t); + }, + onHidden: function (t) { + this.$emit(ge, t), (this.localShow = !1); + }, + onDisabled: function (t) { + t && t.type === he && (this.$emit(Sc, !0), this.$emit(he, t)); + }, + onEnabled: function (t) { + t && t.type === pe && (this.$emit(Sc, !1), this.$emit(pe, t)); + }, + doOpen: function () { + !this.localShow && this.$_toolpop && this.$_toolpop.show(); + }, + doClose: function () { + this.localShow && this.$_toolpop && this.$_toolpop.hide(); + }, + doDisable: function () { + this.$_toolpop && this.$_toolpop.disable(); + }, + doEnable: function () { + this.$_toolpop && this.$_toolpop.enable(); + }, + }, + render: function (t) { + return t(); + }, + }), + Dc = n.default.extend({ + methods: { + hasListener: function (t) { + var e = this.$listeners || {}, + n = this._events || {}; + return !rt(e[t]) || (dt(n[t]) && n[t].length > 0); + }, + }, + }); + function Cc(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function xc(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var $c = "light", + Ec = "dark", + Fc = ti({ variant: Jn(Ne) }, "BTr"), + Ic = n.default.extend({ + name: "BTr", + mixins: [fr, br, si], + provide: function () { + return { bvTableTr: this }; + }, + inject: { + bvTableRowGroup: { + default: function () { + return {}; + }, + }, + }, + inheritAttrs: !1, + props: Fc, + computed: { + inTbody: function () { + return this.bvTableRowGroup.isTbody; + }, + inThead: function () { + return this.bvTableRowGroup.isThead; + }, + inTfoot: function () { + return this.bvTableRowGroup.isTfoot; + }, + isDark: function () { + return this.bvTableRowGroup.isDark; + }, + isStacked: function () { + return this.bvTableRowGroup.isStacked; + }, + isResponsive: function () { + return this.bvTableRowGroup.isResponsive; + }, + isStickyHeader: function () { + return this.bvTableRowGroup.isStickyHeader; + }, + hasStickyHeader: function () { + return !this.isStacked && this.bvTableRowGroup.hasStickyHeader; + }, + tableVariant: function () { + return this.bvTableRowGroup.tableVariant; + }, + headVariant: function () { + return this.inThead ? this.bvTableRowGroup.headVariant : null; + }, + footVariant: function () { + return this.inTfoot ? this.bvTableRowGroup.footVariant : null; + }, + isRowDark: function () { + return ( + this.headVariant !== $c && + this.footVariant !== $c && + (this.headVariant === Ec || this.footVariant === Ec || this.isDark) + ); + }, + trClasses: function () { + var t = this.variant; + return [ + t + ? "".concat(this.isRowDark ? "bg" : "table", "-").concat(t) + : null, + ]; + }, + trAttrs: function () { + return (function (t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Cc(Object(n), !0).forEach(function (e) { + xc(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties( + t, + Object.getOwnPropertyDescriptors(n) + ) + : Cc(Object(n)).forEach(function (e) { + Object.defineProperty( + t, + e, + Object.getOwnPropertyDescriptor(n, e) + ); + }); + } + return t; + })({ role: "row" }, this.bvAttrs); + }, + }, + render: function (t) { + return t( + "tr", + { class: this.trClasses, attrs: this.trAttrs, on: this.bvListeners }, + this.normalizeSlot() + ); + }, + }), + Mc = {}, + _c = n.default.extend({ + props: Mc, + methods: { + renderBottomRow: function () { + var t = this.computedFields, + e = this.stacked, + n = this.tbodyTrClass, + i = this.tbodyTrAttr, + r = this.$createElement; + return this.hasNormalizedSlot(Qe) && !0 !== e && "" !== e + ? r( + Ic, + { + staticClass: "b-table-bottom-row", + class: [st(n) ? n(null, "row-bottom") : n], + attrs: st(i) ? i(null, "row-bottom") : i, + key: "b-bottom-row", + }, + this.normalizeSlot(Qe, { columns: t.length, fields: t }) + ) + : r(); + }, + }, + }); + function Lc(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Rc(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Lc(Object(n), !0).forEach(function (e) { + Vc(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Lc(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Vc(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Ac = function (t) { + return (t = pn(t, 0)) > 0 ? t : null; + }, + Bc = function (t) { + return at(t) || Ac(t) > 0; + }, + Hc = ti( + { + colspan: Jn(Ke, null, Bc), + rowspan: Jn(Ke, null, Bc), + stackedHeading: Jn(Ne), + stickyColumn: Jn(Le, !1), + variant: Jn(Ne), + }, + ee + ), + Nc = n.default.extend({ + name: ee, + mixins: [fr, br, si], + inject: { + bvTableTr: { + default: function () { + return {}; + }, + }, + }, + inheritAttrs: !1, + props: Hc, + computed: { + tag: function () { + return "td"; + }, + inTbody: function () { + return this.bvTableTr.inTbody; + }, + inThead: function () { + return this.bvTableTr.inThead; + }, + inTfoot: function () { + return this.bvTableTr.inTfoot; + }, + isDark: function () { + return this.bvTableTr.isDark; + }, + isStacked: function () { + return this.bvTableTr.isStacked; + }, + isStackedCell: function () { + return this.inTbody && this.isStacked; + }, + isResponsive: function () { + return this.bvTableTr.isResponsive; + }, + isStickyHeader: function () { + return this.bvTableTr.isStickyHeader; + }, + hasStickyHeader: function () { + return this.bvTableTr.hasStickyHeader; + }, + isStickyColumn: function () { + return ( + !this.isStacked && + (this.isResponsive || this.hasStickyHeader) && + this.stickyColumn + ); + }, + rowVariant: function () { + return this.bvTableTr.variant; + }, + headVariant: function () { + return this.bvTableTr.headVariant; + }, + footVariant: function () { + return this.bvTableTr.footVariant; + }, + tableVariant: function () { + return this.bvTableTr.tableVariant; + }, + computedColspan: function () { + return Ac(this.colspan); + }, + computedRowspan: function () { + return Ac(this.rowspan); + }, + cellClasses: function () { + var t = this.variant, + e = this.headVariant, + n = this.isStickyColumn; + return ( + ((!t && this.isStickyHeader && !e) || + (!t && n && this.inTfoot && !this.footVariant) || + (!t && n && this.inThead && !e) || + (!t && n && this.inTbody)) && + (t = this.rowVariant || this.tableVariant || "b-table-default"), + [ + t ? "".concat(this.isDark ? "bg" : "table", "-").concat(t) : null, + n ? "b-table-sticky-column" : null, + ] + ); + }, + cellAttrs: function () { + var t = this.stackedHeading, + e = this.inThead || this.inTfoot, + n = this.computedColspan, + i = this.computedRowspan, + r = "cell", + o = null; + return ( + e + ? ((r = "columnheader"), (o = n > 0 ? "colspan" : "col")) + : Pn(this.tag, "th") && + ((r = "rowheader"), (o = i > 0 ? "rowgroup" : "row")), + Rc( + Rc({ colspan: n, rowspan: i, role: r, scope: o }, this.bvAttrs), + {}, + { "data-label": this.isStackedCell && !at(t) ? gn(t) : null } + ) + ); + }, + }, + render: function (t) { + var e = [this.normalizeSlot()]; + return t( + this.tag, + { + class: this.cellClasses, + attrs: this.cellAttrs, + on: this.bvListeners, + }, + [this.isStackedCell ? t("div", [e]) : e] + ); + }, + }); + var zc, + Yc, + Gc, + Wc = "busy", + Uc = + ((zc = {}), + (Yc = Wc), + (Gc = Jn(Le, !1)), + Yc in zc + ? Object.defineProperty(zc, Yc, { + value: Gc, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (zc[Yc] = Gc), + zc), + qc = n.default.extend({ + props: Uc, + data: function () { + return { localBusy: !1 }; + }, + computed: { + computedBusy: function () { + return this.busy || this.localBusy; + }, + }, + watch: { + localBusy: function (t, e) { + t !== e && this.$emit("update:busy", t); + }, + }, + methods: { + stopIfBusy: function (t) { + return !!this.computedBusy && (hi(t), !0); + }, + renderBusy: function () { + var t = this.tbodyTrClass, + e = this.tbodyTrAttr, + n = this.$createElement; + return this.computedBusy && this.hasNormalizedSlot(an) + ? n( + Ic, + { + staticClass: "b-table-busy-slot", + class: [st(t) ? t(null, an) : t], + attrs: st(e) ? e(null, an) : e, + key: "table-busy-slot", + }, + [ + n( + Nc, + { props: { colspan: this.computedFields.length || null } }, + [this.normalizeSlot(an)] + ), + ] + ) + : null; + }, + }, + }), + Kc = { caption: Jn(Ne), captionHtml: Jn(Ne) }, + Xc = n.default.extend({ + props: Kc, + computed: { + captionId: function () { + return this.isStacked ? this.safeId("_caption_") : null; + }, + }, + methods: { + renderCaption: function () { + var t = this.caption, + e = this.captionHtml, + n = this.$createElement, + i = n(), + r = this.hasNormalizedSlot(sn); + return ( + (r || t || e) && + (i = n( + "caption", + { + attrs: { id: this.captionId }, + domProps: r ? {} : Hr(e, t), + key: "caption", + ref: "caption", + }, + this.normalizeSlot(sn) + )), + i + ); + }, + }, + }), + Jc = n.default.extend({ + methods: { + renderColgroup: function () { + var t = this.computedFields, + e = this.$createElement, + n = e(); + return ( + this.hasNormalizedSlot(ln) && + (n = e("colgroup", { key: "colgroup" }, [ + this.normalizeSlot(ln, { columns: t.length, fields: t }), + ])), + n + ); + }, + }, + }), + Zc = { + emptyFilteredHtml: Jn(Ne), + emptyFilteredText: Jn(Ne, "There are no records matching your request"), + emptyHtml: Jn(Ne), + emptyText: Jn(Ne, "There are no records to show"), + showEmpty: Jn(Le, !1), + }, + Qc = n.default.extend({ + props: Zc, + methods: { + renderEmpty: function () { + var t = this.computedItems, + e = this.$createElement, + n = e(); + if ( + this.showEmpty && + (!t || 0 === t.length) && + (!this.computedBusy || !this.hasNormalizedSlot(an)) + ) { + var i = this.computedFields, + r = this.isFiltered, + o = this.emptyText, + a = this.emptyHtml, + s = this.emptyFilteredText, + l = this.emptyFilteredHtml, + c = this.tbodyTrClass, + u = this.tbodyTrAttr; + (n = this.normalizeSlot(r ? "emptyfiltered" : "empty", { + emptyFilteredHtml: l, + emptyFilteredText: s, + emptyHtml: a, + emptyText: o, + fields: i, + items: t, + })) || + (n = e("div", { + class: ["text-center", "my-2"], + domProps: r ? Hr(l, s) : Hr(a, o), + })), + (n = e(Nc, { props: { colspan: i.length || null } }, [ + e("div", { attrs: { role: "alert", "aria-live": "polite" } }, [ + n, + ]), + ])), + (n = e( + Ic, + { + staticClass: "b-table-empty-row", + class: [st(c) ? c(null, "row-empty") : c], + attrs: st(u) ? u(null, "row-empty") : u, + key: r ? "b-empty-filtered-row" : "b-empty-row", + }, + [n] + )); + } + return n; + }, + }, + }), + tu = function t(e) { + return at(e) + ? "" + : ht(e) && !pt(e) + ? St(e) + .sort() + .map(function (n) { + return t(e[n]); + }) + .filter(function (t) { + return !!t; + }) + .join(" ") + : gn(e); + }; + function eu(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function nu(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? eu(Object(n), !0).forEach(function (e) { + iu(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : eu(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function iu(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var ru = "_cellVariants", + ou = "_rowVariant", + au = "_showDetails", + su = [ru, ou, au].reduce(function (t, e) { + return nu(nu({}, t), {}, iu({}, e, !0)); + }, {}), + lu = [ + "a", + "a *", + "button", + "button *", + "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(","), + cu = function (t, e, n) { + var i = + arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}, + r = St(i).reduce(function (e, n) { + var r = i[n], + o = r.filterByFormatted, + a = st(o) ? o : o ? r.formatter : null; + return st(a) && (e[n] = a(t[n], n, t)), e; + }, kt(t)), + o = St(r).filter(function (t) { + return !( + su[t] || + (dt(e) && e.length > 0 && hn(e, t)) || + (dt(n) && n.length > 0 && !hn(n, t)) + ); + }); + return Pt(r, o); + }; + function uu(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + var du, + hu = { + filter: Jn( + [].concat( + ((du = Ge), + (function (t) { + if (Array.isArray(t)) return uu(t); + })(du) || + (function (t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) + return Array.from(t); + })(du) || + (function (t, e) { + if (t) { + if ("string" == typeof t) return uu(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + return ( + "Object" === n && t.constructor && (n = t.constructor.name), + "Map" === n || "Set" === n + ? Array.from(t) + : "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ? uu(t, e) + : void 0 + ); + } + })(du) || + (function () { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })()), + [He] + ) + ), + filterDebounce: Jn(Ke, 0, function (t) { + return D.test(String(t)); + }), + filterFunction: Jn(Ve), + filterIgnoredFields: Jn(_e, []), + filterIncludedFields: Jn(_e, []), + }, + fu = n.default.extend({ + props: hu, + data: function () { + return { + isFiltered: !1, + localFilter: this.filterSanitize(this.filter), + }; + }, + computed: { + computedFilterIgnored: function () { + return fn(this.filterIgnoredFields || []).filter(Lt); + }, + computedFilterIncluded: function () { + return fn(this.filterIncludedFields || []).filter(Lt); + }, + computedFilterDebounce: function () { + var t = pn(this.filterDebounce, 0); + return ( + t > 0 && + Ht( + 'Prop "filter-debounce" is deprecated. Use the debounce feature of "" instead.', + te + ), + t + ); + }, + localFiltering: function () { + return !this.hasProvider || !!this.noProviderFiltering; + }, + filteredCheck: function () { + return { + filteredItems: this.filteredItems, + localItems: this.localItems, + localFilter: this.localFilter, + }; + }, + localFilterFn: function () { + var t = this.filterFunction; + return ni(t) ? t : null; + }, + filteredItems: function () { + var t = this.localItems, + e = this.localFilter, + n = this.localFiltering + ? this.filterFnFactory(this.localFilterFn, e) || + this.defaultFilterFnFactory(e) + : null; + return n && t.length > 0 ? t.filter(n) : t; + }, + }, + watch: { + computedFilterDebounce: function (t) { + !t && + this.$_filterTimer && + (this.clearFilterTimer(), + (this.localFilter = this.filterSanitize(this.filter))); + }, + filter: { + deep: !0, + handler: function (t) { + var e = this, + n = this.computedFilterDebounce; + this.clearFilterTimer(), + n && n > 0 + ? (this.$_filterTimer = setTimeout(function () { + e.localFilter = e.filterSanitize(t); + }, n)) + : (this.localFilter = this.filterSanitize(t)); + }, + }, + filteredCheck: function (t) { + var e = t.filteredItems, + n = t.localFilter, + i = !1; + n ? (lr(n, []) || lr(n, {}) ? (i = !1) : n && (i = !0)) : (i = !1), + i && this.$emit(be, e, e.length), + (this.isFiltered = i); + }, + isFiltered: function (t, e) { + if (!1 === t && !0 === e) { + var n = this.localItems; + this.$emit(be, n, n.length); + } + }, + }, + created: function () { + var t = this; + (this.$_filterTimer = null), + this.$nextTick(function () { + t.isFiltered = Boolean(t.localFilter); + }); + }, + beforeDestroy: function () { + this.clearFilterTimer(); + }, + methods: { + clearFilterTimer: function () { + clearTimeout(this.$_filterTimer), (this.$_filterTimer = null); + }, + filterSanitize: function (t) { + return !this.localFiltering || this.localFilterFn || ct(t) || mt(t) + ? _t(t) + : ""; + }, + filterFnFactory: function (t, e) { + if (!t || !st(t) || !e || lr(e, []) || lr(e, {})) return null; + return function (n) { + return t(n, e); + }; + }, + defaultFilterFnFactory: function (t) { + var e = this; + if (!t || (!ct(t) && !mt(t))) return null; + var n, + i = t; + if (ct(i)) { + var r = ((n = t), n.replace(F, "\\$&")).replace(I, "\\s+"); + i = new RegExp(".*".concat(r, ".*"), "i"); + } + return function (t) { + return ( + (i.lastIndex = 0), + i.test( + ((n = t), + (r = e.computedFilterIgnored), + (o = e.computedFilterIncluded), + (a = e.computedFieldsObj), + ht(n) ? tu(cu(n, r, o, a)) : "") + ) + ); + var n, r, o, a; + }; + }, + }, + }), + pu = function (t, e) { + var n = []; + if ( + (dt(t) && + t.filter(Lt).forEach(function (t) { + if (ct(t)) n.push({ key: t, label: yn(t) }); + else if (ht(t) && t.key && ct(t.key)) n.push(kt(t)); + else if (ht(t) && 1 === St(t).length) { + var e = St(t)[0], + i = (function (t, e) { + var n = null; + return ( + ct(e) + ? (n = { key: t, label: e }) + : st(e) + ? (n = { key: t, formatter: e }) + : ht(e) + ? ((n = kt(e)).key = n.key || t) + : !1 !== e && (n = { key: t }), + n + ); + })(e, t[e]); + i && n.push(i); + } + }), + 0 === n.length && dt(e) && e.length > 0) + ) { + var i = e[0]; + St(i).forEach(function (t) { + su[t] || n.push({ key: t, label: yn(t) }); + }); + } + var r = {}; + return n.filter(function (t) { + return ( + !r[t.key] && + ((r[t.key] = !0), (t.label = ct(t.label) ? t.label : yn(t.key)), !0) + ); + }); + }; + function bu(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function mu(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? bu(Object(n), !0).forEach(function (e) { + vu(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : bu(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function vu(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var yu = ri("value", { type: _e, defaultValue: [] }), + gu = yu.mixin, + Ou = yu.props, + wu = yu.prop, + Tu = yu.event, + Su = xt( + mu( + mu({}, Ou), + {}, + vu( + { fields: Jn(_e, null), items: Jn(_e, []), primaryKey: Jn(Ne) }, + wu, + Jn(_e, []) + ) + ) + ), + ju = n.default.extend({ + mixins: [gu], + props: Su, + data: function () { + var t = this.items; + return { localItems: dt(t) ? t.slice() : [] }; + }, + computed: { + computedFields: function () { + return pu(this.fields, this.localItems); + }, + computedFieldsObj: function () { + var t = this.$parent; + return this.computedFields.reduce(function (e, n) { + if (((e[n.key] = kt(n)), n.formatter)) { + var i = n.formatter; + ct(i) && st(t[i]) ? (i = t[i]) : st(i) || (i = void 0), + (e[n.key].formatter = i); + } + return e; + }, {}); + }, + computedItems: function () { + return ( + this.paginatedItems || + this.sortedItems || + this.filteredItems || + this.localItems || + [] + ).slice(); + }, + context: function () { + return { + filter: this.localFilter, + sortBy: this.localSortBy, + sortDesc: this.localSortDesc, + perPage: ji(pn(this.perPage, 0), 0), + currentPage: ji(pn(this.currentPage, 0), 1), + apiUrl: this.apiUrl, + }; + }, + }, + watch: { + items: function (t) { + this.localItems = dt(t) ? t.slice() : []; + }, + computedItems: function (t, e) { + lr(t, e) || this.$emit(Tu, t); + }, + context: function (t, e) { + lr(t, e) || this.$emit(ue, t); + }, + }, + mounted: function () { + this.$emit(Tu, this.computedItems); + }, + methods: { + getFieldFormatter: function (t) { + var e = this.computedFieldsObj[t]; + return e ? e.formatter : void 0; + }, + }, + }), + ku = { currentPage: Jn(Ke, 1), perPage: Jn(Ke, 0) }, + Pu = n.default.extend({ + props: ku, + computed: { + localPaging: function () { + return !this.hasProvider || !!this.noProviderPaging; + }, + paginatedItems: function () { + var t = + this.sortedItems || this.filteredItems || this.localItems || [], + e = ji(pn(this.currentPage, 1), 1), + n = ji(pn(this.perPage, 0), 0); + return this.localPaging && n && (t = t.slice((e - 1) * n, e * n)), t; + }, + }, + }), + Du = pi(te, ke), + Cu = bi(te, "refresh"), + xu = { + apiUrl: Jn(Ne), + items: Jn(ze, []), + noProviderFiltering: Jn(Le, !1), + noProviderPaging: Jn(Le, !1), + noProviderSorting: Jn(Le, !1), + }, + $u = n.default.extend({ + mixins: [pr], + props: xu, + computed: { + hasProvider: function () { + return st(this.items); + }, + providerTriggerContext: function () { + var t = { + apiUrl: this.apiUrl, + filter: null, + sortBy: null, + sortDesc: null, + perPage: null, + currentPage: null, + }; + return ( + this.noProviderFiltering || (t.filter = this.localFilter), + this.noProviderSorting || + ((t.sortBy = this.localSortBy), + (t.sortDesc = this.localSortDesc)), + this.noProviderPaging || + ((t.perPage = this.perPage), (t.currentPage = this.currentPage)), + kt(t) + ); + }, + }, + watch: { + items: function (t) { + (this.hasProvider || st(t)) && this.$nextTick(this._providerUpdate); + }, + providerTriggerContext: function (t, e) { + lr(t, e) || this.$nextTick(this._providerUpdate); + }, + }, + mounted: function () { + var t = this; + !this.hasProvider || + (this.localItems && 0 !== this.localItems.length) || + this._providerUpdate(), + this.listenOnRoot(Cu, function (e) { + (e !== t.id && e !== t) || t.refresh(); + }); + }, + methods: { + refresh: function () { + var t = this.items, + e = this.refresh; + this.$off(ke, e), + this.computedBusy + ? this.localBusy && this.hasProvider && this.$on(ke, e) + : (this.clearSelected(), + this.hasProvider + ? this.$nextTick(this._providerUpdate) + : (this.localItems = dt(t) ? t.slice() : [])); + }, + _providerSetLocal: function (t) { + (this.localItems = dt(t) ? t.slice() : []), + (this.localBusy = !1), + this.$emit(ke), + this.id && this.emitOnRoot(Du, this.id); + }, + _providerUpdate: function () { + var t = this; + this.hasProvider && + (this.computedBusy + ? this.$nextTick(this.refresh) + : ((this.localBusy = !0), + this.$nextTick(function () { + try { + var e = t.items(t.context, t._providerSetLocal); + !(function (t) { + return !at(t) && st(t.then) && st(t.catch); + })(e) + ? dt(e) + ? t._providerSetLocal(e) + : 2 !== t.items.length && + (Ht( + "Provider function didn't request callback and did not return a promise or data.", + te + ), + (t.localBusy = !1)) + : e.then(function (e) { + t._providerSetLocal(e); + }); + } catch (e) { + Ht( + "Provider function error [" + .concat(e.name, "] ") + .concat(e.message, "."), + te + ), + (t.localBusy = !1), + t.$off(ke, t.refresh); + } + }))); + }, + }, + }); + function Eu(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Fu, + Iu, + Mu = ["range", "multi", "single"], + _u = { + noSelectOnClick: Jn(Le, !1), + selectMode: Jn(Ne, "multi", function (t) { + return hn(Mu, t); + }), + selectable: Jn(Le, !1), + selectedVariant: Jn(Ne, "active"), + }, + Lu = n.default.extend({ + props: _u, + data: function () { + return { selectedRows: [], selectedLastRow: -1 }; + }, + computed: { + isSelectable: function () { + return this.selectable && this.selectMode; + }, + hasSelectableRowClick: function () { + return this.isSelectable && !this.noSelectOnClick; + }, + supportsSelectableRows: function () { + return !0; + }, + selectableHasSelection: function () { + var t = this.selectedRows; + return this.isSelectable && t && t.length > 0 && t.some(Lt); + }, + selectableIsMultiSelect: function () { + return this.isSelectable && hn(["range", "multi"], this.selectMode); + }, + selectableTableClasses: function () { + var t, + e = this.isSelectable; + return ( + Eu( + (t = { "b-table-selectable": e }), + "b-table-select-".concat(this.selectMode), + e + ), + Eu(t, "b-table-selecting", this.selectableHasSelection), + Eu( + t, + "b-table-selectable-no-click", + e && !this.hasSelectableRowClick + ), + t + ); + }, + selectableTableAttrs: function () { + return { + "aria-multiselectable": this.isSelectable + ? this.selectableIsMultiSelect + ? "true" + : "false" + : null, + }; + }, + }, + watch: { + computedItems: function (t, e) { + var n = !1; + if (this.isSelectable && this.selectedRows.length > 0) { + n = dt(t) && dt(e) && t.length === e.length; + for (var i = 0; n && i < t.length; i++) n = lr(cu(t[i]), cu(e[i])); + } + n || this.clearSelected(); + }, + selectable: function (t) { + this.clearSelected(), this.setSelectionHandlers(t); + }, + selectMode: function () { + this.clearSelected(); + }, + hasSelectableRowClick: function (t) { + this.clearSelected(), this.setSelectionHandlers(!t); + }, + selectedRows: function (t, e) { + var n = this; + if (this.isSelectable && !lr(t, e)) { + var i = []; + t.forEach(function (t, e) { + t && i.push(n.computedItems[e]); + }), + this.$emit("row-selected", i); + } + }, + }, + beforeMount: function () { + this.isSelectable && this.setSelectionHandlers(!0); + }, + methods: { + selectRow: function (t) { + if ( + this.isSelectable && + ut(t) && + t >= 0 && + t < this.computedItems.length && + !this.isRowSelected(t) + ) { + var e = this.selectableIsMultiSelect + ? this.selectedRows.slice() + : []; + (e[t] = !0), + (this.selectedLastClicked = -1), + (this.selectedRows = e); + } + }, + unselectRow: function (t) { + if (this.isSelectable && ut(t) && this.isRowSelected(t)) { + var e = this.selectedRows.slice(); + (e[t] = !1), + (this.selectedLastClicked = -1), + (this.selectedRows = e); + } + }, + selectAllRows: function () { + var t = this.computedItems.length; + this.isSelectable && + t > 0 && + ((this.selectedLastClicked = -1), + (this.selectedRows = this.selectableIsMultiSelect + ? (function (t, e) { + var n = st(e) + ? e + : function () { + return e; + }; + return Array.apply(null, { length: t }).map(n); + })(t, !0) + : [!0])); + }, + isRowSelected: function (t) { + return !(!ut(t) || !this.selectedRows[t]); + }, + clearSelected: function () { + (this.selectedLastClicked = -1), (this.selectedRows = []); + }, + selectableRowClasses: function (t) { + if (this.isSelectable && this.isRowSelected(t)) { + var e = this.selectedVariant; + return Eu( + { "b-table-row-selected": !0 }, + "".concat(this.dark ? "bg" : "table", "-").concat(e), + e + ); + } + return {}; + }, + selectableRowAttrs: function (t) { + return { + "aria-selected": this.isSelectable + ? this.isRowSelected(t) + ? "true" + : "false" + : null, + }; + }, + setSelectionHandlers: function (t) { + var e = t && !this.noSelectOnClick ? "$on" : "$off"; + this[e](Pe, this.selectionHandler), + this[e](be, this.clearSelected), + this[e](ue, this.clearSelected); + }, + selectionHandler: function (t, e, n) { + if (this.isSelectable && !this.noSelectOnClick) { + var i = this.selectMode, + r = this.selectedLastRow, + o = this.selectedRows.slice(), + a = !o[e]; + if ("single" === i) o = []; + else if ("range" === i) + if (r > -1 && n.shiftKey) { + for (var s = Si(r, e); s <= ji(r, e); s++) o[s] = !0; + a = !0; + } else + n.ctrlKey || n.metaKey || ((o = []), (a = !0)), + (this.selectedLastRow = a ? e : -1); + (o[e] = a), (this.selectedRows = o); + } else this.clearSelected(); + }, + }, + }), + Ru = function (t) { + return at(t) + ? "" + : (function (t) { + return E.test(String(t)); + })(t) + ? bn(t, t) + : t; + }; + function Vu(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Au(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Vu(Object(n), !0).forEach(function (e) { + Bu(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Vu(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Bu(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Hu = "sortBy", + Nu = "sortDesc", + zu = "asc", + Yu = "desc", + Gu = [zu, Yu, "last"], + Wu = + (Bu( + (Fu = { + labelSortAsc: Jn(Ne, "Click to sort Ascending"), + labelSortClear: Jn(Ne, "Click to clear sorting"), + labelSortDesc: Jn(Ne, "Click to sort Descending"), + noFooterSorting: Jn(Le, !1), + noLocalSorting: Jn(Le, !1), + noSortReset: Jn(Le, !1), + }), + Hu, + Jn(Ne) + ), + Bu(Fu, "sortCompare", Jn(Ve)), + Bu(Fu, "sortCompareLocale", Jn(We)), + Bu(Fu, "sortCompareOptions", Jn(Be, { numeric: !0 })), + Bu(Fu, Nu, Jn(Le, !1)), + Bu( + Fu, + "sortDirection", + Jn(Ne, zu, function (t) { + return hn(Gu, t); + }) + ), + Bu(Fu, "sortIconLeft", Jn(Le, !1)), + Bu(Fu, "sortNullLast", Jn(Le, !1)), + Fu), + Uu = n.default.extend({ + props: Wu, + data: function () { + return { + localSortBy: this.sortBy || "", + localSortDesc: this.sortDesc || !1, + }; + }, + computed: { + localSorting: function () { + return this.hasProvider + ? !!this.noProviderSorting + : !this.noLocalSorting; + }, + isSortable: function () { + return this.computedFields.some(function (t) { + return t.sortable; + }); + }, + sortedItems: function () { + var t, + e = this.localSortBy, + n = this.localSortDesc, + i = this.sortCompareLocale, + r = this.sortNullLast, + o = this.sortCompare, + a = this.localSorting, + s = (this.filteredItems || this.localItems || []).slice(), + l = Au(Au({}, this.sortCompareOptions), {}, { usage: "sort" }); + if (e && a) { + var c = (this.computedFieldsObj[e] || {}).sortByFormatted, + u = st(c) ? c : c ? this.getFieldFormatter(e) : void 0; + return ( + (t = function (t, a) { + var s = null; + return ( + st(o) && (s = o(t, a, e, n, u, l, i)), + (at(s) || !1 === s) && + (s = (function (t, e) { + var n = + arguments.length > 2 && void 0 !== arguments[2] + ? arguments[2] + : {}, + i = n.sortBy, + r = void 0 === i ? null : i, + o = n.formatter, + a = void 0 === o ? null : o, + s = n.locale, + l = void 0 === s ? void 0 : s, + c = n.localeOptions, + u = void 0 === c ? {} : c, + d = n.nullLast, + h = void 0 !== d && d, + f = Vt(t, r, null), + p = Vt(e, r, null); + return ( + st(a) && ((f = a(f, r, t)), (p = a(p, r, e))), + (f = Ru(f)), + (p = Ru(p)), + (pt(f) && pt(p)) || (ut(f) && ut(p)) + ? f < p + ? -1 + : f > p + ? 1 + : 0 + : h && "" === f && "" !== p + ? 1 + : h && "" !== f && "" === p + ? -1 + : tu(f).localeCompare(tu(p), l, u) + ); + })(t, a, { + sortBy: e, + formatter: u, + locale: i, + localeOptions: l, + nullLast: r, + })), + (s || 0) * (n ? -1 : 1) + ); + }), + s + .map(function (t, e) { + return [e, t]; + }) + .sort( + function (t, e) { + return this(t[1], e[1]) || t[0] - e[0]; + }.bind(t) + ) + .map(function (t) { + return t[1]; + }) + ); + } + return s; + }, + }, + watch: + ((Iu = { + isSortable: function (t) { + t + ? this.isSortable && this.$on(ye, this.handleSort) + : this.$off(ye, this.handleSort); + }, + }), + Bu(Iu, Nu, function (t) { + t !== this.localSortDesc && (this.localSortDesc = t || !1); + }), + Bu(Iu, Hu, function (t) { + t !== this.localSortBy && (this.localSortBy = t || ""); + }), + Bu(Iu, "localSortDesc", function (t, e) { + t !== e && this.$emit("update:sortDesc", t); + }), + Bu(Iu, "localSortBy", function (t, e) { + t !== e && this.$emit("update:sortBy", t); + }), + Iu), + created: function () { + this.isSortable && this.$on(ye, this.handleSort); + }, + methods: { + handleSort: function (t, e, n, i) { + var r = this; + if (this.isSortable && (!i || !this.noFooterSorting)) { + var o = !1, + a = function () { + var t = e.sortDirection || r.sortDirection; + t === zu + ? (r.localSortDesc = !1) + : t === Yu && (r.localSortDesc = !0); + }; + if (e.sortable) { + var s = !this.localSorting && e.sortKey ? e.sortKey : t; + this.localSortBy === s + ? (this.localSortDesc = !this.localSortDesc) + : ((this.localSortBy = s), a()), + (o = !0); + } else + this.localSortBy && + !this.noSortReset && + ((this.localSortBy = ""), a(), (o = !0)); + o && this.$emit("sort-changed", this.context); + } + }, + sortTheadThClasses: function (t, e, n) { + return { + "b-table-sort-icon-left": + e.sortable && this.sortIconLeft && !(n && this.noFooterSorting), + }; + }, + sortTheadThAttrs: function (t, e, n) { + if (!this.isSortable || (n && this.noFooterSorting)) return {}; + var i = e.sortable; + return { + "aria-sort": + i && this.localSortBy === t + ? this.localSortDesc + ? "descending" + : "ascending" + : i + ? "none" + : null, + }; + }, + sortTheadThLabel: function (t, e, n) { + if (!this.isSortable || (n && this.noFooterSorting)) return null; + var i = ""; + if (e.sortable) + if (this.localSortBy === t) + i = this.localSortDesc ? this.labelSortAsc : this.labelSortDesc; + else { + i = this.localSortDesc ? this.labelSortDesc : this.labelSortAsc; + var r = this.sortDirection || e.sortDirection; + r === zu + ? (i = this.labelSortAsc) + : r === Yu && (i = this.labelSortDesc); + } + else + this.noSortReset || + (i = this.localSortBy ? this.labelSortClear : ""); + return On(i) || null; + }, + }, + }); + var qu = { stacked: Jn(Ue, !1) }, + Ku = n.default.extend({ + props: qu, + computed: { + isStacked: function () { + var t = this.stacked; + return "" === t || t; + }, + isStackedAlways: function () { + return !0 === this.isStacked; + }, + stackedTableClasses: function () { + var t = this.isStackedAlways; + return (function (t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + })( + { "b-table-stacked": t }, + "b-table-stacked-".concat(this.stacked), + !t && this.isStacked + ); + }, + }, + }); + function Xu(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Ju(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Xu(Object(n), !0).forEach(function (e) { + Zu(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Xu(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Zu(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Qu = { + bordered: Jn(Le, !1), + borderless: Jn(Le, !1), + captionTop: Jn(Le, !1), + dark: Jn(Le, !1), + fixed: Jn(Le, !1), + hover: Jn(Le, !1), + noBorderCollapse: Jn(Le, !1), + outlined: Jn(Le, !1), + responsive: Jn(Ue, !1), + small: Jn(Le, !1), + stickyHeader: Jn(Ue, !1), + striped: Jn(Le, !1), + tableClass: Jn(Ge), + tableVariant: Jn(Ne), + }, + td = n.default.extend({ + mixins: [fr], + provide: function () { + return { bvTable: this }; + }, + inheritAttrs: !1, + props: Qu, + computed: { + isResponsive: function () { + var t = this.responsive; + return "" === t || t; + }, + isStickyHeader: function () { + var t = this.stickyHeader; + return (t = "" === t || t), !this.isStacked && t; + }, + wrapperClasses: function () { + var t = this.isResponsive; + return [ + this.isStickyHeader ? "b-table-sticky-header" : "", + !0 === t + ? "table-responsive" + : t + ? "table-responsive-".concat(this.responsive) + : "", + ].filter(Lt); + }, + wrapperStyles: function () { + var t = this.isStickyHeader; + return t && !lt(t) ? { maxHeight: t } : {}; + }, + tableClasses: function () { + var t = this.hover, + e = this.tableVariant; + return ( + (t = this.isTableSimple + ? t + : t && this.computedItems.length > 0 && !this.computedBusy), + [ + this.tableClass, + { + "table-striped": this.striped, + "table-hover": t, + "table-dark": this.dark, + "table-bordered": this.bordered, + "table-borderless": this.borderless, + "table-sm": this.small, + border: this.outlined, + "b-table-fixed": this.fixed, + "b-table-caption-top": this.captionTop, + "b-table-no-border-collapse": this.noBorderCollapse, + }, + e ? "".concat(this.dark ? "bg" : "table", "-").concat(e) : "", + this.stackedTableClasses, + this.selectableTableClasses, + ] + ); + }, + tableAttrs: function () { + var t = this.computedItems, + e = this.filteredItems, + n = this.computedFields, + i = this.selectableTableAttrs, + r = this.isTableSimple + ? {} + : { + "aria-busy": this.computedBusy ? "true" : "false", + "aria-colcount": gn(n.length), + "aria-describedby": + this.bvAttrs["aria-describedby"] || this.$refs.caption + ? this.captionId + : null, + }; + return Ju( + Ju( + Ju( + { + "aria-rowcount": + t && e && e.length > t.length ? gn(e.length) : null, + }, + this.bvAttrs + ), + {}, + { id: this.safeId(), role: "table" }, + r + ), + i + ); + }, + }, + render: function (t) { + var e = this.wrapperClasses, + n = this.renderCaption, + i = this.renderColgroup, + r = this.renderThead, + o = this.renderTbody, + a = this.renderTfoot, + s = []; + this.isTableSimple + ? s.push(this.normalizeSlot()) + : (s.push(n ? n() : null), + s.push(i ? i() : null), + s.push(r ? r() : null), + s.push(o ? o() : null), + s.push(a ? a() : null)); + var l = t( + "table", + { + staticClass: "table b-table", + class: this.tableClasses, + attrs: this.tableAttrs, + key: "b-table", + }, + s.filter(Lt) + ); + return e.length > 0 + ? t("div", { class: e, style: this.wrapperStyles, key: "wrap" }, [l]) + : l; + }, + }); + function ed(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function nd(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? ed(Object(n), !0).forEach(function (e) { + id(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : ed(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function id(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var rd = ti( + { tbodyTransitionHandlers: Jn(Be), tbodyTransitionProps: Jn(Be) }, + ne + ), + od = n.default.extend({ + name: ne, + mixins: [fr, br, si], + provide: function () { + return { bvTableRowGroup: this }; + }, + inject: { + bvTable: { + default: function () { + return {}; + }, + }, + }, + inheritAttrs: !1, + props: rd, + computed: { + isTbody: function () { + return !0; + }, + isDark: function () { + return this.bvTable.dark; + }, + isStacked: function () { + return this.bvTable.isStacked; + }, + isResponsive: function () { + return this.bvTable.isResponsive; + }, + isStickyHeader: function () { + return !1; + }, + hasStickyHeader: function () { + return !this.isStacked && this.bvTable.stickyHeader; + }, + tableVariant: function () { + return this.bvTable.tableVariant; + }, + isTransitionGroup: function () { + return this.tbodyTransitionProps || this.tbodyTransitionHandlers; + }, + tbodyAttrs: function () { + return nd({ role: "rowgroup" }, this.bvAttrs); + }, + tbodyProps: function () { + var t = this.tbodyTransitionProps; + return t ? nd(nd({}, t), {}, { tag: "tbody" }) : {}; + }, + }, + render: function (t) { + var e = { props: this.tbodyProps, attrs: this.tbodyAttrs }; + return ( + this.isTransitionGroup + ? ((e.on = this.tbodyTransitionHandlers || {}), + (e.nativeOn = this.bvListeners)) + : (e.on = this.bvListeners), + t( + this.isTransitionGroup ? "transition-group" : "tbody", + e, + this.normalizeSlot() + ) + ); + }, + }), + ad = ["TD", "TH", "TR"], + sd = function (t) { + if (!t || !t.target) return !1; + var e = t.target; + if (e.disabled || -1 !== ad.indexOf(e.tagName)) return !1; + if (En(".dropdown-menu", e)) return !0; + var n = "LABEL" === e.tagName ? e : En("label", e); + if (n) { + var i = Rn(n, "for"), + r = i ? In(i) : xn("input, select, textarea", n); + if (r && !r.disabled) return !0; + } + return $n(e, lu); + }, + ld = function () { + var t = + arguments.length > 0 && void 0 !== arguments[0] + ? arguments[0] + : document, + e = Hn(); + return ( + !!(e && "" !== e.toString().trim() && e.containsNode && kn(t)) && + e.containsNode(t, !0) + ); + }, + cd = ti(Hc, "BTh"), + ud = n.default.extend({ + name: "BTh", + extends: Nc, + props: cd, + computed: { + tag: function () { + return "th"; + }, + }, + }); + function dd(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function hd(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? dd(Object(n), !0).forEach(function (e) { + fd(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : dd(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function fd(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + function pd(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + var bd = { + detailsTdClass: Jn(Ge), + tbodyTrAttr: Jn(Je), + tbodyTrClass: Jn( + [].concat( + (function (t) { + return ( + (function (t) { + if (Array.isArray(t)) return pd(t); + })(t) || + (function (t) { + if ( + "undefined" != typeof Symbol && + Symbol.iterator in Object(t) + ) + return Array.from(t); + })(t) || + (function (t, e) { + if (!t) return; + if ("string" == typeof t) return pd(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + "Object" === n && t.constructor && (n = t.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(t); + if ( + "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ) + return pd(t, e); + })(t) || + (function () { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + })(Ge), + [Ve] + ) + ), + }, + md = n.default.extend({ + props: bd, + methods: { + getTdValues: function (t, e, n, i) { + var r = this.$parent; + if (n) { + var o = Vt(t, e, ""); + return st(n) ? n(o, e, t) : ct(n) && st(r[n]) ? r[n](o, e, t) : n; + } + return i; + }, + getThValues: function (t, e, n, i, r) { + var o = this.$parent; + if (n) { + var a = Vt(t, e, ""); + return st(n) + ? n(a, e, t, i) + : ct(n) && st(o[n]) + ? o[n](a, e, t, i) + : n; + } + return r; + }, + getFormattedValue: function (t, e) { + var n = e.key, + i = this.getFieldFormatter(n), + r = Vt(t, n, null); + return st(i) && (r = i(r, n, t)), at(r) ? "" : r; + }, + toggleDetailsFactory: function (t, e) { + var n = this; + return function () { + t && n.$set(e, au, !e[au]); + }; + }, + rowHovered: function (t) { + this.tbodyRowEvtStopped(t) || + this.emitTbodyRowEvent("row-hovered", t); + }, + rowUnhovered: function (t) { + this.tbodyRowEvtStopped(t) || + this.emitTbodyRowEvent("row-unhovered", t); + }, + renderTbodyRowCell: function (t, e, n, i) { + var r = this, + o = this.isStacked, + a = t.key, + s = t.label, + l = t.isRowHeader, + c = this.$createElement, + u = this.hasNormalizedSlot(on), + d = this.getFormattedValue(n, t), + h = + !o && (this.isResponsive || this.stickyHeader) && t.stickyColumn, + f = h ? (l ? ud : Nc) : l ? "th" : "td", + p = n[ru] && n[ru][a] ? n[ru][a] : t.variant || null, + b = { + class: [ + t.class ? t.class : "", + this.getTdValues(n, a, t.tdClass, ""), + ], + props: {}, + attrs: hd( + { "aria-colindex": String(e + 1) }, + l + ? this.getThValues(n, a, t.thAttr, "row", {}) + : this.getTdValues(n, a, t.tdAttr, {}) + ), + key: "row-".concat(i, "-cell-").concat(e, "-").concat(a), + }; + h + ? (b.props = { + stackedHeading: o ? s : null, + stickyColumn: !0, + variant: p, + }) + : ((b.attrs["data-label"] = o && !at(s) ? gn(s) : null), + (b.attrs.role = l ? "rowheader" : "cell"), + (b.attrs.scope = l ? "row" : null), + p && + b.class.push( + "".concat(this.dark ? "bg" : "table", "-").concat(p) + )); + var m = { + item: n, + index: i, + field: t, + unformatted: Vt(n, a, ""), + value: d, + toggleDetails: this.toggleDetailsFactory(u, n), + detailsShowing: Boolean(n[au]), + }; + this.supportsSelectableRows && + ((m.rowSelected = this.isRowSelected(i)), + (m.selectRow = function () { + return r.selectRow(i); + }), + (m.unselectRow = function () { + return r.unselectRow(i); + })); + var v = this.$_bodyFieldSlotNameCache[a], + y = v ? this.normalizeSlot(v, m) : gn(d); + return this.isStacked && (y = [c("div", [y])]), c(f, b, [y]); + }, + renderTbodyRow: function (t, e) { + var n = this, + i = this.computedFields, + r = this.striped, + o = this.primaryKey, + a = this.currentPage, + s = this.perPage, + l = this.tbodyTrClass, + c = this.tbodyTrAttr, + u = this.$createElement, + d = this.hasNormalizedSlot(on), + h = t[au] && d, + f = this.$listeners["row-clicked"] || this.hasSelectableRowClick, + p = [], + b = h ? this.safeId("_details_".concat(e, "_")) : null, + m = i.map(function (i, r) { + return n.renderTbodyRowCell(i, r, t, e); + }), + v = null; + a && s && s > 0 && (v = String((a - 1) * s + e + 1)); + var y = gn(Vt(t, o)) || null, + g = y || gn(e), + O = y ? this.safeId("_row_".concat(y)) : null, + w = this.selectableRowClasses ? this.selectableRowClasses(e) : {}, + T = this.selectableRowAttrs ? this.selectableRowAttrs(e) : {}, + S = st(l) ? l(t, "row") : l, + j = st(c) ? c(t, "row") : c; + if ( + (p.push( + u( + Ic, + { + class: [S, w, h ? "b-table-has-details" : ""], + props: { variant: t[ou] || null }, + attrs: hd( + hd({ id: O }, j), + {}, + { + tabindex: f ? "0" : null, + "data-pk": y || null, + "aria-details": b, + "aria-owns": b, + "aria-rowindex": v, + }, + T + ), + on: { + mouseenter: this.rowHovered, + mouseleave: this.rowUnhovered, + }, + key: "__b-table-row-".concat(g, "__"), + ref: "item-rows", + refInFor: !0, + }, + m + ) + ), + h) + ) { + var k = { + item: t, + index: e, + fields: i, + toggleDetails: this.toggleDetailsFactory(d, t), + }; + this.supportsSelectableRows && + ((k.rowSelected = this.isRowSelected(e)), + (k.selectRow = function () { + return n.selectRow(e); + }), + (k.unselectRow = function () { + return n.unselectRow(e); + })); + var P = u( + Nc, + { props: { colspan: i.length }, class: this.detailsTdClass }, + [this.normalizeSlot(on, k)] + ); + r && + p.push( + u("tr", { + staticClass: "d-none", + attrs: { "aria-hidden": "true", role: "presentation" }, + key: "__b-table-details-stripe__".concat(g), + }) + ); + var D = st(this.tbodyTrClass) + ? this.tbodyTrClass(t, on) + : this.tbodyTrClass, + C = st(this.tbodyTrAttr) + ? this.tbodyTrAttr(t, on) + : this.tbodyTrAttr; + p.push( + u( + Ic, + { + staticClass: "b-table-details", + class: [D], + props: { variant: t[ou] || null }, + attrs: hd(hd({}, C), {}, { id: b, tabindex: "-1" }), + key: "__b-table-details__".concat(g), + }, + [P] + ) + ); + } else d && (p.push(u()), r && p.push(u())); + return p; + }, + }, + }); + function vd(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function yd(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? vd(Object(n), !0).forEach(function (e) { + gd(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : vd(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function gd(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Od = function (t) { + return "cell(".concat(t || "", ")"); + }, + wd = xt(yd(yd(yd({}, rd), bd), {}, { tbodyClass: Jn(Ge) })), + Td = n.default.extend({ + mixins: [md], + props: wd, + beforeDestroy: function () { + this.$_bodyFieldSlotNameCache = null; + }, + methods: { + getTbodyTrs: function () { + var t = this.$refs, + e = t.tbody ? t.tbody.$el || t.tbody : null, + n = (t["item-rows"] || []).map(function (t) { + return t.$el || t; + }); + return e && e.children && e.children.length > 0 && n && n.length > 0 + ? dn(e.children).filter(function (t) { + return hn(n, t); + }) + : []; + }, + getTbodyTrIndex: function (t) { + if (!kn(t)) return -1; + var e = "TR" === t.tagName ? t : En("tr", t, !0); + return e ? this.getTbodyTrs().indexOf(e) : -1; + }, + emitTbodyRowEvent: function (t, e) { + if (t && this.hasListener(t) && e && e.target) { + var n = this.getTbodyTrIndex(e.target); + if (n > -1) { + var i = this.computedItems[n]; + this.$emit(t, i, n, e); + } + } + }, + tbodyRowEvtStopped: function (t) { + return this.stopIfBusy && this.stopIfBusy(t); + }, + onTbodyRowKeydown: function (t) { + var e = t.target, + n = t.keyCode; + if ( + !this.tbodyRowEvtStopped(t) && + "TR" === e.tagName && + Dn(e) && + 0 === e.tabIndex + ) + if (hn([rr, or], n)) hi(t), this.onTBodyRowClicked(t); + else if (hn([ar, ir, 36, 35], n)) { + var i = this.getTbodyTrIndex(e); + if (i > -1) { + hi(t); + var r = this.getTbodyTrs(), + o = t.shiftKey; + 36 === n || (o && n === ar) + ? Nn(r[0]) + : 35 === n || (o && n === ir) + ? Nn(r[r.length - 1]) + : n === ar && i > 0 + ? Nn(r[i - 1]) + : n === ir && i < r.length - 1 && Nn(r[i + 1]); + } + } + }, + onTBodyRowClicked: function (t) { + this.tbodyRowEvtStopped(t) || + sd(t) || + ld(this.$el) || + this.emitTbodyRowEvent(Pe, t); + }, + onTbodyRowMiddleMouseRowClicked: function (t) { + this.tbodyRowEvtStopped(t) || + 2 !== t.which || + this.emitTbodyRowEvent("row-middle-clicked", t); + }, + onTbodyRowContextmenu: function (t) { + this.tbodyRowEvtStopped(t) || + this.emitTbodyRowEvent("row-contextmenu", t); + }, + onTbodyRowDblClicked: function (t) { + this.tbodyRowEvtStopped(t) || + sd(t) || + this.emitTbodyRowEvent("row-dblclicked", t); + }, + renderTbody: function () { + var t = this, + e = this.computedItems, + n = this.renderBusy, + i = this.renderTopRow, + r = this.renderEmpty, + o = this.renderBottomRow, + a = this.$createElement, + s = this.hasListener(Pe) || this.hasSelectableRowClick, + l = [], + c = n ? n() : null; + if (c) l.push(c); + else { + var u = {}, + d = Od(); + (d = this.hasNormalizedSlot(d) ? d : null), + this.computedFields.forEach(function (e) { + var n = e.key, + i = Od(n), + r = Od(n.toLowerCase()); + u[n] = t.hasNormalizedSlot(i) + ? i + : t.hasNormalizedSlot(r) + ? r + : d; + }), + (this.$_bodyFieldSlotNameCache = u), + l.push(i ? i() : a()), + e.forEach(function (e, n) { + l.push(t.renderTbodyRow(e, n)); + }), + l.push(r ? r() : a()), + l.push(o ? o() : a()); + } + var h = { + auxclick: this.onTbodyRowMiddleMouseRowClicked, + contextmenu: this.onTbodyRowContextmenu, + dblclick: this.onTbodyRowDblClicked, + }; + return ( + s && + ((h.click = this.onTBodyRowClicked), + (h.keydown = this.onTbodyRowKeydown)), + a( + od, + { + class: this.tbodyClass || null, + props: Zn(rd, this.$props), + on: h, + ref: "tbody", + }, + l + ) + ); + }, + }, + }); + function Sd(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function jd(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Sd(Object(n), !0).forEach(function (e) { + kd(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Sd(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function kd(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Pd = ti({ footVariant: Jn(Ne) }, ie), + Dd = n.default.extend({ + name: ie, + mixins: [fr, br, si], + provide: function () { + return { bvTableRowGroup: this }; + }, + inject: { + bvTable: { + default: function () { + return {}; + }, + }, + }, + inheritAttrs: !1, + props: Pd, + computed: { + isTfoot: function () { + return !0; + }, + isDark: function () { + return this.bvTable.dark; + }, + isStacked: function () { + return this.bvTable.isStacked; + }, + isResponsive: function () { + return this.bvTable.isResponsive; + }, + isStickyHeader: function () { + return !1; + }, + hasStickyHeader: function () { + return !this.isStacked && this.bvTable.stickyHeader; + }, + tableVariant: function () { + return this.bvTable.tableVariant; + }, + tfootClasses: function () { + return [this.footVariant ? "thead-".concat(this.footVariant) : null]; + }, + tfootAttrs: function () { + return jd(jd({}, this.bvAttrs), {}, { role: "rowgroup" }); + }, + }, + render: function (t) { + return t( + "tfoot", + { + class: this.tfootClasses, + attrs: this.tfootAttrs, + on: this.bvListeners, + }, + this.normalizeSlot() + ); + }, + }), + Cd = { + footClone: Jn(Le, !1), + footRowVariant: Jn(Ne), + footVariant: Jn(Ne), + tfootClass: Jn(Ge), + tfootTrClass: Jn(Ge), + }, + xd = n.default.extend({ + props: Cd, + methods: { + renderTFootCustom: function () { + var t = this.$createElement; + return this.hasNormalizedSlot(en) + ? t( + Dd, + { + class: this.tfootClass || null, + props: { + footVariant: this.footVariant || this.headVariant || null, + }, + key: "bv-tfoot-custom", + }, + this.normalizeSlot(en, { + items: this.computedItems.slice(), + fields: this.computedFields.slice(), + columns: this.computedFields.length, + }) + ) + : t(); + }, + renderTfoot: function () { + return this.footClone + ? this.renderThead(!0) + : this.renderTFootCustom(); + }, + }, + }); + function $d(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Ed(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Fd = ti({ headVariant: Jn(Ne) }, re), + Id = n.default.extend({ + name: re, + mixins: [fr, br, si], + provide: function () { + return { bvTableRowGroup: this }; + }, + inject: { + bvTable: { + default: function () { + return {}; + }, + }, + }, + inheritAttrs: !1, + props: Fd, + computed: { + isThead: function () { + return !0; + }, + isDark: function () { + return this.bvTable.dark; + }, + isStacked: function () { + return this.bvTable.isStacked; + }, + isResponsive: function () { + return this.bvTable.isResponsive; + }, + isStickyHeader: function () { + return !this.isStacked && this.bvTable.stickyHeader; + }, + hasStickyHeader: function () { + return !this.isStacked && this.bvTable.stickyHeader; + }, + tableVariant: function () { + return this.bvTable.tableVariant; + }, + theadClasses: function () { + return [this.headVariant ? "thead-".concat(this.headVariant) : null]; + }, + theadAttrs: function () { + return (function (t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? $d(Object(n), !0).forEach(function (e) { + Ed(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties( + t, + Object.getOwnPropertyDescriptors(n) + ) + : $d(Object(n)).forEach(function (e) { + Object.defineProperty( + t, + e, + Object.getOwnPropertyDescriptor(n, e) + ); + }); + } + return t; + })({ role: "rowgroup" }, this.bvAttrs); + }, + }, + render: function (t) { + return t( + "thead", + { + class: this.theadClasses, + attrs: this.theadAttrs, + on: this.bvListeners, + }, + this.normalizeSlot() + ); + }, + }); + function Md(t) { + return ( + (function (t) { + if (Array.isArray(t)) return _d(t); + })(t) || + (function (t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(t)) + return Array.from(t); + })(t) || + (function (t, e) { + if (!t) return; + if ("string" == typeof t) return _d(t, e); + var n = Object.prototype.toString.call(t).slice(8, -1); + "Object" === n && t.constructor && (n = t.constructor.name); + if ("Map" === n || "Set" === n) return Array.from(t); + if ( + "Arguments" === n || + /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) + ) + return _d(t, e); + })(t) || + (function () { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); + })() + ); + } + function _d(t, e) { + (null == e || e > t.length) && (e = t.length); + for (var n = 0, i = new Array(e); n < e; n++) i[n] = t[n]; + return i; + } + function Ld(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Rd(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Ld(Object(n), !0).forEach(function (e) { + Vd(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Ld(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Vd(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Ad = function (t) { + return "head(".concat(t || "", ")"); + }, + Bd = function (t) { + return "foot(".concat(t || "", ")"); + }, + Hd = { + headRowVariant: Jn(Ne), + headVariant: Jn(Ne), + theadClass: Jn(Ge), + theadTrClass: Jn(Ge), + }, + Nd = n.default.extend({ + props: Hd, + methods: { + fieldClasses: function (t) { + return [t.class ? t.class : "", t.thClass ? t.thClass : ""]; + }, + headClicked: function (t, e, n) { + (this.stopIfBusy && this.stopIfBusy(t)) || + sd(t) || + ld(this.$el) || + (hi(t), this.$emit(ye, e.key, e, t, n)); + }, + renderThead: function () { + var t = this, + e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], + n = this.computedFields, + i = this.isSortable, + r = this.isSelectable, + o = this.headVariant, + a = this.footVariant, + s = this.headRowVariant, + l = this.footRowVariant, + c = this.$createElement; + if (this.isStackedAlways || 0 === n.length) return c(); + var u = i || this.hasListener(ye), + d = r ? this.selectAllRows : xo, + h = r ? this.clearSelected : xo, + f = function (n, r) { + var o = n.label, + a = n.labelHtml, + s = n.variant, + l = n.stickyColumn, + f = n.key, + p = null; + n.label.trim() || n.headerTitle || (p = yn(n.key)); + var b = {}; + u && + ((b.click = function (i) { + t.headClicked(i, n, e); + }), + (b.keydown = function (i) { + var r = i.keyCode; + (r !== rr && r !== or) || t.headClicked(i, n, e); + })); + var m = i ? t.sortTheadThAttrs(f, n, e) : {}, + v = i ? t.sortTheadThClasses(f, n, e) : null, + y = i ? t.sortTheadThLabel(f, n, e) : null, + g = { + class: [t.fieldClasses(n), v], + props: { variant: s, stickyColumn: l }, + style: n.thStyle || {}, + attrs: Rd( + Rd( + { + tabindex: u && n.sortable ? "0" : null, + abbr: n.headerAbbr || null, + title: n.headerTitle || null, + "aria-colindex": r + 1, + "aria-label": p, + }, + t.getThValues(null, f, n.thAttr, e ? "foot" : "head", {}) + ), + m + ), + on: b, + key: f, + }, + O = [Ad(f), Ad(f.toLowerCase()), Ad()]; + e && (O = [Bd(f), Bd(f.toLowerCase()), Bd()].concat(Md(O))); + var w = { + label: o, + column: f, + field: n, + isFoot: e, + selectAllRows: d, + clearSelected: h, + }, + T = t.normalizeSlot(O, w) || c("div", { domProps: Hr(a, o) }), + S = y + ? c("span", { staticClass: "sr-only" }, " (".concat(y, ")")) + : null; + return c(ud, g, [T, S].filter(Lt)); + }, + p = n.map(f).filter(Lt), + b = []; + if (e) + b.push( + c( + Ic, + { class: this.tfootTrClass, props: { variant: at(l) ? s : l } }, + p + ) + ); + else { + var m = { + columns: n.length, + fields: n, + selectAllRows: d, + clearSelected: h, + }; + b.push(this.normalizeSlot(cn, m) || c()), + b.push( + c(Ic, { class: this.theadTrClass, props: { variant: s } }, p) + ); + } + return c( + e ? Dd : Id, + { + class: (e ? this.tfootClass : this.theadClass) || null, + props: e + ? { footVariant: a || o || null } + : { headVariant: o || null }, + key: e ? "bv-tfoot" : "bv-thead", + }, + b + ); + }, + }, + }), + zd = n.default.extend({ + methods: { + renderTopRow: function () { + var t = this.computedFields, + e = this.stacked, + n = this.tbodyTrClass, + i = this.tbodyTrAttr, + r = this.$createElement; + return this.hasNormalizedSlot(un) && !0 !== e && "" !== e + ? r( + Ic, + { + staticClass: "b-table-top-row", + class: [st(n) ? n(null, "row-top") : n], + attrs: st(i) ? i(null, "row-top") : i, + key: "b-top-row", + }, + [this.normalizeSlot(un, { columns: t.length, fields: t })] + ) + : r(); + }, + }, + }); + function Yd(t, e) { + var n = Object.keys(t); + if (Object.getOwnPropertySymbols) { + var i = Object.getOwnPropertySymbols(t); + e && + (i = i.filter(function (e) { + return Object.getOwnPropertyDescriptor(t, e).enumerable; + })), + n.push.apply(n, i); + } + return n; + } + function Gd(t) { + for (var e = 1; e < arguments.length; e++) { + var n = null != arguments[e] ? arguments[e] : {}; + e % 2 + ? Yd(Object(n), !0).forEach(function (e) { + Wd(t, e, n[e]); + }) + : Object.getOwnPropertyDescriptors + ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) + : Yd(Object(n)).forEach(function (e) { + Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(n, e)); + }); + } + return t; + } + function Wd(t, e, n) { + return ( + e in t + ? Object.defineProperty(t, e, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0, + }) + : (t[e] = n), + t + ); + } + var Ud = ti( + xt( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd( + Gd(Gd(Gd(Gd(Gd({}, vo), Mc), Uc), Kc), {}), + Zc + ), + hu + ), + Su + ), + ku + ), + xu + ), + _u + ), + Wu + ), + qu + ), + Qu + ), + wd + ), + Cd + ), + Hd + ), + {} + ) + ), + te + ), + qd = n.default.extend({ + name: te, + mixins: [ + fr, + Dc, + yo, + si, + ju, + td, + Ku, + Nd, + xd, + Td, + Ku, + fu, + Uu, + Pu, + Xc, + Jc, + Lu, + Qc, + zd, + _c, + qc, + $u, + ], + props: Ud, + }), + Kd = n.default.extend({ + name: "BEditableTable", + components: { + BTable: qd, + BFormDatepicker: Js, + BFormInput: ml, + BFormSelect: Jl, + BFormCheckbox: Cs, + BFormRating: xl, + BTooltip: Pc, + }, + props: { + fields: Array, + items: Array, + value: Array, + editMode: { type: String, default: "cell" }, + editTrigger: { type: String, default: "click" }, + rowUpdate: { type: Object, default: null }, + disableDefaultEdit: { type: Boolean, default: !1 }, + }, + directives: { + focus: { + inserted: function (t, e) { + switch (e.value) { + case !1: + return; + case "checkbox": + t.children[0].focus(); + case "date": + t.children[0].focus(); + default: + t.focus(); + } + }, + }, + clickOutside: { + bind: function (t, e, n) { + (t.clickOutsideEvent = function (i) { + t == i.target || + t.contains(i.target) || + (document.contains(i.target) && n.context[e.expression](i)); + }), + document.addEventListener("click", t.clickOutsideEvent); + }, + unbind: function (t) { + document.removeEventListener("click", t.clickOutsideEvent); + }, + }, + }, + data: function () { + return { + selectedCell: { type: String, default: null }, + tableItems: [], + tableMap: {}, + localChanges: {}, + }; + }, + mounted: function () { + (this.editMode = this.editMode), + this.createTableItems(this.value ? this.value : this.items); + }, + watch: { + value: function (t) { + this.createTableItems(t); + }, + items: function (t) { + this.createTableItems(t); + }, + rowUpdate: { + handler: function (t) { + this.tableMap[t.id] && (this.tableMap[t.id].isEdit = t.edit), + "update" === t.action + ? (this.clearValidation(t.id), this.updateData(t.id)) + : "add" === t.action + ? this.updateData( + t.id, + "add", + r({}, t.data), + t.edit, + t.addPosition + ) + : "delete" === t.action + ? this.updateData(t.id, "delete") + : ("cancel" !== t.action && !1 !== t.isEdit) || + (this.clearValidation(t.id), delete this.localChanges[t.id]); + }, + deep: !0, + }, + }, + computed: {}, + methods: { + handleEditCell: function (t, e, n, i) { + !this.disableDefaultEdit && + i && + (t.stopPropagation(), + this.clearEditMode(), + this.updateData(), + (this.tableMap[e].isEdit = !0), + (this.selectedCell = n), + this.clearValidation(e), + this.localChanges[e] || (this.localChanges[e] = {})); + }, + clearValidation: function (t) { + for (var e in this.tableMap[t].fields) + this.tableMap[t].fields[e].validity = { valid: !0 }; + }, + handleKeydown: function (t, e, n) { + if ( + ("Tab" !== t.code && "Enter" !== t.code) || + "cell" !== this.editMode || + this.disableDefaultEdit + ) + "Escape" === t.code && + (t.preventDefault(), + (this.selectedCell = null), + this.clearEditMode(n.item.id), + (this.localChanges = {})); + else { + var i; + t.preventDefault(); + for ( + var r = this.fields.length - 1 === e ? 0 : e + 1, + o = this.fields.length - 1 === e ? n.index + 1 : n.index, + a = r; + !this.fields[a].editable; + + ) + a === this.fields.length - 1 ? ((a = 0), o++) : a++; + (r = a), + (this.selectedCell = this.fields[r].key), + this.clearEditMode(n.item.id), + this.updateData(n.item.id); + var s = + null === (i = this.tableItems[o]) || void 0 === i ? void 0 : i.id; + this.tableMap[s] && + ((this.tableMap[s].isEdit = !0), + this.localChanges[s] || (this.localChanges[s] = {})); + } + }, + handleClickOut: function () { + this.disableDefaultEdit || + ((this.selectedCell = null), + this.clearEditMode(), + this.updateData()); + }, + inputHandler: function (t, e, n, i) { + var o = t; + if (i) { + var a = i.find(function (e) { + return e.value === t; + }); + o = a ? a.value : t; + } + var s = e.field.validate ? e.field.validate(o, e) : { valid: !0 }, + l = this.tableMap[e.item.id].fields; + (l[n].validity.valid = !0), + !this.value || (s && !0 !== (null == s ? void 0 : s.valid)) + ? (l[n].validity = s) + : (this.localChanges[e.item.id] || + (this.localChanges[e.item.id] = {}), + (this.localChanges[e.item.id][n] = { + value: o, + rowIndex: e.index, + })); + ({ text: !0, range: !0, number: !0 }[e.field.type] || + this.$emit( + "input-change", + r( + r({}, e), + {}, + { id: e.item.id, value: o, validity: r({}, l[n].validity) } + ) + )); + }, + changeHandler: function (t, e, n) { + this.$emit( + "input-change", + r( + r({}, e), + {}, + { + id: e.item.id, + value: t, + validity: r({}, this.tableMap[e.item.id].fields[n].validity), + } + ) + ); + }, + updateData: function (t, e, n, i, r) { + var o = this, + a = !1, + s = t || Object.keys(this.localChanges)[0]; + if ("add" === e) + (a = !0), + (this.tableMap[t] = { id: t, isEdit: i, fields: {} }), + "end" === r + ? this.tableItems.push(n) + : this.tableItems.unshift(n); + else if ("delete" === e) + (a = !0), + delete this.tableMap[t], + (this.tableItems = this.tableItems.filter(function (e) { + return e.id !== t; + })); + else { + var l = t + ? this.localChanges[t] + : Object.values(this.localChanges)[0]; + this.value && + l && + Object.keys(l).forEach(function (t) { + a = !0; + var e = l[t]; + o.tableMap[s].fields[t].value = e.value; + var n = e.rowIndex, + i = o.$attrs["current-page"], + r = o.$attrs["per-page"]; + i > 1 && r > 0 && (n = (i - 1) * r + n), + (o.tableItems[n][t] = e.value); + }); + } + a && this.$emit("input", this.tableItems), + delete this.localChanges[t || s]; + }, + handleListeners: function (t) { + var e = { input: !0, "input-change": !0 }; + return Object.keys(t).reduce(function (n, i) { + return e[i] ? n : r(r({}, n), {}, o({}, i, t[i])); + }, {}); + }, + getCellValue: function (t, e) { + var n = this.tableMap[t.item.id], + i = n && n.fields[e.key] ? n.fields[e.key].value : ""; + if (t.field.options) { + var r = t.field.options.find(function (t) { + return t.value === i; + }); + i = r ? r.text : i; + } + return i; + }, + getCellData: function (t) { + return r( + r({}, t), + {}, + { isEdit: this.tableMap[t.item.id].isEdit, id: t.item.id } + ); + }, + getValidity: function (t, e) { + return this.tableMap[t.item.id].fields[e.key].validity; + }, + showField: function (t, e, n) { + var i; + return ( + t.type === n && + (null === (i = this.tableMap[e.item.id]) || void 0 === i + ? void 0 + : i.isEdit) && + (this.selectedCell === t.key || "row" === this.editMode) && + t.editable + ); + }, + getFieldValue: function (t, e) { + var n; + return null === (n = this.tableMap[e.item.id].fields[t.key]) || + void 0 === n + ? void 0 + : n.value; + }, + enableFocus: function (t) { + return "cell" === this.editMode && t; + }, + clearEditMode: function (t) { + if (t) this.tableMap[t].isEdit = !1; + else for (var e in this.localChanges) this.tableMap[e].isEdit = !1; + }, + createTableItems: function (t) { + var e = this; + (this.tableItems = t.map(function (t) { + return r({}, t); + })), + (this.tableMap = t.reduce(function (t, n) { + return r( + r({}, t), + {}, + o({}, n.id, { + id: n.id, + isEdit: !!e.tableMap[n.id] && e.tableMap[n.id].isEdit, + fields: Object.keys(n).reduce(function (t, i) { + var a, s; + return r( + r({}, t), + {}, + o({}, i, { + value: n[i], + validity: + null !== (a = e.tableMap[n.id]) && + void 0 !== a && + null !== (s = a.fields[i]) && + void 0 !== s && + s.validity + ? e.tableMap[n.id].fields[i].validity + : { valid: !0 }, + }) + ); + }, {}), + }) + ); + }, {})); + }, + }, + }); + function Xd(t, e, n, i, r, o, a, s, l, c) { + "boolean" != typeof a && ((l = s), (s = a), (a = !1)); + const u = "function" == typeof n ? n.options : n; + let d; + if ( + (t && + t.render && + ((u.render = t.render), + (u.staticRenderFns = t.staticRenderFns), + (u._compiled = !0), + r && (u.functional = !0)), + i && (u._scopeId = i), + o + ? ((d = function (t) { + (t = + t || + (this.$vnode && this.$vnode.ssrContext) || + (this.parent && + this.parent.$vnode && + this.parent.$vnode.ssrContext)) || + "undefined" == typeof __VUE_SSR_CONTEXT__ || + (t = __VUE_SSR_CONTEXT__), + e && e.call(this, l(t)), + t && t._registeredComponents && t._registeredComponents.add(o); + }), + (u._ssrRegister = d)) + : e && + (d = a + ? function (t) { + e.call(this, c(t, this.$root.$options.shadowRoot)); + } + : function (t) { + e.call(this, s(t)); + }), + d) + ) + if (u.functional) { + const t = u.render; + u.render = function (e, n) { + return d.call(n), t(e, n); + }; + } else { + const t = u.beforeCreate; + u.beforeCreate = t ? [].concat(t, d) : [d]; + } + return n; + } + const Jd = + "undefined" != typeof navigator && + /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); + function Zd(t) { + return (t, e) => + (function (t, e) { + const n = Jd ? e.media || "default" : t, + i = th[n] || (th[n] = { ids: new Set(), styles: [] }); + if (!i.ids.has(t)) { + i.ids.add(t); + let n = e.source; + if ( + (e.map && + ((n += "\n/*# sourceURL=" + e.map.sources[0] + " */"), + (n += + "\n/*# sourceMappingURL=data:application/json;base64," + + btoa(unescape(encodeURIComponent(JSON.stringify(e.map)))) + + " */")), + i.element || + ((i.element = document.createElement("style")), + (i.element.type = "text/css"), + e.media && i.element.setAttribute("media", e.media), + void 0 === Qd && + (Qd = + document.head || document.getElementsByTagName("head")[0]), + Qd.appendChild(i.element)), + "styleSheet" in i.element) + ) + i.styles.push(n), + (i.element.styleSheet.cssText = i.styles + .filter(Boolean) + .join("\n")); + else { + const t = i.ids.size - 1, + e = document.createTextNode(n), + r = i.element.childNodes; + r[t] && i.element.removeChild(r[t]), + r.length + ? i.element.insertBefore(e, r[t]) + : i.element.appendChild(e); + } + } + })(t, e); + } + let Qd; + const th = {}; + var eh = Xd( + { + render: function () { + var t = this, + e = t.$createElement, + n = t._self._c || e; + return n( + "b-table", + t._g( + t._b( + { + directives: [ + { + name: "click-outside", + rawName: "v-click-outside", + value: t.handleClickOut, + expression: "handleClickOut", + }, + ], + attrs: { items: t.tableItems }, + scopedSlots: t._u( + [ + t._l(t.$scopedSlots, function (e, n) { + return { + key: n, + fn: function (e) { + return [t._t(n, null, null, e)]; + }, + }; + }), + t._l(t.fields, function (e, i) { + return { + key: "cell(" + e.key + ")", + fn: function (r) { + return [ + t.showField(e, r, "date") + ? n( + "div", + { key: i }, + [ + n( + "b-form-datepicker", + t._b( + { + directives: [ + { + name: "focus", + rawName: "v-focus", + value: t.enableFocus("date"), + expression: + "enableFocus('date')", + }, + ], + key: i, + attrs: { + id: e.key + "-" + r.item.id, + type: e.type, + value: t.getFieldValue(e, r), + state: + !!t.getValidity(r, e).valid && + null, + }, + on: { + input: function (n) { + return t.inputHandler( + n, + r, + e.key + ); + }, + }, + nativeOn: { + keydown: function (e) { + return t.handleKeydown(e, i, r); + }, + }, + }, + "b-form-datepicker", + Object.assign({}, e), + !1 + ) + ), + t._v(" "), + t.getValidity(r, e).errorMessage + ? n( + "b-tooltip", + { + attrs: { + target: e.key + "-" + r.item.id, + variant: "danger", + show: !t.getValidity(r, e) + .valid, + disabled: !0, + }, + }, + [ + t._v( + "\n " + + t._s( + t.getValidity(r, e) + .errorMessage + ) + + "\n " + ), + ] + ) + : t._e(), + ], + 1 + ) + : t.showField(e, r, "select") + ? n( + "div", + { key: i }, + [ + n( + "b-form-select", + t._b( + { + directives: [ + { + name: "focus", + rawName: "v-focus", + value: t.enableFocus(), + expression: "enableFocus()", + }, + ], + attrs: { + id: e.key + "-" + r.item.id, + value: t.getFieldValue(e, r), + state: + !!t.getValidity(r, e).valid && + null, + }, + on: { + change: function (n) { + return t.inputHandler( + n, + r, + e.key, + e.options + ); + }, + }, + nativeOn: { + keydown: function (e) { + return t.handleKeydown(e, i, r); + }, + }, + }, + "b-form-select", + Object.assign({}, e), + !1 + ) + ), + t._v(" "), + t.getValidity(r, e).errorMessage + ? n( + "b-tooltip", + { + attrs: { + target: e.key + "-" + r.item.id, + variant: "danger", + show: !t.getValidity(r, e) + .valid, + disabled: !0, + }, + }, + [ + t._v( + "\n " + + t._s( + t.getValidity(r, e) + .errorMessage + ) + + "\n " + ), + ] + ) + : t._e(), + ], + 1 + ) + : t.showField(e, r, "checkbox") + ? n( + "b-form-checkbox", + t._b( + { + directives: [ + { + name: "focus", + rawName: "v-focus", + value: t.enableFocus("checkbox"), + expression: + "enableFocus('checkbox')", + }, + ], + key: i, + attrs: { + id: e.key + "-" + r.item.id, + checked: t.getFieldValue(e, r), + }, + on: { + change: function (n) { + return t.inputHandler(n, r, e.key); + }, + }, + nativeOn: { + keydown: function (e) { + return t.handleKeydown(e, i, r); + }, + }, + }, + "b-form-checkbox", + Object.assign({}, e), + !1 + ) + ) + : t.showField(e, r, "rating") + ? n( + "b-form-rating", + t._b( + { + directives: [ + { + name: "focus", + rawName: "v-focus", + value: t.enableFocus(), + expression: "enableFocus()", + }, + ], + key: i, + attrs: { + id: e.key + "-" + r.item.id, + value: t.getFieldValue(e, r), + }, + on: { + change: function (n) { + return t.inputHandler(n, r, e.key); + }, + }, + nativeOn: { + keydown: function (e) { + return t.handleKeydown(e, i, r); + }, + }, + }, + "b-form-rating", + Object.assign({}, e), + !1 + ) + ) + : t.showField(e, r, "textarea") + ? n( + "div", + { key: i }, + [ + n( + "b-form-textarea", + t._b( + { + directives: [ + { + name: "focus", + rawName: "v-focus", + value: t.enableFocus(), + expression: "enableFocus()", + }, + ], + attrs: { + id: e.key + "-" + r.item.id, + type: e.type, + value: t.getFieldValue(e, r), + state: + !!t.getValidity(r, e).valid && + null, + }, + on: { + keydown: function (e) { + return t.handleKeydown(e, i, r); + }, + input: function (n) { + return t.inputHandler( + n, + r, + e.key + ); + }, + change: function (n) { + return t.changeHandler( + n, + r, + e.key + ); + }, + }, + }, + "b-form-textarea", + Object.assign({}, e), + !1 + ) + ), + t._v(" "), + t.getValidity(r, e).errorMessage + ? n( + "b-tooltip", + { + attrs: { + target: e.key + "-" + r.item.id, + variant: "danger", + show: !t.getValidity(r, e) + .valid, + disabled: !0, + }, + }, + [ + t._v( + "\n " + + t._s( + t.getValidity(r, e) + .errorMessage + ) + + "\n " + ), + ] + ) + : t._e(), + ], + 1 + ) + : t.showField(e, r, e.type) + ? n( + "div", + { key: i }, + [ + n( + "b-form-input", + t._b( + { + directives: [ + { + name: "focus", + rawName: "v-focus", + value: t.enableFocus(), + expression: "enableFocus()", + }, + ], + attrs: { + id: e.key + "-" + r.item.id, + type: e.type, + value: t.getFieldValue(e, r), + state: + !!t.getValidity(r, e).valid && + null, + }, + on: { + keydown: function (e) { + return t.handleKeydown(e, i, r); + }, + input: function (n) { + return t.inputHandler( + n, + r, + e.key + ); + }, + change: function (n) { + return t.changeHandler( + n, + r, + e.key + ); + }, + }, + }, + "b-form-input", + Object.assign({}, e), + !1 + ) + ), + t._v(" "), + t.getValidity(r, e).errorMessage + ? n( + "b-tooltip", + { + attrs: { + target: e.key + "-" + r.item.id, + variant: "danger", + show: !t.getValidity(r, e) + .valid, + disabled: !0, + }, + }, + [ + t._v( + "\n " + + t._s( + t.getValidity(r, e) + .errorMessage + ) + + "\n " + ), + ] + ) + : t._e(), + ], + 1 + ) + : n( + "div", + { + key: i, + staticClass: "data-cell", + on: t._d({}, [ + t.editTrigger, + function (n) { + return t.handleEditCell( + n, + r.item.id, + e.key, + e.editable + ); + }, + ]), + }, + [ + t.$scopedSlots["cell(" + e.key + ")"] + ? t._t( + "cell(" + e.key + ")", + null, + null, + t.getCellData(r) + ) + : [t._v(t._s(t.getCellValue(r, e)))], + ], + 2 + ), + ]; + }, + }; + }), + ], + null, + !0 + ), + }, + "b-table", + Object.assign({}, t.$props, t.$attrs), + !1 + ), + t.handleListeners(t.$listeners) + ) + ); + }, + staticRenderFns: [], + }, + function (t) { + t && + t("data-v-27f38362_0", { + source: + "table.b-table{width:unset}table.b-table td{padding:0}.data-cell{display:flex;width:100%;height:100%}", + map: void 0, + media: void 0, + }); + }, + Kd, + undefined, + false, + undefined, + !1, + Zd, + void 0, + void 0 + ), + nh = eh, + ih = (function () { + var t = nh; + return ( + (t.install = function (e) { + e.component("BEditableTable", t); + }), + t + ); + })(), + rh = Object.freeze({ __proto__: null, default: ih }); + return ( + Object.entries(rh).forEach(function (t) { + var e = a(t, 2), + n = e[0], + i = e[1]; + "default" !== n && (ih[n] = i); + }), + ih + ); +})(Vue); diff --git a/dist/b-editable-table.ssr.js b/dist/b-editable-table.ssr.js index 9867e3d..4392701 100644 --- a/dist/b-editable-table.ssr.js +++ b/dist/b-editable-table.ssr.js @@ -1,11 +1,22 @@ -'use strict';var Vue=require('vue');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Vue__default=/*#__PURE__*/_interopDefaultLegacy(Vue);function ownKeys$A(object, enumerableOnly) { +"use strict"; +var Vue = require("vue"); +function _interopDefaultLegacy(e) { + return e && typeof e === "object" && "default" in e ? e : { default: e }; +} +var Vue__default = /*#__PURE__*/ _interopDefaultLegacy(Vue); +function ownKeys$A(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); } return keys; @@ -13,12 +24,23 @@ function _objectSpread2$1(target) { for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys$A(Object(source), !0).forEach(function (key) { - _defineProperty$H(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$A(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys$A(Object(source), true).forEach(function (key) { + _defineProperty$H(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$A(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } } return target; @@ -30,7 +52,7 @@ function _defineProperty$H(obj, key, value) { value: value, enumerable: true, configurable: true, - writable: true + writable: true, }); } else { obj[key] = value; @@ -40,7 +62,12 @@ function _defineProperty$H(obj, key, value) { } function _slicedToArray$1(arr, i) { - return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$6(arr, i) || _nonIterableRest$1(); + return ( + _arrayWithHoles$1(arr) || + _iterableToArrayLimit$1(arr, i) || + _unsupportedIterableToArray$6(arr, i) || + _nonIterableRest$1() + ); } function _arrayWithHoles$1(arr) { @@ -48,7 +75,10 @@ function _arrayWithHoles$1(arr) { } function _iterableToArrayLimit$1(arr, i) { - var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + var _i = + arr && + ((typeof Symbol !== "undefined" && arr[Symbol.iterator]) || + arr["@@iterator"]); if (_i == null) return; var _arr = []; @@ -83,7 +113,8 @@ function _unsupportedIterableToArray$6(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$6(o, minLen); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray$6(o, minLen); } function _arrayLikeToArray$6(arr, len) { @@ -95,19 +126,108 @@ function _arrayLikeToArray$6(arr, len) { } function _nonIterableRest$1() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -}var e=function(){return (e=Object.assign||function(e){for(var t,r=1,s=arguments.length;r 0; +var USER_AGENT = (NAVIGATOR.userAgent || "").toLowerCase(); +USER_AGENT.indexOf("jsdom") > 0; /msie|trident/.test(USER_AGENT); // Determine if the browser supports the option passive for events -var HAS_PASSIVE_EVENT_SUPPORT = function () { +var HAS_PASSIVE_EVENT_SUPPORT = (function () { var passiveEventSupported = false; if (IS_BROWSER) { @@ -118,11 +238,10 @@ var HAS_PASSIVE_EVENT_SUPPORT = function () { get passive() { /* istanbul ignore next: will never be called in JSDOM */ passiveEventSupported = true; - } - + }, }; - WINDOW.addEventListener('test', options, options); - WINDOW.removeEventListener('test', options, options); + WINDOW.addEventListener("test", options, options); + WINDOW.removeEventListener("test", options, options); } catch (_unused) { /* istanbul ignore next: will never be called in JSDOM */ passiveEventSupported = false; @@ -130,16 +249,19 @@ var HAS_PASSIVE_EVENT_SUPPORT = function () { } return passiveEventSupported; -}(); -IS_BROWSER && ('ontouchstart' in DOCUMENT.documentElement || NAVIGATOR.maxTouchPoints > 0); +})(); +IS_BROWSER && + ("ontouchstart" in DOCUMENT.documentElement || NAVIGATOR.maxTouchPoints > 0); IS_BROWSER && Boolean(WINDOW.PointerEvent || WINDOW.MSPointerEvent); /* istanbul ignore next: JSDOM only checks for 'IntersectionObserver' */ -IS_BROWSER && 'IntersectionObserver' in WINDOW && 'IntersectionObserverEntry' in WINDOW && // Edge 15 and UC Browser lack support for `isIntersecting` -// but we an use `intersectionRatio > 0` instead -// 'isIntersecting' in window.IntersectionObserverEntry.prototype && -'intersectionRatio' in WINDOW.IntersectionObserverEntry.prototype;var PROP_NAME = '$bvConfig'; -var DEFAULT_BREAKPOINT = ['xs', 'sm', 'md', 'lg', 'xl'];// --- General --- +IS_BROWSER && + "IntersectionObserver" in WINDOW && + "IntersectionObserverEntry" in WINDOW && // Edge 15 and UC Browser lack support for `isIntersecting` + // but we an use `intersectionRatio > 0` instead + // 'isIntersecting' in window.IntersectionObserverEntry.prototype && + "intersectionRatio" in WINDOW.IntersectionObserverEntry.prototype; +var PROP_NAME = "$bvConfig"; // --- General --- var RX_ARRAY_NOTATION = /\[(\d+)]/g; var RX_BV_PREFIX = /^(BV?)/; var RX_DIGITS = /^\d+$/; @@ -163,89 +285,236 @@ var RX_ENCODE_REVERSE = /[!'()*]/g; var RX_ICON_PREFIX = /^BIcon/; // --- Locale --- -var RX_STRIP_LOCALE_MODS = /-u-.+/;function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); } +var RX_STRIP_LOCALE_MODS = /-u-.+/; +function _typeof$1(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof$1 = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof$1 = function _typeof(obj) { + return obj && + typeof Symbol === "function" && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? "symbol" + : typeof obj; + }; + } + return _typeof$1(obj); +} -function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _classCallCheck$1(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); } +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { value: subClass, writable: true, configurable: true }, + }); + if (superClass) _setPrototypeOf$1(subClass, superClass); +} -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); + return function _createSuperInternal() { + var Super = _getPrototypeOf(Derived), + result; + if (hasNativeReflectConstruct) { + var NewTarget = _getPrototypeOf(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + return _possibleConstructorReturn(this, result); + }; +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function _possibleConstructorReturn(self, call) { + if (call && (_typeof$1(call) === "object" || typeof call === "function")) { + return call; + } + return _assertThisInitialized(self); +} -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError( + "this hasn't been initialised - super() hasn't been called" + ); + } + return self; +} -function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct$1(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf$1(Wrapper, Class); }; return _wrapNativeSuper(Class); } +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !_isNativeFunction(Class)) return Class; + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); + } + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + _cache.set(Class, Wrapper); + } + function Wrapper() { + return _construct$1(Class, arguments, _getPrototypeOf(this).constructor); + } + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true, + }, + }); + return _setPrototypeOf$1(Wrapper, Class); + }; + return _wrapNativeSuper(Class); +} -function _construct$1(Parent, args, Class) { if (_isNativeReflectConstruct$1()) { _construct$1 = Reflect.construct; } else { _construct$1 = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf$1(instance, Class.prototype); return instance; }; } return _construct$1.apply(null, arguments); } +function _construct$1(Parent, args, Class) { + if (_isNativeReflectConstruct$1()) { + _construct$1 = Reflect.construct; + } else { + _construct$1 = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf$1(instance, Class.prototype); + return instance; + }; + } + return _construct$1.apply(null, arguments); +} -function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } +function _isNativeReflectConstruct$1() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} -function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; +} -function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); } +function _setPrototypeOf$1(o, p) { + _setPrototypeOf$1 = + Object.setPrototypeOf || + function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf$1(o, p); +} -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf + ? Object.getPrototypeOf + : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} /* istanbul ignore next */ -var Element = HAS_WINDOW_SUPPORT ? WINDOW.Element : /*#__PURE__*/function (_Object) { - _inherits(Element, _Object); +var Element = HAS_WINDOW_SUPPORT + ? WINDOW.Element + : /*#__PURE__*/ (function (_Object) { + _inherits(Element, _Object); - var _super = _createSuper(Element); + var _super = _createSuper(Element); - function Element() { - _classCallCheck$1(this, Element); + function Element() { + _classCallCheck$1(this, Element); - return _super.apply(this, arguments); - } + return _super.apply(this, arguments); + } - return Element; -}( /*#__PURE__*/_wrapNativeSuper(Object)); + return Element; + })(/*#__PURE__*/ _wrapNativeSuper(Object)); /* istanbul ignore next */ -var HTMLElement = HAS_WINDOW_SUPPORT ? WINDOW.HTMLElement : /*#__PURE__*/function (_Element) { - _inherits(HTMLElement, _Element); +var HTMLElement = HAS_WINDOW_SUPPORT + ? WINDOW.HTMLElement + : /*#__PURE__*/ (function (_Element) { + _inherits(HTMLElement, _Element); - var _super2 = _createSuper(HTMLElement); + var _super2 = _createSuper(HTMLElement); - function HTMLElement() { - _classCallCheck$1(this, HTMLElement); + function HTMLElement() { + _classCallCheck$1(this, HTMLElement); - return _super2.apply(this, arguments); - } + return _super2.apply(this, arguments); + } - return HTMLElement; -}(Element); + return HTMLElement; + })(Element); /* istanbul ignore next */ -var SVGElement = HAS_WINDOW_SUPPORT ? WINDOW.SVGElement : /*#__PURE__*/function (_Element2) { - _inherits(SVGElement, _Element2); +var SVGElement = HAS_WINDOW_SUPPORT + ? WINDOW.SVGElement + : /*#__PURE__*/ (function (_Element2) { + _inherits(SVGElement, _Element2); - var _super3 = _createSuper(SVGElement); + var _super3 = _createSuper(SVGElement); - function SVGElement() { - _classCallCheck$1(this, SVGElement); + function SVGElement() { + _classCallCheck$1(this, SVGElement); - return _super3.apply(this, arguments); - } + return _super3.apply(this, arguments); + } - return SVGElement; -}(Element); + return SVGElement; + })(Element); /* istanbul ignore next */ -HAS_WINDOW_SUPPORT ? WINDOW.File : /*#__PURE__*/function (_Object2) { - _inherits(File, _Object2); +HAS_WINDOW_SUPPORT + ? WINDOW.File + : /*#__PURE__*/ (function (_Object2) { + _inherits(File, _Object2); - var _super4 = _createSuper(File); + var _super4 = _createSuper(File); - function File() { - _classCallCheck$1(this, File); + function File() { + _classCallCheck$1(this, File); - return _super4.apply(this, arguments); - } + return _super4.apply(this, arguments); + } - return File; -}( /*#__PURE__*/_wrapNativeSuper(Object));function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + return File; + })(/*#__PURE__*/ _wrapNativeSuper(Object)); +function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + _typeof = function _typeof(obj) { + return obj && + typeof Symbol === "function" && + obj.constructor === Symbol && + obj !== Symbol.prototype + ? "symbol" + : typeof obj; + }; + } + return _typeof(obj); +} var toType = function toType(value) { return _typeof(value); @@ -263,16 +532,16 @@ var isUndefinedOrNull = function isUndefinedOrNull(value) { return isUndefined(value) || isNull(value); }; var isFunction$1 = function isFunction(value) { - return toType(value) === 'function'; + return toType(value) === "function"; }; var isBoolean = function isBoolean(value) { - return toType(value) === 'boolean'; + return toType(value) === "boolean"; }; var isString = function isString(value) { - return toType(value) === 'string'; + return toType(value) === "string"; }; var isNumber = function isNumber(value) { - return toType(value) === 'number'; + return toType(value) === "number"; }; var isNumeric$1 = function isNumeric(value) { return RX_NUMBER.test(String(value)); @@ -285,12 +554,12 @@ var isArray = function isArray(value) { // Note object could be a complex type like array, Date, etc. var isObject = function isObject(obj) { - return obj !== null && _typeof(obj) === 'object'; + return obj !== null && _typeof(obj) === "object"; }; // Strict object type check // Only returns true for plain JavaScript objects var isPlainObject = function isPlainObject(obj) { - return Object.prototype.toString.call(obj) === '[object Object]'; + return Object.prototype.toString.call(obj) === "[object Object]"; }; var isDate = function isDate(value) { return value instanceof Date; @@ -299,22 +568,67 @@ var isEvent = function isEvent(value) { return value instanceof Event; }; var isRegExp = function isRegExp(value) { - return toRawType(value) === 'RegExp'; + return toRawType(value) === "RegExp"; }; var isPromise = function isPromise(value) { - return !isUndefinedOrNull(value) && isFunction$1(value.then) && isFunction$1(value.catch); -};function ownKeys$z(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; } + return ( + !isUndefinedOrNull(value) && + isFunction$1(value.then) && + isFunction$1(value.catch) + ); +}; +function ownKeys$z(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; +} -function _objectSpread$z(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$z(Object(source), true).forEach(function (key) { _defineProperty$G(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$z(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$z(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$z(Object(source), true).forEach(function (key) { + _defineProperty$G(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$z(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$G(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; } +function _defineProperty$G(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; +} var assign = function assign() { return Object.assign.apply(Object, arguments); }; -var create = function create(proto, optionalProps) { - return Object.create(proto, optionalProps); -}; var defineProperties = function defineProperties(obj, props) { return Object.defineProperties(obj, props); }; @@ -336,20 +650,32 @@ var clone = function clone(obj) { // See: https://gist.github.com/bisubus/2da8af7e801ffd813fab7ac221aa7afc var pick = function pick(obj, props) { - return keys(obj).filter(function (key) { - return props.indexOf(key) !== -1; - }).reduce(function (result, key) { - return _objectSpread$z(_objectSpread$z({}, result), {}, _defineProperty$G({}, key, obj[key])); - }, {}); + return keys(obj) + .filter(function (key) { + return props.indexOf(key) !== -1; + }) + .reduce(function (result, key) { + return _objectSpread$z( + _objectSpread$z({}, result), + {}, + _defineProperty$G({}, key, obj[key]) + ); + }, {}); }; // Return a shallow copy of object with the specified properties omitted // See: https://gist.github.com/bisubus/2da8af7e801ffd813fab7ac221aa7afc var omit = function omit(obj, props) { - return keys(obj).filter(function (key) { - return props.indexOf(key) === -1; - }).reduce(function (result, key) { - return _objectSpread$z(_objectSpread$z({}, result), {}, _defineProperty$G({}, key, obj[key])); - }, {}); + return keys(obj) + .filter(function (key) { + return props.indexOf(key) === -1; + }) + .reduce(function (result, key) { + return _objectSpread$z( + _objectSpread$z({}, result), + {}, + _defineProperty$G({}, key, obj[key]) + ); + }, {}); }; // Merges two object deeply together // See: https://gist.github.com/Salakar/1d7137de9cb8b704e48a @@ -372,36 +698,117 @@ var mergeDeep = function mergeDeep(target, source) { }; // Returns a shallow copy of the object with keys in sorted order var sortKeys = function sortKeys(obj) { - return keys(obj).sort().reduce(function (result, key) { - return _objectSpread$z(_objectSpread$z({}, result), {}, _defineProperty$G({}, key, obj[key])); - }, {}); + return keys(obj) + .sort() + .reduce(function (result, key) { + return _objectSpread$z( + _objectSpread$z({}, result), + {}, + _defineProperty$G({}, key, obj[key]) + ); + }, {}); }; // Convenience method to create a read-only descriptor var readonlyDescriptor = function readonlyDescriptor() { return { enumerable: true, configurable: false, - writable: false + writable: false, }; -};function ownKeys$y(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; } +}; +function ownKeys$y(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; +} -function _objectSpread$y(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$y(Object(source), true).forEach(function (key) { _defineProperty$F(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$y(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$y(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$y(Object(source), true).forEach(function (key) { + _defineProperty$F(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$y(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$F(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; } +function _defineProperty$F(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; +} -function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$4(); } +function _toConsumableArray$4(arr) { + return ( + _arrayWithoutHoles$4(arr) || + _iterableToArray$4(arr) || + _unsupportedIterableToArray$5(arr) || + _nonIterableSpread$4() + ); +} -function _nonIterableSpread$4() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _nonIterableSpread$4() { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); +} -function _unsupportedIterableToArray$5(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$5(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$5(o, minLen); } +function _unsupportedIterableToArray$5(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$5(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$5(o, minLen); +} -function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } +function _iterableToArray$4(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) + return Array.from(iter); +} -function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); } +function _arrayWithoutHoles$4(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); +} -function _arrayLikeToArray$5(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; } +function _arrayLikeToArray$5(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; +} var cloneDeep = function cloneDeep(obj) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : obj; + var defaultValue = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : obj; if (isArray(obj)) { return obj.reduce(function (result, val) { @@ -411,14 +818,20 @@ var cloneDeep = function cloneDeep(obj) { if (isPlainObject(obj)) { return keys(obj).reduce(function (result, key) { - return _objectSpread$y(_objectSpread$y({}, result), {}, _defineProperty$F({}, key, cloneDeep(obj[key], obj[key]))); + return _objectSpread$y( + _objectSpread$y({}, result), + {}, + _defineProperty$F({}, key, cloneDeep(obj[key], obj[key])) + ); }, {}); } return defaultValue; -};var identity = function identity(x) { +}; +var identity = function identity(x) { return x; -};/** +}; +/** * Get property defined by dot/array notation in string, returns undefined if not found * * @link https://gist.github.com/jeneg/9767afdcca45601ea44930ea03e0febf#gistcomment-1935901 @@ -429,9 +842,12 @@ var cloneDeep = function cloneDeep(obj) { */ var getRaw = function getRaw(obj, path) { - var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + var defaultValue = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : undefined; // Handle array of path values - path = isArray(path) ? path.join('.') : path; // If no path or no object passed + path = isArray(path) ? path.join(".") : path; // If no path or no object passed if (!path || !isObject(obj)) { return defaultValue; @@ -440,14 +856,12 @@ var getRaw = function getRaw(obj, path) { // Switched to `in` operator vs `hasOwnProperty` to handle obj.prototype getters // https://github.com/bootstrap-vue/bootstrap-vue/issues/3463 - if (path in obj) { return obj[path]; } // Handle string array notation (numeric indices only) - - path = String(path).replace(RX_ARRAY_NOTATION, '.$1'); - var steps = path.split('.').filter(identity); // Handle case where someone passes a string of only dots + path = String(path).replace(RX_ARRAY_NOTATION, ".$1"); + var steps = path.split(".").filter(identity); // Handle case where someone passes a string of only dots if (steps.length === 0) { return defaultValue; @@ -455,10 +869,15 @@ var getRaw = function getRaw(obj, path) { // Switched to `in` operator vs `hasOwnProperty` to handle obj.prototype getters // https://github.com/bootstrap-vue/bootstrap-vue/issues/3463 - return steps.every(function (step) { - return isObject(obj) && step in obj && !isUndefinedOrNull(obj = obj[step]); - }) ? obj : isNull(obj) ? null : defaultValue; + return ( + isObject(obj) && step in obj && !isUndefinedOrNull((obj = obj[step])) + ); + }) + ? obj + : isNull(obj) + ? null + : defaultValue; }; /** * Get property defined by dot/array notation in string. @@ -472,15 +891,18 @@ var getRaw = function getRaw(obj, path) { */ var get = function get(obj, path) { - var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var defaultValue = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; var value = getRaw(obj, path); return isUndefinedOrNull(value) ? defaultValue : value; -};/** +}; +/** * Utilities to get information about the current environment */ var getEnv = function getEnv(key) { - var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var env = typeof process !== 'undefined' && process ? process.env || {} : {}; + var fallback = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var env = typeof process !== "undefined" && process ? process.env || {} : {}; if (!key) { /* istanbul ignore next */ @@ -490,92 +912,98 @@ var getEnv = function getEnv(key) { return env[key] || fallback; }; var getNoWarn = function getNoWarn() { - return getEnv('BOOTSTRAP_VUE_NO_WARN') || getEnv('NODE_ENV') === 'production'; -};/** + return getEnv("BOOTSTRAP_VUE_NO_WARN") || getEnv("NODE_ENV") === "production"; +}; +/** * Log a warning message to the console with BootstrapVue formatting * @param {string} message */ -var warn = function warn(message) -/* istanbul ignore next */ +var warn = function warn(message) /* istanbul ignore next */ { - var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var source = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; if (!getNoWarn()) { - console.warn("[BootstrapVue warn]: ".concat(source ? "".concat(source, " - ") : '').concat(message)); - } -};// Component names -var NAME_BUTTON = 'BButton'; -var NAME_CALENDAR = 'BCalendar'; -var NAME_DROPDOWN = 'BDropdown'; -var NAME_FORM_CHECKBOX = 'BFormCheckbox'; -var NAME_FORM_DATEPICKER = 'BFormDatepicker'; -var NAME_FORM_INPUT = 'BFormInput'; -var NAME_FORM_RATING = 'BFormRating'; -var NAME_FORM_SELECT = 'BFormSelect'; -var NAME_FORM_SELECT_OPTION = 'BFormSelectOption'; -var NAME_FORM_SELECT_OPTION_GROUP = 'BFormSelectOptionGroup'; -var NAME_ICON = 'BIcon'; -var NAME_ICON_BASE = 'BIconBase'; -var NAME_LINK = 'BLink'; -var NAME_MODAL = 'BModal'; -var NAME_TABLE = 'BTable'; -var NAME_TABLE_CELL = 'BTableCell'; -var NAME_TBODY = 'BTbody'; -var NAME_TFOOT = 'BTfoot'; -var NAME_TH = 'BTh'; -var NAME_THEAD = 'BThead'; -var NAME_TOOLTIP = 'BTooltip'; -var NAME_TR = 'BTr'; // Helper component names -var NAME_FORM_BUTTON_LABEL_CONTROL = 'BVFormBtnLabelControl'; -var NAME_FORM_RATING_STAR = 'BVFormRatingStar'; -var NAME_POPPER = 'BVPopper'; -var NAME_TOOLTIP_HELPER = 'BVTooltip'; -var NAME_TOOLTIP_TEMPLATE = 'BVTooltipTemplate'; -var NAME_TRANSITION = 'BVTransition';var EVENT_NAME_BLUR = 'blur'; -var EVENT_NAME_CHANGE = 'change'; -var EVENT_NAME_CLICK = 'click'; -var EVENT_NAME_CLOSE = 'close'; -var EVENT_NAME_CONTEXT = 'context'; -var EVENT_NAME_CONTEXT_CHANGED = 'context-changed'; -var EVENT_NAME_DISABLE = 'disable'; -var EVENT_NAME_DISABLED = 'disabled'; -var EVENT_NAME_ENABLE = 'enable'; -var EVENT_NAME_ENABLED = 'enabled'; -var EVENT_NAME_FILTERED = 'filtered'; -var EVENT_NAME_FOCUSIN = 'focusin'; -var EVENT_NAME_FOCUSOUT = 'focusout'; -var EVENT_NAME_HEAD_CLICKED = 'head-clicked'; -var EVENT_NAME_HIDDEN = 'hidden'; -var EVENT_NAME_HIDE = 'hide'; -var EVENT_NAME_INPUT = 'input'; -var EVENT_NAME_MOUSEENTER = 'mouseenter'; -var EVENT_NAME_MOUSELEAVE = 'mouseleave'; -var EVENT_NAME_OPEN = 'open'; -var EVENT_NAME_REFRESH = 'refresh'; -var EVENT_NAME_REFRESHED = 'refreshed'; -var EVENT_NAME_ROW_CLICKED = 'row-clicked'; -var EVENT_NAME_ROW_CONTEXTMENU = 'row-contextmenu'; -var EVENT_NAME_ROW_DBLCLICKED = 'row-dblclicked'; -var EVENT_NAME_ROW_HOVERED = 'row-hovered'; -var EVENT_NAME_ROW_MIDDLE_CLICKED = 'row-middle-clicked'; -var EVENT_NAME_ROW_SELECTED = 'row-selected'; -var EVENT_NAME_ROW_UNHOVERED = 'row-unhovered'; -var EVENT_NAME_SELECTED = 'selected'; -var EVENT_NAME_SHOW = 'show'; -var EVENT_NAME_SHOWN = 'shown'; -var EVENT_NAME_SORT_CHANGED = 'sort-changed'; -var EVENT_NAME_TOGGLE = 'toggle'; -var EVENT_NAME_UPDATE = 'update'; -var HOOK_EVENT_NAME_BEFORE_DESTROY = 'hook:beforeDestroy'; -var HOOK_EVENT_NAME_DESTROYED = 'hook:destroyed'; -var MODEL_EVENT_NAME_PREFIX = 'update:'; -var ROOT_EVENT_NAME_PREFIX = 'bv'; -var ROOT_EVENT_NAME_SEPARATOR = '::'; + console.warn( + "[BootstrapVue warn]: " + .concat(source ? "".concat(source, " - ") : "") + .concat(message) + ); + } +}; // Component names +var NAME_BUTTON = "BButton"; +var NAME_CALENDAR = "BCalendar"; +var NAME_DROPDOWN = "BDropdown"; +var NAME_FORM_CHECKBOX = "BFormCheckbox"; +var NAME_FORM_DATEPICKER = "BFormDatepicker"; +var NAME_FORM_INPUT = "BFormInput"; +var NAME_FORM_RATING = "BFormRating"; +var NAME_FORM_SELECT = "BFormSelect"; +var NAME_FORM_SELECT_OPTION = "BFormSelectOption"; +var NAME_FORM_SELECT_OPTION_GROUP = "BFormSelectOptionGroup"; +var NAME_ICON = "BIcon"; +var NAME_ICON_BASE = "BIconBase"; +var NAME_LINK = "BLink"; +var NAME_MODAL = "BModal"; +var NAME_TABLE = "BTable"; +var NAME_TABLE_CELL = "BTableCell"; +var NAME_TBODY = "BTbody"; +var NAME_TFOOT = "BTfoot"; +var NAME_TH = "BTh"; +var NAME_THEAD = "BThead"; +var NAME_TOOLTIP = "BTooltip"; +var NAME_TR = "BTr"; // Helper component names +var NAME_FORM_BUTTON_LABEL_CONTROL = "BVFormBtnLabelControl"; +var NAME_FORM_RATING_STAR = "BVFormRatingStar"; +var NAME_POPPER = "BVPopper"; +var NAME_TOOLTIP_HELPER = "BVTooltip"; +var NAME_TOOLTIP_TEMPLATE = "BVTooltipTemplate"; +var NAME_TRANSITION = "BVTransition"; +var EVENT_NAME_BLUR = "blur"; +var EVENT_NAME_CHANGE = "change"; +var EVENT_NAME_CLICK = "click"; +var EVENT_NAME_CLOSE = "close"; +var EVENT_NAME_CONTEXT = "context"; +var EVENT_NAME_CONTEXT_CHANGED = "context-changed"; +var EVENT_NAME_DISABLE = "disable"; +var EVENT_NAME_DISABLED = "disabled"; +var EVENT_NAME_ENABLE = "enable"; +var EVENT_NAME_ENABLED = "enabled"; +var EVENT_NAME_FILTERED = "filtered"; +var EVENT_NAME_FOCUSIN = "focusin"; +var EVENT_NAME_FOCUSOUT = "focusout"; +var EVENT_NAME_HEAD_CLICKED = "head-clicked"; +var EVENT_NAME_HIDDEN = "hidden"; +var EVENT_NAME_HIDE = "hide"; +var EVENT_NAME_INPUT = "input"; +var EVENT_NAME_MOUSEENTER = "mouseenter"; +var EVENT_NAME_MOUSELEAVE = "mouseleave"; +var EVENT_NAME_OPEN = "open"; +var EVENT_NAME_REFRESH = "refresh"; +var EVENT_NAME_REFRESHED = "refreshed"; +var EVENT_NAME_ROW_CLICKED = "row-clicked"; +var EVENT_NAME_ROW_CONTEXTMENU = "row-contextmenu"; +var EVENT_NAME_ROW_DBLCLICKED = "row-dblclicked"; +var EVENT_NAME_ROW_HOVERED = "row-hovered"; +var EVENT_NAME_ROW_MIDDLE_CLICKED = "row-middle-clicked"; +var EVENT_NAME_ROW_SELECTED = "row-selected"; +var EVENT_NAME_ROW_UNHOVERED = "row-unhovered"; +var EVENT_NAME_SELECTED = "selected"; +var EVENT_NAME_SHOW = "show"; +var EVENT_NAME_SHOWN = "shown"; +var EVENT_NAME_SORT_CHANGED = "sort-changed"; +var EVENT_NAME_TOGGLE = "toggle"; +var EVENT_NAME_UPDATE = "update"; +var HOOK_EVENT_NAME_BEFORE_DESTROY = "hook:beforeDestroy"; +var HOOK_EVENT_NAME_DESTROYED = "hook:destroyed"; +var MODEL_EVENT_NAME_PREFIX = "update:"; +var ROOT_EVENT_NAME_PREFIX = "bv"; +var ROOT_EVENT_NAME_SEPARATOR = "::"; var EVENT_OPTIONS_NO_CAPTURE = { passive: true, - capture: false -};// General types + capture: false, +}; // General types var PROP_TYPE_ANY = undefined; var PROP_TYPE_ARRAY = Array; var PROP_TYPE_BOOLEAN = Boolean; @@ -588,37 +1016,47 @@ var PROP_TYPE_STRING = String; // Multiple types var PROP_TYPE_ARRAY_FUNCTION = [PROP_TYPE_ARRAY, PROP_TYPE_FUNCTION]; var PROP_TYPE_ARRAY_OBJECT = [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT]; -var PROP_TYPE_ARRAY_OBJECT_STRING = [PROP_TYPE_ARRAY, PROP_TYPE_OBJECT, PROP_TYPE_STRING]; +var PROP_TYPE_ARRAY_OBJECT_STRING = [ + PROP_TYPE_ARRAY, + PROP_TYPE_OBJECT, + PROP_TYPE_STRING, +]; var PROP_TYPE_ARRAY_STRING = [PROP_TYPE_ARRAY, PROP_TYPE_STRING]; var PROP_TYPE_BOOLEAN_STRING = [PROP_TYPE_BOOLEAN, PROP_TYPE_STRING]; var PROP_TYPE_DATE_STRING = [PROP_TYPE_DATE, PROP_TYPE_STRING]; var PROP_TYPE_NUMBER_STRING = [PROP_TYPE_NUMBER, PROP_TYPE_STRING]; -var PROP_TYPE_NUMBER_OBJECT_STRING = [PROP_TYPE_NUMBER, PROP_TYPE_OBJECT, PROP_TYPE_STRING]; +var PROP_TYPE_NUMBER_OBJECT_STRING = [ + PROP_TYPE_NUMBER, + PROP_TYPE_OBJECT, + PROP_TYPE_STRING, +]; var PROP_TYPE_OBJECT_FUNCTION = [PROP_TYPE_OBJECT, PROP_TYPE_FUNCTION]; -var PROP_TYPE_OBJECT_STRING = [PROP_TYPE_OBJECT, PROP_TYPE_STRING];var SLOT_NAME_BOTTOM_ROW = 'bottom-row'; -var SLOT_NAME_BUTTON_CONTENT = 'button-content'; -var SLOT_NAME_CUSTOM_FOOT = 'custom-foot'; -var SLOT_NAME_DEFAULT = 'default'; -var SLOT_NAME_EMPTY = 'empty'; -var SLOT_NAME_EMPTYFILTERED = 'emptyfiltered'; -var SLOT_NAME_FIRST = 'first'; -var SLOT_NAME_ICON_CLEAR = 'icon-clear'; -var SLOT_NAME_ICON_EMPTY = 'icon-empty'; -var SLOT_NAME_ICON_FULL = 'icon-full'; -var SLOT_NAME_ICON_HALF = 'icon-half'; -var SLOT_NAME_NAV_NEXT_DECADE = 'nav-next-decade'; -var SLOT_NAME_NAV_NEXT_MONTH = 'nav-next-month'; -var SLOT_NAME_NAV_NEXT_YEAR = 'nav-next-year'; -var SLOT_NAME_NAV_PEV_DECADE = 'nav-prev-decade'; -var SLOT_NAME_NAV_PEV_MONTH = 'nav-prev-month'; -var SLOT_NAME_NAV_PEV_YEAR = 'nav-prev-year'; -var SLOT_NAME_NAV_THIS_MONTH = 'nav-this-month'; -var SLOT_NAME_ROW_DETAILS = 'row-details'; -var SLOT_NAME_TABLE_BUSY = 'table-busy'; -var SLOT_NAME_TABLE_CAPTION = 'table-caption'; -var SLOT_NAME_TABLE_COLGROUP = 'table-colgroup'; -var SLOT_NAME_THEAD_TOP = 'thead-top'; -var SLOT_NAME_TOP_ROW = 'top-row';var from = function from() { +var PROP_TYPE_OBJECT_STRING = [PROP_TYPE_OBJECT, PROP_TYPE_STRING]; +var SLOT_NAME_BOTTOM_ROW = "bottom-row"; +var SLOT_NAME_BUTTON_CONTENT = "button-content"; +var SLOT_NAME_CUSTOM_FOOT = "custom-foot"; +var SLOT_NAME_DEFAULT = "default"; +var SLOT_NAME_EMPTY = "empty"; +var SLOT_NAME_EMPTYFILTERED = "emptyfiltered"; +var SLOT_NAME_FIRST = "first"; +var SLOT_NAME_ICON_CLEAR = "icon-clear"; +var SLOT_NAME_ICON_EMPTY = "icon-empty"; +var SLOT_NAME_ICON_FULL = "icon-full"; +var SLOT_NAME_ICON_HALF = "icon-half"; +var SLOT_NAME_NAV_NEXT_DECADE = "nav-next-decade"; +var SLOT_NAME_NAV_NEXT_MONTH = "nav-next-month"; +var SLOT_NAME_NAV_NEXT_YEAR = "nav-next-year"; +var SLOT_NAME_NAV_PEV_DECADE = "nav-prev-decade"; +var SLOT_NAME_NAV_PEV_MONTH = "nav-prev-month"; +var SLOT_NAME_NAV_PEV_YEAR = "nav-prev-year"; +var SLOT_NAME_NAV_THIS_MONTH = "nav-this-month"; +var SLOT_NAME_ROW_DETAILS = "row-details"; +var SLOT_NAME_TABLE_BUSY = "table-busy"; +var SLOT_NAME_TABLE_CAPTION = "table-caption"; +var SLOT_NAME_TABLE_COLGROUP = "table-colgroup"; +var SLOT_NAME_THEAD_TOP = "thead-top"; +var SLOT_NAME_TOP_ROW = "top-row"; +var from = function from() { return Array.from.apply(Array, arguments); }; // --- Instance --- @@ -626,7 +1064,11 @@ var arrayIncludes = function arrayIncludes(array, value) { return array.indexOf(value) !== -1; }; var concat = function concat() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + for ( + var _len = arguments.length, args = new Array(_len), _key = 0; + _key < _len; + _key++ + ) { args[_key] = arguments[_key]; } @@ -634,23 +1076,27 @@ var concat = function concat() { }; // --- Utilities --- var createArray = function createArray(length, fillFn) { - var mapFn = isFunction$1(fillFn) ? fillFn : function () { - return fillFn; - }; + var mapFn = isFunction$1(fillFn) + ? fillFn + : function () { + return fillFn; + }; return Array.apply(null, { - length: length + length: length, }).map(mapFn); -};// Number utilities +}; // Number utilities // Converts a value (string, number, etc.) to an integer number // Assumes radix base 10 var toInteger = function toInteger(value) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN; + var defaultValue = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN; var integer = parseInt(value, 10); return isNaN(integer) ? defaultValue : integer; }; // Converts a value (string, number, etc.) to a number var toFloat = function toFloat(value) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN; + var defaultValue = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN; var float = parseFloat(value); return isNaN(float) ? defaultValue : float; }; // Converts a value (string, number, etc.) to a string @@ -658,12 +1104,12 @@ var toFloat = function toFloat(value) { // Converts PascalCase or camelCase to kebab-case var kebabCase = function kebabCase(str) { - return str.replace(RX_HYPHENATE, '-$1').toLowerCase(); + return str.replace(RX_HYPHENATE, "-$1").toLowerCase(); }; // Converts a kebab-case or camelCase string to PascalCase var pascalCase = function pascalCase(str) { str = kebabCase(str).replace(RX_UN_KEBAB, function (_, c) { - return c ? c.toUpperCase() : ''; + return c ? c.toUpperCase() : ""; }); return str.charAt(0).toUpperCase() + str.slice(1); }; // Converts a string, including strings in camelCase or snake_case, into Start Case @@ -671,22 +1117,31 @@ var pascalCase = function pascalCase(str) { // https://github.com/UrbanCompass/to-start-case var startCase = function startCase(str) { - return str.replace(RX_UNDERSCORE, ' ').replace(RX_LOWER_UPPER, function (str, $1, $2) { - return $1 + ' ' + $2; - }).replace(RX_START_SPACE_WORD, function (str, $1, $2) { - return $1 + $2.toUpperCase(); - }); + return str + .replace(RX_UNDERSCORE, " ") + .replace(RX_LOWER_UPPER, function (str, $1, $2) { + return $1 + " " + $2; + }) + .replace(RX_START_SPACE_WORD, function (str, $1, $2) { + return $1 + $2.toUpperCase(); + }); }; // Lowercases the first letter of a string and returns a new string var escapeRegExp = function escapeRegExp(str) { - return str.replace(RX_REGEXP_REPLACE, '\\$&'); + return str.replace(RX_REGEXP_REPLACE, "\\$&"); }; // Convert a value to a string that can be rendered // `undefined`/`null` will be converted to `''` // Plain objects and arrays will be JSON stringified var toString = function toString(val) { - var spaces = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; - return isUndefinedOrNull(val) ? '' : isArray(val) || isPlainObject(val) && val.toString === Object.prototype.toString ? JSON.stringify(val, null, spaces) : String(val); + var spaces = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; + return isUndefinedOrNull(val) + ? "" + : isArray(val) || + (isPlainObject(val) && val.toString === Object.prototype.toString) + ? JSON.stringify(val, null, spaces) + : String(val); }; // Remove leading white space from a string var trim = function trim(str) { @@ -697,46 +1152,63 @@ var ELEMENT_PROTO = Element.prototype; /* istanbul ignore next */ -var matchesEl = ELEMENT_PROTO.matches || ELEMENT_PROTO.msMatchesSelector || ELEMENT_PROTO.webkitMatchesSelector; // See: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest +var matchesEl = + ELEMENT_PROTO.matches || + ELEMENT_PROTO.msMatchesSelector || + ELEMENT_PROTO.webkitMatchesSelector; // See: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest /* istanbul ignore next */ -var closestEl = ELEMENT_PROTO.closest || function (sel) { - var el = this; +var closestEl = + ELEMENT_PROTO.closest || + function (sel) { + var el = this; - do { - // Use our "patched" matches function - if (matches(el, sel)) { - return el; - } + do { + // Use our "patched" matches function + if (matches(el, sel)) { + return el; + } - el = el.parentElement || el.parentNode; - } while (!isNull(el) && el.nodeType === Node.ELEMENT_NODE); + el = el.parentElement || el.parentNode; + } while (!isNull(el) && el.nodeType === Node.ELEMENT_NODE); - return null; -}; // `requestAnimationFrame()` convenience method + return null; + }; // `requestAnimationFrame()` convenience method /* istanbul ignore next: JSDOM always returns the first option */ -var requestAF = WINDOW.requestAnimationFrame || WINDOW.webkitRequestAnimationFrame || WINDOW.mozRequestAnimationFrame || WINDOW.msRequestAnimationFrame || WINDOW.oRequestAnimationFrame || // Fallback, but not a true polyfill -// Only needed for Opera Mini +var requestAF = + WINDOW.requestAnimationFrame || + WINDOW.webkitRequestAnimationFrame || + WINDOW.mozRequestAnimationFrame || + WINDOW.msRequestAnimationFrame || + WINDOW.oRequestAnimationFrame || // Fallback, but not a true polyfill + // Only needed for Opera Mini -/* istanbul ignore next */ -function (cb) { - return setTimeout(cb, 16); -}; -WINDOW.MutationObserver || WINDOW.WebKitMutationObserver || WINDOW.MozMutationObserver || null; // --- Utils --- + /* istanbul ignore next */ + function (cb) { + return setTimeout(cb, 16); + }; +WINDOW.MutationObserver || + WINDOW.WebKitMutationObserver || + WINDOW.MozMutationObserver || + null; // --- Utils --- var isElement = function isElement(el) { return !!(el && el.nodeType === Node.ELEMENT_NODE); }; // Get the currently active HTML element var getActiveElement = function getActiveElement() { - var excludes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var excludes = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var activeElement = DOCUMENT.activeElement; - return activeElement && !excludes.some(function (el) { - return el === activeElement; - }) ? activeElement : null; + return activeElement && + !excludes.some(function (el) { + return el === activeElement; + }) + ? activeElement + : null; }; // Returns `true` if a tag's name equals `name` var isTag = function isTag(tag, name) { @@ -754,7 +1226,7 @@ var isVisible = function isVisible(el) { return false; } - if (getStyle(el, 'display') === 'none') { + if (getStyle(el, "display") === "none") { // We do this check to help with vue-test-utils when using v-show /* istanbul ignore next */ @@ -763,13 +1235,17 @@ var isVisible = function isVisible(el) { // So any tests that need isVisible will fail in JSDOM // Except when we override the getBCR prototype in some tests - var bcr = getBCR(el); return !!(bcr && bcr.height > 0 && bcr.width > 0); }; // Determine if an element is disabled var isDisabled = function isDisabled(el) { - return !isElement(el) || el.disabled || hasAttr(el, 'disabled') || hasClass(el, 'disabled'); + return ( + !isElement(el) || + el.disabled || + hasAttr(el, "disabled") || + hasClass(el, "disabled") + ); }; // Cause/wait-for an element to reflow its content (adjusting its height/width) var selectAll = function selectAll(selector, root) { @@ -785,7 +1261,8 @@ var matches = function matches(el, selector) { }; // Finds closest element matching selector. Returns `null` if not found var closest = function closest(selector, root) { - var includeRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var includeRoot = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; if (!isElement(root)) { return null; @@ -799,7 +1276,9 @@ var closest = function closest(selector, root) { }; // Returns true if the parent element contains the child element var contains = function contains(parent, child) { - return parent && isFunction$1(parent.contains) ? parent.contains(child) : false; + return parent && isFunction$1(parent.contains) + ? parent.contains(child) + : false; }; // Get an element given an ID var getById = function getById(id) { @@ -885,7 +1364,8 @@ var getSel = function getSel() { }; // Return an element's offset with respect to document element var attemptFocus = function attemptFocus(el) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var options = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; try { el.focus(options); @@ -900,82 +1380,143 @@ var attemptBlur = function attemptBlur(el) { } catch (_unused2) {} return !isActiveElement(el); -};var memoize = function memoize(fn) { - var cache = create(null); - return function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var argsKey = JSON.stringify(args); - return cache[argsKey] = cache[argsKey] || fn.apply(null, args); - }; -};var VueProto = Vue__default["default"].prototype; // --- Getter methods --- +}; +var VueProto = Vue__default["default"].prototype; // --- Getter methods --- var getConfigValue = function getConfigValue(key) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + var defaultValue = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : undefined; var bvConfig = VueProto[PROP_NAME]; - return bvConfig ? bvConfig.getConfigValue(key, defaultValue) : cloneDeep(defaultValue); + return bvConfig + ? bvConfig.getConfigValue(key, defaultValue) + : cloneDeep(defaultValue); }; // Method to grab a config value for a particular component var getComponentConfig = function getComponentConfig(key) { - var propKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; + var propKey = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var defaultValue = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : undefined; // Return the particular config value for key if specified, // otherwise we return the full config (or an empty object if not found) - return propKey ? getConfigValue("".concat(key, ".").concat(propKey), defaultValue) : getConfigValue(key, {}); + return propKey + ? getConfigValue("".concat(key, ".").concat(propKey), defaultValue) + : getConfigValue(key, {}); }; // Get all breakpoint names +function ownKeys$x(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; +} -var getBreakpoints = function getBreakpoints() { - return getConfigValue('breakpoints', DEFAULT_BREAKPOINT); -}; // Private method for caching breakpoint names - -var _getBreakpointsCached = memoize(function () { - return getBreakpoints(); -}); // Get all breakpoint names (cached) - - -var getBreakpointsCached = function getBreakpointsCached() { - return cloneDeep(_getBreakpointsCached()); -}; // Get breakpoints with the smallest breakpoint set as '' -// Useful for components that create breakpoint specific props - -memoize(function () { - var breakpoints = getBreakpointsCached(); - breakpoints[0] = ''; - return breakpoints; -}); // Get breakpoints with the largest breakpoint set as '' -function ownKeys$x(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; } - -function _objectSpread$x(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$x(Object(source), true).forEach(function (key) { _defineProperty$E(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$x(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$x(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$x(Object(source), true).forEach(function (key) { + _defineProperty$E(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$x(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$E(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; } +function _defineProperty$E(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; +} var makeProp = function makeProp() { - var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PROP_TYPE_ANY; - var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - var requiredOrValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; - var validator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined; + var type = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : PROP_TYPE_ANY; + var value = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : undefined; + var requiredOrValidator = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : undefined; + var validator = + arguments.length > 3 && arguments[3] !== undefined + ? arguments[3] + : undefined; var required = requiredOrValidator === true; validator = required ? validator : requiredOrValidator; - return _objectSpread$x(_objectSpread$x(_objectSpread$x({}, type ? { - type: type - } : {}), required ? { - required: required - } : isUndefined(value) ? {} : { - default: isObject(value) ? function () { - return value; - } : value - }), isUndefined(validator) ? {} : { - validator: validator - }); + return _objectSpread$x( + _objectSpread$x( + _objectSpread$x( + {}, + type + ? { + type: type, + } + : {} + ), + required + ? { + required: required, + } + : isUndefined(value) + ? {} + : { + default: isObject(value) + ? function () { + return value; + } + : value, + } + ), + isUndefined(validator) + ? {} + : { + validator: validator, + } + ); }; // Copies props from one array/object to a new array/object // plucks all the values off the target object, returning a new object // that has props that reference the original prop values var pluckProps = function pluckProps(keysToPluck, objToPluck) { - var transformFn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : identity; - return (isArray(keysToPluck) ? keysToPluck.slice() : keys(keysToPluck)).reduce(function (memo, prop) { + var transformFn = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : identity; + return ( + isArray(keysToPluck) ? keysToPluck.slice() : keys(keysToPluck) + ).reduce(function (memo, prop) { memo[transformFn(prop)] = objToPluck[prop]; return memo; }, {}); @@ -983,59 +1524,96 @@ var pluckProps = function pluckProps(keysToPluck, objToPluck) { // Replaces the current `default` key of each prop with a `getComponentConfig()` // call that falls back to the current default value of the prop -var makePropConfigurable = function makePropConfigurable(prop, key, componentKey) { - return _objectSpread$x(_objectSpread$x({}, cloneDeep(prop)), {}, { - default: function bvConfigurablePropDefault() { - var value = getComponentConfig(componentKey, key, prop.default); - return isFunction$1(value) ? value() : value; +var makePropConfigurable = function makePropConfigurable( + prop, + key, + componentKey +) { + return _objectSpread$x( + _objectSpread$x({}, cloneDeep(prop)), + {}, + { + default: function bvConfigurablePropDefault() { + var value = getComponentConfig(componentKey, key, prop.default); + return isFunction$1(value) ? value() : value; + }, } - }); + ); }; // Make a props object configurable by global configuration // Replaces the current `default` key of each prop with a `getComponentConfig()` // call that falls back to the current default value of the prop -var makePropsConfigurable = function makePropsConfigurable(props, componentKey) { +var makePropsConfigurable = function makePropsConfigurable( + props, + componentKey +) { return keys(props).reduce(function (result, key) { - return _objectSpread$x(_objectSpread$x({}, result), {}, _defineProperty$E({}, key, makePropConfigurable(props[key], key, componentKey))); + return _objectSpread$x( + _objectSpread$x({}, result), + {}, + _defineProperty$E( + {}, + key, + makePropConfigurable(props[key], key, componentKey) + ) + ); }, {}); }; // Get function name we use in `makePropConfigurable()` // for the prop default value override to compare // against in `hasPropFunction()` -var configurablePropDefaultFnName = makePropConfigurable({}, '', '').default.name; // Detect wether the given value is currently a function +var configurablePropDefaultFnName = makePropConfigurable({}, "", "").default + .name; // Detect wether the given value is currently a function // and isn't the props default function var hasPropFunction = function hasPropFunction(fn) { return isFunction$1(fn) && fn.name !== configurablePropDefaultFnName; -};function _defineProperty$D(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; } +}; +function _defineProperty$D(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; +} var makeModelMixin = function makeModelMixin(prop) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$type = _ref.type, - type = _ref$type === void 0 ? PROP_TYPE_ANY : _ref$type, - _ref$defaultValue = _ref.defaultValue, - defaultValue = _ref$defaultValue === void 0 ? undefined : _ref$defaultValue, - _ref$validator = _ref.validator, - validator = _ref$validator === void 0 ? undefined : _ref$validator, - _ref$event = _ref.event, - event = _ref$event === void 0 ? EVENT_NAME_INPUT : _ref$event; - - var props = _defineProperty$D({}, prop, makeProp(type, defaultValue, validator)); // @vue/component - + var _ref = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$type = _ref.type, + type = _ref$type === void 0 ? PROP_TYPE_ANY : _ref$type, + _ref$defaultValue = _ref.defaultValue, + defaultValue = _ref$defaultValue === void 0 ? undefined : _ref$defaultValue, + _ref$validator = _ref.validator, + validator = _ref$validator === void 0 ? undefined : _ref$validator, + _ref$event = _ref.event, + event = _ref$event === void 0 ? EVENT_NAME_INPUT : _ref$event; + + var props = _defineProperty$D( + {}, + prop, + makeProp(type, defaultValue, validator) + ); // @vue/component var mixin = Vue__default["default"].extend({ model: { prop: prop, - event: event + event: event, }, - props: props + props: props, }); return { mixin: mixin, props: props, prop: prop, - event: event + event: event, }; -};// In functional components, `slots` is a function so it must be called +}; // In functional components, `slots` is a function so it must be called // first before passing to the below methods. `scopedSlots` is always an // object and may be undefined (for Vue < 2.6.x) @@ -1049,8 +1627,10 @@ var makeModelMixin = function makeModelMixin(prop) { */ var hasNormalizedSlot = function hasNormalizedSlot(names) { - var $scopedSlots = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var $slots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var $scopedSlots = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var $slots = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; // Ensure names is an array names = concat(names).filter(identity); // Returns true if the either a $scopedSlot or $slot exists with the specified name @@ -1069,9 +1649,12 @@ var hasNormalizedSlot = function hasNormalizedSlot(names) { */ var normalizeSlot = function normalizeSlot(names) { - var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var $scopedSlots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var $slots = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var scope = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var $scopedSlots = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var $slots = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; // Ensure names is an array names = concat(names).filter(identity); var slot; @@ -1081,40 +1664,61 @@ var normalizeSlot = function normalizeSlot(names) { slot = $scopedSlots[name] || $slots[name]; } // Note: in Vue 2.6.x, all named slots are also scoped slots - return isFunction$1(slot) ? slot(scope) : slot; -};var normalizeSlotMixin = Vue__default["default"].extend({ +}; +var normalizeSlotMixin = Vue__default["default"].extend({ methods: { // Returns `true` if the either a `$scopedSlot` or `$slot` exists with the specified name // `name` can be a string name or an array of names hasNormalizedSlot: function hasNormalizedSlot$1() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SLOT_NAME_DEFAULT; - var scopedSlots = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.$scopedSlots; - var slots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.$slots; + var name = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : SLOT_NAME_DEFAULT; + var scopedSlots = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : this.$scopedSlots; + var slots = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : this.$slots; return hasNormalizedSlot(name, scopedSlots, slots); }, // Returns an array of rendered VNodes if slot found, otherwise `undefined` // `name` can be a string name or an array of names normalizeSlot: function normalizeSlot$1() { - var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SLOT_NAME_DEFAULT; - var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var scopedSlots = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.$scopedSlots; - var slots = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.$slots; + var name = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : SLOT_NAME_DEFAULT; + var scope = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var scopedSlots = + arguments.length > 2 && arguments[2] !== undefined + ? arguments[2] + : this.$scopedSlots; + var slots = + arguments.length > 3 && arguments[3] !== undefined + ? arguments[3] + : this.$slots; var vNodes = normalizeSlot(name, scope, scopedSlots, slots); return vNodes ? concat(vNodes) : vNodes; - } - } -});// Normalize event options based on support of passive option + }, + }, +}); // Normalize event options based on support of passive option // Exported only for testing purposes var parseEventOptions = function parseEventOptions(options) { /* istanbul ignore else: can't test in JSDOM, as it supports passive */ if (HAS_PASSIVE_EVENT_SUPPORT) { - return isObject(options) ? options : { - capture: !!options || false - }; + return isObject(options) + ? options + : { + capture: !!options || false, + }; } else { // Need to translate to actual Boolean value return !!(isObject(options) ? options.capture : options); @@ -1137,7 +1741,13 @@ var eventOff = function eventOff(el, eventName, handler, options) { var eventOnOff = function eventOnOff(on) { var method = on ? eventOn : eventOff; - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + for ( + var _len = arguments.length, + args = new Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { args[_key - 1] = arguments[_key]; } @@ -1145,13 +1755,16 @@ var eventOnOff = function eventOnOff(on) { }; // Utility method to prevent the default event handling and propagation var stopEvent = function stopEvent(event) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$preventDefault = _ref.preventDefault, - preventDefault = _ref$preventDefault === void 0 ? true : _ref$preventDefault, - _ref$propagation = _ref.propagation, - propagation = _ref$propagation === void 0 ? true : _ref$propagation, - _ref$immediatePropaga = _ref.immediatePropagation, - immediatePropagation = _ref$immediatePropaga === void 0 ? false : _ref$immediatePropaga; + var _ref = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$preventDefault = _ref.preventDefault, + preventDefault = + _ref$preventDefault === void 0 ? true : _ref$preventDefault, + _ref$propagation = _ref.propagation, + propagation = _ref$propagation === void 0 ? true : _ref$propagation, + _ref$immediatePropaga = _ref.immediatePropagation, + immediatePropagation = + _ref$immediatePropaga === void 0 ? false : _ref$immediatePropaga; if (preventDefault) { event.preventDefault(); @@ -1169,39 +1782,89 @@ var stopEvent = function stopEvent(event) { // `getBaseEventName('BVToggle')` => 'toggle' var getBaseEventName = function getBaseEventName(value) { - return kebabCase(value.replace(RX_BV_PREFIX, '')); + return kebabCase(value.replace(RX_BV_PREFIX, "")); }; // Get a root event name by component/directive and event name // `getBaseEventName('BModal', 'show')` => 'bv::modal::show' - var getRootEventName = function getRootEventName(name, eventName) { - return [ROOT_EVENT_NAME_PREFIX, getBaseEventName(name), eventName].join(ROOT_EVENT_NAME_SEPARATOR); + return [ROOT_EVENT_NAME_PREFIX, getBaseEventName(name), eventName].join( + ROOT_EVENT_NAME_SEPARATOR + ); }; // Get a root action event name by component/directive and action name // `getRootActionEventName('BModal', 'show')` => 'bv::show::modal' var getRootActionEventName = function getRootActionEventName(name, actionName) { - return [ROOT_EVENT_NAME_PREFIX, actionName, getBaseEventName(name)].join(ROOT_EVENT_NAME_SEPARATOR); -};function ownKeys$w(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; } - -function _objectSpread$w(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$w(Object(source), true).forEach(function (key) { _defineProperty$C(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$w(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty$C(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; } + return [ROOT_EVENT_NAME_PREFIX, actionName, getBaseEventName(name)].join( + ROOT_EVENT_NAME_SEPARATOR + ); +}; +function ownKeys$w(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; +} + +function _objectSpread$w(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$w(Object(source), true).forEach(function (key) { + _defineProperty$C(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$w(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} + +function _defineProperty$C(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; +} var NO_FADE_PROPS = { - name: '', - enterClass: '', - enterActiveClass: '', - enterToClass: 'show', - leaveClass: 'show', - leaveActiveClass: '', - leaveToClass: '' + name: "", + enterClass: "", + enterActiveClass: "", + enterToClass: "show", + leaveClass: "show", + leaveActiveClass: "", + leaveToClass: "", }; -var FADE_PROPS = _objectSpread$w(_objectSpread$w({}, NO_FADE_PROPS), {}, { - enterActiveClass: 'fade', - leaveActiveClass: 'fade' -}); // --- Props --- - +var FADE_PROPS = _objectSpread$w( + _objectSpread$w({}, NO_FADE_PROPS), + {}, + { + enterActiveClass: "fade", + leaveActiveClass: "fade", + } +); // --- Props --- var props$Q = { // Has no effect if `trans-props` provided @@ -1212,18 +1875,18 @@ var props$Q = { // Has no effect if `trans-props` provided noFade: makeProp(PROP_TYPE_BOOLEAN, false), // For user supplied transitions (if needed) - transProps: makeProp(PROP_TYPE_OBJECT) + transProps: makeProp(PROP_TYPE_OBJECT), }; // --- Main component --- // @vue/component -var BVTransition = /*#__PURE__*/Vue__default["default"].extend({ +var BVTransition = /*#__PURE__*/ Vue__default["default"].extend({ name: NAME_TRANSITION, functional: true, props: props$Q, render: function render(h, _ref) { var children = _ref.children, - data = _ref.data, - props = _ref.props; + data = _ref.data, + props = _ref.props; var transProps = props.transProps; if (!isPlainObject(transProps)) { @@ -1231,89 +1894,108 @@ var BVTransition = /*#__PURE__*/Vue__default["default"].extend({ if (props.appear) { // Default the appear classes to equal the enter classes - transProps = _objectSpread$w(_objectSpread$w({}, transProps), {}, { - appear: true, - appearClass: transProps.enterClass, - appearActiveClass: transProps.enterActiveClass, - appearToClass: transProps.enterToClass - }); + transProps = _objectSpread$w( + _objectSpread$w({}, transProps), + {}, + { + appear: true, + appearClass: transProps.enterClass, + appearActiveClass: transProps.enterActiveClass, + appearToClass: transProps.enterToClass, + } + ); } } - transProps = _objectSpread$w(_objectSpread$w({ - mode: props.mode - }, transProps), {}, { - // We always need `css` true - css: true - }); - return h('transition', // Any transition event listeners will get merged here - a(data, { - props: transProps - }), children); - } -});// Math utilty functions + transProps = _objectSpread$w( + _objectSpread$w( + { + mode: props.mode, + }, + transProps + ), + {}, + { + // We always need `css` true + css: true, + } + ); + return h( + "transition", // Any transition event listeners will get merged here + a(data, { + props: transProps, + }), + children + ); + }, +}); // Math utilty functions var mathMin = Math.min; -var mathMax = Math.max;var ANCHOR_TAG = 'a'; // Method to replace reserved chars +var mathMax = Math.max; +var ANCHOR_TAG = "a"; // Method to replace reserved chars var encodeReserveReplacer = function encodeReserveReplacer(c) { - return '%' + c.charCodeAt(0).toString(16); + return "%" + c.charCodeAt(0).toString(16); }; // Fixed encodeURIComponent which is more conformant to RFC3986: // - escapes [!'()*] // - preserve commas - var encode = function encode(str) { - return encodeURIComponent(toString(str)).replace(RX_ENCODE_REVERSE, encodeReserveReplacer).replace(RX_ENCODED_COMMA, ','); + return encodeURIComponent(toString(str)) + .replace(RX_ENCODE_REVERSE, encodeReserveReplacer) + .replace(RX_ENCODED_COMMA, ","); }; // See: https://github.com/vuejs/vue-router/blob/dev/src/util/query.js var stringifyQueryObj = function stringifyQueryObj(obj) { if (!isPlainObject(obj)) { - return ''; - } - - var query = keys(obj).map(function (key) { - var value = obj[key]; - - if (isUndefined(value)) { - return ''; - } else if (isNull(value)) { - return encode(key); - } else if (isArray(value)) { - return value.reduce(function (results, value2) { - if (isNull(value2)) { - results.push(encode(key)); - } else if (!isUndefined(value2)) { - // Faster than string interpolation - results.push(encode(key) + '=' + encode(value2)); - } + return ""; + } - return results; - }, []).join('&'); - } // Faster than string interpolation + var query = keys(obj) + .map(function (key) { + var value = obj[key]; + + if (isUndefined(value)) { + return ""; + } else if (isNull(value)) { + return encode(key); + } else if (isArray(value)) { + return value + .reduce(function (results, value2) { + if (isNull(value2)) { + results.push(encode(key)); + } else if (!isUndefined(value2)) { + // Faster than string interpolation + results.push(encode(key) + "=" + encode(value2)); + } + return results; + }, []) + .join("&"); + } // Faster than string interpolation - return encode(key) + '=' + encode(value); - }) - /* must check for length, as we only want to filter empty strings, not things that look falsey! */ - .filter(function (x) { - return x.length > 0; - }).join('&'); - return query ? "?".concat(query) : ''; + return encode(key) + "=" + encode(value); + }) + /* must check for length, as we only want to filter empty strings, not things that look falsey! */ + .filter(function (x) { + return x.length > 0; + }) + .join("&"); + return query ? "?".concat(query) : ""; }; var isLink$1 = function isLink(props) { return !!(props.href || props.to); }; var isRouterLink = function isRouterLink(tag) { - return !!(tag && !isTag(tag, 'a')); + return !!(tag && !isTag(tag, "a")); }; var computeTag = function computeTag(_ref, thisOrParent) { var to = _ref.to, - disabled = _ref.disabled, - routerComponentName = _ref.routerComponentName; + disabled = _ref.disabled, + routerComponentName = _ref.routerComponentName; var hasRouter = !!thisOrParent.$router; - if (!hasRouter || hasRouter && (disabled || !to)) { + if (!hasRouter || (hasRouter && (disabled || !to))) { return ANCHOR_TAG; } // TODO: // Check registered components for existence of user supplied router link component name @@ -1324,24 +2006,32 @@ var computeTag = function computeTag(_ref, thisOrParent) { // And may want to cache the result for performance or we just let the render fail // if the component is not registered - - return routerComponentName || (thisOrParent.$nuxt ? 'nuxt-link' : 'router-link'); + return ( + routerComponentName || (thisOrParent.$nuxt ? "nuxt-link" : "router-link") + ); }; var computeRel = function computeRel() { - var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - target = _ref2.target, - rel = _ref2.rel; + var _ref2 = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + target = _ref2.target, + rel = _ref2.rel; - return target === '_blank' && isNull(rel) ? 'noopener' : rel || null; + return target === "_blank" && isNull(rel) ? "noopener" : rel || null; }; var computeHref = function computeHref() { - var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - href = _ref3.href, - to = _ref3.to; - - var tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ANCHOR_TAG; - var fallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '#'; - var toFallback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '/'; + var _ref3 = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + href = _ref3.href, + to = _ref3.to; + + var tag = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : ANCHOR_TAG; + var fallback = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "#"; + var toFallback = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "/"; // Return `href` when explicitly provided if (href) { @@ -1350,37 +2040,46 @@ var computeHref = function computeHref() { // When deferring to Vue Router's ``, don't use the `href` attribute at all // We return `null`, and then remove `href` from the attributes passed to `` - if (isRouterLink(tag)) { return null; } // Fallback to `to` prop (if `to` is a string) - if (isString(to)) { return to || toFallback; } // Fallback to `to.path' + `to.query` + `to.hash` prop (if `to` is an object) - if (isPlainObject(to) && (to.path || to.query || to.hash)) { var path = toString(to.path); var query = stringifyQueryObj(to.query); var hash = toString(to.hash); - hash = !hash || hash.charAt(0) === '#' ? hash : "#".concat(hash); + hash = !hash || hash.charAt(0) === "#" ? hash : "#".concat(hash); return "".concat(path).concat(query).concat(hash) || toFallback; } // If nothing is provided return the fallback - return fallback; -};function _defineProperty$B(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; } +}; +function _defineProperty$B(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; +} // Base attributes needed on all icons var BASE_ATTRS = { - viewBox: '0 0 16 16', - width: '1em', - height: '1em', - focusable: 'false', - role: 'img', - 'aria-label': 'icon' + viewBox: "0 0 16 16", + width: "1em", + height: "1em", + focusable: "false", + role: "img", + "aria-label": "icon", }; // Attributes that are nulled out when stacked var STACKED_ATTRS = { @@ -1388,7 +2087,7 @@ var STACKED_ATTRS = { height: null, focusable: null, role: null, - 'aria-label': null + "aria-label": null, }; // --- Props --- var props$P = { @@ -1403,12 +2102,12 @@ var props$P = { shiftV: makeProp(PROP_TYPE_NUMBER_STRING, 0), stacked: makeProp(PROP_TYPE_BOOLEAN, false), title: makeProp(PROP_TYPE_STRING), - variant: makeProp(PROP_TYPE_STRING) + variant: makeProp(PROP_TYPE_STRING), }; // --- Main component --- // Shared private base component to reduce bundle/runtime size // @vue/component -var BVIconBase = /*#__PURE__*/Vue__default["default"].extend({ +var BVIconBase = /*#__PURE__*/ Vue__default["default"].extend({ name: NAME_ICON_BASE, functional: true, props: props$P, @@ -1416,15 +2115,15 @@ var BVIconBase = /*#__PURE__*/Vue__default["default"].extend({ var _class; var data = _ref.data, - props = _ref.props, - children = _ref.children; + props = _ref.props, + children = _ref.children; var animation = props.animation, - content = props.content, - flipH = props.flipH, - flipV = props.flipV, - stacked = props.stacked, - title = props.title, - variant = props.variant; + content = props.content, + flipH = props.flipH, + flipV = props.flipV, + stacked = props.stacked, + title = props.title, + variant = props.variant; var fontScale = mathMax(toFloat(props.fontScale, 1), 0) || 1; var scale = mathMax(toFloat(props.scale, 1), 0) || 1; var rotate = toFloat(props.rotate, 0); @@ -1439,56 +2138,139 @@ var BVIconBase = /*#__PURE__*/Vue__default["default"].extend({ var hasTransforms = hasScale || rotate; var hasShift = shiftH || shiftV; var hasContent = !isUndefinedOrNull(content); - var transforms = [hasTransforms ? 'translate(8 8)' : null, hasScale ? "scale(".concat((flipH ? -1 : 1) * scale, " ").concat((flipV ? -1 : 1) * scale, ")") : null, rotate ? "rotate(".concat(rotate, ")") : null, hasTransforms ? 'translate(-8 -8)' : null].filter(identity); // We wrap the content in a `` for handling the transforms (except shift) - - var $inner = h('g', { - attrs: { - transform: transforms.join(' ') || null + var transforms = [ + hasTransforms ? "translate(8 8)" : null, + hasScale + ? "scale(" + .concat((flipH ? -1 : 1) * scale, " ") + .concat((flipV ? -1 : 1) * scale, ")") + : null, + rotate ? "rotate(".concat(rotate, ")") : null, + hasTransforms ? "translate(-8 -8)" : null, + ].filter(identity); // We wrap the content in a `` for handling the transforms (except shift) + + var $inner = h( + "g", + { + attrs: { + transform: transforms.join(" ") || null, + }, + domProps: hasContent + ? { + innerHTML: content || "", + } + : {}, }, - domProps: hasContent ? { - innerHTML: content || '' - } : {} - }, children); // If needed, we wrap in an additional `` in order to handle the shifting + children + ); // If needed, we wrap in an additional `` in order to handle the shifting if (hasShift) { - $inner = h('g', { - attrs: { - transform: "translate(".concat(16 * shiftH / 16, " ").concat(-16 * shiftV / 16, ")") - } - }, [$inner]); + $inner = h( + "g", + { + attrs: { + transform: "translate(" + .concat((16 * shiftH) / 16, " ") + .concat((-16 * shiftV) / 16, ")"), + }, + }, + [$inner] + ); } // Wrap in an additional `` for proper animation handling if stacked - if (stacked) { - $inner = h('g', [$inner]); + $inner = h("g", [$inner]); } - var $title = title ? h('title', title) : null; + var $title = title ? h("title", title) : null; var $content = [$title, $inner].filter(identity); - return h('svg', a({ - staticClass: 'b-icon bi', - class: (_class = {}, _defineProperty$B(_class, "text-".concat(variant), variant), _defineProperty$B(_class, "b-icon-animation-".concat(animation), animation), _class), - attrs: BASE_ATTRS, - style: stacked ? {} : { - fontSize: fontScale === 1 ? null : "".concat(fontScale * 100, "%") - } - }, // Merge in user supplied data - data, // If icon is stacked, null-out some attrs - stacked ? { - attrs: STACKED_ATTRS - } : {}, // These cannot be overridden by users - { - attrs: { - xmlns: stacked ? null : 'http://www.w3.org/2000/svg', - fill: 'currentColor' - } - }), $content); + return h( + "svg", + a( + { + staticClass: "b-icon bi", + class: + ((_class = {}), + _defineProperty$B(_class, "text-".concat(variant), variant), + _defineProperty$B( + _class, + "b-icon-animation-".concat(animation), + animation + ), + _class), + attrs: BASE_ATTRS, + style: stacked + ? {} + : { + fontSize: + fontScale === 1 ? null : "".concat(fontScale * 100, "%"), + }, + }, // Merge in user supplied data + data, // If icon is stacked, null-out some attrs + stacked + ? { + attrs: STACKED_ATTRS, + } + : {}, // These cannot be overridden by users + { + attrs: { + xmlns: stacked ? null : "http://www.w3.org/2000/svg", + fill: "currentColor", + }, + } + ), + $content + ); + }, +}); +function ownKeys$v(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); } -});function ownKeys$v(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; } + return keys; +} -function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$v(Object(source), true).forEach(function (key) { _defineProperty$A(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$v(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$v(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$v(Object(source), true).forEach(function (key) { + _defineProperty$A(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$v(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$A(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; } +function _defineProperty$A(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; +} /** * Icon component generator function * @@ -1503,52 +2285,137 @@ var makeIcon = function makeIcon(name, content) { var kebabName = kebabCase(name); var iconName = "BIcon".concat(pascalCase(name)); var iconNameClass = "bi-".concat(kebabName); - var iconTitle = kebabName.replace(/-/g, ' '); - var svgContent = trim(content || ''); - return /*#__PURE__*/Vue__default["default"].extend({ + var iconTitle = kebabName.replace(/-/g, " "); + var svgContent = trim(content || ""); + return /*#__PURE__*/ Vue__default["default"].extend({ name: iconName, functional: true, - props: omit(props$P, ['content']), + props: omit(props$P, ["content"]), render: function render(h, _ref) { var data = _ref.data, - props = _ref.props; - return h(BVIconBase, a( // Defaults - { - props: { - title: iconTitle - }, - attrs: { - 'aria-label': iconTitle - } - }, // User data - data, // Required data - { - staticClass: iconNameClass, - props: _objectSpread$v(_objectSpread$v({}, props), {}, { - content: svgContent - }) - })); - } + props = _ref.props; + return h( + BVIconBase, + a( + // Defaults + { + props: { + title: iconTitle, + }, + attrs: { + "aria-label": iconTitle, + }, + }, // User data + data, // Required data + { + staticClass: iconNameClass, + props: _objectSpread$v( + _objectSpread$v({}, props), + {}, + { + content: svgContent, + } + ), + } + ) + ); + }, }); -};// --- BEGIN AUTO-GENERATED FILE --- -var BIconBlank=/*#__PURE__*/makeIcon('Blank','');// --- Bootstrap Icons --- -var BIconCalendar=/*#__PURE__*/makeIcon('Calendar','');// eslint-disable-next-line -var BIconCalendarFill=/*#__PURE__*/makeIcon('CalendarFill','');// eslint-disable-next-line -var BIconChevronBarLeft=/*#__PURE__*/makeIcon('ChevronBarLeft','');// eslint-disable-next-line -var BIconChevronDoubleLeft=/*#__PURE__*/makeIcon('ChevronDoubleLeft','');// eslint-disable-next-line -var BIconChevronDown=/*#__PURE__*/makeIcon('ChevronDown','');// eslint-disable-next-line -var BIconChevronLeft=/*#__PURE__*/makeIcon('ChevronLeft','');// eslint-disable-next-line -var BIconCircleFill=/*#__PURE__*/makeIcon('CircleFill','');// eslint-disable-next-line -var BIconStar=/*#__PURE__*/makeIcon('Star','');// eslint-disable-next-line -var BIconStarFill=/*#__PURE__*/makeIcon('StarFill','');// eslint-disable-next-line -var BIconStarHalf=/*#__PURE__*/makeIcon('StarHalf','');// eslint-disable-next-line -var BIconX=/*#__PURE__*/makeIcon('X','');// eslint-disable-next-line +}; // --- BEGIN AUTO-GENERATED FILE --- +var BIconBlank = /*#__PURE__*/ makeIcon("Blank", ""); // --- Bootstrap Icons --- +var BIconCalendar = /*#__PURE__*/ makeIcon( + "Calendar", + '' +); // eslint-disable-next-line +var BIconCalendarFill = /*#__PURE__*/ makeIcon( + "CalendarFill", + '' +); // eslint-disable-next-line +var BIconChevronBarLeft = /*#__PURE__*/ makeIcon( + "ChevronBarLeft", + '' +); // eslint-disable-next-line +var BIconChevronDoubleLeft = /*#__PURE__*/ makeIcon( + "ChevronDoubleLeft", + '' +); // eslint-disable-next-line +var BIconChevronDown = /*#__PURE__*/ makeIcon( + "ChevronDown", + '' +); // eslint-disable-next-line +var BIconChevronLeft = /*#__PURE__*/ makeIcon( + "ChevronLeft", + '' +); // eslint-disable-next-line +var BIconCircleFill = /*#__PURE__*/ makeIcon( + "CircleFill", + '' +); // eslint-disable-next-line +var BIconStar = /*#__PURE__*/ makeIcon( + "Star", + '' +); // eslint-disable-next-line +var BIconStarFill = /*#__PURE__*/ makeIcon( + "StarFill", + '' +); // eslint-disable-next-line +var BIconStarHalf = /*#__PURE__*/ makeIcon( + "StarHalf", + '' +); // eslint-disable-next-line +var BIconX = /*#__PURE__*/ makeIcon( + "X", + '' +); // eslint-disable-next-line // --- END AUTO-GENERATED FILE --- -function ownKeys$u(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; } +function ownKeys$u(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; +} -function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$u(Object(source), true).forEach(function (key) { _defineProperty$z(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$u(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$u(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$u(Object(source), true).forEach(function (key) { + _defineProperty$z(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$u(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$z(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; } +function _defineProperty$z(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; +} var findIconComponent = function findIconComponent(ctx, iconName) { if (!ctx) { @@ -1560,32 +2427,46 @@ var findIconComponent = function findIconComponent(ctx, iconName) { return iconComponent || findIconComponent(ctx.$parent, iconName); }; // --- Props --- - -var iconProps = omit(props$P, ['content']); -var props$O = makePropsConfigurable(sortKeys(_objectSpread$u(_objectSpread$u({}, iconProps), {}, { - icon: makeProp(PROP_TYPE_STRING) -})), NAME_ICON); // --- Main component --- +var iconProps = omit(props$P, ["content"]); +var props$O = makePropsConfigurable( + sortKeys( + _objectSpread$u( + _objectSpread$u({}, iconProps), + {}, + { + icon: makeProp(PROP_TYPE_STRING), + } + ) + ), + NAME_ICON +); // --- Main component --- // Helper BIcon component // Requires the requested icon component to be installed // @vue/component -var BIcon = /*#__PURE__*/Vue__default["default"].extend({ +var BIcon = /*#__PURE__*/ Vue__default["default"].extend({ name: NAME_ICON, functional: true, props: props$O, render: function render(h, _ref) { var data = _ref.data, - props = _ref.props, - parent = _ref.parent; - var icon = pascalCase(trim(props.icon || '')).replace(RX_ICON_PREFIX, ''); // If parent context exists, we check to see if the icon has been registered + props = _ref.props, + parent = _ref.parent; + var icon = pascalCase(trim(props.icon || "")).replace(RX_ICON_PREFIX, ""); // If parent context exists, we check to see if the icon has been registered // either locally in the parent component, or globally at the `$root` level // If not registered, we render a blank icon - return h(icon ? findIconComponent(parent, "BIcon".concat(icon)) || BIconBlank : BIconBlank, a(data, { - props: pluckProps(iconProps, props) - })); - } -});var CODE_DOWN = 40; + return h( + icon + ? findIconComponent(parent, "BIcon".concat(icon)) || BIconBlank + : BIconBlank, + a(data, { + props: pluckProps(iconProps, props), + }) + ); + }, +}); +var CODE_DOWN = 40; var CODE_END = 35; var CODE_ENTER = 13; var CODE_ESC = 27; @@ -1595,7 +2476,7 @@ var CODE_PAGEDOWN = 34; var CODE_PAGEUP = 33; var CODE_RIGHT = 39; var CODE_SPACE = 32; -var CODE_UP = 38;// Handles when arrays are "sparse" (array.every(...) doesn't handle sparse) +var CODE_UP = 38; // Handles when arrays are "sparse" (array.every(...) doesn't handle sparse) var compareArrays = function compareArrays(a, b) { if (a.length !== b.length) { @@ -1616,7 +2497,6 @@ var compareArrays = function compareArrays(a, b) { * Returns boolean true or false */ - var looseEqual = function looseEqual(a, b) { if (a === b) { return true; @@ -1656,14 +2536,31 @@ var looseEqual = function looseEqual(a, b) { var aHasKey = hasOwnProperty(a, key); var bHasKey = hasOwnProperty(b, key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + if ( + (aHasKey && !bHasKey) || + (!aHasKey && bHasKey) || + !looseEqual(a[key], b[key]) + ) { return false; } } } return String(a) === String(b); -};function _defineProperty$y(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; } +}; +function _defineProperty$y(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; +} var isEmpty = function isEmpty(value) { return !value || keys(value).length === 0; @@ -1690,7 +2587,7 @@ var makePropWatcher = function makePropWatcher(propName) { for (var _key in newValue) { this.$set(this.$data[propName], _key, newValue[_key]); } - } + }, }; }; var makePropCacheMixin = function makePropCacheMixin(propName, proxyPropName) { @@ -1698,9 +2595,11 @@ var makePropCacheMixin = function makePropCacheMixin(propName, proxyPropName) { data: function data() { return _defineProperty$y({}, proxyPropName, cloneDeep(this[propName])); }, - watch: _defineProperty$y({}, propName, makePropWatcher(proxyPropName)) + watch: _defineProperty$y({}, propName, makePropWatcher(proxyPropName)), }); -};var attrsMixin = makePropCacheMixin('$attrs', 'bvAttrs');var listenOnRootMixin = Vue__default["default"].extend({ +}; +var attrsMixin = makePropCacheMixin("$attrs", "bvAttrs"); +var listenOnRootMixin = Vue__default["default"].extend({ methods: { /** * Safely register event listeners on the root Vue node @@ -1757,32 +2656,113 @@ var makePropCacheMixin = function makePropCacheMixin(propName, proxyPropName) { emitOnRoot: function emitOnRoot(event) { var _this$$root; - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + for ( + var _len = arguments.length, + args = new Array(_len > 1 ? _len - 1 : 0), + _key = 1; + _key < _len; + _key++ + ) { args[_key - 1] = arguments[_key]; } (_this$$root = this.$root).$emit.apply(_this$$root, [event].concat(args)); - } - } -});var listenersMixin = makePropCacheMixin('$listeners', 'bvListeners');function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$3(); } + }, + }, +}); +var listenersMixin = makePropCacheMixin("$listeners", "bvListeners"); +function _toConsumableArray$3(arr) { + return ( + _arrayWithoutHoles$3(arr) || + _iterableToArray$3(arr) || + _unsupportedIterableToArray$4(arr) || + _nonIterableSpread$3() + ); +} -function _nonIterableSpread$3() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _nonIterableSpread$3() { + throw new TypeError( + "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); +} -function _unsupportedIterableToArray$4(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$4(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$4(o, minLen); } +function _unsupportedIterableToArray$4(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$4(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$4(o, minLen); +} -function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } +function _iterableToArray$3(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) + return Array.from(iter); +} -function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); } +function _arrayWithoutHoles$3(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); +} -function _arrayLikeToArray$4(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; } +function _arrayLikeToArray$4(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; +} -function ownKeys$t(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; } +function ownKeys$t(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; +} -function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$t(Object(source), true).forEach(function (key) { _defineProperty$x(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$t(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$t(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$t(Object(source), true).forEach(function (key) { + _defineProperty$x(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$t(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$x(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; } +function _defineProperty$x(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; +} -var ROOT_EVENT_NAME_CLICKED = getRootEventName(NAME_LINK, 'clicked'); // --- Props --- +var ROOT_EVENT_NAME_CLICKED = getRootEventName(NAME_LINK, "clicked"); // --- Props --- // `` specific props var routerLinkProps = { @@ -1792,8 +2772,8 @@ var routerLinkProps = { exact: makeProp(PROP_TYPE_BOOLEAN, false), exactActiveClass: makeProp(PROP_TYPE_STRING), replace: makeProp(PROP_TYPE_BOOLEAN, false), - routerTag: makeProp(PROP_TYPE_STRING, 'a'), - to: makeProp(PROP_TYPE_OBJECT_STRING) + routerTag: makeProp(PROP_TYPE_STRING, "a"), + to: makeProp(PROP_TYPE_OBJECT_STRING), }; // `` specific props var nuxtLinkProps = { @@ -1804,25 +2784,34 @@ var nuxtLinkProps = { // compiled default // Vue treats `undefined` as default of `false` for Boolean props, // so we must set it as `null` here to be a true tri-state prop - prefetch: makeProp(PROP_TYPE_BOOLEAN, null) + prefetch: makeProp(PROP_TYPE_BOOLEAN, null), }; // All `` props -var props$N = makePropsConfigurable(sortKeys(_objectSpread$t(_objectSpread$t(_objectSpread$t({}, nuxtLinkProps), routerLinkProps), {}, { - active: makeProp(PROP_TYPE_BOOLEAN, false), - disabled: makeProp(PROP_TYPE_BOOLEAN, false), - href: makeProp(PROP_TYPE_STRING), - // Must be `null` if no value provided - rel: makeProp(PROP_TYPE_STRING, null), - // To support 3rd party router links based on `` (i.e. `g-link` for Gridsome) - // Default is to auto choose between `` and `` - // Gridsome doesn't provide a mechanism to auto detect and has caveats - // such as not supporting FQDN URLs or hash only URLs - routerComponentName: makeProp(PROP_TYPE_STRING), - target: makeProp(PROP_TYPE_STRING, '_self') -})), NAME_LINK); // --- Main component --- +var props$N = makePropsConfigurable( + sortKeys( + _objectSpread$t( + _objectSpread$t(_objectSpread$t({}, nuxtLinkProps), routerLinkProps), + {}, + { + active: makeProp(PROP_TYPE_BOOLEAN, false), + disabled: makeProp(PROP_TYPE_BOOLEAN, false), + href: makeProp(PROP_TYPE_STRING), + // Must be `null` if no value provided + rel: makeProp(PROP_TYPE_STRING, null), + // To support 3rd party router links based on `` (i.e. `g-link` for Gridsome) + // Default is to auto choose between `` and `` + // Gridsome doesn't provide a mechanism to auto detect and has caveats + // such as not supporting FQDN URLs or hash only URLs + routerComponentName: makeProp(PROP_TYPE_STRING), + target: makeProp(PROP_TYPE_STRING, "_self"), + } + ) + ), + NAME_LINK +); // --- Main component --- // @vue/component -var BLink = /*#__PURE__*/Vue__default["default"].extend({ +var BLink = /*#__PURE__*/ Vue__default["default"].extend({ name: NAME_LINK, // Mixin order is important! mixins: [attrsMixin, listenersMixin, listenOnRootMixin, normalizeSlotMixin], @@ -1832,13 +2821,16 @@ var BLink = /*#__PURE__*/Vue__default["default"].extend({ computedTag: function computedTag() { // We don't pass `this` as the first arg as we need reactivity of the props var to = this.to, - disabled = this.disabled, - routerComponentName = this.routerComponentName; - return computeTag({ - to: to, - disabled: disabled, - routerComponentName: routerComponentName - }, this); + disabled = this.disabled, + routerComponentName = this.routerComponentName; + return computeTag( + { + to: to, + disabled: disabled, + routerComponentName: routerComponentName, + }, + this + ); }, isRouterLink: function isRouterLink$1() { return isRouterLink(this.computedTag); @@ -1846,55 +2838,95 @@ var BLink = /*#__PURE__*/Vue__default["default"].extend({ computedRel: function computedRel() { // We don't pass `this` as the first arg as we need reactivity of the props var target = this.target, - rel = this.rel; + rel = this.rel; return computeRel({ target: target, - rel: rel + rel: rel, }); }, computedHref: function computedHref() { // We don't pass `this` as the first arg as we need reactivity of the props var to = this.to, - href = this.href; - return computeHref({ - to: to, - href: href - }, this.computedTag); + href = this.href; + return computeHref( + { + to: to, + href: href, + }, + this.computedTag + ); }, computedProps: function computedProps() { var prefetch = this.prefetch; - return this.isRouterLink ? _objectSpread$t(_objectSpread$t({}, pluckProps(_objectSpread$t(_objectSpread$t({}, routerLinkProps), nuxtLinkProps), this)), {}, { - // Coerce `prefetch` value `null` to be `undefined` - prefetch: isBoolean(prefetch) ? prefetch : undefined, - // Pass `router-tag` as `tag` prop - tag: this.routerTag - }) : {}; + return this.isRouterLink + ? _objectSpread$t( + _objectSpread$t( + {}, + pluckProps( + _objectSpread$t( + _objectSpread$t({}, routerLinkProps), + nuxtLinkProps + ), + this + ) + ), + {}, + { + // Coerce `prefetch` value `null` to be `undefined` + prefetch: isBoolean(prefetch) ? prefetch : undefined, + // Pass `router-tag` as `tag` prop + tag: this.routerTag, + } + ) + : {}; }, computedAttrs: function computedAttrs() { var bvAttrs = this.bvAttrs, - href = this.computedHref, - rel = this.computedRel, - disabled = this.disabled, - target = this.target, - routerTag = this.routerTag, - isRouterLink = this.isRouterLink; - return _objectSpread$t(_objectSpread$t(_objectSpread$t(_objectSpread$t({}, bvAttrs), href ? { - href: href - } : {}), isRouterLink && !isTag(routerTag, 'a') ? {} : { - rel: rel, - target: target - }), {}, { - tabindex: disabled ? '-1' : isUndefined(bvAttrs.tabindex) ? null : bvAttrs.tabindex, - 'aria-disabled': disabled ? 'true' : null - }); + href = this.computedHref, + rel = this.computedRel, + disabled = this.disabled, + target = this.target, + routerTag = this.routerTag, + isRouterLink = this.isRouterLink; + return _objectSpread$t( + _objectSpread$t( + _objectSpread$t( + _objectSpread$t({}, bvAttrs), + href + ? { + href: href, + } + : {} + ), + isRouterLink && !isTag(routerTag, "a") + ? {} + : { + rel: rel, + target: target, + } + ), + {}, + { + tabindex: disabled + ? "-1" + : isUndefined(bvAttrs.tabindex) + ? null + : bvAttrs.tabindex, + "aria-disabled": disabled ? "true" : null, + } + ); }, computedListeners: function computedListeners() { - return _objectSpread$t(_objectSpread$t({}, this.bvListeners), {}, { - // We want to overwrite any click handler since our callback - // will invoke the user supplied handler(s) if `!this.disabled` - click: this.onClick - }); - } + return _objectSpread$t( + _objectSpread$t({}, this.bvListeners), + {}, + { + // We want to overwrite any click handler since our callback + // will invoke the user supplied handler(s) if `!this.disabled` + click: this.onClick, + } + ); + }, }, methods: { onClick: function onClick(event) { @@ -1908,7 +2940,7 @@ var BLink = /*#__PURE__*/Vue__default["default"].extend({ // Kill the event loop attached to this specific `EventTarget` // Needed to prevent `vue-router` for doing its thing stopEvent(event, { - immediatePropagation: true + immediatePropagation: true, }); } else { /* istanbul ignore next: difficult to test, but we know it works */ @@ -1918,23 +2950,23 @@ var BLink = /*#__PURE__*/Vue__default["default"].extend({ event.currentTarget.__vue__.$emit(EVENT_NAME_CLICK, event); } // Call the suppliedHandler(s), if any provided - - concat(suppliedHandler).filter(function (h) { - return isFunction$1(h); - }).forEach(function (handler) { - handler.apply(void 0, _toConsumableArray$3(_arguments)); - }); // Emit the global `$root` click event + concat(suppliedHandler) + .filter(function (h) { + return isFunction$1(h); + }) + .forEach(function (handler) { + handler.apply(void 0, _toConsumableArray$3(_arguments)); + }); // Emit the global `$root` click event this.emitOnRoot(ROOT_EVENT_NAME_CLICKED, event); // TODO: Remove deprecated 'clicked::link' event with next major release - this.emitOnRoot('clicked::link', event); + this.emitOnRoot("clicked::link", event); } // Stop scroll-to-top behavior or navigation on // regular links when href is just '#' - - if (eventIsEvent && !isRouterLink && this.computedHref === '#') { + if (eventIsEvent && !isRouterLink && this.computedHref === "#") { stopEvent(event, { - propagation: false + propagation: false, }); } }, @@ -1943,98 +2975,162 @@ var BLink = /*#__PURE__*/Vue__default["default"].extend({ }, blur: function blur() { attemptBlur(this.$el); - } + }, }, render: function render(h) { var active = this.active, - disabled = this.disabled; - return h(this.computedTag, _defineProperty$x({ - class: { - active: active, - disabled: disabled - }, - attrs: this.computedAttrs, - props: this.computedProps - }, this.isRouterLink ? 'nativeOn' : 'on', this.computedListeners), this.normalizeSlot()); + disabled = this.disabled; + return h( + this.computedTag, + _defineProperty$x( + { + class: { + active: active, + disabled: disabled, + }, + attrs: this.computedAttrs, + props: this.computedProps, + }, + this.isRouterLink ? "nativeOn" : "on", + this.computedListeners + ), + this.normalizeSlot() + ); + }, +}); +function ownKeys$s(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); } -});function ownKeys$s(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; } + return keys; +} -function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$s(Object(source), true).forEach(function (key) { _defineProperty$w(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$s(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$s(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$s(Object(source), true).forEach(function (key) { + _defineProperty$w(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$s(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$w(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; } +function _defineProperty$w(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; +} -var linkProps = omit(props$N, ['event', 'routerTag']); +var linkProps = omit(props$N, ["event", "routerTag"]); delete linkProps.href.default; delete linkProps.to.default; -var props$M = makePropsConfigurable(sortKeys(_objectSpread$s(_objectSpread$s({}, linkProps), {}, { - block: makeProp(PROP_TYPE_BOOLEAN, false), - disabled: makeProp(PROP_TYPE_BOOLEAN, false), - pill: makeProp(PROP_TYPE_BOOLEAN, false), - // Tri-state: `true`, `false` or `null` - // => On, off, not a toggle - pressed: makeProp(PROP_TYPE_BOOLEAN, null), - size: makeProp(PROP_TYPE_STRING), - squared: makeProp(PROP_TYPE_BOOLEAN, false), - tag: makeProp(PROP_TYPE_STRING, 'button'), - type: makeProp(PROP_TYPE_STRING, 'button'), - variant: makeProp(PROP_TYPE_STRING, 'secondary') -})), NAME_BUTTON); // --- Helper methods --- +var props$M = makePropsConfigurable( + sortKeys( + _objectSpread$s( + _objectSpread$s({}, linkProps), + {}, + { + block: makeProp(PROP_TYPE_BOOLEAN, false), + disabled: makeProp(PROP_TYPE_BOOLEAN, false), + pill: makeProp(PROP_TYPE_BOOLEAN, false), + // Tri-state: `true`, `false` or `null` + // => On, off, not a toggle + pressed: makeProp(PROP_TYPE_BOOLEAN, null), + size: makeProp(PROP_TYPE_STRING), + squared: makeProp(PROP_TYPE_BOOLEAN, false), + tag: makeProp(PROP_TYPE_STRING, "button"), + type: makeProp(PROP_TYPE_STRING, "button"), + variant: makeProp(PROP_TYPE_STRING, "secondary"), + } + ) + ), + NAME_BUTTON +); // --- Helper methods --- // Focus handler for toggle buttons // Needs class of 'focus' when focused var handleFocus = function handleFocus(event) { - if (event.type === 'focusin') { - addClass(event.target, 'focus'); - } else if (event.type === 'focusout') { - removeClass(event.target, 'focus'); + if (event.type === "focusin") { + addClass(event.target, "focus"); + } else if (event.type === "focusout") { + removeClass(event.target, "focus"); } }; // Is the requested button a link? // If tag prop is set to `a`, we use a to get proper disabled handling - var isLink = function isLink(props) { - return isLink$1(props) || isTag(props.tag, 'a'); + return isLink$1(props) || isTag(props.tag, "a"); }; // Is the button to be a toggle button? - var isToggle = function isToggle(props) { return isBoolean(props.pressed); }; // Is the button "really" a button? - var isButton = function isButton(props) { - return !(isLink(props) || props.tag && !isTag(props.tag, 'button')); + return !(isLink(props) || (props.tag && !isTag(props.tag, "button"))); }; // Is the requested tag not a button or link? - var isNonStandardTag = function isNonStandardTag(props) { return !isLink(props) && !isButton(props); }; // Compute required classes (non static classes) - var computeClass = function computeClass(props) { var _ref; - return ["btn-".concat(props.variant || 'secondary'), (_ref = {}, _defineProperty$w(_ref, "btn-".concat(props.size), props.size), _defineProperty$w(_ref, 'btn-block', props.block), _defineProperty$w(_ref, 'rounded-pill', props.pill), _defineProperty$w(_ref, 'rounded-0', props.squared && !props.pill), _defineProperty$w(_ref, "disabled", props.disabled), _defineProperty$w(_ref, "active", props.pressed), _ref)]; + return [ + "btn-".concat(props.variant || "secondary"), + ((_ref = {}), + _defineProperty$w(_ref, "btn-".concat(props.size), props.size), + _defineProperty$w(_ref, "btn-block", props.block), + _defineProperty$w(_ref, "rounded-pill", props.pill), + _defineProperty$w(_ref, "rounded-0", props.squared && !props.pill), + _defineProperty$w(_ref, "disabled", props.disabled), + _defineProperty$w(_ref, "active", props.pressed), + _ref), + ]; }; // Compute the link props to pass to b-link (if required) - var computeLinkProps = function computeLinkProps(props) { return isLink(props) ? pluckProps(linkProps, props) : {}; }; // Compute the attributes for a button - var computeAttrs = function computeAttrs(props, data) { var button = isButton(props); var link = isLink(props); var toggle = isToggle(props); var nonStandardTag = isNonStandardTag(props); - var hashLink = link && props.href === '#'; + var hashLink = link && props.href === "#"; var role = data.attrs && data.attrs.role ? data.attrs.role : null; var tabindex = data.attrs ? data.attrs.tabindex : null; if (nonStandardTag || hashLink) { - tabindex = '0'; + tabindex = "0"; } return { @@ -2045,37 +3141,36 @@ var computeAttrs = function computeAttrs(props, data) { // We add a role of button when the tag is not a link or button for ARIA // Don't bork any role provided in `data.attrs` when `isLink` or `isButton` // Except when link has `href` of `#` - role: nonStandardTag || hashLink ? 'button' : role, + role: nonStandardTag || hashLink ? "button" : role, // We set the `aria-disabled` state for non-standard tags - 'aria-disabled': nonStandardTag ? String(props.disabled) : null, + "aria-disabled": nonStandardTag ? String(props.disabled) : null, // For toggles, we need to set the pressed state for ARIA - 'aria-pressed': toggle ? String(props.pressed) : null, + "aria-pressed": toggle ? String(props.pressed) : null, // `autocomplete="off"` is needed in toggle mode to prevent some browsers // from remembering the previous setting when using the back button - autocomplete: toggle ? 'off' : null, + autocomplete: toggle ? "off" : null, // `tabindex` is used when the component is not a button // Links are tabbable, but don't allow disabled, while non buttons or links // are not tabbable, so we mimic that functionality by disabling tabbing // when disabled, and adding a `tabindex="0"` to non buttons or non links - tabindex: props.disabled && !button ? '-1' : tabindex + tabindex: props.disabled && !button ? "-1" : tabindex, }; }; // --- Main component --- // @vue/component - -var BButton = /*#__PURE__*/Vue__default["default"].extend({ +var BButton = /*#__PURE__*/ Vue__default["default"].extend({ name: NAME_BUTTON, functional: true, props: props$M, render: function render(h, _ref2) { var props = _ref2.props, - data = _ref2.data, - listeners = _ref2.listeners, - children = _ref2.children; + data = _ref2.data, + listeners = _ref2.listeners, + children = _ref2.children; var toggle = isToggle(props); var link = isLink(props); var nonStandardTag = isNonStandardTag(props); - var hashLink = link && props.href === '#'; + var hashLink = link && props.href === "#"; var on = { keydown: function keydown(event) { // When the link is a `href="#"` or a non-standard tag (has `role="button"`), @@ -2088,10 +3183,13 @@ var BButton = /*#__PURE__*/Vue__default["default"].extend({ var keyCode = event.keyCode; // Add CODE_SPACE handler for `href="#"` and CODE_ENTER handler for non-standard tags - if (keyCode === CODE_SPACE || keyCode === CODE_ENTER && nonStandardTag) { + if ( + keyCode === CODE_SPACE || + (keyCode === CODE_ENTER && nonStandardTag) + ) { var target = event.currentTarget || event.target; stopEvent(event, { - propagation: false + propagation: false, }); target.click(); } @@ -2100,17 +3198,17 @@ var BButton = /*#__PURE__*/Vue__default["default"].extend({ /* istanbul ignore if: blink/button disabled should handle this */ if (props.disabled && isEvent(event)) { stopEvent(event); - } else if (toggle && listeners && listeners['update:pressed']) { + } else if (toggle && listeners && listeners["update:pressed"]) { // Send `.sync` updates to any "pressed" prop (if `.sync` listeners) // `concat()` will normalize the value to an array without // double wrapping an array value in an array - concat(listeners['update:pressed']).forEach(function (fn) { + concat(listeners["update:pressed"]).forEach(function (fn) { if (isFunction$1(fn)) { fn(!props.pressed); } }); } - } + }, }; if (toggle) { @@ -2119,51 +3217,149 @@ var BButton = /*#__PURE__*/Vue__default["default"].extend({ } var componentData = { - staticClass: 'btn', + staticClass: "btn", class: computeClass(props), props: computeLinkProps(props), attrs: computeAttrs(props, data), - on: on + on: on, }; return h(link ? BLink : props.tag, a(data, componentData), children); - } -});var stripTags = function stripTags() { - var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - return String(text).replace(RX_HTML_TAGS, ''); + }, +}); +var stripTags = function stripTags() { + var text = + arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; + return String(text).replace(RX_HTML_TAGS, ""); }; // Generate a `domProps` object for either `innerHTML`, `textContent` or an empty object var htmlOrText = function htmlOrText(innerHTML, textContent) { - return innerHTML ? { - innerHTML: innerHTML - } : textContent ? { - textContent: textContent - } : {}; -};var CALENDAR_GREGORY = 'gregory'; -var CALENDAR_LONG = 'long'; -var CALENDAR_NARROW = 'narrow'; -var CALENDAR_SHORT = 'short'; -var DATE_FORMAT_2_DIGIT = '2-digit'; -var DATE_FORMAT_NUMERIC = 'numeric';function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest(); } + return innerHTML + ? { + innerHTML: innerHTML, + } + : textContent + ? { + textContent: textContent, + } + : {}; +}; +var CALENDAR_GREGORY = "gregory"; +var CALENDAR_LONG = "long"; +var CALENDAR_NARROW = "narrow"; +var CALENDAR_SHORT = "short"; +var DATE_FORMAT_2_DIGIT = "2-digit"; +var DATE_FORMAT_NUMERIC = "numeric"; +function _slicedToArray(arr, i) { + return ( + _arrayWithHoles(arr) || + _iterableToArrayLimit(arr, i) || + _unsupportedIterableToArray$3(arr, i) || + _nonIterableRest() + ); +} -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _nonIterableRest() { + throw new TypeError( + "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." + ); +} -function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(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$3(o, minLen); } +function _unsupportedIterableToArray$3(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray$3(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$3(o, minLen); +} -function _arrayLikeToArray$3(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; } +function _arrayLikeToArray$3(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; +} -function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) + return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + try { + for ( + var _i = arr[Symbol.iterator](), _s; + !(_n = (_s = _i.next()).done); + _n = true + ) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; +} -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} -function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } +function _construct(Parent, args, Class) { + if (_isNativeReflectConstruct()) { + _construct = Reflect.construct; + } else { + _construct = function _construct(Parent, args, Class) { + var a = [null]; + a.push.apply(a, args); + var Constructor = Function.bind.apply(Parent, a); + var instance = new Constructor(); + if (Class) _setPrototypeOf(instance, Class.prototype); + return instance; + }; + } + return _construct.apply(null, arguments); +} -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); + return true; + } catch (e) { + return false; + } +} -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function _setPrototypeOf(o, p) { + _setPrototypeOf = + Object.setPrototypeOf || + function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); +} // Create or clone a date (`new Date(...)` shortcut) var createDate = function createDate() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + for ( + var _len = arguments.length, args = new Array(_len), _key = 0; + _key < _len; + _key++ + ) { args[_key] = arguments[_key]; } @@ -2173,12 +3369,12 @@ var createDate = function createDate() { var parseYMD = function parseYMD(date) { if (isString(date) && RX_DATE.test(date.trim())) { var _date$split$map = date.split(RX_DATE_SPLIT).map(function (v) { - return toInteger(v, 1); - }), - _date$split$map2 = _slicedToArray(_date$split$map, 3), - year = _date$split$map2[0], - month = _date$split$map2[1], - day = _date$split$map2[2]; + return toInteger(v, 1); + }), + _date$split$map2 = _slicedToArray(_date$split$map, 3), + year = _date$split$map2[0], + month = _date$split$map2[1], + day = _date$split$map2[2]; return createDate(year, month - 1, day); } else if (isDate(date)) { @@ -2201,19 +3397,23 @@ var formatYMD = function formatYMD(date) { return "".concat(year, "-").concat(month, "-").concat(day); }; // Given a locale (or locales), resolve the browser available locale -var resolveLocale = function resolveLocale(locales) -/* istanbul ignore next */ +var resolveLocale = function resolveLocale(locales) /* istanbul ignore next */ { - var calendar = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CALENDAR_GREGORY; + var calendar = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : CALENDAR_GREGORY; locales = concat(locales).filter(identity); var fmt = new Intl.DateTimeFormat(locales, { - calendar: calendar + calendar: calendar, }); return fmt.resolvedOptions().locale; }; // Create a `Intl.DateTimeFormat` formatter function -var createDateFormatter = function createDateFormatter(locale, options) -/* istanbul ignore next */ +var createDateFormatter = function createDateFormatter( + locale, + options +) /* istanbul ignore next */ { var dtf = new Intl.DateTimeFormat(locale, options); return dtf.format; @@ -2284,30 +3484,50 @@ var oneDecadeAhead = function oneDecadeAhead(date) { // Always returns a `Date` object or `null` if no date passed var constrainDate = function constrainDate(date) { - var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var min = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var max = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; // Ensure values are `Date` objects (or `null`) date = parseYMD(date); min = parseYMD(min) || date; max = parseYMD(max) || date; // Return a new `Date` object (or `null`) - return date ? date < min ? min : date > max ? max : date : null; -};// Localization utilities - -var RTL_LANGS = ['ar', 'az', 'ckb', 'fa', 'he', 'ks', 'lrc', 'mzn', 'ps', 'sd', 'te', 'ug', 'ur', 'yi'].map(function (locale) { + return date ? (date < min ? min : date > max ? max : date) : null; +}; // Localization utilities + +var RTL_LANGS = [ + "ar", + "az", + "ckb", + "fa", + "he", + "ks", + "lrc", + "mzn", + "ps", + "sd", + "te", + "ug", + "ur", + "yi", +].map(function (locale) { return locale.toLowerCase(); }); // Returns true if the locale is RTL var isLocaleRTL = function isLocaleRTL(locale) { // Determines if the locale is RTL (only single locale supported) - var parts = toString(locale).toLowerCase().replace(RX_STRIP_LOCALE_MODS, '').split('-'); - var locale1 = parts.slice(0, 2).join('-'); + var parts = toString(locale) + .toLowerCase() + .replace(RX_STRIP_LOCALE_MODS, "") + .split("-"); + var locale1 = parts.slice(0, 2).join("-"); var locale2 = parts[0]; return arrayIncludes(RTL_LANGS, locale1) || arrayIncludes(RTL_LANGS, locale2); -};// SSR safe client-side ID attribute generation +}; // SSR safe client-side ID attribute generation var props$L = { - id: makeProp(PROP_TYPE_STRING) + id: makeProp(PROP_TYPE_STRING), }; // --- Mixin --- // @vue/component @@ -2315,7 +3535,7 @@ var idMixin = Vue__default["default"].extend({ props: props$L, data: function data() { return { - localId_: null + localId_: null, }; }, computed: { @@ -2331,12 +3551,12 @@ var idMixin = Vue__default["default"].extend({ return null; } - suffix = String(suffix || '').replace(/\s+/g, '_'); - return suffix ? id + '_' + suffix : id; + suffix = String(suffix || "").replace(/\s+/g, "_"); + return suffix ? id + "_" + suffix : id; }; return fn; - } + }, }, mounted: function mounted() { var _this = this; @@ -2347,104 +3567,166 @@ var idMixin = Vue__default["default"].extend({ // to prevent SSR hydration errors _this.localId_ = "__BVID__".concat(_this[COMPONENT_UID_KEY]); }); - } -});var _watch$5; - -function ownKeys$r(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; } - -function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$r(Object(source), true).forEach(function (key) { _defineProperty$v(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + }, +}); +var _watch$5; -function _defineProperty$v(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; } +function ownKeys$r(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; +} -var _makeModelMixin$6 = makeModelMixin('value', { - type: PROP_TYPE_DATE_STRING -}), - modelMixin$5 = _makeModelMixin$6.mixin, - modelProps$5 = _makeModelMixin$6.props, - MODEL_PROP_NAME$5 = _makeModelMixin$6.prop, - MODEL_EVENT_NAME$5 = _makeModelMixin$6.event; // --- Props --- +function _objectSpread$r(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$r(Object(source), true).forEach(function (key) { + _defineProperty$v(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$r(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} +function _defineProperty$v(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; +} -var props$K = makePropsConfigurable(sortKeys(_objectSpread$r(_objectSpread$r(_objectSpread$r({}, props$L), modelProps$5), {}, { - ariaControls: makeProp(PROP_TYPE_STRING), - // Makes calendar the full width of its parent container - block: makeProp(PROP_TYPE_BOOLEAN, false), - dateDisabledFn: makeProp(PROP_TYPE_FUNCTION), - // `Intl.DateTimeFormat` object - dateFormatOptions: makeProp(PROP_TYPE_OBJECT, { - year: DATE_FORMAT_NUMERIC, - month: CALENDAR_LONG, - day: DATE_FORMAT_NUMERIC, - weekday: CALENDAR_LONG - }), - // Function to set a class of (classes) on the date cell - // if passed a string or an array - // TODO: - // If the function returns an object, look for class prop for classes, - // and other props for handling events/details/descriptions - dateInfoFn: makeProp(PROP_TYPE_FUNCTION), - // 'ltr', 'rtl', or `null` (for auto detect) - direction: makeProp(PROP_TYPE_STRING), - disabled: makeProp(PROP_TYPE_BOOLEAN, false), - // When `true`, renders a comment node, but keeps the component instance active - // Mainly for , so that we can get the component's value and locale - // But we might just use separate date formatters, using the resolved locale - // (adjusted for the gregorian calendar) - hidden: makeProp(PROP_TYPE_BOOLEAN, false), - // When `true` makes the selected date header `sr-only` - hideHeader: makeProp(PROP_TYPE_BOOLEAN, false), - // This specifies the calendar year/month/day that will be shown when - // first opening the datepicker if no v-model value is provided - // Default is the current date (or `min`/`max`) - initialDate: makeProp(PROP_TYPE_DATE_STRING), - // Labels for buttons and keyboard shortcuts - labelCalendar: makeProp(PROP_TYPE_STRING, 'Calendar'), - labelCurrentMonth: makeProp(PROP_TYPE_STRING, 'Current month'), - labelHelp: makeProp(PROP_TYPE_STRING, 'Use cursor keys to navigate calendar dates'), - labelNav: makeProp(PROP_TYPE_STRING, 'Calendar navigation'), - labelNextDecade: makeProp(PROP_TYPE_STRING, 'Next decade'), - labelNextMonth: makeProp(PROP_TYPE_STRING, 'Next month'), - labelNextYear: makeProp(PROP_TYPE_STRING, 'Next year'), - labelNoDateSelected: makeProp(PROP_TYPE_STRING, 'No date selected'), - labelPrevDecade: makeProp(PROP_TYPE_STRING, 'Previous decade'), - labelPrevMonth: makeProp(PROP_TYPE_STRING, 'Previous month'), - labelPrevYear: makeProp(PROP_TYPE_STRING, 'Previous year'), - labelSelected: makeProp(PROP_TYPE_STRING, 'Selected date'), - labelToday: makeProp(PROP_TYPE_STRING, 'Today'), - // Locale(s) to use - // Default is to use page/browser default setting - locale: makeProp(PROP_TYPE_ARRAY_STRING), - max: makeProp(PROP_TYPE_DATE_STRING), - min: makeProp(PROP_TYPE_DATE_STRING), - // Variant color to use for the navigation buttons - navButtonVariant: makeProp(PROP_TYPE_STRING, 'secondary'), - // Disable highlighting today's date - noHighlightToday: makeProp(PROP_TYPE_BOOLEAN, false), - noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false), - readonly: makeProp(PROP_TYPE_BOOLEAN, false), - roleDescription: makeProp(PROP_TYPE_STRING), - // Variant color to use for the selected date - selectedVariant: makeProp(PROP_TYPE_STRING, 'primary'), - // When `true` enables the decade navigation buttons - showDecadeNav: makeProp(PROP_TYPE_BOOLEAN, false), - // Day of week to start calendar on - // `0` (Sunday), `1` (Monday), ... `6` (Saturday) - startWeekday: makeProp(PROP_TYPE_NUMBER_STRING, 0), - // Variant color to use for today's date (defaults to `selectedVariant`) - todayVariant: makeProp(PROP_TYPE_STRING), - // Always return the `v-model` value as a date object - valueAsDate: makeProp(PROP_TYPE_BOOLEAN, false), - // Format of the weekday names at the top of the calendar - // `short` is typically a 3 letter abbreviation, - // `narrow` is typically a single letter - // `long` is the full week day name - // Although some locales may override this (i.e `ar`, etc.) - weekdayHeaderFormat: makeProp(PROP_TYPE_STRING, CALENDAR_SHORT, function (value) { - return arrayIncludes([CALENDAR_LONG, CALENDAR_SHORT, CALENDAR_NARROW], value); +var _makeModelMixin$6 = makeModelMixin("value", { + type: PROP_TYPE_DATE_STRING, }), - // Has no effect if prop `block` is set - width: makeProp(PROP_TYPE_STRING, '270px') -})), NAME_CALENDAR); // --- Main component --- + modelMixin$5 = _makeModelMixin$6.mixin, + modelProps$5 = _makeModelMixin$6.props, + MODEL_PROP_NAME$5 = _makeModelMixin$6.prop, + MODEL_EVENT_NAME$5 = _makeModelMixin$6.event; // --- Props --- + +var props$K = makePropsConfigurable( + sortKeys( + _objectSpread$r( + _objectSpread$r(_objectSpread$r({}, props$L), modelProps$5), + {}, + { + ariaControls: makeProp(PROP_TYPE_STRING), + // Makes calendar the full width of its parent container + block: makeProp(PROP_TYPE_BOOLEAN, false), + dateDisabledFn: makeProp(PROP_TYPE_FUNCTION), + // `Intl.DateTimeFormat` object + dateFormatOptions: makeProp(PROP_TYPE_OBJECT, { + year: DATE_FORMAT_NUMERIC, + month: CALENDAR_LONG, + day: DATE_FORMAT_NUMERIC, + weekday: CALENDAR_LONG, + }), + // Function to set a class of (classes) on the date cell + // if passed a string or an array + // TODO: + // If the function returns an object, look for class prop for classes, + // and other props for handling events/details/descriptions + dateInfoFn: makeProp(PROP_TYPE_FUNCTION), + // 'ltr', 'rtl', or `null` (for auto detect) + direction: makeProp(PROP_TYPE_STRING), + disabled: makeProp(PROP_TYPE_BOOLEAN, false), + // When `true`, renders a comment node, but keeps the component instance active + // Mainly for , so that we can get the component's value and locale + // But we might just use separate date formatters, using the resolved locale + // (adjusted for the gregorian calendar) + hidden: makeProp(PROP_TYPE_BOOLEAN, false), + // When `true` makes the selected date header `sr-only` + hideHeader: makeProp(PROP_TYPE_BOOLEAN, false), + // This specifies the calendar year/month/day that will be shown when + // first opening the datepicker if no v-model value is provided + // Default is the current date (or `min`/`max`) + initialDate: makeProp(PROP_TYPE_DATE_STRING), + // Labels for buttons and keyboard shortcuts + labelCalendar: makeProp(PROP_TYPE_STRING, "Calendar"), + labelCurrentMonth: makeProp(PROP_TYPE_STRING, "Current month"), + labelHelp: makeProp( + PROP_TYPE_STRING, + "Use cursor keys to navigate calendar dates" + ), + labelNav: makeProp(PROP_TYPE_STRING, "Calendar navigation"), + labelNextDecade: makeProp(PROP_TYPE_STRING, "Next decade"), + labelNextMonth: makeProp(PROP_TYPE_STRING, "Next month"), + labelNextYear: makeProp(PROP_TYPE_STRING, "Next year"), + labelNoDateSelected: makeProp(PROP_TYPE_STRING, "No date selected"), + labelPrevDecade: makeProp(PROP_TYPE_STRING, "Previous decade"), + labelPrevMonth: makeProp(PROP_TYPE_STRING, "Previous month"), + labelPrevYear: makeProp(PROP_TYPE_STRING, "Previous year"), + labelSelected: makeProp(PROP_TYPE_STRING, "Selected date"), + labelToday: makeProp(PROP_TYPE_STRING, "Today"), + // Locale(s) to use + // Default is to use page/browser default setting + locale: makeProp(PROP_TYPE_ARRAY_STRING), + max: makeProp(PROP_TYPE_DATE_STRING), + min: makeProp(PROP_TYPE_DATE_STRING), + // Variant color to use for the navigation buttons + navButtonVariant: makeProp(PROP_TYPE_STRING, "secondary"), + // Disable highlighting today's date + noHighlightToday: makeProp(PROP_TYPE_BOOLEAN, false), + noKeyNav: makeProp(PROP_TYPE_BOOLEAN, false), + readonly: makeProp(PROP_TYPE_BOOLEAN, false), + roleDescription: makeProp(PROP_TYPE_STRING), + // Variant color to use for the selected date + selectedVariant: makeProp(PROP_TYPE_STRING, "primary"), + // When `true` enables the decade navigation buttons + showDecadeNav: makeProp(PROP_TYPE_BOOLEAN, false), + // Day of week to start calendar on + // `0` (Sunday), `1` (Monday), ... `6` (Saturday) + startWeekday: makeProp(PROP_TYPE_NUMBER_STRING, 0), + // Variant color to use for today's date (defaults to `selectedVariant`) + todayVariant: makeProp(PROP_TYPE_STRING), + // Always return the `v-model` value as a date object + valueAsDate: makeProp(PROP_TYPE_BOOLEAN, false), + // Format of the weekday names at the top of the calendar + // `short` is typically a 3 letter abbreviation, + // `narrow` is typically a single letter + // `long` is the full week day name + // Although some locales may override this (i.e `ar`, etc.) + weekdayHeaderFormat: makeProp( + PROP_TYPE_STRING, + CALENDAR_SHORT, + function (value) { + return arrayIncludes( + [CALENDAR_LONG, CALENDAR_SHORT, CALENDAR_NARROW], + value + ); + } + ), + // Has no effect if prop `block` is set + width: makeProp(PROP_TYPE_STRING, "270px"), + } + ) + ), + NAME_CALENDAR +); // --- Main component --- // @vue/component var BCalendar = Vue__default["default"].extend({ @@ -2453,17 +3735,23 @@ var BCalendar = Vue__default["default"].extend({ mixins: [attrsMixin, idMixin, modelMixin$5, normalizeSlotMixin], props: props$K, data: function data() { - var selected = formatYMD(this[MODEL_PROP_NAME$5]) || ''; + var selected = formatYMD(this[MODEL_PROP_NAME$5]) || ""; return { // Selected date selectedYMD: selected, // Date in calendar grid that has `tabindex` of `0` - activeYMD: selected || formatYMD(constrainDate(this.initialDate || this.getToday()), this.min, this.max), + activeYMD: + selected || + formatYMD( + constrainDate(this.initialDate || this.getToday()), + this.min, + this.max + ), // Will be true if the calendar grid has/contains focus gridHasFocus: false, // Flag to enable the `aria-live` region(s) after mount // to prevent screen reader "outbursts" when mounting - isLive: false + isLive: false, }; }, computed: { @@ -2471,22 +3759,24 @@ var BCalendar = Vue__default["default"].extend({ return this.safeId(); }, widgetId: function widgetId() { - return this.safeId('_calendar-wrapper_'); + return this.safeId("_calendar-wrapper_"); }, navId: function navId() { - return this.safeId('_calendar-nav_'); + return this.safeId("_calendar-nav_"); }, gridId: function gridId() { - return this.safeId('_calendar-grid_'); + return this.safeId("_calendar-grid_"); }, gridCaptionId: function gridCaptionId() { - return this.safeId('_calendar-grid-caption_'); + return this.safeId("_calendar-grid-caption_"); }, gridHelpId: function gridHelpId() { - return this.safeId('_calendar-grid-help_'); + return this.safeId("_calendar-grid-help_"); }, activeId: function activeId() { - return this.activeYMD ? this.safeId("_cell-".concat(this.activeYMD, "_")) : null; + return this.activeYMD + ? this.safeId("_cell-".concat(this.activeYMD, "_")) + : null; }, // TODO: Use computed props to convert `YYYY-MM-DD` to `Date` object selectedDate: function selectedDate() { @@ -2509,20 +3799,27 @@ var BCalendar = Vue__default["default"].extend({ }, computedLocale: function computedLocale() { // Returns the resolved locale used by the calendar - return resolveLocale(concat(this.locale).filter(identity), CALENDAR_GREGORY); + return resolveLocale( + concat(this.locale).filter(identity), + CALENDAR_GREGORY + ); }, computedDateDisabledFn: function computedDateDisabledFn() { var dateDisabledFn = this.dateDisabledFn; - return hasPropFunction(dateDisabledFn) ? dateDisabledFn : function () { - return false; - }; + return hasPropFunction(dateDisabledFn) + ? dateDisabledFn + : function () { + return false; + }; }, // TODO: Change `dateInfoFn` to handle events and notes as well as classes computedDateInfoFn: function computedDateInfoFn() { var dateInfoFn = this.dateInfoFn; - return hasPropFunction(dateInfoFn) ? dateInfoFn : function () { - return {}; - }; + return hasPropFunction(dateInfoFn) + ? dateInfoFn + : function () { + return {}; + }; }, calendarLocale: function calendarLocale() { // This locale enforces the gregorian calendar (for use in formatter functions) @@ -2530,7 +3827,7 @@ var BCalendar = Vue__default["default"].extend({ // and IE 11 (and some other browsers) do not support the `calendar` option // And we currently only support the gregorian calendar var fmt = new Intl.DateTimeFormat(this.computedLocale, { - calendar: CALENDAR_GREGORY + calendar: CALENDAR_GREGORY, }); var calendar = fmt.resolvedOptions().calendar; var locale = fmt.resolvedOptions().locale; @@ -2540,7 +3837,7 @@ var BCalendar = Vue__default["default"].extend({ // Ensure the locale requests the gregorian calendar // Mainly for IE 11, and currently we can't handle non-gregorian calendars // TODO: Should we always return this value? - locale = locale.replace(/-u-.+$/i, '').concat('-u-ca-gregory'); + locale = locale.replace(/-u-.+$/i, "").concat("-u-ca-gregory"); } return locale; @@ -2564,22 +3861,24 @@ var BCalendar = Vue__default["default"].extend({ return date.getDate(); }, computedVariant: function computedVariant() { - return "btn-".concat(this.selectedVariant || 'primary'); + return "btn-".concat(this.selectedVariant || "primary"); }, computedTodayVariant: function computedTodayVariant() { - return "btn-outline-".concat(this.todayVariant || this.selectedVariant || 'primary'); + return "btn-outline-".concat( + this.todayVariant || this.selectedVariant || "primary" + ); }, computedNavButtonVariant: function computedNavButtonVariant() { - return "btn-outline-".concat(this.navButtonVariant || 'primary'); + return "btn-outline-".concat(this.navButtonVariant || "primary"); }, isRTL: function isRTL() { // `true` if the language requested is RTL var dir = toString(this.direction).toLowerCase(); - if (dir === 'rtl') { + if (dir === "rtl") { /* istanbul ignore next */ return true; - } else if (dir === 'ltr') { + } else if (dir === "ltr") { /* istanbul ignore next */ return false; } @@ -2588,24 +3887,26 @@ var BCalendar = Vue__default["default"].extend({ }, context: function context() { var selectedYMD = this.selectedYMD, - activeYMD = this.activeYMD; + activeYMD = this.activeYMD; var selectedDate = parseYMD(selectedYMD); var activeDate = parseYMD(activeYMD); return { // The current value of the `v-model` selectedYMD: selectedYMD, selectedDate: selectedDate, - selectedFormatted: selectedDate ? this.formatDateString(selectedDate) : this.labelNoDateSelected, + selectedFormatted: selectedDate + ? this.formatDateString(selectedDate) + : this.labelNoDateSelected, // Which date cell is considered active due to navigation activeYMD: activeYMD, activeDate: activeDate, - activeFormatted: activeDate ? this.formatDateString(activeDate) : '', + activeFormatted: activeDate ? this.formatDateString(activeDate) : "", // `true` if the date is disabled (when using keyboard navigation) disabled: this.dateDisabled(activeDate), // Locales used in formatting dates locale: this.computedLocale, calendarLocale: this.calendarLocale, - rtl: this.isRTL + rtl: this.isRTL, }; }, // Computed props that return a function reference @@ -2615,11 +3916,11 @@ var BCalendar = Vue__default["default"].extend({ // We do this as we need to trigger the calendar computed prop // to update when these props update var min = this.computedMin, - max = this.computedMax; + max = this.computedMax; return function (date) { // Handle both `YYYY-MM-DD` and `Date` objects date = parseYMD(date); - return min && date < min || max && date > max; + return (min && date < min) || (max && date > max); }; }, dateDisabled: function dateDisabled() { @@ -2642,36 +3943,46 @@ var BCalendar = Vue__default["default"].extend({ // Computed props that return date formatter functions formatDateString: function formatDateString() { // Returns a date formatter function - return createDateFormatter(this.calendarLocale, _objectSpread$r(_objectSpread$r({ - // Ensure we have year, month, day shown for screen readers/ARIA - // If users really want to leave one of these out, they can - // pass `undefined` for the property value - year: DATE_FORMAT_NUMERIC, - month: DATE_FORMAT_2_DIGIT, - day: DATE_FORMAT_2_DIGIT - }, this.dateFormatOptions), {}, { - // Ensure hours/minutes/seconds are not shown - // As we do not support the time portion (yet) - hour: undefined, - minute: undefined, - second: undefined, - // Ensure calendar is gregorian - calendar: CALENDAR_GREGORY - })); + return createDateFormatter( + this.calendarLocale, + _objectSpread$r( + _objectSpread$r( + { + // Ensure we have year, month, day shown for screen readers/ARIA + // If users really want to leave one of these out, they can + // pass `undefined` for the property value + year: DATE_FORMAT_NUMERIC, + month: DATE_FORMAT_2_DIGIT, + day: DATE_FORMAT_2_DIGIT, + }, + this.dateFormatOptions + ), + {}, + { + // Ensure hours/minutes/seconds are not shown + // As we do not support the time portion (yet) + hour: undefined, + minute: undefined, + second: undefined, + // Ensure calendar is gregorian + calendar: CALENDAR_GREGORY, + } + ) + ); }, formatYearMonth: function formatYearMonth() { // Returns a date formatter function return createDateFormatter(this.calendarLocale, { year: DATE_FORMAT_NUMERIC, month: CALENDAR_LONG, - calendar: CALENDAR_GREGORY + calendar: CALENDAR_GREGORY, }); }, formatWeekdayName: function formatWeekdayName() { // Long weekday name for weekday header aria-label return createDateFormatter(this.calendarLocale, { weekday: CALENDAR_LONG, - calendar: CALENDAR_GREGORY + calendar: CALENDAR_GREGORY, }); }, formatWeekdayNameShort: function formatWeekdayNameShort() { @@ -2679,7 +3990,7 @@ var BCalendar = Vue__default["default"].extend({ // defaults to 'short' 3 letter days, where possible return createDateFormatter(this.calendarLocale, { weekday: this.weekdayHeaderFormat || CALENDAR_SHORT, - calendar: CALENDAR_GREGORY + calendar: CALENDAR_GREGORY, }); }, formatDay: function formatDay() { @@ -2687,11 +3998,11 @@ var BCalendar = Vue__default["default"].extend({ // We don't use DateTimeFormatter here as it can place extra // character(s) after the number (i.e the `zh` locale) var nf = new Intl.NumberFormat([this.computedLocale], { - style: 'decimal', + style: "decimal", minimumIntegerDigits: 1, minimumFractionDigits: 0, maximumFractionDigits: 0, - notation: 'standard' + notation: "standard", }); // Return a formatter function instance return function (date) { @@ -2701,15 +4012,24 @@ var BCalendar = Vue__default["default"].extend({ // Disabled states for the nav buttons prevDecadeDisabled: function prevDecadeDisabled() { var min = this.computedMin; - return this.disabled || min && lastDateOfMonth(oneDecadeAgo(this.activeDate)) < min; + return ( + this.disabled || + (min && lastDateOfMonth(oneDecadeAgo(this.activeDate)) < min) + ); }, prevYearDisabled: function prevYearDisabled() { var min = this.computedMin; - return this.disabled || min && lastDateOfMonth(oneYearAgo(this.activeDate)) < min; + return ( + this.disabled || + (min && lastDateOfMonth(oneYearAgo(this.activeDate)) < min) + ); }, prevMonthDisabled: function prevMonthDisabled() { var min = this.computedMin; - return this.disabled || min && lastDateOfMonth(oneMonthAgo(this.activeDate)) < min; + return ( + this.disabled || + (min && lastDateOfMonth(oneMonthAgo(this.activeDate)) < min) + ); }, thisMonthDisabled: function thisMonthDisabled() { // TODO: We could/should check if today is out of range @@ -2717,15 +4037,24 @@ var BCalendar = Vue__default["default"].extend({ }, nextMonthDisabled: function nextMonthDisabled() { var max = this.computedMax; - return this.disabled || max && firstDateOfMonth(oneMonthAhead(this.activeDate)) > max; + return ( + this.disabled || + (max && firstDateOfMonth(oneMonthAhead(this.activeDate)) > max) + ); }, nextYearDisabled: function nextYearDisabled() { var max = this.computedMax; - return this.disabled || max && firstDateOfMonth(oneYearAhead(this.activeDate)) > max; + return ( + this.disabled || + (max && firstDateOfMonth(oneYearAhead(this.activeDate)) > max) + ); }, nextDecadeDisabled: function nextDecadeDisabled() { var max = this.computedMax; - return this.disabled || max && firstDateOfMonth(oneDecadeAhead(this.activeDate)) > max; + return ( + this.disabled || + (max && firstDateOfMonth(oneDecadeAhead(this.activeDate)) > max) + ); }, // Calendar dates generation calendar: function calendar() { @@ -2736,7 +4065,9 @@ var BCalendar = Vue__default["default"].extend({ var daysInMonth = this.calendarDaysInMonth; var startIndex = firstDay.getDay(); // `0`..`6` - var weekOffset = (this.computedWeekStarts > startIndex ? 7 : 0) - this.computedWeekStarts; // Build the calendar matrix + var weekOffset = + (this.computedWeekStarts > startIndex ? 7 : 0) - + this.computedWeekStarts; // Build the calendar matrix var currentDay = 0 - weekOffset - startIndex; @@ -2753,17 +4084,23 @@ var BCalendar = Vue__default["default"].extend({ var dayDisabled = this.dateDisabled(date); // TODO: This could be a normalizer method var dateInfo = this.computedDateInfoFn(dayYMD, parseYMD(dayYMD)); - dateInfo = isString(dateInfo) || isArray(dateInfo) ? - /* istanbul ignore next */ - { - class: dateInfo - } : isPlainObject(dateInfo) ? _objectSpread$r({ - class: '' - }, dateInfo) : - /* istanbul ignore next */ - { - class: '' - }; + dateInfo = + isString(dateInfo) || isArray(dateInfo) + ? /* istanbul ignore next */ + { + class: dateInfo, + } + : isPlainObject(dateInfo) + ? _objectSpread$r( + { + class: "", + }, + dateInfo + ) + : /* istanbul ignore next */ + { + class: "", + }; matrix[week].push({ ymd: dayYMD, // Cell content @@ -2773,7 +4110,7 @@ var BCalendar = Vue__default["default"].extend({ isThisMonth: month === calendarMonth, isDisabled: dayDisabled, // TODO: Handle other dateInfo properties such as notes/events - info: dateInfo + info: dateInfo, }); } } @@ -2786,36 +4123,62 @@ var BCalendar = Vue__default["default"].extend({ return this.calendar[0].map(function (d) { return { text: _this2.formatWeekdayNameShort(parseYMD(d.ymd)), - label: _this2.formatWeekdayName(parseYMD(d.ymd)) + label: _this2.formatWeekdayName(parseYMD(d.ymd)), }; }); - } + }, }, - watch: (_watch$5 = {}, _defineProperty$v(_watch$5, MODEL_PROP_NAME$5, function (newValue, oldValue) { - var selected = formatYMD(newValue) || ''; - var old = formatYMD(oldValue) || ''; - - if (!datesEqual(selected, old)) { - this.activeYMD = selected || this.activeYMD; - this.selectedYMD = selected; - } - }), _defineProperty$v(_watch$5, "selectedYMD", function selectedYMD(newYMD, oldYMD) { - // TODO: - // Should we compare to `formatYMD(this.value)` and emit - // only if they are different? - if (newYMD !== oldYMD) { - this.$emit(MODEL_EVENT_NAME$5, this.valueAsDate ? parseYMD(newYMD) || null : newYMD || ''); - } - }), _defineProperty$v(_watch$5, "context", function context(newValue, oldValue) { - if (!looseEqual(newValue, oldValue)) { - this.$emit(EVENT_NAME_CONTEXT, newValue); - } - }), _defineProperty$v(_watch$5, "hidden", function hidden(newValue) { - // Reset the active focused day when hidden - this.activeYMD = this.selectedYMD || formatYMD(this[MODEL_PROP_NAME$5] || this.constrainDate(this.initialDate || this.getToday())); // Enable/disable the live regions - - this.setLive(!newValue); - }), _watch$5), + watch: + ((_watch$5 = {}), + _defineProperty$v( + _watch$5, + MODEL_PROP_NAME$5, + function (newValue, oldValue) { + var selected = formatYMD(newValue) || ""; + var old = formatYMD(oldValue) || ""; + + if (!datesEqual(selected, old)) { + this.activeYMD = selected || this.activeYMD; + this.selectedYMD = selected; + } + } + ), + _defineProperty$v( + _watch$5, + "selectedYMD", + function selectedYMD(newYMD, oldYMD) { + // TODO: + // Should we compare to `formatYMD(this.value)` and emit + // only if they are different? + if (newYMD !== oldYMD) { + this.$emit( + MODEL_EVENT_NAME$5, + this.valueAsDate ? parseYMD(newYMD) || null : newYMD || "" + ); + } + } + ), + _defineProperty$v( + _watch$5, + "context", + function context(newValue, oldValue) { + if (!looseEqual(newValue, oldValue)) { + this.$emit(EVENT_NAME_CONTEXT, newValue); + } + } + ), + _defineProperty$v(_watch$5, "hidden", function hidden(newValue) { + // Reset the active focused day when hidden + this.activeYMD = + this.selectedYMD || + formatYMD( + this[MODEL_PROP_NAME$5] || + this.constrainDate(this.initialDate || this.getToday()) + ); // Enable/disable the live regions + + this.setLive(!newValue); + }), + _watch$5), created: function created() { var _this3 = this; @@ -2879,13 +4242,17 @@ var BCalendar = Vue__default["default"].extend({ // Performed in a `$nextTick()` to (probably) ensure // the input event has emitted first this.$nextTick(function () { - _this5.$emit(EVENT_NAME_SELECTED, formatYMD(date) || '', parseYMD(date) || null); + _this5.$emit( + EVENT_NAME_SELECTED, + formatYMD(date) || "", + parseYMD(date) || null + ); }); }, // Event handlers setGridFocusFlag: function setGridFocusFlag(event) { // Sets the gridHasFocus flag to make date "button" look focused - this.gridHasFocus = !this.disabled && event.type === 'focus'; + this.gridHasFocus = !this.disabled && event.type === "focus"; }, onKeydownWrapper: function onKeydownWrapper(event) { // Calendar keyboard navigation @@ -2897,10 +4264,24 @@ var BCalendar = Vue__default["default"].extend({ } var altKey = event.altKey, - ctrlKey = event.ctrlKey, - keyCode = event.keyCode; - - if (!arrayIncludes([CODE_PAGEUP, CODE_PAGEDOWN, CODE_END, CODE_HOME, CODE_LEFT, CODE_UP, CODE_RIGHT, CODE_DOWN], keyCode)) { + ctrlKey = event.ctrlKey, + keyCode = event.keyCode; + + if ( + !arrayIncludes( + [ + CODE_PAGEUP, + CODE_PAGEDOWN, + CODE_END, + CODE_HOME, + CODE_LEFT, + CODE_UP, + CODE_RIGHT, + CODE_DOWN, + ], + keyCode + ) + ) { /* istanbul ignore next */ return; } @@ -2914,13 +4295,17 @@ var BCalendar = Vue__default["default"].extend({ if (keyCode === CODE_PAGEUP) { // PAGEUP - Previous month/year - activeDate = (altKey ? ctrlKey ? oneDecadeAgo : oneYearAgo : oneMonthAgo)(activeDate); // We check the first day of month to be in rage + activeDate = ( + altKey ? (ctrlKey ? oneDecadeAgo : oneYearAgo) : oneMonthAgo + )(activeDate); // We check the first day of month to be in rage checkDate = createDate(activeDate); checkDate.setDate(1); } else if (keyCode === CODE_PAGEDOWN) { // PAGEDOWN - Next month/year - activeDate = (altKey ? ctrlKey ? oneDecadeAhead : oneYearAhead : oneMonthAhead)(activeDate); // We check the last day of month to be in rage + activeDate = ( + altKey ? (ctrlKey ? oneDecadeAhead : oneYearAhead) : oneMonthAhead + )(activeDate); // We check the last day of month to be in rage checkDate = createDate(activeDate); checkDate.setMonth(checkDate.getMonth() + 1); @@ -2955,13 +4340,15 @@ var BCalendar = Vue__default["default"].extend({ checkDate = activeDate; } - if (!this.dateOutOfRange(checkDate) && !datesEqual(activeDate, this.activeDate)) { + if ( + !this.dateOutOfRange(checkDate) && + !datesEqual(activeDate, this.activeDate) + ) { // We only jump to date if within min/max // We don't check for individual disabled dates though (via user function) this.activeYMD = formatYMD(activeDate); } // Ensure grid is focused - this.focus(); }, onKeydownGrid: function onKeydownGrid(event) { @@ -2972,62 +4359,87 @@ var BCalendar = Vue__default["default"].extend({ if (keyCode === CODE_ENTER || keyCode === CODE_SPACE) { stopEvent(event); - if (!this.disabled && !this.readonly && !this.dateDisabled(activeDate)) { + if ( + !this.disabled && + !this.readonly && + !this.dateDisabled(activeDate) + ) { this.selectedYMD = formatYMD(activeDate); this.emitSelected(activeDate); } // Ensure grid is focused - this.focus(); } }, onClickDay: function onClickDay(day) { // Clicking on a date "button" to select it var selectedDate = this.selectedDate, - activeDate = this.activeDate; + activeDate = this.activeDate; var clickedDate = parseYMD(day.ymd); - if (!this.disabled && !day.isDisabled && !this.dateDisabled(clickedDate)) { + if ( + !this.disabled && + !day.isDisabled && + !this.dateDisabled(clickedDate) + ) { if (!this.readonly) { // If readonly mode, we don't set the selected date, just the active date // If the clicked date is equal to the already selected date, we don't update the model - this.selectedYMD = formatYMD(datesEqual(clickedDate, selectedDate) ? selectedDate : clickedDate); + this.selectedYMD = formatYMD( + datesEqual(clickedDate, selectedDate) ? selectedDate : clickedDate + ); this.emitSelected(clickedDate); } - this.activeYMD = formatYMD(datesEqual(clickedDate, activeDate) ? activeDate : createDate(clickedDate)); // Ensure grid is focused + this.activeYMD = formatYMD( + datesEqual(clickedDate, activeDate) + ? activeDate + : createDate(clickedDate) + ); // Ensure grid is focused this.focus(); } }, gotoPrevDecade: function gotoPrevDecade() { - this.activeYMD = formatYMD(this.constrainDate(oneDecadeAgo(this.activeDate))); + this.activeYMD = formatYMD( + this.constrainDate(oneDecadeAgo(this.activeDate)) + ); }, gotoPrevYear: function gotoPrevYear() { - this.activeYMD = formatYMD(this.constrainDate(oneYearAgo(this.activeDate))); + this.activeYMD = formatYMD( + this.constrainDate(oneYearAgo(this.activeDate)) + ); }, gotoPrevMonth: function gotoPrevMonth() { - this.activeYMD = formatYMD(this.constrainDate(oneMonthAgo(this.activeDate))); + this.activeYMD = formatYMD( + this.constrainDate(oneMonthAgo(this.activeDate)) + ); }, gotoCurrentMonth: function gotoCurrentMonth() { // TODO: Maybe this goto date should be configurable? this.activeYMD = formatYMD(this.constrainDate(this.getToday())); }, gotoNextMonth: function gotoNextMonth() { - this.activeYMD = formatYMD(this.constrainDate(oneMonthAhead(this.activeDate))); + this.activeYMD = formatYMD( + this.constrainDate(oneMonthAhead(this.activeDate)) + ); }, gotoNextYear: function gotoNextYear() { - this.activeYMD = formatYMD(this.constrainDate(oneYearAhead(this.activeDate))); + this.activeYMD = formatYMD( + this.constrainDate(oneYearAhead(this.activeDate)) + ); }, gotoNextDecade: function gotoNextDecade() { - this.activeYMD = formatYMD(this.constrainDate(oneDecadeAhead(this.activeDate))); + this.activeYMD = formatYMD( + this.constrainDate(oneDecadeAhead(this.activeDate)) + ); }, onHeaderClick: function onHeaderClick() { if (!this.disabled) { this.activeYMD = this.selectedYMD || formatYMD(this.getToday()); this.focus(); } - } + }, }, render: function render(h) { var _this6 = this; @@ -3038,169 +4450,297 @@ var BCalendar = Vue__default["default"].extend({ } var valueId = this.valueId, - widgetId = this.widgetId, - navId = this.navId, - gridId = this.gridId, - gridCaptionId = this.gridCaptionId, - gridHelpId = this.gridHelpId, - activeId = this.activeId, - disabled = this.disabled, - noKeyNav = this.noKeyNav, - isLive = this.isLive, - isRTL = this.isRTL, - activeYMD = this.activeYMD, - selectedYMD = this.selectedYMD, - safeId = this.safeId; + widgetId = this.widgetId, + navId = this.navId, + gridId = this.gridId, + gridCaptionId = this.gridCaptionId, + gridHelpId = this.gridHelpId, + activeId = this.activeId, + disabled = this.disabled, + noKeyNav = this.noKeyNav, + isLive = this.isLive, + isRTL = this.isRTL, + activeYMD = this.activeYMD, + selectedYMD = this.selectedYMD, + safeId = this.safeId; var hideDecadeNav = !this.showDecadeNav; var todayYMD = formatYMD(this.getToday()); var highlightToday = !this.noHighlightToday; // Header showing current selected date - var $header = h('output', { - staticClass: 'form-control form-control-sm text-center', - class: { - 'text-muted': disabled, - readonly: this.readonly || disabled - }, - attrs: { - id: valueId, - for: gridId, - role: 'status', - tabindex: disabled ? null : '-1', - // Mainly for testing purposes, as we do not know - // the exact format `Intl` will format the date string - 'data-selected': toString(selectedYMD), - // We wait until after mount to enable `aria-live` - // to prevent initial announcement on page render - 'aria-live': isLive ? 'polite' : 'off', - 'aria-atomic': isLive ? 'true' : null + var $header = h( + "output", + { + staticClass: "form-control form-control-sm text-center", + class: { + "text-muted": disabled, + readonly: this.readonly || disabled, + }, + attrs: { + id: valueId, + for: gridId, + role: "status", + tabindex: disabled ? null : "-1", + // Mainly for testing purposes, as we do not know + // the exact format `Intl` will format the date string + "data-selected": toString(selectedYMD), + // We wait until after mount to enable `aria-live` + // to prevent initial announcement on page render + "aria-live": isLive ? "polite" : "off", + "aria-atomic": isLive ? "true" : null, + }, + on: { + // Transfer focus/click to focus grid + // and focus active date (or today if no selection) + click: this.onHeaderClick, + focus: this.onHeaderClick, + }, }, - on: { - // Transfer focus/click to focus grid - // and focus active date (or today if no selection) - click: this.onHeaderClick, - focus: this.onHeaderClick - } - }, this.selectedDate ? [// We use `bdi` elements here in case the label doesn't match the locale - // Although IE 11 does not deal with at all (equivalent to a span) - h('bdi', { - staticClass: 'sr-only' - }, " (".concat(toString(this.labelSelected), ") ")), h('bdi', this.formatDateString(this.selectedDate))] : this.labelNoDateSelected || "\xA0" // ' ' + this.selectedDate + ? [ + // We use `bdi` elements here in case the label doesn't match the locale + // Although IE 11 does not deal with at all (equivalent to a span) + h( + "bdi", + { + staticClass: "sr-only", + }, + " (".concat(toString(this.labelSelected), ") ") + ), + h("bdi", this.formatDateString(this.selectedDate)), + ] + : this.labelNoDateSelected || "\xA0" // ' ' ); - $header = h('header', { - staticClass: 'b-calendar-header', - class: { - 'sr-only': this.hideHeader + $header = h( + "header", + { + staticClass: "b-calendar-header", + class: { + "sr-only": this.hideHeader, + }, + attrs: { + title: this.selectedDate ? this.labelSelectedDate || null : null, + }, }, - attrs: { - title: this.selectedDate ? this.labelSelectedDate || null : null - } - }, [$header]); // Content for the date navigation buttons + [$header] + ); // Content for the date navigation buttons var navScope = { - isRTL: isRTL + isRTL: isRTL, }; var navProps = { - shiftV: 0.5 + shiftV: 0.5, }; - var navPrevProps = _objectSpread$r(_objectSpread$r({}, navProps), {}, { - flipH: isRTL - }); + var navPrevProps = _objectSpread$r( + _objectSpread$r({}, navProps), + {}, + { + flipH: isRTL, + } + ); - var navNextProps = _objectSpread$r(_objectSpread$r({}, navProps), {}, { - flipH: !isRTL - }); + var navNextProps = _objectSpread$r( + _objectSpread$r({}, navProps), + {}, + { + flipH: !isRTL, + } + ); - var $prevDecadeIcon = this.normalizeSlot(SLOT_NAME_NAV_PEV_DECADE, navScope) || h(BIconChevronBarLeft, { - props: navPrevProps - }); - var $prevYearIcon = this.normalizeSlot(SLOT_NAME_NAV_PEV_YEAR, navScope) || h(BIconChevronDoubleLeft, { - props: navPrevProps - }); - var $prevMonthIcon = this.normalizeSlot(SLOT_NAME_NAV_PEV_MONTH, navScope) || h(BIconChevronLeft, { - props: navPrevProps - }); - var $thisMonthIcon = this.normalizeSlot(SLOT_NAME_NAV_THIS_MONTH, navScope) || h(BIconCircleFill, { - props: navProps - }); - var $nextMonthIcon = this.normalizeSlot(SLOT_NAME_NAV_NEXT_MONTH, navScope) || h(BIconChevronLeft, { - props: navNextProps - }); - var $nextYearIcon = this.normalizeSlot(SLOT_NAME_NAV_NEXT_YEAR, navScope) || h(BIconChevronDoubleLeft, { - props: navNextProps - }); - var $nextDecadeIcon = this.normalizeSlot(SLOT_NAME_NAV_NEXT_DECADE, navScope) || h(BIconChevronBarLeft, { - props: navNextProps - }); // Utility to create the date navigation buttons - - var makeNavBtn = function makeNavBtn(content, label, handler, btnDisabled, shortcut) { - return h('button', { - staticClass: 'btn btn-sm border-0 flex-fill', - class: [_this6.computedNavButtonVariant, { - disabled: btnDisabled - }], - attrs: { - title: label || null, - type: 'button', - tabindex: noKeyNav ? '-1' : null, - 'aria-label': label || null, - 'aria-disabled': btnDisabled ? 'true' : null, - 'aria-keyshortcuts': shortcut || null + var $prevDecadeIcon = + this.normalizeSlot(SLOT_NAME_NAV_PEV_DECADE, navScope) || + h(BIconChevronBarLeft, { + props: navPrevProps, + }); + var $prevYearIcon = + this.normalizeSlot(SLOT_NAME_NAV_PEV_YEAR, navScope) || + h(BIconChevronDoubleLeft, { + props: navPrevProps, + }); + var $prevMonthIcon = + this.normalizeSlot(SLOT_NAME_NAV_PEV_MONTH, navScope) || + h(BIconChevronLeft, { + props: navPrevProps, + }); + var $thisMonthIcon = + this.normalizeSlot(SLOT_NAME_NAV_THIS_MONTH, navScope) || + h(BIconCircleFill, { + props: navProps, + }); + var $nextMonthIcon = + this.normalizeSlot(SLOT_NAME_NAV_NEXT_MONTH, navScope) || + h(BIconChevronLeft, { + props: navNextProps, + }); + var $nextYearIcon = + this.normalizeSlot(SLOT_NAME_NAV_NEXT_YEAR, navScope) || + h(BIconChevronDoubleLeft, { + props: navNextProps, + }); + var $nextDecadeIcon = + this.normalizeSlot(SLOT_NAME_NAV_NEXT_DECADE, navScope) || + h(BIconChevronBarLeft, { + props: navNextProps, + }); // Utility to create the date navigation buttons + + var makeNavBtn = function makeNavBtn( + content, + label, + handler, + btnDisabled, + shortcut + ) { + return h( + "button", + { + staticClass: "btn btn-sm border-0 flex-fill", + class: [ + _this6.computedNavButtonVariant, + { + disabled: btnDisabled, + }, + ], + attrs: { + title: label || null, + type: "button", + tabindex: noKeyNav ? "-1" : null, + "aria-label": label || null, + "aria-disabled": btnDisabled ? "true" : null, + "aria-keyshortcuts": shortcut || null, + }, + on: btnDisabled + ? {} + : { + click: handler, + }, }, - on: btnDisabled ? {} : { - click: handler - } - }, [h('div', { - attrs: { - 'aria-hidden': 'true' - } - }, [content])]); + [ + h( + "div", + { + attrs: { + "aria-hidden": "true", + }, + }, + [content] + ), + ] + ); }; // Generate the date navigation buttons - - var $nav = h('div', { - staticClass: 'b-calendar-nav d-flex', - attrs: { - id: navId, - role: 'group', - tabindex: noKeyNav ? '-1' : null, - 'aria-hidden': disabled ? 'true' : null, - 'aria-label': this.labelNav || null, - 'aria-controls': gridId - } - }, [hideDecadeNav ? h() : makeNavBtn($prevDecadeIcon, this.labelPrevDecade, this.gotoPrevDecade, this.prevDecadeDisabled, 'Ctrl+Alt+PageDown'), makeNavBtn($prevYearIcon, this.labelPrevYear, this.gotoPrevYear, this.prevYearDisabled, 'Alt+PageDown'), makeNavBtn($prevMonthIcon, this.labelPrevMonth, this.gotoPrevMonth, this.prevMonthDisabled, 'PageDown'), makeNavBtn($thisMonthIcon, this.labelCurrentMonth, this.gotoCurrentMonth, this.thisMonthDisabled, 'Home'), makeNavBtn($nextMonthIcon, this.labelNextMonth, this.gotoNextMonth, this.nextMonthDisabled, 'PageUp'), makeNavBtn($nextYearIcon, this.labelNextYear, this.gotoNextYear, this.nextYearDisabled, 'Alt+PageUp'), hideDecadeNav ? h() : makeNavBtn($nextDecadeIcon, this.labelNextDecade, this.gotoNextDecade, this.nextDecadeDisabled, 'Ctrl+Alt+PageUp')]); // Caption for calendar grid - - var $gridCaption = h('header', { - staticClass: 'b-calendar-grid-caption text-center font-weight-bold', - class: { - 'text-muted': disabled - }, - attrs: { - id: gridCaptionId, - 'aria-live': isLive ? 'polite' : null, - 'aria-atomic': isLive ? 'true' : null + var $nav = h( + "div", + { + staticClass: "b-calendar-nav d-flex", + attrs: { + id: navId, + role: "group", + tabindex: noKeyNav ? "-1" : null, + "aria-hidden": disabled ? "true" : null, + "aria-label": this.labelNav || null, + "aria-controls": gridId, + }, }, - key: 'grid-caption' - }, this.formatYearMonth(this.calendarFirstDay)); // Calendar weekday headings - - var $gridWeekDays = h('div', { - staticClass: 'b-calendar-grid-weekdays row no-gutters border-bottom', - attrs: { - 'aria-hidden': 'true' - } - }, this.calendarHeadings.map(function (d, idx) { - return h('small', { - staticClass: 'col text-truncate', + [ + hideDecadeNav + ? h() + : makeNavBtn( + $prevDecadeIcon, + this.labelPrevDecade, + this.gotoPrevDecade, + this.prevDecadeDisabled, + "Ctrl+Alt+PageDown" + ), + makeNavBtn( + $prevYearIcon, + this.labelPrevYear, + this.gotoPrevYear, + this.prevYearDisabled, + "Alt+PageDown" + ), + makeNavBtn( + $prevMonthIcon, + this.labelPrevMonth, + this.gotoPrevMonth, + this.prevMonthDisabled, + "PageDown" + ), + makeNavBtn( + $thisMonthIcon, + this.labelCurrentMonth, + this.gotoCurrentMonth, + this.thisMonthDisabled, + "Home" + ), + makeNavBtn( + $nextMonthIcon, + this.labelNextMonth, + this.gotoNextMonth, + this.nextMonthDisabled, + "PageUp" + ), + makeNavBtn( + $nextYearIcon, + this.labelNextYear, + this.gotoNextYear, + this.nextYearDisabled, + "Alt+PageUp" + ), + hideDecadeNav + ? h() + : makeNavBtn( + $nextDecadeIcon, + this.labelNextDecade, + this.gotoNextDecade, + this.nextDecadeDisabled, + "Ctrl+Alt+PageUp" + ), + ] + ); // Caption for calendar grid + + var $gridCaption = h( + "header", + { + staticClass: "b-calendar-grid-caption text-center font-weight-bold", class: { - 'text-muted': disabled + "text-muted": disabled, + }, + attrs: { + id: gridCaptionId, + "aria-live": isLive ? "polite" : null, + "aria-atomic": isLive ? "true" : null, }, + key: "grid-caption", + }, + this.formatYearMonth(this.calendarFirstDay) + ); // Calendar weekday headings + + var $gridWeekDays = h( + "div", + { + staticClass: "b-calendar-grid-weekdays row no-gutters border-bottom", attrs: { - title: d.label === d.text ? null : d.label, - 'aria-label': d.label + "aria-hidden": "true", }, - key: idx - }, d.text); - })); // Calendar day grid + }, + this.calendarHeadings.map(function (d, idx) { + return h( + "small", + { + staticClass: "col text-truncate", + class: { + "text-muted": disabled, + }, + attrs: { + title: d.label === d.text ? null : d.label, + "aria-label": d.label, + }, + key: idx, + }, + d.text + ); + }) + ); // Calendar day grid var $gridBody = this.calendar.map(function (week) { var $cells = week.map(function (day, dIndex) { @@ -3211,129 +4751,226 @@ var BCalendar = Vue__default["default"].extend({ var isToday = day.ymd === todayYMD; var idCell = safeId("_cell-".concat(day.ymd, "_")); // "fake" button - var $btn = h('span', { - staticClass: 'btn border-0 rounded-circle text-nowrap', - // Should we add some classes to signify if today/selected/etc? - class: (_class = { - // Give the fake button a focus ring - focus: isActive && _this6.gridHasFocus, - // Styling - disabled: day.isDisabled || disabled, - active: isSelected - }, _defineProperty$v(_class, _this6.computedVariant, isSelected), _defineProperty$v(_class, _this6.computedTodayVariant, isToday && highlightToday && !isSelected && day.isThisMonth), _defineProperty$v(_class, 'btn-outline-light', !(isToday && highlightToday) && !isSelected && !isActive), _defineProperty$v(_class, 'btn-light', !(isToday && highlightToday) && !isSelected && isActive), _defineProperty$v(_class, 'text-muted', !day.isThisMonth && !isSelected), _defineProperty$v(_class, 'text-dark', !(isToday && highlightToday) && !isSelected && !isActive && day.isThisMonth), _defineProperty$v(_class, 'font-weight-bold', (isSelected || day.isThisMonth) && !day.isDisabled), _class), - on: { - click: function click() { - return _this6.onClickDay(day); - } - } - }, day.day); - return h('div', // Cell with button - { - staticClass: 'col p-0', - class: day.isDisabled ? 'bg-light' : day.info.class || '', - attrs: { - id: idCell, - role: 'button', - 'data-date': day.ymd, - // Primarily for testing purposes - // Only days in the month are presented as buttons to screen readers - 'aria-hidden': day.isThisMonth ? null : 'true', - 'aria-disabled': day.isDisabled || disabled ? 'true' : null, - 'aria-label': [day.label, isSelected ? "(".concat(_this6.labelSelected, ")") : null, isToday ? "(".concat(_this6.labelToday, ")") : null].filter(identity).join(' '), - // NVDA doesn't convey `aria-selected`, but does `aria-current`, - // ChromeVox doesn't convey `aria-current`, but does `aria-selected`, - // so we set both attributes for robustness - 'aria-selected': isSelected ? 'true' : null, - 'aria-current': isSelected ? 'date' : null + var $btn = h( + "span", + { + staticClass: "btn border-0 rounded-circle text-nowrap", + // Should we add some classes to signify if today/selected/etc? + class: + ((_class = { + // Give the fake button a focus ring + focus: isActive && _this6.gridHasFocus, + // Styling + disabled: day.isDisabled || disabled, + active: isSelected, + }), + _defineProperty$v(_class, _this6.computedVariant, isSelected), + _defineProperty$v( + _class, + _this6.computedTodayVariant, + isToday && highlightToday && !isSelected && day.isThisMonth + ), + _defineProperty$v( + _class, + "btn-outline-light", + !(isToday && highlightToday) && !isSelected && !isActive + ), + _defineProperty$v( + _class, + "btn-light", + !(isToday && highlightToday) && !isSelected && isActive + ), + _defineProperty$v( + _class, + "text-muted", + !day.isThisMonth && !isSelected + ), + _defineProperty$v( + _class, + "text-dark", + !(isToday && highlightToday) && + !isSelected && + !isActive && + day.isThisMonth + ), + _defineProperty$v( + _class, + "font-weight-bold", + (isSelected || day.isThisMonth) && !day.isDisabled + ), + _class), + on: { + click: function click() { + return _this6.onClickDay(day); + }, + }, }, - key: dIndex - }, [$btn]); - }); // Return the week "row" - // We use the first day of the weeks YMD value as a - // key for efficient DOM patching / element re-use + day.day + ); + return h( + "div", // Cell with button + { + staticClass: "col p-0", + class: day.isDisabled ? "bg-light" : day.info.class || "", + attrs: { + id: idCell, + role: "button", + "data-date": day.ymd, + // Primarily for testing purposes + // Only days in the month are presented as buttons to screen readers + "aria-hidden": day.isThisMonth ? null : "true", + "aria-disabled": day.isDisabled || disabled ? "true" : null, + "aria-label": [ + day.label, + isSelected ? "(".concat(_this6.labelSelected, ")") : null, + isToday ? "(".concat(_this6.labelToday, ")") : null, + ] + .filter(identity) + .join(" "), + // NVDA doesn't convey `aria-selected`, but does `aria-current`, + // ChromeVox doesn't convey `aria-current`, but does `aria-selected`, + // so we set both attributes for robustness + "aria-selected": isSelected ? "true" : null, + "aria-current": isSelected ? "date" : null, + }, + key: dIndex, + }, + [$btn] + ); + }); // Return the week "row" + // We use the first day of the weeks YMD value as a + // key for efficient DOM patching / element re-use - return h('div', { - staticClass: 'row no-gutters', - key: week[0].ymd - }, $cells); + return h( + "div", + { + staticClass: "row no-gutters", + key: week[0].ymd, + }, + $cells + ); }); - $gridBody = h('div', { - // A key is only required on the body if we add in transition support - staticClass: 'b-calendar-grid-body', - style: disabled ? { - pointerEvents: 'none' - } : {} // key: this.activeYMD.slice(0, -3) - - }, $gridBody); - var $gridHelp = h('footer', { - staticClass: 'b-calendar-grid-help border-top small text-muted text-center bg-light', - attrs: { - id: gridHelpId - } - }, [h('div', { - staticClass: 'small' - }, this.labelHelp)]); - var $grid = h('div', { - staticClass: 'b-calendar-grid form-control h-auto text-center', - attrs: { - id: gridId, - role: 'application', - tabindex: noKeyNav ? '-1' : disabled ? null : '0', - 'data-month': activeYMD.slice(0, -3), - // `YYYY-MM`, mainly for testing - 'aria-roledescription': this.labelCalendar || null, - 'aria-labelledby': gridCaptionId, - 'aria-describedby': gridHelpId, - // `aria-readonly` is not considered valid on `role="application"` - // https://www.w3.org/TR/wai-aria-1.1/#aria-readonly - // 'aria-readonly': this.readonly && !disabled ? 'true' : null, - 'aria-disabled': disabled ? 'true' : null, - 'aria-activedescendant': activeId + $gridBody = h( + "div", + { + // A key is only required on the body if we add in transition support + staticClass: "b-calendar-grid-body", + style: disabled + ? { + pointerEvents: "none", + } + : {}, // key: this.activeYMD.slice(0, -3) + }, + $gridBody + ); + var $gridHelp = h( + "footer", + { + staticClass: + "b-calendar-grid-help border-top small text-muted text-center bg-light", + attrs: { + id: gridHelpId, + }, }, - on: { - keydown: this.onKeydownGrid, - focus: this.setGridFocusFlag, - blur: this.setGridFocusFlag + [ + h( + "div", + { + staticClass: "small", + }, + this.labelHelp + ), + ] + ); + var $grid = h( + "div", + { + staticClass: "b-calendar-grid form-control h-auto text-center", + attrs: { + id: gridId, + role: "application", + tabindex: noKeyNav ? "-1" : disabled ? null : "0", + "data-month": activeYMD.slice(0, -3), + // `YYYY-MM`, mainly for testing + "aria-roledescription": this.labelCalendar || null, + "aria-labelledby": gridCaptionId, + "aria-describedby": gridHelpId, + // `aria-readonly` is not considered valid on `role="application"` + // https://www.w3.org/TR/wai-aria-1.1/#aria-readonly + // 'aria-readonly': this.readonly && !disabled ? 'true' : null, + "aria-disabled": disabled ? "true" : null, + "aria-activedescendant": activeId, + }, + on: { + keydown: this.onKeydownGrid, + focus: this.setGridFocusFlag, + blur: this.setGridFocusFlag, + }, + ref: "grid", }, - ref: 'grid' - }, [$gridCaption, $gridWeekDays, $gridBody, $gridHelp]); // Optional bottom slot + [$gridCaption, $gridWeekDays, $gridBody, $gridHelp] + ); // Optional bottom slot var $slot = this.normalizeSlot(); - $slot = $slot ? h('footer', { - staticClass: 'b-calendar-footer' - }, $slot) : h(); - var $widget = h('div', { - staticClass: 'b-calendar-inner', - style: this.block ? {} : { - width: this.width - }, - attrs: { - id: widgetId, - dir: isRTL ? 'rtl' : 'ltr', - lang: this.computedLocale || null, - role: 'group', - 'aria-disabled': disabled ? 'true' : null, - // If datepicker controls an input, this will specify the ID of the input - 'aria-controls': this.ariaControls || null, - // This should be a prop (so it can be changed to Date picker, etc, localized - 'aria-roledescription': this.roleDescription || null, - 'aria-describedby': [// Should the attr (if present) go last? - // Or should this attr be a prop? - this.bvAttrs['aria-describedby'], valueId, gridHelpId].filter(identity).join(' ') + $slot = $slot + ? h( + "footer", + { + staticClass: "b-calendar-footer", + }, + $slot + ) + : h(); + var $widget = h( + "div", + { + staticClass: "b-calendar-inner", + style: this.block + ? {} + : { + width: this.width, + }, + attrs: { + id: widgetId, + dir: isRTL ? "rtl" : "ltr", + lang: this.computedLocale || null, + role: "group", + "aria-disabled": disabled ? "true" : null, + // If datepicker controls an input, this will specify the ID of the input + "aria-controls": this.ariaControls || null, + // This should be a prop (so it can be changed to Date picker, etc, localized + "aria-roledescription": this.roleDescription || null, + "aria-describedby": [ + // Should the attr (if present) go last? + // Or should this attr be a prop? + this.bvAttrs["aria-describedby"], + valueId, + gridHelpId, + ] + .filter(identity) + .join(" "), + }, + on: { + keydown: this.onKeydownWrapper, + }, }, - on: { - keydown: this.onKeydownWrapper - } - }, [$header, $nav, $grid, $slot]); // Wrap in an outer div that can be styled + [$header, $nav, $grid, $slot] + ); // Wrap in an outer div that can be styled - return h('div', { - staticClass: 'b-calendar', - class: { - 'd-block': this.block - } - }, [$widget]); - } -});var noop = function noop() {};/**! + return h( + "div", + { + staticClass: "b-calendar", + class: { + "d-block": this.block, + }, + }, + [$widget] + ); + }, +}); +var noop = function noop() {}; +/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.16.1 * @license @@ -3357,17 +4994,23 @@ var BCalendar = Vue__default["default"].extend({ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined'; +var isBrowser = + typeof window !== "undefined" && + typeof document !== "undefined" && + typeof navigator !== "undefined"; -var timeoutDuration = function () { - var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; +var timeoutDuration = (function () { + var longerTimeoutBrowsers = ["Edge", "Trident", "Firefox"]; for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { - if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { + if ( + isBrowser && + navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0 + ) { return 1; } } return 0; -}(); +})(); function microtaskDebounce(fn) { var called = false; @@ -3399,14 +5042,14 @@ function taskDebounce(fn) { var supportsMicroTasks = isBrowser && window.Promise; /** -* Create a debounced version of a method, that's asynchronously deferred -* but called in the minimum time possible. -* -* @method -* @memberof Popper.Utils -* @argument {Function} fn -* @returns {Function} -*/ + * Create a debounced version of a method, that's asynchronously deferred + * but called in the minimum time possible. + * + * @method + * @memberof Popper.Utils + * @argument {Function} fn + * @returns {Function} + */ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; /** @@ -3418,7 +5061,10 @@ var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; */ function isFunction(functionToCheck) { var getType = {}; - return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; + return ( + functionToCheck && + getType.toString.call(functionToCheck) === "[object Function]" + ); } /** @@ -3446,7 +5092,7 @@ function getStyleComputedProperty(element, property) { * @returns {Element} parent */ function getParentNode(element) { - if (element.nodeName === 'HTML') { + if (element.nodeName === "HTML") { return element; } return element.parentNode || element.host; @@ -3466,19 +5112,19 @@ function getScrollParent(element) { } switch (element.nodeName) { - case 'HTML': - case 'BODY': + case "HTML": + case "BODY": return element.ownerDocument.body; - case '#document': + case "#document": return element.body; } // Firefox want us to check `-x` and `-y` variations as well var _getStyleComputedProp = getStyleComputedProperty(element), - overflow = _getStyleComputedProp.overflow, - overflowX = _getStyleComputedProp.overflowX, - overflowY = _getStyleComputedProp.overflowY; + overflow = _getStyleComputedProp.overflow, + overflowX = _getStyleComputedProp.overflowX, + overflowY = _getStyleComputedProp.overflowY; if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; @@ -3495,10 +5141,13 @@ function getScrollParent(element) { * @returns {Element} parent */ function getReferenceNode(reference) { - return reference && reference.referenceNode ? reference.referenceNode : reference; + return reference && reference.referenceNode + ? reference.referenceNode + : reference; } -var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); +var isIE11 = + isBrowser && !!(window.MSInputMethodContext && document.documentMode); var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); /** @@ -3541,13 +5190,18 @@ function getOffsetParent(element) { var nodeName = offsetParent && offsetParent.nodeName; - if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { - return element ? element.ownerDocument.documentElement : document.documentElement; + if (!nodeName || nodeName === "BODY" || nodeName === "HTML") { + return element + ? element.ownerDocument.documentElement + : document.documentElement; } // .offsetParent will return the closest TH, TD or TABLE in case // no offsetParent is present, I hate this job... - if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { + if ( + ["TH", "TD", "TABLE"].indexOf(offsetParent.nodeName) !== -1 && + getStyleComputedProperty(offsetParent, "position") === "static" + ) { return getOffsetParent(offsetParent); } @@ -3557,10 +5211,13 @@ function getOffsetParent(element) { function isOffsetContainer(element) { var nodeName = element.nodeName; - if (nodeName === 'BODY') { + if (nodeName === "BODY") { return false; } - return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; + return ( + nodeName === "HTML" || + getOffsetParent(element.firstElementChild) === element + ); } /** @@ -3593,7 +5250,9 @@ function findCommonOffsetParent(element1, element2) { } // Here we make sure to give as "start" the element that comes first in the DOM - var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; + var order = + element1.compareDocumentPosition(element2) & + Node.DOCUMENT_POSITION_FOLLOWING; var start = order ? element1 : element2; var end = order ? element2 : element1; @@ -3605,7 +5264,11 @@ function findCommonOffsetParent(element1, element2) { // Both nodes are inside #document - if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { + if ( + (element1 !== commonAncestorContainer && + element2 !== commonAncestorContainer) || + start.contains(end) + ) { if (isOffsetContainer(commonAncestorContainer)) { return commonAncestorContainer; } @@ -3631,12 +5294,13 @@ function findCommonOffsetParent(element1, element2) { * @returns {number} amount of scrolled pixels */ function getScroll(element) { - var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; + var side = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "top"; - var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; + var upperSide = side === "top" ? "scrollTop" : "scrollLeft"; var nodeName = element.nodeName; - if (nodeName === 'BODY' || nodeName === 'HTML') { + if (nodeName === "BODY" || nodeName === "HTML") { var html = element.ownerDocument.documentElement; var scrollingElement = element.ownerDocument.scrollingElement || html; return scrollingElement[upperSide]; @@ -3655,10 +5319,11 @@ function getScroll(element) { * @return {Object} rect - The modifier rect object */ function includeScroll(rect, element) { - var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var subtract = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var scrollTop = getScroll(element, 'top'); - var scrollLeft = getScroll(element, 'left'); + var scrollTop = getScroll(element, "top"); + var scrollLeft = getScroll(element, "left"); var modifier = subtract ? -1 : 1; rect.top += scrollTop * modifier; rect.bottom += scrollTop * modifier; @@ -3678,14 +5343,32 @@ function includeScroll(rect, element) { */ function getBordersSize(styles, axis) { - var sideA = axis === 'x' ? 'Left' : 'Top'; - var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; + var sideA = axis === "x" ? "Left" : "Top"; + var sideB = sideA === "Left" ? "Right" : "Bottom"; - return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']); + return ( + parseFloat(styles["border" + sideA + "Width"]) + + parseFloat(styles["border" + sideB + "Width"]) + ); } function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); + return Math.max( + body["offset" + axis], + body["scroll" + axis], + html["client" + axis], + html["offset" + axis], + html["scroll" + axis], + isIE(10) + ? parseInt(html["offset" + axis]) + + parseInt( + computedStyle["margin" + (axis === "Height" ? "Top" : "Left")] + ) + + parseInt( + computedStyle["margin" + (axis === "Height" ? "Bottom" : "Right")] + ) + : 0 + ); } function getWindowSizes(document) { @@ -3694,8 +5377,8 @@ function getWindowSizes(document) { var computedStyle = isIE(10) && getComputedStyle(html); return { - height: getSize('Height', body, html, computedStyle), - width: getSize('Width', body, html, computedStyle) + height: getSize("Height", body, html, computedStyle), + width: getSize("Width", body, html, computedStyle), }; } @@ -3705,7 +5388,7 @@ var classCallCheck = function (instance, Constructor) { } }; -var createClass = function () { +var createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; @@ -3721,11 +5404,7 @@ var createClass = function () { if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; -}(); - - - - +})(); var defineProperty = function (obj, key, value) { if (key in obj) { @@ -3733,7 +5412,7 @@ var defineProperty = function (obj, key, value) { value: value, enumerable: true, configurable: true, - writable: true + writable: true, }); } else { obj[key] = value; @@ -3742,19 +5421,21 @@ var defineProperty = function (obj, key, value) { return obj; }; -var _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; +var _extends = + Object.assign || + function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } } } - } - return target; -}; + return target; + }; /** * Given element offsets, generate an output similar to getBoundingClientRect @@ -3766,7 +5447,7 @@ var _extends = Object.assign || function (target) { function getClientRect(offsets) { return _extends({}, offsets, { right: offsets.left + offsets.width, - bottom: offsets.top + offsets.height + bottom: offsets.top + offsets.height, }); } @@ -3786,8 +5467,8 @@ function getBoundingClientRect(element) { try { if (isIE(10)) { rect = element.getBoundingClientRect(); - var scrollTop = getScroll(element, 'top'); - var scrollLeft = getScroll(element, 'left'); + var scrollTop = getScroll(element, "top"); + var scrollLeft = getScroll(element, "left"); rect.top += scrollTop; rect.left += scrollLeft; rect.bottom += scrollTop; @@ -3801,11 +5482,12 @@ function getBoundingClientRect(element) { left: rect.left, top: rect.top, width: rect.right - rect.left, - height: rect.bottom - rect.top + height: rect.bottom - rect.top, }; // subtract scrollbar size from sizes - var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; + var sizes = + element.nodeName === "HTML" ? getWindowSizes(element.ownerDocument) : {}; var width = sizes.width || element.clientWidth || result.width; var height = sizes.height || element.clientHeight || result.height; @@ -3816,8 +5498,8 @@ function getBoundingClientRect(element) { // we make this check conditional for performance reasons if (horizScrollbar || vertScrollbar) { var styles = getStyleComputedProperty(element); - horizScrollbar -= getBordersSize(styles, 'x'); - vertScrollbar -= getBordersSize(styles, 'y'); + horizScrollbar -= getBordersSize(styles, "x"); + vertScrollbar -= getBordersSize(styles, "y"); result.width -= horizScrollbar; result.height -= vertScrollbar; @@ -3827,10 +5509,11 @@ function getBoundingClientRect(element) { } function getOffsetRectRelativeToArbitraryNode(children, parent) { - var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var fixedPosition = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var isIE10 = isIE(10); - var isHTML = parent.nodeName === 'HTML'; + var isHTML = parent.nodeName === "HTML"; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); var scrollParent = getScrollParent(children); @@ -3848,7 +5531,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, width: childrenRect.width, - height: childrenRect.height + height: childrenRect.height, }); offsets.marginTop = 0; offsets.marginLeft = 0; @@ -3871,7 +5554,11 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { offsets.marginLeft = marginLeft; } - if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + if ( + isIE10 && !fixedPosition + ? parent.contains(scrollParent) + : parent === scrollParent && scrollParent.nodeName !== "BODY" + ) { offsets = includeScroll(offsets, parent); } @@ -3879,7 +5566,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { } function getViewportOffsetRectRelativeToArtbitraryNode(element) { - var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var excludeScroll = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); @@ -3887,13 +5575,13 @@ function getViewportOffsetRectRelativeToArtbitraryNode(element) { var height = Math.max(html.clientHeight, window.innerHeight || 0); var scrollTop = !excludeScroll ? getScroll(html) : 0; - var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; + var scrollLeft = !excludeScroll ? getScroll(html, "left") : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, width: width, - height: height + height: height, }; return getClientRect(offset); @@ -3909,10 +5597,10 @@ function getViewportOffsetRectRelativeToArtbitraryNode(element) { */ function isFixed(element) { var nodeName = element.nodeName; - if (nodeName === 'BODY' || nodeName === 'HTML') { + if (nodeName === "BODY" || nodeName === "HTML") { return false; } - if (getStyleComputedProperty(element, 'position') === 'fixed') { + if (getStyleComputedProperty(element, "position") === "fixed") { return true; } var parentNode = getParentNode(element); @@ -3936,7 +5624,7 @@ function getFixedPositionOffsetParent(element) { return document.documentElement; } var el = element.parentElement; - while (el && getStyleComputedProperty(el, 'transform') === 'none') { + while (el && getStyleComputedProperty(el, "transform") === "none") { el = el.parentElement; } return el || document.documentElement; @@ -3954,37 +5642,47 @@ function getFixedPositionOffsetParent(element) { * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { - var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var fixedPosition = + arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; // NOTE: 1 DOM access here var boundaries = { top: 0, left: 0 }; - var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); + var offsetParent = fixedPosition + ? getFixedPositionOffsetParent(popper) + : findCommonOffsetParent(popper, getReferenceNode(reference)); // Handle viewport case - if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); + if (boundariesElement === "viewport") { + boundaries = getViewportOffsetRectRelativeToArtbitraryNode( + offsetParent, + fixedPosition + ); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; - if (boundariesElement === 'scrollParent') { + if (boundariesElement === "scrollParent") { boundariesNode = getScrollParent(getParentNode(reference)); - if (boundariesNode.nodeName === 'BODY') { + if (boundariesNode.nodeName === "BODY") { boundariesNode = popper.ownerDocument.documentElement; } - } else if (boundariesElement === 'window') { + } else if (boundariesElement === "window") { boundariesNode = popper.ownerDocument.documentElement; } else { boundariesNode = boundariesElement; } - var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); + var offsets = getOffsetRectRelativeToArbitraryNode( + boundariesNode, + offsetParent, + fixedPosition + ); // In case of HTML, we need a different computation - if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { + if (boundariesNode.nodeName === "HTML" && !isFixed(offsetParent)) { var _getWindowSizes = getWindowSizes(popper.ownerDocument), - height = _getWindowSizes.height, - width = _getWindowSizes.width; + height = _getWindowSizes.height, + width = _getWindowSizes.width; boundaries.top += offsets.top - offsets.marginTop; boundaries.bottom = height + offsets.top; @@ -3998,7 +5696,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { // Add paddings padding = padding || 0; - var isPaddingNumber = typeof padding === 'number'; + var isPaddingNumber = typeof padding === "number"; boundaries.left += isPaddingNumber ? padding : padding.left || 0; boundaries.top += isPaddingNumber ? padding : padding.top || 0; boundaries.right -= isPaddingNumber ? padding : padding.right || 0; @@ -4009,7 +5707,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { function getArea(_ref) { var width = _ref.width, - height = _ref.height; + height = _ref.height; return width * height; } @@ -4023,10 +5721,17 @@ function getArea(_ref) { * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ -function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { - var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; - - if (placement.indexOf('auto') === -1) { +function computeAutoPlacement( + placement, + refRect, + popper, + reference, + boundariesElement +) { + var padding = + arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; + + if (placement.indexOf("auto") === -1) { return placement; } @@ -4035,43 +5740,50 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE var rects = { top: { width: boundaries.width, - height: refRect.top - boundaries.top + height: refRect.top - boundaries.top, }, right: { width: boundaries.right - refRect.right, - height: boundaries.height + height: boundaries.height, }, bottom: { width: boundaries.width, - height: boundaries.bottom - refRect.bottom + height: boundaries.bottom - refRect.bottom, }, left: { width: refRect.left - boundaries.left, - height: boundaries.height - } + height: boundaries.height, + }, }; - var sortedAreas = Object.keys(rects).map(function (key) { - return _extends({ - key: key - }, rects[key], { - area: getArea(rects[key]) + var sortedAreas = Object.keys(rects) + .map(function (key) { + return _extends( + { + key: key, + }, + rects[key], + { + area: getArea(rects[key]), + } + ); + }) + .sort(function (a, b) { + return b.area - a.area; }); - }).sort(function (a, b) { - return b.area - a.area; - }); var filteredAreas = sortedAreas.filter(function (_ref2) { var width = _ref2.width, - height = _ref2.height; + height = _ref2.height; return width >= popper.clientWidth && height >= popper.clientHeight; }); - var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; + var computedPlacement = + filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; - var variation = placement.split('-')[1]; + var variation = placement.split("-")[1]; - return computedPlacement + (variation ? '-' + variation : ''); + return computedPlacement + (variation ? "-" + variation : ""); } /** @@ -4085,10 +5797,17 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { - var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - - var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); - return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); + var fixedPosition = + arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition + ? getFixedPositionOffsetParent(popper) + : findCommonOffsetParent(popper, getReferenceNode(reference)); + return getOffsetRectRelativeToArbitraryNode( + reference, + commonOffsetParent, + fixedPosition + ); } /** @@ -4101,11 +5820,13 @@ function getReferenceOffsets(state, popper, reference) { function getOuterSizes(element) { var window = element.ownerDocument.defaultView; var styles = window.getComputedStyle(element); - var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); - var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); + var x = + parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); + var y = + parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); var result = { width: element.offsetWidth + y, - height: element.offsetHeight + x + height: element.offsetHeight + x, }; return result; } @@ -4118,7 +5839,7 @@ function getOuterSizes(element) { * @returns {String} flipped placement */ function getOppositePlacement(placement) { - var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; + var hash = { left: "right", right: "left", bottom: "top", top: "bottom" }; return placement.replace(/left|right|bottom|top/g, function (matched) { return hash[matched]; }); @@ -4135,7 +5856,7 @@ function getOppositePlacement(placement) { * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper */ function getPopperOffsets(popper, referenceOffsets, placement) { - placement = placement.split('-')[0]; + placement = placement.split("-")[0]; // Get popper node sizes var popperRect = getOuterSizes(popper); @@ -4143,21 +5864,26 @@ function getPopperOffsets(popper, referenceOffsets, placement) { // Add position, width and height to our offsets object var popperOffsets = { width: popperRect.width, - height: popperRect.height + height: popperRect.height, }; // depending by the popper placement we have to compute its offsets slightly differently - var isHoriz = ['right', 'left'].indexOf(placement) !== -1; - var mainSide = isHoriz ? 'top' : 'left'; - var secondarySide = isHoriz ? 'left' : 'top'; - var measurement = isHoriz ? 'height' : 'width'; - var secondaryMeasurement = !isHoriz ? 'height' : 'width'; - - popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; + var isHoriz = ["right", "left"].indexOf(placement) !== -1; + var mainSide = isHoriz ? "top" : "left"; + var secondarySide = isHoriz ? "left" : "top"; + var measurement = isHoriz ? "height" : "width"; + var secondaryMeasurement = !isHoriz ? "height" : "width"; + + popperOffsets[mainSide] = + referenceOffsets[mainSide] + + referenceOffsets[measurement] / 2 - + popperRect[measurement] / 2; if (placement === secondarySide) { - popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; + popperOffsets[secondarySide] = + referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; } else { - popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; + popperOffsets[secondarySide] = + referenceOffsets[getOppositePlacement(secondarySide)]; } return popperOffsets; @@ -4217,14 +5943,17 @@ function findIndex(arr, prop, value) { * @returns {dataObject} */ function runModifiers(modifiers, data, ends) { - var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); + var modifiersToRun = + ends === undefined + ? modifiers + : modifiers.slice(0, findIndex(modifiers, "name", ends)); modifiersToRun.forEach(function (modifier) { - if (modifier['function']) { + if (modifier["function"]) { // eslint-disable-line dot-notation - console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); + console.warn("`modifier.function` is deprecated, use `modifier.fn`!"); } - var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation + var fn = modifier["function"] || modifier.fn; // eslint-disable-line dot-notation if (modifier.enabled && isFunction(fn)) { // Add properties to offsets to make them a complete clientRect object // we do this before each modifier to make sure the previous one doesn't @@ -4258,16 +5987,28 @@ function update() { arrowStyles: {}, attributes: {}, flipped: false, - offsets: {} + offsets: {}, }; // compute reference element offsets - data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); + data.offsets.reference = getReferenceOffsets( + this.state, + this.popper, + this.reference, + this.options.positionFixed + ); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value - data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); + data.placement = computeAutoPlacement( + this.options.placement, + data.offsets.reference, + this.popper, + this.reference, + this.options.modifiers.flip.boundariesElement, + this.options.modifiers.flip.padding + ); // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; @@ -4275,9 +6016,15 @@ function update() { data.positionFixed = this.options.positionFixed; // compute the popper offsets - data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); + data.offsets.popper = getPopperOffsets( + this.popper, + data.offsets.reference, + data.placement + ); - data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; + data.offsets.popper.position = this.options.positionFixed + ? "fixed" + : "absolute"; // run the modifiers data = runModifiers(this.modifiers, data); @@ -4301,7 +6048,7 @@ function update() { function isModifierEnabled(modifiers, modifierName) { return modifiers.some(function (_ref) { var name = _ref.name, - enabled = _ref.enabled; + enabled = _ref.enabled; return enabled && name === modifierName; }); } @@ -4314,13 +6061,13 @@ function isModifierEnabled(modifiers, modifierName) { * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) */ function getSupportedPropertyName(property) { - var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; + var prefixes = [false, "ms", "Webkit", "Moz", "O"]; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; - var toCheck = prefix ? '' + prefix + upperProp : property; - if (typeof document.body.style[toCheck] !== 'undefined') { + var toCheck = prefix ? "" + prefix + upperProp : property; + if (typeof document.body.style[toCheck] !== "undefined") { return toCheck; } } @@ -4336,15 +6083,15 @@ function destroy() { this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled - if (isModifierEnabled(this.modifiers, 'applyStyle')) { - this.popper.removeAttribute('x-placement'); - this.popper.style.position = ''; - this.popper.style.top = ''; - this.popper.style.left = ''; - this.popper.style.right = ''; - this.popper.style.bottom = ''; - this.popper.style.willChange = ''; - this.popper.style[getSupportedPropertyName('transform')] = ''; + if (isModifierEnabled(this.modifiers, "applyStyle")) { + this.popper.removeAttribute("x-placement"); + this.popper.style.position = ""; + this.popper.style.top = ""; + this.popper.style.left = ""; + this.popper.style.right = ""; + this.popper.style.bottom = ""; + this.popper.style.willChange = ""; + this.popper.style[getSupportedPropertyName("transform")] = ""; } this.disableEventListeners(); @@ -4368,12 +6115,17 @@ function getWindow(element) { } function attachToScrollParents(scrollParent, event, callback, scrollParents) { - var isBody = scrollParent.nodeName === 'BODY'; + var isBody = scrollParent.nodeName === "BODY"; var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; target.addEventListener(event, callback, { passive: true }); if (!isBody) { - attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); + attachToScrollParents( + getScrollParent(target.parentNode), + event, + callback, + scrollParents + ); } scrollParents.push(target); } @@ -4387,11 +6139,18 @@ function attachToScrollParents(scrollParent, event, callback, scrollParents) { function setupEventListeners(reference, options, state, updateBound) { // Resize event listener on window state.updateBound = updateBound; - getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); + getWindow(reference).addEventListener("resize", state.updateBound, { + passive: true, + }); // Scroll event listener on scroll parents var scrollElement = getScrollParent(reference); - attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); + attachToScrollParents( + scrollElement, + "scroll", + state.updateBound, + state.scrollParents + ); state.scrollElement = scrollElement; state.eventsEnabled = true; @@ -4406,7 +6165,12 @@ function setupEventListeners(reference, options, state, updateBound) { */ function enableEventListeners() { if (!this.state.eventsEnabled) { - this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); + this.state = setupEventListeners( + this.reference, + this.options, + this.state, + this.scheduleUpdate + ); } } @@ -4418,11 +6182,11 @@ function enableEventListeners() { */ function removeEventListeners(reference, state) { // Remove resize event listener on window - getWindow(reference).removeEventListener('resize', state.updateBound); + getWindow(reference).removeEventListener("resize", state.updateBound); // Remove scroll event listener on scroll parents state.scrollParents.forEach(function (target) { - target.removeEventListener('scroll', state.updateBound); + target.removeEventListener("scroll", state.updateBound); }); // Reset state @@ -4455,7 +6219,7 @@ function disableEventListeners() { * @return {Boolean} */ function isNumeric(n) { - return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); + return n !== "" && !isNaN(parseFloat(n)) && isFinite(n); } /** @@ -4468,10 +6232,14 @@ function isNumeric(n) { */ function setStyles(element, styles) { Object.keys(styles).forEach(function (prop) { - var unit = ''; + var unit = ""; // add unit if the value is numeric and is one of the following - if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { - unit = 'px'; + if ( + ["width", "height", "top", "right", "bottom", "left"].indexOf(prop) !== + -1 && + isNumeric(styles[prop]) + ) { + unit = "px"; } element.style[prop] = styles[prop] + unit; }); @@ -4536,18 +6304,30 @@ function applyStyle(data) { */ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // compute reference element offsets - var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); + var referenceOffsets = getReferenceOffsets( + state, + popper, + reference, + options.positionFixed + ); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value - var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); + var placement = computeAutoPlacement( + options.placement, + referenceOffsets, + popper, + reference, + options.modifiers.flip.boundariesElement, + options.modifiers.flip.padding + ); - popper.setAttribute('x-placement', placement); + popper.setAttribute("x-placement", placement); // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations - setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); + setStyles(popper, { position: options.positionFixed ? "fixed" : "absolute" }); return options; } @@ -4573,10 +6353,10 @@ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { */ function getRoundedOffsets(data, shouldRound) { var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; var round = Math.round, - floor = Math.floor; + floor = Math.floor; var noRound = function noRound(v) { return v; @@ -4585,19 +6365,27 @@ function getRoundedOffsets(data, shouldRound) { var referenceWidth = round(reference.width); var popperWidth = round(popper.width); - var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; - var isVariation = data.placement.indexOf('-') !== -1; + var isVertical = ["left", "right"].indexOf(data.placement) !== -1; + var isVariation = data.placement.indexOf("-") !== -1; var sameWidthParity = referenceWidth % 2 === popperWidth % 2; var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; - var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; + var horizontalToInteger = !shouldRound + ? noRound + : isVertical || isVariation || sameWidthParity + ? round + : floor; var verticalToInteger = !shouldRound ? noRound : round; return { - left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), + left: horizontalToInteger( + bothOddWidth && !isVariation && shouldRound + ? popper.left - 1 + : popper.left + ), top: verticalToInteger(popper.top), bottom: verticalToInteger(popper.bottom), - right: horizontalToInteger(popper.right) + right: horizontalToInteger(popper.right), }; } @@ -4612,36 +6400,47 @@ var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent); */ function computeStyle(data, options) { var x = options.x, - y = options.y; + y = options.y; var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2 - var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { - return modifier.name === 'applyStyle'; - }).gpuAcceleration; + var legacyGpuAccelerationOption = find( + data.instance.modifiers, + function (modifier) { + return modifier.name === "applyStyle"; + } + ).gpuAcceleration; if (legacyGpuAccelerationOption !== undefined) { - console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); + console.warn( + "WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!" + ); } - var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; + var gpuAcceleration = + legacyGpuAccelerationOption !== undefined + ? legacyGpuAccelerationOption + : options.gpuAcceleration; var offsetParent = getOffsetParent(data.instance.popper); var offsetParentRect = getBoundingClientRect(offsetParent); // Styles var styles = { - position: popper.position + position: popper.position, }; - var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); + var offsets = getRoundedOffsets( + data, + window.devicePixelRatio < 2 || !isFirefox + ); - var sideA = x === 'bottom' ? 'top' : 'bottom'; - var sideB = y === 'right' ? 'left' : 'right'; + var sideA = x === "bottom" ? "top" : "bottom"; + var sideB = y === "right" ? "left" : "right"; // if gpuAcceleration is set to `true` and transform is supported, // we use `translate3d` to apply the position to the popper we // automatically use the supported prefixed version if needed - var prefixedProperty = getSupportedPropertyName('transform'); + var prefixedProperty = getSupportedPropertyName("transform"); // now, let's make a step back and look at this code closely (wtf?) // If the content of the popper grows once it's been positioned, it @@ -4653,11 +6452,11 @@ function computeStyle(data, options) { // `x` to `top` to make the popper grow towards its top instead of // its bottom. var left = void 0, - top = void 0; - if (sideA === 'bottom') { + top = void 0; + if (sideA === "bottom") { // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar) // and not the bottom of the html element - if (offsetParent.nodeName === 'HTML') { + if (offsetParent.nodeName === "HTML") { top = -offsetParent.clientHeight + offsets.bottom; } else { top = -offsetParentRect.height + offsets.bottom; @@ -4665,8 +6464,8 @@ function computeStyle(data, options) { } else { top = offsets.top; } - if (sideB === 'right') { - if (offsetParent.nodeName === 'HTML') { + if (sideB === "right") { + if (offsetParent.nodeName === "HTML") { left = -offsetParent.clientWidth + offsets.right; } else { left = -offsetParentRect.width + offsets.right; @@ -4675,22 +6474,22 @@ function computeStyle(data, options) { left = offsets.left; } if (gpuAcceleration && prefixedProperty) { - styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; + styles[prefixedProperty] = "translate3d(" + left + "px, " + top + "px, 0)"; styles[sideA] = 0; styles[sideB] = 0; - styles.willChange = 'transform'; + styles.willChange = "transform"; } else { // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties - var invertTop = sideA === 'bottom' ? -1 : 1; - var invertLeft = sideB === 'right' ? -1 : 1; + var invertTop = sideA === "bottom" ? -1 : 1; + var invertLeft = sideB === "right" ? -1 : 1; styles[sideA] = top * invertTop; styles[sideB] = left * invertLeft; - styles.willChange = sideA + ', ' + sideB; + styles.willChange = sideA + ", " + sideB; } // Attributes var attributes = { - 'x-placement': data.placement + "x-placement": data.placement, }; // Update `data` attributes, styles and arrowStyles @@ -4717,14 +6516,27 @@ function isModifierRequired(modifiers, requestingName, requestedName) { return name === requestingName; }); - var isRequired = !!requesting && modifiers.some(function (modifier) { - return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; - }); + var isRequired = + !!requesting && + modifiers.some(function (modifier) { + return ( + modifier.name === requestedName && + modifier.enabled && + modifier.order < requesting.order + ); + }); if (!isRequired) { - var _requesting = '`' + requestingName + '`'; - var requested = '`' + requestedName + '`'; - console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); + var _requesting = "`" + requestingName + "`"; + var requested = "`" + requestedName + "`"; + console.warn( + requested + + " modifier is required by " + + _requesting + + " modifier in order to work, be sure to include it before " + + _requesting + + "!" + ); } return isRequired; } @@ -4740,14 +6552,14 @@ function arrow(data, options) { var _data$offsets$arrow; // arrow depends on keepTogether in order to work - if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { + if (!isModifierRequired(data.instance.modifiers, "arrow", "keepTogether")) { return data; } var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector - if (typeof arrowElement === 'string') { + if (typeof arrowElement === "string") { arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier @@ -4758,23 +6570,25 @@ function arrow(data, options) { // if the arrowElement isn't a query selector we must check that the // provided DOM node is child of its popper node if (!data.instance.popper.contains(arrowElement)) { - console.warn('WARNING: `arrow.element` must be child of its popper element!'); + console.warn( + "WARNING: `arrow.element` must be child of its popper element!" + ); return data; } } - var placement = data.placement.split('-')[0]; + var placement = data.placement.split("-")[0]; var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; - var isVertical = ['left', 'right'].indexOf(placement) !== -1; + var isVertical = ["left", "right"].indexOf(placement) !== -1; - var len = isVertical ? 'height' : 'width'; - var sideCapitalized = isVertical ? 'Top' : 'Left'; + var len = isVertical ? "height" : "width"; + var sideCapitalized = isVertical ? "Top" : "Left"; var side = sideCapitalized.toLowerCase(); - var altSide = isVertical ? 'left' : 'top'; - var opSide = isVertical ? 'bottom' : 'right'; + var altSide = isVertical ? "left" : "top"; + var opSide = isVertical ? "bottom" : "right"; var arrowElementSize = getOuterSizes(arrowElement)[len]; // @@ -4784,11 +6598,13 @@ function arrow(data, options) { // top/left side if (reference[opSide] - arrowElementSize < popper[side]) { - data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); + data.offsets.popper[side] -= + popper[side] - (reference[opSide] - arrowElementSize); } // bottom/right side if (reference[side] + arrowElementSize > popper[opSide]) { - data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; + data.offsets.popper[side] += + reference[side] + arrowElementSize - popper[opSide]; } data.offsets.popper = getClientRect(data.offsets.popper); @@ -4798,15 +6614,20 @@ function arrow(data, options) { // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available var css = getStyleComputedProperty(data.instance.popper); - var popperMarginSide = parseFloat(css['margin' + sideCapitalized]); - var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']); - var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; + var popperMarginSide = parseFloat(css["margin" + sideCapitalized]); + var popperBorderSide = parseFloat(css["border" + sideCapitalized + "Width"]); + var sideValue = + center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; - data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); + data.offsets.arrow = + ((_data$offsets$arrow = {}), + defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), + defineProperty(_data$offsets$arrow, altSide, ""), + _data$offsets$arrow); return data; } @@ -4819,10 +6640,10 @@ function arrow(data, options) { * @returns {String} flipped placement variation */ function getOppositeVariation(variation) { - if (variation === 'end') { - return 'start'; - } else if (variation === 'start') { - return 'end'; + if (variation === "end") { + return "start"; + } else if (variation === "start") { + return "end"; } return variation; } @@ -4858,7 +6679,23 @@ function getOppositeVariation(variation) { * @method placements * @memberof Popper */ -var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; +var placements = [ + "auto-start", + "auto", + "auto-end", + "top-start", + "top", + "top-end", + "right-start", + "right", + "right-end", + "bottom-end", + "bottom", + "bottom-start", + "left-end", + "left", + "left-start", +]; // Get rid of `auto` `auto-start` and `auto-end` var validPlacements = placements.slice(3); @@ -4874,17 +6711,20 @@ var validPlacements = placements.slice(3); * @returns {Array} placements including their variations */ function clockwise(placement) { - var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var counter = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var index = validPlacements.indexOf(placement); - var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); + var arr = validPlacements + .slice(index + 1) + .concat(validPlacements.slice(0, index)); return counter ? arr.reverse() : arr; } var BEHAVIORS = { - FLIP: 'flip', - CLOCKWISE: 'clockwise', - COUNTERCLOCKWISE: 'counterclockwise' + FLIP: "flip", + CLOCKWISE: "clockwise", + COUNTERCLOCKWISE: "counterclockwise", }; /** @@ -4896,7 +6736,7 @@ var BEHAVIORS = { */ function flip(data, options) { // if `inner` modifier is enabled, we can't use the `flip` modifier - if (isModifierEnabled(data.instance.modifiers, 'inner')) { + if (isModifierEnabled(data.instance.modifiers, "inner")) { return data; } @@ -4905,11 +6745,17 @@ function flip(data, options) { return data; } - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); + var boundaries = getBoundaries( + data.instance.popper, + data.instance.reference, + options.padding, + options.boundariesElement, + data.positionFixed + ); - var placement = data.placement.split('-')[0]; + var placement = data.placement.split("-")[0]; var placementOpposite = getOppositePlacement(placement); - var variation = data.placement.split('-')[1] || ''; + var variation = data.placement.split("-")[1] || ""; var flipOrder = []; @@ -4932,7 +6778,7 @@ function flip(data, options) { return data; } - placement = data.placement.split('-')[0]; + placement = data.placement.split("-")[0]; placementOpposite = getOppositePlacement(placement); var popperOffsets = data.offsets.popper; @@ -4940,23 +6786,46 @@ function flip(data, options) { // using floor because the reference offsets may contain decimals we are not going to consider here var floor = Math.floor; - var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); + var overlapsRef = + (placement === "left" && + floor(popperOffsets.right) > floor(refOffsets.left)) || + (placement === "right" && + floor(popperOffsets.left) < floor(refOffsets.right)) || + (placement === "top" && + floor(popperOffsets.bottom) > floor(refOffsets.top)) || + (placement === "bottom" && + floor(popperOffsets.top) < floor(refOffsets.bottom)); var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); - var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); + var overflowsBottom = + floor(popperOffsets.bottom) > floor(boundaries.bottom); - var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; + var overflowsBoundaries = + (placement === "left" && overflowsLeft) || + (placement === "right" && overflowsRight) || + (placement === "top" && overflowsTop) || + (placement === "bottom" && overflowsBottom); // flip the variation if required - var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; + var isVertical = ["top", "bottom"].indexOf(placement) !== -1; // flips variation if reference element overflows boundaries - var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); + var flippedVariationByRef = + !!options.flipVariations && + ((isVertical && variation === "start" && overflowsLeft) || + (isVertical && variation === "end" && overflowsRight) || + (!isVertical && variation === "start" && overflowsTop) || + (!isVertical && variation === "end" && overflowsBottom)); // flips variation if popper content overflows boundaries - var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop); + var flippedVariationByContent = + !!options.flipVariationsByContent && + ((isVertical && variation === "start" && overflowsRight) || + (isVertical && variation === "end" && overflowsLeft) || + (!isVertical && variation === "start" && overflowsBottom) || + (!isVertical && variation === "end" && overflowsTop)); var flippedVariation = flippedVariationByRef || flippedVariationByContent; @@ -4972,13 +6841,21 @@ function flip(data, options) { variation = getOppositeVariation(variation); } - data.placement = placement + (variation ? '-' + variation : ''); + data.placement = placement + (variation ? "-" + variation : ""); // this object contains `position`, we want to preserve it along with // any additional property we may add in the future - data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); - - data = runModifiers(data.instance.modifiers, data, 'flip'); + data.offsets.popper = _extends( + {}, + data.offsets.popper, + getPopperOffsets( + data.instance.popper, + data.offsets.reference, + data.placement + ) + ); + + data = runModifiers(data.instance.modifiers, data, "flip"); } }); return data; @@ -4993,18 +6870,19 @@ function flip(data, options) { */ function keepTogether(data) { var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; - var placement = data.placement.split('-')[0]; + var placement = data.placement.split("-")[0]; var floor = Math.floor; - var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; - var side = isVertical ? 'right' : 'bottom'; - var opSide = isVertical ? 'left' : 'top'; - var measurement = isVertical ? 'width' : 'height'; + var isVertical = ["top", "bottom"].indexOf(placement) !== -1; + var side = isVertical ? "right" : "bottom"; + var opSide = isVertical ? "left" : "top"; + var measurement = isVertical ? "width" : "height"; if (popper[side] < floor(reference[opSide])) { - data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; + data.offsets.popper[opSide] = + floor(reference[opSide]) - popper[measurement]; } if (popper[opSide] > floor(reference[side])) { data.offsets.popper[opSide] = floor(reference[side]); @@ -5036,29 +6914,35 @@ function toValue(str, measurement, popperOffsets, referenceOffsets) { return str; } - if (unit.indexOf('%') === 0) { + if (unit.indexOf("%") === 0) { var element = void 0; switch (unit) { - case '%p': + case "%p": element = popperOffsets; break; - case '%': - case '%r': + case "%": + case "%r": default: element = referenceOffsets; } var rect = getClientRect(element); - return rect[measurement] / 100 * value; - } else if (unit === 'vh' || unit === 'vw') { + return (rect[measurement] / 100) * value; + } else if (unit === "vh" || unit === "vw") { // if is a vh or vw, we calculate the size based on the viewport var size = void 0; - if (unit === 'vh') { - size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); + if (unit === "vh") { + size = Math.max( + document.documentElement.clientHeight, + window.innerHeight || 0 + ); } else { - size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); + size = Math.max( + document.documentElement.clientWidth, + window.innerWidth || 0 + ); } - return size / 100 * value; + return (size / 100) * value; } else { // if is an explicit pixel unit, we get rid of the unit and keep the value // if is an implicit unit, it's px, and we return just the value @@ -5083,7 +6967,7 @@ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { // Use height if placement is left or right and index is 0 otherwise use width // in this way the first offset will use an axis and the second one // will use the other one - var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; + var useHeight = ["right", "left"].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands // The regex addresses values with the plus or minus sign in front (+10, -20, etc) @@ -5093,51 +6977,69 @@ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { // Detect if the offset string contains a pair of values or a single one // they could be separated by comma or space - var divider = fragments.indexOf(find(fragments, function (frag) { - return frag.search(/,|\s/) !== -1; - })); + var divider = fragments.indexOf( + find(fragments, function (frag) { + return frag.search(/,|\s/) !== -1; + }) + ); - if (fragments[divider] && fragments[divider].indexOf(',') === -1) { - console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); + if (fragments[divider] && fragments[divider].indexOf(",") === -1) { + console.warn( + "Offsets separated by white space(s) are deprecated, use a comma (,) instead." + ); } // If divider is found, we divide the list of values and operands to divide // them by ofset X and Y. var splitRegex = /\s*,\s*|\s+/; - var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; + var ops = + divider !== -1 + ? [ + fragments + .slice(0, divider) + .concat([fragments[divider].split(splitRegex)[0]]), + [fragments[divider].split(splitRegex)[1]].concat( + fragments.slice(divider + 1) + ), + ] + : [fragments]; // Convert the values with units to absolute pixels to allow our computations ops = ops.map(function (op, index) { // Most of the units rely on the orientation of the popper - var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; + var measurement = (index === 1 ? !useHeight : useHeight) + ? "height" + : "width"; var mergeWithPrevious = false; - return op - // This aggregates any `+` or `-` sign that aren't considered operators - // e.g.: 10 + +5 => [10, +, +5] - .reduce(function (a, b) { - if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { - a[a.length - 1] = b; - mergeWithPrevious = true; - return a; - } else if (mergeWithPrevious) { - a[a.length - 1] += b; - mergeWithPrevious = false; - return a; - } else { - return a.concat(b); - } - }, []) - // Here we convert the string values into number values (in px) - .map(function (str) { - return toValue(str, measurement, popperOffsets, referenceOffsets); - }); + return ( + op + // This aggregates any `+` or `-` sign that aren't considered operators + // e.g.: 10 + +5 => [10, +, +5] + .reduce(function (a, b) { + if (a[a.length - 1] === "" && ["+", "-"].indexOf(b) !== -1) { + a[a.length - 1] = b; + mergeWithPrevious = true; + return a; + } else if (mergeWithPrevious) { + a[a.length - 1] += b; + mergeWithPrevious = false; + return a; + } else { + return a.concat(b); + } + }, []) + // Here we convert the string values into number values (in px) + .map(function (str) { + return toValue(str, measurement, popperOffsets, referenceOffsets); + }) + ); }); // Loop trough the offsets arrays and execute the operations ops.forEach(function (op, index) { op.forEach(function (frag, index2) { if (isNumeric(frag)) { - offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); + offsets[index] += frag * (op[index2 - 1] === "-" ? -1 : 1); } }); }); @@ -5156,11 +7058,11 @@ function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { function offset(data, _ref) { var offset = _ref.offset; var placement = data.placement, - _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; - var basePlacement = placement.split('-')[0]; + var basePlacement = placement.split("-")[0]; var offsets = void 0; if (isNumeric(+offset)) { @@ -5169,16 +7071,16 @@ function offset(data, _ref) { offsets = parseOffset(offset, popper, reference, basePlacement); } - if (basePlacement === 'left') { + if (basePlacement === "left") { popper.top += offsets[0]; popper.left -= offsets[1]; - } else if (basePlacement === 'right') { + } else if (basePlacement === "right") { popper.top += offsets[0]; popper.left += offsets[1]; - } else if (basePlacement === 'top') { + } else if (basePlacement === "top") { popper.left += offsets[0]; popper.top -= offsets[1]; - } else if (basePlacement === 'bottom') { + } else if (basePlacement === "bottom") { popper.left += offsets[0]; popper.top += offsets[1]; } @@ -5195,7 +7097,8 @@ function offset(data, _ref) { * @returns {Object} The data object, properly modified */ function preventOverflow(data, options) { - var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); + var boundariesElement = + options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to // go one step up and use the next offsetParent as reference to @@ -5207,17 +7110,23 @@ function preventOverflow(data, options) { // NOTE: DOM access here // resets the popper's position so that the document size can be calculated excluding // the size of the popper element itself - var transformProp = getSupportedPropertyName('transform'); + var transformProp = getSupportedPropertyName("transform"); var popperStyles = data.instance.popper.style; // assignment to help minification var top = popperStyles.top, - left = popperStyles.left, - transform = popperStyles[transformProp]; + left = popperStyles.left, + transform = popperStyles[transformProp]; - popperStyles.top = ''; - popperStyles.left = ''; - popperStyles[transformProp] = ''; + popperStyles.top = ""; + popperStyles.left = ""; + popperStyles[transformProp] = ""; - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); + var boundaries = getBoundaries( + data.instance.popper, + data.instance.reference, + options.padding, + boundariesElement, + data.positionFixed + ); // NOTE: DOM access here // restores the original style properties after the offsets have been computed @@ -5233,23 +7142,34 @@ function preventOverflow(data, options) { var check = { primary: function primary(placement) { var value = popper[placement]; - if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { + if ( + popper[placement] < boundaries[placement] && + !options.escapeWithReference + ) { value = Math.max(popper[placement], boundaries[placement]); } return defineProperty({}, placement, value); }, secondary: function secondary(placement) { - var mainSide = placement === 'right' ? 'left' : 'top'; + var mainSide = placement === "right" ? "left" : "top"; var value = popper[mainSide]; - if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { - value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); + if ( + popper[placement] > boundaries[placement] && + !options.escapeWithReference + ) { + value = Math.min( + popper[mainSide], + boundaries[placement] - + (placement === "right" ? popper.width : popper.height) + ); } return defineProperty({}, mainSide, value); - } + }, }; order.forEach(function (placement) { - var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; + var side = + ["left", "top"].indexOf(placement) !== -1 ? "primary" : "secondary"; popper = _extends({}, popper, check[side](placement)); }); @@ -5267,22 +7187,26 @@ function preventOverflow(data, options) { */ function shift(data) { var placement = data.placement; - var basePlacement = placement.split('-')[0]; - var shiftvariation = placement.split('-')[1]; + var basePlacement = placement.split("-")[0]; + var shiftvariation = placement.split("-")[1]; // if shift shiftvariation is specified, run the modifier if (shiftvariation) { var _data$offsets = data.offsets, - reference = _data$offsets.reference, - popper = _data$offsets.popper; + reference = _data$offsets.reference, + popper = _data$offsets.popper; - var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; - var side = isVertical ? 'left' : 'top'; - var measurement = isVertical ? 'width' : 'height'; + var isVertical = ["bottom", "top"].indexOf(basePlacement) !== -1; + var side = isVertical ? "left" : "top"; + var measurement = isVertical ? "width" : "height"; var shiftOffsets = { start: defineProperty({}, side, reference[side]), - end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) + end: defineProperty( + {}, + side, + reference[side] + reference[measurement] - popper[measurement] + ), }; data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); @@ -5299,23 +7223,28 @@ function shift(data) { * @returns {Object} The data object, properly modified */ function hide(data) { - if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { + if (!isModifierRequired(data.instance.modifiers, "hide", "preventOverflow")) { return data; } var refRect = data.offsets.reference; var bound = find(data.instance.modifiers, function (modifier) { - return modifier.name === 'preventOverflow'; + return modifier.name === "preventOverflow"; }).boundaries; - if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { + if ( + refRect.bottom < bound.top || + refRect.left > bound.right || + refRect.top > bound.bottom || + refRect.right < bound.left + ) { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === true) { return data; } data.hide = true; - data.attributes['x-out-of-boundaries'] = ''; + data.attributes["x-out-of-boundaries"] = ""; } else { // Avoid unnecessary DOM access if visibility hasn't changed if (data.hide === false) { @@ -5323,7 +7252,7 @@ function hide(data) { } data.hide = false; - data.attributes['x-out-of-boundaries'] = false; + data.attributes["x-out-of-boundaries"] = false; } return data; @@ -5338,16 +7267,18 @@ function hide(data) { */ function inner(data) { var placement = data.placement; - var basePlacement = placement.split('-')[0]; + var basePlacement = placement.split("-")[0]; var _data$offsets = data.offsets, - popper = _data$offsets.popper, - reference = _data$offsets.reference; + popper = _data$offsets.popper, + reference = _data$offsets.reference; - var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; + var isHoriz = ["left", "right"].indexOf(basePlacement) !== -1; - var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; + var subtractLength = ["top", "left"].indexOf(basePlacement) === -1; - popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); + popper[isHoriz ? "left" : "top"] = + reference[basePlacement] - + (subtractLength ? popper[isHoriz ? "width" : "height"] : 0); data.placement = getOppositePlacement(placement); data.offsets.popper = getClientRect(popper); @@ -5391,7 +7322,7 @@ var modifiers = { /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ - fn: shift + fn: shift, }, /** @@ -5442,7 +7373,7 @@ var modifiers = { /** @prop {Number|String} offset=0 * The offset value as described in the modifier description */ - offset: 0 + offset: 0, }, /** @@ -5474,7 +7405,7 @@ var modifiers = { * Popper will try to prevent overflow following these priorities by default, * then, it could overflow on the left and on top of the `boundariesElement` */ - priority: ['left', 'right', 'top', 'bottom'], + priority: ["left", "right", "top", "bottom"], /** * @prop {number} padding=5 * Amount of pixel used to define a minimum distance between the boundaries @@ -5487,7 +7418,7 @@ var modifiers = { * Boundaries used by the modifier. Can be `scrollParent`, `window`, * `viewport` or any DOM element. */ - boundariesElement: 'scrollParent' + boundariesElement: "scrollParent", }, /** @@ -5505,7 +7436,7 @@ var modifiers = { /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ - fn: keepTogether + fn: keepTogether, }, /** @@ -5526,7 +7457,7 @@ var modifiers = { /** @prop {ModifierFn} */ fn: arrow, /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ - element: '[x-arrow]' + element: "[x-arrow]", }, /** @@ -5553,7 +7484,7 @@ var modifiers = { * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid * placements (with optional variations) */ - behavior: 'flip', + behavior: "flip", /** * @prop {number} padding=5 * The popper will flip if it hits the edges of the `boundariesElement` @@ -5565,7 +7496,7 @@ var modifiers = { * The popper will never be placed outside of the defined boundaries * (except if `keepTogether` is enabled) */ - boundariesElement: 'viewport', + boundariesElement: "viewport", /** * @prop {Boolean} flipVariations=false * The popper will switch placement variation between `-start` and `-end` when @@ -5581,7 +7512,7 @@ var modifiers = { * * The original placement should have a set variation. */ - flipVariationsByContent: false + flipVariationsByContent: false, }, /** @@ -5597,7 +7528,7 @@ var modifiers = { /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ enabled: false, /** @prop {ModifierFn} */ - fn: inner + fn: inner, }, /** @@ -5616,7 +7547,7 @@ var modifiers = { /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled: true, /** @prop {ModifierFn} */ - fn: hide + fn: hide, }, /** @@ -5652,13 +7583,13 @@ var modifiers = { * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. * Change this if your popper should grow in a direction different from `bottom` */ - x: 'bottom', + x: "bottom", /** * @prop {string} [x='left'] * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. * Change this if your popper should grow in a direction different from `right` */ - y: 'right' + y: "right", }, /** @@ -5691,8 +7622,8 @@ var modifiers = { * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ - gpuAcceleration: undefined - } + gpuAcceleration: undefined, + }, }; /** @@ -5735,7 +7666,7 @@ var Defaults = { * Popper's placement. * @prop {Popper.placements} placement='bottom' */ - placement: 'bottom', + placement: "bottom", /** * Set this to true if you want popper to position it self in 'fixed' mode @@ -5779,7 +7710,7 @@ var Defaults = { * They provide most of the functionalities of Popper.js. * @prop {modifiers} */ - modifiers: modifiers + modifiers: modifiers, }; /** @@ -5794,7 +7725,7 @@ var Defaults = { // Utils // Methods -var Popper = function () { +var Popper = (function () { /** * Creates a new Popper.js instance. * @class Popper @@ -5806,7 +7737,8 @@ var Popper = function () { function Popper(reference, popper) { var _this = this; - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var options = + arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; classCallCheck(this, Popper); this.scheduleUpdate = function () { @@ -5823,7 +7755,7 @@ var Popper = function () { this.state = { isDestroyed: false, isCreated: false, - scrollParents: [] + scrollParents: [], }; // get reference and popper elements (allow jQuery wrappers) @@ -5832,20 +7764,30 @@ var Popper = function () { // Deep merge modifiers options this.options.modifiers = {}; - Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { - _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); + Object.keys( + _extends({}, Popper.Defaults.modifiers, options.modifiers) + ).forEach(function (name) { + _this.options.modifiers[name] = _extends( + {}, + Popper.Defaults.modifiers[name] || {}, + options.modifiers ? options.modifiers[name] : {} + ); }); // Refactoring modifiers' list (Object => Array) - this.modifiers = Object.keys(this.options.modifiers).map(function (name) { - return _extends({ - name: name - }, _this.options.modifiers[name]); - }) - // sort the modifiers by order - .sort(function (a, b) { - return a.order - b.order; - }); + this.modifiers = Object.keys(this.options.modifiers) + .map(function (name) { + return _extends( + { + name: name, + }, + _this.options.modifiers[name] + ); + }) + // sort the modifiers by order + .sort(function (a, b) { + return a.order - b.order; + }); // modifiers have the ability to execute arbitrary code when Popper.js get inited // such code is executed in the same order of its modifier @@ -5853,7 +7795,13 @@ var Popper = function () { // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! this.modifiers.forEach(function (modifierOptions) { if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { - modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); + modifierOptions.onLoad( + _this.reference, + _this.popper, + _this.options, + modifierOptions, + _this.state + ); } }); @@ -5872,55 +7820,57 @@ var Popper = function () { // We can't use class properties because they don't get listed in the // class prototype and break stuff like Sinon stubs + createClass(Popper, [ + { + key: "update", + value: function update$$1() { + return update.call(this); + }, + }, + { + key: "destroy", + value: function destroy$$1() { + return destroy.call(this); + }, + }, + { + key: "enableEventListeners", + value: function enableEventListeners$$1() { + return enableEventListeners.call(this); + }, + }, + { + key: "disableEventListeners", + value: function disableEventListeners$$1() { + return disableEventListeners.call(this); + }, - createClass(Popper, [{ - key: 'update', - value: function update$$1() { - return update.call(this); - } - }, { - key: 'destroy', - value: function destroy$$1() { - return destroy.call(this); - } - }, { - key: 'enableEventListeners', - value: function enableEventListeners$$1() { - return enableEventListeners.call(this); - } - }, { - key: 'disableEventListeners', - value: function disableEventListeners$$1() { - return disableEventListeners.call(this); - } - - /** - * Schedules an update. It will run on the next UI update available. - * @method scheduleUpdate - * @memberof Popper - */ - - - /** - * Collection of utilities useful when writing custom modifiers. - * Starting from version 1.7, this method is available only if you - * include `popper-utils.js` before `popper.js`. - * - * **DEPRECATION**: This way to access PopperUtils is deprecated - * and will be removed in v2! Use the PopperUtils module directly instead. - * Due to the high instability of the methods contained in Utils, we can't - * guarantee them to follow semver. Use them at your own risk! - * @static - * @private - * @type {Object} - * @deprecated since version 1.8 - * @member Utils - * @memberof Popper - */ - - }]); + /** + * Schedules an update. It will run on the next UI update available. + * @method scheduleUpdate + * @memberof Popper + */ + + /** + * Collection of utilities useful when writing custom modifiers. + * Starting from version 1.7, this method is available only if you + * include `popper-utils.js` before `popper.js`. + * + * **DEPRECATION**: This way to access PopperUtils is deprecated + * and will be removed in v2! Use the PopperUtils module directly instead. + * Due to the high instability of the methods contained in Utils, we can't + * guarantee them to follow semver. Use them at your own risk! + * @static + * @private + * @type {Object} + * @deprecated since version 1.8 + * @member Utils + * @memberof Popper + */ + }, + ]); return Popper; -}(); +})(); /** * The `referenceObject` is an object that provides an interface compatible with Popper.js @@ -5942,37 +7892,56 @@ var Popper = function () { * An ES6 getter that will return the height of the virtual reference element. */ - -Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; +Popper.Utils = (typeof window !== "undefined" ? window : global).PopperUtils; Popper.placements = placements; Popper.Defaults = Defaults; +var PLACEMENT_TOP_START = "top-start"; +var PLACEMENT_TOP_END = "top-end"; +var PLACEMENT_BOTTOM_START = "bottom-start"; +var PLACEMENT_BOTTOM_END = "bottom-end"; +var PLACEMENT_RIGHT_START = "right-start"; +var PLACEMENT_LEFT_START = "left-start"; +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} -var Popper$1 = Popper;var PLACEMENT_TOP_START = 'top-start'; -var PLACEMENT_TOP_END = 'top-end'; -var PLACEMENT_BOTTOM_START = 'bottom-start'; -var PLACEMENT_BOTTOM_END = 'bottom-end'; -var PLACEMENT_RIGHT_START = 'right-start'; -var PLACEMENT_LEFT_START = 'left-start';function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } +} -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -var BvEvent = /*#__PURE__*/function () { +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +var BvEvent = /*#__PURE__*/ (function () { function BvEvent(type) { - var eventInit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var eventInit = + arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck(this, BvEvent); // Start by emulating native Event constructor if (!type) { /* istanbul ignore next */ - throw new TypeError("Failed to construct '".concat(this.constructor.name, "'. 1 argument required, ").concat(arguments.length, " given.")); + throw new TypeError( + "Failed to construct '" + .concat(this.constructor.name, "'. 1 argument required, ") + .concat(arguments.length, " given.") + ); } // Merge defaults first, the eventInit, and the type last // so it can't be overwritten - assign(this, BvEvent.Defaults, this.constructor.Defaults, eventInit, { - type: type + type: type, }); // Freeze some props as readonly, but leave them enumerable defineProperties(this, { @@ -5982,7 +7951,7 @@ var BvEvent = /*#__PURE__*/function () { target: readonlyDescriptor(), relatedTarget: readonlyDescriptor(), vueTarget: readonlyDescriptor(), - componentId: readonlyDescriptor() + componentId: readonlyDescriptor(), }); // Create a private variable using closure scoping var defaultPrevented = false; // Recreate preventDefault method. One way setter @@ -5994,47 +7963,59 @@ var BvEvent = /*#__PURE__*/function () { }; // Create `defaultPrevented` publicly accessible prop that // can only be altered by the preventDefault method - - defineProperty$1(this, 'defaultPrevented', { + defineProperty$1(this, "defaultPrevented", { enumerable: true, get: function get() { return defaultPrevented; - } + }, }); } - _createClass(BvEvent, null, [{ - key: "Defaults", - get: function get() { - return { - type: '', - cancelable: true, - nativeEvent: null, - target: null, - relatedTarget: null, - vueTarget: null, - componentId: null - }; - } - }]); + _createClass(BvEvent, null, [ + { + key: "Defaults", + get: function get() { + return { + type: "", + cancelable: true, + nativeEvent: null, + target: null, + relatedTarget: null, + vueTarget: null, + componentId: null, + }; + }, + }, + ]); return BvEvent; -}();var clickOutMixin = Vue__default["default"].extend({ +})(); +var clickOutMixin = Vue__default["default"].extend({ data: function data() { return { - listenForClickOut: false + listenForClickOut: false, }; }, watch: { listenForClickOut: function listenForClickOut(newValue, oldValue) { if (newValue !== oldValue) { - eventOff(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOff( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + EVENT_OPTIONS_NO_CAPTURE + ); if (newValue) { - eventOn(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOn( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + EVENT_OPTIONS_NO_CAPTURE + ); } } - } + }, }, beforeCreate: function beforeCreate() { // Declare non-reactive properties @@ -6047,15 +8028,25 @@ var BvEvent = /*#__PURE__*/function () { } if (!this.clickOutEventName) { - this.clickOutEventName = 'click'; + this.clickOutEventName = "click"; } if (this.listenForClickOut) { - eventOn(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOn( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + EVENT_OPTIONS_NO_CAPTURE + ); } }, beforeDestroy: function beforeDestroy() { - eventOff(this.clickOutElement, this.clickOutEventName, this._clickOutHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOff( + this.clickOutElement, + this.clickOutEventName, + this._clickOutHandler, + EVENT_OPTIONS_NO_CAPTURE + ); }, methods: { isClickOut: function isClickOut(event) { @@ -6065,24 +8056,35 @@ var BvEvent = /*#__PURE__*/function () { if (this.clickOutHandler && this.isClickOut(event)) { this.clickOutHandler(event); } - } - } -});var focusInMixin = Vue__default["default"].extend({ + }, + }, +}); +var focusInMixin = Vue__default["default"].extend({ data: function data() { return { - listenForFocusIn: false + listenForFocusIn: false, }; }, watch: { listenForFocusIn: function listenForFocusIn(newValue, oldValue) { if (newValue !== oldValue) { - eventOff(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOff( + this.focusInElement, + "focusin", + this._focusInHandler, + EVENT_OPTIONS_NO_CAPTURE + ); if (newValue) { - eventOn(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOn( + this.focusInElement, + "focusin", + this._focusInHandler, + EVENT_OPTIONS_NO_CAPTURE + ); } } - } + }, }, beforeCreate: function beforeCreate() { // Declare non-reactive properties @@ -6094,78 +8096,142 @@ var BvEvent = /*#__PURE__*/function () { } if (this.listenForFocusIn) { - eventOn(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOn( + this.focusInElement, + "focusin", + this._focusInHandler, + EVENT_OPTIONS_NO_CAPTURE + ); } }, beforeDestroy: function beforeDestroy() { - eventOff(this.focusInElement, 'focusin', this._focusInHandler, EVENT_OPTIONS_NO_CAPTURE); + eventOff( + this.focusInElement, + "focusin", + this._focusInHandler, + EVENT_OPTIONS_NO_CAPTURE + ); }, methods: { _focusInHandler: function _focusInHandler(event) { if (this.focusInHandler) { this.focusInHandler(event); } - } + }, + }, +}); +function ownKeys$q(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); } -});function ownKeys$q(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; } + return keys; +} -function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$q(Object(source), true).forEach(function (key) { _defineProperty$u(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$q(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } +function _objectSpread$q(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + if (i % 2) { + ownKeys$q(Object(source), true).forEach(function (key) { + _defineProperty$u(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys$q(Object(source)).forEach(function (key) { + Object.defineProperty( + target, + key, + Object.getOwnPropertyDescriptor(source, key) + ); + }); + } + } + return target; +} -function _defineProperty$u(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; } +function _defineProperty$u(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; +} var ROOT_EVENT_NAME_SHOWN = getRootEventName(NAME_DROPDOWN, EVENT_NAME_SHOWN); var ROOT_EVENT_NAME_HIDDEN = getRootEventName(NAME_DROPDOWN, EVENT_NAME_HIDDEN); // CSS selectors -var SELECTOR_FORM_CHILD = '.dropdown form'; -var SELECTOR_ITEM = ['.dropdown-item', '.b-dropdown-form'].map(function (selector) { - return "".concat(selector, ":not(.disabled):not([disabled])"); -}).join(', '); // --- Helper methods --- +var SELECTOR_FORM_CHILD = ".dropdown form"; +var SELECTOR_ITEM = [".dropdown-item", ".b-dropdown-form"] + .map(function (selector) { + return "".concat(selector, ":not(.disabled):not([disabled])"); + }) + .join(", "); // --- Helper methods --- // Return an array of visible items var filterVisibles = function filterVisibles(els) { return (els || []).filter(isVisible); }; // --- Props --- - -var props$J = makePropsConfigurable(sortKeys(_objectSpread$q(_objectSpread$q({}, props$L), {}, { - // String: `scrollParent`, `window` or `viewport` - // HTMLElement: HTML Element reference - boundary: makeProp([HTMLElement, PROP_TYPE_STRING], 'scrollParent'), - disabled: makeProp(PROP_TYPE_BOOLEAN, false), - // Place left if possible - dropleft: makeProp(PROP_TYPE_BOOLEAN, false), - // Place right if possible - dropright: makeProp(PROP_TYPE_BOOLEAN, false), - // Place on top if possible - dropup: makeProp(PROP_TYPE_BOOLEAN, false), - // Disable auto-flipping of menu from bottom <=> top - noFlip: makeProp(PROP_TYPE_BOOLEAN, false), - // Number of pixels or a CSS unit value to offset menu - // (i.e. `1px`, `1rem`, etc.) - offset: makeProp(PROP_TYPE_NUMBER_STRING, 0), - popperOpts: makeProp(PROP_TYPE_OBJECT, {}), - // Right align menu (default is left align) - right: makeProp(PROP_TYPE_BOOLEAN, false) -})), NAME_DROPDOWN); // --- Mixin --- +var props$J = makePropsConfigurable( + sortKeys( + _objectSpread$q( + _objectSpread$q({}, props$L), + {}, + { + // String: `scrollParent`, `window` or `viewport` + // HTMLElement: HTML Element reference + boundary: makeProp([HTMLElement, PROP_TYPE_STRING], "scrollParent"), + disabled: makeProp(PROP_TYPE_BOOLEAN, false), + // Place left if possible + dropleft: makeProp(PROP_TYPE_BOOLEAN, false), + // Place right if possible + dropright: makeProp(PROP_TYPE_BOOLEAN, false), + // Place on top if possible + dropup: makeProp(PROP_TYPE_BOOLEAN, false), + // Disable auto-flipping of menu from bottom <=> top + noFlip: makeProp(PROP_TYPE_BOOLEAN, false), + // Number of pixels or a CSS unit value to offset menu + // (i.e. `1px`, `1rem`, etc.) + offset: makeProp(PROP_TYPE_NUMBER_STRING, 0), + popperOpts: makeProp(PROP_TYPE_OBJECT, {}), + // Right align menu (default is left align) + right: makeProp(PROP_TYPE_BOOLEAN, false), + } + ) + ), + NAME_DROPDOWN +); // --- Mixin --- // @vue/component var dropdownMixin = Vue__default["default"].extend({ mixins: [idMixin, listenOnRootMixin, clickOutMixin, focusInMixin], provide: function provide() { return { - bvDropdown: this + bvDropdown: this, }; }, inject: { bvNavbar: { - default: null - } + default: null, + }, }, props: props$J, data: function data() { return { visible: false, - visibleChangePrevented: false + visibleChangePrevented: false, }; }, computed: { @@ -6178,21 +8244,23 @@ var dropdownMixin = Vue__default["default"].extend({ }, directionClass: function directionClass() { if (this.dropup) { - return 'dropup'; + return "dropup"; } else if (this.dropright) { - return 'dropright'; + return "dropright"; } else if (this.dropleft) { - return 'dropleft'; + return "dropleft"; } - return ''; + return ""; }, boundaryClass: function boundaryClass() { // Position `static` is needed to allow menu to "breakout" of the `scrollParent` // boundaries when boundary is anything other than `scrollParent` // See: https://github.com/twbs/bootstrap/issues/24251#issuecomment-341413786 - return this.boundary !== 'scrollParent' && !this.inNavbar ? 'position-static' : ''; - } + return this.boundary !== "scrollParent" && !this.inNavbar + ? "position-static" + : ""; + }, }, watch: { visible: function visible(newValue, oldValue) { @@ -6208,7 +8276,7 @@ var dropdownMixin = Vue__default["default"].extend({ vueTarget: this, target: this.$refs.menu, relatedTarget: null, - componentId: this.safeId ? this.safeId() : this.id || null + componentId: this.safeId ? this.safeId() : this.id || null, }); this.emitEvent(bvEvent); @@ -6233,7 +8301,7 @@ var dropdownMixin = Vue__default["default"].extend({ // Hide dropdown if disabled changes to true this.visible = false; } - } + }, }, created: function created() { // Create private non-reactive props @@ -6269,14 +8337,19 @@ var dropdownMixin = Vue__default["default"].extend({ return; } // Only instantiate Popper.js when dropdown is not in `` - if (!this.inNavbar) { - if (typeof Popper$1 === 'undefined') { + if (typeof Popper === "undefined") { /* istanbul ignore next */ - warn('Popper.js not found. Falling back to CSS positioning', NAME_DROPDOWN); + warn( + "Popper.js not found. Falling back to CSS positioning", + NAME_DROPDOWN + ); } else { // For dropup with alignment we use the parent element as popper container - var el = this.dropup && this.right || this.split ? this.$el : this.$refs.toggle; // Make sure we have a reference to an element, not a component! + var el = + (this.dropup && this.right) || this.split + ? this.$el + : this.$refs.toggle; // Make sure we have a reference to an element, not a component! el = el.$el || el; // Instantiate Popper.js @@ -6284,7 +8357,6 @@ var dropdownMixin = Vue__default["default"].extend({ } } // Ensure other menus are closed - this.emitOnRoot(ROOT_EVENT_NAME_SHOWN, this); // Enable listeners this.whileOpenListen(true); // Wrap in `$nextTick()` to ensure menu is fully rendered/shown @@ -6293,7 +8365,6 @@ var dropdownMixin = Vue__default["default"].extend({ // Focus on the menu container on show _this.focusMenu(); // Emit the shown event - _this.$emit(EVENT_NAME_SHOWN); }); }, @@ -6305,7 +8376,11 @@ var dropdownMixin = Vue__default["default"].extend({ }, createPopper: function createPopper(element) { this.destroyPopper(); - this.$_popper = new Popper$1(element, this.$refs.menu, this.getPopperConfig()); + this.$_popper = new Popper( + element, + this.$refs.menu, + this.getPopperConfig() + ); }, // Ensure popper event listeners are removed cleanly destroyPopper: function destroyPopper() { @@ -6340,18 +8415,18 @@ var dropdownMixin = Vue__default["default"].extend({ placement: placement, modifiers: { offset: { - offset: this.offset || 0 + offset: this.offset || 0, }, flip: { - enabled: !this.noFlip - } - } + enabled: !this.noFlip, + }, + }, }; var boundariesElement = this.boundary; if (boundariesElement) { popperConfig.modifiers.preventOverflow = { - boundariesElement: boundariesElement + boundariesElement: boundariesElement, }; } @@ -6364,7 +8439,7 @@ var dropdownMixin = Vue__default["default"].extend({ this.listenForFocusIn = isOpen; // Hide the dropdown when another dropdown is opened - var method = isOpen ? '$on' : '$off'; + var method = isOpen ? "$on" : "$off"; this.$root[method](ROOT_EVENT_NAME_SHOWN, this.rootCloseListener); }, rootCloseListener: function rootCloseListener(vm) { @@ -6381,14 +8456,16 @@ var dropdownMixin = Vue__default["default"].extend({ } // Wrap in a `requestAF()` to allow any previous // click handling to occur first - requestAF(function () { _this2.visible = true; }); }, // Public method to hide dropdown hide: function hide() { - var refocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var refocus = + arguments.length > 0 && arguments[0] !== undefined + ? arguments[0] + : false; /* istanbul ignore next */ if (this.disabled) { @@ -6407,16 +8484,21 @@ var dropdownMixin = Vue__default["default"].extend({ event = event || {}; // Early exit when not a click event or ENTER, SPACE or DOWN were pressed var _event = event, - type = _event.type, - keyCode = _event.keyCode; - - if (type !== 'click' && !(type === 'keydown' && [CODE_ENTER, CODE_SPACE, CODE_DOWN].indexOf(keyCode) !== -1)) { + type = _event.type, + keyCode = _event.keyCode; + + if ( + type !== "click" && + !( + type === "keydown" && + [CODE_ENTER, CODE_SPACE, CODE_DOWN].indexOf(keyCode) !== -1 + ) + ) { /* istanbul ignore next */ return; } /* istanbul ignore next */ - if (this.disabled) { this.visible = false; return; @@ -6444,7 +8526,7 @@ var dropdownMixin = Vue__default["default"].extend({ // other dropdowns there too // See https://github.com/bootstrap-vue/bootstrap-vue/issues/4328 stopEvent(event, { - propagation: false + propagation: false, }); }, // Called from dropdown menu context @@ -6487,11 +8569,18 @@ var dropdownMixin = Vue__default["default"].extend({ var target = event.target; - if (this.visible && !contains(this.$refs.menu, target) && !contains(this.toggler, target)) { + if ( + this.visible && + !contains(this.$refs.menu, target) && + !contains(this.toggler, target) + ) { this.clearHideTimeout(); - this.$_hideTimeout = setTimeout(function () { - return _this3.hide(); - }, this.inNavbar ? 300 : 0); + this.$_hideTimeout = setTimeout( + function () { + return _this3.hide(); + }, + this.inNavbar ? 300 : 0 + ); } }, // Document click-out listener @@ -6509,7 +8598,7 @@ var dropdownMixin = Vue__default["default"].extend({ // Ignore key up/down on form elements var target = event.target; - if (!this.visible || event && closest(SELECTOR_FORM_CHILD, target)) { + if (!this.visible || (event && closest(SELECTOR_FORM_CHILD, target))) { /* istanbul ignore next: should never happen */ return; } @@ -6558,17 +8647,22 @@ var dropdownMixin = Vue__default["default"].extend({ this.$nextTick(function () { attemptFocus(_this5.toggler); }); - } - } -});var OPTIONS_OBJECT_DEPRECATED_MSG = 'Setting prop "options" to an object is deprecated. Use the array format instead.'; // --- Props --- - -var props$I = makePropsConfigurable({ - disabledField: makeProp(PROP_TYPE_STRING, 'disabled'), - htmlField: makeProp(PROP_TYPE_STRING, 'html'), - options: makeProp(PROP_TYPE_ARRAY_OBJECT, []), - textField: makeProp(PROP_TYPE_STRING, 'text'), - valueField: makeProp(PROP_TYPE_STRING, 'value') -}, 'formOptionControls'); // --- Mixin --- + }, + }, +}); +var OPTIONS_OBJECT_DEPRECATED_MSG = + 'Setting prop "options" to an object is deprecated. Use the array format instead.'; // --- Props --- + +var props$I = makePropsConfigurable( + { + disabledField: makeProp(PROP_TYPE_STRING, "disabled"), + htmlField: makeProp(PROP_TYPE_STRING, "html"), + options: makeProp(PROP_TYPE_ARRAY_OBJECT, []), + textField: makeProp(PROP_TYPE_STRING, "text"), + valueField: makeProp(PROP_TYPE_STRING, "value"), + }, + "formOptionControls" +); // --- Mixin --- // @vue/component var formOptionsMixin = Vue__default["default"].extend({ @@ -6576,11 +8670,14 @@ var formOptionsMixin = Vue__default["default"].extend({ computed: { formOptions: function formOptions() { return this.normalizeOptions(this.options); - } + }, }, methods: { normalizeOption: function normalizeOption(option) { - var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var key = + arguments.length > 1 && arguments[1] !== undefined + ? arguments[1] + : null; // When the option is an object, normalize it if (isPlainObject(option)) { @@ -6590,15 +8687,14 @@ var formOptionsMixin = Vue__default["default"].extend({ value: isUndefined(value) ? key || text : value, text: stripTags(String(isUndefined(text) ? key : text)), html: get(option, this.htmlField), - disabled: Boolean(get(option, this.disabledField)) + disabled: Boolean(get(option, this.disabledField)), }; } // Otherwise create an `