/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
/******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./src/Components/PostAnalytics.jsx"
/*!******************************************!*\
  !*** ./src/Components/PostAnalytics.jsx ***!
  \******************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/badge/badge.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/grid/simple-grid.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/image/image.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/input/input.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/input/input-group.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/input/input-element.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-trigger.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/portal/portal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/select/select.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/h-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/v-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/table.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tbody.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/td.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/th.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/thead.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tr.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/toast/use-toast.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/chart-no-axes-column.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/sparkles.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/arrow-down-right.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/arrow-up-right.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/chevron-left.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/chevron-right.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/clock.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/eye.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/file-text.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/frown.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/log-out.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/monitor.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/refresh-ccw.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/search.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/smartphone.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/tablet.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/target.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-down.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-up.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/users.js\");\n/* harmony import */ var react_apexcharts__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! react-apexcharts */ \"./node_modules/react-apexcharts/dist/react-apexcharts.esm.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/format.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\n/* harmony import */ var _shared_DatePicker__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./shared/DatePicker */ \"./src/Components/shared/DatePicker.jsx\");\n/* harmony import */ var _shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./shared/ProLockOverlay */ \"./src/Components/shared/ProLockOverlay.jsx\");\n/* harmony import */ var _shared_NoContent__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./shared/NoContent */ \"./src/Components/shared/NoContent.jsx\");\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\n\n\n\n\nvar PostAnalytics = function PostAnalytics() {\n  var _data$sources, _data$sources2, _data$sources3, _data$sources4, _data$devices, _data$devices2, _data$devices3, _data$trends, _data$trends2, _data$trends3, _data$posts, _data$posts2, _data$posts3, _data$posts4, _data$posts5, _data$posts6, _data$posts8;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),\n    _useState2 = _slicedToArray(_useState, 2),\n    loading = _useState2[0],\n    setLoading = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState4 = _slicedToArray(_useState3, 2),\n    data = _useState4[0],\n    setData = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_54__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_55__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_52__.endOfDay)(new Date()),\n      key: 'selection'\n    }]),\n    _useState6 = _slicedToArray(_useState5, 2),\n    dateRange = _useState6[0],\n    setDateRange = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState8 = _slicedToArray(_useState7, 2),\n    showDatePicker = _useState8[0],\n    setShowDatePicker = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),\n    _useState0 = _slicedToArray(_useState9, 2),\n    search = _useState0[0],\n    setSearch = _useState0[1];\n  var _useState1 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),\n    _useState10 = _slicedToArray(_useState1, 2),\n    categoryFilter = _useState10[0],\n    setCategoryFilter = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n      key: 'views',\n      direction: 'desc'\n    }),\n    _useState12 = _slicedToArray(_useState11, 2),\n    sortConfig = _useState12[0],\n    setSortConfig = _useState12[1];\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1),\n    _useState14 = _slicedToArray(_useState13, 2),\n    currentPage = _useState14[0],\n    setCurrentPage = _useState14[1];\n  var perPage = 10;\n  var toast = (0,_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.useToast)();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    fetchData();\n    document.title = \"Post Analytics | InsightPress\";\n  }, [dateRange]);\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    setCurrentPage(1);\n  }, [search, categoryFilter, sortConfig]);\n  var fetchData = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var start, end, response, _t, _t2;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            setLoading(true);\n            _context.p = 1;\n            start = (0,date_fns__WEBPACK_IMPORTED_MODULE_53__.format)(dateRange[0].startDate, 'yyyy-MM-dd');\n            end = (0,date_fns__WEBPACK_IMPORTED_MODULE_53__.format)(dateRange[0].endDate, 'yyyy-MM-dd');\n            _context.n = 2;\n            return fetch(\"\".concat(window.insightPressData.apiUrl, \"analytics/posts?start_date=\").concat(start, \"&end_date=\").concat(end), {\n              headers: {\n                'X-WP-Nonce': window.insightPressData.nonce\n              }\n            });\n          case 2:\n            response = _context.v;\n            if (response.ok) {\n              _context.n = 3;\n              break;\n            }\n            throw new Error('Failed to fetch analytics data');\n          case 3:\n            _t = setData;\n            _context.n = 4;\n            return response.json();\n          case 4:\n            _t(_context.v);\n            _context.n = 6;\n            break;\n          case 5:\n            _context.p = 5;\n            _t2 = _context.v;\n            toast({\n              title: \"Error fetching data\",\n              description: _t2.message,\n              status: \"error\",\n              duration: 5000\n            });\n          case 6:\n            _context.p = 6;\n            setLoading(false);\n            return _context.f(6);\n          case 7:\n            return _context.a(2);\n        }\n      }, _callee, null, [[1, 5, 6, 7]]);\n    }));\n    return function fetchData() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  var formatDuration = function formatDuration(seconds) {\n    if (!seconds || seconds <= 0) return '0s';\n    var h = Math.floor(seconds / 3600);\n    var m = Math.floor(seconds % 3600 / 60);\n    var s = Math.round(seconds % 60);\n    if (h > 0) return \"\".concat(h, \"h \").concat(m, \"m\");\n    if (m > 0) return \"\".concat(m, \"m \").concat(s, \"s\");\n    return \"\".concat(s, \"s\");\n  };\n  if (loading) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      maxW: \"100%\",\n      overflowX: \"hidden\",\n      p: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n      spacing: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      w: \"36px\",\n      h: \"36px\",\n      borderRadius: \"lg\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"24px\",\n      w: \"200px\",\n      mb: 2,\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"14px\",\n      w: \"280px\",\n      borderRadius: \"md\"\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"36px\",\n      w: \"160px\",\n      borderRadius: \"xl\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n      columns: {\n        base: 1,\n        sm: 2,\n        md: 3,\n        lg: 5\n      },\n      spacing: 4,\n      mb: 6\n    }, Array.from({\n      length: 5\n    }).map(function (_, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        key: i,\n        bg: \"white\",\n        p: 4,\n        borderRadius: \"xl\",\n        border: \"1px solid\",\n        borderColor: \"gray.100\",\n        shadow: \"sm\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 3\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        w: \"40px\",\n        h: \"40px\",\n        borderRadius: \"lg\",\n        flexShrink: 0\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        flex: \"1\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"10px\",\n        w: \"80px\",\n        mb: 2,\n        borderRadius: \"md\"\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"22px\",\n        w: \"60px\",\n        mb: 1,\n        borderRadius: \"md\"\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"10px\",\n        w: \"50px\",\n        borderRadius: \"md\"\n      }))));\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n      columns: {\n        base: 1,\n        lg: 4\n      },\n      spacing: 5,\n      mb: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: \"white\",\n      p: 5,\n      borderRadius: \"xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"14px\",\n      w: \"100px\",\n      mb: 4,\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"180px\",\n      borderRadius: \"lg\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Stack, {\n      spacing: 2,\n      mt: 3\n    }, [80, 55, 40].map(function (w, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        key: i,\n        h: \"10px\",\n        w: \"\".concat(w, \"%\"),\n        borderRadius: \"md\"\n      });\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: \"white\",\n      p: 5,\n      borderRadius: \"xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"14px\",\n      w: \"80px\",\n      mb: 4,\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Stack, {\n      spacing: 5,\n      mt: 2\n    }, [70, 45, 20].map(function (w, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        key: i\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n        justify: \"space-between\",\n        mb: 2\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"10px\",\n        w: \"60px\",\n        borderRadius: \"md\"\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"10px\",\n        w: \"30px\",\n        borderRadius: \"md\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"5px\",\n        borderRadius: \"full\"\n      }));\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: \"white\",\n      p: 5,\n      borderRadius: \"xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      gridColumn: {\n        lg: 'span 2'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"14px\",\n      w: \"80px\",\n      mb: 4,\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"240px\",\n      borderRadius: \"lg\"\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n      columns: {\n        base: 1,\n        md: 2,\n        lg: 3\n      },\n      spacing: 5,\n      mb: 6\n    }, Array.from({\n      length: 6\n    }).map(function (_, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        key: i,\n        bg: \"white\",\n        p: 5,\n        borderRadius: \"xl\",\n        border: \"1px solid\",\n        borderColor: \"gray.100\",\n        shadow: \"sm\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"16px\",\n        w: \"120px\",\n        mb: 4,\n        borderRadius: \"md\"\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Stack, {\n        spacing: 2\n      }, Array.from({\n        length: 5\n      }).map(function (_, j) {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n          key: j,\n          justify: \"space-between\",\n          align: \"center\",\n          p: 2\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n          h: \"10px\",\n          w: \"\".concat(70 - j * 8, \"%\"),\n          borderRadius: \"md\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n          h: \"18px\",\n          w: \"36px\",\n          borderRadius: \"full\"\n        }));\n      })));\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: \"white\",\n      p: 5,\n      borderRadius: \"xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 5\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"20px\",\n      w: \"180px\",\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n      spacing: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"32px\",\n      w: \"220px\",\n      borderRadius: \"lg\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n      h: \"32px\",\n      w: \"150px\",\n      borderRadius: \"lg\"\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Table, {\n      variant: \"simple\",\n      size: \"sm\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Thead, {\n      bg: \"gray.50\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, null, ['Post Title', 'Total Views', 'Visitors', 'Action'].map(function (h) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n        key: h,\n        color: \"gray.400\",\n        textTransform: \"uppercase\",\n        fontSize: \"9px\",\n        letterSpacing: \"1px\",\n        py: 4\n      }, h);\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Tbody, null, Array.from({\n      length: 6\n    }).map(function (_, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, {\n        key: i,\n        borderBottom: \"1px solid\",\n        borderColor: \"gray.50\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, {\n        py: 3\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 3\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        w: \"44px\",\n        h: \"44px\",\n        borderRadius: \"lg\",\n        flexShrink: 0\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"13px\",\n        w: \"\".concat(180 - i * 12, \"px\"),\n        mb: 2,\n        borderRadius: \"md\"\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"10px\",\n        w: \"60px\",\n        borderRadius: \"md\"\n      })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"13px\",\n        w: \"50px\",\n        borderRadius: \"md\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"13px\",\n        w: \"44px\",\n        borderRadius: \"md\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Skeleton, {\n        h: \"24px\",\n        w: \"90px\",\n        borderRadius: \"lg\"\n      })));\n    })))));\n  }\n  if (!data || !data.summary) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_58__[\"default\"], {\n      icon: lucide_react__WEBPACK_IMPORTED_MODULE_30__[\"default\"],\n      title: \"No analytics data available\",\n      description: \"We couldn't find any post analytics data for the selected period. Try adjusting your date filters.\",\n      height: \"400px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n      leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {\n        size: 16\n      }),\n      onClick: fetchData,\n      variant: \"outline\",\n      borderRadius: \"full\",\n      colorScheme: \"blue\",\n      size: \"sm\",\n      mt: 4\n    }, \"Refresh Data\"));\n  }\n  var summaryCards = [{\n    label: 'Total Views',\n    value: (data.summary.total_views || 0).toLocaleString(),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_38__[\"default\"],\n    iconBg: 'blue.500',\n    hint: 'Page views'\n  }, {\n    label: 'Unique Visitors',\n    value: (data.summary.total_visitors || 0).toLocaleString(),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_50__[\"default\"],\n    iconBg: 'purple.500',\n    hint: 'Distinct sessions'\n  }, {\n    label: 'Avg. Time on Site',\n    value: \"\".concat(data.summary.avg_time || 0, \"s\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_37__[\"default\"],\n    iconBg: 'green.500',\n    hint: 'Per session'\n  }, {\n    label: 'Bounce Rate',\n    value: \"\".concat(data.summary.avg_bounce_rate || 0, \"%\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_41__[\"default\"],\n    iconBg: 'orange.500',\n    hint: 'Avg across posts'\n  }, {\n    label: 'Engagement Score',\n    value: data.summary.engagement_score || 0,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_47__[\"default\"],\n    iconBg: 'pink.500',\n    hint: 'Composite score'\n  }];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    maxW: \"100%\",\n    overflowX: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    direction: {\n      base: 'column',\n      sm: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      sm: 'center'\n    },\n    gap: 4,\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"blue.600\",\n    p: 2,\n    borderRadius: \"lg\",\n    color: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_30__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Heading, {\n    size: \"lg\",\n    fontWeight: \"800\",\n    letterSpacing: \"-0.5px\"\n  }, \"Blog Post Analytics\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    color: \"gray.400\",\n    fontWeight: \"500\",\n    fontSize: \"sm\",\n    pl: 1\n  }, \"Performance and engagement across all blog content\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_11__.Popover, {\n    isOpen: showDatePicker,\n    onClose: function onClose() {\n      return setShowDatePicker(false);\n    },\n    placement: \"bottom-end\",\n    closeOnBlur: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_14__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    onClick: function onClick() {\n      return setShowDatePicker(!showDatePicker);\n    },\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_34__[\"default\"], {\n      size: 18\n    }),\n    bg: \"white\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    borderRadius: \"xl\",\n    px: 4,\n    shadow: \"sm\",\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.600\",\n    _hover: {\n      bg: 'gray.50'\n    }\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_56__.getDateRangeLabel)(dateRange[0]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_13__.PopoverContent, {\n    w: \"auto\",\n    shadow: \"2xl\",\n    borderRadius: \"2xl\",\n    bg: \"white\",\n    overflow: \"hidden\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    _focus: {\n      outline: 'none'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_56__[\"default\"], {\n    initialRange: dateRange[0],\n    onChange: function onChange(item) {\n      return setDateRange([item]);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    p: 3,\n    textAlign: \"right\",\n    borderTop: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    size: \"sm\",\n    colorScheme: \"blue\",\n    borderRadius: \"lg\",\n    onClick: function onClick() {\n      return setShowDatePicker(false);\n    }\n  }, \"Done\")))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 1,\n      sm: 2,\n      md: 3,\n      lg: 5\n    },\n    spacing: 4,\n    mb: 6\n  }, summaryCards.map(function (card, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      key: i,\n      bg: \"white\",\n      p: 4,\n      borderRadius: \"xl\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      shadow: \"sm\",\n      transition: \"all 0.2s\",\n      _hover: {\n        shadow: 'md',\n        transform: 'translateY(-2px)'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      align: \"center\",\n      gap: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: card.iconBg,\n      color: \"white\",\n      p: 2.5,\n      borderRadius: \"lg\",\n      flexShrink: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n      as: card.icon,\n      boxSize: 4\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      flex: \"1\",\n      minW: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"10px\",\n      fontWeight: \"700\",\n      color: \"gray.400\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\",\n      noOfLines: 1\n    }, card.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"lg\",\n      fontWeight: \"900\",\n      color: \"gray.800\",\n      lineHeight: \"1.2\"\n    }, card.value), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      mt: 0.5\n    }, card.hint))));\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 4\n    },\n    spacing: 5,\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 2,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"purple.500\",\n    p: 1.5,\n    borderRadius: \"md\",\n    color: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_50__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.700\",\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, \"Acquisition\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"250px\",\n    display: \"flex\",\n    flexDirection: \"column\"\n  }, (data === null || data === void 0 || (_data$sources = data.sources) === null || _data$sources === void 0 ? void 0 : _data$sources.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"180px\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_51__[\"default\"], {\n    options: {\n      chart: {\n        type: 'donut',\n        fontFamily: 'Inter, sans-serif'\n      },\n      labels: (data === null || data === void 0 || (_data$sources2 = data.sources) === null || _data$sources2 === void 0 ? void 0 : _data$sources2.map(function (s) {\n        return s.source;\n      })) || [],\n      colors: ['#3182CE', '#805AD5', '#38A169', '#E53E3E', '#DD6B20'],\n      stroke: {\n        show: false\n      },\n      legend: {\n        show: false\n      },\n      plotOptions: {\n        pie: {\n          donut: {\n            size: '75%',\n            labels: {\n              show: true,\n              total: {\n                show: false\n              }\n            }\n          }\n        }\n      },\n      tooltip: {\n        theme: 'light'\n      }\n    },\n    series: (data === null || data === void 0 || (_data$sources3 = data.sources) === null || _data$sources3 === void 0 ? void 0 : _data$sources3.map(function (s) {\n      return s.count;\n    })) || [],\n    type: \"donut\",\n    height: \"100%\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Stack, {\n    spacing: 1.5,\n    mt: 3\n  }, data === null || data === void 0 || (_data$sources4 = data.sources) === null || _data$sources4 === void 0 ? void 0 : _data$sources4.slice(0, 3).map(function (source, idx) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      key: idx,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n      spacing: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      w: \"6px\",\n      h: \"6px\",\n      bg: ['#3182CE', '#805AD5', '#38A169', '#E53E3E'][idx],\n      borderRadius: \"full\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"10px\",\n      fontWeight: \"700\",\n      color: \"gray.600\"\n    }, source.source)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"10px\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, source.percent, \"%\"));\n  }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_58__[\"default\"], {\n    title: \"No source data\",\n    description: \"We haven't detected any acquisition sources for this period.\",\n    height: \"200px\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 2,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"orange.500\",\n    p: 1.5,\n    borderRadius: \"md\",\n    color: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_45__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.700\",\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, \"Devices\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Stack, {\n    spacing: 5,\n    mt: 2\n  }, [{\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_42__[\"default\"],\n    label: 'Desktop',\n    val: ((_data$devices = data.devices) === null || _data$devices === void 0 ? void 0 : _data$devices.Desktop) || 0,\n    color: 'blue.400'\n  }, {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_45__[\"default\"],\n    label: 'Mobile',\n    val: ((_data$devices2 = data.devices) === null || _data$devices2 === void 0 ? void 0 : _data$devices2.Mobile) || 0,\n    color: 'purple.400'\n  }, {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_46__[\"default\"],\n    label: 'Tablet',\n    val: ((_data$devices3 = data.devices) === null || _data$devices3 === void 0 ? void 0 : _data$devices3.Tablet) || 0,\n    color: 'green.400'\n  }].map(function (d, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      key: i\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      justify: \"space-between\",\n      mb: 1.5\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n      spacing: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n      as: d.icon,\n      size: 14,\n      color: \"gray.400\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"700\",\n      color: \"gray.600\"\n    }, d.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, d.val, \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      h: \"5px\",\n      bg: \"gray.100\",\n      borderRadius: \"full\",\n      overflow: \"hidden\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      h: \"100%\",\n      bg: d.color,\n      borderRadius: \"full\",\n      transition: \"width 1s ease\",\n      width: \"\".concat(d.val, \"%\")\n    })));\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    gridColumn: {\n      lg: 'span 2'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"blue.500\",\n    p: 1.5,\n    borderRadius: \"md\",\n    color: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_49__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.700\",\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, \"Views Trend\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 1.5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    w: \"8px\",\n    h: \"8px\",\n    bg: \"blue.400\",\n    borderRadius: \"full\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"10px\",\n    fontWeight: \"700\",\n    color: \"gray.400\"\n  }, \"Post Views\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"240px\"\n  }, (data === null || data === void 0 || (_data$trends = data.trends) === null || _data$trends === void 0 ? void 0 : _data$trends.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_51__[\"default\"], {\n    options: {\n      chart: {\n        type: 'area',\n        toolbar: {\n          show: false\n        },\n        zoom: {\n          enabled: false\n        },\n        fontFamily: 'Inter, sans-serif'\n      },\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        curve: 'smooth',\n        width: 2,\n        colors: ['#3182CE']\n      },\n      fill: {\n        type: 'gradient',\n        gradient: {\n          shadeIntensity: 1,\n          opacityFrom: 0.4,\n          opacityTo: 0.02,\n          stops: [20, 100]\n        }\n      },\n      xaxis: {\n        categories: (data === null || data === void 0 || (_data$trends2 = data.trends) === null || _data$trends2 === void 0 ? void 0 : _data$trends2.map(function (t) {\n          return t.date;\n        })) || [],\n        labels: {\n          style: {\n            colors: '#A0AEC0',\n            fontWeight: 600,\n            fontSize: '10px'\n          },\n          formatter: function formatter(val) {\n            var d = new Date(val);\n            return d.toLocaleDateString('en-US', {\n              month: 'short',\n              day: 'numeric'\n            });\n          }\n        },\n        axisBorder: {\n          show: false\n        },\n        axisTicks: {\n          show: false\n        }\n      },\n      yaxis: {\n        labels: {\n          style: {\n            colors: '#A0AEC0',\n            fontWeight: 600,\n            fontSize: '10px'\n          }\n        }\n      },\n      grid: {\n        borderColor: '#EDF2F7',\n        strokeDashArray: 4\n      },\n      tooltip: {\n        theme: 'light'\n      },\n      colors: ['#3182CE']\n    },\n    series: [{\n      name: 'Post Views',\n      data: (data === null || data === void 0 || (_data$trends3 = data.trends) === null || _data$trends3 === void 0 ? void 0 : _data$trends3.map(function (t) {\n        return t.views;\n      })) || []\n    }],\n    type: \"area\",\n    height: \"100%\"\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_58__[\"default\"], {\n    title: \"No trend data available\",\n    description: \"We haven't detected any view trends for the selected period.\",\n    height: \"200px\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"orange.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_31__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"Content Leaders & Laggards\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n    colorScheme: \"orange\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 3\n    },\n    spacing: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PerformanceList, {\n    title: \"Viral Hits\",\n    subtitle: \"Highest Views\",\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_38__[\"default\"],\n    color: \"blue\",\n    items: _toConsumableArray(data.posts).sort(function (a, b) {\n      return b.views - a.views;\n    }).slice(0, 5),\n    metricKey: \"views\",\n    isTop: true\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PerformanceList, {\n    title: \"Fan Favorites\",\n    subtitle: \"Engagement Score\",\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_47__[\"default\"],\n    color: \"purple\",\n    items: _toConsumableArray(data.posts).sort(function (a, b) {\n      return b.score - a.score;\n    }).slice(0, 5),\n    metricKey: \"score\",\n    isTop: true\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PerformanceList, {\n    title: \"High Converters\",\n    subtitle: \"Total Conversions\",\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_49__[\"default\"],\n    color: \"green\",\n    items: _toConsumableArray(data.posts).sort(function (a, b) {\n      return b.conversion - a.conversion;\n    }).slice(0, 5),\n    metricKey: \"conversion\",\n    isTop: true\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PerformanceList, {\n    title: \"Needs Retention\",\n    subtitle: \"Highest Bounce Rate\",\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_41__[\"default\"],\n    color: \"red\",\n    items: _toConsumableArray(data.posts).filter(function (p) {\n      return p.views > 5;\n    }).sort(function (a, b) {\n      return b.bounce_rate - a.bounce_rate;\n    }).slice(0, 5),\n    metricKey: \"bounce_rate\",\n    isTop: false,\n    suffix: \"%\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PerformanceList, {\n    title: \"Quick Exits\",\n    subtitle: \"Lowest Avg Time\",\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_37__[\"default\"],\n    color: \"orange\",\n    items: _toConsumableArray(data.posts).filter(function (p) {\n      return p.views > 5;\n    }).sort(function (a, b) {\n      return a.avg_time - b.avg_time;\n    }).slice(0, 5),\n    metricKey: \"avg_time\",\n    isTop: false,\n    suffix: \"s\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PerformanceList, {\n    title: \"High Volume Friction\",\n    subtitle: \"High Traffic / Low Score\",\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_40__[\"default\"],\n    color: \"pink\",\n    items: _toConsumableArray(data.posts).filter(function (p) {\n      return p.views > 10;\n    }).sort(function (a, b) {\n      return a.score / (a.views || 1) - b.score / (b.views || 1);\n    }).slice(0, 5),\n    metricKey: \"score\",\n    isTop: false\n  }))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_57__[\"default\"], {\n    title: \"Unlock Content Leaders\",\n    description: \"Identify your most engaging posts, highest converters, and find content that needs improvement with Content Pro.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    gap: 4,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"blue.600\",\n    p: 1.5,\n    borderRadius: \"md\",\n    color: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_30__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Heading, {\n    size: \"sm\",\n    color: \"gray.800\"\n  }, \"All Posts Performance\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 3,\n    flexWrap: \"wrap\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__.InputGroup, {\n    size: \"sm\",\n    w: {\n      base: 'full',\n      md: '220px'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_10__.InputLeftElement, {\n    pointerEvents: \"none\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_44__[\"default\"], {\n    size: 13,\n    color: \"#A0AEC0\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__.Input, {\n    placeholder: \"Search posts...\",\n    value: search,\n    onChange: function onChange(e) {\n      return setSearch(e.target.value);\n    },\n    borderRadius: \"lg\",\n    bg: \"gray.50\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    fontSize: \"xs\",\n    _focus: {\n      bg: 'white',\n      borderColor: 'blue.300'\n    }\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_16__.Select, {\n    size: \"sm\",\n    w: {\n      base: 'full',\n      md: '150px'\n    },\n    borderRadius: \"lg\",\n    bg: \"gray.50\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    fontSize: \"xs\",\n    placeholder: \"All Categories\",\n    value: categoryFilter,\n    onChange: function onChange(e) {\n      return setCategoryFilter(e.target.value);\n    }\n  }, Array.from(new Set((data === null || data === void 0 || (_data$posts = data.posts) === null || _data$posts === void 0 ? void 0 : _data$posts.flatMap(function (p) {\n    return p.categories;\n  })) || [])).map(function (cat) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"option\", {\n      key: cat,\n      value: cat\n    }, cat);\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Thead, {\n    bg: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    fontSize: \"9px\",\n    letterSpacing: \"1px\",\n    py: 4\n  }, \"Post Title\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SortTh, {\n    label: \"Total Views\",\n    field: \"views\",\n    current: sortConfig,\n    setSort: setSortConfig\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SortTh, {\n    label: \"Visitors\",\n    field: \"visitors\",\n    current: sortConfig,\n    setSort: setSortConfig\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SortTh, {\n    label: \"Engagement Time\",\n    field: \"total_time\",\n    current: sortConfig,\n    setSort: setSortConfig\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    fontSize: \"9px\",\n    letterSpacing: \"1px\"\n  }, \"Action\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Tbody, null, function () {\n    var filtered = ((data === null || data === void 0 ? void 0 : data.posts) || []).filter(function (post) {\n      return post.title.toLowerCase().includes(search.toLowerCase()) && (categoryFilter === '' || post.categories.includes(categoryFilter));\n    }).sort(function (a, b) {\n      if (a[sortConfig.key] < b[sortConfig.key]) return sortConfig.direction === 'asc' ? -1 : 1;\n      if (a[sortConfig.key] > b[sortConfig.key]) return sortConfig.direction === 'asc' ? 1 : -1;\n      return 0;\n    });\n    var totalPages = Math.ceil(filtered.length / perPage);\n    var paginated = filtered.slice((currentPage - 1) * perPage, currentPage * perPage);\n    if (paginated.length === 0 && !loading) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, {\n        colSpan: 5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_58__[\"default\"], {\n        icon: lucide_react__WEBPACK_IMPORTED_MODULE_39__[\"default\"],\n        title: \"No posts found\",\n        description: \"No posts match your search or filter criteria.\",\n        height: \"200px\"\n      })));\n    }\n    return paginated.map(function (post) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, {\n        key: post.id,\n        _hover: {\n          bg: 'blue.50'\n        },\n        transition: \"all 0.15s\",\n        borderBottom: \"1px solid\",\n        borderColor: \"gray.50\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, {\n        py: 3\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 3\n      }, post.thumbnail ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__.Image, {\n        src: post.thumbnail,\n        alt: post.title,\n        w: \"44px\",\n        h: \"44px\",\n        borderRadius: \"lg\",\n        objectFit: \"cover\",\n        flexShrink: 0,\n        border: \"1px solid\",\n        borderColor: \"gray.100\"\n      }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n        w: \"44px\",\n        h: \"44px\",\n        borderRadius: \"lg\",\n        bg: \"gray.100\",\n        align: \"center\",\n        justify: \"center\",\n        flexShrink: 0,\n        border: \"1px solid\",\n        borderColor: \"gray.200\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {\n        size: 18,\n        color: \"#CBD5E0\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        minW: 0\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n        fontWeight: \"700\",\n        color: \"gray.800\",\n        fontSize: \"sm\",\n        noOfLines: 1,\n        maxW: \"300px\"\n      }, post.title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 1,\n        mt: 0.5\n      }, post.categories.slice(0, 2).map(function (cat) {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n          key: cat,\n          fontSize: \"9px\",\n          colorScheme: \"blue\",\n          variant: \"subtle\",\n          borderRadius: \"4px\"\n        }, cat);\n      }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        p: 1,\n        bg: \"blue.50\",\n        borderRadius: \"md\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_38__[\"default\"], {\n        size: 12,\n        color: \"#3182CE\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n        fontWeight: \"800\",\n        color: \"gray.800\",\n        fontSize: \"sm\"\n      }, post.views.toLocaleString()))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        p: 1,\n        bg: \"purple.50\",\n        borderRadius: \"md\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_50__[\"default\"], {\n        size: 12,\n        color: \"#805AD5\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n        fontWeight: \"800\",\n        color: \"gray.800\",\n        fontSize: \"sm\"\n      }, post.visitors.toLocaleString()))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n        spacing: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        p: 1,\n        bg: \"orange.50\",\n        borderRadius: \"md\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {\n        size: 12,\n        color: \"#DD6B20\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n        fontWeight: \"800\",\n        color: \"gray.800\",\n        fontSize: \"sm\"\n      }, formatDuration(post.total_time)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n        size: \"xs\",\n        colorScheme: \"blue\",\n        variant: \"ghost\",\n        borderRadius: \"lg\",\n        fontWeight: \"700\",\n        fontSize: \"xs\",\n        rightIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_38__[\"default\"], {\n          size: 12\n        }),\n        onClick: function onClick() {\n          return window.location.hash = \"#/post/\".concat(post.id);\n        },\n        _hover: {\n          bg: 'blue.100'\n        }\n      }, \"View Analytics\")));\n    });\n  }()))), (data === null || data === void 0 || (_data$posts2 = data.posts) === null || _data$posts2 === void 0 ? void 0 : _data$posts2.length) > perPage && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mt: 5,\n    px: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    fontWeight: \"600\"\n  }, \"Showing \", Math.min((currentPage - 1) * perPage + 1, (data === null || data === void 0 || (_data$posts3 = data.posts) === null || _data$posts3 === void 0 ? void 0 : _data$posts3.length) || 0), \" to \", Math.min(currentPage * perPage, (data === null || data === void 0 || (_data$posts4 = data.posts) === null || _data$posts4 === void 0 ? void 0 : _data$posts4.length) || 0), \" of \", (data === null || data === void 0 || (_data$posts5 = data.posts) === null || _data$posts5 === void 0 ? void 0 : _data$posts5.length) || 0, \" posts\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    size: \"sm\",\n    variant: \"outline\",\n    isDisabled: currentPage === 1,\n    onClick: function onClick() {\n      return setCurrentPage(function (prev) {\n        return Math.max(1, prev - 1);\n      });\n    },\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {\n      size: 16\n    }),\n    borderRadius: \"lg\",\n    fontSize: \"xs\",\n    fontWeight: \"700\"\n  }, \"Previous\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 1\n  }, Array.from({\n    length: Math.ceil(((data === null || data === void 0 || (_data$posts6 = data.posts) === null || _data$posts6 === void 0 ? void 0 : _data$posts6.length) || 0) / perPage)\n  }).map(function (_, i) {\n    var _data$posts7;\n    var pageNum = i + 1;\n    // Only show current page, first, last, and neighbors\n    var totalPages = Math.ceil(((data === null || data === void 0 || (_data$posts7 = data.posts) === null || _data$posts7 === void 0 ? void 0 : _data$posts7.length) || 0) / perPage);\n    if (pageNum === 1 || pageNum === totalPages || pageNum >= currentPage - 1 && pageNum <= currentPage + 1) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n        key: pageNum,\n        size: \"sm\",\n        variant: currentPage === pageNum ? \"solid\" : \"ghost\",\n        colorScheme: currentPage === pageNum ? \"blue\" : \"gray\",\n        onClick: function onClick() {\n          return setCurrentPage(pageNum);\n        },\n        borderRadius: \"lg\",\n        fontSize: \"xs\",\n        fontWeight: \"700\",\n        minW: \"32px\"\n      }, pageNum);\n    } else if (pageNum === 2 && currentPage > 3 || pageNum === totalPages - 1 && currentPage < totalPages - 2) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n        key: pageNum,\n        color: \"gray.400\",\n        fontSize: \"xs\"\n      }, \"...\");\n    }\n    return null;\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    size: \"sm\",\n    variant: \"outline\",\n    isDisabled: currentPage === Math.ceil(((data === null || data === void 0 || (_data$posts8 = data.posts) === null || _data$posts8 === void 0 ? void 0 : _data$posts8.length) || 0) / perPage),\n    onClick: function onClick() {\n      return setCurrentPage(function (prev) {\n        var _data$posts9;\n        return Math.min(Math.ceil(((data === null || data === void 0 || (_data$posts9 = data.posts) === null || _data$posts9 === void 0 ? void 0 : _data$posts9.length) || 0) / perPage), prev + 1);\n      });\n    },\n    rightIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_36__[\"default\"], {\n      size: 16\n    }),\n    borderRadius: \"lg\",\n    fontSize: \"xs\",\n    fontWeight: \"700\"\n  }, \"Next\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"blue.50\",\n    p: 5,\n    borderRadius: \"xl\",\n    border: \"1px dashed\",\n    borderColor: \"blue.200\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"blue.500\",\n    p: 2,\n    borderRadius: \"lg\",\n    color: \"white\",\n    flexShrink: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_49__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontWeight: \"800\",\n    color: \"blue.800\",\n    fontSize: \"sm\"\n  }, \"Pro Tip: Content Velocity\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"xs\",\n    color: \"blue.600\",\n    lineHeight: \"tall\"\n  }, \"Posts with a bounce rate below 40% are 3x more likely to convert readers into newsletter subscribers. Consider internal linking in high-performing content.\")))));\n};\nvar PerformanceList = function PerformanceList(_ref2) {\n  var title = _ref2.title,\n    subtitle = _ref2.subtitle,\n    icon = _ref2.icon,\n    color = _ref2.color,\n    items = _ref2.items,\n    metricKey = _ref2.metricKey,\n    isTop = _ref2.isTop,\n    _ref2$suffix = _ref2.suffix,\n    suffix = _ref2$suffix === void 0 ? '' : _ref2$suffix;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    px: 2,\n    py: 5,\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 4,\n    px: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    p: 1.5,\n    bg: \"\".concat(color, \".50\"),\n    color: \"\".concat(color, \".500\"),\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: icon,\n    boxSize: 4\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.VStack, {\n    align: \"start\",\n    spacing: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontWeight: \"800\",\n    color: \"gray.800\",\n    fontSize: \"sm\"\n  }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n    fontSize: \"9px\",\n    fontWeight: \"700\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, subtitle))), isTop ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_33__[\"default\"], {\n    size: 16,\n    color: \"#38A169\"\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_32__[\"default\"], {\n    size: 16,\n    color: \"#E53E3E\"\n  })), items.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n    px: 3,\n    py: 2,\n    w: \"10px\",\n    color: \"gray.400\",\n    fontSize: \"9px\"\n  }, \"#\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n    px: 3,\n    py: 2,\n    color: \"gray.400\",\n    fontSize: \"9px\"\n  }, \"Post Title\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n    px: 3,\n    py: 2,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"9px\"\n  }, subtitle))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Tbody, null, items.map(function (item, idx) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Tr, {\n      key: item.id,\n      _hover: {\n        bg: 'gray.50/50',\n        cursor: 'pointer'\n      },\n      onClick: function onClick() {\n        return window.location.hash = \"#/post/\".concat(item.id);\n      },\n      transition: \"all 0.15s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, {\n      px: 3,\n      py: 3,\n      fontWeight: \"800\",\n      color: \"gray.300\",\n      fontSize: \"xs\"\n    }, idx + 1), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, {\n      px: 3,\n      py: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, {\n      fontWeight: \"700\",\n      color: \"gray.700\",\n      fontSize: \"xs\",\n      noOfLines: 1\n    }, item.title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Td, {\n      px: 3,\n      py: 3,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n      colorScheme: color,\n      variant: \"subtle\",\n      borderRadius: \"md\",\n      px: 2,\n      fontSize: \"10px\",\n      fontWeight: \"800\"\n    }, item[metricKey], suffix)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_58__[\"default\"], {\n    title: \"No items found\",\n    height: \"120px\"\n  }));\n};\nvar SortTh = function SortTh(_ref3) {\n  var label = _ref3.label,\n    field = _ref3.field,\n    current = _ref3.current,\n    setSort = _ref3.setSort;\n  var isActive = current.key === field;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Th, {\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"9px\",\n    letterSpacing: \"1px\",\n    py: 4,\n    cursor: \"pointer\",\n    onClick: function onClick() {\n      return setSort({\n        key: field,\n        direction: isActive && current.direction === 'desc' ? 'asc' : 'desc'\n      });\n    },\n    _hover: {\n      color: 'blue.500'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.HStack, {\n    spacing: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Text, null, label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.VStack, {\n    spacing: -1,\n    opacity: isActive ? 1 : 0.3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_49__[\"default\"],\n    size: 7,\n    color: isActive && current.direction === 'asc' ? 'blue.500' : 'inherit'\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_48__[\"default\"],\n    size: 7,\n    color: isActive && current.direction === 'desc' ? 'blue.500' : 'inherit'\n  }))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PostAnalytics);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/PostAnalytics.jsx?\n}");

