\r\n FY{{ fiscalYear }} will be deleted. Continue?\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!./CompanyShopTargetsSetting.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!./CompanyShopTargetsSetting.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./CompanyShopTargetsSetting.vue?vue&type=template&id=457e5d07&scoped=true\"\nimport script from \"./CompanyShopTargetsSetting.vue?vue&type=script&lang=js\"\nexport * from \"./CompanyShopTargetsSetting.vue?vue&type=script&lang=js\"\nimport style0 from \"./CompanyShopTargetsSetting.vue?vue&type=style&index=0&id=457e5d07&prod&lang=scss&scoped=true\"\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 \"457e5d07\",\n null\n \n)\n\nexport default component.exports","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\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!./CompanyShopTargetsSetting.vue?vue&type=style&index=0&id=457e5d07&prod&lang=scss&scoped=true\"","import { DateTime } from 'luxon'\r\n\r\nexport function getFiscalYearName(fiscalStartDate, fiscalDuration) {\r\n // Extract month and year from currentDate\r\n const currentMonth = fiscalStartDate.getMonth() // JavaScript months are zero-indexed\r\n const currentYear = fiscalStartDate.getFullYear()\r\n\r\n fiscalStartDate = new Date(currentYear, currentMonth)\r\n\r\n const dateTo = addMonthsToDate(fiscalStartDate, fiscalDuration - 1)\r\n\r\n let fiscalStartYear, fiscalEndYear\r\n\r\n fiscalStartYear = fiscalStartDate.getFullYear()\r\n fiscalEndYear = dateTo.getFullYear()\r\n\r\n // Format fiscal year as needed\r\n let fiscalYear\r\n if (fiscalStartYear === fiscalEndYear) {\r\n fiscalYear = fiscalStartYear.toString() // Output single year\r\n } else {\r\n fiscalYear = `${fiscalStartYear}-${fiscalEndYear.toString().slice(2)}`\r\n }\r\n return fiscalYear\r\n}\r\n\r\nexport function addMonthsToDate(date, monthsToAdd) {\r\n // Clone the original date to avoid modifying it directly\r\n let newDate = new Date(date)\r\n\r\n // Add the specified number of months\r\n newDate.setMonth(newDate.getMonth() + monthsToAdd)\r\n\r\n return newDate\r\n}\r\n\r\nexport function getThisMonthDates() {\r\n const today = new Date()\r\n let firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1)\r\n let lastDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0)\r\n\r\n firstDayOfMonth = new Date(firstDayOfMonth.setHours(0, 0, 0, 0))\r\n lastDayOfMonth = new Date(lastDayOfMonth.setHours(0, 0, 0, 0))\r\n\r\n return [firstDayOfMonth, lastDayOfMonth]\r\n}\r\n\r\nexport function getMonthName(monthNumber) {\r\n return DateTime.local().set({ month: monthNumber }).monthLong\r\n}\r\n\r\nexport function getMonthAbbr(monthNumber) {\r\n return DateTime.local().set({ month: monthNumber }).monthShort\r\n}\r\n\r\n// get Fiscal Year Dates, passing isLastDayOfFY to indicate get up to today's date or last day of FY\r\nexport function getFiscalYearDates(fiscalStart, fiscalDuration, isLastDayOfFY = false) {\r\n let fiscalStartMonth = fiscalStart - 1\r\n let fiscalYearStartDate = new Date(new Date().getFullYear(), fiscalStartMonth, 1)\r\n\r\n let today = new Date() // Initialize current date\r\n let dateTo = today\r\n\r\n const todayYear = today.getFullYear()\r\n const yearStartYear = fiscalYearStartDate.getFullYear()\r\n\r\n if (today < fiscalYearStartDate || todayYear !== yearStartYear)\r\n fiscalYearStartDate.setFullYear(fiscalYearStartDate.getFullYear() - 1)\r\n\r\n // add duration to start date to get date to\r\n if (isLastDayOfFY) {\r\n dateTo = new Date(fiscalYearStartDate)\r\n dateTo = new Date(dateTo.setMonth(dateTo.getMonth() + fiscalDuration))\r\n\r\n // Set the date to the last day\r\n dateTo.setDate(0)\r\n }\r\n\r\n fiscalYearStartDate = new Date(fiscalYearStartDate.setHours(0, 0, 0, 0))\r\n dateTo = new Date(dateTo.setHours(0, 0, 0, 0))\r\n\r\n return [fiscalYearStartDate, dateTo]\r\n}\r\n\r\n// get fiscal year dates up to today's date\r\nexport function getFiscalYearDates_UpToToday(fiscalStart) {\r\n let fiscalStartMonth = fiscalStart - 1\r\n let fiscalYearStartDate = new Date(new Date().getFullYear(), fiscalStartMonth, 1)\r\n let today = new Date() // Initialize current date\r\n\r\n // Check if today is before the fiscal year start date\r\n if (today < fiscalYearStartDate) {\r\n fiscalYearStartDate.setFullYear(today.getFullYear() - 1) // If so, adjust fiscal year start date to previous year\r\n }\r\n\r\n // Set time part of dates to 00:00:00\r\n fiscalYearStartDate = new Date(fiscalYearStartDate.setHours(0, 0, 0, 0))\r\n today = new Date(today.setHours(0, 0, 0, 0))\r\n\r\n return [fiscalYearStartDate, today]\r\n}\r\n\r\n// function getLastDayOfFiscalYear(fiscalStartMonth, fiscalDuration) {\r\n// const currentDate = new Date() // Assuming this is the current date\r\n\r\n// // Determine the fiscal year start date\r\n// let fiscalYearStartDate\r\n// if (fiscalStartMonth === 1) {\r\n// fiscalYearStartDate = new Date(currentDate.getFullYear(), 0, 1)\r\n// } else {\r\n// fiscalYearStartDate = new Date(currentDate.getFullYear(), fiscalStartMonth - 1, 1)\r\n// }\r\n\r\n// // Add the fiscal duration to find the fiscal year end date\r\n// let fiscalYearEndDate = new Date(fiscalYearStartDate.getFullYear(), fiscalYearStartDate.getMonth() + fiscalDuration, 0)\r\n// return fiscalYearEndDate\r\n// }\r\n"],"sourceRoot":""}