7 lines
79 KiB
JavaScript
7 lines
79 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/page-dashboard-CuOyqq-s.js","assets/js/vendor-react-core-DRQGgXXF.js","assets/js/vendor-charts-BCGhWx_0.js","assets/js/vendor-other-DTCyBslD.js","assets/css/vendor-other-BsM4JrO0.css","assets/js/vendor-react-router-P1WQ4rUN.js","assets/js/page-authpages-BaiNliVr.js","assets/js/vendor-helmet-Cxll262M.js","assets/js/vendor-state-C9hO8g1p.js","assets/js/page-components.tsx-4vErPdxY.js","assets/js/marketing-marketingapp.tsx-D0Y0OkFz.js","assets/js/marketing-layout-DVDsYZpl.js","assets/js/marketing-data-DtLIUpMC.js","assets/js/marketing-components-CJXw20ab.js","assets/js/pages-planner-dv4ygB5K.js","assets/js/page-reference-wEKoPZ-s.js","assets/js/page-clusters.config.tsx-FJ8SgY77.js","assets/js/page-keywords.config.tsx-DZ6n4Vdz.js","assets/js/page-ideas.config.tsx-BDMNIgpF.js","assets/js/page-delete-modal.config.ts-BIbgpgnr.js","assets/js/page-bulk-action-modal.config.ts-DEzkmedw.js","assets/js/page-table-actions.config.tsx-CnI7P__0.js","assets/js/pages-writer-BGmP8pSS.js","assets/js/page-content.config.tsx-Bu5_tL3S.js","assets/js/page-images.config.tsx-D2qUfhK2.js","assets/js/page-tasks.config.tsx-DbwIlrdw.js","assets/js/pages-thinker-C5P9qYJa.js","assets/js/pages-billing-DLN8PjHX.js","assets/js/page-schedules.tsx-BxdZCyA5.js","assets/js/pages-settings-thllZ7gb.js","assets/js/page-help-COTCneXr.js"])))=>i.map(i=>d[i]);
|
||
import"./modulepreload-polyfill-B5Qt9EMX.js";import{r as s,j as e,a as Y,k as Q}from"./vendor-react-core-DRQGgXXF.js";/* empty css */import"./vendor-other-DTCyBslD.js";import{_ as a}from"./marketing-marketingapp.tsx-D0Y0OkFz.js";import{L as V,b as ee,u as B,O as te,N as W,B as se,R as re,a as r}from"./vendor-react-router-P1WQ4rUN.js";import{a as ae}from"./vendor-helmet-Cxll262M.js";import{z as ne,u as L,A as le,D as F,c as z,d as oe,w as ie,g as U,n as de,E as ce,j as me,F as ue,r as he,i as xe,H as ge,J as pe,T as be}from"./page-authpages-BaiNliVr.js";import{D as G,a as I}from"./page-components.tsx-4vErPdxY.js";import{d as fe,H as je}from"./pages-planner-dv4ygB5K.js";import{A as q,a as ye,b as _e,af as we}from"./page-dashboard-CuOyqq-s.js";import{N as ke}from"./page-otherpage-my21hYIE.js";import"./vendor-charts-BCGhWx_0.js";import"./marketing-layout-DVDsYZpl.js";import"./marketing-data-DtLIUpMC.js";import"./marketing-components-CJXw20ab.js";import"./vendor-state-C9hO8g1p.js";import"./page-reference-wEKoPZ-s.js";import"./page-clusters.config.tsx-FJ8SgY77.js";import"./page-keywords.config.tsx-DZ6n4Vdz.js";import"./page-ideas.config.tsx-BDMNIgpF.js";import"./page-delete-modal.config.ts-BIbgpgnr.js";import"./page-bulk-action-modal.config.ts-DEzkmedw.js";import"./page-table-actions.config.tsx-CnI7P__0.js";const J=s.createContext(void 0),O=()=>{const t=s.useContext(J);if(!t)throw new Error("useSidebar must be used within a SidebarProvider");return t},ve=({children:t})=>{const[l,n]=s.useState(!0),[i,u]=s.useState(!1),[d,c]=s.useState(!1),[m,b]=s.useState(!1),[f,v]=s.useState(null),[_,g]=s.useState(null);s.useEffect(()=>{const j=()=>{const y=window.innerWidth<768;c(y),y||u(!1)};return j(),window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[]);const E=()=>{n(j=>!j)},R=()=>{u(j=>!j)},C=j=>{g(y=>y===j?null:j)};return e.jsx(J.Provider,{value:{isExpanded:d?!1:l,isMobileOpen:i,isHovered:m,activeItem:f,openSubmenu:_,toggleSidebar:E,toggleMobileSidebar:R,setIsHovered:b,setActiveItem:v,toggleSubmenu:C},children:t})},Ce=()=>{const{toggleTheme:t}=ne();return e.jsxs("button",{onClick:t,className:"relative flex items-center justify-center text-gray-500 transition-colors bg-white border border-gray-200 rounded-full hover:text-dark-900 h-11 w-11 hover:bg-gray-100 hover:text-gray-700 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white",children:[e.jsx("svg",{className:"hidden dark:block",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99998 1.5415C10.4142 1.5415 10.75 1.87729 10.75 2.2915V3.5415C10.75 3.95572 10.4142 4.2915 9.99998 4.2915C9.58577 4.2915 9.24998 3.95572 9.24998 3.5415V2.2915C9.24998 1.87729 9.58577 1.5415 9.99998 1.5415ZM10.0009 6.79327C8.22978 6.79327 6.79402 8.22904 6.79402 10.0001C6.79402 11.7712 8.22978 13.207 10.0009 13.207C11.772 13.207 13.2078 11.7712 13.2078 10.0001C13.2078 8.22904 11.772 6.79327 10.0009 6.79327ZM5.29402 10.0001C5.29402 7.40061 7.40135 5.29327 10.0009 5.29327C12.6004 5.29327 14.7078 7.40061 14.7078 10.0001C14.7078 12.5997 12.6004 14.707 10.0009 14.707C7.40135 14.707 5.29402 12.5997 5.29402 10.0001ZM15.9813 5.08035C16.2742 4.78746 16.2742 4.31258 15.9813 4.01969C15.6884 3.7268 15.2135 3.7268 14.9207 4.01969L14.0368 4.90357C13.7439 5.19647 13.7439 5.67134 14.0368 5.96423C14.3297 6.25713 14.8045 6.25713 15.0974 5.96423L15.9813 5.08035ZM18.4577 10.0001C18.4577 10.4143 18.1219 10.7501 17.7077 10.7501H16.4577C16.0435 10.7501 15.7077 10.4143 15.7077 10.0001C15.7077 9.58592 16.0435 9.25013 16.4577 9.25013H17.7077C18.1219 9.25013 18.4577 9.58592 18.4577 10.0001ZM14.9207 15.9806C15.2135 16.2735 15.6884 16.2735 15.9813 15.9806C16.2742 15.6877 16.2742 15.2128 15.9813 14.9199L15.0974 14.036C14.8045 13.7431 14.3297 13.7431 14.0368 14.036C13.7439 14.3289 13.7439 14.8038 14.0368 15.0967L14.9207 15.9806ZM9.99998 15.7088C10.4142 15.7088 10.75 16.0445 10.75 16.4588V17.7088C10.75 18.123 10.4142 18.4588 9.99998 18.4588C9.58577 18.4588 9.24998 18.123 9.24998 17.7088V16.4588C9.24998 16.0445 9.58577 15.7088 9.99998 15.7088ZM5.96356 15.0972C6.25646 14.8043 6.25646 14.3295 5.96356 14.0366C5.67067 13.7437 5.1958 13.7437 4.9029 14.0366L4.01902 14.9204C3.72613 15.2133 3.72613 15.6882 4.01902 15.9811C4.31191 16.274 4.78679 16.274 5.07968 15.9811L5.96356 15.0972ZM4.29224 10.0001C4.29224 10.4143 3.95645 10.7501 3.54224 10.7501H2.29224C1.87802 10.7501 1.54224 10.4143 1.54224 10.0001C1.54224 9.58592 1.87802 9.25013 2.29224 9.25013H3.54224C3.95645 9.25013 4.29224 9.58592 4.29224 10.0001ZM4.9029 5.9637C5.1958 6.25659 5.67067 6.25659 5.96356 5.9637C6.25646 5.6708 6.25646 5.19593 5.96356 4.90303L5.07968 4.01915C4.78679 3.72626 4.31191 3.72626 4.01902 4.01915C3.72613 4.31204 3.72613 4.78692 4.01902 5.07981L4.9029 5.9637Z",fill:"currentColor"})}),e.jsx("svg",{className:"dark:hidden",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M17.4547 11.97L18.1799 12.1611C18.265 11.8383 18.1265 11.4982 17.8401 11.3266C17.5538 11.1551 17.1885 11.1934 16.944 11.4207L17.4547 11.97ZM8.0306 2.5459L8.57989 3.05657C8.80718 2.81209 8.84554 2.44682 8.67398 2.16046C8.50243 1.8741 8.16227 1.73559 7.83948 1.82066L8.0306 2.5459ZM12.9154 13.0035C9.64678 13.0035 6.99707 10.3538 6.99707 7.08524H5.49707C5.49707 11.1823 8.81835 14.5035 12.9154 14.5035V13.0035ZM16.944 11.4207C15.8869 12.4035 14.4721 13.0035 12.9154 13.0035V14.5035C14.8657 14.5035 16.6418 13.7499 17.9654 12.5193L16.944 11.4207ZM16.7295 11.7789C15.9437 14.7607 13.2277 16.9586 10.0003 16.9586V18.4586C13.9257 18.4586 17.2249 15.7853 18.1799 12.1611L16.7295 11.7789ZM10.0003 16.9586C6.15734 16.9586 3.04199 13.8433 3.04199 10.0003H1.54199C1.54199 14.6717 5.32892 18.4586 10.0003 18.4586V16.9586ZM3.04199 10.0003C3.04199 6.77289 5.23988 4.05695 8.22173 3.27114L7.83948 1.82066C4.21532 2.77574 1.54199 6.07486 1.54199 10.0003H3.04199ZM6.99707 7.08524C6.99707 5.52854 7.5971 4.11366 8.57989 3.05657L7.48132 2.03522C6.25073 3.35885 5.49707 5.13487 5.49707 7.08524H6.99707Z",fill:"currentColor"})})]})};function Ne(){const[t,l]=s.useState(!1),[n,i]=s.useState(!0);function u(){l(!t)}function d(){l(!1)}const c=()=>{u(),i(!1)};return e.jsxs("div",{className:"relative",children:[e.jsxs("button",{className:"relative flex items-center justify-center text-gray-500 transition-colors bg-white border border-gray-200 rounded-full dropdown-toggle hover:text-gray-700 h-11 w-11 hover:bg-gray-100 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white",onClick:c,children:[e.jsx("span",{className:`absolute right-0 top-0.5 z-10 h-2 w-2 rounded-full bg-orange-400 ${n?"flex":"hidden"}`,children:e.jsx("span",{className:"absolute inline-flex w-full h-full bg-orange-400 rounded-full opacity-75 animate-ping"})}),e.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.75 2.29248C10.75 1.87827 10.4143 1.54248 10 1.54248C9.58583 1.54248 9.25004 1.87827 9.25004 2.29248V2.83613C6.08266 3.20733 3.62504 5.9004 3.62504 9.16748V14.4591H3.33337C2.91916 14.4591 2.58337 14.7949 2.58337 15.2091C2.58337 15.6234 2.91916 15.9591 3.33337 15.9591H4.37504H15.625H16.6667C17.0809 15.9591 17.4167 15.6234 17.4167 15.2091C17.4167 14.7949 17.0809 14.4591 16.6667 14.4591H16.375V9.16748C16.375 5.9004 13.9174 3.20733 10.75 2.83613V2.29248ZM14.875 14.4591V9.16748C14.875 6.47509 12.6924 4.29248 10 4.29248C7.30765 4.29248 5.12504 6.47509 5.12504 9.16748V14.4591H14.875ZM8.00004 17.7085C8.00004 18.1228 8.33583 18.4585 8.75004 18.4585H11.25C11.6643 18.4585 12 18.1228 12 17.7085C12 17.2943 11.6643 16.9585 11.25 16.9585H8.75004C8.33583 16.9585 8.00004 17.2943 8.00004 17.7085Z",fill:"currentColor"})})]}),e.jsxs(G,{isOpen:t,onClose:d,className:"absolute -right-[240px] mt-[17px] flex h-[480px] w-[350px] flex-col rounded-2xl border border-gray-200 bg-white p-3 shadow-theme-lg dark:border-gray-800 dark:bg-gray-dark sm:w-[361px] lg:right-0",children:[e.jsxs("div",{className:"flex items-center justify-between pb-3 mb-3 border-b border-gray-100 dark:border-gray-700",children:[e.jsx("h5",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200",children:"Notification"}),e.jsx("button",{onClick:u,className:"text-gray-500 transition dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",children:e.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.21967 7.28131C5.92678 6.98841 5.92678 6.51354 6.21967 6.22065C6.51256 5.92775 6.98744 5.92775 7.28033 6.22065L11.999 10.9393L16.7176 6.22078C17.0105 5.92789 17.4854 5.92788 17.7782 6.22078C18.0711 6.51367 18.0711 6.98855 17.7782 7.28144L13.0597 12L17.7782 16.7186C18.0711 17.0115 18.0711 17.4863 17.7782 17.7792C17.4854 18.0721 17.0105 18.0721 16.7176 17.7792L11.999 13.0607L7.28033 17.7794C6.98744 18.0722 6.51256 18.0722 6.21967 17.7794C5.92678 17.4865 5.92678 17.0116 6.21967 16.7187L10.9384 12L6.21967 7.28131Z",fill:"currentColor"})})})]}),e.jsxs("ul",{className:"flex flex-col h-auto overflow-y-auto custom-scrollbar",children:[e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-02.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-success-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block text-theme-sm text-gray-500 dark:text-gray-400 space-x-1",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Terry Franci"}),e.jsx("span",{children:" requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"5 min ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-03.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-success-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block space-x-1 text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Alena Franci"}),e.jsx("span",{children:"requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"8 min ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-04.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-success-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block space-x-1 text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Jocelyn Kenter"}),e.jsx("span",{children:" requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"15 min ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",to:"/",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-05.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-error-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 space-x-1 block text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Brandon Philips"}),e.jsx("span",{children:"requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"1 hr ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",onItemClick:d,children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-02.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-success-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block space-x-1 text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Terry Franci"}),e.jsx("span",{children:" requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"5 min ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-03.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-success-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block space-x-1 text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Alena Franci"}),e.jsx("span",{children:" requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"8 min ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-04.jpg",alt:"User",className:"w-full overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-success-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block space-x-1 text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Jocelyn Kenter"}),e.jsx("span",{children:" requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"15 min ago"})]})]})]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:d,className:"flex gap-3 rounded-lg border-b border-gray-100 p-3 px-4.5 py-3 hover:bg-gray-100 dark:border-gray-800 dark:hover:bg-white/5",children:[e.jsxs("span",{className:"relative block w-full h-10 rounded-full z-1 max-w-10",children:[e.jsx("img",{width:40,height:40,src:"/images/user/user-05.jpg",alt:"User",className:"overflow-hidden rounded-full"}),e.jsx("span",{className:"absolute bottom-0 right-0 z-10 h-2.5 w-full max-w-2.5 rounded-full border-[1.5px] border-white bg-error-500 dark:border-gray-900"})]}),e.jsxs("span",{className:"block",children:[e.jsxs("span",{className:"mb-1.5 block space-x-1 text-theme-sm text-gray-500 dark:text-gray-400",children:[e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Brandon Philips"}),e.jsx("span",{children:"requests permission to change"}),e.jsx("span",{className:"font-medium text-gray-800 dark:text-white/90",children:"Project - Nganter App"})]}),e.jsxs("span",{className:"flex items-center gap-2 text-gray-500 text-theme-xs dark:text-gray-400",children:[e.jsx("span",{children:"Project"}),e.jsx("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),e.jsx("span",{children:"1 hr ago"})]})]})]})})]}),e.jsx(V,{to:"/",className:"block px-4 py-2 mt-3 text-sm font-medium text-center text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700",children:"View All Notifications"})]})]})}function Ee(){var b;const[t,l]=s.useState(!1),n=ee(),{user:i,logout:u}=L();function d(){l(!t)}function c(){l(!1)}const m=()=>{u(),n("/signin",{replace:!0}),c()};return e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:d,className:"flex items-center text-gray-700 dropdown-toggle dark:text-gray-400",children:[e.jsx("span",{className:"mr-3 overflow-hidden rounded-full h-11 w-11 bg-brand-500 flex items-center justify-center",children:i!=null&&i.email?e.jsx("span",{className:"text-white font-semibold text-sm",children:i.email.charAt(0).toUpperCase()}):e.jsx("img",{src:"/images/user/owner.jpg",alt:"User"})}),e.jsx("span",{className:"block mr-1 font-medium text-theme-sm",children:(i==null?void 0:i.username)||((b=i==null?void 0:i.email)==null?void 0:b.split("@")[0])||"User"}),e.jsx("svg",{className:`stroke-gray-500 dark:stroke-gray-400 transition-transform duration-200 ${t?"rotate-180":""}`,width:"18",height:"20",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M4.3125 8.65625L9 13.3437L13.6875 8.65625",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.jsxs(G,{isOpen:t,onClose:c,className:"absolute right-0 mt-[17px] flex w-[260px] flex-col rounded-2xl border border-gray-200 bg-white p-3 shadow-theme-lg dark:border-gray-800 dark:bg-gray-dark",children:[e.jsxs("div",{children:[e.jsx("span",{className:"block font-medium text-gray-700 text-theme-sm dark:text-gray-400",children:(i==null?void 0:i.username)||"User"}),e.jsx("span",{className:"mt-0.5 block text-theme-xs text-gray-500 dark:text-gray-400",children:(i==null?void 0:i.email)||"No email"}),(i==null?void 0:i.role)&&e.jsx("span",{className:"mt-1 inline-block px-2 py-0.5 text-xs font-medium text-brand-600 bg-brand-50 rounded dark:text-brand-400 dark:bg-brand-900/20",children:i.role})]}),e.jsxs("ul",{className:"flex flex-col gap-1 pt-4 pb-3 border-b border-gray-200 dark:border-gray-800",children:[e.jsx("li",{children:e.jsxs(I,{onItemClick:c,tag:"a",to:"/profile",className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg group text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"fill-gray-500 group-hover:fill-gray-700 dark:fill-gray-400 dark:group-hover:fill-gray-300",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 14.1526 4.3002 16.1184 5.61936 17.616C6.17279 15.3096 8.24852 13.5955 10.7246 13.5955H13.2746C15.7509 13.5955 17.8268 15.31 18.38 17.6167C19.6996 16.119 20.5 14.153 20.5 12C20.5 7.30558 16.6944 3.5 12 3.5ZM17.0246 18.8566V18.8455C17.0246 16.7744 15.3457 15.0955 13.2746 15.0955H10.7246C8.65354 15.0955 6.97461 16.7744 6.97461 18.8455V18.856C8.38223 19.8895 10.1198 20.5 12 20.5C13.8798 20.5 15.6171 19.8898 17.0246 18.8566ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM11.9991 7.25C10.8847 7.25 9.98126 8.15342 9.98126 9.26784C9.98126 10.3823 10.8847 11.2857 11.9991 11.2857C13.1135 11.2857 14.0169 10.3823 14.0169 9.26784C14.0169 8.15342 13.1135 7.25 11.9991 7.25ZM8.48126 9.26784C8.48126 7.32499 10.0563 5.75 11.9991 5.75C13.9419 5.75 15.5169 7.32499 15.5169 9.26784C15.5169 11.2107 13.9419 12.7857 11.9991 12.7857C10.0563 12.7857 8.48126 11.2107 8.48126 9.26784Z",fill:""})}),"Edit profile"]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:c,tag:"a",to:"/profile",className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg group text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"fill-gray-500 group-hover:fill-gray-700 dark:fill-gray-400 dark:group-hover:fill-gray-300",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4858 3.5L13.5182 3.5C13.9233 3.5 14.2518 3.82851 14.2518 4.23377C14.2518 5.9529 16.1129 7.02795 17.602 6.1682C17.9528 5.96567 18.4014 6.08586 18.6039 6.43667L20.1203 9.0631C20.3229 9.41407 20.2027 9.86286 19.8517 10.0655C18.3625 10.9253 18.3625 13.0747 19.8517 13.9345C20.2026 14.1372 20.3229 14.5859 20.1203 14.9369L18.6039 17.5634C18.4013 17.9142 17.9528 18.0344 17.602 17.8318C16.1129 16.9721 14.2518 18.0471 14.2518 19.7663C14.2518 20.1715 13.9233 20.5 13.5182 20.5H10.4858C10.0804 20.5 9.75182 20.1714 9.75182 19.766C9.75182 18.0461 7.88983 16.9717 6.40067 17.8314C6.04945 18.0342 5.60037 17.9139 5.39767 17.5628L3.88167 14.937C3.67903 14.586 3.79928 14.1372 4.15026 13.9346C5.63949 13.0748 5.63946 10.9253 4.15025 10.0655C3.79926 9.86282 3.67901 9.41401 3.88165 9.06303L5.39764 6.43725C5.60034 6.08617 6.04943 5.96581 6.40065 6.16858C7.88982 7.02836 9.75182 5.9539 9.75182 4.23399C9.75182 3.82862 10.0804 3.5 10.4858 3.5ZM13.5182 2L10.4858 2C9.25201 2 8.25182 3.00019 8.25182 4.23399C8.25182 4.79884 7.64013 5.15215 7.15065 4.86955C6.08213 4.25263 4.71559 4.61859 4.0986 5.68725L2.58261 8.31303C1.96575 9.38146 2.33183 10.7477 3.40025 11.3645C3.88948 11.647 3.88947 12.3531 3.40026 12.6355C2.33184 13.2524 1.96578 14.6186 2.58263 15.687L4.09863 18.3128C4.71562 19.3814 6.08215 19.7474 7.15067 19.1305C7.64015 18.8479 8.25182 19.2012 8.25182 19.766C8.25182 20.9998 9.25201 22 10.4858 22H13.5182C14.7519 22 15.7518 20.9998 15.7518 19.7663C15.7518 19.2015 16.3632 18.8487 16.852 19.1309C17.9202 19.7476 19.2862 19.3816 19.9029 18.3134L21.4193 15.6869C22.0361 14.6185 21.6701 13.2523 20.6017 12.6355C20.1125 12.3531 20.1125 11.647 20.6017 11.3645C21.6701 10.7477 22.0362 9.38152 21.4193 8.3131L19.903 5.68667C19.2862 4.61842 17.9202 4.25241 16.852 4.86917C16.3632 5.15138 15.7518 4.79856 15.7518 4.23377C15.7518 3.00024 14.7519 2 13.5182 2ZM9.6659 11.9999C9.6659 10.7103 10.7113 9.66493 12.0009 9.66493C13.2905 9.66493 14.3359 10.7103 14.3359 11.9999C14.3359 13.2895 13.2905 14.3349 12.0009 14.3349C10.7113 14.3349 9.6659 13.2895 9.6659 11.9999ZM12.0009 8.16493C9.88289 8.16493 8.1659 9.88191 8.1659 11.9999C8.1659 14.1179 9.88289 15.8349 12.0009 15.8349C14.1189 15.8349 15.8359 14.1179 15.8359 11.9999C15.8359 9.88191 14.1189 8.16493 12.0009 8.16493Z",fill:""})}),"Account settings"]})}),e.jsx("li",{children:e.jsxs(I,{onItemClick:c,tag:"a",to:"/profile",className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg group text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"fill-gray-500 group-hover:fill-gray-700 dark:fill-gray-400 dark:group-hover:fill-gray-300",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 12C3.5 7.30558 7.30558 3.5 12 3.5C16.6944 3.5 20.5 7.30558 20.5 12C20.5 16.6944 16.6944 20.5 12 20.5C7.30558 20.5 3.5 16.6944 3.5 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM11.0991 7.52507C11.0991 8.02213 11.5021 8.42507 11.9991 8.42507H12.0001C12.4972 8.42507 12.9001 8.02213 12.9001 7.52507C12.9001 7.02802 12.4972 6.62507 12.0001 6.62507H11.9991C11.5021 6.62507 11.0991 7.02802 11.0991 7.52507ZM12.0001 17.3714C11.5859 17.3714 11.2501 17.0356 11.2501 16.6214V10.9449C11.2501 10.5307 11.5859 10.1949 12.0001 10.1949C12.4143 10.1949 12.7501 10.5307 12.7501 10.9449V16.6214C12.7501 17.0356 12.4143 17.3714 12.0001 17.3714Z",fill:""})}),"Support"]})})]}),e.jsxs("button",{onClick:m,className:"flex items-center gap-3 px-3 py-2 mt-3 font-medium text-gray-700 rounded-lg group text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300 w-full text-left",children:[e.jsx("svg",{className:"fill-gray-500 group-hover:fill-gray-700 dark:group-hover:fill-gray-300",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1007 19.247C14.6865 19.247 14.3507 18.9112 14.3507 18.497L14.3507 14.245H12.8507V18.497C12.8507 19.7396 13.8581 20.747 15.1007 20.747H18.5007C19.7434 20.747 20.7507 19.7396 20.7507 18.497L20.7507 5.49609C20.7507 4.25345 19.7433 3.24609 18.5007 3.24609H15.1007C13.8581 3.24609 12.8507 4.25345 12.8507 5.49609V9.74501L14.3507 9.74501V5.49609C14.3507 5.08188 14.6865 4.74609 15.1007 4.74609L18.5007 4.74609C18.9149 4.74609 19.2507 5.08188 19.2507 5.49609L19.2507 18.497C19.2507 18.9112 18.9149 19.247 18.5007 19.247H15.1007ZM3.25073 11.9984C3.25073 12.2144 3.34204 12.4091 3.48817 12.546L8.09483 17.1556C8.38763 17.4485 8.86251 17.4487 9.15549 17.1559C9.44848 16.8631 9.44863 16.3882 9.15583 16.0952L5.81116 12.7484L16.0007 12.7484C16.4149 12.7484 16.7507 12.4127 16.7507 11.9984C16.7507 11.5842 16.4149 11.2484 16.0007 11.2484L5.81528 11.2484L9.15585 7.90554C9.44864 7.61255 9.44847 7.13767 9.15547 6.84488C8.86248 6.55209 8.3876 6.55226 8.09481 6.84525L3.52309 11.4202C3.35673 11.5577 3.25073 11.7657 3.25073 11.9984Z",fill:""})}),"Sign out"]})]})]})}const Se=()=>{const{metrics:t}=fe();return!t||t.length===0?null:e.jsx("div",{className:"igny8-header-metrics hidden lg:flex",children:t.map((l,n)=>e.jsxs(Y.Fragment,{children:[e.jsxs("div",{className:"igny8-header-metric",children:[e.jsx("div",{className:`igny8-header-metric-accent ${l.accentColor}`}),e.jsx("span",{className:"igny8-header-metric-label",children:l.label}),e.jsx("span",{className:"igny8-header-metric-value",children:typeof l.value=="number"?l.value.toLocaleString():l.value})]}),n<t.length-1&&e.jsx("div",{className:"igny8-header-metric-separator"})]},n))})};function Le(){const{user:t}=L(),[l,n]=s.useState(!1),i=(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="developer";s.useEffect(()=>{if(i){const d=localStorage.getItem("debug_resource_tracking_enabled");n(d==="true")}},[i]);const u=()=>{const d=!l;n(d),localStorage.setItem("debug_resource_tracking_enabled",String(d)),window.dispatchEvent(new CustomEvent("debug-resource-tracking-toggle",{detail:d}))};return i?e.jsx("button",{onClick:u,className:`flex items-center justify-center w-10 h-10 rounded-lg transition-colors ${l?"bg-red-100 text-red-600 dark:bg-red-900/30 dark:text-red-400":"text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800"}`,title:l?"Disable Resource Debug":"Enable Resource Debug",children:"🔍"}):null}const Ie=()=>{const[t,l]=s.useState(!1),{isMobileOpen:n,toggleSidebar:i,toggleMobileSidebar:u}=O(),d=()=>{window.innerWidth>=1024?i():u()},c=()=>{l(!t)},m=s.useRef(null);return s.useEffect(()=>{const b=f=>{var v;(f.metaKey||f.ctrlKey)&&f.key==="k"&&(f.preventDefault(),(v=m.current)==null||v.focus())};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[]),e.jsx("header",{className:"sticky top-0 flex w-full bg-white border-gray-200 z-99999 dark:border-gray-800 dark:bg-gray-900 lg:border-b",children:e.jsxs("div",{className:"flex flex-col items-center justify-between grow lg:flex-row lg:px-6",children:[e.jsxs("div",{className:"flex items-center justify-between w-full gap-2 px-3 py-3 border-b border-gray-200 dark:border-gray-800 sm:gap-4 lg:justify-normal lg:border-b-0 lg:px-0 lg:py-4",children:[e.jsx("button",{className:"items-center justify-center w-10 h-10 text-gray-500 border-gray-200 rounded-lg z-99999 dark:border-gray-800 lg:flex dark:text-gray-400 lg:h-11 lg:w-11 lg:border",onClick:d,"aria-label":"Toggle Sidebar",children:n?e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.21967 7.28131C5.92678 6.98841 5.92678 6.51354 6.21967 6.22065C6.51256 5.92775 6.98744 5.92775 7.28033 6.22065L11.999 10.9393L16.7176 6.22078C17.0105 5.92789 17.4854 5.92788 17.7782 6.22078C18.0711 6.51367 18.0711 6.98855 17.7782 7.28144L13.0597 12L17.7782 16.7186C18.0711 17.0115 18.0711 17.4863 17.7782 17.7792C17.4854 18.0721 17.0105 18.0721 16.7176 17.7792L11.999 13.0607L7.28033 17.7794C6.98744 18.0722 6.51256 18.0722 6.21967 17.7794C5.92678 17.4865 5.92678 17.0116 6.21967 16.7187L10.9384 12L6.21967 7.28131Z",fill:"currentColor"})}):e.jsx("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.583252 1C0.583252 0.585788 0.919038 0.25 1.33325 0.25H14.6666C15.0808 0.25 15.4166 0.585786 15.4166 1C15.4166 1.41421 15.0808 1.75 14.6666 1.75L1.33325 1.75C0.919038 1.75 0.583252 1.41422 0.583252 1ZM0.583252 11C0.583252 10.5858 0.919038 10.25 1.33325 10.25L14.6666 10.25C15.0808 10.25 15.4166 10.5858 15.4166 11C15.4166 11.4142 15.0808 11.75 14.6666 11.75L1.33325 11.75C0.919038 11.75 0.583252 11.4142 0.583252 11ZM1.33325 5.25C0.919038 5.25 0.583252 5.58579 0.583252 6C0.583252 6.41421 0.919038 6.75 1.33325 6.75L7.99992 6.75C8.41413 6.75 8.74992 6.41421 8.74992 6C8.74992 5.58579 8.41413 5.25 7.99992 5.25L1.33325 5.25Z",fill:"currentColor"})})}),e.jsxs(V,{to:"/",className:"lg:hidden",children:[e.jsx("img",{className:"dark:hidden",src:"./images/logo/logo.svg",alt:"Logo"}),e.jsx("img",{className:"hidden dark:block",src:"./images/logo/logo-dark.svg",alt:"Logo"})]}),e.jsx("button",{onClick:c,className:"flex items-center justify-center w-10 h-10 text-gray-700 rounded-lg z-99999 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 lg:hidden",children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99902 10.4951C6.82745 10.4951 7.49902 11.1667 7.49902 11.9951V12.0051C7.49902 12.8335 6.82745 13.5051 5.99902 13.5051C5.1706 13.5051 4.49902 12.8335 4.49902 12.0051V11.9951C4.49902 11.1667 5.1706 10.4951 5.99902 10.4951ZM17.999 10.4951C18.8275 10.4951 19.499 11.1667 19.499 11.9951V12.0051C19.499 12.8335 18.8275 13.5051 17.999 13.5051C17.1706 13.5051 16.499 12.8335 16.499 12.0051V11.9951C16.499 11.1667 17.1706 10.4951 17.999 10.4951ZM13.499 11.9951C13.499 11.1667 12.8275 10.4951 11.999 10.4951C11.1706 10.4951 10.499 11.1667 10.499 11.9951V12.0051C10.499 12.8335 11.1706 13.5051 11.999 13.5051C12.8275 13.5051 13.499 12.8335 13.499 12.0051V11.9951Z",fill:"currentColor"})})}),e.jsx("div",{className:"hidden lg:block",children:e.jsx("form",{children:e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute -translate-y-1/2 pointer-events-none left-4 top-1/2",children:e.jsx("svg",{className:"fill-gray-500 dark:fill-gray-400",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.04175 9.37363C3.04175 5.87693 5.87711 3.04199 9.37508 3.04199C12.8731 3.04199 15.7084 5.87693 15.7084 9.37363C15.7084 12.8703 12.8731 15.7053 9.37508 15.7053C5.87711 15.7053 3.04175 12.8703 3.04175 9.37363ZM9.37508 1.54199C5.04902 1.54199 1.54175 5.04817 1.54175 9.37363C1.54175 13.6991 5.04902 17.2053 9.37508 17.2053C11.2674 17.2053 13.003 16.5344 14.357 15.4176L17.177 18.238C17.4699 18.5309 17.9448 18.5309 18.2377 18.238C18.5306 17.9451 18.5306 17.4703 18.2377 17.1774L15.418 14.3573C16.5365 13.0033 17.2084 11.2669 17.2084 9.37363C17.2084 5.04817 13.7011 1.54199 9.37508 1.54199Z",fill:""})})}),e.jsx("input",{ref:m,type:"text",placeholder:"Search or type command...",className:"dark:bg-dark-900 h-11 w-full rounded-lg border border-gray-200 bg-transparent py-2.5 pl-12 pr-14 text-sm text-gray-800 shadow-theme-xs placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-800 dark:bg-gray-900 dark:bg-white/[0.03] dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800 xl:w-[430px]"}),e.jsxs("button",{className:"absolute right-2.5 top-1/2 inline-flex -translate-y-1/2 items-center gap-0.5 rounded-lg border border-gray-200 bg-gray-50 px-[7px] py-[4.5px] text-xs -tracking-[0.2px] text-gray-500 dark:border-gray-800 dark:bg-white/[0.03] dark:text-gray-400",children:[e.jsx("span",{children:" ⌘ "}),e.jsx("span",{children:" K "})]})]})})})]}),e.jsxs("div",{className:`${t?"flex":"hidden"} items-center justify-between w-full gap-4 px-5 py-4 lg:flex shadow-theme-md lg:justify-end lg:px-0 lg:shadow-none`,children:[e.jsxs("div",{className:"flex items-center gap-2 2xsm:gap-3",children:[e.jsx(Se,{}),e.jsx(Ce,{}),e.jsx(Le,{}),e.jsx(Ne,{})]}),e.jsx(Ee,{})]})]})})},Re=()=>{const{isMobileOpen:t,toggleMobileSidebar:l}=O();return t?e.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900/50 lg:hidden",onClick:l}):null};function Te(){return e.jsx("div",{className:`
|
||
mx-auto mb-10 w-full max-w-60 rounded-2xl bg-blue-50 px-4 py-5 text-center dark:bg-blue-900/20`,children:e.jsxs("ul",{className:"space-y-1 text-sm text-gray-700 dark:text-gray-300",children:[e.jsx("li",{children:"Infinite."}),e.jsx("li",{children:"Writing."}),e.jsx("li",{children:"Refreshing."}),e.jsx("li",{children:"Ranking."})]})})}const Ae="1.0.0",Pe=()=>{var w;const{isExpanded:t,isMobileOpen:l,isHovered:n,setIsHovered:i}=O(),u=B(),{user:d}=L(),c=((w=d==null?void 0:d.account)==null?void 0:w.slug)==="aws-admin"||(d==null?void 0:d.role)==="developer",[m,b]=s.useState(null),[f,v]=s.useState({}),_=s.useRef({}),g=s.useCallback(o=>u.pathname===o,[u.pathname]),E=s.useMemo(()=>[{label:"OVERVIEW",items:[{icon:e.jsx(le,{}),name:"Dashboard",path:"/"},{icon:e.jsx(F,{}),name:"Industry / Sectors",path:"/reference/industries"}]},{label:"WORKFLOWS",items:[{icon:e.jsx(z,{}),name:"Setup",subItems:[{name:"Sites",path:"/settings/sites"},{name:"Keywords Opportunities",path:"/planner/keyword-opportunities"}]},{icon:e.jsx(oe,{}),name:"Planner",subItems:[{name:"Dashboard",path:"/planner"},{name:"Keywords",path:"/planner/keywords"},{name:"Clusters",path:"/planner/clusters"},{name:"Ideas",path:"/planner/ideas"}]},{icon:e.jsx(ie,{}),name:"Writer",subItems:[{name:"Dashboard",path:"/writer"},{name:"Tasks",path:"/writer/tasks"},{name:"Content",path:"/writer/content"},{name:"Images",path:"/writer/images"},{name:"Published",path:"/writer/published"}]},{icon:e.jsx(U,{}),name:"Thinker",subItems:[{name:"Dashboard",path:"/thinker"},{name:"Prompts",path:"/thinker/prompts"},{name:"Author Profiles",path:"/thinker/author-profiles"},{name:"Strategies",path:"/thinker/strategies"},{name:"Image Testing",path:"/thinker/image-testing"}]},{icon:e.jsx(de,{}),name:"Schedules",path:"/schedules"}]},{label:"ACCOUNT & SETTINGS",items:[{icon:e.jsx(z,{}),name:"Settings",subItems:[{name:"General",path:"/settings"},{name:"Plans",path:"/settings/plans"},{name:"Integration",path:"/settings/integration"},{name:"Import / Export",path:"/settings/import-export"}]},{icon:e.jsx(ce,{}),name:"Billing",subItems:[{name:"Credits",path:"/billing/credits"},{name:"Transactions",path:"/billing/transactions"},{name:"Usage",path:"/billing/usage"}]}]},{label:"HELP",items:[{icon:e.jsx(F,{}),name:"Help & Documentation",path:"/help"}]}],[]),R=s.useMemo(()=>({label:"ADMIN",items:[{icon:e.jsx(z,{}),name:"User Management",subItems:[{name:"Users",path:"/settings/users"},{name:"Subscriptions",path:"/settings/subscriptions"}]},{icon:e.jsx(z,{}),name:"Configuration",subItems:[{name:"System Settings",path:"/settings/system"},{name:"Account Settings",path:"/settings/account"},{name:"Module Settings",path:"/settings/modules"}]},{icon:e.jsx(U,{}),name:"AI Controls",subItems:[{name:"AI Settings",path:"/settings/ai"}]},{icon:e.jsx(me,{}),name:"System Health",subItems:[{name:"Status",path:"/settings/status"}]},{icon:e.jsx(F,{}),name:"Testing Tools",subItems:[{name:"Function Testing",path:"/help/function-testing"},{name:"System Testing",path:"/help/system-testing"}]},{icon:e.jsx(ue,{}),name:"UI Elements",subItems:[{name:"Alerts",path:"/ui-elements/alerts"},{name:"Avatar",path:"/ui-elements/avatars"},{name:"Badge",path:"/ui-elements/badges"},{name:"Breadcrumb",path:"/ui-elements/breadcrumb"},{name:"Buttons",path:"/ui-elements/buttons"},{name:"Buttons Group",path:"/ui-elements/buttons-group"},{name:"Cards",path:"/ui-elements/cards"},{name:"Carousel",path:"/ui-elements/carousel"},{name:"Dropdowns",path:"/ui-elements/dropdowns"},{name:"Images",path:"/ui-elements/images"},{name:"Links",path:"/ui-elements/links"},{name:"List",path:"/ui-elements/list"},{name:"Modals",path:"/ui-elements/modals"},{name:"Notification",path:"/ui-elements/notifications"},{name:"Pagination",path:"/ui-elements/pagination"},{name:"Popovers",path:"/ui-elements/popovers"},{name:"Pricing Table",path:"/ui-elements/pricing-table"},{name:"Progressbar",path:"/ui-elements/progressbar"},{name:"Ribbons",path:"/ui-elements/ribbons"},{name:"Spinners",path:"/ui-elements/spinners"},{name:"Tabs",path:"/ui-elements/tabs"},{name:"Tooltips",path:"/ui-elements/tooltips"},{name:"Videos",path:"/ui-elements/videos"},{name:"Components",path:"/components"}]}]}),[]),C=s.useMemo(()=>c?[...E,R]:E,[c,E,R]);s.useEffect(()=>{const o=u.pathname;let h=!1;C.forEach((x,k)=>{x.items.forEach((p,N)=>{p.subItems&&!h&&p.subItems.some(P=>!!(o===P.path||P.path!=="/"&&o.startsWith(P.path+"/")))&&(b({sectionIndex:k,itemIndex:N}),h=!0)})})},[u.pathname,C]),s.useEffect(()=>{if(m!==null){const o=`${m.sectionIndex}-${m.itemIndex}`,h=requestAnimationFrame(()=>{setTimeout(()=>{const x=_.current[o];if(x){const k=x.scrollHeight;k>0&&v(p=>({...p,[o]:k}))}},50)});return()=>cancelAnimationFrame(h)}},[m]);const j=(o,h)=>{b(x=>x&&x.sectionIndex===o&&x.itemIndex===h?null:{sectionIndex:o,itemIndex:h})},y=(o,h)=>e.jsx("ul",{className:"flex flex-col gap-2",children:o.map((x,k)=>e.jsxs("li",{children:[x.subItems?e.jsxs("button",{onClick:()=>j(h,k),className:`menu-item group ${(m==null?void 0:m.sectionIndex)===h&&(m==null?void 0:m.itemIndex)===k||x.subItems&&x.subItems.some(p=>g(p.path))?"menu-item-active":"menu-item-inactive"} cursor-pointer ${!t&&!n?"lg:justify-center":"lg:justify-start"}`,children:[e.jsx("span",{className:`menu-item-icon-size ${(m==null?void 0:m.sectionIndex)===h&&(m==null?void 0:m.itemIndex)===k||x.subItems&&x.subItems.some(p=>g(p.path))?"menu-item-icon-active":"menu-item-icon-inactive"}`,children:x.icon}),(t||n||l)&&e.jsx("span",{className:"menu-item-text",children:x.name}),(t||n||l)&&e.jsx(xe,{className:`ml-auto w-5 h-5 transition-transform duration-200 ${(m==null?void 0:m.sectionIndex)===h&&(m==null?void 0:m.itemIndex)===k?"rotate-180 text-brand-500":""}`})]}):x.path&&e.jsxs(V,{to:x.path,className:`menu-item group ${g(x.path)?"menu-item-active":"menu-item-inactive"}`,children:[e.jsx("span",{className:`menu-item-icon-size ${g(x.path)?"menu-item-icon-active":"menu-item-icon-inactive"}`,children:x.icon}),(t||n||l)&&e.jsx("span",{className:"menu-item-text",children:x.name})]}),x.subItems&&(t||n||l)&&e.jsx("div",{ref:p=>{_.current[`${h}-${k}`]=p},className:"overflow-hidden transition-all duration-300",style:{height:(m==null?void 0:m.sectionIndex)===h&&(m==null?void 0:m.itemIndex)===k?`${f[`${h}-${k}`]}px`:"0px"},children:e.jsx("ul",{className:"mt-2 flex flex-col gap-1 ml-9",children:x.subItems.map(p=>e.jsx("li",{children:e.jsxs(V,{to:p.path,className:`menu-dropdown-item ${g(p.path)?"menu-dropdown-item-active":"menu-dropdown-item-inactive"}`,children:[p.name,e.jsxs("span",{className:"flex items-center gap-1 ml-auto",children:[p.new&&e.jsx("span",{className:`ml-auto ${g(p.path)?"menu-dropdown-badge-active":"menu-dropdown-badge-inactive"} menu-dropdown-badge`,children:"new"}),p.pro&&e.jsx("span",{className:`ml-auto ${g(p.path)?"menu-dropdown-badge-active":"menu-dropdown-badge-inactive"} menu-dropdown-badge`,children:"pro"})]})]})},p.name))})})]},x.name))});return e.jsxs("aside",{className:`fixed mt-16 flex flex-col lg:mt-0 top-0 px-5 left-0 bg-white dark:bg-gray-900 dark:border-gray-800 text-gray-900 h-screen transition-all duration-300 ease-in-out z-50 border-r border-gray-200
|
||
${t||l||n?"w-[290px]":"w-[90px]"}
|
||
${l?"translate-x-0":"-translate-x-full"}
|
||
lg:translate-x-0`,onMouseEnter:()=>!t&&i(!0),onMouseLeave:()=>i(!1),children:[e.jsxs("div",{className:"py-8 flex flex-col justify-center items-center gap-3",children:[e.jsx(V,{to:"/",className:"flex justify-center items-center",children:t||n||l?e.jsxs(e.Fragment,{children:[e.jsx("img",{className:"dark:hidden",src:"/images/logo/logo.svg",alt:"Logo",width:113,height:30}),e.jsx("img",{className:"hidden dark:block",src:"/images/logo/logo-dark.svg",alt:"Logo",width:113,height:30})]}):e.jsx("img",{src:"/images/logo/logo-icon.svg",alt:"Logo",width:24,height:24})}),(t||n||l)&&e.jsx("div",{className:"flex justify-center items-center",children:e.jsxs("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-900 dark:bg-gray-700 text-gray-100 dark:text-gray-300",children:["v",Ae]})})]}),e.jsxs("div",{className:"flex flex-col overflow-y-auto duration-300 ease-linear no-scrollbar",children:[e.jsx("nav",{className:"mb-6",children:e.jsx("div",{className:"flex flex-col gap-2",children:C.map((o,h)=>e.jsxs("div",{children:[e.jsx("h2",{className:`mb-4 text-xs uppercase flex leading-[20px] text-gray-400 ${!t&&!n?"lg:justify-center":"justify-start"}`,children:t||n||l?o.label:e.jsx(he,{className:"size-6"})}),y(o.items,h)]},o.label))})}),t||n||l?e.jsx(Te,{}):null]})]})},T=[],D=new Set;function H(t){const[l,n]=s.useState([]);s.useEffect(()=>{const c=()=>{n([...T])};return D.add(c),c(),()=>{D.delete(c)}},[]);const i=s.useCallback((c,m)=>{const b={message:c instanceof Error?c.message:c,source:m||t,timestamp:Date.now(),stack:c instanceof Error?c.stack:void 0};T.push(b),T.length>10&&T.shift(),D.forEach(f=>f([...T])),console.error(`[${b.source}]`,b)},[t]),u=s.useCallback(c=>{T.splice(c,1),D.forEach(m=>m([...T]))},[]),d=s.useCallback(()=>{T.length=0,D.forEach(c=>c([]))},[]);return{errors:l,addError:i,clearError:u,clearAllErrors:d}}const M=new Map,Z=new Set;function A(t,l){l?M.set(t,{source:t,startTime:Date.now(),duration:0}):M.delete(t),Z.forEach(n=>{const i=Array.from(M.values()).map(u=>({...u,duration:Date.now()-u.startTime}));n(i)})}function De(){const[t,l]=s.useState([]),{addError:n}=H("LoadingStateMonitor"),i=s.useRef(new Set),u=s.useRef(n);return s.useEffect(()=>{u.current=n},[n]),s.useEffect(()=>{const d=b=>{const f=b.filter(g=>g.duration<6e4);l(f);const v=f.filter(g=>g.duration>5e3&&!i.current.has(g.source));v.length>0&&v.forEach(g=>{i.current.add(g.source),u.current(new Error(`Loading state stuck: ${g.source} (${(g.duration/1e3).toFixed(1)}s)`),"LoadingStateMonitor")}),Array.from(i.current).filter(g=>!f.find(E=>E.source===g&&E.duration>5e3)).forEach(g=>i.current.delete(g))},c=Array.from(M.values()).map(b=>({...b,duration:Date.now()-b.startTime}));d(c),Z.add(d);const m=setInterval(()=>{const b=Array.from(M.values()).map(f=>({...f,duration:Date.now()-f.startTime}));d(b)},1e3);return()=>{Z.delete(d),clearInterval(m)}},[]),s.useEffect(()=>{const d=t.filter(c=>c.duration>1e4);d.length>0&&d.forEach(c=>{console.warn(`Auto-resetting stuck loading state: ${c.source}`),A(c.source,!1),i.current.delete(c.source)})},[t]),null}function Ve({enabled:t}){const{user:l}=L(),[n,i]=s.useState([]),[u,d]=s.useState(!1),[c,m]=s.useState(null),b=s.useRef(null),f=s.useRef([]),v=s.useRef(null),_=s.useRef(null),g=(l==null?void 0:l.role)==="admin"||(l==null?void 0:l.role)==="developer";s.useEffect(()=>{if(!t||!g){_.current&&(window.fetch=_.current,_.current=null,v.current=null);return}return m(performance.now()),_.current||(_.current=window.fetch,v.current=window.fetch.bind(window)),window.fetch=async function(...o){performance.now();const[h,x={}]=o;if((typeof h=="string"?h:h.toString()).includes("/request-metrics/"))return _.current.apply(window,o);const p=new Headers(x.headers||{});p.set("X-Debug-Resource-Tracking","true");const N=await v.current(h,{...x,headers:p});performance.now();const S=N.headers.get("X-Resource-Tracking-ID");return S&&(b.current=S,setTimeout(()=>E(S),300)),N},()=>{_.current&&(window.fetch=_.current,_.current=null,v.current=null)}},[t,g]);const E=async(o,h=0)=>{try{const x=_.current||window.fetch,{token:k}=L.getState(),p={"Content-Type":"application/json"};k&&(p.Authorization=`Bearer ${k}`);try{const N=await x.call(window,`${q}/v1/system/request-metrics/${o}/`,{method:"GET",headers:p,credentials:"include"});if(N.ok){const S=await N.json();f.current=[...f.current,S],i([...f.current])}else if(N.status===401)try{await L.getState().refreshToken();const S=L.getState().token;if(S){const P={"Content-Type":"application/json",Authorization:`Bearer ${S}`},$=await x.call(window,`${q}/v1/system/request-metrics/${o}/`,{method:"GET",headers:P,credentials:"include"});if($.ok){const X=await $.json();f.current=[...f.current,X],i([...f.current]);return}}}catch{}else return N.status===404,void 0}catch{return}}catch{return}},R=c?performance.now()-c:null,C=n.reduce((o,h)=>({elapsed_time_ms:o.elapsed_time_ms+h.elapsed_time_ms,cpu_total_ms:o.cpu_total_ms+h.cpu.total_time_ms,memory_delta_mb:o.memory_delta_mb+h.memory.delta_mb,io_read_mb:o.io_read_mb+h.io.read_mb,io_write_mb:o.io_write_mb+h.io.write_mb}),{elapsed_time_ms:0,cpu_total_ms:0,memory_delta_mb:0,io_read_mb:0,io_write_mb:0}),j=n.length>0?n.reduce((o,h)=>h.elapsed_time_ms>o.elapsed_time_ms?h:o):null,y=n.length>0?n.reduce((o,h)=>h.cpu.total_time_ms>o.cpu.total_time_ms?h:o):null,w=n.length>0?n.reduce((o,h)=>h.memory.delta_mb>o.memory.delta_mb?h:o):null;return!t||!g?null:e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>d(!u),className:"fixed bottom-4 right-4 z-[99999] bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg shadow-lg text-sm font-medium flex items-center gap-2",title:"Toggle Resource Debug Overlay",children:[e.jsx("span",{children:"🔍"}),e.jsxs("span",{children:["Debug (",n.length,")"]})]}),u&&e.jsxs("div",{className:"fixed bottom-20 right-4 z-[99998] bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-lg shadow-2xl w-[500px] max-h-[85vh] overflow-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-gray-100 dark:bg-gray-800 px-4 py-3 border-b border-gray-300 dark:border-gray-700 flex justify-between items-center",children:[e.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white",children:"Resource Debug"}),e.jsx("button",{onClick:()=>d(!1),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:"✕"})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[R&&e.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded border border-blue-200 dark:border-blue-800",children:[e.jsx("h4",{className:"font-semibold text-blue-900 dark:text-blue-200 mb-2",children:"Page Load Time"}),e.jsxs("div",{className:"text-sm text-blue-800 dark:text-blue-300",children:[R.toFixed(2)," ms"]})]}),n.length>0&&e.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded border border-yellow-200 dark:border-yellow-800",children:[e.jsx("h4",{className:"font-semibold text-yellow-900 dark:text-yellow-200 mb-2",children:"⚠️ Performance Culprits"}),e.jsxs("div",{className:"text-xs space-y-2 text-yellow-800 dark:text-yellow-300",children:[j&&e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold",children:"Slowest Request:"})," ",j.method," ",j.path,e.jsx("br",{}),e.jsxs("span",{className:"ml-4",children:["Time: ",j.elapsed_time_ms.toFixed(2)," ms"]})]}),y&&y.cpu.total_time_ms>100&&e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold",children:"Highest CPU:"})," ",y.method," ",y.path,e.jsx("br",{}),e.jsxs("span",{className:"ml-4",children:["CPU: ",y.cpu.total_time_ms.toFixed(2)," ms (System: ",y.cpu.system_percent.toFixed(1),"%)"]})]}),w&&w.memory.delta_mb>1&&e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold",children:"Highest Memory:"})," ",w.method," ",w.path,e.jsx("br",{}),e.jsxs("span",{className:"ml-4",children:["Memory: ",w.memory.delta_mb>0?"+":"",w.memory.delta_mb.toFixed(2)," MB"]})]})]})]}),n.length>0&&e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-3 rounded border border-gray-200 dark:border-gray-700",children:[e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Request Totals"}),e.jsxs("div",{className:"text-xs space-y-1 text-gray-700 dark:text-gray-300",children:[e.jsxs("div",{children:["Total Requests: ",n.length]}),e.jsxs("div",{children:["Total Time: ",C.elapsed_time_ms.toFixed(2)," ms"]}),e.jsxs("div",{children:["Total CPU Time: ",C.cpu_total_ms.toFixed(2)," ms"]}),e.jsxs("div",{children:["Total Memory Delta: ",C.memory_delta_mb>0?"+":"",C.memory_delta_mb.toFixed(2)," MB"]}),e.jsxs("div",{children:["Total I/O Read: ",C.io_read_mb.toFixed(2)," MB"]}),e.jsxs("div",{children:["Total I/O Write: ",C.io_write_mb.toFixed(2)," MB"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white",children:"All Requests (Detailed)"}),n.length===0?e.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:["No requests tracked yet. Navigate to trigger API calls.",e.jsx("br",{}),e.jsx("span",{className:"text-xs",children:"Make sure debug toggle is enabled in header."})]}):n.map((o,h)=>{const x=o.elapsed_time_ms>1e3,k=o.cpu.total_time_ms>100,p=o.memory.delta_mb>1;return e.jsxs("div",{className:`p-3 rounded border text-xs ${x||k||p?"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800":"bg-gray-50 dark:bg-gray-800 border-gray-200 dark:border-gray-700"}`,children:[e.jsxs("div",{className:"font-semibold text-gray-900 dark:text-white mb-2 flex items-center gap-2",children:[e.jsx("span",{children:o.method}),e.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate",children:o.path}),(x||k||p)&&e.jsx("span",{className:"text-red-600 dark:text-red-400 text-xs",children:"⚠️"})]}),e.jsxs("div",{className:"space-y-1 text-gray-700 dark:text-gray-300",children:[e.jsxs("div",{className:x?"font-semibold text-red-700 dark:text-red-300":"",children:["⏱️ Time: ",o.elapsed_time_ms.toFixed(2)," ms"]}),e.jsxs("div",{className:k?"font-semibold text-red-700 dark:text-red-300":"",children:["🔥 CPU: ",o.cpu.total_time_ms.toFixed(2)," ms",e.jsxs("span",{className:"text-gray-500",children:[" (User: ",o.cpu.user_time_ms.toFixed(2),"ms, System: ",o.cpu.system_time_ms.toFixed(2),"ms)"]}),e.jsx("br",{}),e.jsxs("span",{className:"ml-4 text-gray-500",children:["System CPU: ",o.cpu.system_percent.toFixed(1),"%"]})]}),e.jsxs("div",{className:p?"font-semibold text-red-700 dark:text-red-300":"",children:["💾 Memory: ",o.memory.delta_mb>0?"+":"",o.memory.delta_mb.toFixed(2)," MB",e.jsxs("span",{className:"text-gray-500",children:[" (Final RSS: ",o.memory.final_rss_mb.toFixed(2)," MB)"]}),e.jsx("br",{}),e.jsxs("span",{className:"ml-4 text-gray-500",children:["System Memory: ",o.memory.system_used_percent.toFixed(1),"%"]})]}),o.io.read_mb>0&&e.jsxs("div",{children:["📖 I/O Read: ",o.io.read_mb.toFixed(2)," MB (",o.io.read_bytes.toLocaleString()," bytes)"]}),o.io.write_mb>0&&e.jsxs("div",{children:["📝 I/O Write: ",o.io.write_mb.toFixed(2)," MB (",o.io.write_bytes.toLocaleString()," bytes)"]})]})]},h)})]}),n.length>0&&e.jsx("button",{onClick:()=>{i([]),f.current=[],m(performance.now())},className:"w-full bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white px-3 py-2 rounded text-sm",children:"Clear Metrics"})]})]})]})}const Me=()=>{const{isExpanded:t,isHovered:l,isMobileOpen:n}=O(),{loadActiveSite:i,activeSite:u}=ye(),{loadSectorsForSite:d}=_e(),{refreshUser:c,isAuthenticated:m}=L(),{addError:b}=H("AppLayout"),f=s.useRef(!1),v=s.useRef(null),_=s.useRef(!1),g=s.useRef(!1),[E,R]=s.useState(!1),C=s.useRef(0);return s.useEffect(()=>{if(!f.current&&!_.current){f.current=!0,_.current=!0,A("site-loading",!0);const j=setTimeout(()=>{_.current&&(console.error("AppLayout: Site loading timeout after 35 seconds"),A("site-loading",!1),_.current=!1,b(new Error("Site loading timeout - check network connection"),"AppLayout.loadActiveSite"))},35e3);i().catch(y=>{console.error("AppLayout: Error loading active site:",y),b(y,"AppLayout.loadActiveSite")}).finally(()=>{clearTimeout(j),A("site-loading",!1),_.current=!1})}},[]),s.useEffect(()=>{const j=(u==null?void 0:u.id)??null;if(j&&(u!=null&&u.is_active)&&j!==v.current&&!g.current){v.current=j,g.current=!0,A("sector-loading",!0);const y=setTimeout(()=>{g.current&&(console.error("AppLayout: Sector loading timeout after 35 seconds"),A("sector-loading",!1),g.current=!1,b(new Error("Sector loading timeout - check network connection"),"AppLayout.loadSectorsForSite"))},35e3);d(j).catch(w=>{w.status!==403&&w.status!==404&&(console.error("AppLayout: Error loading sectors:",w),b(w,"AppLayout.loadSectorsForSite"))}).finally(()=>{clearTimeout(y),A("sector-loading",!1),g.current=!1})}else if(j&&!(u!=null&&u.is_active)){v.current=null;const{useSectorStore:y}=require("../store/sectorStore");y.getState().clearActiveSector()}},[u==null?void 0:u.id,u==null?void 0:u.is_active]),s.useEffect(()=>{if(!m)return;const j="2.0.2",y="igny8-app-version",w=async(p=!1)=>{const N=Date.now();if(!(!p&&N-C.current<3e4))try{C.current=N,await c(),p&&localStorage.setItem(y,j)}catch(S){console.debug("User data refresh failed (non-critical):",S)}};localStorage.getItem(y)!==j?w(!0):w();const h=()=>{document.visibilityState==="visible"&&w()},x=()=>{w()},k=setInterval(()=>w(),12e4);return document.addEventListener("visibilitychange",h),window.addEventListener("focus",x),()=>{clearInterval(k),document.removeEventListener("visibilitychange",h),window.removeEventListener("focus",x)}},[m,c]),s.useEffect(()=>{const j=localStorage.getItem("debug_resource_tracking_enabled");R(j==="true");const y=w=>{R(w.detail)};return window.addEventListener("debug-resource-tracking-toggle",y),()=>{window.removeEventListener("debug-resource-tracking-toggle",y)}},[]),e.jsxs("div",{className:"min-h-screen xl:flex",children:[e.jsxs("div",{children:[e.jsx(Pe,{}),e.jsx(Re,{})]}),e.jsxs("div",{className:`flex-1 transition-all duration-300 ease-in-out ${t||l?"lg:ml-[290px]":"lg:ml-[90px]"} ${n?"ml-0":""} w-full max-w-full min-[1440px]:max-w-[90%]`,children:[e.jsx(Ie,{}),e.jsx("div",{className:"p-4 pb-20 md:p-6 md:pb-24",children:e.jsx(te,{})}),e.jsx(Ve,{enabled:E})]})]})},ze=()=>e.jsx(ve,{children:e.jsx(Me,{})});function Oe(){const{pathname:t}=B();return s.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[t]),null}function He({children:t}){const{isAuthenticated:l,loading:n}=L(),i=B(),{addError:u}=H("ProtectedRoute"),[d,c]=s.useState(!1),[m,b]=s.useState("");return s.useEffect(()=>{A("auth-loading",n)},[n]),s.useEffect(()=>{n&&(console.warn("ProtectedRoute: Loading state is true on mount, resetting immediately"),L.setState({loading:!1}))},[]),s.useEffect(()=>{if(n){const f=setTimeout(()=>{b("Authentication check is taking longer than expected. This may indicate a network or server issue."),c(!0),u(new Error("Auth loading stuck for 3 seconds"),"ProtectedRoute")},3e3),v=setTimeout(()=>{console.error("ProtectedRoute: Loading state stuck for 5 seconds, forcing reset"),L.setState({loading:!1}),c(!1)},5e3);return()=>{clearTimeout(f),clearTimeout(v)}}else c(!1)},[n,u]),n?e.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50 dark:bg-gray-900",children:e.jsxs("div",{className:"text-center max-w-md px-4",children:[e.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-brand-500 mb-4"}),e.jsx("p",{className:"text-lg font-medium text-gray-800 dark:text-white mb-2",children:"Loading..."}),d&&e.jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:[e.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-3",children:m}),e.jsx("button",{onClick:()=>{L.setState({loading:!1}),c(!1),window.location.reload()},className:"px-4 py-2 text-sm bg-yellow-600 text-white rounded hover:bg-yellow-700",children:"Retry or Reload Page"})]})]})}):l?e.jsx(e.Fragment,{children:t}):e.jsx(W,{to:"/signin",state:{from:i},replace:!0})}function Fe(){const{errors:t,clearError:l,clearAllErrors:n}=H("GlobalErrorDisplay"),[i,u]=s.useState(!1);return s.useEffect(()=>{u(t.length>0)},[t.length]),!i||t.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-[9999] max-w-md space-y-2",children:[t.map((d,c)=>e.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg shadow-lg p-4 animate-in slide-in-from-right",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-red-600 dark:text-red-400 text-lg",children:"⚠️"}),e.jsx("span",{className:"text-sm font-semibold text-red-800 dark:text-red-200",children:d.source})]}),e.jsx("p",{className:"text-sm text-red-700 dark:text-red-300 mb-2",children:d.message}),d.stack&&e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{className:"text-xs text-red-600 dark:text-red-400 cursor-pointer hover:underline",children:"Show stack trace"}),e.jsx("pre",{className:"mt-2 text-xs bg-red-100 dark:bg-red-900/40 p-2 rounded overflow-auto max-h-32",children:d.stack})]})]}),e.jsx("button",{onClick:()=>l(c),className:"text-red-600 dark:text-red-400 hover:text-red-800 dark:hover:text-red-200 text-xl leading-none","aria-label":"Dismiss error",children:"×"})]})},c)),t.length>1&&e.jsx("button",{onClick:n,className:"w-full px-3 py-2 text-xs bg-red-600 text-white rounded hover:bg-red-700",children:"Clear All Errors"})]})}const Ze=s.lazy(()=>a(()=>import("./page-dashboard-CuOyqq-s.js").then(t=>t.ah),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Be=s.lazy(()=>a(()=>import("./pages-planner-dv4ygB5K.js").then(t=>t.D),__vite__mapDeps([14,1,2,3,4,10,11,12,5,13,6,7,8,0,9,15,16,17,18,19,20,21]))),$e=s.lazy(()=>a(()=>import("./pages-planner-dv4ygB5K.js").then(t=>t.K),__vite__mapDeps([14,1,2,3,4,10,11,12,5,13,6,7,8,0,9,15,16,17,18,19,20,21]))),Ue=s.lazy(()=>a(()=>import("./pages-planner-dv4ygB5K.js").then(t=>t.C),__vite__mapDeps([14,1,2,3,4,10,11,12,5,13,6,7,8,0,9,15,16,17,18,19,20,21]))),qe=s.lazy(()=>a(()=>import("./pages-planner-dv4ygB5K.js").then(t=>t.I),__vite__mapDeps([14,1,2,3,4,10,11,12,5,13,6,7,8,0,9,15,16,17,18,19,20,21]))),Ke=s.lazy(()=>a(()=>import("./pages-planner-dv4ygB5K.js").then(t=>t.e),__vite__mapDeps([14,1,2,3,4,10,11,12,5,13,6,7,8,0,9,15,16,17,18,19,20,21]))),We=s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.D),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25]))),Ge=s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.T),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25]))),Je=s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.C),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25]))),Xe=s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.a),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25])));s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.b),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25])));const Ye=s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.I),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25]))),Qe=s.lazy(()=>a(()=>import("./pages-writer-BGmP8pSS.js").then(t=>t.P),__vite__mapDeps([22,10,1,2,3,4,11,12,5,13,6,7,8,0,9,14,15,16,17,18,19,20,21,23,24,25]))),et=s.lazy(()=>a(()=>import("./pages-thinker-C5P9qYJa.js").then(t=>t.D),__vite__mapDeps([26,1,2,3,4,6,5,7,8,0,9,10,11,12,13,14,15,16,17,18,19,20,21]))),tt=s.lazy(()=>a(()=>import("./pages-thinker-C5P9qYJa.js").then(t=>t.P),__vite__mapDeps([26,1,2,3,4,6,5,7,8,0,9,10,11,12,13,14,15,16,17,18,19,20,21]))),st=s.lazy(()=>a(()=>import("./pages-thinker-C5P9qYJa.js").then(t=>t.A),__vite__mapDeps([26,1,2,3,4,6,5,7,8,0,9,10,11,12,13,14,15,16,17,18,19,20,21]))),rt=s.lazy(()=>a(()=>import("./pages-thinker-C5P9qYJa.js").then(t=>t.a),__vite__mapDeps([26,1,2,3,4,6,5,7,8,0,9,10,11,12,13,14,15,16,17,18,19,20,21]))),at=s.lazy(()=>a(()=>import("./pages-thinker-C5P9qYJa.js").then(t=>t.S),__vite__mapDeps([26,1,2,3,4,6,5,7,8,0,9,10,11,12,13,14,15,16,17,18,19,20,21]))),nt=s.lazy(()=>a(()=>import("./pages-thinker-C5P9qYJa.js").then(t=>t.I),__vite__mapDeps([26,1,2,3,4,6,5,7,8,0,9,10,11,12,13,14,15,16,17,18,19,20,21]))),lt=s.lazy(()=>a(()=>import("./pages-billing-DLN8PjHX.js").then(t=>t.C),__vite__mapDeps([27,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16]))),ot=s.lazy(()=>a(()=>import("./pages-billing-DLN8PjHX.js").then(t=>t.T),__vite__mapDeps([27,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16]))),it=s.lazy(()=>a(()=>import("./pages-billing-DLN8PjHX.js").then(t=>t.U),__vite__mapDeps([27,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16]))),dt=s.lazy(()=>a(()=>import("./page-reference-wEKoPZ-s.js").then(t=>t.S),__vite__mapDeps([15,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16]))),ct=s.lazy(()=>a(()=>import("./page-reference-wEKoPZ-s.js").then(t=>t.I),__vite__mapDeps([15,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16]))),mt=s.lazy(()=>a(()=>import("./page-schedules.tsx-BxdZCyA5.js"),__vite__mapDeps([28,1,2,3,4,6,5,7,8,0,9,10,11,12,13]))),ut=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.G),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),ht=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.U),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),xt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.S),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),gt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.a),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),pt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.A),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),bt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.M),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),ft=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.b),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),jt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.P),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),yt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.I),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),_t=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.c),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),wt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.d),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),kt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.e),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),vt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.f),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Ct=s.lazy(()=>a(()=>import("./page-help-COTCneXr.js").then(t=>t.H),__vite__mapDeps([30,1,2,3,4,6,5,7,8,9,16,0,10,11,12,13]))),Nt=s.lazy(()=>a(()=>import("./page-help-COTCneXr.js").then(t=>t.D),__vite__mapDeps([30,1,2,3,4,6,5,7,8,9,16,0,10,11,12,13]))),Et=s.lazy(()=>a(()=>import("./page-help-COTCneXr.js").then(t=>t.S),__vite__mapDeps([30,1,2,3,4,6,5,7,8,9,16,0,10,11,12,13]))),St=s.lazy(()=>a(()=>import("./page-help-COTCneXr.js").then(t=>t.F),__vite__mapDeps([30,1,2,3,4,6,5,7,8,9,16,0,10,11,12,13]))),Lt=s.lazy(()=>a(()=>import("./page-components.tsx-4vErPdxY.js").then(t=>t.f),__vite__mapDeps([9,1,2,3,4,6,5,7,8]))),It=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.g),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Rt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.h),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Tt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.B),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),At=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.i),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Pt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.j),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Dt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.k),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Vt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.C),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Mt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.l),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),zt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.D),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Ot=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.m),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Ht=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.L),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Ft=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.n),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Zt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.o),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),K=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.N),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Bt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.p),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),$t=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.q),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Ut=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.r),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),qt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.s),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Kt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.R),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Wt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.t),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Gt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.T),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Jt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.u),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21]))),Xt=s.lazy(()=>a(()=>import("./pages-settings-thllZ7gb.js").then(t=>t.V),__vite__mapDeps([29,1,2,3,4,6,5,7,8,0,9,10,11,12,13,16,14,15,17,18,19,20,21])));function Yt(){return e.jsxs(e.Fragment,{children:[e.jsx(Fe,{}),e.jsx(De,{}),e.jsx(se,{children:e.jsxs(ae,{children:[e.jsx(Oe,{}),e.jsxs(re,{children:[e.jsx(r,{path:"/signin",element:e.jsx(ge,{})}),e.jsx(r,{path:"/signup",element:e.jsx(pe,{})}),e.jsxs(r,{element:e.jsx(He,{children:e.jsx(ze,{})}),children:[e.jsx(r,{index:!0,path:"/",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ze,{})})}),e.jsx(r,{path:"/planner",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Be,{})})}),e.jsx(r,{path:"/planner/keywords",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx($e,{})})}),e.jsx(r,{path:"/planner/clusters",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ue,{})})}),e.jsx(r,{path:"/planner/ideas",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(qe,{})})}),e.jsx(r,{path:"/writer",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(We,{})})}),e.jsx(r,{path:"/writer/tasks",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ge,{})})}),e.jsx(r,{path:"/writer/content",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Je,{})})}),e.jsx(r,{path:"/writer/content/:id",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Xe,{})})}),e.jsx(r,{path:"/writer/drafts",element:e.jsx(W,{to:"/writer/content",replace:!0})}),e.jsx(r,{path:"/writer/images",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ye,{})})}),e.jsx(r,{path:"/writer/published",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Qe,{})})}),e.jsx(r,{path:"/thinker",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(et,{})})}),e.jsx(r,{path:"/thinker/prompts",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(tt,{})})}),e.jsx(r,{path:"/thinker/author-profiles",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(st,{})})}),e.jsx(r,{path:"/thinker/profile",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(rt,{})})}),e.jsx(r,{path:"/thinker/strategies",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(at,{})})}),e.jsx(r,{path:"/thinker/image-testing",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(nt,{})})}),e.jsx(r,{path:"/billing/credits",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(lt,{})})}),e.jsx(r,{path:"/billing/transactions",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(ot,{})})}),e.jsx(r,{path:"/billing/usage",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(it,{})})}),e.jsx(r,{path:"/reference/seed-keywords",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(dt,{})})}),e.jsx(r,{path:"/planner/keyword-opportunities",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ke,{})})}),e.jsx(r,{path:"/reference/industries",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(ct,{})})}),e.jsx(r,{path:"/schedules",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(mt,{})})}),e.jsx(r,{path:"/settings",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(ut,{})})}),e.jsx(r,{path:"/settings/users",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(ht,{})})}),e.jsx(r,{path:"/settings/subscriptions",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(xt,{})})}),e.jsx(r,{path:"/settings/system",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(gt,{})})}),e.jsx(r,{path:"/settings/account",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(pt,{})})}),e.jsx(r,{path:"/settings/modules",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(bt,{})})}),e.jsx(r,{path:"/settings/ai",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(ft,{})})}),e.jsx(r,{path:"/settings/plans",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(jt,{})})}),e.jsx(r,{path:"/settings/industries",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(yt,{})})}),e.jsx(r,{path:"/settings/status",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(_t,{})})}),e.jsx(r,{path:"/settings/integration",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(wt,{})})}),e.jsx(r,{path:"/settings/sites",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(kt,{})})}),e.jsx(r,{path:"/settings/import-export",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(vt,{})})}),e.jsx(r,{path:"/help",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ct,{})})}),e.jsx(r,{path:"/help/docs",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Nt,{})})}),e.jsx(r,{path:"/help/system-testing",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Et,{})})}),e.jsx(r,{path:"/help/function-testing",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(St,{})})}),e.jsx(r,{path:"/ui-elements/alerts",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(It,{})})}),e.jsx(r,{path:"/ui-elements/avatars",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Rt,{})})}),e.jsx(r,{path:"/ui-elements/badges",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Tt,{})})}),e.jsx(r,{path:"/ui-elements/breadcrumb",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(At,{})})}),e.jsx(r,{path:"/ui-elements/buttons",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Pt,{})})}),e.jsx(r,{path:"/ui-elements/buttons-group",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Dt,{})})}),e.jsx(r,{path:"/ui-elements/cards",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Vt,{})})}),e.jsx(r,{path:"/ui-elements/carousel",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Mt,{})})}),e.jsx(r,{path:"/ui-elements/dropdowns",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(zt,{})})}),e.jsx(r,{path:"/ui-elements/images",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ot,{})})}),e.jsx(r,{path:"/ui-elements/links",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ht,{})})}),e.jsx(r,{path:"/ui-elements/list",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ft,{})})}),e.jsx(r,{path:"/ui-elements/modals",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Zt,{})})}),e.jsx(r,{path:"/ui-elements/notifications",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(K,{})})}),e.jsx(r,{path:"/ui-elements/pagination",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Bt,{})})}),e.jsx(r,{path:"/ui-elements/popovers",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx($t,{})})}),e.jsx(r,{path:"/ui-elements/pricing-table",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Ut,{})})}),e.jsx(r,{path:"/ui-elements/progressbar",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(qt,{})})}),e.jsx(r,{path:"/ui-elements/ribbons",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Kt,{})})}),e.jsx(r,{path:"/ui-elements/spinners",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Wt,{})})}),e.jsx(r,{path:"/ui-elements/tabs",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Gt,{})})}),e.jsx(r,{path:"/ui-elements/tooltips",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Jt,{})})}),e.jsx(r,{path:"/ui-elements/videos",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Xt,{})})}),e.jsx(r,{path:"/components",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(Lt,{})})}),e.jsx(r,{path:"/notifications",element:e.jsx(s.Suspense,{fallback:null,children:e.jsx(K,{})})})]}),e.jsx(r,{path:"*",element:e.jsx(ke,{})})]})]})})]})}class Qt extends s.Component{constructor(l){super(l),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(l){return{hasError:!0,error:l,errorInfo:null}}componentDidCatch(l,n){console.error("ErrorBoundary caught an error:",l,n),this.setState({error:l,errorInfo:n})}render(){var l;return this.state.hasError?this.props.fallback?this.props.fallback:e.jsx("div",{className:"flex items-center justify-center min-h-screen p-6",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("h2",{className:"text-2xl font-semibold text-gray-800 dark:text-white mb-4",children:"Something went wrong"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:((l=this.state.error)==null?void 0:l.message)||"An unexpected error occurred"}),e.jsx("button",{onClick:()=>{this.setState({hasError:!1,error:null,errorInfo:null}),window.location.reload()},className:"px-4 py-2 bg-primary-500 text-white rounded-lg hover:bg-primary-600",children:"Reload Page"}),!1]})}):this.props.children}}Q.createRoot(document.getElementById("root")).render(e.jsx(s.StrictMode,{children:e.jsx(Qt,{children:e.jsx(be,{children:e.jsx(je,{children:e.jsx(we,{children:e.jsx(Yt,{})})})})})}));
|