/***/ },

/***/ "./src/Components/ProductAnalytics.jsx"
/*!*********************************************!*\
  !*** ./src/Components/ProductAnalytics.jsx ***!
  \*********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/format.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/triangle-alert.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/arrow-right.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/briefcase.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/chevron-left.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/chevron-right.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/clock.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/package.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/refresh-ccw.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/shopping-cart.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/tag.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-down.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-up.js\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/badge/badge.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/grid/simple-grid.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/image/image.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-trigger.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/portal/portal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton-circle.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/h-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/v-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/table.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tbody.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/td.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/th.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/thead.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tr.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var _shared_DatePicker__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./shared/DatePicker */ \"./src/Components/shared/DatePicker.jsx\");\n/* harmony import */ var _shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./shared/ProLockOverlay */ \"./src/Components/shared/ProLockOverlay.jsx\");\n/* harmony import */ var _shared_NoContent__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./shared/NoContent */ \"./src/Components/shared/NoContent.jsx\");\n/* harmony import */ var react_apexcharts__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! react-apexcharts */ \"./node_modules/react-apexcharts/dist/react-apexcharts.esm.js\");\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\n\n\n\n\nvar ProductAnalytics = function ProductAnalytics() {\n  var _data$top_performing, _data$worst_performin, _data$dead_stock, _data$dead_stock2, _data$category_perfor, _data$tag_performance, _data$inventory_forec;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_4__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.endOfDay)(new Date()),\n      key: 'selection'\n    }]),\n    _useState2 = _slicedToArray(_useState, 2),\n    dateRange = _useState2[0],\n    setDateRange = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState4 = _slicedToArray(_useState3, 2),\n    showDatePicker = _useState4[0],\n    setShowDatePicker = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState6 = _slicedToArray(_useState5, 2),\n    data = _useState6[0],\n    setData = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),\n    _useState8 = _slicedToArray(_useState7, 2),\n    loading = _useState8[0],\n    setLoading = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1),\n    _useState0 = _slicedToArray(_useState9, 2),\n    currentPagePairing = _useState0[0],\n    setCurrentPagePairing = _useState0[1];\n  var pairingsPerPage = 5;\n  var _useState1 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n      pairings: [],\n      total_count: 0\n    }),\n    _useState10 = _slicedToArray(_useState1, 2),\n    pairingData = _useState10[0],\n    setPairingData = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState12 = _slicedToArray(_useState11, 2),\n    pairingLoading = _useState12[0],\n    setPairingLoading = _useState12[1];\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_4__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.endOfDay)(new Date()),\n      key: 'selection'\n    }),\n    _useState14 = _slicedToArray(_useState13, 2),\n    pairingDateRange = _useState14[0],\n    setPairingDateRange = _useState14[1];\n  var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState16 = _slicedToArray(_useState15, 2),\n    showPairingDatePicker = _useState16[0],\n    setShowPairingDatePicker = _useState16[1];\n  var fetchData = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var startStr, endStr, response, result, _t;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            setLoading(true);\n            _context.p = 1;\n            startStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].startDate, 'yyyy-MM-dd');\n            endStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].endDate, 'yyyy-MM-dd');\n            _context.n = 2;\n            return fetch(\"\".concat(insightPressData.apiUrl, \"analytics/product?start_date=\").concat(startStr, \"&end_date=\").concat(endStr), {\n              headers: {\n                'X-WP-Nonce': insightPressData.nonce\n              }\n            });\n          case 2:\n            response = _context.v;\n            _context.n = 3;\n            return response.json();\n          case 3:\n            result = _context.v;\n            setData(result);\n            _context.n = 5;\n            break;\n          case 4:\n            _context.p = 4;\n            _t = _context.v;\n            console.error('Error fetching product analytics:', _t);\n          case 5:\n            _context.p = 5;\n            setLoading(false);\n            return _context.f(5);\n          case 6:\n            return _context.a(2);\n        }\n      }, _callee, null, [[1, 4, 5, 6]]);\n    }));\n    return function fetchData() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  var fetchPairings = /*#__PURE__*/function () {\n    var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {\n      var startStr, endStr, response, result, _t2;\n      return _regenerator().w(function (_context2) {\n        while (1) switch (_context2.p = _context2.n) {\n          case 0:\n            setPairingLoading(true);\n            _context2.p = 1;\n            startStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(pairingDateRange.startDate, 'yyyy-MM-dd');\n            endStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(pairingDateRange.endDate, 'yyyy-MM-dd');\n            _context2.n = 2;\n            return fetch(\"\".concat(insightPressData.apiUrl, \"analytics/product-pairings?start_date=\").concat(startStr, \"&end_date=\").concat(endStr, \"&page=\").concat(currentPagePairing, \"&per_page=\").concat(pairingsPerPage), {\n              headers: {\n                'X-WP-Nonce': insightPressData.nonce\n              }\n            });\n          case 2:\n            response = _context2.v;\n            _context2.n = 3;\n            return response.json();\n          case 3:\n            result = _context2.v;\n            setPairingData(result);\n            _context2.n = 5;\n            break;\n          case 4:\n            _context2.p = 4;\n            _t2 = _context2.v;\n            console.error('Error fetching pairing analytics:', _t2);\n          case 5:\n            _context2.p = 5;\n            setPairingLoading(false);\n            return _context2.f(5);\n          case 6:\n            return _context2.a(2);\n        }\n      }, _callee2, null, [[1, 4, 5, 6]]);\n    }));\n    return function fetchPairings() {\n      return _ref2.apply(this, arguments);\n    };\n  }();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    fetchData();\n  }, [dateRange]);\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    fetchPairings();\n  }, [pairingDateRange, currentPagePairing]);\n  var formatCurrency = function formatCurrency(amount) {\n    try {\n      return new Intl.NumberFormat('en-US', {\n        style: 'currency',\n        currency: (data === null || data === void 0 ? void 0 : data.currency_code) || 'USD'\n      }).format(amount);\n    } catch (e) {\n      var symbol = (data === null || data === void 0 ? void 0 : data.currency_symbol) || '$';\n      return \"\".concat(symbol).concat(parseFloat(amount).toLocaleString(undefined, {\n        minimumFractionDigits: 2,\n        maximumFractionDigits: 2\n      }));\n    }\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    mx: \"auto\",\n    px: {\n      base: 4,\n      md: 0\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    mb: 8,\n    gap: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"lg\",\n    fontWeight: \"800\",\n    color: \"gray.900\",\n    mb: 1\n  }, \"Product & Inventory Analytics\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n    color: \"gray.500\",\n    fontWeight: \"500\"\n  }, \"Monitor your product performance and inventory health.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Popover, {\n    isOpen: showDatePicker,\n    onClose: function onClose() {\n      return setShowDatePicker(false);\n    },\n    placement: \"bottom-end\",\n    closeOnBlur: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Button, {\n    onClick: function onClick() {\n      return setShowDatePicker(!showDatePicker);\n    },\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n      size: 18\n    }),\n    bg: \"white\",\n    border: \"1px solid\",\n    borderColor: \"gray.200\",\n    borderRadius: \"xl\",\n    px: 5,\n    h: \"48px\",\n    shadow: \"sm\",\n    fontWeight: \"700\",\n    color: \"gray.700\",\n    _hover: {\n      bg: 'gray.50',\n      borderColor: 'gray.300'\n    },\n    _active: {\n      bg: 'gray.100'\n    }\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_44__.getDateRangeLabel)(dateRange[0]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.PopoverContent, {\n    w: \"auto\",\n    shadow: \"2xl\",\n    borderRadius: \"2xl\",\n    overflow: \"hidden\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    _focus: {\n      outline: 'none'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_44__[\"default\"], {\n    initialRange: dateRange[0],\n    onChange: function onChange(item) {\n      return setDateRange([item]);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    p: 3,\n    textAlign: \"right\",\n    borderTop: \"1px solid\",\n    borderColor: \"gray.50\",\n    bg: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Button, {\n    size: \"sm\",\n    colorScheme: \"blue\",\n    borderRadius: \"lg\",\n    onClick: function onClick() {\n      return setShowDatePicker(false);\n    }\n  }, \"Done\")))))))), loading && !data && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Stack, {\n    spacing: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, [1, 2].map(function (i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      key: i,\n      p: 6,\n      bg: \"white\",\n      borderRadius: \"2xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n      height: \"24px\",\n      width: \"200px\",\n      mb: 6\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Stack, {\n      spacing: 4\n    }, [1, 2, 3, 4, 5].map(function (j) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n        key: j,\n        align: \"center\",\n        gap: 4\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.SkeletonCircle, {\n        size: \"8\"\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n        height: \"16px\",\n        flex: 1\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n        height: \"16px\",\n        width: \"50px\"\n      }));\n    })));\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    p: 8,\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n    height: \"24px\",\n    width: \"250px\",\n    mb: 8\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 3\n    },\n    spacing: 6\n  }, [1, 2, 3].map(function (i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n      key: i,\n      height: \"180px\",\n      borderRadius: \"2xl\"\n    });\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n    height: \"350px\",\n    borderRadius: \"2xl\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n    height: \"350px\",\n    borderRadius: \"2xl\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n    height: \"450px\",\n    borderRadius: \"2xl\"\n  })), data && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"green.50\",\n    color: \"green.500\",\n    p: 2.5,\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Top Performing Products\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    overflow: \"hidden\"\n  }, ((_data$top_performing = data.top_performing) === null || _data$top_performing === void 0 ? void 0 : _data$top_performing.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Rank\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Product\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Clicks\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Orders\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Sold\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, data.top_performing.map(function (product, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: product.id,\n      _hover: {\n        bg: 'gray.50/30'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n      w: 8,\n      h: 8,\n      align: \"center\",\n      justify: \"center\",\n      bg: index === 0 ? 'green.500' : index === 1 ? 'blue.500' : index === 2 ? 'orange.500' : 'gray.100',\n      color: index <= 2 ? 'white' : 'gray.600',\n      borderRadius: \"lg\",\n      fontSize: \"xs\",\n      fontWeight: \"900\",\n      shadow: index <= 2 ? 'md' : 'none'\n    }, \"#\", index + 1)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      spacing: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      w: \"40px\",\n      h: \"40px\",\n      borderRadius: \"lg\",\n      overflow: \"hidden\",\n      bg: \"gray.50\",\n      border: \"1px solid\",\n      borderColor: \"gray.200\",\n      shadow: \"sm\",\n      flexShrink: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Image, {\n      src: product.image,\n      fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n        w: \"100%\",\n        h: \"100%\",\n        align: \"center\",\n        justify: \"center\",\n        bg: \"gray.50\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n        size: 16,\n        color: \"#cbd5e0\"\n      })),\n      alt: product.name,\n      objectFit: \"cover\",\n      w: \"100%\",\n      h: \"100%\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.VStack, {\n      align: \"start\",\n      spacing: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\",\n      color: \"gray.700\",\n      noOfLines: 1\n    }, product.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, \"SKU: \", product.sku || 'N/A')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      justify: \"flex-end\",\n      spacing: 1,\n      color: \"blue.500\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n      size: 14\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\",\n      fontSize: \"sm\"\n    }, product.clicks || 0))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      justify: \"flex-end\",\n      spacing: 1,\n      color: \"purple.500\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n      size: 14\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\",\n      fontSize: \"sm\"\n    }, product.order_count || 0))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      colorScheme: \"green\",\n      variant: \"subtle\",\n      borderRadius: \"md\",\n      px: 2,\n      py: 0.5,\n      fontWeight: \"800\"\n    }, product.units_sold)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true,\n      fontWeight: \"900\",\n      color: \"green.600\"\n    }, formatCurrency(product.revenue)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n    title: \"No performing products\",\n    description: \"No sales or activity recorded for the selected date range.\",\n    height: \"300px\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8,\n    mb: 10,\n    alignItems: \"start\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"red.50\",\n    color: \"red.500\",\n    p: 2.5,\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Worst Sellers\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n    colorScheme: \"red\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    overflow: \"hidden\"\n  }, ((_data$worst_performin = data.worst_performing) === null || _data$worst_performin === void 0 ? void 0 : _data$worst_performin.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Product\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Stock\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Sold\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, data.worst_performing.map(function (product) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: product.id,\n      _hover: {\n        bg: 'gray.50/30'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      spacing: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      w: \"40px\",\n      h: \"40px\",\n      borderRadius: \"lg\",\n      overflow: \"hidden\",\n      bg: \"gray.50\",\n      border: \"1px solid\",\n      borderColor: \"gray.200\",\n      shadow: \"sm\",\n      flexShrink: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Image, {\n      src: product.image,\n      fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n        w: \"100%\",\n        h: \"100%\",\n        align: \"center\",\n        justify: \"center\",\n        bg: \"gray.50\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n        size: 16,\n        color: \"#cbd5e0\"\n      })),\n      alt: product.name,\n      objectFit: \"cover\",\n      w: \"100%\",\n      h: \"100%\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.VStack, {\n      align: \"start\",\n      spacing: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\",\n      color: \"gray.700\",\n      noOfLines: 1\n    }, product.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, \"SKU: \", product.sku || 'N/A')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      colorScheme: product.stock > 0 ? 'red' : 'gray',\n      variant: \"solid\",\n      borderRadius: \"full\",\n      px: 2,\n      fontSize: \"10px\"\n    }, product.stock || 0)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      justify: \"flex-end\",\n      spacing: 1,\n      color: \"red.500\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n      size: 14\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\"\n    }, product.units_sold))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true,\n      color: \"gray.600\",\n      fontWeight: \"700\",\n      fontSize: \"sm\"\n    }, formatCurrency(product.revenue)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n    title: \"No slow movers\",\n    description: \"All your products seem to be performing well in this period.\",\n    height: \"300px\"\n  }))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_45__[\"default\"], {\n    title: \"Unlock Slow Movers\",\n    description: \"Identify slow-moving and worst-selling products to clear up your inventory with Product Pro.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"gray.100\",\n    color: \"gray.500\",\n    p: 2.5,\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Dead Stock (Out of Stock)\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n    colorScheme: \"red\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    overflow: \"hidden\"\n  }, ((_data$dead_stock = data.dead_stock) === null || _data$dead_stock === void 0 ? void 0 : _data$dead_stock.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Product\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Stock\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Sold\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, (_data$dead_stock2 = data.dead_stock) === null || _data$dead_stock2 === void 0 ? void 0 : _data$dead_stock2.map(function (product) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: product.id,\n      _hover: {\n        bg: 'gray.50/30'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      spacing: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      w: \"40px\",\n      h: \"40px\",\n      borderRadius: \"lg\",\n      overflow: \"hidden\",\n      bg: \"gray.50\",\n      border: \"1px solid\",\n      borderColor: \"gray.200\",\n      shadow: \"sm\",\n      flexShrink: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Image, {\n      src: product.image,\n      fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n        w: \"100%\",\n        h: \"100%\",\n        align: \"center\",\n        justify: \"center\",\n        bg: \"gray.50\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n        size: 16,\n        color: \"#cbd5e0\"\n      })),\n      alt: product.name,\n      objectFit: \"cover\",\n      w: \"100%\",\n      h: \"100%\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.VStack, {\n      align: \"start\",\n      spacing: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\",\n      color: \"gray.700\",\n      noOfLines: 1\n    }, product.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, \"SKU: \", product.sku || 'N/A')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      colorScheme: \"gray\",\n      variant: \"solid\",\n      borderRadius: \"full\",\n      px: 2,\n      fontSize: \"10px\"\n    }, product.stock || 0)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      justify: \"flex-end\",\n      spacing: 1,\n      color: \"red.500\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n      size: 14\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\"\n    }, product.units_sold))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true,\n      color: \"gray.600\",\n      fontWeight: \"700\",\n      fontSize: \"sm\"\n    }, formatCurrency(product.revenue)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n    title: \"No dead stock\",\n    description: \"Excellent! You don't have any out-of-stock products with stagnant sales.\",\n    height: \"300px\"\n  }))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_45__[\"default\"], {\n    title: \"Unlock Dead Stock Insights\",\n    description: \"Identify completely out of stock and dead inventory to improve restocking decisions with Product Pro.\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    mb: 10,\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    mb: 6,\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"purple.50\",\n    color: \"purple.500\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Order & Revenue Trend\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n    fontSize: \"sm\",\n    color: \"gray.500\",\n    fontWeight: \"500\"\n  }, \"Analyze the daily performance of your sales and order volume.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    h: \"350px\"\n  }, loading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Stack, {\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n    height: \"350px\",\n    borderRadius: \"xl\"\n  })) : data !== null && data !== void 0 && data.trend_data ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_47__[\"default\"], {\n    options: {\n      chart: {\n        toolbar: {\n          show: false\n        },\n        zoom: {\n          enabled: false\n        },\n        fontFamily: 'inherit'\n      },\n      colors: ['#805AD5', '#38B2AC'],\n      stroke: {\n        curve: 'smooth',\n        width: [3, 3],\n        dashArray: [0, 5]\n      },\n      fill: {\n        type: 'gradient',\n        gradient: {\n          shadeIntensity: 1,\n          opacityFrom: 0.45,\n          opacityTo: 0.05,\n          stops: [20, 100, 100, 100]\n        }\n      },\n      xaxis: {\n        categories: data.trend_data.map(function (d) {\n          return (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(new Date(d.date), 'MMM dd');\n        }),\n        axisBorder: {\n          show: false\n        },\n        axisTicks: {\n          show: false\n        },\n        labels: {\n          style: {\n            colors: '#718096',\n            fontWeight: 600\n          }\n        }\n      },\n      yaxis: [{\n        title: {\n          text: 'Revenue',\n          style: {\n            color: '#805AD5',\n            fontWeight: 600\n          }\n        },\n        labels: {\n          style: {\n            colors: '#805AD5',\n            fontWeight: 600\n          },\n          formatter: function formatter(val) {\n            return formatCurrency(val);\n          }\n        }\n      }, {\n        opposite: true,\n        title: {\n          text: 'Orders',\n          style: {\n            color: '#38B2AC',\n            fontWeight: 600\n          }\n        },\n        labels: {\n          style: {\n            colors: '#38B2AC',\n            fontWeight: 600\n          },\n          formatter: function formatter(val) {\n            return Math.floor(val);\n          }\n        }\n      }],\n      grid: {\n        borderColor: '#EDF2F7',\n        strokeDashArray: 4\n      },\n      tooltip: {\n        shared: true,\n        intersect: false,\n        y: {\n          formatter: function formatter(val, _ref3) {\n            var seriesIndex = _ref3.seriesIndex;\n            return seriesIndex === 0 ? formatCurrency(val) : val + ' Orders';\n          }\n        }\n      },\n      markers: {\n        size: 4,\n        strokeColors: '#fff',\n        strokeWidth: 2,\n        hover: {\n          size: 6\n        }\n      },\n      legend: {\n        position: 'top',\n        horizontalAlign: 'right',\n        fontWeight: 600,\n        markers: {\n          radius: 12\n        }\n      }\n    },\n    series: [{\n      name: 'Revenue',\n      type: 'area',\n      data: data.trend_data.map(function (d) {\n        return d.revenue;\n      })\n    }, {\n      name: 'Orders',\n      type: 'line',\n      data: data.trend_data.map(function (d) {\n        return d.orders;\n      })\n    }],\n    type: \"line\",\n    height: \"100%\"\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n    title: \"No trend data available\",\n    description: \"No order or revenue trends were found for this date range.\",\n    height: \"350px\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    mb: 6,\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"blue.50\",\n    color: \"blue.500\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Frequently Bought Together\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n    colorScheme: \"blue\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n    fontSize: \"sm\",\n    color: \"gray.500\",\n    fontWeight: \"500\"\n  }, \"Identify which products are most commonly paired in a single transaction.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Popover, {\n    isOpen: showPairingDatePicker,\n    onClose: function onClose() {\n      return setShowPairingDatePicker(false);\n    },\n    placement: \"bottom-end\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Button, {\n    size: \"sm\",\n    variant: \"outline\",\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n      size: 14\n    }),\n    onClick: function onClick() {\n      return setShowPairingDatePicker(!showPairingDatePicker);\n    },\n    colorScheme: \"blue\",\n    isLoading: pairingLoading\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_44__.getDateRangeLabel)(pairingDateRange))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.PopoverContent, {\n    w: \"auto\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"2xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_44__[\"default\"], {\n    initialRange: pairingDateRange,\n    onChange: function onChange(range) {\n      setPairingDateRange(range);\n      setCurrentPagePairing(1);\n      setShowPairingDatePicker(false);\n    }\n  }))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\",\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, pairingLoading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Stack, {\n    spacing: 2,\n    py: 4\n  }, _toConsumableArray(Array(pairingsPerPage)).map(function (_, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Skeleton, {\n      key: i,\n      height: \"48px\",\n      borderRadius: \"md\"\n    });\n  })) : pairingData.pairings.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\"\n  }, \"Rank\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\"\n  }, \"Product A\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    textAlign: \"center\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\"\n  }, \"Product B\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    isNumeric: true,\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\"\n  }, \"Pairings\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    isNumeric: true,\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\"\n  }, \"Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, pairingData.pairings.map(function (bundle, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: index,\n      _hover: {\n        bg: 'gray.50'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      colorScheme: \"blue\",\n      variant: \"subtle\",\n      borderRadius: \"md\",\n      px: 2,\n      py: 0.5,\n      fontSize: \"9px\"\n    }, \"#\", (currentPagePairing - 1) * pairingsPerPage + index + 1)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      spacing: 2,\n      maxW: \"200px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      w: \"24px\",\n      h: \"24px\",\n      borderRadius: \"md\",\n      overflow: \"hidden\",\n      flexShrink: 0,\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Image, {\n      src: bundle.image_a,\n      fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n        size: 10\n      }),\n      objectFit: \"cover\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"700\",\n      color: \"gray.700\",\n      noOfLines: 1\n    }, bundle.product_a))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      textAlign: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Icon, {\n      as: lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n      size: 12,\n      color: \"gray.300\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      spacing: 2,\n      maxW: \"200px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      w: \"24px\",\n      h: \"24px\",\n      borderRadius: \"md\",\n      overflow: \"hidden\",\n      flexShrink: 0,\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Image, {\n      src: bundle.image_b,\n      fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n        size: 10\n      }),\n      objectFit: \"cover\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"700\",\n      color: \"gray.700\",\n      noOfLines: 1\n    }, bundle.product_b))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      colorScheme: \"green\",\n      variant: \"outline\",\n      fontSize: \"xs\",\n      fontWeight: \"800\"\n    }, bundle.count)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      isNumeric: true,\n      fontWeight: \"900\",\n      color: \"blue.600\",\n      fontSize: \"xs\"\n    }, formatCurrency(bundle.revenue)));\n  }))), pairingData.total_count > pairingsPerPage && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    justify: \"center\",\n    align: \"center\",\n    mt: 6,\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Button, {\n    size: \"xs\",\n    onClick: function onClick() {\n      return setCurrentPagePairing(function (prev) {\n        return Math.max(1, prev - 1);\n      });\n    },\n    isDisabled: currentPagePairing === 1,\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n      size: 14\n    }),\n    variant: \"ghost\"\n  }, \"Previous\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.500\"\n  }, \"Page \", currentPagePairing, \" of \", Math.ceil(pairingData.total_count / pairingsPerPage)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Button, {\n    size: \"xs\",\n    onClick: function onClick() {\n      return setCurrentPagePairing(function (prev) {\n        return Math.min(Math.ceil(pairingData.total_count / pairingsPerPage), prev + 1);\n      });\n    },\n    isDisabled: currentPagePairing >= Math.ceil(pairingData.total_count / pairingsPerPage),\n    rightIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n      size: 14\n    }),\n    variant: \"ghost\"\n  }, \"Next\"))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n    title: \"Need more data for pairings\",\n    description: \"We need more multi-product orders to identify frequent pairings and cross-sell opportunities.\",\n    height: \"200px\"\n  })), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_45__[\"default\"], {\n    title: \"Unlock Product Pairings\",\n    description: \"Discover complex bundle opportunities and cross-sell ideas by seeing what customers buy together with Product Pro.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8,\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"purple.50\",\n    color: \"purple.500\",\n    p: 2.5,\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Category Performance\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n    colorScheme: \"purple\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    overflow: \"hidden\"\n  }, ((_data$category_perfor = data.category_performance) === null || _data$category_perfor === void 0 ? void 0 : _data$category_perfor.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Category\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Items Sold\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Total Orders\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, data.category_performance.map(function (cat, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: index,\n      _hover: {\n        bg: 'gray.50/30'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      fontWeight: \"800\",\n      color: \"gray.700\"\n    }, cat.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      textAlign: \"center\",\n      fontWeight: \"700\",\n      color: \"gray.600\"\n    }, cat.units_sold), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      textAlign: \"center\",\n      fontWeight: \"700\",\n      color: \"gray.600\"\n    }, cat.order_count), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true,\n      fontWeight: \"800\",\n      color: \"purple.600\"\n    }, formatCurrency(cat.revenue)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    title: \"No category data found\",\n    height: \"200px\"\n  }))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_45__[\"default\"], {\n    title: \"Unlock Category Insights\",\n    description: \"Analyze how different product categories are performing to better align your inventory and marketing strategy.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"pink.50\",\n    color: \"pink.500\",\n    p: 2.5,\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Tag Performance\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    overflow: \"hidden\"\n  }, ((_data$tag_performance = data.tag_performance) === null || _data$tag_performance === void 0 ? void 0 : _data$tag_performance.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Tag\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Items Sold\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Total Orders\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, data.tag_performance.map(function (tag, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: index,\n      _hover: {\n        bg: 'gray.50/30'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      variant: \"subtle\",\n      colorScheme: \"pink\",\n      borderRadius: \"md\",\n      px: 2,\n      py: 0.5,\n      fontWeight: \"800\"\n    }, tag.name)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      textAlign: \"center\",\n      fontWeight: \"700\",\n      color: \"gray.600\"\n    }, tag.units_sold), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      textAlign: \"center\",\n      fontWeight: \"700\",\n      color: \"gray.600\"\n    }, tag.order_count), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true,\n      fontWeight: \"800\",\n      color: \"pink.600\"\n    }, formatCurrency(tag.revenue)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    title: \"No tag data found\",\n    height: \"200px\"\n  })))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"orange.50\",\n    color: \"orange.500\",\n    p: 2.5,\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n    spacing: 2,\n    mb: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Heading, {\n    size: \"md\",\n    fontWeight: \"700\",\n    color: \"gray.800\"\n  }, \"Inventory Depletion Forecast\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n    fontSize: \"sm\",\n    color: \"gray.500\",\n    fontWeight: \"500\"\n  }, \"Predicted stockout dates based on current sales velocity.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    overflow: \"hidden\"\n  }, ((_data$inventory_forec = data.inventory_forecasting) === null || _data$inventory_forec === void 0 ? void 0 : _data$inventory_forec.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Table, {\n    variant: \"simple\",\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Product\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Stock Left\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Velocity\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    isNumeric: true,\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Days Remaining\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Th, {\n    px: 6,\n    py: 4,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    fontSize: \"xs\",\n    fontWeight: \"800\"\n  }, \"Priority\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Tbody, null, data.inventory_forecasting.map(function (item) {\n    var urgency = item.runway_days <= 7 ? {\n      color: 'red',\n      label: 'CRITICAL',\n      dot: '🔴'\n    } : item.runway_days <= 30 ? {\n      color: 'orange',\n      label: 'URGENT',\n      dot: '🟠'\n    } : {\n      color: 'orange',\n      label: 'MONITOR',\n      dot: '🟡'\n    };\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.Tr, {\n      key: item.id,\n      _hover: {\n        bg: 'gray.50/30'\n      },\n      transition: \"all 0.2s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.HStack, {\n      spacing: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      w: \"40px\",\n      h: \"40px\",\n      borderRadius: \"lg\",\n      overflow: \"hidden\",\n      bg: \"gray.50\",\n      border: \"1px solid\",\n      borderColor: \"gray.200\",\n      shadow: \"sm\",\n      flexShrink: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Image, {\n      src: item.image,\n      fallback: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Flex, {\n        w: \"100%\",\n        h: \"100%\",\n        align: \"center\",\n        justify: \"center\",\n        bg: \"gray.50\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n        size: 16,\n        color: \"#cbd5e0\"\n      })),\n      alt: item.name,\n      objectFit: \"cover\",\n      w: \"100%\",\n      h: \"100%\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.VStack, {\n      align: \"start\",\n      spacing: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"800\",\n      color: \"gray.700\",\n      noOfLines: 1\n    }, item.name), item.sku && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"widest\"\n    }, \"SKU: \", item.sku)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"900\",\n      color: \"gray.800\",\n      fontSize: \"lg\"\n    }, item.stock)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      variant: \"outline\",\n      colorScheme: \"gray\",\n      borderRadius: \"md\",\n      px: 2,\n      py: 0.5,\n      fontSize: \"10px\",\n      fontWeight: \"900\"\n    }, item.velocity, \" units / Day\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Box, {\n      textAlign: \"right\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      fontWeight: \"900\",\n      color: \"\".concat(urgency.color, \".500\"),\n      fontSize: \"xl\"\n    }, item.runway_days, \" \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Text, {\n      as: \"span\",\n      fontSize: \"xs\",\n      fontWeight: \"700\"\n    }, \"DAYS\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Td, {\n      px: 6,\n      textAlign: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Badge, {\n      colorScheme: urgency.color,\n      variant: \"solid\",\n      px: 3,\n      py: 1,\n      borderRadius: \"full\",\n      fontSize: \"10px\",\n      fontWeight: \"900\",\n      letterSpacing: \"wider\"\n    }, urgency.label)));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n    title: \"No products at risk\",\n    description: \"Great news! No products are at risk of depletion in the next 90 days based on current sales velocity.\",\n    height: \"200px\"\n  })))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductAnalytics);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/ProductAnalytics.jsx?\n}");

