\r\n \r\n\r\n \r\n \r\n Want to schedule this post?\r\n \r\n \r\n \r\n \r\n
Schedule your post (optional)
\r\n \r\n Note: Scheduled posts need to be shared between 20 minutes and 75 days from\r\n when you create them.\r\n \r\n \r\n \r\n \r\n Save Changes\r\n \r\n \r\n Cancel\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlogAdd.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlogAdd.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./BlogAdd.vue?vue&type=template&id=fc404a9c&\"\nimport script from \"./BlogAdd.vue?vue&type=script&lang=js&\"\nexport * from \"./BlogAdd.vue?vue&type=script&lang=js&\"\nimport style0 from \"./BlogAdd.vue?vue&type=style&index=0&id=fc404a9c&prod&lang=scss&\"\nimport style1 from \"./BlogAdd.vue?vue&type=style&index=1&id=fc404a9c&prod&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue, mergeData } from '../../vue';\nimport { NAME_IMG } from '../../constants/components';\nimport { PROP_TYPE_ARRAY_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_STRING, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { concat } from '../../utils/array';\nimport { identity } from '../../utils/identity';\nimport { isString } from '../../utils/inspect';\nimport { toInteger } from '../../utils/number';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { toString } from '../../utils/string'; // --- Constants --\n// Blank image with fill template\n\nvar BLANK_TEMPLATE = ''; // --- Helper methods ---\n\nvar makeBlankImgSrc = function makeBlankImgSrc(width, height, color) {\n var src = encodeURIComponent(BLANK_TEMPLATE.replace('%{w}', toString(width)).replace('%{h}', toString(height)).replace('%{f}', color));\n return \"data:image/svg+xml;charset=UTF-8,\".concat(src);\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable({\n alt: makeProp(PROP_TYPE_STRING),\n blank: makeProp(PROP_TYPE_BOOLEAN, false),\n blankColor: makeProp(PROP_TYPE_STRING, 'transparent'),\n block: makeProp(PROP_TYPE_BOOLEAN, false),\n center: makeProp(PROP_TYPE_BOOLEAN, false),\n fluid: makeProp(PROP_TYPE_BOOLEAN, false),\n // Gives fluid images class `w-100` to make them grow to fit container\n fluidGrow: makeProp(PROP_TYPE_BOOLEAN, false),\n height: makeProp(PROP_TYPE_NUMBER_STRING),\n left: makeProp(PROP_TYPE_BOOLEAN, false),\n right: makeProp(PROP_TYPE_BOOLEAN, false),\n // Possible values:\n // `false`: no rounding of corners\n // `true`: slightly rounded corners\n // 'top': top corners rounded\n // 'right': right corners rounded\n // 'bottom': bottom corners rounded\n // 'left': left corners rounded\n // 'circle': circle/oval\n // '0': force rounding off\n rounded: makeProp(PROP_TYPE_BOOLEAN_STRING, false),\n sizes: makeProp(PROP_TYPE_ARRAY_STRING),\n src: makeProp(PROP_TYPE_STRING),\n srcset: makeProp(PROP_TYPE_ARRAY_STRING),\n thumbnail: makeProp(PROP_TYPE_BOOLEAN, false),\n width: makeProp(PROP_TYPE_NUMBER_STRING)\n}, NAME_IMG); // --- Main component ---\n// @vue/component\n\nexport var BImg = /*#__PURE__*/Vue.extend({\n name: NAME_IMG,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var _class;\n\n var props = _ref.props,\n data = _ref.data;\n var alt = props.alt,\n src = props.src,\n block = props.block,\n fluidGrow = props.fluidGrow,\n rounded = props.rounded;\n var width = toInteger(props.width) || null;\n var height = toInteger(props.height) || null;\n var align = null;\n var srcset = concat(props.srcset).filter(identity).join(',');\n var sizes = concat(props.sizes).filter(identity).join(',');\n\n if (props.blank) {\n if (!height && width) {\n height = width;\n } else if (!width && height) {\n width = height;\n }\n\n if (!width && !height) {\n width = 1;\n height = 1;\n } // Make a blank SVG image\n\n\n src = makeBlankImgSrc(width, height, props.blankColor || 'transparent'); // Disable srcset and sizes\n\n srcset = null;\n sizes = null;\n }\n\n if (props.left) {\n align = 'float-left';\n } else if (props.right) {\n align = 'float-right';\n } else if (props.center) {\n align = 'mx-auto';\n block = true;\n }\n\n return h('img', mergeData(data, {\n attrs: {\n src: src,\n alt: alt,\n width: width ? toString(width) : null,\n height: height ? toString(height) : null,\n srcset: srcset || null,\n sizes: sizes || null\n },\n class: (_class = {\n 'img-thumbnail': props.thumbnail,\n 'img-fluid': props.fluid || fluidGrow,\n 'w-100': fluidGrow,\n rounded: rounded === '' || rounded === true\n }, _defineProperty(_class, \"rounded-\".concat(rounded), isString(rounded) && rounded !== ''), _defineProperty(_class, align, align), _defineProperty(_class, 'd-block', block), _class)\n }));\n }\n});","var _watch;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { COMPONENT_UID_KEY, Vue } from '../../vue';\nimport { NAME_ALERT } from '../../constants/components';\nimport { EVENT_NAME_DISMISSED, EVENT_NAME_DISMISS_COUNT_DOWN } from '../../constants/events';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_BOOLEAN_NUMBER_STRING, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_DISMISS } from '../../constants/slots';\nimport { requestAF } from '../../utils/dom';\nimport { isBoolean, isNumeric } from '../../utils/inspect';\nimport { makeModelMixin } from '../../utils/model';\nimport { toInteger } from '../../utils/number';\nimport { sortKeys } from '../../utils/object';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BButtonClose } from '../button/button-close';\nimport { BVTransition } from '../transition/bv-transition'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('show', {\n type: PROP_TYPE_BOOLEAN_NUMBER_STRING,\n defaultValue: false\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event; // --- Helper methods ---\n// Convert `show` value to a number\n\n\nvar parseCountDown = function parseCountDown(show) {\n if (show === '' || isBoolean(show)) {\n return 0;\n }\n\n show = toInteger(show, 0);\n return show > 0 ? show : 0;\n}; // Convert `show` value to a boolean\n\n\nvar parseShow = function parseShow(show) {\n if (show === '' || show === true) {\n return true;\n }\n\n if (toInteger(show, 0) < 1) {\n // Boolean will always return false for the above comparison\n return false;\n }\n\n return !!show;\n}; // --- Props ---\n\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread({}, modelProps), {}, {\n dismissLabel: makeProp(PROP_TYPE_STRING, 'Close'),\n dismissible: makeProp(PROP_TYPE_BOOLEAN, false),\n fade: makeProp(PROP_TYPE_BOOLEAN, false),\n variant: makeProp(PROP_TYPE_STRING, 'info')\n})), NAME_ALERT); // --- Main component ---\n// @vue/component\n\nexport var BAlert = /*#__PURE__*/Vue.extend({\n name: NAME_ALERT,\n mixins: [modelMixin, normalizeSlotMixin],\n props: props,\n data: function data() {\n return {\n countDown: 0,\n // If initially shown, we need to set these for SSR\n localShow: parseShow(this[MODEL_PROP_NAME])\n };\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME, function (newValue) {\n this.countDown = parseCountDown(newValue);\n this.localShow = parseShow(newValue);\n }), _defineProperty(_watch, \"countDown\", function countDown(newValue) {\n var _this = this;\n\n this.clearCountDownInterval();\n var show = this[MODEL_PROP_NAME]; // Ignore if `show` transitions to a boolean value\n\n if (isNumeric(show)) {\n this.$emit(EVENT_NAME_DISMISS_COUNT_DOWN, newValue); // Update the v-model if needed\n\n if (show !== newValue) {\n this.$emit(MODEL_EVENT_NAME, newValue);\n }\n\n if (newValue > 0) {\n this.localShow = true;\n this.$_countDownTimeout = setTimeout(function () {\n _this.countDown--;\n }, 1000);\n } else {\n // Slightly delay the hide to allow any UI updates\n this.$nextTick(function () {\n requestAF(function () {\n _this.localShow = false;\n });\n });\n }\n }\n }), _defineProperty(_watch, \"localShow\", function localShow(newValue) {\n var show = this[MODEL_PROP_NAME]; // Only emit dismissed events for dismissible or auto-dismissing alerts\n\n if (!newValue && (this.dismissible || isNumeric(show))) {\n this.$emit(EVENT_NAME_DISMISSED);\n } // Only emit booleans if we weren't passed a number via v-model\n\n\n if (!isNumeric(show) && show !== newValue) {\n this.$emit(MODEL_EVENT_NAME, newValue);\n }\n }), _watch),\n created: function created() {\n // Create private non-reactive props\n this.$_filterTimer = null;\n var show = this[MODEL_PROP_NAME];\n this.countDown = parseCountDown(show);\n this.localShow = parseShow(show);\n },\n beforeDestroy: function beforeDestroy() {\n this.clearCountDownInterval();\n },\n methods: {\n dismiss: function dismiss() {\n this.clearCountDownInterval();\n this.countDown = 0;\n this.localShow = false;\n },\n clearCountDownInterval: function clearCountDownInterval() {\n clearTimeout(this.$_countDownTimeout);\n this.$_countDownTimeout = null;\n }\n },\n render: function render(h) {\n var $alert = h();\n\n if (this.localShow) {\n var dismissible = this.dismissible,\n variant = this.variant;\n var $dismissButton = h();\n\n if (dismissible) {\n // Add dismiss button\n $dismissButton = h(BButtonClose, {\n attrs: {\n 'aria-label': this.dismissLabel\n },\n on: {\n click: this.dismiss\n }\n }, [this.normalizeSlot(SLOT_NAME_DISMISS)]);\n }\n\n $alert = h('div', {\n staticClass: 'alert',\n class: _defineProperty({\n 'alert-dismissible': dismissible\n }, \"alert-\".concat(variant), variant),\n attrs: {\n role: 'alert',\n 'aria-live': 'polite',\n 'aria-atomic': true\n },\n key: this[COMPONENT_UID_KEY]\n }, [$dismissButton, this.normalizeSlot()]);\n }\n\n return h(BVTransition, {\n props: {\n noFade: !this.fade\n }\n }, [$alert]);\n }\n});","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlogAdd.vue?vue&type=style&index=0&id=fc404a9c&prod&lang=scss&\"","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue, mergeData } from '../../vue';\nimport { NAME_MEDIA_ASIDE } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n right: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'div'),\n verticalAlign: makeProp(PROP_TYPE_STRING, 'top')\n}, NAME_MEDIA_ASIDE); // --- Main component ---\n// @vue/component\n\nexport var BMediaAside = /*#__PURE__*/Vue.extend({\n name: NAME_MEDIA_ASIDE,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n var verticalAlign = props.verticalAlign;\n var align = verticalAlign === 'top' ? 'start' : verticalAlign === 'bottom' ? 'end' :\n /* istanbul ignore next */\n verticalAlign;\n return h(props.tag, mergeData(data, {\n staticClass: 'media-aside',\n class: _defineProperty({\n 'media-aside-right': props.right\n }, \"align-self-\".concat(align), align)\n }), children);\n }\n});","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./BlogAdd.vue?vue&type=style&index=1&id=fc404a9c&prod&lang=css&\"","import { Vue, mergeData } from '../../vue';\nimport { NAME_MEDIA_BODY } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n tag: makeProp(PROP_TYPE_STRING, 'div')\n}, NAME_MEDIA_BODY); // --- Main component ---\n// @vue/component\n\nexport var BMediaBody = /*#__PURE__*/Vue.extend({\n name: NAME_MEDIA_BODY,\n functional: true,\n props: props,\n render: function render(h, _ref) {\n var props = _ref.props,\n data = _ref.data,\n children = _ref.children;\n return h(props.tag, mergeData(data, {\n staticClass: 'media-body'\n }), children);\n }\n});","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","var _watch;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_FORM_FILE } from '../../constants/components';\nimport { HAS_PROMISE_SUPPORT } from '../../constants/env';\nimport { EVENT_NAME_CHANGE, EVENT_OPTIONS_PASSIVE } from '../../constants/events';\nimport { PROP_TYPE_ARRAY, PROP_TYPE_BOOLEAN, PROP_TYPE_FUNCTION, PROP_TYPE_STRING } from '../../constants/props';\nimport { SLOT_NAME_DROP_PLACEHOLDER, SLOT_NAME_FILE_NAME, SLOT_NAME_PLACEHOLDER } from '../../constants/slots';\nimport { RX_EXTENSION, RX_STAR } from '../../constants/regex';\nimport { File } from '../../constants/safe-types';\nimport { from as arrayFrom, flatten, flattenDeep } from '../../utils/array';\nimport { cloneDeep } from '../../utils/clone-deep';\nimport { closest } from '../../utils/dom';\nimport { eventOn, eventOff, stopEvent } from '../../utils/events';\nimport { identity } from '../../utils/identity';\nimport { isArray, isFile, isFunction, isNull, isUndefinedOrNull } from '../../utils/inspect';\nimport { looseEqual } from '../../utils/loose-equal';\nimport { makeModelMixin } from '../../utils/model';\nimport { sortKeys } from '../../utils/object';\nimport { hasPropFunction, makeProp, makePropsConfigurable } from '../../utils/props';\nimport { escapeRegExp } from '../../utils/string';\nimport { warn } from '../../utils/warn';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { formControlMixin, props as formControlProps } from '../../mixins/form-control';\nimport { formCustomMixin, props as formCustomProps } from '../../mixins/form-custom';\nimport { formStateMixin, props as formStateProps } from '../../mixins/form-state';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { props as formSizeProps } from '../../mixins/form-size'; // --- Constants ---\n\nvar _makeModelMixin = makeModelMixin('value', {\n type: [PROP_TYPE_ARRAY, File],\n defaultValue: null,\n validator: function validator(value) {\n /* istanbul ignore next */\n if (value === '') {\n warn(VALUE_EMPTY_DEPRECATED_MSG, NAME_FORM_FILE);\n return true;\n }\n\n return isUndefinedOrNull(value) || isValidValue(value);\n }\n}),\n modelMixin = _makeModelMixin.mixin,\n modelProps = _makeModelMixin.props,\n MODEL_PROP_NAME = _makeModelMixin.prop,\n MODEL_EVENT_NAME = _makeModelMixin.event;\n\nvar VALUE_EMPTY_DEPRECATED_MSG = 'Setting \"value\"/\"v-model\" to an empty string for reset is deprecated. Set to \"null\" instead.'; // --- Helper methods ---\n\nvar isValidValue = function isValidValue(value) {\n return isFile(value) || isArray(value) && value.every(function (v) {\n return isValidValue(v);\n });\n}; // Helper method to \"safely\" get the entry from a data-transfer item\n\n/* istanbul ignore next: not supported in JSDOM */\n\n\nvar getDataTransferItemEntry = function getDataTransferItemEntry(item) {\n return isFunction(item.getAsEntry) ? item.getAsEntry() : isFunction(item.webkitGetAsEntry) ? item.webkitGetAsEntry() : null;\n}; // Drop handler function to get all files\n\n/* istanbul ignore next: not supported in JSDOM */\n\n\nvar getAllFileEntries = function getAllFileEntries(dataTransferItemList) {\n var traverseDirectories = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n return Promise.all(arrayFrom(dataTransferItemList).filter(function (item) {\n return item.kind === 'file';\n }).map(function (item) {\n var entry = getDataTransferItemEntry(item);\n\n if (entry) {\n if (entry.isDirectory && traverseDirectories) {\n return getAllFileEntriesInDirectory(entry.createReader(), \"\".concat(entry.name, \"/\"));\n } else if (entry.isFile) {\n return new Promise(function (resolve) {\n entry.file(function (file) {\n file.$path = '';\n resolve(file);\n });\n });\n }\n }\n\n return null;\n }).filter(identity));\n}; // Get all the file entries (recursive) in a directory\n\n/* istanbul ignore next: not supported in JSDOM */\n\n\nvar getAllFileEntriesInDirectory = function getAllFileEntriesInDirectory(directoryReader) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return new Promise(function (resolve) {\n var entryPromises = [];\n\n var readDirectoryEntries = function readDirectoryEntries() {\n directoryReader.readEntries(function (entries) {\n if (entries.length === 0) {\n resolve(Promise.all(entryPromises).then(function (entries) {\n return flatten(entries);\n }));\n } else {\n entryPromises.push(Promise.all(entries.map(function (entry) {\n if (entry) {\n if (entry.isDirectory) {\n return getAllFileEntriesInDirectory(entry.createReader(), \"\".concat(path).concat(entry.name, \"/\"));\n } else if (entry.isFile) {\n return new Promise(function (resolve) {\n entry.file(function (file) {\n file.$path = \"\".concat(path).concat(file.name);\n resolve(file);\n });\n });\n }\n }\n\n return null;\n }).filter(identity)));\n readDirectoryEntries();\n }\n });\n };\n\n readDirectoryEntries();\n });\n}; // --- Props ---\n\n\nvar props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), modelProps), formControlProps), formCustomProps), formStateProps), formSizeProps), {}, {\n accept: makeProp(PROP_TYPE_STRING, ''),\n browseText: makeProp(PROP_TYPE_STRING, 'Browse'),\n // Instruct input to capture from camera\n capture: makeProp(PROP_TYPE_BOOLEAN, false),\n directory: makeProp(PROP_TYPE_BOOLEAN, false),\n dropPlaceholder: makeProp(PROP_TYPE_STRING, 'Drop files here'),\n fileNameFormatter: makeProp(PROP_TYPE_FUNCTION),\n multiple: makeProp(PROP_TYPE_BOOLEAN, false),\n noDrop: makeProp(PROP_TYPE_BOOLEAN, false),\n noDropPlaceholder: makeProp(PROP_TYPE_STRING, 'Not allowed'),\n // TODO:\n // Should we deprecate this and only support flat file structures?\n // Nested file structures are only supported when files are dropped\n // A Chromium \"bug\" prevents `webkitEntries` from being populated\n // on the file input's `change` event and is marked as \"WontFix\"\n // Mozilla implemented the behavior the same way as Chromium\n // See: https://bugs.chromium.org/p/chromium/issues/detail?id=138987\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1326031\n noTraverse: makeProp(PROP_TYPE_BOOLEAN, false),\n placeholder: makeProp(PROP_TYPE_STRING, 'No file chosen')\n})), NAME_FORM_FILE); // --- Main component ---\n// @vue/component\n\nexport var BFormFile = /*#__PURE__*/Vue.extend({\n name: NAME_FORM_FILE,\n mixins: [attrsMixin, idMixin, modelMixin, normalizeSlotMixin, formControlMixin, formStateMixin, formCustomMixin, normalizeSlotMixin],\n inheritAttrs: false,\n props: props,\n data: function data() {\n return {\n files: [],\n dragging: false,\n // IE 11 doesn't respect setting `event.dataTransfer.dropEffect`,\n // so we handle it ourselves as well\n // https://stackoverflow.com/a/46915971/2744776\n dropAllowed: !this.noDrop,\n hasFocus: false\n };\n },\n computed: {\n // Convert `accept` to an array of `[{ RegExpr, isMime }, ...]`\n computedAccept: function computedAccept() {\n var accept = this.accept;\n accept = (accept || '').trim().split(/[,\\s]+/).filter(identity); // Allow any file type/extension\n\n if (accept.length === 0) {\n return null;\n }\n\n return accept.map(function (extOrType) {\n var prop = 'name';\n var startMatch = '^';\n var endMatch = '$';\n\n if (RX_EXTENSION.test(extOrType)) {\n // File extension /\\.ext$/\n startMatch = '';\n } else {\n // MIME type /^mime\\/.+$/ or /^mime\\/type$/\n prop = 'type';\n\n if (RX_STAR.test(extOrType)) {\n endMatch = '.+$'; // Remove trailing `*`\n\n extOrType = extOrType.slice(0, -1);\n }\n } // Escape all RegExp special chars\n\n\n extOrType = escapeRegExp(extOrType);\n var rx = new RegExp(\"\".concat(startMatch).concat(extOrType).concat(endMatch));\n return {\n rx: rx,\n prop: prop\n };\n });\n },\n computedCapture: function computedCapture() {\n var capture = this.capture;\n return capture === true || capture === '' ? true : capture || null;\n },\n computedAttrs: function computedAttrs() {\n var name = this.name,\n disabled = this.disabled,\n required = this.required,\n form = this.form,\n computedCapture = this.computedCapture,\n accept = this.accept,\n multiple = this.multiple,\n directory = this.directory;\n return _objectSpread(_objectSpread({}, this.bvAttrs), {}, {\n type: 'file',\n id: this.safeId(),\n name: name,\n disabled: disabled,\n required: required,\n form: form || null,\n capture: computedCapture,\n accept: accept || null,\n multiple: multiple,\n directory: directory,\n webkitdirectory: directory,\n 'aria-required': required ? 'true' : null\n });\n },\n computedFileNameFormatter: function computedFileNameFormatter() {\n var fileNameFormatter = this.fileNameFormatter;\n return hasPropFunction(fileNameFormatter) ? fileNameFormatter : this.defaultFileNameFormatter;\n },\n clonedFiles: function clonedFiles() {\n return cloneDeep(this.files);\n },\n flattenedFiles: function flattenedFiles() {\n return flattenDeep(this.files);\n },\n fileNames: function fileNames() {\n return this.flattenedFiles.map(function (file) {\n return file.name;\n });\n },\n labelContent: function labelContent() {\n // Draging active\n\n /* istanbul ignore next: used by drag/drop which can't be tested easily */\n if (this.dragging && !this.noDrop) {\n return (// TODO: Add additional scope with file count, and other not-allowed reasons\n this.normalizeSlot(SLOT_NAME_DROP_PLACEHOLDER, {\n allowed: this.dropAllowed\n }) || (this.dropAllowed ? this.dropPlaceholder : this.$createElement('span', {\n staticClass: 'text-danger'\n }, this.noDropPlaceholder))\n );\n } // No file chosen\n\n\n if (this.files.length === 0) {\n return this.normalizeSlot(SLOT_NAME_PLACEHOLDER) || this.placeholder;\n }\n\n var flattenedFiles = this.flattenedFiles,\n clonedFiles = this.clonedFiles,\n fileNames = this.fileNames,\n computedFileNameFormatter = this.computedFileNameFormatter; // There is a slot for formatting the files/names\n\n if (this.hasNormalizedSlot(SLOT_NAME_FILE_NAME)) {\n return this.normalizeSlot(SLOT_NAME_FILE_NAME, {\n files: flattenedFiles,\n filesTraversed: clonedFiles,\n names: fileNames\n });\n }\n\n return computedFileNameFormatter(flattenedFiles, clonedFiles, fileNames);\n }\n },\n watch: (_watch = {}, _defineProperty(_watch, MODEL_PROP_NAME, function (newValue) {\n if (!newValue || isArray(newValue) && newValue.length === 0) {\n this.reset();\n }\n }), _defineProperty(_watch, \"files\", function files(newValue, oldValue) {\n if (!looseEqual(newValue, oldValue)) {\n var multiple = this.multiple,\n noTraverse = this.noTraverse;\n var files = !multiple || noTraverse ? flattenDeep(newValue) : newValue;\n this.$emit(MODEL_EVENT_NAME, multiple ? files : files[0] || null);\n }\n }), _watch),\n created: function created() {\n // Create private non-reactive props\n this.$_form = null;\n },\n mounted: function mounted() {\n // Listen for form reset events, to reset the file input\n var $form = closest('form', this.$el);\n\n if ($form) {\n eventOn($form, 'reset', this.reset, EVENT_OPTIONS_PASSIVE);\n this.$_form = $form;\n }\n },\n beforeDestroy: function beforeDestroy() {\n var $form = this.$_form;\n\n if ($form) {\n eventOff($form, 'reset', this.reset, EVENT_OPTIONS_PASSIVE);\n }\n },\n methods: {\n isFileValid: function isFileValid(file) {\n if (!file) {\n return false;\n }\n\n var accept = this.computedAccept;\n return accept ? accept.some(function (a) {\n return a.rx.test(file[a.prop]);\n }) : true;\n },\n isFilesArrayValid: function isFilesArrayValid(files) {\n var _this = this;\n\n return isArray(files) ? files.every(function (file) {\n return _this.isFileValid(file);\n }) : this.isFileValid(files);\n },\n defaultFileNameFormatter: function defaultFileNameFormatter(flattenedFiles, clonedFiles, fileNames) {\n return fileNames.join(', ');\n },\n setFiles: function setFiles(files) {\n // Reset the dragging flags\n this.dropAllowed = !this.noDrop;\n this.dragging = false; // Set the selected files\n\n this.files = this.multiple ? this.directory ? files : flattenDeep(files) : flattenDeep(files).slice(0, 1);\n },\n\n /* istanbul ignore next: used by Drag/Drop */\n setInputFiles: function setInputFiles(files) {\n // Try an set the file input files array so that `required`\n // constraint works for dropped files (will fail in IE11 though)\n // To be used only when dropping files\n try {\n // Firefox < 62 workaround exploiting https://bugzilla.mozilla.org/show_bug.cgi?id=1422655\n var dataTransfer = new ClipboardEvent('').clipboardData || new DataTransfer(); // Add flattened files to temp `dataTransfer` object to get a true `FileList` array\n\n flattenDeep(cloneDeep(files)).forEach(function (file) {\n // Make sure to remove the custom `$path` attribute\n delete file.$path;\n dataTransfer.items.add(file);\n });\n this.$refs.input.files = dataTransfer.files;\n } catch (_unused) {}\n },\n reset: function reset() {\n // IE 11 doesn't support setting `$input.value` to `''` or `null`\n // So we use this little extra hack to reset the value, just in case\n // This also appears to work on modern browsers as well\n // Wrapped in try in case IE 11 or mobile Safari crap out\n try {\n var $input = this.$refs.input;\n $input.value = '';\n $input.type = '';\n $input.type = 'file';\n } catch (_unused2) {}\n\n this.files = [];\n },\n handleFiles: function handleFiles(files) {\n var isDrop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (isDrop) {\n // When dropped, make sure to filter files with the internal `accept` logic\n var filteredFiles = files.filter(this.isFilesArrayValid); // Only update files when we have any after filtering\n\n if (filteredFiles.length > 0) {\n this.setFiles(filteredFiles); // Try an set the file input's files array so that `required`\n // constraint works for dropped files (will fail in IE 11 though)\n\n this.setInputFiles(filteredFiles);\n }\n } else {\n // We always update the files from the `change` event\n this.setFiles(files);\n }\n },\n focusHandler: function focusHandler(event) {\n // Bootstrap v4 doesn't have focus styling for custom file input\n // Firefox has a `[type=file]:focus ~ sibling` selector issue,\n // so we add a `focus` class to get around these bugs\n if (this.plain || event.type === 'focusout') {\n this.hasFocus = false;\n } else {\n // Add focus styling for custom file input\n this.hasFocus = true;\n }\n },\n onChange: function onChange(event) {\n var _this2 = this;\n\n var type = event.type,\n target = event.target,\n _event$dataTransfer = event.dataTransfer,\n dataTransfer = _event$dataTransfer === void 0 ? {} : _event$dataTransfer;\n var isDrop = type === 'drop'; // Always emit original event\n\n this.$emit(EVENT_NAME_CHANGE, event);\n var items = arrayFrom(dataTransfer.items || []);\n\n if (HAS_PROMISE_SUPPORT && items.length > 0 && !isNull(getDataTransferItemEntry(items[0]))) {\n // Drop handling for modern browsers\n // Supports nested directory structures in `directory` mode\n\n /* istanbul ignore next: not supported in JSDOM */\n getAllFileEntries(items, this.directory).then(function (files) {\n return _this2.handleFiles(files, isDrop);\n });\n } else {\n // Standard file input handling (native file input change event),\n // or fallback drop mode (IE 11 / Opera) which don't support `directory` mode\n var files = arrayFrom(target.files || dataTransfer.files || []).map(function (file) {\n // Add custom `$path` property to each file (to be consistent with drop mode)\n file.$path = file.webkitRelativePath || '';\n return file;\n });\n this.handleFiles(files, isDrop);\n }\n },\n onDragenter: function onDragenter(event) {\n stopEvent(event);\n this.dragging = true;\n var _event$dataTransfer2 = event.dataTransfer,\n dataTransfer = _event$dataTransfer2 === void 0 ? {} : _event$dataTransfer2; // Early exit when the input or dropping is disabled\n\n if (this.noDrop || this.disabled || !this.dropAllowed) {\n // Show deny feedback\n\n /* istanbul ignore next: not supported in JSDOM */\n dataTransfer.dropEffect = 'none';\n this.dropAllowed = false;\n return;\n }\n /* istanbul ignore next: not supported in JSDOM */\n\n\n dataTransfer.dropEffect = 'copy';\n },\n // Note this event fires repeatedly while the mouse is over the dropzone at\n // intervals in the milliseconds, so avoid doing much processing in here\n onDragover: function onDragover(event) {\n stopEvent(event);\n this.dragging = true;\n var _event$dataTransfer3 = event.dataTransfer,\n dataTransfer = _event$dataTransfer3 === void 0 ? {} : _event$dataTransfer3; // Early exit when the input or dropping is disabled\n\n if (this.noDrop || this.disabled || !this.dropAllowed) {\n // Show deny feedback\n\n /* istanbul ignore next: not supported in JSDOM */\n dataTransfer.dropEffect = 'none';\n this.dropAllowed = false;\n return;\n }\n /* istanbul ignore next: not supported in JSDOM */\n\n\n dataTransfer.dropEffect = 'copy';\n },\n onDragleave: function onDragleave(event) {\n var _this3 = this;\n\n stopEvent(event);\n this.$nextTick(function () {\n _this3.dragging = false; // Reset `dropAllowed` to default\n\n _this3.dropAllowed = !_this3.noDrop;\n });\n },\n // Triggered by a file drop onto drop target\n onDrop: function onDrop(event) {\n var _this4 = this;\n\n stopEvent(event);\n this.dragging = false; // Early exit when the input or dropping is disabled\n\n if (this.noDrop || this.disabled || !this.dropAllowed) {\n this.$nextTick(function () {\n // Reset `dropAllowed` to default\n _this4.dropAllowed = !_this4.noDrop;\n });\n return;\n }\n\n this.onChange(event);\n }\n },\n render: function render(h) {\n var custom = this.custom,\n plain = this.plain,\n size = this.size,\n dragging = this.dragging,\n stateClass = this.stateClass,\n bvAttrs = this.bvAttrs; // Form Input\n\n var $input = h('input', {\n class: [{\n 'form-control-file': plain,\n 'custom-file-input': custom,\n focus: custom && this.hasFocus\n }, stateClass],\n // With IE 11, the input gets in the \"way\" of the drop events,\n // so we move it out of the way by putting it behind the label\n // Bootstrap v4 has it in front\n style: custom ? {\n zIndex: -5\n } : {},\n attrs: this.computedAttrs,\n on: {\n change: this.onChange,\n focusin: this.focusHandler,\n focusout: this.focusHandler,\n reset: this.reset\n },\n ref: 'input'\n });\n\n if (plain) {\n return $input;\n } // Overlay label\n\n\n var $label = h('label', {\n staticClass: 'custom-file-label',\n class: {\n dragging: dragging\n },\n attrs: {\n for: this.safeId(),\n // This goes away in Bootstrap v5\n 'data-browse': this.browseText || null\n }\n }, [h('span', {\n staticClass: 'd-block form-file-text',\n // `pointer-events: none` is used to make sure\n // the drag events fire only on the label\n style: {\n pointerEvents: 'none'\n }\n }, [this.labelContent])]); // Return rendered custom file input\n\n return h('div', {\n staticClass: 'custom-file b-form-file',\n class: [_defineProperty({}, \"b-custom-control-\".concat(size), size), stateClass, bvAttrs.class],\n style: bvAttrs.style,\n attrs: {\n id: this.safeId('_BV_file_outer_')\n },\n on: {\n dragenter: this.onDragenter,\n dragover: this.onDragover,\n dragleave: this.onDragleave,\n drop: this.onDrop\n }\n }, [$input, $label]);\n }\n});"],"sourceRoot":""}