/***/ },

/***/ "./src/Components/SalesAnalytics.jsx"
/*!*******************************************!*\
  !*** ./src/Components/SalesAnalytics.jsx ***!
  \*******************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/lib/axios.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/format.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\n/* harmony import */ var _shared_DatePicker__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shared/DatePicker */ \"./src/Components/shared/DatePicker.jsx\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/crown.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/dollar-sign.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/history.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/map-pin.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/monitor.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/percent.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/receipt.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/smartphone.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/tablet.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/tag.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-up.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/truck.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/users.js\");\n/* harmony import */ var react_apexcharts__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! react-apexcharts */ \"./node_modules/react-apexcharts/dist/react-apexcharts.esm.js\");\n/* harmony import */ var _shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./shared/ProLockOverlay */ \"./src/Components/shared/ProLockOverlay.jsx\");\n/* harmony import */ var _shared_SuggestFeatureModal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./shared/SuggestFeatureModal */ \"./src/Components/shared/SuggestFeatureModal.jsx\");\n/* harmony import */ var _shared_NoContent__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./shared/NoContent */ \"./src/Components/shared/NoContent.jsx\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/avatar/avatar.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/badge/badge.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/grid/simple-grid.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-trigger.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/portal/portal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton-circle.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/h-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/v-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/table.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tbody.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/td.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/th.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/thead.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tr.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/tooltip/tooltip.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\n\n\n\n\n\n\nvar SalesAnalytics = function SalesAnalytics() {\n  var _data$summary, _data$summary2, _data$summary3, _data$currency_symbol, _data$top_returned, _data$top_returned2;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_4__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_5__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.endOfDay)(new Date()),\n      key: 'selection'\n    }]),\n    _useState2 = _slicedToArray(_useState, 2),\n    dateRange = _useState2[0],\n    setDateRange = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState4 = _slicedToArray(_useState3, 2),\n    loading = _useState4[0],\n    setLoading = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState6 = _slicedToArray(_useState5, 2),\n    data = _useState6[0],\n    setData = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState8 = _slicedToArray(_useState7, 2),\n    showDatePicker = _useState8[0],\n    setShowDatePicker = _useState8[1];\n  var fetchData = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var response, _t;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            setLoading(true);\n            _context.p = 1;\n            _context.n = 2;\n            return axios__WEBPACK_IMPORTED_MODULE_1__[\"default\"].get(\"\".concat(insightPressData.apiUrl, \"analytics/sales\"), {\n              params: {\n                start_date: (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.format)(dateRange[0].startDate, 'yyyy-MM-dd'),\n                end_date: (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.format)(dateRange[0].endDate, 'yyyy-MM-dd')\n              },\n              headers: {\n                'X-WP-Nonce': insightPressData.nonce\n              }\n            });\n          case 2:\n            response = _context.v;\n            setData(response.data);\n            _context.n = 4;\n            break;\n          case 3:\n            _context.p = 3;\n            _t = _context.v;\n            console.error('Error fetching sales analytics:', _t);\n          case 4:\n            _context.p = 4;\n            setLoading(false);\n            return _context.f(4);\n          case 5:\n            return _context.a(2);\n        }\n      }, _callee, null, [[1, 3, 4, 5]]);\n    }));\n    return function fetchData() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    fetchData();\n  }, [dateRange]);\n  var formatCurrency = function formatCurrency(amount) {\n    var symbol = (data === null || data === void 0 ? void 0 : data.currency_symbol) || '$';\n    var formattedAmount = parseFloat(amount || 0).toLocaleString(undefined, {\n      minimumFractionDigits: 2,\n      maximumFractionDigits: 2\n    });\n    return \"\".concat(symbol.trim(), \" \").concat(formattedAmount);\n  };\n  var profit = (data === null || data === void 0 || (_data$summary = data.summary) === null || _data$summary === void 0 ? void 0 : _data$summary.actual_profit) || 0;\n  var totalCogs = (data === null || data === void 0 || (_data$summary2 = data.summary) === null || _data$summary2 === void 0 ? void 0 : _data$summary2.total_cogs) || 0;\n  var netRevenue = (data === null || data === void 0 || (_data$summary3 = data.summary) === null || _data$summary3 === void 0 ? void 0 : _data$summary3.net_revenue) || 0;\n  var margin = netRevenue > 0 ? profit / netRevenue * 100 : 0;\n  var currencySymbol = (data === null || data === void 0 || (_data$currency_symbol = data.currency_symbol) === null || _data$currency_symbol === void 0 ? void 0 : _data$currency_symbol.trim()) || '$';\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    className: \"insightpress-sales-container\",\n    maxW: \"100%\",\n    overflowX: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    direction: {\n      base: 'column',\n      sm: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      sm: 'center'\n    },\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"lg\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Sales & Revenue Analytics\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_SuggestFeatureModal__WEBPACK_IMPORTED_MODULE_23__[\"default\"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Popover, {\n    isOpen: showDatePicker,\n    onClose: function onClose() {\n      return setShowDatePicker(false);\n    },\n    placement: \"bottom-end\",\n    closeOnBlur: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Button, {\n    onClick: function onClick() {\n      return setShowDatePicker(!showDatePicker);\n    },\n    bg: \"white\",\n    border: \"1px solid\",\n    borderColor: \"gray.200\",\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    color: \"gray.600\",\n    fontWeight: \"600\",\n    _hover: {\n      bg: 'gray.50'\n    },\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n      size: 18\n    })\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_6__.getDateRangeLabel)(dateRange[0]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.PopoverContent, {\n    w: \"auto\",\n    shadow: \"2xl\",\n    borderRadius: \"2xl\",\n    bg: \"white\",\n    overflow: \"hidden\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    _focus: {\n      outline: 'none'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n    initialRange: dateRange[0],\n    onChange: function onChange(item) {\n      return setDateRange([item]);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    textAlign: \"right\",\n    borderTop: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Button, {\n    size: \"sm\",\n    colorScheme: \"blue\",\n    onClick: function onClick() {\n      return setShowDatePicker(false);\n    }\n  }, \"Done\"))))))))), loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 4\n    },\n    spacing: 6\n  }, [1, 2, 3, 4].map(function (i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      key: i,\n      p: 6,\n      bg: \"white\",\n      borderRadius: \"xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      display: \"flex\",\n      justifyContent: \"space-between\",\n      mb: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      flex: 1\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n      height: \"14px\",\n      width: \"60%\",\n      mb: 3\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n      height: \"28px\",\n      width: \"80%\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.SkeletonCircle, {\n      size: \"10\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n      height: \"12px\",\n      width: \"40%\"\n    }));\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n    height: \"20px\",\n    width: \"200px\",\n    mb: 6\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 3\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n    height: \"150px\",\n    borderRadius: \"lg\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n    height: \"150px\",\n    borderRadius: \"lg\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n    height: \"150px\",\n    borderRadius: \"lg\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n    height: \"300px\",\n    borderRadius: \"xl\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Skeleton, {\n    height: \"300px\",\n    borderRadius: \"xl\"\n  }))), data && !loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 4\n    },\n    spacing: 4,\n    mb: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"white\",\n    p: 4,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    align: \"center\",\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"lg\",\n    bg: \"blue.50\",\n    color: \"blue.500\",\n    flexShrink: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    flex: \"1\",\n    minW: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    noOfLines: 1,\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, \"Gross Revenue\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, formatCurrency(data.summary.gross_revenue)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"Before deductions\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"white\",\n    p: 4,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    align: \"center\",\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"lg\",\n    bg: \"green.50\",\n    color: \"green.500\",\n    flexShrink: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    flex: \"1\",\n    minW: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    noOfLines: 1,\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, \"Net Revenue\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"800\",\n    color: \"green.600\"\n  }, formatCurrency(data.summary.net_revenue)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"After deductions\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"white\",\n    p: 4,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    align: \"center\",\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"lg\",\n    bg: \"red.50\",\n    color: \"red.500\",\n    flexShrink: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    flex: \"1\",\n    minW: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    noOfLines: 1,\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, \"Total Orders\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, data.summary.order_count), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"Successful orders\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"white\",\n    p: 4,\n    borderRadius: \"xl\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    align: \"center\",\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"lg\",\n    bg: \"purple.50\",\n    color: \"purple.500\",\n    flexShrink: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    flex: \"1\",\n    minW: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    noOfLines: 1,\n    textTransform: \"uppercase\",\n    letterSpacing: \"wider\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_48__.Tooltip, {\n    label: \"Average\",\n    placement: \"top\",\n    hasArrow: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    as: \"span\",\n    borderBottom: \"1px dotted\",\n    cursor: \"help\"\n  }, \"Avg.\")), \" Order Value\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, formatCurrency(data.summary.average_order_value)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"Average per order\"))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"red.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Deductions Breakdown\")), function () {\n    var totalDed = data.summary.total_tax + data.summary.total_shipping + data.summary.total_discount + data.summary.total_refunded;\n    var gross = data.summary.gross_revenue || 1;\n    var items = [{\n      label: 'Total Tax',\n      icon: lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n      value: data.summary.total_tax,\n      bg: 'blue.50',\n      iconBg: 'blue.500',\n      barColor: 'blue.400'\n    }, {\n      label: 'Shipping Cost',\n      icon: lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n      value: data.summary.total_shipping,\n      bg: 'purple.50',\n      iconBg: 'purple.500',\n      barColor: 'purple.400'\n    }, {\n      label: 'Coupons & Discounts',\n      icon: lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n      value: data.summary.total_discount,\n      bg: 'orange.50',\n      iconBg: 'orange.500',\n      barColor: 'orange.400'\n    }, {\n      label: 'Refunds Lost',\n      icon: lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n      value: data.summary.total_refunded,\n      bg: 'red.50',\n      iconBg: 'red.500',\n      barColor: 'red.400'\n    }];\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n      columns: {\n        base: 1,\n        md: 2,\n        lg: 4\n      },\n      spacing: 4,\n      mb: 4\n    }, items.map(function (item, i) {\n      var pct = (item.value / gross * 100).toFixed(1);\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n        key: i,\n        bg: \"white\",\n        p: 4,\n        borderRadius: \"xl\",\n        border: \"1px solid\",\n        borderColor: \"gray.100\",\n        shadow: \"sm\",\n        transition: \"all 0.2s\",\n        _hover: {\n          shadow: 'md',\n          transform: 'translateY(-2px)'\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n        align: \"center\",\n        gap: 3,\n        mb: 3\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n        bg: item.iconBg,\n        color: \"white\",\n        p: 2,\n        borderRadius: \"lg\",\n        flexShrink: 0\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(item.icon, {\n        size: 16\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n        fontSize: \"xs\",\n        fontWeight: \"700\",\n        color: \"gray.500\",\n        textTransform: \"uppercase\",\n        letterSpacing: \"wider\",\n        noOfLines: 1\n      }, item.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n        fontSize: \"xl\",\n        fontWeight: \"900\",\n        color: \"gray.800\",\n        mb: 2\n      }, formatCurrency(item.value)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n        justify: \"space-between\",\n        mb: 1\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n        fontSize: \"10px\",\n        color: \"gray.400\",\n        fontWeight: \"600\"\n      }, \"of gross revenue\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n        fontSize: \"10px\",\n        color: \"gray.600\",\n        fontWeight: \"800\"\n      }, pct, \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n        h: \"4px\",\n        bg: \"gray.100\",\n        borderRadius: \"full\",\n        overflow: \"hidden\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n        h: \"100%\",\n        bg: item.barColor,\n        w: \"\".concat(Math.min(parseFloat(pct), 100), \"%\"),\n        borderRadius: \"full\",\n        transition: \"width 0.8s ease\"\n      }))));\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      p: 5,\n      bg: \"gray.900\",\n      borderRadius: \"xl\",\n      color: \"white\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n      spacing: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      bg: \"red.500\",\n      p: 2,\n      borderRadius: \"lg\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n      size: 16\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, \"Total Deductions\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\",\n      fontWeight: \"500\"\n    }, (totalDed / gross * 100).toFixed(1), \"% of gross revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"2xl\",\n      fontWeight: \"900\",\n      color: \"red.400\"\n    }, formatCurrency(totalDed)))));\n  }()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    gap: 4,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Profit & \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_48__.Tooltip, {\n    label: \"Cost of Goods Sold\",\n    placement: \"top\",\n    hasArrow: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    as: \"span\",\n    borderBottom: \"1px dotted\",\n    cursor: \"help\"\n  }, \"COGS\")), \" Performance\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n    colorScheme: \"purple\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n    colorScheme: \"green\",\n    variant: \"subtle\",\n    px: 3,\n    py: 1,\n    borderRadius: \"lg\"\n  }, \"Automated Tracking Active\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 3\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"gray.50\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"start\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    mb: 1\n  }, \"Cost of Goods (COGS)\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"lg\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, formatCurrency(totalCogs))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"xl\",\n    bg: \"gray.200\",\n    color: \"gray.600\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n    size: 20\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    mt: 6\n  }, \"Sum of individual product costs\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"gray.900\",\n    borderRadius: \"2xl\",\n    color: \"white\",\n    shadow: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"start\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    mb: 1\n  }, \"Actual Profit\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"lg\",\n    fontWeight: \"800\",\n    color: \"white\"\n  }, formatCurrency(profit))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"xl\",\n    bg: \"whiteAlpha.100\",\n    color: \"green.400\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n    size: 20\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.600\",\n    mt: 6\n  }, \"Net Revenue - \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_48__.Tooltip, {\n    label: \"Cost of Goods Sold\",\n    placement: \"top\",\n    hasArrow: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    as: \"span\",\n    borderBottom: \"1px dotted\",\n    cursor: \"help\",\n    color: \"gray.500\"\n  }, \"COGS\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: margin > 20 ? 'green.50' : 'orange.50',\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: margin > 20 ? 'green.100' : 'orange.100'\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"start\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: margin > 20 ? 'green.600' : 'orange.600',\n    textTransform: \"uppercase\",\n    mb: 1\n  }, \"Profit Margin\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"lg\",\n    fontWeight: \"800\",\n    color: margin > 20 ? 'green.800' : 'orange.800'\n  }, margin.toFixed(2), \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 3,\n    borderRadius: \"xl\",\n    bg: margin > 20 ? 'green.500' : 'orange.500',\n    color: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n    size: 20\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: margin > 20 ? 'green.600' : 'orange.600',\n    mt: 6\n  }, margin > 20 ? '🔥 Healthy performance' : '⚖️ Room for optimization')))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    title: \"Unlock Profit Insights\",\n    description: \"Track your actual profit, margins, and Cost of Goods Sold (COGS) automatically with the Pro version.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"red.50\",\n    color: \"red.500\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 20,\n    style: {\n      transform: 'rotate(180deg)'\n    }\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Refund & Return Analysis\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    filter: \"none\",\n    pointerEvents: \"auto\",\n    userSelect: \"auto\",\n    transition: \"all 0.3s\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 3\n    },\n    spacing: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"sm\",\n    fontWeight: \"600\",\n    color: \"gray.800\",\n    mb: 6\n  }, \"Refund Metrics\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    mb: 1\n  }, \"Revenue Lost\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"800\",\n    color: \"red.500\"\n  }, formatCurrency(data.summary.total_refunded))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 2,\n    borderRadius: \"lg\",\n    bg: \"red.50\",\n    color: \"red.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    size: 20,\n    style: {\n      transform: 'rotate(180deg)'\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"gray.50\",\n    p: 5,\n    borderRadius: \"2xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    mb: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\"\n  }, \"Refund Rate\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, data.summary.refund_rate.toFixed(2), \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: \"100%\",\n    h: \"6px\",\n    bg: \"gray.200\",\n    borderRadius: \"full\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: \"\".concat(Math.min(data.summary.refund_rate * 5, 100), \"%\"),\n    h: \"100%\",\n    bg: \"red.500\",\n    borderRadius: \"full\"\n  }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    gridColumn: {\n      lg: \"span 2\"\n    },\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"sm\",\n    fontWeight: \"600\",\n    color: \"gray.800\",\n    mb: 6\n  }, \"Top Returned Products\"), (data === null || data === void 0 || (_data$top_returned = data.top_returned) === null || _data$top_returned === void 0 ? void 0 : _data$top_returned.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_46__.Thead, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__.Tr, {\n    borderBottom: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Product Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Reason\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Returns\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    textAlign: \"right\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Refunded\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Tbody, null, data === null || data === void 0 || (_data$top_returned2 = data.top_returned) === null || _data$top_returned2 === void 0 ? void 0 : _data$top_returned2.map(function (product, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__.Tr, {\n      key: index\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      align: \"center\",\n      gap: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Avatar, {\n      size: \"xs\",\n      src: product.image,\n      name: product.name,\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      color: \"gray.800\",\n      fontWeight: \"700\",\n      noOfLines: 1\n    }, product.name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4\n    }, product.reasons && product.reasons.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\",\n      fontStyle: \"italic\",\n      noOfLines: 1\n    }, product.reasons.join(', ')) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.300\"\n    }, \"\\u2014\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4,\n      textAlign: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n      colorScheme: \"gray\",\n      px: 3,\n      py: 1,\n      borderRadius: \"lg\",\n      fontSize: \"11px\"\n    }, product.count)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4,\n      textAlign: \"right\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      color: \"red.500\",\n      fontWeight: \"800\"\n    }, formatCurrency(product.amount))));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n    title: \"No refund data recorded\",\n    description: \"We haven't detected any refunds for the selected period.\",\n    height: \"150px\"\n  })))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2,\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Incentives Performance\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 3\n    },\n    spacing: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"relative\",\n    gridColumn: {\n      lg: \"span 2\"\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"sm\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Coupon & Discount Performance\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 2,\n    borderRadius: \"lg\",\n    bg: \"purple.50\",\n    color: \"purple.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {\n    size: 20\n  }))), data.coupon_performance.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_46__.Thead, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__.Tr, {\n    borderBottom: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Promo Code\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Usage Count\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    textAlign: \"right\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Revenue Reduction\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Tbody, null, data.coupon_performance.map(function (coupon, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__.Tr, {\n      key: index\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n      variant: \"subtle\",\n      colorScheme: \"orange\",\n      px: 3,\n      py: 1,\n      borderRadius: \"full\",\n      fontSize: \"11px\",\n      fontWeight: \"800\",\n      letterSpacing: \"wider\",\n      textTransform: \"uppercase\",\n      border: \"1px dashed\",\n      borderColor: \"orange.200\"\n    }, coupon.code)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4,\n      textAlign: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      color: \"gray.800\",\n      fontWeight: \"700\"\n    }, coupon.usage_count, \" orders\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4,\n      textAlign: \"right\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      color: \"red.500\",\n      fontWeight: \"800\"\n    }, \"-\", formatCurrency(coupon.total_discount))));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n    title: \"No coupons used\",\n    description: \"No discount codes were applied during this time period.\",\n    height: \"150px\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 8,\n    bg: \"orange.50\",\n    borderRadius: \"3xl\",\n    border: \"1px solid\",\n    borderColor: \"orange.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"sm\",\n    fontWeight: \"800\",\n    color: \"orange.800\",\n    mb: 6\n  }, \"Discount Insights\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"orange.600\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Total Discount Given\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"xl\",\n    fontWeight: \"900\",\n    color: \"orange.800\"\n  }, formatCurrency(data.summary.total_discount))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 5,\n    bg: \"whiteAlpha.600\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"orange.200\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: \"orange.700\",\n    fontWeight: \"600\",\n    lineHeight: \"tall\"\n  }, \"Discounts lowered your gross revenue by \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    as: \"span\",\n    fontWeight: \"900\",\n    color: \"orange.800\"\n  }, (data.summary.total_discount / (data.summary.gross_revenue || 1) * 100).toFixed(1), \"%\"), \" this period.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"orange.600\",\n    mb: 3\n  }, \"Top Performing Strategy\"), data.coupon_performance.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: 2,\n    h: 2,\n    bg: \"orange.500\",\n    borderRadius: \"full\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"700\",\n    color: \"orange.800\"\n  }, data.coupon_performance[0].code, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    as: \"span\",\n    color: \"orange.600\",\n    fontWeight: \"500\"\n  }, \" is your lead driver.\"))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"sm\",\n    color: \"orange.400\",\n    fontStyle: \"italic\",\n    fontWeight: \"600\"\n  }, \"No data detected\")))))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    title: \"Coupon & Promo Insights\",\n    description: \"See which coupon codes and discount strategies are driving the most revenue with Pro.\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"sm\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Free Shipping Products\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 2,\n    borderRadius: \"lg\",\n    bg: \"green.50\",\n    color: \"green.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n    size: 20\n  }))), data.free_shipping_products && data.free_shipping_products.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    overflowX: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_46__.Thead, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__.Tr, {\n    borderBottom: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Product Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    textAlign: \"center\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Total Orders\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_45__.Th, {\n    px: 0,\n    py: 5,\n    textAlign: \"right\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    fontSize: \"10px\",\n    letterSpacing: \"1px\"\n  }, \"Total Revenue\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Tbody, null, data.free_shipping_products.map(function (product, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_47__.Tr, {\n      key: index\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      align: \"center\",\n      gap: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.Avatar, {\n      size: \"xs\",\n      src: product.image,\n      name: product.name,\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      color: \"gray.800\",\n      fontWeight: \"700\",\n      noOfLines: 1\n    }, product.name))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4,\n      textAlign: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n      colorScheme: \"green\",\n      px: 3,\n      py: 1,\n      borderRadius: \"lg\",\n      fontSize: \"11px\"\n    }, product.orders, \" orders\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Td, {\n      px: 0,\n      py: 4,\n      textAlign: \"right\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      color: \"green.600\",\n      fontWeight: \"800\"\n    }, formatCurrency(product.revenue))));\n  })))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n    title: \"No free shipping data\",\n    description: \"No orders with free shipping were recorded for this period.\",\n    height: \"150px\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2,\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Customer Lifetime Value (CLV) Analysis\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n    colorScheme: \"blue\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 4\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 8,\n    bgGradient: \"linear(to-br, blue.600, blue.800)\",\n    borderRadius: \"3xl\",\n    color: \"white\",\n    shadow: \"xl\",\n    position: \"relative\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"absolute\",\n    top: \"-20px\",\n    right: \"-20px\",\n    opacity: 0.1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n    size: 120\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"whiteAlpha.700\",\n    textTransform: \"uppercase\",\n    mb: 1\n  }, \"Estimated \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_48__.Tooltip, {\n    label: \"Customer Lifetime Value\",\n    placement: \"top\",\n    hasArrow: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    as: \"span\",\n    borderBottom: \"1px dotted\",\n    cursor: \"help\"\n  }, \"CLV\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"lg\",\n    fontWeight: \"900\"\n  }, formatCurrency(data.summary.clv))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: \"whiteAlpha.600\",\n    fontWeight: \"600\"\n  }, \"Avg. revenue expected per unique customer\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: 2,\n    spacing: 4,\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Customers\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n    color: \"blue.500\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"lg\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, data.summary.customer_count))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Frequency\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n    color: \"green.500\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"lg\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, data.summary.purchase_frequency, \"x\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 4,\n    bg: \"gray.50\",\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    fontWeight: \"600\",\n    lineHeight: \"tall\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    as: \"span\",\n    fontWeight: \"800\",\n    color: \"gray.700\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_48__.Tooltip, {\n    label: \"Customer Lifetime Value\",\n    placement: \"top\",\n    hasArrow: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    as: \"span\",\n    borderBottom: \"1px dotted\",\n    cursor: \"help\"\n  }, \"CLV\")), \" = \"), \" Avg. Order Value \\xD7 Purchase Frequency.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    mb: 4\n  }, \"Loyalty Insight\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"800\",\n    color: data.summary.purchase_frequency > 1.2 ? \"green.600\" : \"orange.500\"\n  }, data.summary.purchase_frequency > 1.2 ? \"🔥 Strong Retention\" : \"⚖️ Growth Opportunity\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    mb: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.500\"\n  }, \"Loyalty Score\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, Math.round(Math.min(data.summary.purchase_frequency * 30, 100)), \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: \"100%\",\n    h: \"6px\",\n    bg: \"gray.100\",\n    borderRadius: \"full\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: \"\".concat(Math.min(data.summary.purchase_frequency * 30, 100), \"%\"),\n    h: \"100%\",\n    bg: \"blue.500\",\n    borderRadius: \"full\"\n  }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\",\n    textTransform: \"uppercase\",\n    mb: 4\n  }, \"New vs. Returning\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    h: \"200px\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n    options: {\n      labels: ['New', 'Returning'],\n      colors: ['#4299E1', '#48BB78'],\n      legend: {\n        show: false\n      },\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        show: false\n      },\n      plotOptions: {\n        pie: {\n          donut: {\n            size: '80%',\n            labels: {\n              show: true,\n              total: {\n                show: true,\n                label: 'Total',\n                color: '#A0AEC0',\n                fontSize: '12px',\n                fontWeight: 600,\n                formatter: function formatter() {\n                  return data.summary.customer_count;\n                }\n              },\n              value: {\n                show: true,\n                fontSize: '18px',\n                fontWeight: 800,\n                color: '#1A202C',\n                offsetY: 2\n              }\n            }\n          }\n        }\n      },\n      tooltip: {\n        enabled: true,\n        y: {\n          formatter: function formatter(val) {\n            return \"\".concat(val, \" Customers\");\n          }\n        }\n      }\n    },\n    series: [data.summary.new_customers, data.summary.returning_customers],\n    type: \"donut\",\n    width: \"100%\",\n    height: \"100%\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 6,\n    justify: \"center\",\n    mt: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.VStack, {\n    spacing: 0,\n    align: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2,\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: 2,\n    h: 2,\n    bg: \"blue.400\",\n    borderRadius: \"full\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.600\"\n  }, \"New\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, (data.summary.new_customers / (data.summary.customer_count || 1) * 100).toFixed(0), \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.VStack, {\n    spacing: 0,\n    align: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2,\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    w: 2,\n    h: 2,\n    bg: \"green.400\",\n    borderRadius: \"full\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.600\"\n  }, \"Returning\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, (data.summary.returning_customers / (data.summary.customer_count || 1) * 100).toFixed(0), \"%\")))))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    title: \"Customer Lifetime Analysis\",\n    description: \"Unlock deep insights into customer retention, loyalty scores, and estimated Lifetime Value (CLV).\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"orange.50\",\n    color: \"orange.500\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n    size: 22\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Automated Customer Segmentation\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n    colorScheme: \"orange\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 4\n    },\n    spacing: 6\n  }, data.customer_segments.map(function (segment, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      key: index,\n      p: 6,\n      bg: \"white\",\n      borderRadius: \"2xl\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      shadow: \"sm\",\n      transition: \"all 0.2s\",\n      _hover: {\n        shadow: 'md',\n        transform: 'translateY(-2px)'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      justify: \"space-between\",\n      align: \"start\",\n      mb: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"700\",\n      color: \"gray.400\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, segment.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n      bg: index === 0 ? \"orange.50\" : \"gray.50\",\n      color: index === 0 ? \"orange.600\" : \"gray.600\",\n      px: 2,\n      py: 0.5,\n      borderRadius: \"full\",\n      fontSize: \"10px\"\n    }, (segment.count / (data.summary.customer_count || 1) * 100).toFixed(0), \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n      size: \"lg\",\n      fontWeight: \"800\",\n      color: \"gray.800\",\n      mb: 1\n    }, segment.count), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\",\n      fontWeight: \"500\",\n      lineHeight: \"tall\"\n    }, segment.description), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      mt: 4,\n      w: \"100%\",\n      h: \"4px\",\n      bg: \"gray.50\",\n      borderRadius: \"full\",\n      overflow: \"hidden\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      w: \"\".concat(segment.count / (data.summary.customer_count || 1) * 100, \"%\"),\n      h: \"100%\",\n      bg: index === 0 ? \"orange.400\" : index === 1 ? \"purple.400\" : index === 2 ? \"red.400\" : \"green.400\",\n      borderRadius: \"full\"\n    })));\n  }))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    title: \"Automated CRM Segmentation\",\n    description: \"Automatically sort your customers into Loyal, At-Risk, and VIP segments for targeted marketing campaigns.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n    spacing: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    bg: \"green.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n    size: 22\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\"\n  }, \"Geographic Sales Distribution\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    mb: 6\n  }, \"Revenue by Country\"), data.geographic_distribution.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 6\n  }, data.geographic_distribution.map(function (item, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      key: index\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      justify: \"space-between\",\n      mb: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, item.country), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n      spacing: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"800\",\n      color: \"gray.700\"\n    }, formatCurrency(item.revenue)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Badge, {\n      colorScheme: \"green\",\n      borderRadius: \"full\",\n      px: 2,\n      fontSize: \"10px\"\n    }, (item.revenue / (data.summary.net_revenue || 1) * 100).toFixed(1), \"%\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      w: \"100%\",\n      h: \"8px\",\n      bg: \"gray.100\",\n      borderRadius: \"full\",\n      overflow: \"hidden\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      w: \"\".concat(item.revenue / (data.summary.net_revenue || 1) * 100, \"%\"),\n      h: \"100%\",\n      bgGradient: \"linear(to-r, green.400, green.600)\",\n      borderRadius: \"full\"\n    })));\n  })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n    title: \"No location data found\",\n    height: \"150px\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    mb: 6\n  }, \"Top Performing Cities\"), data.top_cities.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 3\n  }, data.top_cities.map(function (city, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      key: index,\n      justify: \"space-between\",\n      align: \"center\",\n      p: 4,\n      bg: index === 0 ? \"green.50\" : \"gray.50\",\n      borderRadius: \"xl\",\n      border: \"1px solid\",\n      borderColor: index === 0 ? \"green.100\" : \"transparent\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, city.city), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\",\n      fontWeight: \"600\"\n    }, city.country)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"md\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, formatCurrency(city.revenue)));\n  })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n    title: \"No city data available\",\n    height: \"150px\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_49__.Heading, {\n    size: \"md\",\n    fontWeight: \"600\",\n    color: \"gray.800\",\n    mb: 6\n  }, \"Device & Browser Reporting\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 3\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    mb: 6\n  }, \"Traffic by Device\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 6\n  }, [{\n    label: 'Desktop',\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n    key: 'desktop',\n    color: 'blue.500'\n  }, {\n    label: 'Mobile',\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n    key: 'mobile',\n    color: 'green.500'\n  }, {\n    label: 'Tablet',\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n    key: 'tablet',\n    color: 'orange.500'\n  }].map(function (device) {\n    var count = data.device_stats[device.key] || 0;\n    var total = data.summary.order_count || 1;\n    var percentage = (count / total * 100).toFixed(1);\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      key: device.key\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.HStack, {\n      spacing: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Icon, {\n      as: device.icon,\n      size: 18,\n      color: device.color\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, device.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\",\n      fontWeight: \"700\"\n    }, count, \" orders (\", percentage, \"%)\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      w: \"100%\",\n      h: \"8px\",\n      bg: \"gray.100\",\n      borderRadius: \"full\",\n      overflow: \"hidden\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n      w: \"\".concat(percentage, \"%\"),\n      h: \"100%\",\n      bg: device.color,\n      borderRadius: \"full\",\n      transition: \"width 0.5s ease\"\n    })));\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"white\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    textTransform: \"uppercase\",\n    mb: 6\n  }, \"Top Browsers\"), Object.keys(data.browser_stats).length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    h: \"280px\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n    options: {\n      labels: Object.keys(data.browser_stats),\n      colors: ['#3182CE', '#38A169', '#D69E2E', '#E53E3E', '#805AD5', '#319795'],\n      legend: {\n        position: 'bottom',\n        horizontalAlign: 'center',\n        fontSize: '11px',\n        markers: {\n          radius: 12\n        },\n        itemMargin: {\n          horizontal: 5,\n          vertical: 2\n        }\n      },\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        show: false\n      },\n      plotOptions: {\n        pie: {\n          donut: {\n            size: '75%',\n            labels: {\n              show: true,\n              total: {\n                show: true,\n                label: 'Visits',\n                fontSize: '12px',\n                fontWeight: 600,\n                color: '#A0AEC0',\n                formatter: function formatter() {\n                  return Object.values(data.browser_stats).reduce(function (a, b) {\n                    return a + b;\n                  }, 0);\n                }\n              }\n            }\n          }\n        }\n      },\n      tooltip: {\n        y: {\n          formatter: function formatter(val) {\n            return \"\".concat(val, \" Orders\");\n          }\n        }\n      }\n    },\n    series: Object.values(data.browser_stats),\n    type: \"donut\",\n    width: \"100%\",\n    height: \"100%\"\n  })) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n    title: \"No browser data found\",\n    height: \"150px\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 6,\n    bg: \"blue.50\",\n    borderRadius: \"2xl\",\n    border: \"1px solid\",\n    borderColor: \"blue.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"blue.600\",\n    textTransform: \"uppercase\",\n    mb: 4\n  }, \"UX Performance Tip\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Stack, {\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"sm\",\n    color: \"blue.900\",\n    fontWeight: \"600\",\n    lineHeight: \"tall\"\n  }, (data.device_stats.mobile + data.device_stats.tablet) / (data.summary.order_count || 1) * 100 > 50 ? \"Over 50% of your sales are happening on mobile! Ensure your checkout process is ultra-smooth for small screens.\" : \"Desktop is your primary conversion engine. Focus on large-screen product visualizations and detailed descriptions.\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Box, {\n    p: 4,\n    bg: \"white\",\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"blue.200\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    color: \"blue.600\",\n    mb: 1\n  }, \"Did you know?\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_50__.Text, {\n    fontSize: \"xs\",\n    color: \"blue.500\",\n    fontWeight: \"600\"\n  }, \"Mobile users have a 2x higher abandonment rate. Optimizing for \", data.device_stats.mobile > data.device_stats.desktop ? \"Mobile\" : \"Desktop\", \" could boost revenue by 15%.\"))))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SalesAnalytics);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/SalesAnalytics.jsx?\n}");

/***/ },

/***/ "./src/Components/SinglePostAnalytics.jsx"
/*!************************************************!*\
  !*** ./src/Components/SinglePostAnalytics.jsx ***!
  \************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/badge/badge.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/grid/simple-grid.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-trigger.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/portal/portal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton-circle.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/h-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/v-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/toast/use-toast.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/panels-top-left.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/clock.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/external-link.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/eye.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/globe.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/link.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/log-out.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/monitor.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/mouse-pointer-2.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/move-down.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/refresh-ccw.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/smartphone.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/tablet.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-down.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/users.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/format.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\n/* harmony import */ var _shared_DatePicker__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./shared/DatePicker */ \"./src/Components/shared/DatePicker.jsx\");\n/* harmony import */ var react_apexcharts__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! react-apexcharts */ \"./node_modules/react-apexcharts/dist/react-apexcharts.esm.js\");\n/* harmony import */ var _shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./shared/ProLockOverlay */ \"./src/Components/shared/ProLockOverlay.jsx\");\n/* harmony import */ var _shared_NoContent__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./shared/NoContent */ \"./src/Components/shared/NoContent.jsx\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs\");\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\n\n\n\n\n\nvar SinglePostAnalytics = function SinglePostAnalytics() {\n  var _data$sources, _data$sources2, _data$sources3, _data$sources4, _data$sources5, _data$sources6, _data$sources7, _data$sources8, _data$behavior2, _data$behavior3, _data$behavior4, _data$behavior5, _data$audience, _data$audience2, _data$audience3, _data$audience4, _data$audience5, _data$audience6, _data$audience7, _data$audience8, _data$audience9, _data$audience0, _data$audience1, _data$audience10, _data$audience11, _data$audience12, _data$audience13;\n  var _useParams = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_44__.useParams)(),\n    postId = _useParams.id;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState2 = _slicedToArray(_useState, 2),\n    data = _useState2[0],\n    setData = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),\n    _useState4 = _slicedToArray(_useState3, 2),\n    loading = _useState4[0],\n    setLoading = _useState4[1];\n  var toast = (0,_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.useToast)();\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_38__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_39__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_36__.endOfDay)(new Date()),\n      key: 'selection'\n    }]),\n    _useState6 = _slicedToArray(_useState5, 2),\n    dateRange = _useState6[0],\n    setDateRange = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState8 = _slicedToArray(_useState7, 2),\n    showDatePicker = _useState8[0],\n    setShowDatePicker = _useState8[1];\n  var fetchAnalytics = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var url, response, result, _t;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            setLoading(true);\n            _context.p = 1;\n            url = new URL(\"\".concat(window.insightPressData.apiUrl, \"analytics/post/\").concat(postId));\n            url.searchParams.append('start_date', (0,date_fns__WEBPACK_IMPORTED_MODULE_37__.format)(dateRange[0].startDate, 'yyyy-MM-dd'));\n            url.searchParams.append('end_date', (0,date_fns__WEBPACK_IMPORTED_MODULE_37__.format)(dateRange[0].endDate, 'yyyy-MM-dd'));\n            _context.n = 2;\n            return fetch(url, {\n              headers: {\n                'X-WP-Nonce': window.insightPressData.nonce\n              }\n            });\n          case 2:\n            response = _context.v;\n            _context.n = 3;\n            return response.json();\n          case 3:\n            result = _context.v;\n            setData(result);\n            if (result.post_title) {\n              document.title = \"Analytics: \".concat(result.post_title, \" < envoydigital \\u2014 WordPress\");\n            }\n            _context.n = 5;\n            break;\n          case 4:\n            _context.p = 4;\n            _t = _context.v;\n            toast({\n              title: 'Error fetching analytics',\n              status: 'error',\n              duration: 3000\n            });\n          case 5:\n            _context.p = 5;\n            setLoading(false);\n            return _context.f(5);\n          case 6:\n            return _context.a(2);\n        }\n      }, _callee, null, [[1, 4, 5, 6]]);\n    }));\n    return function fetchAnalytics() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    if (postId) {\n      fetchAnalytics();\n    }\n  }, [postId, dateRange]);\n  if (loading) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      p: {\n        base: 4,\n        md: 8\n      },\n      mx: \"auto\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n      spacing: 8\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n      columns: {\n        base: 1,\n        sm: 2,\n        md: 3,\n        lg: 6\n      },\n      spacing: 4\n    }, _toConsumableArray(Array(6)).map(function (_, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n        key: i,\n        p: 4,\n        bg: \"white\",\n        borderRadius: \"20px\",\n        shadow: \"sm\",\n        border: \"1px solid\",\n        borderColor: \"gray.100\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_13__.SkeletonCircle, {\n        size: \"8\",\n        mb: 4\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__.Skeleton, {\n        height: \"12px\",\n        width: \"60%\",\n        mb: 3\n      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__.Skeleton, {\n        height: \"24px\",\n        width: \"80%\"\n      }));\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n      columns: {\n        base: 1,\n        lg: 2\n      },\n      spacing: 8\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__.Skeleton, {\n      height: \"350px\",\n      borderRadius: \"24px\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__.Skeleton, {\n      height: \"350px\",\n      borderRadius: \"24px\"\n    }))));\n  }\n  if (!data) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {\n    title: \"Post not found\",\n    description: \"We couldn't find any analytics data for this specific post ID.\",\n    height: \"400px\"\n  });\n  var MetricCard = function MetricCard(_ref2) {\n    var label = _ref2.label,\n      value = _ref2.value,\n      icon = _ref2.icon,\n      color = _ref2.color,\n      helpText = _ref2.helpText;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: \"white\",\n      p: 4,\n      borderRadius: \"20px\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      transition: \"all 0.3s\",\n      _hover: {\n        transform: 'translateY(-2px)',\n        shadow: 'md',\n        borderColor: \"\".concat(color, \".200\")\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      align: \"center\",\n      gap: 3,\n      mb: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      bg: \"\".concat(color, \".50\"),\n      p: 2,\n      borderRadius: \"12px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n      as: icon,\n      color: \"\".concat(color, \".500\"),\n      size: 16\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      color: \"gray.500\",\n      fontSize: \"xs\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      align: \"baseline\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n      size: \"md\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, value), helpText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"600\"\n    }, helpText)));\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    p: {\n      base: 4,\n      md: 8\n    },\n    mx: \"auto\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    direction: {\n      base: 'column',\n      lg: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      lg: 'center'\n    },\n    mb: 10,\n    gap: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n    colorScheme: \"blue\",\n    mb: 2,\n    borderRadius: \"full\",\n    px: 3,\n    py: 1,\n    fontSize: \"10px\",\n    fontWeight: \"800\"\n  }, \"Post Engagement\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"xl\",\n    fontWeight: \"900\",\n    color: \"gray.800\",\n    mb: 2,\n    lineHeight: \"1.2\"\n  }, (data === null || data === void 0 ? void 0 : data.post_title) || \"Loading Post...\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    color: \"gray.500\",\n    fontWeight: \"500\"\n  }, \"Real-time engagement metrics and audience behavior\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    gap: 3,\n    direction: {\n      base: 'column',\n      sm: 'row'\n    },\n    w: {\n      base: '100%',\n      sm: 'auto'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    position: \"relative\",\n    w: {\n      base: '100%',\n      sm: 'auto'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__.Popover, {\n    isOpen: showDatePicker,\n    onClose: function onClose() {\n      return setShowDatePicker(false);\n    },\n    placement: \"bottom-end\",\n    closeOnBlur: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_10__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    onClick: function onClick() {\n      return setShowDatePicker(!showDatePicker);\n    },\n    bg: \"white\",\n    border: \"1px solid\",\n    borderColor: \"gray.200\",\n    borderRadius: \"16px\",\n    shadow: \"sm\",\n    color: \"gray.600\",\n    fontWeight: \"700\",\n    fontSize: \"sm\",\n    _hover: {\n      bg: 'gray.50'\n    },\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n      size: 18\n    }),\n    w: \"100%\",\n    h: \"45px\"\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_40__.getDateRangeLabel)(dateRange[0]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_11__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__.PopoverContent, {\n    w: \"auto\",\n    shadow: \"2xl\",\n    borderRadius: \"24px\",\n    bg: \"white\",\n    overflow: \"hidden\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    _focus: {\n      outline: 'none'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_40__[\"default\"], {\n    initialRange: dateRange[0],\n    onChange: function onChange(item) {\n      return setDateRange([item]);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    p: 3,\n    textAlign: \"right\",\n    borderTop: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    size: \"sm\",\n    colorScheme: \"blue\",\n    onClick: function onClick() {\n      return setShowDatePicker(false);\n    },\n    borderRadius: \"10px\"\n  }, \"Apply Range\"))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Button, {\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_31__[\"default\"], {\n      size: 18\n    }),\n    onClick: fetchAnalytics,\n    borderRadius: \"16px\",\n    bg: \"blue.500\",\n    color: \"white\",\n    _hover: {\n      bg: 'blue.600'\n    },\n    fontWeight: \"700\",\n    h: \"45px\",\n    px: 6,\n    shadow: \"0 4px 14px 0 rgba(49, 130, 206, 0.39)\"\n  }, \"Refresh\"))), !loading && data && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 2,\n      md: 3,\n      lg: 6\n    },\n    spacing: 4,\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Total Views\",\n    value: data.engagement.views.toLocaleString(),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n    color: \"cyan\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Visitors\",\n    value: data.engagement.unique_visitors.toLocaleString(),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_35__[\"default\"],\n    color: \"pink\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Avg. Time\",\n    value: \"\".concat(data.engagement.avg_time_spent, \"s\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n    color: \"purple\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Bounce\",\n    value: \"\".concat(data.engagement.bounce_rate, \"%\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_34__[\"default\"],\n    color: \"orange\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Exit Rate\",\n    value: \"\".concat(data.engagement.exit_rate, \"%\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n    color: \"red\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Exits\",\n    value: data.engagement.total_exits.toLocaleString(),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n    color: \"gray\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    mb: 10,\n    mt: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"purple.600\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83C\\uDF10 Traffic Sources\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n    colorScheme: \"yellow\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"sm\",\n    color: \"gray.700\"\n  }, \"Distribution\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\"\n  }, \"Visitor acquisition channels\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n    colorScheme: \"purple\",\n    variant: \"subtle\",\n    px: 2,\n    borderRadius: \"md\"\n  }, \"Real-time\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    align: \"center\",\n    gap: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    flex: \"1\",\n    w: \"100%\"\n  }, (data === null || data === void 0 || (_data$sources = data.sources) === null || _data$sources === void 0 ? void 0 : _data$sources.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_41__[\"default\"], {\n    options: {\n      labels: data.sources.map(function (s) {\n        return s.source;\n      }),\n      colors: ['#3182ce', '#38B2AC', '#E53E3E', '#D69E2E', '#805AD5', '#ED64A6'],\n      legend: {\n        show: false\n      },\n      dataLabels: {\n        enabled: false\n      },\n      plotOptions: {\n        pie: {\n          donut: {\n            size: '75%',\n            labels: {\n              show: true,\n              total: {\n                show: true,\n                label: 'Total Views',\n                formatter: function formatter() {\n                  return data.engagement.views.toLocaleString();\n                }\n              }\n            }\n          }\n        }\n      },\n      stroke: {\n        width: 0\n      }\n    },\n    series: data.sources.map(function (s) {\n      return s.views;\n    }),\n    type: \"donut\",\n    height: 300\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {\n    title: \"No source data\",\n    height: \"200px\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 3,\n    flex: \"1\",\n    w: \"100%\"\n  }, data === null || data === void 0 || (_data$sources2 = data.sources) === null || _data$sources2 === void 0 ? void 0 : _data$sources2.slice(0, 4).map(function (source, idx) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      key: source.source,\n      p: 3,\n      bg: \"gray.50\",\n      borderRadius: \"16px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 1\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_14__.HStack, {\n      spacing: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      w: \"3px\",\n      h: \"12px\",\n      bg: ['#3182ce', '#38B2AC', '#E53E3E', '#D69E2E'][idx],\n      borderRadius: \"full\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontWeight: \"800\",\n      color: \"gray.700\",\n      fontSize: \"xs\"\n    }, source.source)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontWeight: \"900\",\n      color: \"blue.600\",\n      fontSize: \"xs\"\n    }, source.percent, \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      justify: \"space-between\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\"\n    }, source.users.toLocaleString(), \" visitors\")));\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: 2,\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\",\n    transition: \"all 0.2s\",\n    _hover: {\n      bg: 'blue.50',\n      borderColor: 'blue.100'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"800\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"\\uD83D\\uDD25 Top Driver\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"900\",\n    color: \"blue.600\"\n  }, (data === null || data === void 0 || (_data$sources3 = data.sources) === null || _data$sources3 === void 0 || (_data$sources3 = _data$sources3[0]) === null || _data$sources3 === void 0 ? void 0 : _data$sources3.source) || 'N/A'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"Directing most traffic\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\",\n    transition: \"all 0.2s\",\n    _hover: {\n      bg: 'green.50',\n      borderColor: 'green.100'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"800\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"\\uD83D\\uDD0D Organic Search\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"900\",\n    color: \"green.600\"\n  }, (data === null || data === void 0 || (_data$sources4 = data.sources) === null || _data$sources4 === void 0 || (_data$sources4 = _data$sources4.find(function (s) {\n    return s.source === 'Organic';\n  })) === null || _data$sources4 === void 0 ? void 0 : _data$sources4.percent) || 0, \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"Non-paid discovery\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\",\n    transition: \"all 0.2s\",\n    _hover: {\n      bg: 'pink.50',\n      borderColor: 'pink.100'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"800\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"\\uD83D\\uDCF1 Social Influence\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"900\",\n    color: \"pink.600\"\n  }, ((data === null || data === void 0 || (_data$sources5 = data.sources) === null || _data$sources5 === void 0 || (_data$sources5 = _data$sources5.find(function (s) {\n    return s.source === 'Social';\n  })) === null || _data$sources5 === void 0 ? void 0 : _data$sources5.percent) || 0) + ((data === null || data === void 0 || (_data$sources6 = data.sources) === null || _data$sources6 === void 0 || (_data$sources6 = _data$sources6.find(function (s) {\n    return s.source === 'Facebook';\n  })) === null || _data$sources6 === void 0 ? void 0 : _data$sources6.percent) || 0), \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\"\n  }, \"Viral engagement\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\",\n    transition: \"all 0.2s\",\n    _hover: {\n      bg: 'orange.50',\n      borderColor: 'orange.100'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"800\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"\\u26A1 Direct Access\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"900\",\n    color: \"orange.600\"\n  }, (data === null || data === void 0 || (_data$sources7 = data.sources) === null || _data$sources7 === void 0 || (_data$sources7 = _data$sources7.find(function (s) {\n    return s.source === 'Direct';\n  })) === null || _data$sources7 === void 0 ? void 0 : _data$sources7.percent) || 0, \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"10px\",\n    color: \"gray.400\",\n    mt: 1\n  }, \"Bookmarked or URL\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    mt: 4,\n    p: 6,\n    bgGradient: \"linear(to-br, purple.600, purple.800)\",\n    borderRadius: \"24px\",\n    color: \"white\",\n    shadow: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"800\",\n    textTransform: \"uppercase\",\n    opacity: 0.8,\n    mb: 1\n  }, \"Reader Insight\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"600\",\n    lineHeight: \"1.6\"\n  }, ((_data$sources8 = data.sources) === null || _data$sources8 === void 0 || (_data$sources8 = _data$sources8[0]) === null || _data$sources8 === void 0 ? void 0 : _data$sources8.percent) > 50 ? \"Your content is heavily driven by \".concat(data.sources[0].source, \". Consider diversifying your traffic sources to improve stability.\") : \"You have a healthy mix of traffic sources. This is great for SEO and audience growth!\"))))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_42__[\"default\"], {\n    title: \"Unlock Traffic Sources\",\n    description: \"See where your readers come from \\u2014 organic search, social, direct, and referrals \\u2014 with InsightPress Pro.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"orange.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_29__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDCCA Engagement Behavior\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"sm\",\n    mb: 6,\n    color: \"gray.600\"\n  }, \"Reader Scroll Depth\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 4\n  }, ['25%', '50%', '75%', '100%'].map(function (point) {\n    var _data$behavior;\n    var count = ((_data$behavior = data.behavior) === null || _data$behavior === void 0 || (_data$behavior = _data$behavior.scroll) === null || _data$behavior === void 0 ? void 0 : _data$behavior[point]) || 0;\n    var percentReached = data.engagement.views > 0 ? Math.round(count / data.engagement.views * 100) : 0;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      key: point\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      align: \"center\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_30__[\"default\"], {\n      size: 14,\n      color: \"#718096\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"700\",\n      color: \"gray.700\"\n    }, point, \" of Content\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n      colorScheme: percentReached > 50 ? 'green' : percentReached > 20 ? 'orange' : 'red',\n      variant: \"subtle\",\n      borderRadius: \"full\",\n      px: 2\n    }, percentReached, \"% Reached\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      h: \"10px\",\n      bg: \"gray.50\",\n      borderRadius: \"full\",\n      overflow: \"hidden\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n      h: \"100%\",\n      bg: percentReached > 50 ? 'green.400' : 'orange.400',\n      width: \"\".concat(percentReached, \"%\"),\n      transition: \"width 1.5s cubic-bezier(0.4, 0, 0.2, 1)\"\n    })));\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: 1,\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"sm\",\n    mb: 6,\n    color: \"gray.600\"\n  }, \"Click Distribution\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: 3,\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_16__.VStack, {\n    spacing: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"blue.50\",\n    p: 4,\n    borderRadius: \"20px\",\n    color: \"blue.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n    size: 24\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"2xl\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, ((_data$behavior2 = data.behavior) === null || _data$behavior2 === void 0 || (_data$behavior2 = _data$behavior2.clicks) === null || _data$behavior2 === void 0 ? void 0 : _data$behavior2.cta) || 0), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\"\n  }, \"CTA Clicks\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_16__.VStack, {\n    spacing: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"purple.50\",\n    p: 4,\n    borderRadius: \"20px\",\n    color: \"purple.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_26__[\"default\"], {\n    size: 24\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"2xl\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, ((_data$behavior3 = data.behavior) === null || _data$behavior3 === void 0 || (_data$behavior3 = _data$behavior3.clicks) === null || _data$behavior3 === void 0 ? void 0 : _data$behavior3.internal) || 0), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\"\n  }, \"Internal Link\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_16__.VStack, {\n    spacing: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"cyan.50\",\n    p: 4,\n    borderRadius: \"20px\",\n    color: \"cyan.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_23__[\"default\"], {\n    size: 24\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"2xl\",\n    fontWeight: \"800\",\n    color: \"gray.800\"\n  }, ((_data$behavior4 = data.behavior) === null || _data$behavior4 === void 0 || (_data$behavior4 = _data$behavior4.clicks) === null || _data$behavior4 === void 0 ? void 0 : _data$behavior4.external) || 0), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\",\n    color: \"gray.400\"\n  }, \"Outbound\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"sm\",\n    mb: 4,\n    color: \"gray.600\"\n  }, \"Top Interactive Elements\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 3\n  }, ((_data$behavior5 = data.behavior) === null || _data$behavior5 === void 0 || (_data$behavior5 = _data$behavior5.clicks) === null || _data$behavior5 === void 0 || (_data$behavior5 = _data$behavior5.details) === null || _data$behavior5 === void 0 ? void 0 : _data$behavior5.length) > 0 ? data.behavior.clicks.details.slice(0, 3).map(function (item, idx) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      key: idx,\n      justify: \"space-between\",\n      align: \"center\",\n      p: 2,\n      bg: \"gray.50\",\n      borderRadius: \"12px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"600\",\n      color: \"gray.600\",\n      isTruncated: true,\n      maxW: \"80%\"\n    }, item.label.replace('CTA: ', '').replace('External: ', '').replace('Internal: ', '')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n      colorScheme: \"blue\"\n    }, item.count));\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {\n    title: \"No click data\",\n    height: \"120px\"\n  }))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    mb: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"pink.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDC65 Audience Insights\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 4\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"New vs Returning\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    justify: \"space-between\",\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"600\"\n  }, \"New\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"700\",\n    color: \"blue.500\"\n  }, ((_data$audience = data.audience) === null || _data$audience === void 0 || (_data$audience = _data$audience.types) === null || _data$audience === void 0 ? void 0 : _data$audience.New) || 0)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"6px\",\n    bg: \"gray.50\",\n    borderRadius: \"full\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"100%\",\n    bg: \"blue.400\",\n    borderRadius: \"full\",\n    width: \"\".concat(((_data$audience2 = data.audience) === null || _data$audience2 === void 0 || (_data$audience2 = _data$audience2.types) === null || _data$audience2 === void 0 ? void 0 : _data$audience2.New) / (((_data$audience3 = data.audience) === null || _data$audience3 === void 0 || (_data$audience3 = _data$audience3.types) === null || _data$audience3 === void 0 ? void 0 : _data$audience3.New) + ((_data$audience4 = data.audience) === null || _data$audience4 === void 0 || (_data$audience4 = _data$audience4.types) === null || _data$audience4 === void 0 ? void 0 : _data$audience4.Returning) || 1) * 100, \"%\")\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n    justify: \"space-between\",\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"600\"\n  }, \"Returning\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"700\",\n    color: \"purple.500\"\n  }, ((_data$audience5 = data.audience) === null || _data$audience5 === void 0 || (_data$audience5 = _data$audience5.types) === null || _data$audience5 === void 0 ? void 0 : _data$audience5.Returning) || 0)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"6px\",\n    bg: \"gray.50\",\n    borderRadius: \"full\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    h: \"100%\",\n    bg: \"purple.400\",\n    borderRadius: \"full\",\n    width: \"\".concat(((_data$audience6 = data.audience) === null || _data$audience6 === void 0 || (_data$audience6 = _data$audience6.types) === null || _data$audience6 === void 0 ? void 0 : _data$audience6.Returning) / (((_data$audience7 = data.audience) === null || _data$audience7 === void 0 || (_data$audience7 = _data$audience7.types) === null || _data$audience7 === void 0 ? void 0 : _data$audience7.New) + ((_data$audience8 = data.audience) === null || _data$audience8 === void 0 || (_data$audience8 = _data$audience8.types) === null || _data$audience8 === void 0 ? void 0 : _data$audience8.Returning) || 1) * 100, \"%\")\n  }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Devices\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.SimpleGrid, {\n    columns: 3,\n    spacing: 2,\n    textAlign: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_28__[\"default\"],\n    color: \"gray.400\",\n    mb: 1\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\"\n  }, Math.round(((_data$audience9 = data.audience) === null || _data$audience9 === void 0 || (_data$audience9 = _data$audience9.devices) === null || _data$audience9 === void 0 ? void 0 : _data$audience9.Desktop) / (data.engagement.views || 1) * 100), \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"x-small\",\n    color: \"gray.400\"\n  }, \"Desktop\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_32__[\"default\"],\n    color: \"gray.400\",\n    mb: 1\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\"\n  }, Math.round(((_data$audience0 = data.audience) === null || _data$audience0 === void 0 || (_data$audience0 = _data$audience0.devices) === null || _data$audience0 === void 0 ? void 0 : _data$audience0.Mobile) / (data.engagement.views || 1) * 100), \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"x-small\",\n    color: \"gray.400\"\n  }, \"Mobile\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: lucide_react__WEBPACK_IMPORTED_MODULE_33__[\"default\"],\n    color: \"gray.400\",\n    mb: 1\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"xs\",\n    fontWeight: \"700\"\n  }, Math.round(((_data$audience1 = data.audience) === null || _data$audience1 === void 0 || (_data$audience1 = _data$audience1.devices) === null || _data$audience1 === void 0 ? void 0 : _data$audience1.Tablet) / (data.engagement.views || 1) * 100), \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontSize: \"x-small\",\n    color: \"gray.400\"\n  }, \"Tablet\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Top Browsers\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 2\n  }, Object.entries(((_data$audience10 = data.audience) === null || _data$audience10 === void 0 ? void 0 : _data$audience10.browsers) || {}).length > 0 ? Object.entries(((_data$audience11 = data.audience) === null || _data$audience11 === void 0 ? void 0 : _data$audience11.browsers) || {}).slice(0, 3).map(function (_ref3) {\n    var _ref4 = _slicedToArray(_ref3, 2),\n      browser = _ref4[0],\n      count = _ref4[1];\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      key: browser,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"600\",\n      color: \"gray.600\"\n    }, browser), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Badge, {\n      colorScheme: \"blue\",\n      variant: \"subtle\",\n      fontSize: \"10px\"\n    }, Math.round(count / (data.engagement.views || 1) * 100), \"%\"));\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {\n    title: \"No browser data\",\n    height: \"80px\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"24px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Top Countries\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_15__.Stack, {\n    spacing: 2\n  }, ((_data$audience12 = data.audience) === null || _data$audience12 === void 0 || (_data$audience12 = _data$audience12.geo) === null || _data$audience12 === void 0 ? void 0 : _data$audience12.length) > 0 ? (_data$audience13 = data.audience) === null || _data$audience13 === void 0 || (_data$audience13 = _data$audience13.geo) === null || _data$audience13 === void 0 ? void 0 : _data$audience13.slice(0, 3).map(function (country, idx) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      key: idx,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Flex, {\n      align: \"center\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_25__[\"default\"], {\n      size: 10,\n      color: \"#CBD5E0\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"600\",\n      color: \"gray.600\"\n    }, country.name)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"700\",\n      color: \"gray.800\"\n    }, country.count));\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {\n    title: \"No geo data\",\n    height: \"80px\"\n  })))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SinglePostAnalytics);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/SinglePostAnalytics.jsx?\n}");

/***/ },

/***/ "./src/Components/SingleProductAnalytics.jsx"
/*!***************************************************!*\
  !*** ./src/Components/SingleProductAnalytics.jsx ***!
  \***************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/format.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\n/* harmony import */ var _shared_DatePicker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared/DatePicker */ \"./src/Components/shared/DatePicker.jsx\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/arrow-left.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/dollar-sign.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/external-link.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/eye.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/monitor.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/package.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/percent.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/refresh-ccw.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/rotate-ccw.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/shopping-cart.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/smartphone.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-up.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/users.js\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/badge/badge.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/grid/simple-grid.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-trigger.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/portal/portal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/table.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/table-container.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tbody.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/td.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/th.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/thead.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tr.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/toast/use-toast.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/tooltip/tooltip.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! @emotion/react */ \"./node_modules/@emotion/react/dist/emotion-react.browser.development.esm.js\");\n/* harmony import */ var react_apexcharts__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! react-apexcharts */ \"./node_modules/react-apexcharts/dist/react-apexcharts.esm.js\");\n/* harmony import */ var _shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./shared/ProLockOverlay */ \"./src/Components/shared/ProLockOverlay.jsx\");\n/* harmony import */ var _shared_NoContent__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./shared/NoContent */ \"./src/Components/shared/NoContent.jsx\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs\");\nvar _templateObject;\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nfunction _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }\n\n\n\n\n\n\nvar spin = (0,_emotion_react__WEBPACK_IMPORTED_MODULE_45__.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n  from { transform: rotate(0deg); }\\n  to { transform: rotate(360deg); }\\n\"])));\n\n\n\n\nvar SingleProductAnalytics = function SingleProductAnalytics() {\n  var _data$sales, _data$sales2, _data$sales3, _data$sales4, _data$sales5, _data$sales6, _data$engagement, _data$engagement2, _data$engagement3, _data$engagement4, _data$engagement5, _data$trends, _data$trends2, _data$funnel, _data$sources, _data$sources2, _data$sources3, _data$sources4, _data$sources5, _data$sources6, _data$customers, _data$customers2, _data$customers3, _data$customers4, _data$customers5, _data$customers6, _data$customers7, _data$customers8, _data$customers9, _data$customers0, _data$customers1, _data$customers10, _data$customers11, _data$customers12;\n  var _useParams = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_49__.useParams)(),\n    productId = _useParams.id;\n  var navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_49__.useNavigate)();\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_4__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.endOfDay)(new Date()),\n      key: 'selection'\n    }]),\n    _useState2 = _slicedToArray(_useState, 2),\n    dateRange = _useState2[0],\n    setDateRange = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState4 = _slicedToArray(_useState3, 2),\n    showDatePicker = _useState4[0],\n    setShowDatePicker = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState6 = _slicedToArray(_useState5, 2),\n    data = _useState6[0],\n    setData = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),\n    _useState8 = _slicedToArray(_useState7, 2),\n    loading = _useState8[0],\n    setLoading = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState0 = _slicedToArray(_useState9, 2),\n    refreshing = _useState0[0],\n    setRefreshing = _useState0[1];\n  var _useState1 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),\n    _useState10 = _slicedToArray(_useState1, 2),\n    customers = _useState10[0],\n    setCustomers = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState12 = _slicedToArray(_useState11, 2),\n    custLoading = _useState12[0],\n    setCustLoading = _useState12[1];\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1),\n    _useState14 = _slicedToArray(_useState13, 2),\n    custPage = _useState14[0],\n    setCustPage = _useState14[1];\n  var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),\n    _useState16 = _slicedToArray(_useState15, 2),\n    custTotal = _useState16[0],\n    setCustTotal = _useState16[1];\n  var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1),\n    _useState18 = _slicedToArray(_useState17, 2),\n    custTotalPages = _useState18[0],\n    setCustTotalPages = _useState18[1];\n  var toast = (0,_chakra_ui_react__WEBPACK_IMPORTED_MODULE_41__.useToast)();\n  var fetchData = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var isRefresh,\n        startStr,\n        endStr,\n        headers,\n        response,\n        result,\n        filledTrends,\n        start,\n        end,\n        dateMap,\n        d,\n        dateStr,\n        existing,\n        _args = arguments,\n        _t;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            isRefresh = _args.length > 0 && _args[0] !== undefined ? _args[0] : false;\n            if (isRefresh) {\n              setRefreshing(true);\n              setData(null); // clears data → triggers skeleton\n            }\n            setLoading(true);\n            _context.p = 1;\n            startStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].startDate, 'yyyy-MM-dd');\n            endStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].endDate, 'yyyy-MM-dd');\n            headers = {\n              'X-WP-Nonce': window.insightPressData.nonce\n            };\n            _context.n = 2;\n            return fetch(\"\".concat(window.insightPressData.apiUrl, \"analytics/product/\").concat(productId, \"?start_date=\").concat(startStr, \"&end_date=\").concat(endStr), {\n              headers: headers\n            });\n          case 2:\n            response = _context.v;\n            if (response.ok) {\n              _context.n = 3;\n              break;\n            }\n            throw new Error('Failed to fetch product analytics');\n          case 3:\n            _context.n = 4;\n            return response.json();\n          case 4:\n            result = _context.v;\n            // Fill gaps in trend data\n            if (result.trends) {\n              filledTrends = [];\n              start = dateRange[0].startDate;\n              end = dateRange[0].endDate;\n              dateMap = new Map(result.trends.map(function (t) {\n                return [t.date, t];\n              }));\n              for (d = new Date(start); d <= end; d.setDate(d.getDate() + 1)) {\n                dateStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(d, 'yyyy-MM-dd');\n                existing = dateMap.get(dateStr);\n                filledTrends.push({\n                  date: dateStr,\n                  revenue: existing ? existing.revenue : 0,\n                  orders: existing ? existing.orders : 0,\n                  qty: existing ? existing.qty : 0\n                });\n              }\n              result.trends = filledTrends;\n            }\n            setData(result);\n            if (result.product_name) {\n              document.title = \"Analytics: \".concat(result.product_name, \" < envoydigital \\u2014 WordPress\");\n            }\n            _context.n = 6;\n            break;\n          case 5:\n            _context.p = 5;\n            _t = _context.v;\n            console.error('Error fetching analytics:', _t);\n            toast({\n              title: 'Error',\n              description: 'Could not load product analytics.',\n              status: 'error',\n              duration: 5000,\n              isClosable: true\n            });\n          case 6:\n            _context.p = 6;\n            setLoading(false);\n            setRefreshing(false);\n            return _context.f(6);\n          case 7:\n            return _context.a(2);\n        }\n      }, _callee, null, [[1, 5, 6, 7]]);\n    }));\n    return function fetchData() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    if (productId) {\n      fetchData();\n    }\n  }, [dateRange, productId]);\n  var fetchCustomers = /*#__PURE__*/function () {\n    var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {\n      var page,\n        startStr,\n        endStr,\n        headers,\n        url,\n        res,\n        json,\n        _args2 = arguments,\n        _t2;\n      return _regenerator().w(function (_context2) {\n        while (1) switch (_context2.p = _context2.n) {\n          case 0:\n            page = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : 1;\n            setCustLoading(true);\n            _context2.p = 1;\n            startStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].startDate, 'yyyy-MM-dd');\n            endStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].endDate, 'yyyy-MM-dd');\n            headers = {\n              'X-WP-Nonce': window.insightPressData.nonce\n            };\n            url = \"\".concat(window.insightPressData.apiUrl, \"analytics/product/\").concat(productId, \"/customers?start_date=\").concat(startStr, \"&end_date=\").concat(endStr, \"&page=\").concat(page, \"&per_page=10\");\n            _context2.n = 2;\n            return fetch(url, {\n              headers: headers\n            });\n          case 2:\n            res = _context2.v;\n            if (res.ok) {\n              _context2.n = 3;\n              break;\n            }\n            throw new Error('Failed');\n          case 3:\n            _context2.n = 4;\n            return res.json();\n          case 4:\n            json = _context2.v;\n            setCustomers(json.customers || []);\n            setCustTotal(json.total || 0);\n            setCustTotalPages(json.total_pages || 1);\n            setCustPage(page);\n            _context2.n = 6;\n            break;\n          case 5:\n            _context2.p = 5;\n            _t2 = _context2.v;\n            console.error(_t2);\n          case 6:\n            _context2.p = 6;\n            setCustLoading(false);\n            return _context2.f(6);\n          case 7:\n            return _context2.a(2);\n        }\n      }, _callee2, null, [[1, 5, 6, 7]]);\n    }));\n    return function fetchCustomers() {\n      return _ref2.apply(this, arguments);\n    };\n  }();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    if (productId) fetchCustomers(1);\n  }, [productId, dateRange]);\n  var formatCurrency = function formatCurrency(amount) {\n    var symbol = (data === null || data === void 0 ? void 0 : data.currency_symbol) || '$';\n    var formattedAmount = parseFloat(amount || 0).toLocaleString(undefined, {\n      minimumFractionDigits: 2,\n      maximumFractionDigits: 2\n    });\n    return \"\".concat(symbol.trim(), \" \").concat(formattedAmount);\n  };\n  var MetricCard = function MetricCard(_ref3) {\n    var label = _ref3.label,\n      value = _ref3.value,\n      icon = _ref3.icon,\n      color = _ref3.color,\n      helpText = _ref3.helpText;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      bg: \"white\",\n      p: 4,\n      borderRadius: \"xl\",\n      shadow: \"sm\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      transition: \"all 0.3s\",\n      _hover: {\n        shadow: 'md',\n        transform: 'translateY(-2px)'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"center\",\n      gap: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      bg: \"\".concat(color, \".50\"),\n      p: 3,\n      borderRadius: \"lg\",\n      color: \"\".concat(color, \".500\"),\n      flexShrink: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.Icon, {\n      as: icon,\n      boxSize: 5\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      flex: \"1\",\n      minW: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      color: \"gray.500\",\n      fontWeight: \"600\",\n      fontSize: \"xs\",\n      mb: 0.5,\n      noOfLines: 1\n    }, label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"baseline\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"lg\",\n      fontWeight: \"800\",\n      color: \"gray.800\"\n    }, value), helpText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Badge, {\n      colorScheme: color,\n      variant: \"subtle\",\n      borderRadius: \"md\",\n      px: 1.5,\n      fontSize: \"9px\"\n    }, helpText)))));\n  };\n  if (loading && !data) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      mx: \"auto\",\n      p: 5\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n      spacing: 8\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Skeleton, {\n      height: \"40px\",\n      width: \"300px\",\n      mb: 4\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Skeleton, {\n      height: \"20px\",\n      width: \"500px\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n      columns: {\n        base: 1,\n        md: 3\n      },\n      spacing: 6\n    }, [1, 2, 3].map(function (i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Skeleton, {\n        key: i,\n        height: \"150px\",\n        borderRadius: \"20px\"\n      });\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n      columns: {\n        base: 1,\n        md: 3\n      },\n      spacing: 6\n    }, [1, 2, 3].map(function (i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Skeleton, {\n        key: i,\n        height: \"150px\",\n        borderRadius: \"20px\"\n      });\n    }))));\n  }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mx: \"auto\",\n    p: {\n      base: 3,\n      md: 5\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    justify: \"space-between\",\n    align: {\n      base: 'stretch',\n      md: 'flex-start'\n    },\n    mb: 8,\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    gap: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n      size: 16\n    }),\n    variant: \"ghost\",\n    colorScheme: \"blue\",\n    size: \"sm\",\n    mb: 2,\n    onClick: function onClick() {\n      return window.location.href = 'edit.php?post_type=product';\n    }\n  }, \"Back to Products\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"xl\",\n    color: \"gray.800\",\n    mb: 1,\n    fontSize: {\n      base: '2xl',\n      md: '3xl'\n    }\n  }, data === null || data === void 0 ? void 0 : data.product_name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    color: \"gray.500\",\n    fontSize: {\n      base: 'xs',\n      md: 'sm'\n    }\n  }, \"In-depth performance analysis for the selected time period.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3,\n    direction: {\n      base: 'column',\n      sm: 'row'\n    },\n    w: {\n      base: 'full',\n      md: 'auto'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    position: \"relative\",\n    w: {\n      base: 'full',\n      sm: 'auto'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Popover, {\n    isOpen: showDatePicker,\n    onClose: function onClose() {\n      return setShowDatePicker(false);\n    },\n    placement: \"bottom-end\",\n    closeOnBlur: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n      size: 18\n    }),\n    bg: \"white\",\n    border: \"1px solid\",\n    borderColor: \"gray.200\",\n    onClick: function onClick() {\n      return setShowDatePicker(!showDatePicker);\n    },\n    _hover: {\n      bg: 'gray.50'\n    },\n    w: \"full\",\n    fontSize: \"sm\"\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_5__.getDateRangeLabel)(dateRange[0]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.PopoverContent, {\n    w: \"auto\",\n    shadow: \"2xl\",\n    borderRadius: \"xl\",\n    bg: \"white\",\n    overflow: \"hidden\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    _focus: {\n      outline: 'none'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n    initialRange: dateRange[0],\n    onChange: function onChange(item) {\n      return setDateRange([item]);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    p: 3,\n    textAlign: \"right\",\n    borderTop: \"1px solid\",\n    borderColor: \"gray.50\",\n    bg: \"white\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n    size: \"sm\",\n    colorScheme: \"blue\",\n    borderRadius: \"lg\",\n    onClick: function onClick() {\n      return setShowDatePicker(false);\n    }\n  }, \"Done\"))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n    colorScheme: \"blue\",\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n      size: 18,\n      style: {\n        animation: refreshing ? \"\".concat(spin, \" 0.8s linear infinite\") : 'none'\n      }\n    }),\n    onClick: function onClick() {\n      return fetchData(true);\n    },\n    isLoading: refreshing,\n    loadingText: \"Refreshing\\u2026\",\n    w: {\n      base: 'full',\n      sm: 'auto'\n    },\n    fontSize: \"sm\"\n  }, \"Refresh\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"blue.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDCCA Sales Metrics\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 3\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Total Sales (Revenue)\",\n    value: formatCurrency(data === null || data === void 0 || (_data$sales = data.sales) === null || _data$sales === void 0 ? void 0 : _data$sales.revenue),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n    color: \"green\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Total Orders\",\n    value: data === null || data === void 0 || (_data$sales2 = data.sales) === null || _data$sales2 === void 0 ? void 0 : _data$sales2.orders,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n    color: \"blue\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Quantity Sold\",\n    value: data === null || data === void 0 || (_data$sales3 = data.sales) === null || _data$sales3 === void 0 ? void 0 : _data$sales3.qty,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n    color: \"purple\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, \"Average Order Value (\", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Tooltip, {\n      label: \"Average Order Value\",\n      placement: \"top\",\n      hasArrow: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      as: \"span\",\n      borderBottom: \"1px dotted\",\n      cursor: \"help\"\n    }, \"AOV\")), \")\"),\n    value: formatCurrency(data === null || data === void 0 || (_data$sales4 = data.sales) === null || _data$sales4 === void 0 ? void 0 : _data$sales4.aov),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"],\n    color: \"orange\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Refund Amount\",\n    value: formatCurrency(data === null || data === void 0 || (_data$sales5 = data.sales) === null || _data$sales5 === void 0 ? void 0 : _data$sales5.refund_amount),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n    color: \"red\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Net Revenue\",\n    value: formatCurrency(data === null || data === void 0 || (_data$sales6 = data.sales) === null || _data$sales6 === void 0 ? void 0 : _data$sales6.net_revenue),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n    color: \"teal\",\n    helpText: \"After Refunds\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"purple.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDC41\\uFE0F Engagement Metrics\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Badge, {\n    colorScheme: \"yellow\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 3\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Product Views\",\n    value: data === null || data === void 0 || (_data$engagement = data.engagement) === null || _data$engagement === void 0 ? void 0 : _data$engagement.views,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n    color: \"cyan\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Unique Visitors\",\n    value: data === null || data === void 0 || (_data$engagement2 = data.engagement) === null || _data$engagement2 === void 0 ? void 0 : _data$engagement2.unique_visitors,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n    color: \"pink\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Add to Cart Count\",\n    value: data === null || data === void 0 || (_data$engagement3 = data.engagement) === null || _data$engagement3 === void 0 ? void 0 : _data$engagement3.add_to_cart,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n    color: \"yellow\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Checkout Initiated\",\n    value: data === null || data === void 0 || (_data$engagement4 = data.engagement) === null || _data$engagement4 === void 0 ? void 0 : _data$engagement4.checkout_initiated,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n    color: \"indigo\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MetricCard, {\n    label: \"Conversion Rate\",\n    value: \"\".concat(data === null || data === void 0 || (_data$engagement5 = data.engagement) === null || _data$engagement5 === void 0 ? void 0 : _data$engagement5.conversion_rate, \"%\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n    color: \"green\",\n    helpText: \"Visitor to Order\"\n  }))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_47__[\"default\"], {\n    title: \"Unlock Engagement Metrics\",\n    description: \"See how visitors interact with this product \\u2014 views, add-to-carts, and conversion rates \\u2014 with InsightPress Pro.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"green.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDCC8 Revenue Insights\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    options: {\n      chart: {\n        type: 'area',\n        toolbar: {\n          show: false\n        },\n        zoom: {\n          enabled: false\n        }\n      },\n      dataLabels: {\n        enabled: false\n      },\n      stroke: {\n        curve: 'smooth',\n        width: 2\n      },\n      xaxis: {\n        categories: (data === null || data === void 0 || (_data$trends = data.trends) === null || _data$trends === void 0 ? void 0 : _data$trends.map(function (t) {\n          return (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(new Date(t.date), 'MMM d');\n        })) || [],\n        labels: {\n          style: {\n            colors: '#94a3b8',\n            fontWeight: 600\n          }\n        }\n      },\n      yaxis: {\n        labels: {\n          style: {\n            colors: '#94a3b8',\n            fontWeight: 600\n          },\n          formatter: function formatter(val) {\n            return \"\".concat((data === null || data === void 0 ? void 0 : data.currency_symbol) || '$').concat(val.toLocaleString());\n          }\n        }\n      },\n      tooltip: {\n        theme: 'light',\n        x: {\n          show: true\n        },\n        y: {\n          formatter: function formatter(val) {\n            return \"\".concat((data === null || data === void 0 ? void 0 : data.currency_symbol) || '$').concat(val.toLocaleString());\n          }\n        }\n      },\n      fill: {\n        type: 'gradient',\n        gradient: {\n          shadeIntensity: 1,\n          opacityFrom: 0.45,\n          opacityTo: 0.05,\n          stops: [50, 100, 100]\n        }\n      },\n      colors: ['#22c55e'],\n      grid: {\n        borderColor: '#f1f5f9',\n        strokeDashArray: 4\n      }\n    },\n    series: [{\n      name: 'Revenue',\n      data: (data === null || data === void 0 || (_data$trends2 = data.trends) === null || _data$trends2 === void 0 ? void 0 : _data$trends2.map(function (t) {\n        return parseFloat(t.revenue || 0);\n      })) || []\n    }],\n    type: \"area\",\n    height: 350\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"orange.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDCCA Conversion Funnel\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Badge, {\n    colorScheme: \"yellow\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: {\n      base: 4,\n      md: 8\n    },\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 0\n  }, data === null || data === void 0 || (_data$funnel = data.funnel) === null || _data$funnel === void 0 ? void 0 : _data$funnel.map(function (step, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      key: step.label,\n      position: \"relative\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: {\n        base: 'flex-start',\n        md: 'center'\n      },\n      py: 4,\n      position: \"relative\",\n      zIndex: 1,\n      direction: {\n        base: 'column',\n        md: 'row'\n      },\n      gap: {\n        base: 4,\n        md: 0\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      flex: \"1\",\n      w: \"full\",\n      maxW: {\n        md: '400px'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      bg: \"blue.\".concat(50 + index * 100),\n      h: \"50px\",\n      borderRadius: \"lg\",\n      display: \"flex\",\n      alignItems: \"center\",\n      px: 4,\n      transition: \"all 0.3s\",\n      _hover: {\n        transform: 'scale(1.02)',\n        shadow: 'md'\n      },\n      width: {\n        base: 'full',\n        md: \"\".concat(100 - index * 10, \"%\")\n      },\n      minW: {\n        base: 'full',\n        md: '150px'\n      },\n      borderLeft: \"4px solid\",\n      borderColor: \"blue.500\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontWeight: \"700\",\n      color: \"blue.800\",\n      fontSize: {\n        base: 'sm',\n        md: 'md'\n      }\n    }, step.label))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      flex: \"1\",\n      px: {\n        base: 0,\n        md: 10\n      },\n      w: \"full\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n      columns: 2,\n      spacing: {\n        base: 4,\n        md: 10\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\"\n    }, \"Total\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: {\n        base: 'md',\n        md: 'xl'\n      },\n      fontWeight: \"800\",\n      color: \"gray.700\"\n    }, step.value.toLocaleString())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\",\n      fontWeight: \"700\",\n      textTransform: \"uppercase\"\n    }, \"Conversion\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: {\n        base: 'md',\n        md: 'xl'\n      },\n      fontWeight: \"800\",\n      color: \"blue.500\"\n    }, step.percent, \"%\"))))), index < data.funnel.length - 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"center\",\n      py: 1,\n      px: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      w: \"4px\",\n      h: \"40px\",\n      bg: \"gray.100\",\n      ml: {\n        base: '10px',\n        md: '20px'\n      },\n      borderRadius: \"full\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      direction: \"column\",\n      ml: 6\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"center\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      w: 2,\n      h: 2,\n      borderRadius: \"full\",\n      bg: \"red.400\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: {\n        base: 'xs',\n        md: 'sm'\n      },\n      fontWeight: \"800\",\n      color: \"red.400\"\n    }, \"-\", data.funnel[index + 1].dropoff, \"% Drop-off\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"10px\",\n      color: \"gray.400\"\n    }, \"People leaving at this stage\"))));\n  })))), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_47__[\"default\"], {\n    title: \"Unlock Conversion Funnel\",\n    description: \"See exactly where visitors drop off between product view, cart, checkout, and purchase with InsightPress Pro.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"purple.600\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83C\\uDF10 Traffic Sources\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n    columns: {\n      base: 1,\n      lg: 2\n    },\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, (data === null || data === void 0 || (_data$sources = data.sources) === null || _data$sources === void 0 ? void 0 : _data$sources.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Traffic Source Breakdown\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_46__[\"default\"], {\n    options: {\n      chart: {\n        type: 'donut',\n        toolbar: {\n          show: false\n        }\n      },\n      labels: data.sources.map(function (s) {\n        return s.source;\n      }),\n      colors: ['#3b82f6', '#6366f1', '#8b5cf6', '#ec4899', '#f97316', '#10b981', '#14b8a6'],\n      dataLabels: {\n        enabled: true,\n        formatter: function formatter(val) {\n          return \"\".concat(val.toFixed(1), \"%\");\n        },\n        style: {\n          fontSize: '11px',\n          fontWeight: '700'\n        },\n        dropShadow: {\n          enabled: false\n        }\n      },\n      plotOptions: {\n        pie: {\n          donut: {\n            size: '62%',\n            labels: {\n              show: true,\n              total: {\n                show: true,\n                label: 'Total Views',\n                fontSize: '12px',\n                fontWeight: '700',\n                color: '#94a3b8',\n                formatter: function formatter() {\n                  return data.sources.reduce(function (s, x) {\n                    return s + x.views;\n                  }, 0).toLocaleString();\n                }\n              },\n              value: {\n                fontSize: '20px',\n                fontWeight: '900',\n                color: '#1e293b'\n              }\n            }\n          }\n        }\n      },\n      legend: {\n        show: false\n      },\n      stroke: {\n        width: 2,\n        colors: ['#fff']\n      },\n      tooltip: {\n        y: {\n          formatter: function formatter(val, _ref4) {\n            var seriesIndex = _ref4.seriesIndex;\n            var s = data.sources[seriesIndex];\n            return \"\".concat(s.views.toLocaleString(), \" views \\xB7 \").concat(s.users.toLocaleString(), \" visitors\");\n          }\n        }\n      }\n    },\n    series: data.sources.map(function (s) {\n      return s.percent;\n    }),\n    type: \"donut\",\n    height: 260\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 2,\n    mt: 4\n  }, data.sources.map(function (source, idx) {\n    var colors = ['#3b82f6', '#6366f1', '#8b5cf6', '#ec4899', '#f97316', '#10b981', '#14b8a6'];\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      key: source.source,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"center\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      w: \"8px\",\n      h: \"8px\",\n      borderRadius: \"full\",\n      bg: colors[idx % colors.length],\n      flexShrink: 0\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"600\",\n      color: \"gray.600\"\n    }, source.source)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      gap: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.400\"\n    }, source.users.toLocaleString(), \" visitors\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"xs\",\n      fontWeight: \"800\",\n      color: \"blue.500\"\n    }, source.percent, \"%\")));\n  }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    textAlign: \"center\",\n    py: 10\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    color: \"gray.400\"\n  }, \"No traffic sources detected for this period.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n    columns: 2,\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"20px\",\n    border: \"1px solid\",\n    borderColor: \"gray.50\",\n    textAlign: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"700\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Top Driver\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"800\",\n    color: \"blue.600\"\n  }, (data === null || data === void 0 || (_data$sources2 = data.sources) === null || _data$sources2 === void 0 || (_data$sources2 = _data$sources2[0]) === null || _data$sources2 === void 0 ? void 0 : _data$sources2.source) || 'N/A')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"20px\",\n    border: \"1px solid\",\n    borderColor: \"gray.50\",\n    textAlign: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"700\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Ads Traffic\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"800\",\n    color: \"orange.500\"\n  }, (data === null || data === void 0 || (_data$sources3 = data.sources) === null || _data$sources3 === void 0 || (_data$sources3 = _data$sources3.find(function (s) {\n    return s.source === 'Google Ads';\n  })) === null || _data$sources3 === void 0 ? void 0 : _data$sources3.percent) || 0, \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"20px\",\n    border: \"1px solid\",\n    borderColor: \"gray.50\",\n    textAlign: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"700\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Organic\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"800\",\n    color: \"green.500\"\n  }, (data === null || data === void 0 || (_data$sources4 = data.sources) === null || _data$sources4 === void 0 || (_data$sources4 = _data$sources4.find(function (s) {\n    return s.source === 'Organic';\n  })) === null || _data$sources4 === void 0 ? void 0 : _data$sources4.percent) || 0, \"%\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"20px\",\n    border: \"1px solid\",\n    borderColor: \"gray.50\",\n    textAlign: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    fontWeight: \"700\",\n    textTransform: \"uppercase\",\n    mb: 2\n  }, \"Social\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xl\",\n    fontWeight: \"800\",\n    color: \"pink.500\"\n  }, ((data === null || data === void 0 || (_data$sources5 = data.sources) === null || _data$sources5 === void 0 || (_data$sources5 = _data$sources5.find(function (s) {\n    return s.source === 'Facebook';\n  })) === null || _data$sources5 === void 0 ? void 0 : _data$sources5.percent) || 0) + ((data === null || data === void 0 || (_data$sources6 = data.sources) === null || _data$sources6 === void 0 || (_data$sources6 = _data$sources6.find(function (s) {\n    return s.source === 'Social';\n  })) === null || _data$sources6 === void 0 ? void 0 : _data$sources6.percent) || 0), \"%\"))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    mb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    align: \"center\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"pink.500\",\n    color: \"white\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_43__.Heading, {\n    size: \"md\",\n    color: \"gray.800\"\n  }, \"\\uD83D\\uDC65 Customer Analytics\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2,\n      lg: 4\n    },\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"New vs Returning\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    justify: \"space-between\",\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"600\"\n  }, \"New\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"700\",\n    color: \"blue.500\"\n  }, (data === null || data === void 0 || (_data$customers = data.customers) === null || _data$customers === void 0 || (_data$customers = _data$customers.types) === null || _data$customers === void 0 ? void 0 : _data$customers[\"new\"]) || 0)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    h: \"6px\",\n    bg: \"gray.50\",\n    borderRadius: \"full\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    h: \"100%\",\n    bg: \"blue.400\",\n    borderRadius: \"full\",\n    width: \"\".concat((data === null || data === void 0 || (_data$customers2 = data.customers) === null || _data$customers2 === void 0 || (_data$customers2 = _data$customers2.types) === null || _data$customers2 === void 0 ? void 0 : _data$customers2[\"new\"]) / ((data === null || data === void 0 || (_data$customers3 = data.customers) === null || _data$customers3 === void 0 || (_data$customers3 = _data$customers3.types) === null || _data$customers3 === void 0 ? void 0 : _data$customers3[\"new\"]) + (data === null || data === void 0 || (_data$customers4 = data.customers) === null || _data$customers4 === void 0 || (_data$customers4 = _data$customers4.types) === null || _data$customers4 === void 0 ? void 0 : _data$customers4.returning) || 1) * 100, \"%\")\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    justify: \"space-between\",\n    mb: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"600\"\n  }, \"Returning\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"sm\",\n    fontWeight: \"700\",\n    color: \"purple.500\"\n  }, (data === null || data === void 0 || (_data$customers5 = data.customers) === null || _data$customers5 === void 0 || (_data$customers5 = _data$customers5.types) === null || _data$customers5 === void 0 ? void 0 : _data$customers5.returning) || 0)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    h: \"6px\",\n    bg: \"gray.50\",\n    borderRadius: \"full\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    h: \"100%\",\n    bg: \"purple.400\",\n    borderRadius: \"full\",\n    width: \"\".concat((data === null || data === void 0 || (_data$customers6 = data.customers) === null || _data$customers6 === void 0 || (_data$customers6 = _data$customers6.types) === null || _data$customers6 === void 0 ? void 0 : _data$customers6.returning) / ((data === null || data === void 0 || (_data$customers7 = data.customers) === null || _data$customers7 === void 0 || (_data$customers7 = _data$customers7.types) === null || _data$customers7 === void 0 ? void 0 : _data$customers7[\"new\"]) + (data === null || data === void 0 || (_data$customers8 = data.customers) === null || _data$customers8 === void 0 || (_data$customers8 = _data$customers8.types) === null || _data$customers8 === void 0 ? void 0 : _data$customers8.returning) || 1) * 100, \"%\")\n  }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Top Countries\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 3\n  }, (data === null || data === void 0 || (_data$customers9 = data.customers) === null || _data$customers9 === void 0 || (_data$customers9 = _data$customers9.geo) === null || _data$customers9 === void 0 || (_data$customers9 = _data$customers9.countries) === null || _data$customers9 === void 0 ? void 0 : _data$customers9.length) > 0 ? data === null || data === void 0 || (_data$customers0 = data.customers) === null || _data$customers0 === void 0 || (_data$customers0 = _data$customers0.geo) === null || _data$customers0 === void 0 || (_data$customers0 = _data$customers0.countries) === null || _data$customers0 === void 0 ? void 0 : _data$customers0.map(function (c, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      key: i,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"600\",\n      color: \"gray.700\"\n    }, c.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Badge, {\n      colorScheme: \"green\",\n      variant: \"subtle\",\n      borderRadius: \"full\"\n    }, c.count));\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_48__[\"default\"], {\n    title: \"No geo data\",\n    height: \"80px\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Device Types\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 3\n  }, Object.entries((data === null || data === void 0 || (_data$customers1 = data.customers) === null || _data$customers1 === void 0 ? void 0 : _data$customers1.devices) || {}).length > 0 ? Object.entries((data === null || data === void 0 || (_data$customers10 = data.customers) === null || _data$customers10 === void 0 ? void 0 : _data$customers10.devices) || {}).map(function (_ref5) {\n    var _ref6 = _slicedToArray(_ref5, 2),\n      device = _ref6[0],\n      count = _ref6[1];\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      key: device,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"600\",\n      color: \"gray.700\"\n    }, device), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"800\",\n      color: \"blue.500\"\n    }, count));\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_48__[\"default\"], {\n    title: \"No device data\",\n    height: \"80px\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    mb: 4,\n    textTransform: \"uppercase\"\n  }, \"Top Browsers\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 2\n  }, Object.entries((data === null || data === void 0 || (_data$customers11 = data.customers) === null || _data$customers11 === void 0 ? void 0 : _data$customers11.browsers) || {}).length > 0 ? Object.entries((data === null || data === void 0 || (_data$customers12 = data.customers) === null || _data$customers12 === void 0 ? void 0 : _data$customers12.browsers) || {}).map(function (_ref7) {\n    var _ref8 = _slicedToArray(_ref7, 2),\n      browser = _ref8[0],\n      count = _ref8[1];\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      key: browser,\n      justify: \"space-between\",\n      align: \"center\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"600\",\n      color: \"gray.700\"\n    }, browser), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Badge, {\n      colorScheme: \"blue\",\n      variant: \"outline\",\n      fontSize: \"2xs\"\n    }, count));\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_48__[\"default\"], {\n    title: \"No browser data\",\n    height: \"100px\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n    bg: \"white\",\n    p: 6,\n    borderRadius: \"20px\",\n    shadow: \"sm\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    gridColumn: {\n      base: '1',\n      md: '1 / -1',\n      lg: '1 / -1'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    justify: \"space-between\",\n    align: \"center\",\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontWeight: \"700\",\n    color: \"gray.500\",\n    fontSize: \"xs\",\n    textTransform: \"uppercase\",\n    mb: 1\n  }, \"Customer Insights\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\"\n  }, custTotal, \" customer\", custTotal !== 1 ? 's' : '', \" who purchased this product\")), custTotalPages > 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n    gap: 2,\n    align: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n    size: \"xs\",\n    variant: \"outline\",\n    isDisabled: custPage <= 1,\n    onClick: function onClick() {\n      return fetchCustomers(custPage - 1);\n    }\n  }, \"\\u2190 Prev\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\"\n  }, custPage, \" / \", custTotalPages), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n    size: \"xs\",\n    variant: \"outline\",\n    isDisabled: custPage >= custTotalPages,\n    onClick: function onClick() {\n      return fetchCustomers(custPage + 1);\n    }\n  }, \"Next \\u2192\"))), custLoading ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Stack, {\n    spacing: 3\n  }, _toConsumableArray(Array(5)).map(function (_, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Skeleton, {\n      key: i,\n      h: \"52px\",\n      borderRadius: \"12px\"\n    });\n  })) : customers.length === 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_48__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n    title: \"No customers found\",\n    description: \"No customers have purchased this product during the selected period.\",\n    height: \"200px\"\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.TableContainer, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_39__.Thead, {\n    bg: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\"\n  }, \"Customer\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    isNumeric: true\n  }, \"Orders\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    isNumeric: true\n  }, \"Spent\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\"\n  }, \"Last Order\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\"\n  }, \"Location\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\"\n  }, \"Client\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Th, {\n    py: 4,\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    textAlign: \"right\"\n  }, \"Actions\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Tbody, null, customers.map(function (c) {\n    var _window$insightPressD, _c$device;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_40__.Tr, {\n      key: c.id,\n      _hover: {\n        bg: 'blue.50'\n      },\n      transition: \"background 0.15s\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"center\",\n      gap: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      as: \"img\",\n      src: c.avatar,\n      alt: c.name,\n      w: \"34px\",\n      h: \"34px\",\n      borderRadius: \"full\",\n      border: \"2px solid\",\n      borderColor: \"blue.100\",\n      flexShrink: 0\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      overflow: \"hidden\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"700\",\n      color: \"gray.800\",\n      noOfLines: 1\n    }, c.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"11px\",\n      color: \"gray.400\",\n      noOfLines: 1\n    }, c.email)))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.Badge, {\n      colorScheme: \"blue\",\n      variant: \"subtle\",\n      fontSize: \"xs\"\n    }, c.order_count)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4,\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"800\",\n      color: \"green.600\"\n    }, ((_window$insightPressD = window.insightPressData) === null || _window$insightPressD === void 0 ? void 0 : _window$insightPressD.currency) || '$', c.total_spent.toLocaleString(undefined, {\n      minimumFractionDigits: 2\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\"\n    }, c.last_order || '—')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"xs\",\n      color: \"gray.500\",\n      noOfLines: 1\n    }, [c.city, c.country].filter(function (v) {\n      return v && v !== '—';\n    }).join(', ') || '—')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      align: \"center\",\n      gap: 2\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Tooltip, {\n      label: \"Device: \".concat(c.device),\n      fontSize: \"xs\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Box, {\n      color: \"gray.400\"\n    }, (_c$device = c.device) !== null && _c$device !== void 0 && _c$device.toLowerCase().includes('mobile') ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n      size: 14\n    }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n      size: 14\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_42__.Tooltip, {\n      label: \"Browser: \".concat(c.browser),\n      fontSize: \"xs\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_44__.Text, {\n      fontSize: \"10px\",\n      fontWeight: \"700\",\n      color: \"gray.400\",\n      textTransform: \"uppercase\"\n    }, c.browser === 'Unknown' ? '?' : c.browser.split(' ')[0])))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Td, {\n      py: 4,\n      textAlign: \"right\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.Flex, {\n      justify: \"flex-end\",\n      gap: 1\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n      as: \"a\",\n      href: c.edit_url,\n      target: \"_blank\",\n      size: \"xs\",\n      variant: \"ghost\",\n      colorScheme: \"blue\",\n      title: \"Edit user\"\n    }, \"Edit\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Button, {\n      as: \"a\",\n      href: c.orders_url,\n      target: \"_blank\",\n      size: \"xs\",\n      variant: \"ghost\",\n      colorScheme: \"gray\",\n      title: \"View orders\"\n    }, \"Orders\"))));\n  }))))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SingleProductAnalytics);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/SingleProductAnalytics.jsx?\n}");

/***/ },

/***/ "./src/Components/TrafficAnalytics.jsx"
/*!*********************************************!*\
  !*** ./src/Components/TrafficAnalytics.jsx ***!
  \*********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/format.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\n/* harmony import */ var _shared_DatePicker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared/DatePicker */ \"./src/Components/shared/DatePicker.jsx\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/chart-no-axes-column.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/circle-check.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/funnel.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/triangle-alert.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/calendar.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/mouse-pointer-click.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/package.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/refresh-ccw.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/shopping-cart.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/timer.js\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/trending-up.js\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/badge/badge.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/grid/simple-grid.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/popover/popover-trigger.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/portal/portal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/skeleton/skeleton.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/h-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/table.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tbody.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/td.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/th.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/thead.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/table/tr.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var react_apexcharts__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! react-apexcharts */ \"./node_modules/react-apexcharts/dist/react-apexcharts.esm.js\");\n/* harmony import */ var _shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./shared/ProLockOverlay */ \"./src/Components/shared/ProLockOverlay.jsx\");\n/* harmony import */ var _shared_NoContent__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./shared/NoContent */ \"./src/Components/shared/NoContent.jsx\");\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\n\n\n\n\n\nvar TrafficAnalytics = function TrafficAnalytics() {\n  var _cartData$top_abandon, _funnelData$steps, _funnelData$steps2;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_3__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_4__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_1__.endOfDay)(new Date()),\n      key: 'selection'\n    }]),\n    _useState2 = _slicedToArray(_useState, 2),\n    dateRange = _useState2[0],\n    setDateRange = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState4 = _slicedToArray(_useState3, 2),\n    showDatePicker = _useState4[0],\n    setShowDatePicker = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState6 = _slicedToArray(_useState5, 2),\n    cartData = _useState6[0],\n    setCartData = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState8 = _slicedToArray(_useState7, 2),\n    funnelData = _useState8[0],\n    setFunnelData = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),\n    _useState0 = _slicedToArray(_useState9, 2),\n    timingData = _useState0[0],\n    setTimingData = _useState0[1];\n  var _useState1 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),\n    _useState10 = _slicedToArray(_useState1, 2),\n    loading = _useState10[0],\n    setLoading = _useState10[1];\n  var fetchData = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var startStr, endStr, headers, _yield$Promise$all, _yield$Promise$all2, cartRes, funnelRes, timingRes, _yield$Promise$all3, _yield$Promise$all4, cart, funnel, timing, _t;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            setLoading(true);\n            _context.p = 1;\n            startStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].startDate, 'yyyy-MM-dd');\n            endStr = (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(dateRange[0].endDate, 'yyyy-MM-dd');\n            headers = {\n              'X-WP-Nonce': insightPressData.nonce\n            };\n            _context.n = 2;\n            return Promise.all([fetch(\"\".concat(insightPressData.apiUrl, \"analytics/cart-abandonment?start_date=\").concat(startStr, \"&end_date=\").concat(endStr), {\n              headers: headers\n            }), fetch(\"\".concat(insightPressData.apiUrl, \"analytics/funnel?start_date=\").concat(startStr, \"&end_date=\").concat(endStr), {\n              headers: headers\n            }), fetch(\"\".concat(insightPressData.apiUrl, \"analytics/time-to-purchase?start_date=\").concat(startStr, \"&end_date=\").concat(endStr), {\n              headers: headers\n            })]);\n          case 2:\n            _yield$Promise$all = _context.v;\n            _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);\n            cartRes = _yield$Promise$all2[0];\n            funnelRes = _yield$Promise$all2[1];\n            timingRes = _yield$Promise$all2[2];\n            _context.n = 3;\n            return Promise.all([cartRes.json(), funnelRes.json(), timingRes.json()]);\n          case 3:\n            _yield$Promise$all3 = _context.v;\n            _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 3);\n            cart = _yield$Promise$all4[0];\n            funnel = _yield$Promise$all4[1];\n            timing = _yield$Promise$all4[2];\n            setCartData(cart);\n            setFunnelData(funnel);\n            setTimingData(timing);\n            _context.n = 5;\n            break;\n          case 4:\n            _context.p = 4;\n            _t = _context.v;\n            console.error('Error fetching analytics:', _t);\n          case 5:\n            _context.p = 5;\n            setLoading(false);\n            return _context.f(5);\n          case 6:\n            return _context.a(2);\n        }\n      }, _callee, null, [[1, 4, 5, 6]]);\n    }));\n    return function fetchData() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    fetchData();\n  }, [dateRange]);\n  var fmt = function fmt(amount) {\n    var symbol = (cartData === null || cartData === void 0 ? void 0 : cartData.currency_symbol) || '$';\n    return \"\".concat(symbol).concat(parseFloat(amount || 0).toLocaleString(undefined, {\n      minimumFractionDigits: 2,\n      maximumFractionDigits: 2\n    }));\n  };\n  var rateColor = ((cartData === null || cartData === void 0 ? void 0 : cartData.abandonment_rate) || 0) > 70 ? 'red' : ((cartData === null || cartData === void 0 ? void 0 : cartData.abandonment_rate) || 0) > 40 ? 'orange' : 'green';\n  var stepColors = ['#3b82f6', '#6366f1', '#8b5cf6', '#f97316', '#ef4444', '#10b981'];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    mx: \"auto\",\n    px: {\n      base: 3,\n      md: 6\n    },\n    py: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n    direction: {\n      base: 'column',\n      md: 'row'\n    },\n    justify: \"space-between\",\n    align: {\n      base: 'start',\n      md: 'center'\n    },\n    gap: 4,\n    mb: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 3,\n    align: \"start\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"blue.600\",\n    p: 2.5,\n    borderRadius: \"xl\",\n    color: \"white\",\n    flexShrink: 0,\n    mt: 0.5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n    size: 22\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    m: 0,\n    size: \"lg\",\n    fontWeight: \"800\",\n    letterSpacing: \"-0.5px\",\n    color: \"gray.900\"\n  }, \"Conversion Analytics\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n    fontSize: \"sm\",\n    color: \"gray.500\",\n    mt: 0.5\n  }, \"Track cart abandonment, checkout drop-off, and how long it takes customers to convert.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 2,\n    flexShrink: 0,\n    flexWrap: \"wrap\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_23__.Popover, {\n    isOpen: showDatePicker,\n    onClose: function onClose() {\n      return setShowDatePicker(false);\n    },\n    placement: \"bottom-end\",\n    closeOnBlur: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_26__.PopoverTrigger, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Button, {\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n      size: 15\n    }),\n    onClick: function onClick() {\n      return setShowDatePicker(function (v) {\n        return !v;\n      });\n    },\n    size: \"sm\",\n    variant: \"outline\",\n    borderRadius: \"xl\",\n    fontWeight: \"600\",\n    color: \"gray.700\",\n    borderColor: \"gray.200\",\n    bg: \"white\",\n    fontSize: \"xs\",\n    _hover: {\n      bg: 'gray.50'\n    }\n  }, (0,_shared_DatePicker__WEBPACK_IMPORTED_MODULE_5__.getDateRangeLabel)(dateRange[0]))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_27__.Portal, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_25__.PopoverContent, {\n    w: \"auto\",\n    boxShadow: \"2xl\",\n    borderRadius: \"xl\",\n    bg: \"white\",\n    overflow: \"hidden\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    _focus: {\n      outline: 'none'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_24__.PopoverBody, {\n    p: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_DatePicker__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n    initialRange: dateRange[0],\n    onChange: function onChange(item) {\n      return setDateRange([item]);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    p: 3,\n    textAlign: \"right\",\n    borderTop: \"1px solid\",\n    borderColor: \"gray.50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Button, {\n    size: \"sm\",\n    colorScheme: \"blue\",\n    borderRadius: \"lg\",\n    onClick: function onClick() {\n      return setShowDatePicker(false);\n    }\n  }, \"Done\"))))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_19__.Button, {\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n      size: 14\n    }),\n    onClick: fetchData,\n    size: \"sm\",\n    colorScheme: \"blue\",\n    borderRadius: \"xl\",\n    fontWeight: \"700\",\n    fontSize: \"xs\"\n  }, \"Refresh\"))), loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n    spacing: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      sm: 2,\n      lg: 4\n    },\n    spacing: 4\n  }, [1, 2, 3, 4].map(function (i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      key: i,\n      bg: \"white\",\n      p: 4,\n      borderRadius: \"xl\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      shadow: \"sm\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n      justify: \"space-between\",\n      mb: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n      h: \"10px\",\n      w: \"100px\",\n      borderRadius: \"md\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n      h: \"36px\",\n      w: \"36px\",\n      borderRadius: \"lg\"\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n      h: \"28px\",\n      w: \"80px\",\n      borderRadius: \"md\"\n    }));\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2\n    },\n    spacing: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n    height: \"220px\",\n    borderRadius: \"xl\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n    height: \"220px\",\n    borderRadius: \"xl\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n    height: \"360px\",\n    borderRadius: \"xl\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      sm: 2,\n      lg: 4\n    },\n    spacing: 4\n  }, [1, 2, 3, 4].map(function (i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n      key: i,\n      height: \"110px\",\n      borderRadius: \"xl\"\n    });\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2\n    },\n    spacing: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n    height: \"260px\",\n    borderRadius: \"xl\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_28__.Skeleton, {\n    height: \"260px\",\n    borderRadius: \"xl\"\n  }))), !loading && cartData && funnelData && timingData && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n    spacing: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    mb: 8\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 3,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"red.50\",\n    color: \"red.500\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"sm\",\n    color: \"gray.900\",\n    fontWeight: \"800\"\n  }, \"Cart Abandonment Tracking\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    mt: 0.5\n  }, \"Revenue lost to unfinished checkouts vs successfully converted carts.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    filter: \"none\",\n    pointerEvents: \"auto\",\n    userSelect: \"auto\",\n    transition: \"all 0.3s\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      sm: 2,\n      lg: 4\n    },\n    spacing: 4,\n    mb: 5\n  }, [{\n    label: 'Abandoned Carts',\n    value: cartData.total_abandoned,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n    color: 'red.500',\n    iconBg: 'red.50'\n  }, {\n    label: 'Revenue Lost',\n    value: fmt(cartData.lost_revenue),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n    color: 'orange.500',\n    iconBg: 'orange.50'\n  }, {\n    label: 'Converted Carts',\n    value: cartData.total_converted,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n    color: 'green.500',\n    iconBg: 'green.50'\n  }, {\n    label: 'Abandonment Rate',\n    value: \"\".concat(cartData.abandonment_rate, \"%\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n    color: \"\".concat(rateColor, \".500\"),\n    iconBg: \"\".concat(rateColor, \".50\")\n  }].map(function (kpi, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      key: i,\n      bg: \"white\",\n      p: 4,\n      borderRadius: \"xl\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      shadow: \"sm\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"10px\",\n      fontWeight: \"700\",\n      color: \"gray.400\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, kpi.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      bg: kpi.iconBg,\n      color: kpi.color,\n      p: 2,\n      borderRadius: \"lg\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Icon, {\n      as: kpi.icon,\n      boxSize: 4\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"2xl\",\n      fontWeight: \"900\",\n      color: i === 3 ? \"\".concat(rateColor, \".500\") : 'gray.900'\n    }, kpi.value));\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2\n    },\n    spacing: 5,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"xs\",\n    color: \"gray.800\",\n    fontWeight: \"800\",\n    mb: 5\n  }, \"Conversion Ratio\"), function () {\n    var total = cartData.total_abandoned + cartData.total_converted;\n    var convRate = total > 0 ? (cartData.total_converted / total * 100).toFixed(1) : 0;\n    var abandRate = cartData.abandonment_rate;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n      spacing: 4\n    }, [{\n      label: '🛒 Total Cart Sessions',\n      value: total,\n      pct: 100,\n      color: 'gray.300',\n      textColor: 'gray.700'\n    }, {\n      label: '✅ Converted to Order',\n      value: \"\".concat(cartData.total_converted, \" (\").concat(convRate, \"%)\"),\n      pct: Number(convRate),\n      color: '#10b981',\n      textColor: 'green.600'\n    }, {\n      label: '❌ Abandoned',\n      value: \"\".concat(cartData.total_abandoned, \" (\").concat(abandRate, \"%)\"),\n      pct: Number(abandRate),\n      color: '#ef4444',\n      textColor: 'red.500'\n    }].map(function (row, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        key: i\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n        justify: \"space-between\",\n        mb: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"sm\",\n        fontWeight: \"600\",\n        color: row.textColor\n      }, row.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"sm\",\n        fontWeight: \"800\",\n        color: row.textColor\n      }, row.value)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"8px\",\n        bg: \"gray.100\",\n        borderRadius: \"full\",\n        overflow: \"hidden\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"100%\",\n        w: \"\".concat(row.pct, \"%\"),\n        bg: row.color,\n        borderRadius: \"full\"\n      })));\n    }));\n  }()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"xs\",\n    color: \"gray.800\",\n    fontWeight: \"800\",\n    mb: 5\n  }, \"Revenue Recovery Impact\"), function () {\n    var total = (cartData.lost_revenue || 0) + (cartData.recovered_revenue || 0);\n    var lostPct = total > 0 ? cartData.lost_revenue / total * 100 : 0;\n    var gainedPct = total > 0 ? cartData.recovered_revenue / total * 100 : 0;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n      spacing: 5\n    }, [{\n      label: '💸 Potential Revenue Lost',\n      value: fmt(cartData.lost_revenue),\n      pct: lostPct,\n      color: '#ef4444',\n      textColor: 'red.500'\n    }, {\n      label: '💰 Revenue Recovered',\n      value: fmt(cartData.recovered_revenue),\n      pct: gainedPct,\n      color: '#10b981',\n      textColor: 'green.600'\n    }].map(function (row, i) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        key: i\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n        justify: \"space-between\",\n        mb: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"sm\",\n        fontWeight: \"600\",\n        color: row.textColor\n      }, row.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"sm\",\n        fontWeight: \"800\",\n        color: row.textColor\n      }, row.value)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"10px\",\n        bg: \"gray.100\",\n        borderRadius: \"full\",\n        overflow: \"hidden\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"100%\",\n        w: \"\".concat(row.pct, \"%\"),\n        bg: row.color,\n        borderRadius: \"full\"\n      })));\n    }));\n  }())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      xl: 2\n    },\n    spacing: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n    align: \"center\",\n    justify: \"space-between\",\n    px: 5,\n    py: 4,\n    borderBottom: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"yellow.50\",\n    color: \"yellow.600\",\n    p: 1.5,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"xs\",\n    color: \"gray.800\",\n    fontWeight: \"800\"\n  }, \"Most Frequently Abandoned Products\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Badge, {\n    colorScheme: \"yellow\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\",\n    overflowX: \"auto\"\n  }, ((_cartData$top_abandon = cartData.top_abandoned_products) === null || _cartData$top_abandon === void 0 ? void 0 : _cartData$top_abandon.length) > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 3\n  }, \"Product\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 3,\n    isNumeric: true\n  }, \"Abandoned\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 3,\n    isNumeric: true\n  }, \"Qty\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 3,\n    isNumeric: true\n  }, \"Revenue Lost\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Tbody, null, cartData.top_abandoned_products.map(function (product, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Tr, {\n      key: index\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      fontWeight: \"600\",\n      color: \"gray.700\",\n      fontSize: \"xs\"\n    }, product.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Badge, {\n      colorScheme: \"red\",\n      variant: \"subtle\",\n      borderRadius: \"full\",\n      px: 2\n    }, product.times_abandoned, \"\\xD7\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true,\n      fontWeight: \"700\",\n      color: \"gray.500\",\n      fontSize: \"xs\"\n    }, product.qty_abandoned), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true,\n      fontWeight: \"800\",\n      color: \"red.500\",\n      fontSize: \"xs\"\n    }, fmt(product.lost_revenue)));\n  }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_41__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n    title: \"No abandoned carts\",\n    description: \"We haven't detected any abandoned carts in the selected period.\",\n    height: \"250px\"\n  })), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_40__[\"default\"], {\n    title: \"Unlock Abandoned Insights\",\n    description: \"Identify exactly which products are being abandoned most frequently to recover lost sales.\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n    align: \"center\",\n    gap: 3,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"blue.50\",\n    color: \"blue.500\",\n    p: 1.5,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_16__[\"default\"], {\n    size: 16\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"xs\",\n    color: \"gray.800\",\n    fontWeight: \"800\"\n  }, \"Conversion Rate Trend\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    h: \"280px\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_apexcharts__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {\n    options: {\n      chart: {\n        type: 'line',\n        toolbar: {\n          show: false\n        },\n        fontFamily: 'inherit',\n        zoom: {\n          enabled: false\n        }\n      },\n      stroke: {\n        curve: 'smooth',\n        width: 3,\n        colors: ['#3182ce']\n      },\n      fill: {\n        type: 'gradient',\n        gradient: {\n          shade: 'light',\n          type: 'vertical',\n          opacityFrom: 0.4,\n          opacityTo: 0\n        }\n      },\n      xaxis: {\n        categories: cartData.daily_trend.map(function (d) {\n          return (0,date_fns__WEBPACK_IMPORTED_MODULE_2__.format)(new Date(d.date), 'MMM d');\n        }),\n        axisBorder: {\n          show: false\n        },\n        axisTicks: {\n          show: false\n        },\n        labels: {\n          style: {\n            colors: '#94a3b8',\n            fontSize: '10px',\n            fontWeight: 600\n          }\n        }\n      },\n      yaxis: {\n        labels: {\n          style: {\n            colors: '#94a3b8',\n            fontSize: '10px',\n            fontWeight: 600\n          },\n          formatter: function formatter(val) {\n            return \"\".concat(val, \"%\");\n          }\n        }\n      },\n      grid: {\n        borderColor: '#f1f5f9',\n        strokeDashArray: 4\n      },\n      tooltip: {\n        theme: 'light',\n        y: {\n          formatter: function formatter(val) {\n            return \"\".concat(val, \"%\");\n          }\n        }\n      },\n      markers: {\n        size: 4,\n        colors: ['#3182ce'],\n        strokeColors: '#fff',\n        strokeWidth: 2\n      }\n    },\n    series: [{\n      name: 'Conversion Rate',\n      data: cartData.daily_trend.map(function (d) {\n        return d.conversion_rate;\n      })\n    }],\n    type: \"area\",\n    height: \"100%\"\n  }))))))), funnelData && ((_funnelData$steps = funnelData.steps) === null || _funnelData$steps === void 0 ? void 0 : _funnelData$steps.length) > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    borderTop: \"1px solid\",\n    borderTopColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 3,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"green.50\",\n    color: \"green.600\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"sm\",\n    color: \"gray.900\",\n    fontWeight: \"800\"\n  }, \"Checkout Funnel Drop-off Rate\"), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Badge, {\n    colorScheme: \"green\",\n    variant: \"solid\",\n    borderRadius: \"full\",\n    fontSize: \"10px\",\n    px: 2\n  }, \"PRO\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    mt: 0.5\n  }, \"Pinpoints exactly where in the checkout flow users leave \\u2014 so you know what to fix.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    filter: !window.insightPressData.isPro ? 'blur(8px)' : 'none',\n    pointerEvents: !window.insightPressData.isPro ? 'none' : 'auto',\n    userSelect: !window.insightPressData.isPro ? 'none' : 'auto',\n    transition: \"all 0.3s\",\n    h: !window.insightPressData.isPro ? \"250px\" : \"auto\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_31__.Table, {\n    variant: \"simple\",\n    size: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_35__.Thead, {\n    bg: \"gray.50/50\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Tr, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 4,\n    letterSpacing: \"wider\"\n  }, \"Step\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 4,\n    isNumeric: true,\n    letterSpacing: \"wider\"\n  }, \"Sessions\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"gray.400\",\n    fontSize: \"10px\",\n    py: 4,\n    isNumeric: true,\n    letterSpacing: \"wider\"\n  }, \"Reach\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"red.400\",\n    fontSize: \"10px\",\n    py: 4,\n    isNumeric: true,\n    letterSpacing: \"wider\"\n  }, \"Dropped\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_34__.Th, {\n    color: \"red.400\",\n    fontSize: \"10px\",\n    py: 4,\n    isNumeric: true,\n    letterSpacing: \"wider\"\n  }, \"Drop-off %\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_32__.Tbody, null, funnelData.steps.map(function (step, index) {\n    var color = stepColors[index] || '#64748b';\n    var isLast = index === funnelData.steps.length - 1;\n    var isHighDropoff = step.dropoff_rate > 30;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), {\n      key: step.step\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Tr, {\n      bg: isHighDropoff && !isLast ? 'red.50/50' : 'transparent',\n      transition: \"background 0.2s\",\n      _hover: {\n        bg: isHighDropoff && !isLast ? 'red.50' : 'gray.50/50'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      py: 4\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n      spacing: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n      w: \"24px\",\n      h: \"24px\",\n      borderRadius: \"full\",\n      bg: color,\n      color: \"white\",\n      align: \"center\",\n      justify: \"center\",\n      fontSize: \"xs\",\n      fontWeight: \"800\",\n      flexShrink: 0\n    }, index + 1), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      flex: \"1\",\n      minW: 0\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"700\",\n      color: \"gray.900\",\n      noOfLines: 1\n    }, step.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      h: \"4px\",\n      bg: \"gray.100\",\n      borderRadius: \"full\",\n      overflow: \"hidden\",\n      mt: 1.5,\n      maxW: \"200px\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      h: \"100%\",\n      w: \"\".concat(Math.max(step.reach_rate, 2), \"%\"),\n      bg: color,\n      borderRadius: \"full\",\n      transition: \"width 0.8s ease\"\n    }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true,\n      fontWeight: \"800\",\n      color: \"gray.900\",\n      fontSize: \"sm\"\n    }, step.sessions.toLocaleString()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true,\n      fontWeight: \"600\",\n      color: \"gray.400\",\n      fontSize: \"xs\"\n    }, step.reach_rate, \"%\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true\n    }, !isLast ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontWeight: \"700\",\n      color: \"red.500\",\n      fontSize: \"sm\"\n    }, \"\\u2212\", step.dropoff.toLocaleString()) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontWeight: \"700\",\n      color: \"green.500\",\n      fontSize: \"xs\"\n    }, \"\\u2713 Converted\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      isNumeric: true\n    }, !isLast ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Badge, {\n      colorScheme: isHighDropoff ? 'red' : 'gray',\n      variant: \"subtle\",\n      borderRadius: \"full\",\n      fontSize: \"10px\",\n      px: 2\n    }, step.dropoff_rate, \"%\") : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_17__.Badge, {\n      colorScheme: \"green\",\n      variant: \"subtle\",\n      borderRadius: \"full\",\n      fontSize: \"10px\",\n      px: 2\n    }, \"Final\"))), !isLast && step.dropoff > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_36__.Tr, {\n      bg: isHighDropoff ? 'red.50/50' : 'transparent'\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_33__.Td, {\n      colSpan: 5,\n      pt: 0,\n      pb: 3,\n      borderTop: \"none\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"11px\",\n      color: isHighDropoff ? 'red.400' : 'gray.400',\n      fontStyle: \"italic\",\n      ml: \"36px\"\n    }, step.dropoff.toLocaleString(), \" users dropped off at this stage\"))));\n  })))), function () {\n    var worstStep = funnelData.steps.filter(function (s) {\n      return s.step !== 'order_placed';\n    }).reduce(function (max, s) {\n      return s.dropoff_rate > ((max === null || max === void 0 ? void 0 : max.dropoff_rate) || 0) ? s : max;\n    }, null);\n    if (!worstStep || worstStep.dropoff_rate === 0) return null;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n      mt: 4,\n      p: 4,\n      bg: \"red.50\",\n      borderRadius: \"xl\",\n      border: \"1px solid\",\n      borderColor: \"red.100\",\n      align: \"start\",\n      gap: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      color: \"red.500\",\n      flexShrink: 0,\n      mt: 0.5\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n      size: 20\n    })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"sm\",\n      fontWeight: \"700\",\n      color: \"red.800\"\n    }, \"Biggest Drop-off: \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"strong\", null, worstStep.label)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"xs\",\n      color: \"red.600\",\n      mt: 0.5\n    }, worstStep.dropoff.toLocaleString(), \" sessions (\", worstStep.dropoff_rate, \"%) left at the \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"strong\", null, worstStep.label), \" step. Focus your optimization effort here for the highest impact.\")));\n  }()), !window.insightPressData.isPro && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_ProLockOverlay__WEBPACK_IMPORTED_MODULE_40__[\"default\"], {\n    title: \"Unlock Funnel Tracking\",\n    description: \"Pinpoint exactly where customers drop off in your checkout flow and boost conversions with Traffic Pro.\"\n  }))), funnelData && ((_funnelData$steps2 = funnelData.steps) === null || _funnelData$steps2 === void 0 ? void 0 : _funnelData$steps2.length) === 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_41__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n    title: \"No funnel data yet\",\n    description: \"Data is captured automatically when customers visit the cart and checkout pages.\",\n    height: \"250px\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    pt: 6,\n    borderTop: \"1px solid\",\n    borderTopColor: \"gray.100\",\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 3,\n    mb: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"purple.50\",\n    color: \"purple.600\",\n    p: 2,\n    borderRadius: \"lg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n    size: 18\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_29__.HStack, {\n    spacing: 2\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"sm\",\n    color: \"gray.900\",\n    fontWeight: \"800\"\n  }, \"Time to Purchase\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    mt: 0.5\n  }, \"How many days and visits it takes for a customer to go from first interaction to completed order.\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    position: \"relative\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    filter: \"none\",\n    pointerEvents: \"auto\",\n    userSelect: \"auto\",\n    transition: \"all 0.3s\"\n  }, timingData && timingData.total_orders_tracked > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n    spacing: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      sm: 2,\n      lg: 4\n    },\n    spacing: 4\n  }, [{\n    label: 'Orders Tracked',\n    value: timingData.total_orders_tracked,\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n    color: 'purple.500',\n    iconBg: 'purple.50'\n  }, {\n    label: 'Avg. Days to Purchase',\n    value: \"\".concat(timingData.avg_days_to_purchase, \" days\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n    color: 'blue.500',\n    iconBg: 'blue.50'\n  }, {\n    label: 'Median Days',\n    value: \"\".concat(timingData.median_days, \" days\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n    color: 'green.500',\n    iconBg: 'green.50'\n  }, {\n    label: 'Avg. Visits Needed',\n    value: \"\".concat(timingData.avg_sessions, \" visits\"),\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n    color: 'orange.500',\n    iconBg: 'orange.50'\n  }].map(function (kpi, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      key: i,\n      bg: \"white\",\n      p: 4,\n      borderRadius: \"xl\",\n      border: \"1px solid\",\n      borderColor: \"gray.100\",\n      shadow: \"sm\",\n      transition: \"all 0.2s\",\n      _hover: {\n        shadow: 'md',\n        transform: 'translateY(-2px)'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n      justify: \"space-between\",\n      align: \"center\",\n      mb: 3\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"10px\",\n      fontWeight: \"700\",\n      color: \"gray.400\",\n      textTransform: \"uppercase\",\n      letterSpacing: \"wider\"\n    }, kpi.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n      bg: kpi.iconBg,\n      color: kpi.color,\n      p: 2,\n      borderRadius: \"lg\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_22__.Icon, {\n      as: kpi.icon,\n      boxSize: 4\n    }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n      fontSize: \"xl\",\n      fontWeight: \"900\",\n      color: \"gray.900\"\n    }, kpi.value));\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_21__.SimpleGrid, {\n    columns: {\n      base: 1,\n      md: 2\n    },\n    spacing: 5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"xs\",\n    color: \"gray.800\",\n    fontWeight: \"800\",\n    mb: 5\n  }, \"Days Between First Visit & Order\"), function () {\n    var maxOrders = Math.max.apply(Math, _toConsumableArray(timingData.day_distribution.map(function (b) {\n      return b.orders;\n    })).concat([1]));\n    var colors = ['#7c3aed', '#0ea5e9', '#10b981', '#f97316', '#ef4444'];\n    var totalTracked = timingData.day_distribution.reduce(function (s, b) {\n      return s + b.orders;\n    }, 0);\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n      spacing: 4\n    }, timingData.day_distribution.map(function (bucket, i) {\n      var pct = bucket.orders / maxOrders * 100;\n      var sharePct = totalTracked > 0 ? (bucket.orders / totalTracked * 100).toFixed(1) : 0;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        key: bucket.key\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n        justify: \"space-between\",\n        mb: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"sm\",\n        fontWeight: \"600\",\n        color: \"gray.700\"\n      }, bucket.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"xs\",\n        color: \"gray.400\"\n      }, bucket.orders, \" orders (\", sharePct, \"%)\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"8px\",\n        bg: \"gray.100\",\n        borderRadius: \"full\",\n        overflow: \"hidden\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"100%\",\n        w: \"\".concat(pct, \"%\"),\n        bg: colors[i],\n        borderRadius: \"full\",\n        transition: \"width 0.6s ease\"\n      })));\n    }));\n  }()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\",\n    shadow: \"sm\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_37__.Heading, {\n    size: \"xs\",\n    color: \"gray.800\",\n    fontWeight: \"800\",\n    mb: 5\n  }, \"Number of Visits Before Purchasing\"), function () {\n    var maxOrders = Math.max.apply(Math, _toConsumableArray(timingData.session_distribution.map(function (b) {\n      return b.orders;\n    })).concat([1]));\n    var colors = ['#10b981', '#3b82f6', '#8b5cf6', '#f97316', '#ef4444'];\n    var totalTracked = timingData.session_distribution.reduce(function (s, b) {\n      return s + b.orders;\n    }, 0);\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_30__.Stack, {\n      spacing: 4\n    }, timingData.session_distribution.map(function (bucket, i) {\n      var pct = bucket.orders / maxOrders * 100;\n      var sharePct = totalTracked > 0 ? (bucket.orders / totalTracked * 100).toFixed(1) : 0;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        key: bucket.key\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n        justify: \"space-between\",\n        mb: 1.5\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"sm\",\n        fontWeight: \"600\",\n        color: \"gray.700\"\n      }, bucket.label), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n        fontSize: \"xs\",\n        color: \"gray.400\"\n      }, bucket.orders, \" orders (\", sharePct, \"%)\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"8px\",\n        bg: \"gray.100\",\n        borderRadius: \"full\",\n        overflow: \"hidden\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n        h: \"100%\",\n        w: \"\".concat(pct, \"%\"),\n        bg: colors[i],\n        borderRadius: \"full\",\n        transition: \"width 0.6s ease\"\n      })));\n    }));\n  }())), timingData.avg_days_to_purchase > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_20__.Flex, {\n    p: 4,\n    bg: \"purple.50\",\n    borderRadius: \"xl\",\n    border: \"1px solid\",\n    borderColor: \"purple.100\",\n    align: \"start\",\n    gap: 3\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_18__.Box, {\n    color: \"purple.500\",\n    flexShrink: 0,\n    mt: 0.5\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n    size: 20\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_38__.Text, {\n    fontSize: \"sm\",\n    color: \"purple.800\",\n    lineHeight: \"tall\"\n  }, \"On average, customers take \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"strong\", null, timingData.avg_days_to_purchase, \" days\"), \" and \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"strong\", null, timingData.avg_sessions, \" visits\"), \" before placing an order.\", timingData.avg_pageviews > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, \" They browse \", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"strong\", null, timingData.avg_pageviews, \" pages\"), \" in total.\"), ' ', \"Consider retargeting campaigns timed around day \", Math.ceil(timingData.avg_days_to_purchase / 2), \" to capture undecided customers.\"))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_NoContent__WEBPACK_IMPORTED_MODULE_41__[\"default\"], {\n    icon: lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n    title: \"No time-to-purchase data yet\",\n    description: \"Orders placed after installing this plugin will appear here to show conversion speed.\",\n    height: \"250px\"\n  }))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TrafficAnalytics);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/TrafficAnalytics.jsx?\n}");

/***/ },

/***/ "./src/Components/shared/DatePicker.jsx"
/*!**********************************************!*\
  !*** ./src/Components/shared/DatePicker.jsx ***!
  \**********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   customStaticRanges: () => (/* binding */ customStaticRanges),\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */   getDateRangeLabel: () => (/* binding */ getDateRangeLabel)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_date_range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-date-range */ \"./node_modules/react-date-range/dist/index.js\");\n/* harmony import */ var react_date_range_dist_styles_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-date-range/dist/styles.css */ \"./node_modules/react-date-range/dist/styles.css\");\n/* harmony import */ var react_date_range_dist_theme_default_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-date-range/dist/theme/default.css */ \"./node_modules/react-date-range/dist/theme/default.css\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/addMonths.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfMonth.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/endOfWeek.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfDay.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfMonth.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/startOfWeek.js\");\n/* harmony import */ var date_fns__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! date-fns */ \"./node_modules/date-fns/subDays.js\");\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\n\nvar customStaticRanges = [{\n  label: \"Today\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)(new Date()),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(new Date())\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"Yesterday\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 1)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 1))\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"Last 7 Days\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 6)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(new Date())\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"Last Week\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_10__.startOfWeek)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 7)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_7__.endOfWeek)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 7))\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"Last 30 Days\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 29)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(new Date())\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"This Month\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.startOfMonth)(new Date()),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(new Date())\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"Last Month\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_9__.startOfMonth)((0,date_fns__WEBPACK_IMPORTED_MODULE_4__.addMonths)(new Date(), -1)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_6__.endOfMonth)((0,date_fns__WEBPACK_IMPORTED_MODULE_4__.addMonths)(new Date(), -1))\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"Last 90 Days\",\n  range: function range() {\n    return {\n      startDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)((0,date_fns__WEBPACK_IMPORTED_MODULE_11__.subDays)(new Date(), 89)),\n      endDate: (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(new Date())\n    };\n  },\n  hasCustomRendering: false\n}, {\n  label: \"All Time\",\n  range: function range() {\n    return {\n      startDate: new Date(2020, 0, 1),\n      endDate: new Date()\n    };\n  },\n  hasCustomRendering: false\n}];\nvar getDateRangeLabel = function getDateRangeLabel(range) {\n  if (!range || !range.startDate || !range.endDate) return \"\";\n  var selectedStart = (0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)(new Date(range.startDate)).getTime();\n  var selectedEnd = (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(new Date(range.endDate)).getTime();\n  for (var _i = 0, _customStaticRanges = customStaticRanges; _i < _customStaticRanges.length; _i++) {\n    var staticRange = _customStaticRanges[_i];\n    var r = staticRange.range();\n    if ((0,date_fns__WEBPACK_IMPORTED_MODULE_8__.startOfDay)(r.startDate).getTime() === selectedStart && (0,date_fns__WEBPACK_IMPORTED_MODULE_5__.endOfDay)(r.endDate).getTime() === selectedEnd) {\n      return staticRange.label;\n    }\n  }\n  var startFormat = format(range.startDate, \"MMM d, yyyy\");\n  var endFormat = format(range.endDate, \"MMM d, yyyy\");\n  if (startFormat === endFormat) return startFormat;\n  return \"\".concat(startFormat, \" - \").concat(endFormat);\n};\nvar DatePicker = function DatePicker(_ref) {\n  var initialRange = _ref.initialRange,\n    onChange = _ref.onChange;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialRange || {\n      startDate: new Date(),\n      endDate: new Date(),\n      key: \"selection\"\n    }),\n    _useState2 = _slicedToArray(_useState, 2),\n    range = _useState2[0],\n    setRange = _useState2[1];\n  var handleSelect = function handleSelect(ranges) {\n    var selection = ranges.selection;\n    // Ensure we're working with date objects\n    var startDate = new Date(selection.startDate);\n    var endDate = new Date(selection.endDate);\n    setRange({\n      startDate: startDate,\n      endDate: endDate,\n      key: \"selection\"\n    });\n    if (onChange) {\n      onChange({\n        startDate: startDate,\n        endDate: endDate,\n        key: \"selection\"\n      });\n    }\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_date_range__WEBPACK_IMPORTED_MODULE_1__.DateRangePicker, {\n    ranges: [range],\n    onChange: handleSelect,\n    maxDate: new Date(),\n    inputRanges: [],\n    staticRanges: (0,react_date_range__WEBPACK_IMPORTED_MODULE_1__.createStaticRanges)(customStaticRanges),\n    direction: \"horizontal\"\n  }));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DatePicker);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/shared/DatePicker.jsx?\n}");

/***/ },

/***/ "./src/Components/shared/NoContent.jsx"
/*!*********************************************!*\
  !*** ./src/Components/shared/NoContent.jsx ***!
  \*********************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/v-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/inbox.js\");\n\n\n\nvar NoContent = function NoContent(_ref) {\n  var _ref$icon = _ref.icon,\n    icon = _ref$icon === void 0 ? lucide_react__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _ref$icon,\n    _ref$title = _ref.title,\n    title = _ref$title === void 0 ? \"No data found\" : _ref$title,\n    _ref$description = _ref.description,\n    description = _ref$description === void 0 ? \"\" : _ref$description,\n    _ref$height = _ref.height,\n    height = _ref$height === void 0 ? \"200px\" : _ref$height;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Flex, {\n    direction: \"column\",\n    align: \"center\",\n    justify: \"center\",\n    h: height,\n    w: \"full\",\n    p: 6,\n    textAlign: \"center\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.VStack, {\n    spacing: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, {\n    bg: \"gray.50\",\n    p: 4,\n    borderRadius: \"20px\",\n    color: \"gray.300\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Icon, {\n    as: icon,\n    boxSize: 8\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.VStack, {\n    spacing: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.Text, {\n    fontWeight: \"800\",\n    fontSize: \"sm\",\n    color: \"gray.600\"\n  }, title), description && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.400\",\n    maxW: \"280px\"\n  }, description))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NoContent);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/shared/NoContent.jsx?\n}");

/***/ },

/***/ "./src/Components/shared/ProLockOverlay.jsx"
/*!**************************************************!*\
  !*** ./src/Components/shared/ProLockOverlay.jsx ***!
  \**************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/heading.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/crown.js\");\n\n\n\nvar ProLockOverlay = function ProLockOverlay(_ref) {\n  var title = _ref.title,\n    description = _ref.description,\n    _ref$upgradeUrl = _ref.upgradeUrl,\n    upgradeUrl = _ref$upgradeUrl === void 0 ? 'https://dominopress.com/plugin/insightpress' : _ref$upgradeUrl;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, {\n    position: \"absolute\",\n    top: \"0\",\n    left: \"0\",\n    right: \"0\",\n    bottom: \"0\",\n    display: \"flex\",\n    flexDirection: \"column\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    zIndex: 2,\n    bg: \"whiteAlpha.100\",\n    borderRadius: \"2xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, {\n    bg: \"white\",\n    p: 5,\n    borderRadius: \"2xl\",\n    shadow: \"2xl\",\n    textAlign: \"center\",\n    maxW: \"320px\",\n    border: \"1px solid\",\n    borderColor: \"gray.100\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, {\n    bg: \"purple.50\",\n    w: 12,\n    h: 12,\n    borderRadius: \"xl\",\n    display: \"flex\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    mx: \"auto\",\n    mb: 3,\n    color: \"purple.500\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n    size: 24\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.Heading, {\n    size: \"sm\",\n    mb: 2\n  }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.Text, {\n    fontSize: \"xs\",\n    color: \"gray.500\",\n    mb: 4\n  }, description), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Button, {\n    colorScheme: \"purple\",\n    size: \"md\",\n    w: \"full\",\n    borderRadius: \"lg\",\n    onClick: function onClick() {\n      return window.open(upgradeUrl, '_blank');\n    }\n  }, \"Upgrade to Pro\")));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProLockOverlay);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/shared/ProLockOverlay.jsx?\n}");

/***/ },

/***/ "./src/Components/shared/SuggestFeatureModal.jsx"
/*!*******************************************************!*\
  !*** ./src/Components/shared/SuggestFeatureModal.jsx ***!
  \*******************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/hooks/dist/esm/use-disclosure.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/form-control/form-control.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/form-control/form-label.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/input/input.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal-body.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal-close-button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal-footer.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal-header.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal-overlay.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/modal/modal-content.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/textarea/textarea.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/toast/use-toast.mjs\");\n/* harmony import */ var lucide_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lucide-react */ \"./node_modules/lucide-react/dist/esm/icons/lightbulb.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! axios */ \"./node_modules/axios/lib/axios.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\nvar SuggestFeatureModal = function SuggestFeatureModal() {\n  var _window$insightPressD, _window$insightPressD2, _window$insightPressD3;\n  var _useDisclosure = (0,_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.useDisclosure)(),\n    isOpen = _useDisclosure.isOpen,\n    onOpen = _useDisclosure.onOpen,\n    onClose = _useDisclosure.onClose;\n  var toast = (0,_chakra_ui_react__WEBPACK_IMPORTED_MODULE_14__.useToast)();\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState2 = _slicedToArray(_useState, 2),\n    isLoading = _useState2[0],\n    setIsLoading = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n      name: ((_window$insightPressD = window.insightPressData) === null || _window$insightPressD === void 0 ? void 0 : _window$insightPressD.userName) || '',\n      email: ((_window$insightPressD2 = window.insightPressData) === null || _window$insightPressD2 === void 0 ? void 0 : _window$insightPressD2.userEmail) || '',\n      site_url: ((_window$insightPressD3 = window.insightPressData) === null || _window$insightPressD3 === void 0 ? void 0 : _window$insightPressD3.siteUrl) || '',\n      message: ''\n    }),\n    _useState4 = _slicedToArray(_useState3, 2),\n    formData = _useState4[0],\n    setFormData = _useState4[1];\n  var handleChange = function handleChange(e) {\n    setFormData(_objectSpread(_objectSpread({}, formData), {}, _defineProperty({}, e.target.name, e.target.value)));\n  };\n  var handleSubmit = /*#__PURE__*/function () {\n    var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n      var response, _t;\n      return _regenerator().w(function (_context) {\n        while (1) switch (_context.p = _context.n) {\n          case 0:\n            if (!(!formData.name || !formData.email || !formData.message)) {\n              _context.n = 1;\n              break;\n            }\n            toast({\n              title: 'Error',\n              description: 'Please fill out Name, Email, and Message.',\n              status: 'error',\n              duration: 3000,\n              isClosable: true\n            });\n            return _context.a(2);\n          case 1:\n            setIsLoading(true);\n            _context.p = 2;\n            _context.n = 3;\n            return axios__WEBPACK_IMPORTED_MODULE_16__[\"default\"].post(\"\".concat(window.insightPressData.apiUrl, \"suggest-feature\"), formData, {\n              headers: {\n                'X-WP-Nonce': window.insightPressData.nonce\n              }\n            });\n          case 3:\n            response = _context.v;\n            if (response.data.success) {\n              toast({\n                title: 'Success',\n                description: 'Thank you! Your feature suggestion has been sent.',\n                status: 'success',\n                duration: 4000,\n                isClosable: true\n              });\n              setFormData(_objectSpread(_objectSpread({}, formData), {}, {\n                message: ''\n              }));\n              onClose();\n            }\n            _context.n = 5;\n            break;\n          case 4:\n            _context.p = 4;\n            _t = _context.v;\n            toast({\n              title: 'Error',\n              description: 'Failed to send suggestion. Please try again later.',\n              status: 'error',\n              duration: 4000,\n              isClosable: true\n            });\n          case 5:\n            _context.p = 5;\n            setIsLoading(false);\n            return _context.f(5);\n          case 6:\n            return _context.a(2);\n        }\n      }, _callee, null, [[2, 4, 5, 6]]);\n    }));\n    return function handleSubmit() {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Button, {\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(lucide_react__WEBPACK_IMPORTED_MODULE_15__[\"default\"], {\n      size: 16\n    }),\n    colorScheme: \"teal\",\n    variant: \"outline\",\n    size: \"md\",\n    onClick: onOpen,\n    mr: 3,\n    _hover: {\n      bg: 'teal.50'\n    }\n  }, \"Suggest Features\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_11__.Modal, {\n    isOpen: isOpen,\n    onClose: onClose,\n    size: \"md\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_10__.ModalOverlay, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_12__.ModalContent, {\n    borderRadius: \"xl\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__.ModalHeader, null, \"Suggest a Feature\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__.ModalCloseButton, null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.ModalBody, {\n    pb: 6\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.FormControl, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.FormLabel, null, \"Name\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.Input, {\n    name: \"name\",\n    value: formData.name,\n    onChange: handleChange,\n    placeholder: \"Your Name\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.FormControl, {\n    mt: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.FormLabel, null, \"Email\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.Input, {\n    type: \"email\",\n    name: \"email\",\n    value: formData.email,\n    onChange: handleChange,\n    placeholder: \"Your Email\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.FormControl, {\n    mt: 4\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.FormLabel, null, \"Site URL\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.Input, {\n    name: \"site_url\",\n    value: formData.site_url,\n    onChange: handleChange,\n    placeholder: \"https://example.com\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.FormControl, {\n    mt: 4,\n    isRequired: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.FormLabel, null, \"What feature would you like to see?\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_13__.Textarea, {\n    name: \"message\",\n    value: formData.message,\n    onChange: handleChange,\n    placeholder: \"Describe the feature in detail...\",\n    rows: 5\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__.ModalFooter, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Button, {\n    colorScheme: \"blue\",\n    mr: 3,\n    onClick: handleSubmit,\n    isLoading: isLoading\n  }, \"Send Suggestion\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Button, {\n    onClick: onClose,\n    isDisabled: isLoading\n  }, \"Cancel\")))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SuggestFeatureModal);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/shared/SuggestFeatureModal.jsx?\n}");

/***/ },

/***/ "./src/Components/shared/UsageTrackingNotice.jsx"
/*!*******************************************************!*\
  !*** ./src/Components/shared/UsageTrackingNotice.jsx ***!
  \*******************************************************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/box/box.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/button/icon-button.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/color-mode/color-mode-context.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/flex/flex.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/icon/icon.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/stack/v-stack.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/transition/collapse.mjs\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/typography/text.mjs\");\n/* harmony import */ var react_icons_fi__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-icons/fi */ \"./node_modules/react-icons/fi/index.mjs\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! axios */ \"./node_modules/axios/lib/axios.js\");\nfunction _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = \"function\" == typeof Symbol ? Symbol : {}, n = r.iterator || \"@@iterator\", o = r.toStringTag || \"@@toStringTag\"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, \"_invoke\", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError(\"Generator is already running\"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = \"next\"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, \"constructor\", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", _regeneratorDefine2(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, \"Generator\"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, \"toString\", function () { return \"[object Generator]\"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }\nfunction _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, \"\", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2)); }, _regeneratorDefine2(e, r, n, t); }\nfunction asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }\nfunction _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n); } _next(void 0); }); }; }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\n\n\n\nvar UsageTrackingNotice = function UsageTrackingNotice() {\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState2 = _slicedToArray(_useState, 2),\n    isVisible = _useState2[0],\n    setIsVisible = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('pending'),\n    _useState4 = _slicedToArray(_useState3, 2),\n    status = _useState4[0],\n    setStatus = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n    _useState6 = _slicedToArray(_useState5, 2),\n    loading = _useState6[0],\n    setLoading = _useState6[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    var fetchSettings = /*#__PURE__*/function () {\n      var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {\n        var response, trackingStatus, _t;\n        return _regenerator().w(function (_context) {\n          while (1) switch (_context.p = _context.n) {\n            case 0:\n              _context.p = 0;\n              _context.n = 1;\n              return axios__WEBPACK_IMPORTED_MODULE_11__[\"default\"].get('/settings');\n            case 1:\n              response = _context.v;\n              if (response.data.success) {\n                trackingStatus = response.data.data.usage_tracking;\n                setStatus(trackingStatus);\n                if (trackingStatus === 'pending') {\n                  setIsVisible(true);\n                }\n              }\n              _context.n = 3;\n              break;\n            case 2:\n              _context.p = 2;\n              _t = _context.v;\n              console.error('Failed to fetch settings', _t);\n            case 3:\n              return _context.a(2);\n          }\n        }, _callee, null, [[0, 2]]);\n      }));\n      return function fetchSettings() {\n        return _ref.apply(this, arguments);\n      };\n    }();\n    if (window.insightPressData) {\n      fetchSettings();\n    }\n  }, []);\n  var handleAction = /*#__PURE__*/function () {\n    var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(value) {\n      var response, _t2;\n      return _regenerator().w(function (_context2) {\n        while (1) switch (_context2.p = _context2.n) {\n          case 0:\n            setLoading(true);\n            _context2.p = 1;\n            _context2.n = 2;\n            return axios__WEBPACK_IMPORTED_MODULE_11__[\"default\"].post('/settings', {\n              usage_tracking: value\n            });\n          case 2:\n            response = _context2.v;\n            if (response.data.success) {\n              setIsVisible(false);\n              setStatus(value);\n            }\n            _context2.n = 4;\n            break;\n          case 3:\n            _context2.p = 3;\n            _t2 = _context2.v;\n            console.error('Failed to update tracking setting', _t2);\n          case 4:\n            _context2.p = 4;\n            setLoading(false);\n            return _context2.f(4);\n          case 5:\n            return _context2.a(2);\n        }\n      }, _callee2, null, [[1, 3, 4, 5]]);\n    }));\n    return function handleAction(_x) {\n      return _ref2.apply(this, arguments);\n    };\n  }();\n  if (!isVisible) return null;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_8__.Collapse, {\n    \"in\": isVisible,\n    animateOpacity: true\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, {\n    bg: (0,_chakra_ui_react__WEBPACK_IMPORTED_MODULE_4__.useColorModeValue)('purple.600', 'purple.500'),\n    color: \"white\",\n    px: 6,\n    py: 4,\n    borderRadius: \"2xl\",\n    mb: 6,\n    boxShadow: \"0 10px 15px -3px rgba(124, 58, 237, 0.2), 0 4px 6px -2px rgba(124, 58, 237, 0.1)\",\n    position: \"relative\",\n    overflow: \"hidden\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_3__.IconButton, {\n    icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_icons_fi__WEBPACK_IMPORTED_MODULE_10__.FiX, null),\n    position: \"absolute\",\n    top: 4,\n    right: 4,\n    variant: \"ghost\",\n    color: \"whiteAlpha.800\",\n    _hover: {\n      bg: 'whiteAlpha.200',\n      color: 'white'\n    },\n    onClick: function onClick() {\n      return handleAction('no');\n    },\n    \"aria-label\": \"Close\",\n    size: \"sm\",\n    zIndex: 2\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_5__.Flex, {\n    direction: \"row\",\n    align: \"start\",\n    justify: \"start\",\n    gap: 6,\n    position: \"relative\",\n    zIndex: 1\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, {\n    bg: \"whiteAlpha.300\",\n    p: 4,\n    borderRadius: \"2xl\",\n    display: {\n      base: 'none',\n      md: 'flex'\n    },\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    boxShadow: \"inner\",\n    flexShrink: 0\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_6__.Icon, {\n    as: react_icons_fi__WEBPACK_IMPORTED_MODULE_10__.FiActivity,\n    fontSize: \"32px\",\n    color: \"white\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_7__.VStack, {\n    align: \"start\",\n    spacing: 6,\n    flex: \"1\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_1__.Box, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__.Text, {\n    mt: 0,\n    fontWeight: \"800\",\n    fontSize: \"2xl\",\n    letterSpacing: \"-0.5px\",\n    mb: 1\n  }, \"Help us improve InsightPress!\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_9__.Text, {\n    fontSize: \"md\",\n    opacity: 0.9,\n    fontWeight: \"500\",\n    maxW: \"3xl\",\n    lineHeight: \"tall\",\n    m: 0\n  }, \"Join our community-driven development! By sharing anonymous usage data, you help us identify performance bottlenecks and prioritize the features you use most. No personal data or store information is ever collected.\")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.Button, {\n    size: \"lg\",\n    variant: \"solid\",\n    bg: \"white\",\n    color: \"purple.600\",\n    _hover: {\n      bg: 'purple.50',\n      transform: 'translateY(-2px)',\n      shadow: 'xl'\n    },\n    _active: {\n      bg: 'purple.100',\n      transform: 'translateY(0)'\n    },\n    fontWeight: \"800\",\n    leftIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_icons_fi__WEBPACK_IMPORTED_MODULE_10__.FiCheck, null),\n    onClick: function onClick() {\n      return handleAction('yes');\n    },\n    isLoading: loading,\n    px: 10,\n    height: \"50px\",\n    borderRadius: \"2xl\",\n    fontSize: \"lg\"\n  }, \"Allow & Continue\")))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UsageTrackingNotice);\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/Components/shared/UsageTrackingNotice.jsx?\n}");

/***/ },

/***/ "./src/admin.jsx"
/*!***********************!*\
  !*** ./src/admin.jsx ***!
  \***********************/
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom/client */ \"./node_modules/react-dom/client.js\");\n/* harmony import */ var _chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @chakra-ui/react */ \"./node_modules/@chakra-ui/react/dist/esm/chakra-provider.mjs\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router/dist/development/chunk-JZWAC4HX.mjs\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"./node_modules/axios/lib/axios.js\");\n/* harmony import */ var _Components_SalesAnalytics__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Components/SalesAnalytics */ \"./src/Components/SalesAnalytics.jsx\");\n/* harmony import */ var _Components_ProductAnalytics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Components/ProductAnalytics */ \"./src/Components/ProductAnalytics.jsx\");\n/* harmony import */ var _Components_PostAnalytics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Components/PostAnalytics */ \"./src/Components/PostAnalytics.jsx\");\n/* harmony import */ var _Components_TrafficAnalytics__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Components/TrafficAnalytics */ \"./src/Components/TrafficAnalytics.jsx\");\n/* harmony import */ var _Components_SingleProductAnalytics__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Components/SingleProductAnalytics */ \"./src/Components/SingleProductAnalytics.jsx\");\n/* harmony import */ var _Components_SinglePostAnalytics__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Components/SinglePostAnalytics */ \"./src/Components/SinglePostAnalytics.jsx\");\n/* harmony import */ var _Components_shared_UsageTrackingNotice__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Components/shared/UsageTrackingNotice */ \"./src/Components/shared/UsageTrackingNotice.jsx\");\nvar _excluded = [\"children\"];\nfunction _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }\nfunction _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Configure Axios\nif (window.insightPressData) {\n  axios__WEBPACK_IMPORTED_MODULE_4__[\"default\"].defaults.baseURL = window.insightPressData.apiUrl;\n  axios__WEBPACK_IMPORTED_MODULE_4__[\"default\"].defaults.headers.common['X-WP-Nonce'] = window.insightPressData.nonce;\n}\nvar AppContent = function AppContent() {\n  var _window$insightPressD, _window$insightPressD2, _window$insightPressD3;\n  var navigate = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_3__.useNavigate)();\n  var location = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_3__.useLocation)();\n  var currentPage = (_window$insightPressD = window.insightPressData) === null || _window$insightPressD === void 0 ? void 0 : _window$insightPressD.currentPage;\n  var productId = (_window$insightPressD2 = window.insightPressData) === null || _window$insightPressD2 === void 0 ? void 0 : _window$insightPressD2.productId;\n  var postId = (_window$insightPressD3 = window.insightPressData) === null || _window$insightPressD3 === void 0 ? void 0 : _window$insightPressD3.postId;\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    // Only redirect IF there is no hash path already\n    if (location.pathname === '/' || location.pathname === '') {\n      if (currentPage === 'sales-analytics') {\n        navigate('/sales');\n      } else if (currentPage === 'product-analytics') {\n        navigate('/products');\n      } else if (currentPage === 'post-analytics') {\n        navigate('/posts');\n      } else if (currentPage === 'traffic-analytics') {\n        navigate('/traffic');\n      } else if (currentPage === 'single-product-analytics' && productId) {\n        navigate(\"/product/\".concat(productId));\n      } else if (currentPage === 'single-post-analytics' && postId) {\n        navigate(\"/post/\".concat(postId));\n      }\n    }\n\n    // Highlight the correct menu item in WP Sidebar\n    var updateSidebarHighlight = function updateSidebarHighlight() {\n      var menuItems = document.querySelectorAll('#toplevel_page_insightpress .wp-submenu li');\n      menuItems.forEach(function (item) {\n        return item.classList.remove('current');\n      });\n\n      // Only highlight if it's a main category page, not a detail page\n      if (location.pathname === '/products') {\n        var productMenu = Array.from(menuItems).find(function (i) {\n          return i.innerHTML.includes('insightpress-product');\n        });\n        if (productMenu) productMenu.classList.add('current');\n      } else if (location.pathname === '/posts') {\n        var postsMenu = Array.from(menuItems).find(function (i) {\n          return i.innerHTML.includes('insightpress-posts');\n        });\n        if (postsMenu) postsMenu.classList.add('current');\n      } else if (location.pathname === '/traffic') {\n        var trafficMenu = Array.from(menuItems).find(function (i) {\n          return i.innerHTML.includes('insightpress-traffic');\n        });\n        if (trafficMenu) trafficMenu.classList.add('current');\n      } else if (location.pathname === '/sales') {\n        var salesMenu = Array.from(menuItems).find(function (i) {\n          return i.innerHTML.includes('page=insightpress\"');\n        });\n        if (salesMenu) salesMenu.classList.add('current');\n      }\n      // Detail pages (/product/:id and /post/:id) will result in no sub-menu item being highlighted, \n      // which provides a cleaner \"full focus\" experience.\n    };\n    updateSidebarHighlight();\n  }, [currentPage, navigate, location.pathname, productId, postId]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"insightpress-app-root\",\n    style: {\n      padding: '20px',\n      background: '#f8fafc',\n      minHeight: '100vh',\n      fontFamily: 'Inter, system-ui, sans-serif'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Routes, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/sales\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_SalesAnalytics__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/products\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_ProductAnalytics__WEBPACK_IMPORTED_MODULE_6__[\"default\"], null)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/posts\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_PostAnalytics__WEBPACK_IMPORTED_MODULE_7__[\"default\"], null)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/traffic\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_TrafficAnalytics__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/product/:id\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_SingleProductAnalytics__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/post/:id\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_SinglePostAnalytics__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.Route, {\n    path: \"/\",\n    element: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Box, {\n      p: 10\n    }, \"Loading analytics...\")\n  })));\n};\n\n// Simple Box fallback if it's missing from local imports\nvar Box = function Box(_ref) {\n  var children = _ref.children,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", props, children);\n};\nvar App = function App() {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.ChakraProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__.HashRouter, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(AppContent, null)));\n};\ndocument.addEventListener('DOMContentLoaded', function () {\n  var container = document.getElementById('insightpress-root');\n  if (container) {\n    var root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(container);\n    root.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(App, null));\n  }\n  var noticeContainer = document.getElementById('insightpress-tracking-notice');\n  if (noticeContainer) {\n    var _root = (0,react_dom_client__WEBPACK_IMPORTED_MODULE_1__.createRoot)(noticeContainer);\n    _root.render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_chakra_ui_react__WEBPACK_IMPORTED_MODULE_2__.ChakraProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Components_shared_UsageTrackingNotice__WEBPACK_IMPORTED_MODULE_11__[\"default\"], null)));\n  }\n});\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/./src/admin.jsx?\n}");

/***/ },

/***/ "data:image/svg+xml;utf8,<svg width=%279px%27 height=%276px%27 viewBox=%270 0 9 6%27 version=%271.1%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27><g id=%27Artboard%27 stroke=%27none%27 stroke-width=%271%27 fill=%27none%27 fill-rule=%27evenodd%27 transform=%27translate%28-636.000000, -171.000000%29%27 fill-opacity=%270.368716033%27><g id=%27input%27 transform=%27translate%28172.000000, 37.000000%29%27 fill=%27%230E242F%27 fill-rule=%27nonzero%27><g id=%27Group-9%27 transform=%27translate%28323.000000, 127.000000%29%27><path d=%27M142.280245,7.23952813 C141.987305,6.92353472 141.512432,6.92361662 141.219585,7.23971106 C140.926739,7.5558055 140.926815,8.06821394 141.219755,8.38420735 L145.498801,13 L149.780245,8.38162071 C150.073185,8.0656273 150.073261,7.55321886 149.780415,7.23712442 C149.487568,6.92102998 149.012695,6.92094808 148.719755,7.23694149 L145.498801,10.7113732 L142.280245,7.23952813 Z%27 id=%27arrow%27></path></g></g></g></svg>"
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** data:image/svg+xml;utf8,<svg width=%279px%27 height=%276px%27 viewBox=%270 0 9 6%27 version=%271.1%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27><g id=%27Artboard%27 stroke=%27none%27 stroke-width=%271%27 fill=%27none%27 fill-rule=%27evenodd%27 transform=%27translate%28-636.000000, -171.000000%29%27 fill-opacity=%270.368716033%27><g id=%27input%27 transform=%27translate%28172.000000, 37.000000%29%27 fill=%27%230E242F%27 fill-rule=%27nonzero%27><g id=%27Group-9%27 transform=%27translate%28323.000000, 127.000000%29%27><path d=%27M142.280245,7.23952813 C141.987305,6.92353472 141.512432,6.92361662 141.219585,7.23971106 C140.926739,7.5558055 140.926815,8.06821394 141.219755,8.38420735 L145.498801,13 L149.780245,8.38162071 C150.073185,8.0656273 150.073261,7.55321886 149.780415,7.23712442 C149.487568,6.92102998 149.012695,6.92094808 148.719755,7.23694149 L145.498801,10.7113732 L142.280245,7.23952813 Z%27 id=%27arrow%27></path></g></g></g></svg> ***!
  \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
(module) {

eval("{module.exports = \"data:image/svg+xml;utf8,<svg width=%279px%27 height=%276px%27 viewBox=%270 0 9 6%27 version=%271.1%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27><g id=%27Artboard%27 stroke=%27none%27 stroke-width=%271%27 fill=%27none%27 fill-rule=%27evenodd%27 transform=%27translate%28-636.000000, -171.000000%29%27 fill-opacity=%270.368716033%27><g id=%27input%27 transform=%27translate%28172.000000, 37.000000%29%27 fill=%27%230E242F%27 fill-rule=%27nonzero%27><g id=%27Group-9%27 transform=%27translate%28323.000000, 127.000000%29%27><path d=%27M142.280245,7.23952813 C141.987305,6.92353472 141.512432,6.92361662 141.219585,7.23971106 C140.926739,7.5558055 140.926815,8.06821394 141.219755,8.38420735 L145.498801,13 L149.780245,8.38162071 C150.073185,8.0656273 150.073261,7.55321886 149.780415,7.23712442 C149.487568,6.92102998 149.012695,6.92094808 148.719755,7.23694149 L145.498801,10.7113732 L142.280245,7.23952813 Z%27 id=%27arrow%27></path></g></g></g></svg>\";\n\n//# sourceURL=webpack://insightpress-advanced-analytics-for-woocommerce/data:image/svg+xml;utf8,%3Csvg_width=%25279px%2527_height=%25276px%2527_viewBox=%25270_0_9_6%2527_version=%25271.1%2527_xmlns=%2527http://www.w3.org/2000/svg%2527_xmlns:xlink=%2527http://www.w3.org/1999/xlink%2527%3E%3Cg_id=%2527Artboard%2527_stroke=%2527none%2527_stroke-width=%25271%2527_fill=%2527none%2527_fill-rule=%2527evenodd%2527_transform=%2527translate%2528-636.000000,_-171.000000%2529%2527_fill-opacity=%25270.368716033%2527%3E%3Cg_id=%2527input%2527_transform=%2527translate%2528172.000000,_37.000000%2529%2527_fill=%2527%25230E242F%2527_fill-rule=%2527nonzero%2527%3E%3Cg_id=%2527Group-9%2527_transform=%2527translate%2528323.000000,_127.000000%2529%2527%3E%3Cpath_d=%2527M142.280245,7.23952813_C141.987305,6.92353472_141.512432,6.92361662_141.219585,7.23971106_C140.926739,7.5558055_140.926815,8.06821394_141.219755,8.38420735_L145.498801,13_L149.780245,8.38162071_C150.073185,8.0656273_150.073261,7.55321886_149.780415,7.23712442_C149.487568,6.92102998_149.012695,6.92094808_148.719755,7.23694149_L145.498801,10.7113732_L142.280245,7.23952813_Z%2527_id=%2527arrow%2527%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E?\n}");

/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Check if module exists (development only)
/******/ 		if (__webpack_modules__[moduleId] === undefined) {
/******/ 			var e = new Error("Cannot find module '" + moduleId + "'");
/******/ 			e.code = 'MODULE_NOT_FOUND';
/******/ 			throw e;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			loaded: false,
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/chunk loaded */
/******/ 	(() => {
/******/ 		var deferred = [];
/******/ 		__webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ 			if(chunkIds) {
/******/ 				priority = priority || 0;
/******/ 				for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ 				deferred[i] = [chunkIds, fn, priority];
/******/ 				return;
/******/ 			}
/******/ 			var notFulfilled = Infinity;
/******/ 			for (var i = 0; i < deferred.length; i++) {
/******/ 				var [chunkIds, fn, priority] = deferred[i];
/******/ 				var fulfilled = true;
/******/ 				for (var j = 0; j < chunkIds.length; j++) {
/******/ 					if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ 						chunkIds.splice(j--, 1);
/******/ 					} else {
/******/ 						fulfilled = false;
/******/ 						if(priority < notFulfilled) notFulfilled = priority;
/******/ 					}
/******/ 				}
/******/ 				if(fulfilled) {
/******/ 					deferred.splice(i--, 1)
/******/ 					var r = fn();
/******/ 					if (r !== undefined) result = r;
/******/ 				}
/******/ 			}
/******/ 			return result;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/create fake namespace object */
/******/ 	(() => {
/******/ 		var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ 		var leafPrototypes;
/******/ 		// create a fake namespace object
/******/ 		// mode & 1: value is a module id, require it
/******/ 		// mode & 2: merge all properties of value into the ns
/******/ 		// mode & 4: return value when already ns object
/******/ 		// mode & 16: return value when it's Promise-like
/******/ 		// mode & 8|1: behave like require
/******/ 		__webpack_require__.t = function(value, mode) {
/******/ 			if(mode & 1) value = this(value);
/******/ 			if(mode & 8) return value;
/******/ 			if(typeof value === 'object' && value) {
/******/ 				if((mode & 4) && value.__esModule) return value;
/******/ 				if((mode & 16) && typeof value.then === 'function') return value;
/******/ 			}
/******/ 			var ns = Object.create(null);
/******/ 			__webpack_require__.r(ns);
/******/ 			var def = {};
/******/ 			leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ 			for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ 				Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ 			}
/******/ 			def['default'] = () => (value);
/******/ 			__webpack_require__.d(ns, def);
/******/ 			return ns;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	(() => {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/node module decorator */
/******/ 	(() => {
/******/ 		__webpack_require__.nmd = (module) => {
/******/ 			module.paths = [];
/******/ 			if (!module.children) module.children = [];
/******/ 			return module;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/jsonp chunk loading */
/******/ 	(() => {
/******/ 		__webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
/******/ 		
/******/ 		// object to store loaded and loading chunks
/******/ 		// undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ 		// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ 		var installedChunks = {
/******/ 			"admin": 0
/******/ 		};
/******/ 		
/******/ 		// no chunk on demand loading
/******/ 		
/******/ 		// no prefetching
/******/ 		
/******/ 		// no preloaded
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 		
/******/ 		__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/ 		
/******/ 		// install a JSONP callback for chunk loading
/******/ 		var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ 			var [chunkIds, moreModules, runtime] = data;
/******/ 			// add "moreModules" to the modules object,
/******/ 			// then flag all "chunkIds" as loaded and fire callback
/******/ 			var moduleId, chunkId, i = 0;
/******/ 			if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ 				for(moduleId in moreModules) {
/******/ 					if(__webpack_require__.o(moreModules, moduleId)) {
/******/ 						__webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ 					}
/******/ 				}
/******/ 				if(runtime) var result = runtime(__webpack_require__);
/******/ 			}
/******/ 			if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ 			for(;i < chunkIds.length; i++) {
/******/ 				chunkId = chunkIds[i];
/******/ 				if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ 					installedChunks[chunkId][0]();
/******/ 				}
/******/ 				installedChunks[chunkId] = 0;
/******/ 			}
/******/ 			return __webpack_require__.O(result);
/******/ 		}
/******/ 		
/******/ 		var chunkLoadingGlobal = self["webpackChunkinsightpress_advanced_analytics_for_woocommerce"] = self["webpackChunkinsightpress_advanced_analytics_for_woocommerce"] || [];
/******/ 		chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ 		chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/nonce */
/******/ 	(() => {
/******/ 		__webpack_require__.nc = undefined;
/******/ 	})();
/******/ 	
/************************************************************************/
/******/ 	
/******/ 	// startup
/******/ 	// Load entry module and return exports
/******/ 	// This entry module depends on other loaded chunks and execution need to be delayed
/******/ 	var __webpack_exports__ = __webpack_require__.O(undefined, ["vendors"], () => (__webpack_require__("./src/admin.jsx")))
/******/ 	__webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/ 	
/******/ })()
;