diff --git a/backend/igny8_core/modules/planner/migrations/0007_merge_20251109_2138.py b/backend/igny8_core/modules/planner/migrations/0007_merge_20251109_2138.py new file mode 100644 index 00000000..8acb16e2 --- /dev/null +++ b/backend/igny8_core/modules/planner/migrations/0007_merge_20251109_2138.py @@ -0,0 +1,14 @@ +# Generated by Django 5.2.8 on 2025-11-09 21:38 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('planner', '0004_add_seed_keyword_to_keywords'), + ('planner', '0006_add_seed_keyword_to_keywords'), + ] + + operations = [ + ] diff --git a/frontend/dist/assets/css/index-BWNRswks.css b/frontend/dist/assets/css/index-BWNRswks.css new file mode 100644 index 00000000..793cd5a7 --- /dev/null +++ b/frontend/dist/assets/css/index-BWNRswks.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap"layer(base);/*! tailwindcss v4.0.8 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-orange-50:#fff6ed;--color-orange-400:#fd853a;--color-orange-500:#fb6514;--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-500:oklch(.769 .188 70.08);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-500:oklch(.627 .265 303.9);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-gray-50:#f9fafb;--color-gray-100:#f2f4f7;--color-gray-200:#e4e7ec;--color-gray-300:#d0d5dd;--color-gray-400:#98a2b3;--color-gray-500:#667085;--color-gray-600:#475467;--color-gray-700:#344054;--color-gray-800:#1d2939;--color-gray-900:#101828;--color-black:#101828;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--font-outfit:Outfit,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--text-title-2xl:72px;--text-title-2xl--line-height:90px;--text-title-md:36px;--text-title-md--line-height:44px;--text-title-sm:30px;--text-title-sm--line-height:38px;--text-theme-xl:20px;--text-theme-xl--line-height:30px;--text-theme-sm:14px;--text-theme-sm--line-height:20px;--text-theme-xs:12px;--text-theme-xs--line-height:18px;--color-brand-50:#ecf3ff;--color-brand-100:#dde9ff;--color-brand-300:#9cb9ff;--color-brand-400:#7592ff;--color-brand-500:#0693e3;--color-brand-600:#0472b8;--color-brand-800:#252dae;--color-brand-900:#262e89;--color-brand-950:#161950;--color-blue-light-50:#f0f9ff;--color-blue-light-100:#e0f2fe;--color-blue-light-200:#b9e6fe;--color-blue-light-300:#7cd4fd;--color-blue-light-400:#36bffa;--color-blue-light-500:#0ba5ec;--color-blue-light-600:#0086c9;--color-gray-dark:#1a2231;--color-success-50:#ecfdf3;--color-success-100:#d1fadf;--color-success-200:#a6f4c5;--color-success-300:#6ce9a6;--color-success-400:#32d583;--color-success-500:#12b76a;--color-success-600:#039855;--color-success-800:#05603a;--color-error-50:#fef3f2;--color-error-100:#fee4e2;--color-error-200:#fecdca;--color-error-300:#fda29b;--color-error-400:#f97066;--color-error-500:#f04438;--color-error-600:#d92d20;--color-error-800:#912018;--color-warning-50:#fffaeb;--color-warning-100:#fef0c7;--color-warning-200:#fedf89;--color-warning-500:#f79009;--color-warning-600:#dc6803;--z-index-1:1;--z-index-999:999;--z-index-99999:99999}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}body{z-index:var(--z-index-1);background-color:var(--color-gray-50);font-family:var(--font-outfit);--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal);position:relative}}@layer components;@layer utilities{.\@container,.\@container-\[inline-size\]{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.menu-item{align-items:center;gap:calc(var(--spacing)*3);border-radius:var(--radius-lg);width:100%;padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2);font-size:var(--text-theme-sm);line-height:var(--tw-leading,var(--text-theme-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);display:flex;position:relative}.menu-dropdown-item{align-items:center;gap:calc(var(--spacing)*3);border-radius:var(--radius-lg);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2.5);font-size:var(--text-theme-sm);line-height:var(--tw-leading,var(--text-theme-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);display:flex;position:relative}.\!fixed{position:fixed!important}.\!relative{position:relative!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing)*-1)}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.end-1{inset-inline-end:calc(var(--spacing)*1)}.end-2{inset-inline-end:calc(var(--spacing)*2)}.-top-7{top:calc(var(--spacing)*-7)}.top-0{top:calc(var(--spacing)*0)}.top-0\.5{top:calc(var(--spacing)*.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-6{top:calc(var(--spacing)*6)}.top-full{top:100%}.-right-\[240px\]{right:-240px}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-2\.5{right:calc(var(--spacing)*2.5)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.right-6{right:calc(var(--spacing)*6)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.-left-9{left:calc(var(--spacing)*-9)}.-left-px{left:-1px}.left-0{left:calc(var(--spacing)*0)}.left-0\.5{left:calc(var(--spacing)*.5)}.left-1\/2{left:50%}.left-4{left:calc(var(--spacing)*4)}.left-full{left:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-1{z-index:calc(var(--z-index-1)*-1)}.z-1{z-index:var(--z-index-1)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-999{z-index:var(--z-index-999)}.z-99999{z-index:var(--z-index-99999)}.z-\[9999\]{z-index:9999}.z-\[99998\]{z-index:99998}.z-\[99999\]{z-index:99999}.z-\[999999\]{z-index:999999}.z-auto{z-index:auto}.order-2{order:2}.order-3{order:3}.order-first{order:-9999}.order-last{order:9999}.order-none{order:0}.col-auto{grid-column:auto}.col-span-2{grid-column:span 2/span 2}.col-span-12{grid-column:span 12/span 12}.col-span-full{grid-column:1/-1}.col-start-auto{grid-column-start:auto}.col-end-auto{grid-column-end:auto}.row-auto{grid-row:auto}.row-span-full{grid-row:1/-1}.row-start-auto{grid-row-start:auto}.row-end-auto{grid-row-end:auto}.float-end{float:inline-end}.float-left{float:left}.float-none{float:none}.float-right{float:right}.float-start{float:inline-start}.clear-both{clear:both}.clear-end{clear:inline-end}.clear-left{clear:left}.clear-none{clear:none}.clear-right{clear:right}.clear-start{clear:inline-start}.\!container{width:100%!important}@media (width>=375px){.\!container{max-width:375px!important}}@media (width>=425px){.\!container{max-width:425px!important}}@media (width>=640px){.\!container{max-width:640px!important}}@media (width>=768px){.\!container{max-width:768px!important}}@media (width>=1024px){.\!container{max-width:1024px!important}}@media (width>=1280px){.\!container{max-width:1280px!important}}@media (width>=1536px){.\!container{max-width:1536px!important}}@media (width>=2000px){.\!container{max-width:2000px!important}}.container{width:100%}@media (width>=375px){.container{max-width:375px}}@media (width>=425px){.container{max-width:425px}}@media (width>=640px){.container{max-width:640px}}@media (width>=768px){.container{max-width:768px}}@media (width>=1024px){.container{max-width:1024px}}@media (width>=1280px){.container{max-width:1280px}}@media (width>=1536px){.container{max-width:1536px}}@media (width>=2000px){.container{max-width:2000px}}.container\!{width:100%!important}@media (width>=375px){.container\!{max-width:375px!important}}@media (width>=425px){.container\!{max-width:425px!important}}@media (width>=640px){.container\!{max-width:640px!important}}@media (width>=768px){.container\!{max-width:768px!important}}@media (width>=1024px){.container\!{max-width:1024px!important}}@media (width>=1280px){.container\!{max-width:1280px!important}}@media (width>=1536px){.container\!{max-width:1536px!important}}@media (width>=2000px){.container\!{max-width:2000px!important}}.m-0\!{margin:calc(var(--spacing)*0)!important}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-4{margin:calc(var(--spacing)*4)}.m-48{margin:calc(var(--spacing)*48)}.m-65{margin:calc(var(--spacing)*65)}.m-97{margin:calc(var(--spacing)*97)}.-mx-4{margin-inline:calc(var(--spacing)*-4)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.-my-6{margin-block:calc(var(--spacing)*-6)}.my-2{margin-block:calc(var(--spacing)*2)}.my-6{margin-block:calc(var(--spacing)*6)}.-mt-0\.5{margin-top:calc(var(--spacing)*-.5)}.-mt-1{margin-top:calc(var(--spacing)*-1)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-7{margin-top:calc(var(--spacing)*7)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-16{margin-top:calc(var(--spacing)*16)}.mt-\[17px\]{margin-top:17px}.mt-auto{margin-top:auto}.-mr-1{margin-right:calc(var(--spacing)*-1)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-1\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.-mb-4{margin-bottom:calc(var(--spacing)*-4)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-7{margin-bottom:calc(var(--spacing)*7)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.mb-\[22px\]{margin-bottom:22px}.-ml-5{margin-left:calc(var(--spacing)*-5)}.ml-0{margin-left:calc(var(--spacing)*0)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-9{margin-left:calc(var(--spacing)*9)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.menu-dropdown-badge{padding-inline:calc(var(--spacing)*2.5);padding-block:calc(var(--spacing)*.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-brand-500);text-transform:uppercase;border-radius:3.40282e38px;display:block}.menu-dropdown-badge:is(.dark *){color:var(--color-brand-400)}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.\!block{display:block!important}.\!contents{display:contents!important}.\!grid{display:grid!important}.\!hidden{display:none!important}.\!table{display:table!important}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.field-sizing-content{field-sizing:content}.field-sizing-fixed{field-sizing:fixed}.aspect-4\/3{aspect-ratio:4/3}.aspect-21\/9{aspect-ratio:21/9}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1}.custom-scrollbar::-webkit-scrollbar{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.custom-scrollbar::-webkit-scrollbar-track{border-radius:3.40282e38px}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:3.40282e38px}.custom-scrollbar::-webkit-scrollbar-thumb:is(){background-color:var(--color-gray-700)}.menu-item-icon-size svg{width:calc(var(--spacing)*6)!important;height:calc(var(--spacing)*6)!important}.size-1{width:calc(var(--spacing)*1);height:calc(var(--spacing)*1)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-14{width:calc(var(--spacing)*14);height:calc(var(--spacing)*14)}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-9\.5{height:calc(var(--spacing)*9.5)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-48{height:calc(var(--spacing)*48)}.h-64{height:calc(var(--spacing)*64)}.h-90{height:calc(var(--spacing)*90)}.h-\[1\.5px\]{height:1.5px}.h-\[3px\]{height:3px}.h-\[25px\]{height:25px}.h-\[50px\]{height:50px}.h-\[56px\]{height:56px}.h-\[68px\]{height:68px}.h-\[212px\]{height:212px}.h-\[450px\]{height:450px}.h-\[480px\]{height:480px}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[300px\]{max-height:300px}.max-h-\[330px\]{max-height:330px}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-11{min-height:calc(var(--spacing)*11)}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9\.5{width:calc(var(--spacing)*9.5)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-40{width:calc(var(--spacing)*40)}.w-48{width:calc(var(--spacing)*48)}.w-64{width:calc(var(--spacing)*64)}.w-\[3px\]{width:3px}.w-\[23\%\]{width:23%}.w-\[25px\]{width:25px}.w-\[46px\]{width:46px}.w-\[50px\]{width:50px}.w-\[56px\]{width:56px}.w-\[68px\]{width:68px}.w-\[75\%\]{width:75%}.w-\[79\%\]{width:79%}.w-\[90px\]{width:90px}.w-\[120px\]{width:120px}.w-\[252px\]{width:252px}.w-\[260px\]{width:260px}.w-\[290px\]{width:290px}.w-\[350px\]{width:350px}.w-\[500px\]{width:500px}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-1\.5{max-width:calc(var(--spacing)*1.5)}.max-w-2{max-width:calc(var(--spacing)*2)}.max-w-2\.5{max-width:calc(var(--spacing)*2.5)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3{max-width:calc(var(--spacing)*3)}.max-w-3\.5{max-width:calc(var(--spacing)*3.5)}.max-w-4{max-width:calc(var(--spacing)*4)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6{max-width:calc(var(--spacing)*6)}.max-w-8{max-width:calc(var(--spacing)*8)}.max-w-10{max-width:calc(var(--spacing)*10)}.max-w-12{max-width:calc(var(--spacing)*12)}.max-w-14{max-width:calc(var(--spacing)*14)}.max-w-16{max-width:calc(var(--spacing)*16)}.max-w-60{max-width:calc(var(--spacing)*60)}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[242px\]{max-width:242px}.max-w-\[250px\]{max-width:250px}.max-w-\[290px\]{max-width:290px}.max-w-\[380px\]{max-width:380px}.max-w-\[385px\]{max-width:385px}.max-w-\[420px\]{max-width:420px}.max-w-\[630px\]{max-width:630px}.max-w-\[700px\]{max-width:700px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-screen{max-width:100vw}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[140px\]{min-width:140px}.min-w-\[200px\]{min-width:200px}.min-w-\[280px\]{min-width:280px}.min-w-\[320px\]{min-width:320px}.min-w-\[650px\]{min-width:650px}.min-w-\[1000px\]{min-width:1000px}.min-w-full{min-width:100%}.min-w-screen{min-width:100vw}.flex-1{flex:1}.flex-auto{flex:auto}.flex-initial{flex:0 auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.basis-auto{flex-basis:auto}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.caption-top{caption-side:top}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.origin-center{transform-origin:50%}.origin-left{transform-origin:0}.origin-right{transform-origin:100%}.origin-top{transform-origin:top}.origin-top-left{transform-origin:0 0}.origin-top-right{transform-origin:100% 0}.-translate-full{--tw-translate-x:-100%;--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-full{--tw-translate-x:100%;--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[120px\]{--tw-translate-x:120px;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-\[95\%\]{--tw-translate-y: -95% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-3d{translate:var(--tw-translate-x)var(--tw-translate-y)var(--tw-translate-z)}.translate-none{translate:none}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.scale-none{scale:none}.-rotate-45{rotate:-45deg}.rotate-180{rotate:180deg}.rotate-none{rotate:none}.transform,.transform-cpu{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.transform-none{transform:none}.animate-none{animation:none}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.resize-x{resize:horizontal}.resize-y{resize:vertical}.snap-none{scroll-snap-type:none}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.snap-proximity{--tw-scroll-snap-strictness:proximity}.snap-align-none{scroll-snap-align:none}.snap-center{scroll-snap-align:center}.snap-end{scroll-snap-align:end}.snap-start{scroll-snap-align:start}.snap-always{scroll-snap-stop:always}.snap-normal{scroll-snap-stop:normal}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.list-image-none{list-style-image:none}.appearance-auto{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-auto{columns:auto}.auto-cols-auto{grid-auto-columns:auto}.auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.auto-cols-max{grid-auto-columns:max-content}.auto-cols-min{grid-auto-columns:min-content}.grid-flow-col{grid-auto-flow:column}.grid-flow-col-dense{grid-auto-flow:column dense}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row{grid-auto-flow:row}.grid-flow-row-dense{grid-auto-flow:dense}.auto-rows-auto{grid-auto-rows:auto}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.auto-rows-max{grid-auto-rows:max-content}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-none{grid-template-columns:none}.grid-cols-subgrid{grid-template-columns:subgrid}.grid-rows-none{grid-template-rows:none}.grid-rows-subgrid{grid-template-rows:subgrid}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.place-content-around{place-content:space-around}.place-content-baseline{place-content:baseline start}.place-content-between{place-content:space-between}.place-content-center{place-content:center}.place-content-end{place-content:end}.place-content-evenly{place-content:space-evenly}.place-content-start{place-content:start}.place-content-stretch{place-content:stretch}.place-items-baseline{place-items:baseline}.place-items-center{place-items:center}.place-items-end{place-items:end}.place-items-start{place-items:start}.place-items-stretch{place-items:stretch stretch}.content-around{align-content:space-around}.content-baseline{align-content:baseline}.content-between{align-content:space-between}.content-center{align-content:center}.content-end{align-content:flex-end}.content-evenly{align-content:space-evenly}.content-normal{align-content:normal}.content-start{align-content:flex-start}.content-stretch{align-content:stretch}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-baseline{justify-content:baseline}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-evenly{justify-content:space-evenly}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.justify-items-center{justify-items:center}.justify-items-end{justify-items:end}.justify-items-normal{justify-items:normal}.justify-items-start{justify-items:start}.justify-items-stretch{justify-items:stretch}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-6{column-gap:calc(var(--spacing)*6)}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*-2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*-2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-5{row-gap:calc(var(--spacing)*5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.place-self-auto{place-self:auto}.place-self-center{place-self:center}.place-self-end{place-self:end}.place-self-start{place-self:start}.place-self-stretch{place-self:stretch stretch}.self-auto{align-self:auto}.self-baseline{align-self:baseline}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-auto{justify-self:auto}.justify-self-center{justify-self:center}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.justify-self-stretch{justify-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[10\.5px\]{border-radius:10.5px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border\!{border-style:var(--tw-border-style)!important;border-width:1px!important}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[0\.7px\]{border-style:var(--tw-border-style);border-width:.7px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[1\.25px\]{border-style:var(--tw-border-style);border-width:1.25px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-double{--tw-border-style:double;border-style:double}.border-hidden{--tw-border-style:hidden;border-style:hidden}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-light-200{border-color:var(--color-blue-light-200)}.border-blue-light-500{border-color:var(--color-blue-light-500)}.border-brand-300{border-color:var(--color-brand-300)}.border-brand-500{border-color:var(--color-brand-500)}.border-error-200{border-color:var(--color-error-200)}.border-error-500{border-color:var(--color-error-500)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-200\/50{border-color:color-mix(in oklab,var(--color-gray-200)50%,transparent)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-800{border-color:var(--color-gray-800)}.border-gray-900{border-color:var(--color-gray-900)}.border-green-200{border-color:var(--color-green-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-red-200{border-color:var(--color-red-200)}.border-success-200{border-color:var(--color-success-200)}.border-success-500{border-color:var(--color-success-500)}.border-transparent{border-color:#0000}.border-warning-200{border-color:var(--color-warning-200)}.border-warning-500{border-color:var(--color-warning-500)}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-blue-600{border-top-color:var(--color-blue-600)}.border-t-blue-light-500{border-top-color:var(--color-blue-light-500)}.border-t-brand-500{border-top-color:var(--color-brand-500)}.border-t-error-500{border-top-color:var(--color-error-500)}.border-t-gray-900{border-top-color:var(--color-gray-900)}.border-t-success-500{border-top-color:var(--color-success-500)}.border-t-warning-500{border-top-color:var(--color-warning-500)}.border-r-gray-900{border-right-color:var(--color-gray-900)}.menu-item-inactive{color:var(--color-gray-700)}@media (hover:hover){.menu-item-inactive:is(:where(.group):hover *){color:var(--color-gray-700)}.menu-item-inactive:hover{background-color:var(--color-gray-100)}}.menu-item-inactive:is(.dark *){color:var(--color-gray-300)}@media (hover:hover){.menu-item-inactive:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent);color:var(--color-gray-300)}}.menu-dropdown-item-active{background-color:var(--color-brand-50);color:var(--color-brand-500)}.menu-dropdown-item-active:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)12%,transparent);color:var(--color-brand-400)}.menu-dropdown-item-inactive{color:var(--color-gray-700)}@media (hover:hover){.menu-dropdown-item-inactive:hover{background-color:var(--color-gray-100)}}.menu-dropdown-item-inactive:is(.dark *){color:var(--color-gray-300)}@media (hover:hover){.menu-dropdown-item-inactive:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.menu-item-active{background-color:var(--color-brand-50);color:var(--color-brand-500)}.menu-item-active:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)12%,transparent);color:var(--color-brand-400)}.menu-dropdown-badge-inactive{background-color:var(--color-brand-50)}@media (hover:hover){.menu-dropdown-badge-inactive:is(:where(.group):hover *){background-color:var(--color-brand-100)}}.menu-dropdown-badge-inactive:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)15%,transparent)}@media (hover:hover){.menu-dropdown-badge-inactive:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-brand-500)20%,transparent)}}.menu-dropdown-badge-active{background-color:var(--color-brand-100)}.menu-dropdown-badge-active:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)20%,transparent)}.bg-\(--my_variable\){background-color:var(--my_variable)}.bg-\(color\:--my-color\){background-color:var(--my-color)}.bg-\[\#0088cc\]{background-color:#08c}.bg-\[\#B91C1C\]{background-color:#b91c1c}.bg-\[color\:var\(--my-color\)\]{background-color:var(--my-color)}.bg-\[var\(--my_variable\)\]{background-color:var(--my_variable)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-light-50{background-color:var(--color-blue-light-50)}.bg-blue-light-100{background-color:var(--color-blue-light-100)}.bg-blue-light-500{background-color:var(--color-blue-light-500)}.bg-brand-50{background-color:var(--color-brand-50)}.bg-brand-500{background-color:var(--color-brand-500)}.bg-brand-950{background-color:var(--color-brand-950)}.bg-error-50{background-color:var(--color-error-50)}.bg-error-100{background-color:var(--color-error-100)}.bg-error-400{background-color:var(--color-error-400)}.bg-error-500{background-color:var(--color-error-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-100\/50{background-color:color-mix(in oklab,var(--color-gray-100)50%,transparent)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-400\/50{background-color:color-mix(in oklab,var(--color-gray-400)50%,transparent)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-gray-900\/50{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/50,.bg-red-500\/\[50\%\]{background-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}.bg-red-600{background-color:var(--color-red-600)}.bg-success-50{background-color:var(--color-success-50)}.bg-success-100{background-color:var(--color-success-100)}.bg-success-500{background-color:var(--color-success-500)}.bg-success-600{background-color:var(--color-success-600)}.bg-transparent{background-color:#0000}.bg-warning-50{background-color:var(--color-warning-50)}.bg-warning-100{background-color:var(--color-warning-100)}.bg-warning-500{background-color:var(--color-warning-500)}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}.bg-white\/50{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-600{background-color:var(--color-yellow-600)}.-bg-conic,.bg-conic{--tw-gradient-position:in oklab;background-image:conic-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-radial{--tw-gradient-position:in oklab;background-image:radial-gradient(var(--tw-gradient-stops))}.bg-none{background-image:none}.via-none{--tw-gradient-via-stops:initial}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.bg-auto{background-size:auto}.bg-contain{background-size:contain}.bg-cover{background-size:cover}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-content{background-clip:content-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-bottom{background-position:bottom}.bg-center{background-position:50%}.bg-left{background-position:0}.bg-left-bottom{background-position:0 100%}.bg-left-top{background-position:0 0}.bg-right{background-position:100%}.bg-right-bottom{background-position:100% 100%}.bg-right-top{background-position:100% 0}.bg-top{background-position:top}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat{background-repeat:repeat}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-origin-border{background-origin:border-box}.bg-origin-content{background-origin:content-box}.bg-origin-padding{background-origin:padding-box}.fill-current{fill:currentColor}.fill-gray-500{fill:var(--color-gray-500)}.fill-none{fill:none}.fill-white{fill:var(--color-white)}.stroke-current{stroke:currentColor}.stroke-gray-500{stroke:var(--color-gray-500)}.stroke-none{stroke:none}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-fill{object-fit:fill}.object-none{object-fit:none}.object-scale-down{object-fit:scale-down}.object-bottom{object-position:bottom}.object-center{object-position:center}.object-left{object-position:left}.object-left-bottom{object-position:left bottom}.object-left-top{object-position:left top}.object-right{object-position:right}.object-right-bottom{object-position:right bottom}.object-right-top{object-position:right top}.object-top{object-position:top}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-3\.5{padding:calc(var(--spacing)*3.5)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-7{padding:calc(var(--spacing)*7)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.p-48{padding:calc(var(--spacing)*48)}.p-97{padding:calc(var(--spacing)*97)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-4\.5{padding-inline:calc(var(--spacing)*4.5)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-7{padding-inline:calc(var(--spacing)*7)}.px-8{padding-inline:calc(var(--spacing)*8)}.px-\[7px\]{padding-inline:7px}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\.5{padding-block:calc(var(--spacing)*3.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.py-\[4\.5px\]{padding-block:4.5px}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-10{padding-top:calc(var(--spacing)*10)}.pt-16{padding-top:calc(var(--spacing)*16)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pr-11{padding-right:calc(var(--spacing)*11)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-16{padding-right:calc(var(--spacing)*16)}.pr-\[84px\]{padding-right:84px}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-9{padding-bottom:calc(var(--spacing)*9)}.pb-11{padding-bottom:calc(var(--spacing)*11)}.pb-20{padding-bottom:calc(var(--spacing)*20)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-2\.5{padding-left:calc(var(--spacing)*2.5)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-3\.5{padding-left:calc(var(--spacing)*3.5)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-12{padding-left:calc(var(--spacing)*12)}.pl-\[62px\]{padding-left:62px}.pl-\[84px\]{padding-left:84px}.text-center{text-align:center}.text-end{text-align:end}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.align-bottom{vertical-align:bottom}.align-middle{vertical-align:middle}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.align-text-bottom{vertical-align:text-bottom}.align-text-top{vertical-align:text-top}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-theme-sm{font-size:var(--text-theme-sm);line-height:var(--tw-leading,var(--text-theme-sm--line-height))}.text-theme-xl{font-size:var(--text-theme-xl);line-height:var(--tw-leading,var(--text-theme-xl--line-height))}.text-theme-xs{font-size:var(--text-theme-xs);line-height:var(--tw-leading,var(--text-theme-xs--line-height))}.text-title-md{font-size:var(--text-title-md);line-height:var(--tw-leading,var(--text-title-md--line-height))}.text-title-sm{font-size:var(--text-title-sm);line-height:var(--tw-leading,var(--text-title-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-\[20px\]{--tw-leading:20px;line-height:20px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.-tracking-\[0\.2px\]{--tw-tracking: -.2px ;letter-spacing:-.2px}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.text-pretty{text-wrap:pretty}.text-wrap{text-wrap:wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.overflow-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-none{-webkit-hyphens:none;hyphens:none}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.menu-item-icon-inactive{color:var(--color-gray-500)}@media (hover:hover){.menu-item-icon-inactive:is(:where(.group):hover *){color:var(--color-gray-700)}}.menu-item-icon-inactive:is(.dark *){color:var(--color-gray-400)}@media (hover:hover){.menu-item-icon-inactive:is(.dark *):is(:where(.group):hover *){color:var(--color-gray-300)}}.menu-item-icon-active{color:var(--color-brand-500)}.menu-item-icon-active:is(.dark *){color:var(--color-brand-400)}.\[color\:red\]{color:red}.\[color\:red\]\/50{color:#ff000080}.\[color\:red\]\/50\!{color:#ff000080!important}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-blue-light-500{color:var(--color-blue-light-500)}.text-blue-light-600{color:var(--color-blue-light-600)}.text-brand-500{color:var(--color-brand-500)}.text-brand-600{color:var(--color-brand-600)}.text-error-500{color:var(--color-error-500)}.text-error-600{color:var(--color-error-600)}.text-gray-100{color:var(--color-gray-100)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-purple-500{color:var(--color-purple-500)}.text-purple-700{color:var(--color-purple-700)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-success-500{color:var(--color-success-500)}.text-success-600{color:var(--color-success-600)}.text-warning-500{color:var(--color-warning-500)}.text-warning-600{color:var(--color-warning-600)}.text-white{color:var(--color-white)}.text-white\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}.text-white\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}.text-white\/90{color:color-mix(in oklab,var(--color-white)90%,transparent)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-900{color:var(--color-yellow-900)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.font-stretch-condensed{font-stretch:75%}.font-stretch-expanded{font-stretch:125%}.font-stretch-extra-condensed{font-stretch:62.5%}.font-stretch-extra-expanded{font-stretch:150%}.font-stretch-normal{font-stretch:100%}.font-stretch-semi-condensed{font-stretch:87.5%}.font-stretch-semi-expanded{font-stretch:112.5%}.font-stretch-ultra-condensed{font-stretch:50%}.font-stretch-ultra-expanded{font-stretch:200%}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-dashed{text-decoration-style:dashed}.decoration-dotted{text-decoration-style:dotted}.decoration-double{text-decoration-style:double}.decoration-solid{text-decoration-style:solid}.decoration-wavy{text-decoration-style:wavy}.decoration-auto{text-decoration-thickness:auto}.decoration-from-font{text-decoration-thickness:from-font}.underline-offset-auto{text-underline-offset:auto}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.accent-auto{accent-color:auto}.scheme-dark{color-scheme:dark}.scheme-light{color-scheme:light}.scheme-light-dark{color-scheme:light dark}.scheme-normal{color-scheme:normal}.scheme-only-dark{color-scheme:dark only}.scheme-only-light{color-scheme:light only}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.opacity-100{opacity:1}.mix-blend-plus-darker{mix-blend-mode:plus-darker}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-lg{--tw-shadow:0px 12px 16px -4px var(--tw-shadow-color,#10182814),0px 4px 6px -2px var(--tw-shadow-color,#10182808);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-md{--tw-shadow:0px 4px 8px -2px var(--tw-shadow-color,#1018281a),0px 2px 4px -2px var(--tw-shadow-color,#1018280f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-sm{--tw-shadow:0px 1px 3px 0px var(--tw-shadow-color,#1018281a),0px 1px 2px 0px var(--tw-shadow-color,#1018280f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-xs{--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018280d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-3{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-initial{--tw-shadow-color:initial}.ring-brand-500\/10{--tw-ring-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.ring-gray-300{--tw-ring-color:var(--color-gray-300)}.inset-shadow-initial{--tw-inset-shadow-color:initial}.outline-hidden{outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-none{--tw-blur: ;filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-none{--tw-drop-shadow: ;filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hue-rotate-180{--tw-hue-rotate:hue-rotate(180deg);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.\!invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\[32px\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.transition-discrete{transition-behavior:allow-discrete}.transition-normal{transition-behavior:normal}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-auto{will-change:auto}.will-change-contents{will-change:contents}.will-change-scroll{will-change:scroll-position}.will-change-transform{will-change:transform}.contain-inline-size{--tw-contain-size:inline-size;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-paint{--tw-contain-paint:paint;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-size{--tw-contain-size:size;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-style{--tw-contain-style:style;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-content{contain:content}.contain-none{contain:none}.contain-strict{contain:strict}.content-none{--tw-content:none;content:none}.forced-color-adjust-auto{forced-color-adjust:auto}.forced-color-adjust-none{forced-color-adjust:none}.outline-dashed{--tw-outline-style:dashed;outline-style:dashed}.outline-dotted{--tw-outline-style:dotted;outline-style:dotted}.outline-double{--tw-outline-style:double;outline-style:double}.outline-none{--tw-outline-style:none;outline-style:none}.outline-solid{--tw-outline-style:solid;outline-style:solid}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\[a-zA-Z0-9\:\\\\-\\\\\._\$\]{a-zA-Z0-9:\\-\\.$}.\[k\:K\]{k:K}.\[vite\:css\]{vite:css}.\[vite\:html\]{vite:html}.backface-hidden{backface-visibility:hidden}.backface-visible{backface-visibility:visible}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.duration-initial{--tw-duration:initial}.ease-initial{--tw-ease:initial}.perspective-none{perspective:none}.perspective-origin-bottom{perspective-origin:bottom}.perspective-origin-bottom-left{perspective-origin:0 100%}.perspective-origin-bottom-right{perspective-origin:100% 100%}.perspective-origin-center{perspective-origin:50%}.perspective-origin-left{perspective-origin:0}.perspective-origin-right{perspective-origin:100%}.perspective-origin-top{perspective-origin:top}.perspective-origin-top-left{perspective-origin:0 0}.perspective-origin-top-right{perspective-origin:100% 0}.ring-inset{--tw-ring-inset:inset}.transform-3d{transform-style:preserve-3d}.transform-border{transform-box:border-box}.transform-content{transform-box:content-box}.transform-fill{transform-box:fill-box}.transform-flat{transform-style:flat}.transform-stroke{transform-box:stroke-box}.transform-view{transform-box:view-box}@media (hover:hover){.group-hover\:bg-amber-100:is(:where(.group):hover *){background-color:var(--color-amber-100)}.group-hover\:bg-blue-100:is(:where(.group):hover *){background-color:var(--color-blue-100)}.group-hover\:bg-green-100:is(:where(.group):hover *){background-color:var(--color-green-100)}.group-hover\:bg-purple-100:is(:where(.group):hover *){background-color:var(--color-purple-100)}.group-hover\:fill-gray-700:is(:where(.group):hover *){fill:var(--color-gray-700)}.group-hover\:text-gray-400:is(:where(.group):hover *){color:var(--color-gray-400)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\:mr-5::file-selector-button{margin-right:calc(var(--spacing)*5)}.file\:border-collapse::file-selector-button{border-collapse:collapse}.file\:cursor-pointer::file-selector-button{cursor:pointer}.file\:rounded-l-lg::file-selector-button{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:border-r::file-selector-button{border-right-style:var(--tw-border-style);border-right-width:1px}.file\:border-solid::file-selector-button{--tw-border-style:solid;border-style:solid}.file\:border-gray-200::file-selector-button{border-color:var(--color-gray-200)}.file\:bg-gray-50::file-selector-button{background-color:var(--color-gray-50)}.file\:py-3::file-selector-button{padding-block:calc(var(--spacing)*3)}.file\:pr-3::file-selector-button{padding-right:calc(var(--spacing)*3)}.file\:pl-3\.5::file-selector-button{padding-left:calc(var(--spacing)*3.5)}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:text-gray-700::file-selector-button{color:var(--color-gray-700)}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-0:before{content:var(--tw-content);top:calc(var(--spacing)*0)}.before\:top-1\/2:before{content:var(--tw-content);top:50%}.before\:top-full:before{content:var(--tw-content);top:100%}.before\:-right-4:before{content:var(--tw-content);right:calc(var(--spacing)*-4)}.before\:right-full:before{content:var(--tw-content);right:100%}.before\:bottom-full:before{content:var(--tw-content);bottom:100%}.before\:left-1\/2:before{content:var(--tw-content);left:50%}.before\:left-full:before{content:var(--tw-content);left:100%}.before\:-mt-1:before{content:var(--tw-content);margin-top:calc(var(--spacing)*-1)}.before\:-mr-1:before{content:var(--tw-content);margin-right:calc(var(--spacing)*-1)}.before\:-mb-1:before{content:var(--tw-content);margin-bottom:calc(var(--spacing)*-1)}.before\:-ml-1:before{content:var(--tw-content);margin-left:calc(var(--spacing)*-1)}.before\:-translate-x-1\/2:before{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:-translate-y-1\/2:before{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:border-4:before{content:var(--tw-content);border-style:var(--tw-border-style);border-width:4px}.before\:border-\[13px\]:before{content:var(--tw-content);border-style:var(--tw-border-style);border-width:13px}.before\:border-transparent:before{content:var(--tw-content);border-color:#0000}.before\:border-t-brand-500:before{content:var(--tw-content);border-top-color:var(--color-brand-500)}.before\:border-t-error-500:before{content:var(--tw-content);border-top-color:var(--color-error-500)}.before\:border-t-gray-900:before{content:var(--tw-content);border-top-color:var(--color-gray-900)}.before\:border-t-success-500:before{content:var(--tw-content);border-top-color:var(--color-success-500)}.before\:border-t-warning-500:before{content:var(--tw-content);border-top-color:var(--color-warning-500)}.before\:border-r-gray-900:before{content:var(--tw-content);border-right-color:var(--color-gray-900)}.before\:border-b-gray-900:before{content:var(--tw-content);border-bottom-color:var(--color-gray-900)}.before\:border-l-brand-500:before{content:var(--tw-content);border-left-color:var(--color-brand-500)}.before\:border-l-error-500:before{content:var(--tw-content);border-left-color:var(--color-error-500)}.before\:border-l-gray-900:before{content:var(--tw-content);border-left-color:var(--color-gray-900)}.before\:border-l-success-500:before{content:var(--tw-content);border-left-color:var(--color-success-500)}.before\:border-l-warning-500:before{content:var(--tw-content);border-left-color:var(--color-warning-500)}.before\:content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-right-4:after{content:var(--tw-content);right:calc(var(--spacing)*-4)}.after\:bottom-0:after{content:var(--tw-content);bottom:calc(var(--spacing)*0)}.after\:border-\[13px\]:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:13px}.after\:border-transparent:after{content:var(--tw-content);border-color:#0000}.after\:border-b-brand-500:after{content:var(--tw-content);border-bottom-color:var(--color-brand-500)}.after\:border-b-error-500:after{content:var(--tw-content);border-bottom-color:var(--color-error-500)}.after\:border-b-success-500:after{content:var(--tw-content);border-bottom-color:var(--color-success-500)}.after\:border-b-warning-500:after{content:var(--tw-content);border-bottom-color:var(--color-warning-500)}.after\:border-l-brand-500:after{content:var(--tw-content);border-left-color:var(--color-brand-500)}.after\:border-l-error-500:after{content:var(--tw-content);border-left-color:var(--color-error-500)}.after\:border-l-success-500:after{content:var(--tw-content);border-left-color:var(--color-success-500)}.after\:border-l-warning-500:after{content:var(--tw-content);border-left-color:var(--color-warning-500)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.checked\:border-transparent:checked{border-color:#0000}.checked\:bg-brand-500:checked{background-color:var(--color-brand-500)}@media (hover:hover){.hover\:border-brand-300:hover{border-color:var(--color-brand-300)}.hover\:border-brand-500:hover{border-color:var(--color-brand-500)}.hover\:border-gray-200:hover{border-color:var(--color-gray-200)}.hover\:border-gray-600:hover{border-color:var(--color-gray-600)}.hover\:bg-blue-light-50:hover{background-color:var(--color-blue-light-50)}.hover\:bg-blue-light-600:hover{background-color:var(--color-blue-light-600)}.hover\:bg-brand-50:hover{background-color:var(--color-brand-50)}.hover\:bg-brand-500:hover{background-color:var(--color-brand-500)}.hover\:bg-brand-600:hover{background-color:var(--color-brand-600)}.hover\:bg-error-50:hover{background-color:var(--color-error-50)}.hover\:bg-error-600:hover{background-color:var(--color-error-600)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-success-600:hover{background-color:var(--color-success-600)}.hover\:bg-warning-600:hover{background-color:var(--color-warning-600)}.hover\:bg-yellow-700:hover{background-color:var(--color-yellow-700)}.hover\:text-blue-light-600:hover{color:var(--color-blue-light-600)}.hover\:text-brand-500:hover{color:var(--color-brand-500)}.hover\:text-brand-600:hover{color:var(--color-brand-600)}.hover\:text-error-600:hover{color:var(--color-error-600)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-success-600:hover{color:var(--color-success-600)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:file\:bg-gray-100:hover::file-selector-button{background-color:var(--color-gray-100)}}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-brand-300:focus{border-color:var(--color-brand-300)}.focus\:border-brand-500:focus{border-color:var(--color-brand-500)}.focus\:border-error-300:focus{border-color:var(--color-error-300)}.focus\:border-success-300:focus{border-color:var(--color-success-300)}.focus\:shadow-focus-ring:focus{--tw-shadow:0px 0px 0px 4px var(--tw-shadow-color,#465fff1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-3:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-blue-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}.focus\:ring-brand-500:focus{--tw-ring-color:var(--color-brand-500)}.focus\:ring-brand-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.focus\:ring-brand-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-brand-500)20%,transparent)}.focus\:ring-error-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-error-500)10%,transparent)}.focus\:ring-error-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-error-500)20%,transparent)}.focus\:ring-success-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-success-500)20%,transparent)}.focus\:outline-hidden:focus{outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus\:file\:ring-brand-300:focus::file-selector-button{--tw-ring-color:var(--color-brand-300)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-brand-300:disabled{background-color:var(--color-brand-300)}.disabled\:bg-success-300:disabled{background-color:var(--color-success-300)}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=375px){.\32xsm\:w-\[307px\]{width:307px}.\32xsm\:gap-3{gap:calc(var(--spacing)*3)}}@media (width>=425px){.xsm\:w-\[358px\]{width:358px}}@media (width>=640px){.sm\:top-6{top:calc(var(--spacing)*6)}.sm\:right-6{right:calc(var(--spacing)*6)}.sm\:col-span-1{grid-column:span 1/span 1}.sm\:-mx-6{margin-inline:calc(var(--spacing)*-6)}.sm\:mb-8{margin-bottom:calc(var(--spacing)*8)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-11{height:calc(var(--spacing)*11)}.sm\:w-11{width:calc(var(--spacing)*11)}.sm\:w-\[228px\]{width:228px}.sm\:w-\[361px\]{width:361px}.sm\:w-auto{width:auto}.sm\:w-fit{width:fit-content}.sm\:max-w-\[472px\]{max-width:472px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:justify-center{justify-content:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-normal{justify-content:normal}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-5{gap:calc(var(--spacing)*5)}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:gap-8{gap:calc(var(--spacing)*8)}:where(.sm\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.sm\:p-0{padding:calc(var(--spacing)*0)}.sm\:p-2\.5{padding:calc(var(--spacing)*2.5)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:px-3\.5{padding-inline:calc(var(--spacing)*3.5)}.sm\:px-5{padding-inline:calc(var(--spacing)*5)}.sm\:px-6{padding-inline:calc(var(--spacing)*6)}.sm\:py-2{padding-block:calc(var(--spacing)*2)}.sm\:py-2\.5{padding-block:calc(var(--spacing)*2.5)}.sm\:py-5{padding-block:calc(var(--spacing)*5)}.sm\:pt-6{padding-top:calc(var(--spacing)*6)}.sm\:pt-10{padding-top:calc(var(--spacing)*10)}.sm\:text-start{text-align:start}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-title-md{font-size:var(--text-title-md);line-height:var(--tw-leading,var(--text-title-md--line-height))}}@media (width>=768px){.md\:w-\[668px\]{width:668px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-6{gap:calc(var(--spacing)*6)}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.md\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:pb-24{padding-bottom:calc(var(--spacing)*24)}}@media (width>=1024px){.lg\:right-0{right:calc(var(--spacing)*0)}.lg\:col-span-1{grid-column:span 1/span 1}.lg\:mt-0{margin-top:calc(var(--spacing)*0)}.lg\:mb-6{margin-bottom:calc(var(--spacing)*6)}.lg\:mb-7{margin-bottom:calc(var(--spacing)*7)}.lg\:ml-\[90px\]{margin-left:90px}.lg\:ml-\[290px\]{margin-left:290px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:inline-flex{display:inline-flex}.lg\:h-11{height:calc(var(--spacing)*11)}.lg\:w-1\/2{width:50%}.lg\:w-11{width:calc(var(--spacing)*11)}.lg\:w-\[634px\]{width:634px}.lg\:w-auto{width:auto}.lg\:translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:justify-between{justify-content:space-between}.lg\:justify-center{justify-content:center}.lg\:justify-end{justify-content:flex-end}.lg\:justify-normal{justify-content:normal}.lg\:justify-start{justify-content:flex-start}.lg\:gap-7{gap:calc(var(--spacing)*7)}.lg\:border{border-style:var(--tw-border-style);border-width:1px}.lg\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.lg\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.lg\:p-6{padding:calc(var(--spacing)*6)}.lg\:p-10{padding:calc(var(--spacing)*10)}.lg\:p-11{padding:calc(var(--spacing)*11)}.lg\:px-0{padding-inline:calc(var(--spacing)*0)}.lg\:px-6{padding-inline:calc(var(--spacing)*6)}.lg\:py-4{padding-block:calc(var(--spacing)*4)}.lg\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.lg\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (width>=1280px){.xl\:order-2{order:2}.xl\:order-3{order:3}.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:block{display:block}.xl\:flex{display:flex}.xl\:w-\[393px\]{width:393px}.xl\:w-\[430px\]{width:430px}.xl\:max-w-\[450px\]{max-width:450px}.xl\:min-w-full{min-width:100%}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:flex-row{flex-direction:row}.xl\:items-center{align-items:center}.xl\:justify-between{justify-content:space-between}.xl\:justify-end{justify-content:flex-end}.xl\:gap-3{gap:calc(var(--spacing)*3)}.xl\:gap-6{gap:calc(var(--spacing)*6)}.xl\:p-8{padding:calc(var(--spacing)*8)}.xl\:px-10{padding-inline:calc(var(--spacing)*10)}.xl\:py-12{padding-block:calc(var(--spacing)*12)}.xl\:text-left{text-align:left}.xl\:text-title-2xl{font-size:var(--text-title-2xl);line-height:var(--tw-leading,var(--text-title-2xl--line-height))}}@media (width>=1440px){.min-\[1440px\]\:max-w-\[90\%\]{max-width:90%}}@media (width>=1536px){.\32xl\:w-\[554px\]{width:554px}.\32xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.\32xl\:gap-x-32{column-gap:calc(var(--spacing)*32)}}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}:where(.dark\:divide-gray-700:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-700)}:where(.dark\:divide-gray-800:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-800)}:where(.dark\:divide-white\/\[0\.05\]:is(.dark *)>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:border-blue-800:is(.dark *){border-color:var(--color-blue-800)}.dark\:border-blue-light-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-blue-light-500)30%,transparent)}.dark\:border-brand-500:is(.dark *){border-color:var(--color-brand-500)}.dark\:border-brand-800:is(.dark *){border-color:var(--color-brand-800)}.dark\:border-error-500:is(.dark *){border-color:var(--color-error-500)}.dark\:border-error-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-error-500)30%,transparent)}.dark\:border-gray-500:is(.dark *){border-color:var(--color-gray-500)}.dark\:border-gray-700:is(.dark *){border-color:var(--color-gray-700)}.dark\:border-gray-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}.dark\:border-gray-800:is(.dark *){border-color:var(--color-gray-800)}.dark\:border-gray-900:is(.dark *){border-color:var(--color-gray-900)}.dark\:border-green-800:is(.dark *){border-color:var(--color-green-800)}.dark\:border-purple-800:is(.dark *){border-color:var(--color-purple-800)}.dark\:border-red-800:is(.dark *){border-color:var(--color-red-800)}.dark\:border-success-500:is(.dark *){border-color:var(--color-success-500)}.dark\:border-success-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-success-500)30%,transparent)}.dark\:border-warning-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-warning-500)30%,transparent)}.dark\:border-white:is(.dark *){border-color:var(--color-white)}.dark\:border-white\/10:is(.dark *){border-color:color-mix(in oklab,var(--color-white)10%,transparent)}.dark\:border-white\/\[0\.05\]:is(.dark *){border-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:border-yellow-800:is(.dark *){border-color:var(--color-yellow-800)}.dark\:bg-\[\#1e2636\]:is(.dark *){background-color:#1e2636}.dark\:bg-amber-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}.dark\:bg-blue-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}.dark\:bg-blue-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}.dark\:bg-blue-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}.dark\:bg-blue-light-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-light-500)15%,transparent)}.dark\:bg-blue-light-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-light-500)20%,transparent)}.dark\:bg-brand-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.dark\:bg-brand-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)15%,transparent)}.dark\:bg-brand-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-900)20%,transparent)}.dark\:bg-error-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-error-500)15%,transparent)}.dark\:bg-gray-400:is(.dark *){background-color:var(--color-gray-400)}.dark\:bg-gray-500:is(.dark *){background-color:var(--color-gray-500)}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-800\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-gray-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-900)30%,transparent)}.dark\:bg-gray-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}.dark\:bg-gray-dark:is(.dark *){background-color:var(--color-gray-dark)}.dark\:bg-green-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}.dark\:bg-green-600:is(.dark *){background-color:var(--color-green-600)}.dark\:bg-green-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-green-900)20%,transparent)}.dark\:bg-green-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}.dark\:bg-purple-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}.dark\:bg-purple-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-900)20%,transparent)}.dark\:bg-red-600:is(.dark *){background-color:var(--color-red-600)}.dark\:bg-red-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}.dark\:bg-red-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}.dark\:bg-red-900\/40:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)40%,transparent)}.dark\:bg-success-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-success-500)15%,transparent)}.dark\:bg-warning-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-warning-500)15%,transparent)}.dark\:bg-white\/3:is(.dark *){background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.dark\:bg-white\/5:is(.dark *){background-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:bg-white\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-white)10%,transparent)}.dark\:bg-white\/\[0\.03\]:is(.dark *){background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.dark\:bg-yellow-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)20%,transparent)}.dark\:bg-yellow-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)30%,transparent)}.dark\:fill-gray-400:is(.dark *){fill:var(--color-gray-400)}.dark\:fill-gray-800:is(.dark *){fill:var(--color-gray-800)}.dark\:stroke-gray-400:is(.dark *){stroke:var(--color-gray-400)}.dark\:text-blue-200:is(.dark *){color:var(--color-blue-200)}.dark\:text-blue-300:is(.dark *){color:var(--color-blue-300)}.dark\:text-blue-400:is(.dark *){color:var(--color-blue-400)}.dark\:text-blue-light-400:is(.dark *){color:var(--color-blue-light-400)}.dark\:text-blue-light-500:is(.dark *){color:var(--color-blue-light-500)}.dark\:text-brand-400:is(.dark *){color:var(--color-brand-400)}.dark\:text-error-400:is(.dark *){color:var(--color-error-400)}.dark\:text-error-500:is(.dark *){color:var(--color-error-500)}.dark\:text-gray-100:is(.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:is(.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:is(.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:is(.dark *){color:var(--color-gray-600)}.dark\:text-green-300:is(.dark *){color:var(--color-green-300)}.dark\:text-green-400:is(.dark *){color:var(--color-green-400)}.dark\:text-orange-400:is(.dark *){color:var(--color-orange-400)}.dark\:text-purple-300:is(.dark *){color:var(--color-purple-300)}.dark\:text-red-200:is(.dark *){color:var(--color-red-200)}.dark\:text-red-300:is(.dark *){color:var(--color-red-300)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-success-400:is(.dark *){color:var(--color-success-400)}.dark\:text-success-500:is(.dark *){color:var(--color-success-500)}.dark\:text-warning-500:is(.dark *){color:var(--color-warning-500)}.dark\:text-white:is(.dark *){color:var(--color-white)}.dark\:text-white\/60:is(.dark *){color:color-mix(in oklab,var(--color-white)60%,transparent)}.dark\:text-white\/80:is(.dark *){color:color-mix(in oklab,var(--color-white)80%,transparent)}.dark\:text-white\/90:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)}.dark\:text-yellow-200:is(.dark *){color:var(--color-yellow-200)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:text-yellow-400:is(.dark *){color:var(--color-yellow-400)}.dark\:ring-gray-700:is(.dark *){--tw-ring-color:var(--color-gray-700)}@media (hover:hover){.dark\:group-hover\:bg-amber-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}.dark\:group-hover\:bg-blue-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}.dark\:group-hover\:bg-green-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}.dark\:group-hover\:bg-purple-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}.dark\:group-hover\:fill-gray-300:is(.dark *):is(:where(.group):hover *){fill:var(--color-gray-300)}}.dark\:file\:border-gray-800:is(.dark *)::file-selector-button{border-color:var(--color-gray-800)}.dark\:file\:bg-white\/\[0\.03\]:is(.dark *)::file-selector-button{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.dark\:file\:text-gray-400:is(.dark *)::file-selector-button{color:var(--color-gray-400)}.dark\:placeholder\:text-gray-400:is(.dark *)::placeholder{color:var(--color-gray-400)}.dark\:placeholder\:text-white\/30:is(.dark *)::placeholder{color:color-mix(in oklab,var(--color-white)30%,transparent)}@media (hover:hover){.dark\:hover\:border-brand-500:is(.dark *):hover{border-color:var(--color-brand-500)}.dark\:hover\:border-gray-600:is(.dark *):hover{border-color:var(--color-gray-600)}.dark\:hover\:border-gray-800:is(.dark *):hover{border-color:var(--color-gray-800)}.dark\:hover\:bg-blue-light-500\/15:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-light-500)15%,transparent)}.dark\:hover\:bg-brand-500:is(.dark *):hover{background-color:var(--color-brand-500)}.dark\:hover\:bg-brand-500\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.dark\:hover\:bg-brand-500\/\[0\.12\]:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-brand-500)12%,transparent)}.dark\:hover\:bg-brand-600:is(.dark *):hover{background-color:var(--color-brand-600)}.dark\:hover\:bg-error-500\/15:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-error-500)15%,transparent)}.dark\:hover\:bg-gray-600:is(.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-gray-700:is(.dark *):hover{background-color:var(--color-gray-700)}.dark\:hover\:bg-gray-800:is(.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-red-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}.dark\:hover\:bg-white\/5:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:hover\:bg-white\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}.dark\:hover\:bg-white\/\[0\.03\]:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.hover\:dark\:\!bg-gray-100:hover:is(.dark *){background-color:var(--color-gray-100)!important}.hover\:dark\:bg-gray-100:hover:is(.dark *){background-color:var(--color-gray-100)}.dark\:hover\:text-blue-light-300:is(.dark *):hover{color:var(--color-blue-light-300)}.dark\:hover\:text-brand-400:is(.dark *):hover{color:var(--color-brand-400)}.dark\:hover\:text-error-300:is(.dark *):hover{color:var(--color-error-300)}.dark\:hover\:text-gray-200:is(.dark *):hover{color:var(--color-gray-200)}.dark\:hover\:text-gray-300:is(.dark *):hover{color:var(--color-gray-300)}.dark\:hover\:text-red-200:is(.dark *):hover{color:var(--color-red-200)}.dark\:hover\:text-red-300:is(.dark *):hover{color:var(--color-red-300)}.dark\:hover\:text-success-300:is(.dark *):hover{color:var(--color-success-300)}.dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}.dark\:hover\:text-white\/80:is(.dark *):hover{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.dark\:focus\:border-brand-300:is(.dark *):focus{border-color:var(--color-brand-300)}.dark\:focus\:border-brand-800:is(.dark *):focus{border-color:var(--color-brand-800)}.dark\:focus\:border-error-800:is(.dark *):focus{border-color:var(--color-error-800)}.dark\:focus\:border-success-800:is(.dark *):focus{border-color:var(--color-success-800)}input[type=date]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}input[type=time]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}input[type=date]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=time]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}}@keyframes slide-in-right{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.dark .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#344054}.tableCheckbox:checked~span span{opacity:1}.tableCheckbox:checked~span{border-color:var(--color-brand-500);background-color:var(--color-brand-500)}.apexcharts-legend-text{color:var(--color-gray-700)!important}.apexcharts-text{fill:var(--color-gray-700)!important}.apexcharts-text:is(.dark *){fill:var(--color-gray-400)!important}.apexcharts-tooltip.apexcharts-theme-light{gap:calc(var(--spacing)*1);padding:calc(var(--spacing)*3);--tw-shadow:0px 1px 3px 0px var(--tw-shadow-color,#1018281a),0px 1px 2px 0px var(--tw-shadow-color,#1018280f);border-radius:var(--radius-lg)!important;border-color:var(--color-gray-200)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.apexcharts-tooltip.apexcharts-theme-light:is(.dark *){border-color:var(--color-gray-800)!important;background-color:var(--color-gray-900)!important}.apexcharts-tooltip-marker{width:6px;height:6px;margin-right:6px}.apexcharts-legend-text{padding-left:calc(var(--spacing)*5)!important;color:var(--color-gray-700)!important}.apexcharts-legend-text:is(.dark *){color:var(--color-gray-400)!important}.apexcharts-tooltip-series-group,.apexcharts-tooltip-y-group{padding:calc(var(--spacing)*0)!important}.apexcharts-tooltip-title{--tw-leading:calc(var(--spacing)*4);margin-bottom:calc(var(--spacing)*0)!important;border-bottom-style:var(--tw-border-style)!important;padding:calc(var(--spacing)*0)!important;font-size:10px!important;line-height:calc(var(--spacing)*4)!important;color:var(--color-gray-800)!important;background-color:#0000!important;border-bottom-width:0!important}.apexcharts-tooltip-title:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}.apexcharts-tooltip-text{font-size:var(--text-theme-xs)!important;line-height:var(--tw-leading,var(--text-theme-xs--line-height))!important;color:var(--color-gray-700)!important}.apexcharts-tooltip-text:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}.apexcharts-tooltip-text-y-value{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)!important}.apexcharts-gridline{stroke:var(--color-gray-100)!important}.apexcharts-gridline:is(.dark *){stroke:var(--color-gray-800)!important}#chartTwo .apexcharts-datalabels-group{--tw-translate-y:calc(var(--spacing)*-24);translate:var(--tw-translate-x)var(--tw-translate-y)!important}#chartTwo .apexcharts-datalabels-group .apexcharts-text{--tw-font-weight:var(--font-weight-semibold);fill:var(--color-gray-800)!important;font-weight:var(--font-weight-semibold)!important}#chartTwo .apexcharts-datalabels-group .apexcharts-text:is(.dark *){fill:color-mix(in oklab,var(--color-white)90%,transparent)!important}#chartDarkStyle .apexcharts-datalabels-group .apexcharts-text{--tw-font-weight:var(--font-weight-semibold);fill:var(--color-gray-800)!important;font-weight:var(--font-weight-semibold)!important}#chartDarkStyle .apexcharts-datalabels-group .apexcharts-text:is(.dark *){fill:color-mix(in oklab,var(--color-white)90%,transparent)!important}#chartSixteen .apexcharts-legend{padding:calc(var(--spacing)*0)!important;padding-left:calc(var(--spacing)*6)!important}.jvectormap-container{background-color:var(--color-gray-50)!important}.jvectormap-container:is(.dark *){background-color:var(--color-gray-900)!important}.jvectormap-region.jvectormap-element{fill:var(--color-gray-300)!important}@media (hover:hover){.jvectormap-region.jvectormap-element:hover{fill:var(--color-brand-500)!important}}.jvectormap-region.jvectormap-element:is(.dark *){fill:var(--color-gray-700)!important}@media (hover:hover){.jvectormap-region.jvectormap-element:is(.dark *):hover{fill:var(--color-brand-500)!important}}.jvectormap-marker.jvectormap-element{stroke:var(--color-gray-200)!important}.jvectormap-marker.jvectormap-element:is(.dark *){stroke:var(--color-gray-800)!important}.jvectormap-tip{--tw-border-style:none;background-color:var(--color-brand-500)!important;padding-inline:calc(var(--spacing)*2)!important;padding-block:calc(var(--spacing)*1)!important;border-style:none!important}.jvectormap-zoomin,.jvectormap-zoomout{display:none!important}.stocks-slider-outer .swiper-button-next:after,.stocks-slider-outer .swiper-button-prev:after{display:none}.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev{margin-top:calc(var(--spacing)*0);height:calc(var(--spacing)*8);width:calc(var(--spacing)*9);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-radius:3.40282e38px;color:var(--color-gray-700)!important;position:static!important}@media (hover:hover){:is(.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev):hover{background-color:var(--color-gray-100)}}:is(.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev):is(.dark *){border-color:color-mix(in oklab,var(--color-white)3%,transparent);background-color:var(--color-gray-800);color:var(--color-gray-400)!important}@media (hover:hover){:is(.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev):is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent);color:color-mix(in oklab,var(--color-white)90%,transparent)!important}}.stocks-slider-outer .swiper-button-next.swiper-button-disabled,.stocks-slider-outer .swiper-button-prev.swiper-button-disabled{background-color:var(--color-white);opacity:.5}:is(.stocks-slider-outer .swiper-button-next.swiper-button-disabled,.stocks-slider-outer .swiper-button-prev.swiper-button-disabled):is(.dark *){background-color:var(--color-gray-900)}.stocks-slider-outer .swiper-button-next svg,.stocks-slider-outer .swiper-button-prev svg{width:auto!important;height:auto!important}.flatpickr-wrapper{width:100%}.flatpickr-calendar{margin-top:calc(var(--spacing)*2);border-radius:var(--radius-xl)!important;border-style:var(--tw-border-style)!important;border-width:1px!important;border-color:var(--color-gray-200)!important;background-color:var(--color-white)!important;padding:calc(var(--spacing)*5)!important;color:var(--color-gray-500)!important}@media (width>=375px){.flatpickr-calendar{width:auto!important}}.flatpickr-calendar:is(.dark *){--tw-shadow:0px 20px 24px -4px var(--tw-shadow-color,#10182814),0px 8px 8px -4px var(--tw-shadow-color,#10182808);border-color:var(--color-gray-700)!important;background-color:var(--color-gray-dark)!important;color:var(--color-gray-400)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{stroke:var(--color-brand-500)}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{display:none}.flatpickr-current-month{padding:calc(var(--spacing)*0)!important}.flatpickr-current-month .cur-month,.flatpickr-current-month input.cur-year{--tw-font-weight:var(--font-weight-medium);height:auto!important;padding-top:calc(var(--spacing)*0)!important;font-size:var(--text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height))!important;font-weight:var(--font-weight-medium)!important;color:var(--color-gray-800)!important}:is(.flatpickr-current-month .cur-month,.flatpickr-current-month input.cur-year):is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}.flatpickr-prev-month,.flatpickr-next-month{padding:calc(var(--spacing)*0)!important}.flatpickr-weekdays{margin-top:calc(var(--spacing)*6);margin-bottom:calc(var(--spacing)*4);height:auto;background-color:#0000!important}.flatpickr-weekday{--tw-font-weight:var(--font-weight-medium);font-size:var(--text-theme-sm)!important;line-height:var(--tw-leading,var(--text-theme-sm--line-height))!important;font-weight:var(--font-weight-medium)!important;color:var(--color-gray-500)!important;background-color:#0000!important}.flatpickr-weekday:is(.dark *){color:var(--color-gray-400)!important}.flatpickr-day{--tw-font-weight:var(--font-weight-medium);font-size:var(--text-theme-sm)!important;line-height:var(--tw-leading,var(--text-theme-sm--line-height))!important;font-weight:var(--font-weight-medium)!important;color:var(--color-gray-800)!important;align-items:center!important;display:flex!important}.flatpickr-day:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}@media (hover:hover){.flatpickr-day:is(.dark *):hover{border-color:var(--color-gray-300)!important;background-color:var(--color-gray-900)!important}}.flatpickr-day.nextMonthDay,.flatpickr-day.prevMonthDay{color:var(--color-gray-400)!important}.flatpickr-months>.flatpickr-month{background:0 0!important}.flatpickr-month .flatpickr-current-month .flatpickr-monthDropdown-months{-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:500;background:0 0!important}.flatpickr-month .flatpickr-current-month .flatpickr-monthDropdown-months:focus{border:0!important;outline:none!important}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{top:calc(var(--spacing)*7)!important;background-color:#0000!important}:is(.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month):is(.dark *){fill:var(--color-white)!important;color:var(--color-white)!important}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:calc(var(--spacing)*7)!important}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:calc(var(--spacing)*7)!important}.flatpickr-days{border-style:var(--tw-border-style)!important;border-width:0!important}span.flatpickr-weekday,.flatpickr-months .flatpickr-month{background-image:none!important}:is(span.flatpickr-weekday,.flatpickr-months .flatpickr-month):is(.dark *){fill:var(--color-white)!important;color:var(--color-white)!important}.flatpickr-innerContainer{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:0!important}.flatpickr-months .flatpickr-month{background-image:none!important}.flatpickr-day.inRange{box-shadow:-5px 0 #f9fafb,5px 0 #f9fafb!important}.flatpickr-day.inRange:is(.dark *){--tw-shadow:-5px 0 0 var(--tw-shadow-color,#262d3c),5px 0 0 var(--tw-shadow-color,#262d3c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{border-color:var(--color-gray-50)!important;background-color:var(--color-gray-50)!important}:is(.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus):is(.dark *){border-style:var(--tw-border-style)!important;border-width:0!important;border-color:color-mix(in oklab,var(--color-white)5%,transparent)!important;background-color:color-mix(in oklab,var(--color-white)5%,transparent)!important}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,:is(.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange):is(.dark *){color:var(--color-white)!important}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#465fff;border-color:var(--color-brand-500)!important;background-color:var(--color-brand-500)!important}@media (hover:hover){:is(.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay):hover{border-color:var(--color-brand-500)!important;background-color:var(--color-brand-500)!important}}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:-10px 0 #465fff}@media (hover:hover){:is(.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month):hover{fill:none!important}}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:none!important}.flatpickr-calendar.static{right:calc(var(--spacing)*0)}.fc .fc-view-harness{max-width:100%;overflow-x:auto}.fc .fc-view-harness::-webkit-scrollbar{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.fc .fc-view-harness::-webkit-scrollbar-track{border-radius:3.40282e38px}.fc .fc-view-harness::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:3.40282e38px}.fc .fc-view-harness::-webkit-scrollbar-thumb:is(){background-color:var(--color-gray-700)}.fc-dayGridMonth-view.fc-view.fc-daygrid{min-width:718px}.fc .fc-scrollgrid-section>*{border-bottom-width:0;border-right-width:0}.fc .fc-scrollgrid{border-left-width:0}.fc .fc-toolbar.fc-header-toolbar{gap:calc(var(--spacing)*4);padding-inline:calc(var(--spacing)*6);padding-top:calc(var(--spacing)*6);flex-direction:column}@media (width>=640px){.fc .fc-toolbar.fc-header-toolbar{flex-direction:row}}.fc-button-group{gap:calc(var(--spacing)*2)}.fc-button-group .fc-button{height:calc(var(--spacing)*10);width:calc(var(--spacing)*10);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:#0000;justify-content:center;align-items:center;display:flex;border-radius:var(--radius-lg)!important}@media (hover:hover){.fc-button-group .fc-button:hover{border-color:var(--color-gray-200);background-color:var(--color-gray-50)}}.fc-button-group .fc-button:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.fc-button-group .fc-button:active{--tw-shadow:0 0 #0000;border-color:var(--color-gray-200)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important;background-color:#0000!important}.fc-button-group .fc-button:is(.dark *){border-color:var(--color-gray-800)}@media (hover:hover){.fc-button-group .fc-button:is(.dark *):hover{border-color:var(--color-gray-800);background-color:var(--color-gray-900)}}.fc-button-group .fc-button:is(.dark *):active{border-color:var(--color-gray-800)!important}.fc-button-group .fc-button.fc-prev-button:before{margin-top:calc(var(--spacing)*1);content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.0068 6L9.75684 12.25L16.0068 18.5' stroke='%23344054' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");display:inline-block}.fc-button-group .fc-button.fc-next-button:before{margin-top:calc(var(--spacing)*1);content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.50684 19L15.7568 12.75L9.50684 6.5' stroke='%23344054' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");display:inline-block}.dark .fc-button-group .fc-button.fc-prev-button:before{content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.0068 6L9.75684 12.25L16.0068 18.5' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")}.dark .fc-button-group .fc-button.fc-next-button:before{content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.50684 19L15.7568 12.75L9.50684 6.5' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")}.fc-button-group .fc-button .fc-icon{display:none}.fc-addEventButton-button{--tw-font-weight:var(--font-weight-medium);border-radius:var(--radius-lg)!important;border-style:var(--tw-border-style)!important;background-color:var(--color-brand-500)!important;padding-inline:calc(var(--spacing)*4)!important;padding-block:calc(var(--spacing)*2.5)!important;font-size:var(--text-sm)!important;line-height:var(--tw-leading,var(--text-sm--line-height))!important;font-weight:var(--font-weight-medium)!important;border-width:0!important}@media (hover:hover){.fc-addEventButton-button:hover{background-color:var(--color-brand-600)!important}}.fc-addEventButton-button:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.fc-toolbar-title{--tw-font-weight:var(--font-weight-medium);color:var(--color-gray-800);font-size:var(--text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height))!important;font-weight:var(--font-weight-medium)!important}.fc-toolbar-title:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child{border-radius:var(--radius-lg);background-color:var(--color-gray-100);padding:calc(var(--spacing)*.5)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child:is(.dark *){background-color:var(--color-gray-900)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button{border-radius:var(--radius-md);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-500);background-color:#0000;border-style:var(--tw-border-style)!important;width:auto!important;height:auto!important;padding-inline:calc(var(--spacing)*5)!important;padding-block:calc(var(--spacing)*2)!important;border-width:0!important}@media (hover:hover){.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button:hover{color:var(--color-gray-700)}}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button:is(.dark *){color:var(--color-gray-400)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button.fc-button-active{background-color:var(--color-white);color:var(--color-gray-900)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button.fc-button-active:is(.dark *){background-color:var(--color-gray-800);color:var(--color-white)}.fc-theme-standard th{border-top-style:var(--tw-border-style);background-color:var(--color-gray-50);border-top-width:1px;border-inline-style:var(--tw-border-style)!important;border-inline-width:0!important;border-color:var(--color-gray-200)!important;text-align:left!important}.fc-theme-standard th:is(.dark *){background-color:var(--color-gray-900);border-color:var(--color-gray-800)!important}.fc-theme-standard td,.fc-theme-standard .fc-scrollgrid{border-color:var(--color-gray-200)!important}:is(.fc-theme-standard td,.fc-theme-standard .fc-scrollgrid):is(.dark *){border-color:var(--color-gray-800)!important}.fc .fc-col-header-cell-cushion{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-400);text-transform:uppercase;padding-inline:calc(var(--spacing)*5)!important;padding-block:calc(var(--spacing)*4)!important}.fc .fc-daygrid-day.fc-day-today{background-color:#0000}.fc .fc-daygrid-day{padding:calc(var(--spacing)*2)}.fc .fc-daygrid-day.fc-day-today .fc-scrollgrid-sync-inner{border-radius:var(--radius-sm);background-color:var(--color-gray-100)}.fc .fc-daygrid-day.fc-day-today .fc-scrollgrid-sync-inner:is(.dark *){background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.fc .fc-daygrid-day-number{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-700);padding:calc(var(--spacing)*3)!important}.fc .fc-daygrid-day-number:is(.dark *){color:var(--color-gray-400)}.fc .fc-daygrid-day-top{flex-direction:row!important}.fc .fc-day-other .fc-daygrid-day-top{opacity:1}.fc .fc-day-other .fc-daygrid-day-top .fc-daygrid-day-number{color:var(--color-gray-400)}.fc .fc-day-other .fc-daygrid-day-top .fc-daygrid-day-number:is(.dark *){color:color-mix(in oklab,var(--color-white)30%,transparent)}.event-fc-color{border-radius:var(--radius-lg);padding-block:calc(var(--spacing)*2.5);padding-right:calc(var(--spacing)*3);padding-left:calc(var(--spacing)*4)}.event-fc-color .fc-event-title{padding:calc(var(--spacing)*0);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal);color:var(--color-gray-700)}.fc-daygrid-event-dot{margin-right:calc(var(--spacing)*3);margin-left:calc(var(--spacing)*0);height:calc(var(--spacing)*5);width:calc(var(--spacing)*1);border-radius:var(--radius-sm);--tw-border-style:none;border-style:none}.fc-event:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.fc-daygrid-event.fc-event-start{margin-left:calc(var(--spacing)*3)!important}.event-fc-color.fc-bg-success{border-color:var(--color-success-50);background-color:var(--color-success-50)}.event-fc-color.fc-bg-danger{border-color:var(--color-error-50);background-color:var(--color-error-50)}.event-fc-color.fc-bg-primary{border-color:var(--color-brand-50);background-color:var(--color-brand-50)}.event-fc-color.fc-bg-warning{border-color:var(--color-orange-50);background-color:var(--color-orange-50)}.event-fc-color.fc-bg-success .fc-daygrid-event-dot{background-color:var(--color-success-500)}.event-fc-color.fc-bg-danger .fc-daygrid-event-dot{background-color:var(--color-error-500)}.event-fc-color.fc-bg-primary .fc-daygrid-event-dot{background-color:var(--color-brand-500)}.event-fc-color.fc-bg-warning .fc-daygrid-event-dot{background-color:var(--color-orange-500)}.fc-direction-ltr .fc-timegrid-slot-label-frame{padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*1.5);text-align:left;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-500)}.fc-direction-ltr .fc-timegrid-slot-label-frame:is(.dark *){color:var(--color-gray-400)}.fc .fc-timegrid-axis-cushion{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-500)}.fc .fc-timegrid-axis-cushion:is(.dark *){color:var(--color-gray-400)}.input-date-icon::-webkit-inner-spin-button{opacity:0;-webkit-appearance:none}.input-date-icon::-webkit-calendar-picker-indicator{opacity:0;-webkit-appearance:none}.swiper-button-prev svg,.swiper-button-next svg{width:auto!important;height:auto!important}.carouselTwo .swiper-button-next:after,.carouselTwo .swiper-button-prev:after,.carouselFour .swiper-button-next:after,.carouselFour .swiper-button-prev:after{display:none}.carouselTwo .swiper-button-next.swiper-button-disabled,.carouselTwo .swiper-button-prev.swiper-button-disabled,.carouselFour .swiper-button-next.swiper-button-disabled,.carouselFour .swiper-button-prev.swiper-button-disabled{background-color:color-mix(in oklab,var(--color-white)60%,transparent);opacity:1!important}.carouselTwo .swiper-button-next,.carouselTwo .swiper-button-prev,.carouselFour .swiper-button-next,.carouselFour .swiper-button-prev{height:calc(var(--spacing)*10);width:calc(var(--spacing)*10);border-style:var(--tw-border-style);border-width:.5px;border-color:color-mix(in oklab,var(--color-white)10%,transparent);background-color:color-mix(in oklab,var(--color-white)90%,transparent);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018281a),0px 1px 3px 0px var(--tw-shadow-color,#1018281a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-backdrop-blur:blur(10px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);border-radius:3.40282e38px;color:var(--color-gray-700)!important}.carouselTwo .swiper-button-prev,.carouselFour .swiper-button-prev{left:calc(var(--spacing)*3)!important}@media (width>=640px){:is(.carouselTwo .swiper-button-prev,.carouselFour .swiper-button-prev){left:calc(var(--spacing)*4)!important}}.carouselTwo .swiper-button-next,.carouselFour .swiper-button-next{right:calc(var(--spacing)*3)!important}@media (width>=640px){:is(.carouselTwo .swiper-button-next,.carouselFour .swiper-button-next){right:calc(var(--spacing)*4)!important}}.carouselThree .swiper-pagination,.carouselFour .swiper-pagination{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);align-items:center;gap:calc(var(--spacing)*1.5);border-style:var(--tw-border-style);border-width:.5px;border-color:color-mix(in oklab,var(--color-white)10%,transparent);background-color:color-mix(in oklab,var(--color-white)60%,transparent);padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1.5);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018281a),0px 1px 3px 0px var(--tw-shadow-color,#1018281a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-backdrop-blur:blur(10px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);border-radius:40px;display:inline-flex;bottom:calc(var(--spacing)*3)!important;width:auto!important;left:50%!important}@media (width>=640px){:is(.carouselThree .swiper-pagination,.carouselFour .swiper-pagination){bottom:calc(var(--spacing)*5)!important}}.carouselThree .swiper-pagination-bullet,.carouselFour .swiper-pagination-bullet{height:calc(var(--spacing)*2.5);width:calc(var(--spacing)*2.5);background-color:var(--color-white);opacity:1;--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018280d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-duration:.2s;--tw-ease:var(--ease-in-out);transition-duration:.2s;transition-timing-function:var(--ease-in-out);margin:calc(var(--spacing)*0)!important}.carouselThree .swiper-pagination-bullet-active,.carouselFour .swiper-pagination-bullet-active{width:calc(var(--spacing)*6.5);border-radius:var(--radius-xl)}.form-check-input:checked~span{border-style:var(--tw-border-style);border-width:6px;border-color:var(--color-brand-500);background-color:var(--color-brand-500)}.form-check-input:checked~span:is(.dark *){border-color:var(--color-brand-500)}.taskCheckbox:checked~.box span{background-color:var(--color-brand-500);opacity:1}.taskCheckbox:checked~p{color:var(--color-gray-400);text-decoration-line:line-through}.taskCheckbox:checked~.box{border-color:var(--color-brand-500);background-color:var(--color-brand-500)}.taskCheckbox:checked~.box:is(.dark *){border-color:var(--color-brand-500)}.task{opacity:.8;cursor:grabbing;border-radius:.75rem;transition:all .2s;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.custom-calendar .fc-h-event{color:#000;background-color:#0000;border:none}.fc.fc-media-screen{min-height:100vh}.simplebar-scrollbar:before{background-color:var(--color-gray-200)!important;opacity:1!important;border-radius:3.40282e38px!important}.simplebar-scrollbar:before:is(),.dark .simplebar-scrollbar:before{background-color:var(--color-gray-700)!important}.simplebar-scrollbar.simplebar-visible:before{opacity:1}.animate-slide-in-right{animation:.3s ease-out slide-in-right}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:.3s ease-out fade-in}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:10000px 0}}.igny8-skeleton-row .animate-pulse{position:relative;overflow:hidden}.igny8-skeleton-row .animate-pulse:after{content:"";background:linear-gradient(90deg,#0000,#fff6,#0000) 0 0/200% 100%;animation:2s infinite shimmer;position:absolute;top:0;right:0;bottom:0;left:0}.dark .igny8-skeleton-row .animate-pulse:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}.html-content-renderer{color:var(--color-gray-700)}.html-content-renderer:is(.dark *){color:var(--color-gray-300)}.html-content-renderer h1,.html-content-renderer h2,.html-content-renderer h3,.html-content-renderer h4,.html-content-renderer h5,.html-content-renderer h6{margin-top:calc(var(--spacing)*4);margin-bottom:calc(var(--spacing)*2);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-900)}:is(.html-content-renderer h1,.html-content-renderer h2,.html-content-renderer h3,.html-content-renderer h4,.html-content-renderer h5,.html-content-renderer h6):is(.dark *){color:var(--color-white)}.html-content-renderer h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.html-content-renderer h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.html-content-renderer h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.html-content-renderer p{margin-bottom:calc(var(--spacing)*3);--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.html-content-renderer ul,.html-content-renderer ol{margin-bottom:calc(var(--spacing)*3);margin-left:calc(var(--spacing)*6);list-style-type:disc}.html-content-renderer ol{list-style-type:decimal}.html-content-renderer li{margin-bottom:calc(var(--spacing)*1)}.html-content-renderer strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-900)}.html-content-renderer strong:is(.dark *){color:var(--color-white)}.html-content-renderer em{font-style:italic}.html-content-renderer code{background-color:var(--color-gray-100);padding-inline:calc(var(--spacing)*1.5);padding-block:calc(var(--spacing)*.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));border-radius:.25rem;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.html-content-renderer code:is(.dark *){background-color:var(--color-gray-800)}.html-content-renderer pre{margin-bottom:calc(var(--spacing)*3);border-radius:var(--radius-lg);background-color:var(--color-gray-100);padding:calc(var(--spacing)*3);overflow-x:auto}.html-content-renderer pre:is(.dark *){background-color:var(--color-gray-800)}.html-content-renderer pre code{padding:calc(var(--spacing)*0);background-color:#0000}.html-content-renderer blockquote{margin-block:calc(var(--spacing)*3);border-left-style:var(--tw-border-style);border-left-width:4px;border-color:var(--color-gray-300);padding-left:calc(var(--spacing)*4);font-style:italic}.html-content-renderer blockquote:is(.dark *){border-color:var(--color-gray-600)}.html-content-renderer table{margin-bottom:calc(var(--spacing)*3);border-collapse:collapse;width:100%}.html-content-renderer table th,.html-content-renderer table td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-300);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2)}:is(.html-content-renderer table th,.html-content-renderer table td):is(.dark *){border-color:var(--color-gray-700)}.html-content-renderer table th{background-color:var(--color-gray-100);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.html-content-renderer table th:is(.dark *){background-color:var(--color-gray-800)}:where(.content-outline>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.outline-intro{margin-bottom:calc(var(--spacing)*4);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-gray-200);padding-bottom:calc(var(--spacing)*4)}.outline-intro:is(.dark *){border-color:var(--color-gray-700)}.outline-hook{margin-bottom:calc(var(--spacing)*3);border-radius:var(--radius-lg);background-color:var(--color-blue-50);padding:calc(var(--spacing)*3);color:var(--color-blue-900)}.outline-hook:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent);color:var(--color-blue-200)}.outline-paragraph{margin-bottom:calc(var(--spacing)*2);background-color:var(--color-gray-50);padding:calc(var(--spacing)*2);border-radius:.25rem}.outline-paragraph:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}.outline-section{margin-bottom:calc(var(--spacing)*4);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white);padding:calc(var(--spacing)*4)}.outline-section:is(.dark *){border-color:var(--color-gray-700);background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}.outline-list{margin-left:calc(var(--spacing)*4)}:where(.outline-list>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.outline-item{color:var(--color-gray-700)}.outline-item:is(.dark *){color:var(--color-gray-300)}.outline-item.nested{margin-left:calc(var(--spacing)*4);color:var(--color-gray-600)}.outline-item.nested:is(.dark *){color:var(--color-gray-400)}.subsection-heading{margin-top:calc(var(--spacing)*3);margin-bottom:calc(var(--spacing)*2);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-800)}.subsection-heading:is(.dark *){color:var(--color-gray-200)}.section-heading{margin-bottom:calc(var(--spacing)*3);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-blue-600)}.section-heading:is(.dark *){color:var(--color-blue-400)}.content-type-badge{margin-bottom:calc(var(--spacing)*2);background-color:var(--color-gray-200);padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-700);text-transform:uppercase;border-radius:.25rem;display:inline-block}.content-type-badge:is(.dark *){background-color:var(--color-gray-700);color:var(--color-gray-300)}.section-details{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);color:var(--color-gray-600)}.section-details:is(.dark *){color:var(--color-gray-400)}.toggle-content-row{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));--tw-duration:.3s;transition-duration:.3s}.toggle-content-row.collapsed{opacity:0}.toggle-content-row.expanded{opacity:1}.html-content-wrapper{max-height:600px;overflow-y:auto}.html-content-wrapper::-webkit-scrollbar{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.html-content-wrapper::-webkit-scrollbar-track{border-radius:3.40282e38px}.html-content-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:3.40282e38px}.html-content-wrapper::-webkit-scrollbar-thumb:is(){background-color:var(--color-gray-700)}.normalized-html-content{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);color:var(--color-gray-700);line-height:1.7}.normalized-html-content:is(.dark *){color:var(--color-gray-300)}:where(.normalized-html-content article>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.normalized-html-content h1,.normalized-html-content h2,.normalized-html-content h3,.normalized-html-content h4,.normalized-html-content h5,.normalized-html-content h6{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-900);margin-top:1.5em;margin-bottom:.75em;font-weight:600}:is(.normalized-html-content h1,.normalized-html-content h2,.normalized-html-content h3,.normalized-html-content h4,.normalized-html-content h5,.normalized-html-content h6):is(.dark *){color:var(--color-white)}.normalized-html-content h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height));font-size:1.75em}.normalized-html-content h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height));font-size:1.5em}.normalized-html-content h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));font-size:1.25em}.normalized-html-content h4{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));font-size:1.1em}.normalized-html-content p{margin-bottom:calc(var(--spacing)*4);color:var(--color-gray-700);margin-bottom:1em}.normalized-html-content p:is(.dark *){color:var(--color-gray-300)}.normalized-html-content ul,.normalized-html-content ol{margin-block:calc(var(--spacing)*4);padding-left:calc(var(--spacing)*8);margin:1em 0;padding-left:2em}.normalized-html-content ul{list-style-type:disc}.normalized-html-content ol{list-style-type:decimal}.normalized-html-content li{margin-bottom:calc(var(--spacing)*2);margin-bottom:.5em}.normalized-html-content table{margin-block:calc(var(--spacing)*4);border-collapse:collapse;width:100%;margin:1em 0}.normalized-html-content table th,.normalized-html-content table td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);padding:calc(var(--spacing)*2);border:1px solid #e5e7eb;padding:.5em}:is(.normalized-html-content table th,.normalized-html-content table td):is(.dark *){border-color:var(--color-gray-700)}.normalized-html-content table th{background-color:var(--color-gray-50);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);background-color:#f9fafb;font-weight:600}.normalized-html-content table th:is(.dark *){background-color:var(--color-gray-800)}.normalized-html-content strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.normalized-html-content em{font-style:italic}.normalized-html-content a{color:var(--color-blue-600)}@media (hover:hover){.normalized-html-content a:hover{text-decoration-line:underline}}.normalized-html-content a:is(.dark *){color:var(--color-blue-400)}.normalized-html-content blockquote{margin-block:calc(var(--spacing)*4);border-left-style:var(--tw-border-style);border-left-width:4px;border-color:var(--color-gray-300);padding-left:calc(var(--spacing)*4);font-style:italic}.normalized-html-content blockquote:is(.dark *){border-color:var(--color-gray-600)}.normalized-html-content code{background-color:var(--color-gray-100);padding-inline:calc(var(--spacing)*1);padding-block:calc(var(--spacing)*.5);font-family:var(--font-mono);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));border-radius:.25rem}.normalized-html-content code:is(.dark *){background-color:var(--color-gray-800)}.normalized-html-content pre{margin-block:calc(var(--spacing)*4);background-color:var(--color-gray-100);padding:calc(var(--spacing)*4);border-radius:.25rem;overflow-x:auto}.normalized-html-content pre:is(.dark *){background-color:var(--color-gray-800)}.normalized-html-content pre code{padding:calc(var(--spacing)*0);background-color:#0000}.font-mono-custom{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-scroll-snap-strictness{syntax:"*";inherits:false;initial-value:proximity}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}:root{--igny8-blue: #0693e3;--igny8-blue-dark: #0472b8;--igny8-green: #0bbf87;--igny8-green-dark: #08966b;--igny8-amber: #ff7a00;--igny8-amber-dark: #cc5f00;--igny8-red: #ef4444;--igny8-red-dark: #d13333;--igny8-purple: #5d4ae3;--igny8-purple-dark: #3a2f94;--igny8-navy-bg: #0d1b2a;--igny8-navy-bg-2: #142b3f;--igny8-surface: #f8fafc;--igny8-panel: #ffffff;--igny8-panel-2: #f1f5f9;--igny8-text: #555a68;--igny8-text-dim: #64748b;--igny8-text-light: #e5eaf0;--igny8-stroke: #e2e8f0;--igny8-radius: 6px;--igny8-gradient-blue: linear-gradient(135deg, var(--igny8-blue) 0%, var(--igny8-blue-dark) 100%);--igny8-gradient-success: linear-gradient(135deg, var(--igny8-green) 0%, var(--igny8-green-dark) 100%);--igny8-gradient-warning: linear-gradient(135deg, var(--igny8-amber) 0%, var(--igny8-amber-dark) 100%);--igny8-gradient-danger: linear-gradient(135deg, var(--igny8-red) 0%, var(--igny8-red-dark) 100%);--igny8-gradient-purple: linear-gradient(135deg, var(--igny8-purple) 0%, var(--igny8-purple-dark) 100%);--igny8-gradient-panel: linear-gradient(180deg, var(--igny8-panel) 0%, var(--igny8-panel-2) 100%)}.dark{--igny8-surface: #1f2937;--igny8-panel: #1f2937;--igny8-panel-2: #111827;--igny8-text: #e5eaf0;--igny8-text-dim: #9ca3af;--igny8-stroke: #374151}.igny8-bg-blue{background-color:var(--igny8-blue)}.igny8-bg-blue-dark{background-color:var(--igny8-blue-dark)}.igny8-bg-green{background-color:var(--igny8-green)}.igny8-bg-green-dark{background-color:var(--igny8-green-dark)}.igny8-bg-amber{background-color:var(--igny8-amber)}.igny8-bg-amber-dark{background-color:var(--igny8-amber-dark)}.igny8-bg-red{background-color:var(--igny8-red)}.igny8-bg-red-dark{background-color:var(--igny8-red-dark)}.igny8-bg-purple{background-color:var(--igny8-purple)}.igny8-bg-purple-dark{background-color:var(--igny8-purple-dark)}.igny8-bg-navy{background-color:var(--igny8-navy-bg)}.igny8-bg-navy-2{background-color:var(--igny8-navy-bg-2)}.igny8-bg-surface{background-color:var(--igny8-surface)}.igny8-bg-panel{background-color:var(--igny8-panel)}.igny8-bg-panel-2{background-color:var(--igny8-panel-2)}.igny8-text-blue{color:var(--igny8-blue)}.igny8-text-blue-dark{color:var(--igny8-blue-dark)}.igny8-text-green{color:var(--igny8-green)}.igny8-text-green-dark{color:var(--igny8-green-dark)}.igny8-text-amber{color:var(--igny8-amber)}.igny8-text-amber-dark{color:var(--igny8-amber-dark)}.igny8-text-red{color:var(--igny8-red)}.igny8-text-red-dark{color:var(--igny8-red-dark)}.igny8-text-purple{color:var(--igny8-purple)}.igny8-text-purple-dark{color:var(--igny8-purple-dark)}.igny8-text-primary{color:var(--igny8-text)}.igny8-text-dim{color:var(--igny8-text-dim)}.igny8-text-light{color:var(--igny8-text-light)}.igny8-border-blue{border-color:var(--igny8-blue)}.igny8-border-blue-dark{border-color:var(--igny8-blue-dark)}.igny8-border-green{border-color:var(--igny8-green)}.igny8-border-amber{border-color:var(--igny8-amber)}.igny8-border-red{border-color:var(--igny8-red)}.igny8-border-purple{border-color:var(--igny8-purple)}.igny8-border-stroke{border-color:var(--igny8-stroke)}.igny8-gradient-blue{background:var(--igny8-gradient-blue)}.igny8-gradient-success{background:var(--igny8-gradient-success)}.igny8-gradient-warning{background:var(--igny8-gradient-warning)}.igny8-gradient-danger{background:var(--igny8-gradient-danger)}.igny8-gradient-purple{background:var(--igny8-gradient-purple)}.igny8-gradient-panel{background:var(--igny8-gradient-panel)}.igny8-rounded{border-radius:var(--igny8-radius)}.igny8-rounded-xl{border-radius:calc(var(--igny8-radius) * 2)}.igny8-rounded-2xl{border-radius:calc(var(--igny8-radius) * 3)}.igny8-hover-blue:hover{background-color:var(--igny8-blue-dark)}.igny8-hover-green:hover{background-color:var(--igny8-green-dark)}.igny8-hover-amber:hover{background-color:var(--igny8-amber-dark)}.igny8-card{background:var(--igny8-panel);border:1px solid var(--igny8-stroke);border-radius:var(--igny8-radius);padding:18px;box-shadow:0 2px 6px #0000001a,0 4px 10px #0d1b2a0f;transition:box-shadow .25s ease,transform .2s ease}.igny8-card:hover{transform:translateY(-2px);box-shadow:0 6px 14px #00000024,0 8px 20px #0d1b2a1a}.igny8-card-header{display:flex;align-items:center;justify-content:space-between;background:var(--igny8-gradient-blue);color:#fff;padding:12px 16px;border-radius:var(--igny8-radius) var(--igny8-radius) 0 0;margin:-10px -10px 12px}.igny8-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px 12px;font-size:13px;font-weight:500;line-height:1.3;border:none;border-radius:var(--igny8-radius);cursor:pointer;transition:all .2s ease-in-out;color:#fff;text-decoration:none;white-space:nowrap;margin:0 5px}.igny8-btn-primary{background:var(--igny8-blue)}.igny8-btn-primary:hover{background:var(--igny8-blue-dark)}.igny8-btn-success{background:var(--igny8-green)}.igny8-btn-success:hover{background:var(--igny8-green-dark)}.igny8-btn-warning{background:var(--igny8-amber)}.igny8-btn-warning:hover{background:var(--igny8-amber-dark)}.igny8-btn-danger{background:var(--igny8-red)}.igny8-btn-danger:hover{opacity:.9}.igny8-badge{padding:4px 10px;border-radius:4px;font-size:12px;font-weight:500;color:#fff;white-space:nowrap;display:inline-block}.igny8-badge-primary{background:var(--igny8-blue)}.igny8-badge-success{background:var(--igny8-green)}.igny8-badge-warning{background:var(--igny8-amber)}.igny8-badge-danger{background:var(--igny8-red)}.igny8-badge-purple{background:var(--igny8-purple)}.igny8-table-compact th{padding:12px 16px!important;font-size:14px!important;font-weight:600!important;color:#475467!important;text-align:left!important;background-color:#f8fafc!important;border-bottom:2px solid #e2e8f0!important;text-transform:uppercase;letter-spacing:.3px}.dark .igny8-table-compact th{color:#e5eaf0!important;background-color:#0f172a80!important;border-bottom-color:#ffffff1a!important}.igny8-table-compact td{padding:4px 12px!important;font-size:14px!important;border-bottom:1px solid #e2e8f0!important}.dark .igny8-table-compact td{border-bottom-color:#ffffff0d!important}.igny8-input-compact,.igny8-select-compact{height:36px!important;padding:6px 12px!important;font-size:13px!important}.igny8-btn-compact{padding:6px 12px!important;font-size:13px!important;height:36px!important}.igny8-btn-compact-sm{padding:4px 10px!important;font-size:12px!important;height:32px!important}.igny8-select-styled{background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23647085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 12px center!important;padding-right:36px!important}.dark .igny8-select-styled{background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}select.igny8-select-styled{cursor:pointer}select.igny8-select-styled option{padding:10px 12px!important;background:#fff!important;color:#334054!important;font-size:13px!important}select.igny8-select-styled option:hover{background:#f1f5f9!important}select.igny8-select-styled option:checked{background:#ede9fe!important;color:#5d4ae3!important;font-weight:600!important}.dark select.igny8-select-styled option{background:#1f2937!important;color:#e5eaf0!important}.dark select.igny8-select-styled option:hover{background:#374151!important}.dark select.igny8-select-styled option:checked{background:#3a2f94!important;color:#e9d5ff!important}.igny8-header-metrics{display:flex;align-items:center;gap:16px;padding:6px 12px;background:transparent;border-radius:6px;box-shadow:0 2px 6px 3px #00000014}.dark .igny8-header-metrics{background:transparent;box-shadow:0 2px 6px 3px #00000014}.igny8-header-metric{display:flex;align-items:center;gap:8px}.igny8-header-metric-separator{width:1px;height:16px;background:#cbd5e1;opacity:.4}.dark .igny8-header-metric-separator{background:#94a3b8;opacity:.3}.igny8-header-metric-label{font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;color:#64748b}.dark .igny8-header-metric-label{color:#94a3b8}.igny8-header-metric-value{font-size:14px;font-weight:700;color:#1e293b;margin-left:4px}.dark .igny8-header-metric-value{color:#fff}.igny8-header-metric-accent{width:2px;height:14px;border-radius:2px}.igny8-header-metric-accent.blue{background:var(--igny8-blue)}.igny8-header-metric-accent.green{background:var(--igny8-green)}.igny8-header-metric-accent.amber{background:var(--igny8-amber)}.igny8-header-metric-accent.purple{background:var(--igny8-purple)}.difficulty-badge{border-radius:3px!important;min-width:28px!important;display:inline-flex!important;justify-content:center!important;align-items:center!important}.difficulty-badge.difficulty-very-hard,.dark .difficulty-badge.difficulty-very-hard{background-color:#dc2626!important;color:#fff!important}.igny8-table-compact th.text-center,.igny8-table-compact td.text-center{text-align:center!important}.igny8-table-container{min-height:500px;transition:min-height .8s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;will-change:min-height}.igny8-table-container.loading{min-height:500px;overflow:hidden!important;contain:layout style paint}.igny8-table-container.loaded{min-height:auto;overflow:visible;transition:min-height .8s cubic-bezier(.4,0,.2,1);animation:fadeInContainer .3s ease-out}@keyframes fadeInContainer{0%{opacity:.95}to{opacity:1}}.igny8-table-wrapper{width:100%;position:relative;overflow-x:hidden;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.3) transparent;transition:opacity .4s ease-in-out;contain:layout}.igny8-table-container.loading .igny8-table-wrapper{overflow-x:hidden!important;overflow-y:hidden!important;scrollbar-width:none;-ms-overflow-style:none}.igny8-table-container.loading .igny8-table-wrapper::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.igny8-table-container.loaded .igny8-table-wrapper{overflow-x:auto;overflow-y:hidden;animation:showScrollbar .4s ease-out .3s both}@keyframes showScrollbar{0%{scrollbar-width:none}to{scrollbar-width:thin}}.igny8-table-smooth{width:100%;table-layout:fixed;min-width:100%;transition:opacity .5s ease-in-out;contain:layout}.igny8-table-container.loading .igny8-table-smooth{opacity:.8;visibility:visible}.igny8-table-container.loaded .igny8-table-smooth{opacity:1;table-layout:auto;transition:opacity .5s ease-in-out,table-layout .1s ease-out}.igny8-table-body{position:relative;min-height:450px;transition:min-height .8s cubic-bezier(.4,0,.2,1),opacity .5s ease-in-out;contain:layout}.igny8-table-container.loading .igny8-table-body{min-height:450px;opacity:1;height:auto}.igny8-table-container.loaded .igny8-table-body{min-height:0;opacity:1;transition:min-height .8s cubic-bezier(.4,0,.2,1),opacity .5s ease-in-out}.igny8-table-container.loading .igny8-table-body>tr:not(.igny8-skeleton-row){display:none!important;visibility:hidden}.igny8-table-container.loaded .igny8-table-body>tr.igny8-skeleton-row{display:none!important;visibility:hidden;opacity:0;pointer-events:none}.igny8-data-row{animation:fadeInRow .6s ease-out forwards;opacity:0;transform:translateY(8px)}@keyframes fadeInRow{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.igny8-skeleton-row{animation:none!important;opacity:1!important;transform:none!important;display:table-row!important}.igny8-table-container.loading *{backface-visibility:hidden;perspective:1000px} diff --git a/frontend/dist/assets/css/index-DObwisHI.css b/frontend/dist/assets/css/index-DObwisHI.css deleted file mode 100644 index 655d4af2..00000000 --- a/frontend/dist/assets/css/index-DObwisHI.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap"layer(base);/*! tailwindcss v4.0.8 | MIT License | https://tailwindcss.com */@layer theme{:root,:host{--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-orange-50:#fff6ed;--color-orange-400:#fd853a;--color-orange-500:#fb6514;--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-500:oklch(.769 .188 70.08);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-500:oklch(.627 .265 303.9);--color-gray-50:#f9fafb;--color-gray-100:#f2f4f7;--color-gray-200:#e4e7ec;--color-gray-300:#d0d5dd;--color-gray-400:#98a2b3;--color-gray-500:#667085;--color-gray-600:#475467;--color-gray-700:#344054;--color-gray-800:#1d2939;--color-gray-900:#101828;--color-black:#101828;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--font-outfit:Outfit,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--text-title-2xl:72px;--text-title-2xl--line-height:90px;--text-title-md:36px;--text-title-md--line-height:44px;--text-title-sm:30px;--text-title-sm--line-height:38px;--text-theme-xl:20px;--text-theme-xl--line-height:30px;--text-theme-sm:14px;--text-theme-sm--line-height:20px;--text-theme-xs:12px;--text-theme-xs--line-height:18px;--color-brand-50:#ecf3ff;--color-brand-100:#dde9ff;--color-brand-300:#9cb9ff;--color-brand-400:#7592ff;--color-brand-500:#0693e3;--color-brand-600:#0472b8;--color-brand-800:#252dae;--color-brand-900:#262e89;--color-brand-950:#161950;--color-blue-light-50:#f0f9ff;--color-blue-light-100:#e0f2fe;--color-blue-light-200:#b9e6fe;--color-blue-light-300:#7cd4fd;--color-blue-light-400:#36bffa;--color-blue-light-500:#0ba5ec;--color-blue-light-600:#0086c9;--color-gray-dark:#1a2231;--color-success-50:#ecfdf3;--color-success-100:#d1fadf;--color-success-200:#a6f4c5;--color-success-300:#6ce9a6;--color-success-400:#32d583;--color-success-500:#12b76a;--color-success-600:#039855;--color-success-800:#05603a;--color-error-50:#fef3f2;--color-error-100:#fee4e2;--color-error-200:#fecdca;--color-error-300:#fda29b;--color-error-400:#f97066;--color-error-500:#f04438;--color-error-600:#d92d20;--color-error-800:#912018;--color-warning-50:#fffaeb;--color-warning-100:#fef0c7;--color-warning-200:#fedf89;--color-warning-500:#f79009;--color-warning-600:#dc6803;--z-index-1:1;--z-index-999:999;--z-index-99999:99999}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}body{z-index:var(--z-index-1);background-color:var(--color-gray-50);font-family:var(--font-outfit);--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal);position:relative}}@layer components;@layer utilities{.\@container,.\@container-\[inline-size\]{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip:auto;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.menu-item{align-items:center;gap:calc(var(--spacing)*3);border-radius:var(--radius-lg);width:100%;padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2);font-size:var(--text-theme-sm);line-height:var(--tw-leading,var(--text-theme-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);display:flex;position:relative}.menu-dropdown-item{align-items:center;gap:calc(var(--spacing)*3);border-radius:var(--radius-lg);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2.5);font-size:var(--text-theme-sm);line-height:var(--tw-leading,var(--text-theme-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);display:flex;position:relative}.\!fixed{position:fixed!important}.\!relative{position:relative!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing)*-1)}.inset-0{inset:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.end-1{inset-inline-end:calc(var(--spacing)*1)}.end-2{inset-inline-end:calc(var(--spacing)*2)}.-top-7{top:calc(var(--spacing)*-7)}.top-0{top:calc(var(--spacing)*0)}.top-0\.5{top:calc(var(--spacing)*.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-6{top:calc(var(--spacing)*6)}.top-full{top:100%}.-right-\[240px\]{right:-240px}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-2\.5{right:calc(var(--spacing)*2.5)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.right-6{right:calc(var(--spacing)*6)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.-left-9{left:calc(var(--spacing)*-9)}.-left-px{left:-1px}.left-0{left:calc(var(--spacing)*0)}.left-0\.5{left:calc(var(--spacing)*.5)}.left-1\/2{left:50%}.left-4{left:calc(var(--spacing)*4)}.left-full{left:100%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-z-1{z-index:calc(var(--z-index-1)*-1)}.z-1{z-index:var(--z-index-1)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-999{z-index:var(--z-index-999)}.z-99999{z-index:var(--z-index-99999)}.z-\[9999\]{z-index:9999}.z-\[99998\]{z-index:99998}.z-\[99999\]{z-index:99999}.z-\[999999\]{z-index:999999}.z-auto{z-index:auto}.order-2{order:2}.order-3{order:3}.order-first{order:-9999}.order-last{order:9999}.order-none{order:0}.col-auto{grid-column:auto}.col-span-2{grid-column:span 2/span 2}.col-span-12{grid-column:span 12/span 12}.col-span-full{grid-column:1/-1}.col-start-auto{grid-column-start:auto}.col-end-auto{grid-column-end:auto}.row-auto{grid-row:auto}.row-span-full{grid-row:1/-1}.row-start-auto{grid-row-start:auto}.row-end-auto{grid-row-end:auto}.float-end{float:inline-end}.float-left{float:left}.float-none{float:none}.float-right{float:right}.float-start{float:inline-start}.clear-both{clear:both}.clear-end{clear:inline-end}.clear-left{clear:left}.clear-none{clear:none}.clear-right{clear:right}.clear-start{clear:inline-start}.\!container{width:100%!important}@media (width>=375px){.\!container{max-width:375px!important}}@media (width>=425px){.\!container{max-width:425px!important}}@media (width>=640px){.\!container{max-width:640px!important}}@media (width>=768px){.\!container{max-width:768px!important}}@media (width>=1024px){.\!container{max-width:1024px!important}}@media (width>=1280px){.\!container{max-width:1280px!important}}@media (width>=1536px){.\!container{max-width:1536px!important}}@media (width>=2000px){.\!container{max-width:2000px!important}}.container{width:100%}@media (width>=375px){.container{max-width:375px}}@media (width>=425px){.container{max-width:425px}}@media (width>=640px){.container{max-width:640px}}@media (width>=768px){.container{max-width:768px}}@media (width>=1024px){.container{max-width:1024px}}@media (width>=1280px){.container{max-width:1280px}}@media (width>=1536px){.container{max-width:1536px}}@media (width>=2000px){.container{max-width:2000px}}.container\!{width:100%!important}@media (width>=375px){.container\!{max-width:375px!important}}@media (width>=425px){.container\!{max-width:425px!important}}@media (width>=640px){.container\!{max-width:640px!important}}@media (width>=768px){.container\!{max-width:768px!important}}@media (width>=1024px){.container\!{max-width:1024px!important}}@media (width>=1280px){.container\!{max-width:1280px!important}}@media (width>=1536px){.container\!{max-width:1536px!important}}@media (width>=2000px){.container\!{max-width:2000px!important}}.m-0\!{margin:calc(var(--spacing)*0)!important}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-4{margin:calc(var(--spacing)*4)}.m-48{margin:calc(var(--spacing)*48)}.m-65{margin:calc(var(--spacing)*65)}.m-97{margin:calc(var(--spacing)*97)}.-mx-4{margin-inline:calc(var(--spacing)*-4)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.-my-6{margin-block:calc(var(--spacing)*-6)}.my-2{margin-block:calc(var(--spacing)*2)}.my-6{margin-block:calc(var(--spacing)*6)}.-mt-0\.5{margin-top:calc(var(--spacing)*-.5)}.-mt-1{margin-top:calc(var(--spacing)*-1)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-7{margin-top:calc(var(--spacing)*7)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-16{margin-top:calc(var(--spacing)*16)}.mt-\[17px\]{margin-top:17px}.mt-auto{margin-top:auto}.-mr-1{margin-right:calc(var(--spacing)*-1)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-1\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.-mb-4{margin-bottom:calc(var(--spacing)*-4)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-7{margin-bottom:calc(var(--spacing)*7)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.mb-\[22px\]{margin-bottom:22px}.-ml-5{margin-left:calc(var(--spacing)*-5)}.ml-0{margin-left:calc(var(--spacing)*0)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-9{margin-left:calc(var(--spacing)*9)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-none{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.menu-dropdown-badge{padding-inline:calc(var(--spacing)*2.5);padding-block:calc(var(--spacing)*.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-brand-500);text-transform:uppercase;border-radius:3.40282e38px;display:block}.menu-dropdown-badge:is(.dark *){color:var(--color-brand-400)}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.\!block{display:block!important}.\!contents{display:contents!important}.\!grid{display:grid!important}.\!hidden{display:none!important}.\!table{display:table!important}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.field-sizing-content{field-sizing:content}.field-sizing-fixed{field-sizing:fixed}.aspect-4\/3{aspect-ratio:4/3}.aspect-21\/9{aspect-ratio:21/9}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1}.custom-scrollbar::-webkit-scrollbar{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.custom-scrollbar::-webkit-scrollbar-track{border-radius:3.40282e38px}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:3.40282e38px}.custom-scrollbar::-webkit-scrollbar-thumb:is(){background-color:var(--color-gray-700)}.menu-item-icon-size svg{width:calc(var(--spacing)*6)!important;height:calc(var(--spacing)*6)!important}.size-1{width:calc(var(--spacing)*1);height:calc(var(--spacing)*1)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-14{width:calc(var(--spacing)*14);height:calc(var(--spacing)*14)}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-9\.5{height:calc(var(--spacing)*9.5)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-48{height:calc(var(--spacing)*48)}.h-64{height:calc(var(--spacing)*64)}.h-90{height:calc(var(--spacing)*90)}.h-\[1\.5px\]{height:1.5px}.h-\[3px\]{height:3px}.h-\[25px\]{height:25px}.h-\[50px\]{height:50px}.h-\[56px\]{height:56px}.h-\[68px\]{height:68px}.h-\[212px\]{height:212px}.h-\[450px\]{height:450px}.h-\[480px\]{height:480px}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing)*32)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[300px\]{max-height:300px}.max-h-\[330px\]{max-height:330px}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-11{min-height:calc(var(--spacing)*11)}.min-h-\[400px\]{min-height:400px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9\.5{width:calc(var(--spacing)*9.5)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-40{width:calc(var(--spacing)*40)}.w-48{width:calc(var(--spacing)*48)}.w-64{width:calc(var(--spacing)*64)}.w-\[3px\]{width:3px}.w-\[23\%\]{width:23%}.w-\[25px\]{width:25px}.w-\[46px\]{width:46px}.w-\[50px\]{width:50px}.w-\[56px\]{width:56px}.w-\[68px\]{width:68px}.w-\[75\%\]{width:75%}.w-\[79\%\]{width:79%}.w-\[90px\]{width:90px}.w-\[120px\]{width:120px}.w-\[252px\]{width:252px}.w-\[260px\]{width:260px}.w-\[290px\]{width:290px}.w-\[350px\]{width:350px}.w-\[500px\]{width:500px}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-1\.5{max-width:calc(var(--spacing)*1.5)}.max-w-2{max-width:calc(var(--spacing)*2)}.max-w-2\.5{max-width:calc(var(--spacing)*2.5)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3{max-width:calc(var(--spacing)*3)}.max-w-3\.5{max-width:calc(var(--spacing)*3.5)}.max-w-4{max-width:calc(var(--spacing)*4)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6{max-width:calc(var(--spacing)*6)}.max-w-8{max-width:calc(var(--spacing)*8)}.max-w-10{max-width:calc(var(--spacing)*10)}.max-w-12{max-width:calc(var(--spacing)*12)}.max-w-14{max-width:calc(var(--spacing)*14)}.max-w-16{max-width:calc(var(--spacing)*16)}.max-w-60{max-width:calc(var(--spacing)*60)}.max-w-\[100px\]{max-width:100px}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[242px\]{max-width:242px}.max-w-\[250px\]{max-width:250px}.max-w-\[290px\]{max-width:290px}.max-w-\[380px\]{max-width:380px}.max-w-\[385px\]{max-width:385px}.max-w-\[420px\]{max-width:420px}.max-w-\[630px\]{max-width:630px}.max-w-\[700px\]{max-width:700px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-screen{max-width:100vw}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[140px\]{min-width:140px}.min-w-\[200px\]{min-width:200px}.min-w-\[280px\]{min-width:280px}.min-w-\[320px\]{min-width:320px}.min-w-\[650px\]{min-width:650px}.min-w-\[1000px\]{min-width:1000px}.min-w-full{min-width:100%}.min-w-screen{min-width:100vw}.flex-1{flex:1}.flex-auto{flex:auto}.flex-initial{flex:0 auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.basis-auto{flex-basis:auto}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.caption-top{caption-side:top}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:0 100%}.origin-bottom-right{transform-origin:100% 100%}.origin-center{transform-origin:50%}.origin-left{transform-origin:0}.origin-right{transform-origin:100%}.origin-top{transform-origin:top}.origin-top-left{transform-origin:0 0}.origin-top-right{transform-origin:100% 0}.-translate-full{--tw-translate-x:-100%;--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-full{--tw-translate-x:100%;--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[120px\]{--tw-translate-x:120px;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-\[95\%\]{--tw-translate-y: -95% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-3d{translate:var(--tw-translate-x)var(--tw-translate-y)var(--tw-translate-z)}.translate-none{translate:none}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.scale-none{scale:none}.-rotate-45{rotate:-45deg}.rotate-180{rotate:180deg}.rotate-none{rotate:none}.transform,.transform-cpu{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.transform-none{transform:none}.animate-none{animation:none}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.resize{resize:both}.resize-none{resize:none}.resize-x{resize:horizontal}.resize-y{resize:vertical}.snap-none{scroll-snap-type:none}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.snap-proximity{--tw-scroll-snap-strictness:proximity}.snap-align-none{scroll-snap-align:none}.snap-center{scroll-snap-align:center}.snap-end{scroll-snap-align:end}.snap-start{scroll-snap-align:start}.snap-always{scroll-snap-stop:always}.snap-normal{scroll-snap-stop:normal}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.list-image-none{list-style-image:none}.appearance-auto{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.columns-auto{columns:auto}.auto-cols-auto{grid-auto-columns:auto}.auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.auto-cols-max{grid-auto-columns:max-content}.auto-cols-min{grid-auto-columns:min-content}.grid-flow-col{grid-auto-flow:column}.grid-flow-col-dense{grid-auto-flow:column dense}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row{grid-auto-flow:row}.grid-flow-row-dense{grid-auto-flow:dense}.auto-rows-auto{grid-auto-rows:auto}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.auto-rows-max{grid-auto-rows:max-content}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-none{grid-template-columns:none}.grid-cols-subgrid{grid-template-columns:subgrid}.grid-rows-none{grid-template-rows:none}.grid-rows-subgrid{grid-template-rows:subgrid}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.place-content-around{place-content:space-around}.place-content-baseline{place-content:baseline start}.place-content-between{place-content:space-between}.place-content-center{place-content:center}.place-content-end{place-content:end}.place-content-evenly{place-content:space-evenly}.place-content-start{place-content:start}.place-content-stretch{place-content:stretch}.place-items-baseline{place-items:baseline}.place-items-center{place-items:center}.place-items-end{place-items:end}.place-items-start{place-items:start}.place-items-stretch{place-items:stretch stretch}.content-around{align-content:space-around}.content-baseline{align-content:baseline}.content-between{align-content:space-between}.content-center{align-content:center}.content-end{align-content:flex-end}.content-evenly{align-content:space-evenly}.content-normal{align-content:normal}.content-start{align-content:flex-start}.content-stretch{align-content:stretch}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-baseline{justify-content:baseline}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-evenly{justify-content:space-evenly}.justify-normal{justify-content:normal}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.justify-items-center{justify-items:center}.justify-items-end{justify-items:end}.justify-items-normal{justify-items:normal}.justify-items-start{justify-items:start}.justify-items-stretch{justify-items:stretch}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-6{column-gap:calc(var(--spacing)*6)}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*-2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*-2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-5{row-gap:calc(var(--spacing)*5)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}.place-self-auto{place-self:auto}.place-self-center{place-self:center}.place-self-end{place-self:end}.place-self-start{place-self:start}.place-self-stretch{place-self:stretch stretch}.self-auto{align-self:auto}.self-baseline{align-self:baseline}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-auto{justify-self:auto}.justify-self-center{justify-self:center}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.justify-self-stretch{justify-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[10\.5px\]{border-radius:10.5px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border\!{border-style:var(--tw-border-style)!important;border-width:1px!important}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[0\.7px\]{border-style:var(--tw-border-style);border-width:.7px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[1\.25px\]{border-style:var(--tw-border-style);border-width:1.25px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-double{--tw-border-style:double;border-style:double}.border-hidden{--tw-border-style:hidden;border-style:hidden}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-light-200{border-color:var(--color-blue-light-200)}.border-blue-light-500{border-color:var(--color-blue-light-500)}.border-brand-300{border-color:var(--color-brand-300)}.border-brand-500{border-color:var(--color-brand-500)}.border-error-200{border-color:var(--color-error-200)}.border-error-500{border-color:var(--color-error-500)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-200\/50{border-color:color-mix(in oklab,var(--color-gray-200)50%,transparent)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-800{border-color:var(--color-gray-800)}.border-gray-900{border-color:var(--color-gray-900)}.border-red-200{border-color:var(--color-red-200)}.border-success-200{border-color:var(--color-success-200)}.border-success-500{border-color:var(--color-success-500)}.border-transparent{border-color:#0000}.border-warning-200{border-color:var(--color-warning-200)}.border-warning-500{border-color:var(--color-warning-500)}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-t-blue-600{border-top-color:var(--color-blue-600)}.border-t-blue-light-500{border-top-color:var(--color-blue-light-500)}.border-t-brand-500{border-top-color:var(--color-brand-500)}.border-t-error-500{border-top-color:var(--color-error-500)}.border-t-gray-900{border-top-color:var(--color-gray-900)}.border-t-success-500{border-top-color:var(--color-success-500)}.border-t-warning-500{border-top-color:var(--color-warning-500)}.border-r-gray-900{border-right-color:var(--color-gray-900)}.menu-item-inactive{color:var(--color-gray-700)}@media (hover:hover){.menu-item-inactive:is(:where(.group):hover *){color:var(--color-gray-700)}.menu-item-inactive:hover{background-color:var(--color-gray-100)}}.menu-item-inactive:is(.dark *){color:var(--color-gray-300)}@media (hover:hover){.menu-item-inactive:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent);color:var(--color-gray-300)}}.menu-dropdown-item-active{background-color:var(--color-brand-50);color:var(--color-brand-500)}.menu-dropdown-item-active:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)12%,transparent);color:var(--color-brand-400)}.menu-dropdown-item-inactive{color:var(--color-gray-700)}@media (hover:hover){.menu-dropdown-item-inactive:hover{background-color:var(--color-gray-100)}}.menu-dropdown-item-inactive:is(.dark *){color:var(--color-gray-300)}@media (hover:hover){.menu-dropdown-item-inactive:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.menu-item-active{background-color:var(--color-brand-50);color:var(--color-brand-500)}.menu-item-active:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)12%,transparent);color:var(--color-brand-400)}.menu-dropdown-badge-inactive{background-color:var(--color-brand-50)}@media (hover:hover){.menu-dropdown-badge-inactive:is(:where(.group):hover *){background-color:var(--color-brand-100)}}.menu-dropdown-badge-inactive:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)15%,transparent)}@media (hover:hover){.menu-dropdown-badge-inactive:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-brand-500)20%,transparent)}}.menu-dropdown-badge-active{background-color:var(--color-brand-100)}.menu-dropdown-badge-active:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)20%,transparent)}.bg-\(--my_variable\){background-color:var(--my_variable)}.bg-\(color\:--my-color\){background-color:var(--my-color)}.bg-\[\#0088cc\]{background-color:#08c}.bg-\[\#B91C1C\]{background-color:#b91c1c}.bg-\[color\:var\(--my-color\)\]{background-color:var(--my-color)}.bg-\[var\(--my_variable\)\]{background-color:var(--my_variable)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-light-50{background-color:var(--color-blue-light-50)}.bg-blue-light-100{background-color:var(--color-blue-light-100)}.bg-blue-light-500{background-color:var(--color-blue-light-500)}.bg-brand-50{background-color:var(--color-brand-50)}.bg-brand-500{background-color:var(--color-brand-500)}.bg-brand-950{background-color:var(--color-brand-950)}.bg-error-50{background-color:var(--color-error-50)}.bg-error-100{background-color:var(--color-error-100)}.bg-error-400{background-color:var(--color-error-400)}.bg-error-500{background-color:var(--color-error-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-100\/50{background-color:color-mix(in oklab,var(--color-gray-100)50%,transparent)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-400\/50{background-color:color-mix(in oklab,var(--color-gray-400)50%,transparent)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-gray-900\/50{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/50,.bg-red-500\/\[50\%\]{background-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}.bg-red-600{background-color:var(--color-red-600)}.bg-success-50{background-color:var(--color-success-50)}.bg-success-100{background-color:var(--color-success-100)}.bg-success-500{background-color:var(--color-success-500)}.bg-success-600{background-color:var(--color-success-600)}.bg-transparent{background-color:#0000}.bg-warning-50{background-color:var(--color-warning-50)}.bg-warning-100{background-color:var(--color-warning-100)}.bg-warning-500{background-color:var(--color-warning-500)}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}.bg-white\/50{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-600{background-color:var(--color-yellow-600)}.-bg-conic,.bg-conic{--tw-gradient-position:in oklab;background-image:conic-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-radial{--tw-gradient-position:in oklab;background-image:radial-gradient(var(--tw-gradient-stops))}.bg-none{background-image:none}.via-none{--tw-gradient-via-stops:initial}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.bg-auto{background-size:auto}.bg-contain{background-size:contain}.bg-cover{background-size:cover}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-content{background-clip:content-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-bottom{background-position:bottom}.bg-center{background-position:50%}.bg-left{background-position:0}.bg-left-bottom{background-position:0 100%}.bg-left-top{background-position:0 0}.bg-right{background-position:100%}.bg-right-bottom{background-position:100% 100%}.bg-right-top{background-position:100% 0}.bg-top{background-position:top}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat{background-repeat:repeat}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-origin-border{background-origin:border-box}.bg-origin-content{background-origin:content-box}.bg-origin-padding{background-origin:padding-box}.fill-current{fill:currentColor}.fill-gray-500{fill:var(--color-gray-500)}.fill-none{fill:none}.fill-white{fill:var(--color-white)}.stroke-current{stroke:currentColor}.stroke-gray-500{stroke:var(--color-gray-500)}.stroke-none{stroke:none}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-fill{object-fit:fill}.object-none{object-fit:none}.object-scale-down{object-fit:scale-down}.object-bottom{object-position:bottom}.object-center{object-position:center}.object-left{object-position:left}.object-left-bottom{object-position:left bottom}.object-left-top{object-position:left top}.object-right{object-position:right}.object-right-bottom{object-position:right bottom}.object-right-top{object-position:right top}.object-top{object-position:top}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-3\.5{padding:calc(var(--spacing)*3.5)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-7{padding:calc(var(--spacing)*7)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.p-48{padding:calc(var(--spacing)*48)}.p-97{padding:calc(var(--spacing)*97)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-4\.5{padding-inline:calc(var(--spacing)*4.5)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-7{padding-inline:calc(var(--spacing)*7)}.px-8{padding-inline:calc(var(--spacing)*8)}.px-\[7px\]{padding-inline:7px}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\.5{padding-block:calc(var(--spacing)*3.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.py-\[4\.5px\]{padding-block:4.5px}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-10{padding-top:calc(var(--spacing)*10)}.pt-16{padding-top:calc(var(--spacing)*16)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pr-11{padding-right:calc(var(--spacing)*11)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-16{padding-right:calc(var(--spacing)*16)}.pr-\[84px\]{padding-right:84px}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-9{padding-bottom:calc(var(--spacing)*9)}.pb-11{padding-bottom:calc(var(--spacing)*11)}.pb-20{padding-bottom:calc(var(--spacing)*20)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-2\.5{padding-left:calc(var(--spacing)*2.5)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-3\.5{padding-left:calc(var(--spacing)*3.5)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-12{padding-left:calc(var(--spacing)*12)}.pl-\[62px\]{padding-left:62px}.pl-\[84px\]{padding-left:84px}.text-center{text-align:center}.text-end{text-align:end}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.align-bottom{vertical-align:bottom}.align-middle{vertical-align:middle}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.align-text-bottom{vertical-align:text-bottom}.align-text-top{vertical-align:text-top}.align-top{vertical-align:top}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-theme-sm{font-size:var(--text-theme-sm);line-height:var(--tw-leading,var(--text-theme-sm--line-height))}.text-theme-xl{font-size:var(--text-theme-xl);line-height:var(--tw-leading,var(--text-theme-xl--line-height))}.text-theme-xs{font-size:var(--text-theme-xs);line-height:var(--tw-leading,var(--text-theme-xs--line-height))}.text-title-md{font-size:var(--text-title-md);line-height:var(--tw-leading,var(--text-title-md--line-height))}.text-title-sm{font-size:var(--text-title-sm);line-height:var(--tw-leading,var(--text-title-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-\[20px\]{--tw-leading:20px;line-height:20px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.-tracking-\[0\.2px\]{--tw-tracking: -.2px ;letter-spacing:-.2px}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.text-nowrap{text-wrap:nowrap}.text-pretty{text-wrap:pretty}.text-wrap{text-wrap:wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.overflow-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.hyphens-manual{-webkit-hyphens:manual;hyphens:manual}.hyphens-none{-webkit-hyphens:none;hyphens:none}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.menu-item-icon-inactive{color:var(--color-gray-500)}@media (hover:hover){.menu-item-icon-inactive:is(:where(.group):hover *){color:var(--color-gray-700)}}.menu-item-icon-inactive:is(.dark *){color:var(--color-gray-400)}@media (hover:hover){.menu-item-icon-inactive:is(.dark *):is(:where(.group):hover *){color:var(--color-gray-300)}}.menu-item-icon-active{color:var(--color-brand-500)}.menu-item-icon-active:is(.dark *){color:var(--color-brand-400)}.\[color\:red\]{color:red}.\[color\:red\]\/50{color:#ff000080}.\[color\:red\]\/50\!{color:#ff000080!important}.text-amber-500{color:var(--color-amber-500)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-blue-light-500{color:var(--color-blue-light-500)}.text-blue-light-600{color:var(--color-blue-light-600)}.text-brand-500{color:var(--color-brand-500)}.text-brand-600{color:var(--color-brand-600)}.text-error-500{color:var(--color-error-500)}.text-error-600{color:var(--color-error-600)}.text-gray-100{color:var(--color-gray-100)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-purple-500{color:var(--color-purple-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-success-500{color:var(--color-success-500)}.text-success-600{color:var(--color-success-600)}.text-warning-500{color:var(--color-warning-500)}.text-warning-600{color:var(--color-warning-600)}.text-white{color:var(--color-white)}.text-white\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}.text-white\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}.text-white\/90{color:color-mix(in oklab,var(--color-white)90%,transparent)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-900{color:var(--color-yellow-900)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.font-stretch-condensed{font-stretch:75%}.font-stretch-expanded{font-stretch:125%}.font-stretch-extra-condensed{font-stretch:62.5%}.font-stretch-extra-expanded{font-stretch:150%}.font-stretch-normal{font-stretch:100%}.font-stretch-semi-condensed{font-stretch:87.5%}.font-stretch-semi-expanded{font-stretch:112.5%}.font-stretch-ultra-condensed{font-stretch:50%}.font-stretch-ultra-expanded{font-stretch:200%}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-dashed{text-decoration-style:dashed}.decoration-dotted{text-decoration-style:dotted}.decoration-double{text-decoration-style:double}.decoration-solid{text-decoration-style:solid}.decoration-wavy{text-decoration-style:wavy}.decoration-auto{text-decoration-thickness:auto}.decoration-from-font{text-decoration-thickness:from-font}.underline-offset-auto{text-underline-offset:auto}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.accent-auto{accent-color:auto}.scheme-dark{color-scheme:dark}.scheme-light{color-scheme:light}.scheme-light-dark{color-scheme:light dark}.scheme-normal{color-scheme:normal}.scheme-only-dark{color-scheme:dark only}.scheme-only-light{color-scheme:light only}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.opacity-100{opacity:1}.mix-blend-plus-darker{mix-blend-mode:plus-darker}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-lg{--tw-shadow:0px 12px 16px -4px var(--tw-shadow-color,#10182814),0px 4px 6px -2px var(--tw-shadow-color,#10182808);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-md{--tw-shadow:0px 4px 8px -2px var(--tw-shadow-color,#1018281a),0px 2px 4px -2px var(--tw-shadow-color,#1018280f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-sm{--tw-shadow:0px 1px 3px 0px var(--tw-shadow-color,#1018281a),0px 1px 2px 0px var(--tw-shadow-color,#1018280f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-theme-xs{--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018280d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-3{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-initial{--tw-shadow-color:initial}.ring-brand-500\/10{--tw-ring-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.ring-gray-300{--tw-ring-color:var(--color-gray-300)}.inset-shadow-initial{--tw-inset-shadow-color:initial}.outline-hidden{outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-none{--tw-blur: ;filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-none{--tw-drop-shadow: ;filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hue-rotate-180{--tw-hue-rotate:hue-rotate(180deg);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.\!invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\[32px\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.transition-discrete{transition-behavior:allow-discrete}.transition-normal{transition-behavior:normal}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-auto{will-change:auto}.will-change-contents{will-change:contents}.will-change-scroll{will-change:scroll-position}.will-change-transform{will-change:transform}.contain-inline-size{--tw-contain-size:inline-size;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-paint{--tw-contain-paint:paint;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-size{--tw-contain-size:size;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-style{--tw-contain-style:style;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.contain-content{contain:content}.contain-none{contain:none}.contain-strict{contain:strict}.content-none{--tw-content:none;content:none}.forced-color-adjust-auto{forced-color-adjust:auto}.forced-color-adjust-none{forced-color-adjust:none}.outline-dashed{--tw-outline-style:dashed;outline-style:dashed}.outline-dotted{--tw-outline-style:dotted;outline-style:dotted}.outline-double{--tw-outline-style:double;outline-style:double}.outline-none{--tw-outline-style:none;outline-style:none}.outline-solid{--tw-outline-style:solid;outline-style:solid}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\[a-zA-Z0-9\:\\\\-\\\\\._\$\]{a-zA-Z0-9:\\-\\.$}.\[k\:K\]{k:K}.\[vite\:css\]{vite:css}.\[vite\:html\]{vite:html}.backface-hidden{backface-visibility:hidden}.backface-visible{backface-visibility:visible}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.duration-initial{--tw-duration:initial}.ease-initial{--tw-ease:initial}.perspective-none{perspective:none}.perspective-origin-bottom{perspective-origin:bottom}.perspective-origin-bottom-left{perspective-origin:0 100%}.perspective-origin-bottom-right{perspective-origin:100% 100%}.perspective-origin-center{perspective-origin:50%}.perspective-origin-left{perspective-origin:0}.perspective-origin-right{perspective-origin:100%}.perspective-origin-top{perspective-origin:top}.perspective-origin-top-left{perspective-origin:0 0}.perspective-origin-top-right{perspective-origin:100% 0}.ring-inset{--tw-ring-inset:inset}.transform-3d{transform-style:preserve-3d}.transform-border{transform-box:border-box}.transform-content{transform-box:content-box}.transform-fill{transform-box:fill-box}.transform-flat{transform-style:flat}.transform-stroke{transform-box:stroke-box}.transform-view{transform-box:view-box}@media (hover:hover){.group-hover\:bg-amber-100:is(:where(.group):hover *){background-color:var(--color-amber-100)}.group-hover\:bg-blue-100:is(:where(.group):hover *){background-color:var(--color-blue-100)}.group-hover\:bg-green-100:is(:where(.group):hover *){background-color:var(--color-green-100)}.group-hover\:bg-purple-100:is(:where(.group):hover *){background-color:var(--color-purple-100)}.group-hover\:fill-gray-700:is(:where(.group):hover *){fill:var(--color-gray-700)}.group-hover\:text-gray-400:is(:where(.group):hover *){color:var(--color-gray-400)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\:mr-5::file-selector-button{margin-right:calc(var(--spacing)*5)}.file\:border-collapse::file-selector-button{border-collapse:collapse}.file\:cursor-pointer::file-selector-button{cursor:pointer}.file\:rounded-l-lg::file-selector-button{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:border-r::file-selector-button{border-right-style:var(--tw-border-style);border-right-width:1px}.file\:border-solid::file-selector-button{--tw-border-style:solid;border-style:solid}.file\:border-gray-200::file-selector-button{border-color:var(--color-gray-200)}.file\:bg-gray-50::file-selector-button{background-color:var(--color-gray-50)}.file\:py-3::file-selector-button{padding-block:calc(var(--spacing)*3)}.file\:pr-3::file-selector-button{padding-right:calc(var(--spacing)*3)}.file\:pl-3\.5::file-selector-button{padding-left:calc(var(--spacing)*3.5)}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:text-gray-700::file-selector-button{color:var(--color-gray-700)}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-0:before{content:var(--tw-content);top:calc(var(--spacing)*0)}.before\:top-1\/2:before{content:var(--tw-content);top:50%}.before\:top-full:before{content:var(--tw-content);top:100%}.before\:-right-4:before{content:var(--tw-content);right:calc(var(--spacing)*-4)}.before\:right-full:before{content:var(--tw-content);right:100%}.before\:bottom-full:before{content:var(--tw-content);bottom:100%}.before\:left-1\/2:before{content:var(--tw-content);left:50%}.before\:left-full:before{content:var(--tw-content);left:100%}.before\:-mt-1:before{content:var(--tw-content);margin-top:calc(var(--spacing)*-1)}.before\:-mr-1:before{content:var(--tw-content);margin-right:calc(var(--spacing)*-1)}.before\:-mb-1:before{content:var(--tw-content);margin-bottom:calc(var(--spacing)*-1)}.before\:-ml-1:before{content:var(--tw-content);margin-left:calc(var(--spacing)*-1)}.before\:-translate-x-1\/2:before{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:-translate-y-1\/2:before{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.before\:border-4:before{content:var(--tw-content);border-style:var(--tw-border-style);border-width:4px}.before\:border-\[13px\]:before{content:var(--tw-content);border-style:var(--tw-border-style);border-width:13px}.before\:border-transparent:before{content:var(--tw-content);border-color:#0000}.before\:border-t-brand-500:before{content:var(--tw-content);border-top-color:var(--color-brand-500)}.before\:border-t-error-500:before{content:var(--tw-content);border-top-color:var(--color-error-500)}.before\:border-t-gray-900:before{content:var(--tw-content);border-top-color:var(--color-gray-900)}.before\:border-t-success-500:before{content:var(--tw-content);border-top-color:var(--color-success-500)}.before\:border-t-warning-500:before{content:var(--tw-content);border-top-color:var(--color-warning-500)}.before\:border-r-gray-900:before{content:var(--tw-content);border-right-color:var(--color-gray-900)}.before\:border-b-gray-900:before{content:var(--tw-content);border-bottom-color:var(--color-gray-900)}.before\:border-l-brand-500:before{content:var(--tw-content);border-left-color:var(--color-brand-500)}.before\:border-l-error-500:before{content:var(--tw-content);border-left-color:var(--color-error-500)}.before\:border-l-gray-900:before{content:var(--tw-content);border-left-color:var(--color-gray-900)}.before\:border-l-success-500:before{content:var(--tw-content);border-left-color:var(--color-success-500)}.before\:border-l-warning-500:before{content:var(--tw-content);border-left-color:var(--color-warning-500)}.before\:content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-right-4:after{content:var(--tw-content);right:calc(var(--spacing)*-4)}.after\:bottom-0:after{content:var(--tw-content);bottom:calc(var(--spacing)*0)}.after\:border-\[13px\]:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:13px}.after\:border-transparent:after{content:var(--tw-content);border-color:#0000}.after\:border-b-brand-500:after{content:var(--tw-content);border-bottom-color:var(--color-brand-500)}.after\:border-b-error-500:after{content:var(--tw-content);border-bottom-color:var(--color-error-500)}.after\:border-b-success-500:after{content:var(--tw-content);border-bottom-color:var(--color-success-500)}.after\:border-b-warning-500:after{content:var(--tw-content);border-bottom-color:var(--color-warning-500)}.after\:border-l-brand-500:after{content:var(--tw-content);border-left-color:var(--color-brand-500)}.after\:border-l-error-500:after{content:var(--tw-content);border-left-color:var(--color-error-500)}.after\:border-l-success-500:after{content:var(--tw-content);border-left-color:var(--color-success-500)}.after\:border-l-warning-500:after{content:var(--tw-content);border-left-color:var(--color-warning-500)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.checked\:border-transparent:checked{border-color:#0000}.checked\:bg-brand-500:checked{background-color:var(--color-brand-500)}@media (hover:hover){.hover\:border-brand-300:hover{border-color:var(--color-brand-300)}.hover\:border-brand-500:hover{border-color:var(--color-brand-500)}.hover\:border-gray-200:hover{border-color:var(--color-gray-200)}.hover\:border-gray-600:hover{border-color:var(--color-gray-600)}.hover\:bg-blue-light-50:hover{background-color:var(--color-blue-light-50)}.hover\:bg-blue-light-600:hover{background-color:var(--color-blue-light-600)}.hover\:bg-brand-50:hover{background-color:var(--color-brand-50)}.hover\:bg-brand-500:hover{background-color:var(--color-brand-500)}.hover\:bg-brand-600:hover{background-color:var(--color-brand-600)}.hover\:bg-error-50:hover{background-color:var(--color-error-50)}.hover\:bg-error-600:hover{background-color:var(--color-error-600)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-success-600:hover{background-color:var(--color-success-600)}.hover\:bg-warning-600:hover{background-color:var(--color-warning-600)}.hover\:bg-yellow-700:hover{background-color:var(--color-yellow-700)}.hover\:text-blue-light-600:hover{color:var(--color-blue-light-600)}.hover\:text-brand-500:hover{color:var(--color-brand-500)}.hover\:text-brand-600:hover{color:var(--color-brand-600)}.hover\:text-error-600:hover{color:var(--color-error-600)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-success-600:hover{color:var(--color-success-600)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:file\:bg-gray-100:hover::file-selector-button{background-color:var(--color-gray-100)}}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-brand-300:focus{border-color:var(--color-brand-300)}.focus\:border-brand-500:focus{border-color:var(--color-brand-500)}.focus\:border-error-300:focus{border-color:var(--color-error-300)}.focus\:border-success-300:focus{border-color:var(--color-success-300)}.focus\:shadow-focus-ring:focus{--tw-shadow:0px 0px 0px 4px var(--tw-shadow-color,#465fff1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-3:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-blue-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}.focus\:ring-brand-500:focus{--tw-ring-color:var(--color-brand-500)}.focus\:ring-brand-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.focus\:ring-brand-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-brand-500)20%,transparent)}.focus\:ring-error-500\/10:focus{--tw-ring-color:color-mix(in oklab,var(--color-error-500)10%,transparent)}.focus\:ring-error-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-error-500)20%,transparent)}.focus\:ring-success-500\/20:focus{--tw-ring-color:color-mix(in oklab,var(--color-success-500)20%,transparent)}.focus\:outline-hidden:focus{outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus\:file\:ring-brand-300:focus::file-selector-button{--tw-ring-color:var(--color-brand-300)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-brand-300:disabled{background-color:var(--color-brand-300)}.disabled\:bg-success-300:disabled{background-color:var(--color-success-300)}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media (width>=375px){.\32xsm\:w-\[307px\]{width:307px}.\32xsm\:gap-3{gap:calc(var(--spacing)*3)}}@media (width>=425px){.xsm\:w-\[358px\]{width:358px}}@media (width>=640px){.sm\:top-6{top:calc(var(--spacing)*6)}.sm\:right-6{right:calc(var(--spacing)*6)}.sm\:col-span-1{grid-column:span 1/span 1}.sm\:-mx-6{margin-inline:calc(var(--spacing)*-6)}.sm\:mb-8{margin-bottom:calc(var(--spacing)*8)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-11{height:calc(var(--spacing)*11)}.sm\:w-11{width:calc(var(--spacing)*11)}.sm\:w-\[228px\]{width:228px}.sm\:w-\[361px\]{width:361px}.sm\:w-auto{width:auto}.sm\:w-fit{width:fit-content}.sm\:max-w-\[472px\]{max-width:472px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:justify-center{justify-content:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-normal{justify-content:normal}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-5{gap:calc(var(--spacing)*5)}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:gap-8{gap:calc(var(--spacing)*8)}:where(.sm\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.sm\:p-0{padding:calc(var(--spacing)*0)}.sm\:p-2\.5{padding:calc(var(--spacing)*2.5)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:px-3\.5{padding-inline:calc(var(--spacing)*3.5)}.sm\:px-5{padding-inline:calc(var(--spacing)*5)}.sm\:px-6{padding-inline:calc(var(--spacing)*6)}.sm\:py-2{padding-block:calc(var(--spacing)*2)}.sm\:py-2\.5{padding-block:calc(var(--spacing)*2.5)}.sm\:py-5{padding-block:calc(var(--spacing)*5)}.sm\:pt-6{padding-top:calc(var(--spacing)*6)}.sm\:pt-10{padding-top:calc(var(--spacing)*10)}.sm\:text-start{text-align:start}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-title-md{font-size:var(--text-title-md);line-height:var(--tw-leading,var(--text-title-md--line-height))}}@media (width>=768px){.md\:w-\[668px\]{width:668px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-6{gap:calc(var(--spacing)*6)}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.md\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:pb-24{padding-bottom:calc(var(--spacing)*24)}}@media (width>=1024px){.lg\:right-0{right:calc(var(--spacing)*0)}.lg\:col-span-1{grid-column:span 1/span 1}.lg\:mt-0{margin-top:calc(var(--spacing)*0)}.lg\:mb-6{margin-bottom:calc(var(--spacing)*6)}.lg\:mb-7{margin-bottom:calc(var(--spacing)*7)}.lg\:ml-\[90px\]{margin-left:90px}.lg\:ml-\[290px\]{margin-left:290px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:inline-flex{display:inline-flex}.lg\:h-11{height:calc(var(--spacing)*11)}.lg\:w-1\/2{width:50%}.lg\:w-11{width:calc(var(--spacing)*11)}.lg\:w-\[634px\]{width:634px}.lg\:w-auto{width:auto}.lg\:translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:justify-between{justify-content:space-between}.lg\:justify-center{justify-content:center}.lg\:justify-end{justify-content:flex-end}.lg\:justify-normal{justify-content:normal}.lg\:justify-start{justify-content:flex-start}.lg\:gap-7{gap:calc(var(--spacing)*7)}.lg\:border{border-style:var(--tw-border-style);border-width:1px}.lg\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.lg\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.lg\:p-6{padding:calc(var(--spacing)*6)}.lg\:p-10{padding:calc(var(--spacing)*10)}.lg\:p-11{padding:calc(var(--spacing)*11)}.lg\:px-0{padding-inline:calc(var(--spacing)*0)}.lg\:px-6{padding-inline:calc(var(--spacing)*6)}.lg\:py-4{padding-block:calc(var(--spacing)*4)}.lg\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.lg\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (width>=1280px){.xl\:order-2{order:2}.xl\:order-3{order:3}.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:block{display:block}.xl\:flex{display:flex}.xl\:w-\[393px\]{width:393px}.xl\:w-\[430px\]{width:430px}.xl\:max-w-\[450px\]{max-width:450px}.xl\:min-w-full{min-width:100%}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:flex-row{flex-direction:row}.xl\:items-center{align-items:center}.xl\:justify-between{justify-content:space-between}.xl\:justify-end{justify-content:flex-end}.xl\:gap-3{gap:calc(var(--spacing)*3)}.xl\:gap-6{gap:calc(var(--spacing)*6)}.xl\:p-8{padding:calc(var(--spacing)*8)}.xl\:px-10{padding-inline:calc(var(--spacing)*10)}.xl\:py-12{padding-block:calc(var(--spacing)*12)}.xl\:text-left{text-align:left}.xl\:text-title-2xl{font-size:var(--text-title-2xl);line-height:var(--tw-leading,var(--text-title-2xl--line-height))}}@media (width>=1440px){.min-\[1440px\]\:max-w-\[90\%\]{max-width:90%}}@media (width>=1536px){.\32xl\:w-\[554px\]{width:554px}.\32xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.\32xl\:gap-x-32{column-gap:calc(var(--spacing)*32)}}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}:where(.dark\:divide-gray-700:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-700)}:where(.dark\:divide-gray-800:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-800)}:where(.dark\:divide-white\/\[0\.05\]:is(.dark *)>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:border-blue-800:is(.dark *){border-color:var(--color-blue-800)}.dark\:border-blue-light-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-blue-light-500)30%,transparent)}.dark\:border-brand-500:is(.dark *){border-color:var(--color-brand-500)}.dark\:border-brand-800:is(.dark *){border-color:var(--color-brand-800)}.dark\:border-error-500:is(.dark *){border-color:var(--color-error-500)}.dark\:border-error-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-error-500)30%,transparent)}.dark\:border-gray-500:is(.dark *){border-color:var(--color-gray-500)}.dark\:border-gray-700:is(.dark *){border-color:var(--color-gray-700)}.dark\:border-gray-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}.dark\:border-gray-800:is(.dark *){border-color:var(--color-gray-800)}.dark\:border-gray-900:is(.dark *){border-color:var(--color-gray-900)}.dark\:border-red-800:is(.dark *){border-color:var(--color-red-800)}.dark\:border-success-500:is(.dark *){border-color:var(--color-success-500)}.dark\:border-success-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-success-500)30%,transparent)}.dark\:border-warning-500\/30:is(.dark *){border-color:color-mix(in oklab,var(--color-warning-500)30%,transparent)}.dark\:border-white:is(.dark *){border-color:var(--color-white)}.dark\:border-white\/10:is(.dark *){border-color:color-mix(in oklab,var(--color-white)10%,transparent)}.dark\:border-white\/\[0\.05\]:is(.dark *){border-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:border-yellow-800:is(.dark *){border-color:var(--color-yellow-800)}.dark\:bg-\[\#1e2636\]:is(.dark *){background-color:#1e2636}.dark\:bg-amber-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}.dark\:bg-blue-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}.dark\:bg-blue-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}.dark\:bg-blue-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}.dark\:bg-blue-light-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-light-500)15%,transparent)}.dark\:bg-blue-light-500\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-light-500)20%,transparent)}.dark\:bg-brand-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.dark\:bg-brand-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-500)15%,transparent)}.dark\:bg-brand-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-brand-900)20%,transparent)}.dark\:bg-error-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-error-500)15%,transparent)}.dark\:bg-gray-400:is(.dark *){background-color:var(--color-gray-400)}.dark\:bg-gray-500:is(.dark *){background-color:var(--color-gray-500)}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-800\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-gray-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-900)30%,transparent)}.dark\:bg-gray-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}.dark\:bg-gray-dark:is(.dark *){background-color:var(--color-gray-dark)}.dark\:bg-green-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}.dark\:bg-green-600:is(.dark *){background-color:var(--color-green-600)}.dark\:bg-green-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}.dark\:bg-purple-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}.dark\:bg-red-600:is(.dark *){background-color:var(--color-red-600)}.dark\:bg-red-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}.dark\:bg-red-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}.dark\:bg-red-900\/40:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)40%,transparent)}.dark\:bg-success-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-success-500)15%,transparent)}.dark\:bg-warning-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-warning-500)15%,transparent)}.dark\:bg-white\/3:is(.dark *){background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.dark\:bg-white\/5:is(.dark *){background-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:bg-white\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-white)10%,transparent)}.dark\:bg-white\/\[0\.03\]:is(.dark *){background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.dark\:bg-yellow-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)20%,transparent)}.dark\:bg-yellow-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)30%,transparent)}.dark\:fill-gray-400:is(.dark *){fill:var(--color-gray-400)}.dark\:fill-gray-800:is(.dark *){fill:var(--color-gray-800)}.dark\:stroke-gray-400:is(.dark *){stroke:var(--color-gray-400)}.dark\:text-blue-200:is(.dark *){color:var(--color-blue-200)}.dark\:text-blue-300:is(.dark *){color:var(--color-blue-300)}.dark\:text-blue-400:is(.dark *){color:var(--color-blue-400)}.dark\:text-blue-light-400:is(.dark *){color:var(--color-blue-light-400)}.dark\:text-blue-light-500:is(.dark *){color:var(--color-blue-light-500)}.dark\:text-brand-400:is(.dark *){color:var(--color-brand-400)}.dark\:text-error-400:is(.dark *){color:var(--color-error-400)}.dark\:text-error-500:is(.dark *){color:var(--color-error-500)}.dark\:text-gray-200:is(.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:is(.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:is(.dark *){color:var(--color-gray-600)}.dark\:text-green-400:is(.dark *){color:var(--color-green-400)}.dark\:text-orange-400:is(.dark *){color:var(--color-orange-400)}.dark\:text-red-200:is(.dark *){color:var(--color-red-200)}.dark\:text-red-300:is(.dark *){color:var(--color-red-300)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-success-400:is(.dark *){color:var(--color-success-400)}.dark\:text-success-500:is(.dark *){color:var(--color-success-500)}.dark\:text-warning-500:is(.dark *){color:var(--color-warning-500)}.dark\:text-white:is(.dark *){color:var(--color-white)}.dark\:text-white\/60:is(.dark *){color:color-mix(in oklab,var(--color-white)60%,transparent)}.dark\:text-white\/80:is(.dark *){color:color-mix(in oklab,var(--color-white)80%,transparent)}.dark\:text-white\/90:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)}.dark\:text-yellow-200:is(.dark *){color:var(--color-yellow-200)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:text-yellow-400:is(.dark *){color:var(--color-yellow-400)}.dark\:ring-gray-700:is(.dark *){--tw-ring-color:var(--color-gray-700)}@media (hover:hover){.dark\:group-hover\:bg-amber-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}.dark\:group-hover\:bg-blue-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}.dark\:group-hover\:bg-green-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}.dark\:group-hover\:bg-purple-500\/20:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}.dark\:group-hover\:fill-gray-300:is(.dark *):is(:where(.group):hover *){fill:var(--color-gray-300)}}.dark\:file\:border-gray-800:is(.dark *)::file-selector-button{border-color:var(--color-gray-800)}.dark\:file\:bg-white\/\[0\.03\]:is(.dark *)::file-selector-button{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.dark\:file\:text-gray-400:is(.dark *)::file-selector-button{color:var(--color-gray-400)}.dark\:placeholder\:text-gray-400:is(.dark *)::placeholder{color:var(--color-gray-400)}.dark\:placeholder\:text-white\/30:is(.dark *)::placeholder{color:color-mix(in oklab,var(--color-white)30%,transparent)}@media (hover:hover){.dark\:hover\:border-brand-500:is(.dark *):hover{border-color:var(--color-brand-500)}.dark\:hover\:border-gray-600:is(.dark *):hover{border-color:var(--color-gray-600)}.dark\:hover\:border-gray-800:is(.dark *):hover{border-color:var(--color-gray-800)}.dark\:hover\:bg-blue-light-500\/15:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-light-500)15%,transparent)}.dark\:hover\:bg-brand-500:is(.dark *):hover{background-color:var(--color-brand-500)}.dark\:hover\:bg-brand-500\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-brand-500)10%,transparent)}.dark\:hover\:bg-brand-500\/\[0\.12\]:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-brand-500)12%,transparent)}.dark\:hover\:bg-brand-600:is(.dark *):hover{background-color:var(--color-brand-600)}.dark\:hover\:bg-error-500\/15:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-error-500)15%,transparent)}.dark\:hover\:bg-gray-600:is(.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-gray-700:is(.dark *):hover{background-color:var(--color-gray-700)}.dark\:hover\:bg-gray-800:is(.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-red-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}.dark\:hover\:bg-white\/5:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}.dark\:hover\:bg-white\/10:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}.dark\:hover\:bg-white\/\[0\.03\]:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.hover\:dark\:\!bg-gray-100:hover:is(.dark *){background-color:var(--color-gray-100)!important}.hover\:dark\:bg-gray-100:hover:is(.dark *){background-color:var(--color-gray-100)}.dark\:hover\:text-blue-light-300:is(.dark *):hover{color:var(--color-blue-light-300)}.dark\:hover\:text-brand-400:is(.dark *):hover{color:var(--color-brand-400)}.dark\:hover\:text-error-300:is(.dark *):hover{color:var(--color-error-300)}.dark\:hover\:text-gray-200:is(.dark *):hover{color:var(--color-gray-200)}.dark\:hover\:text-gray-300:is(.dark *):hover{color:var(--color-gray-300)}.dark\:hover\:text-red-200:is(.dark *):hover{color:var(--color-red-200)}.dark\:hover\:text-red-300:is(.dark *):hover{color:var(--color-red-300)}.dark\:hover\:text-success-300:is(.dark *):hover{color:var(--color-success-300)}.dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}.dark\:hover\:text-white\/80:is(.dark *):hover{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.dark\:focus\:border-brand-300:is(.dark *):focus{border-color:var(--color-brand-300)}.dark\:focus\:border-brand-800:is(.dark *):focus{border-color:var(--color-brand-800)}.dark\:focus\:border-error-800:is(.dark *):focus{border-color:var(--color-error-800)}.dark\:focus\:border-success-800:is(.dark *):focus{border-color:var(--color-success-800)}input[type=date]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}input[type=time]::-webkit-inner-spin-button{-webkit-appearance:none;display:none}input[type=date]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=time]::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}}@keyframes slide-in-right{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.dark .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#344054}.tableCheckbox:checked~span span{opacity:1}.tableCheckbox:checked~span{border-color:var(--color-brand-500);background-color:var(--color-brand-500)}.apexcharts-legend-text{color:var(--color-gray-700)!important}.apexcharts-text{fill:var(--color-gray-700)!important}.apexcharts-text:is(.dark *){fill:var(--color-gray-400)!important}.apexcharts-tooltip.apexcharts-theme-light{gap:calc(var(--spacing)*1);padding:calc(var(--spacing)*3);--tw-shadow:0px 1px 3px 0px var(--tw-shadow-color,#1018281a),0px 1px 2px 0px var(--tw-shadow-color,#1018280f);border-radius:var(--radius-lg)!important;border-color:var(--color-gray-200)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.apexcharts-tooltip.apexcharts-theme-light:is(.dark *){border-color:var(--color-gray-800)!important;background-color:var(--color-gray-900)!important}.apexcharts-tooltip-marker{width:6px;height:6px;margin-right:6px}.apexcharts-legend-text{padding-left:calc(var(--spacing)*5)!important;color:var(--color-gray-700)!important}.apexcharts-legend-text:is(.dark *){color:var(--color-gray-400)!important}.apexcharts-tooltip-series-group,.apexcharts-tooltip-y-group{padding:calc(var(--spacing)*0)!important}.apexcharts-tooltip-title{--tw-leading:calc(var(--spacing)*4);margin-bottom:calc(var(--spacing)*0)!important;border-bottom-style:var(--tw-border-style)!important;padding:calc(var(--spacing)*0)!important;font-size:10px!important;line-height:calc(var(--spacing)*4)!important;color:var(--color-gray-800)!important;background-color:#0000!important;border-bottom-width:0!important}.apexcharts-tooltip-title:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}.apexcharts-tooltip-text{font-size:var(--text-theme-xs)!important;line-height:var(--tw-leading,var(--text-theme-xs--line-height))!important;color:var(--color-gray-700)!important}.apexcharts-tooltip-text:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}.apexcharts-tooltip-text-y-value{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)!important}.apexcharts-gridline{stroke:var(--color-gray-100)!important}.apexcharts-gridline:is(.dark *){stroke:var(--color-gray-800)!important}#chartTwo .apexcharts-datalabels-group{--tw-translate-y:calc(var(--spacing)*-24);translate:var(--tw-translate-x)var(--tw-translate-y)!important}#chartTwo .apexcharts-datalabels-group .apexcharts-text{--tw-font-weight:var(--font-weight-semibold);fill:var(--color-gray-800)!important;font-weight:var(--font-weight-semibold)!important}#chartTwo .apexcharts-datalabels-group .apexcharts-text:is(.dark *){fill:color-mix(in oklab,var(--color-white)90%,transparent)!important}#chartDarkStyle .apexcharts-datalabels-group .apexcharts-text{--tw-font-weight:var(--font-weight-semibold);fill:var(--color-gray-800)!important;font-weight:var(--font-weight-semibold)!important}#chartDarkStyle .apexcharts-datalabels-group .apexcharts-text:is(.dark *){fill:color-mix(in oklab,var(--color-white)90%,transparent)!important}#chartSixteen .apexcharts-legend{padding:calc(var(--spacing)*0)!important;padding-left:calc(var(--spacing)*6)!important}.jvectormap-container{background-color:var(--color-gray-50)!important}.jvectormap-container:is(.dark *){background-color:var(--color-gray-900)!important}.jvectormap-region.jvectormap-element{fill:var(--color-gray-300)!important}@media (hover:hover){.jvectormap-region.jvectormap-element:hover{fill:var(--color-brand-500)!important}}.jvectormap-region.jvectormap-element:is(.dark *){fill:var(--color-gray-700)!important}@media (hover:hover){.jvectormap-region.jvectormap-element:is(.dark *):hover{fill:var(--color-brand-500)!important}}.jvectormap-marker.jvectormap-element{stroke:var(--color-gray-200)!important}.jvectormap-marker.jvectormap-element:is(.dark *){stroke:var(--color-gray-800)!important}.jvectormap-tip{--tw-border-style:none;background-color:var(--color-brand-500)!important;padding-inline:calc(var(--spacing)*2)!important;padding-block:calc(var(--spacing)*1)!important;border-style:none!important}.jvectormap-zoomin,.jvectormap-zoomout{display:none!important}.stocks-slider-outer .swiper-button-next:after,.stocks-slider-outer .swiper-button-prev:after{display:none}.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev{margin-top:calc(var(--spacing)*0);height:calc(var(--spacing)*8);width:calc(var(--spacing)*9);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-radius:3.40282e38px;color:var(--color-gray-700)!important;position:static!important}@media (hover:hover){:is(.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev):hover{background-color:var(--color-gray-100)}}:is(.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev):is(.dark *){border-color:color-mix(in oklab,var(--color-white)3%,transparent);background-color:var(--color-gray-800);color:var(--color-gray-400)!important}@media (hover:hover){:is(.stocks-slider-outer .swiper-button-next,.stocks-slider-outer .swiper-button-prev):is(.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent);color:color-mix(in oklab,var(--color-white)90%,transparent)!important}}.stocks-slider-outer .swiper-button-next.swiper-button-disabled,.stocks-slider-outer .swiper-button-prev.swiper-button-disabled{background-color:var(--color-white);opacity:.5}:is(.stocks-slider-outer .swiper-button-next.swiper-button-disabled,.stocks-slider-outer .swiper-button-prev.swiper-button-disabled):is(.dark *){background-color:var(--color-gray-900)}.stocks-slider-outer .swiper-button-next svg,.stocks-slider-outer .swiper-button-prev svg{width:auto!important;height:auto!important}.flatpickr-wrapper{width:100%}.flatpickr-calendar{margin-top:calc(var(--spacing)*2);border-radius:var(--radius-xl)!important;border-style:var(--tw-border-style)!important;border-width:1px!important;border-color:var(--color-gray-200)!important;background-color:var(--color-white)!important;padding:calc(var(--spacing)*5)!important;color:var(--color-gray-500)!important}@media (width>=375px){.flatpickr-calendar{width:auto!important}}.flatpickr-calendar:is(.dark *){--tw-shadow:0px 20px 24px -4px var(--tw-shadow-color,#10182814),0px 8px 8px -4px var(--tw-shadow-color,#10182808);border-color:var(--color-gray-700)!important;background-color:var(--color-gray-dark)!important;color:var(--color-gray-400)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{stroke:var(--color-brand-500)}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{display:none}.flatpickr-current-month{padding:calc(var(--spacing)*0)!important}.flatpickr-current-month .cur-month,.flatpickr-current-month input.cur-year{--tw-font-weight:var(--font-weight-medium);height:auto!important;padding-top:calc(var(--spacing)*0)!important;font-size:var(--text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height))!important;font-weight:var(--font-weight-medium)!important;color:var(--color-gray-800)!important}:is(.flatpickr-current-month .cur-month,.flatpickr-current-month input.cur-year):is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}.flatpickr-prev-month,.flatpickr-next-month{padding:calc(var(--spacing)*0)!important}.flatpickr-weekdays{margin-top:calc(var(--spacing)*6);margin-bottom:calc(var(--spacing)*4);height:auto;background-color:#0000!important}.flatpickr-weekday{--tw-font-weight:var(--font-weight-medium);font-size:var(--text-theme-sm)!important;line-height:var(--tw-leading,var(--text-theme-sm--line-height))!important;font-weight:var(--font-weight-medium)!important;color:var(--color-gray-500)!important;background-color:#0000!important}.flatpickr-weekday:is(.dark *){color:var(--color-gray-400)!important}.flatpickr-day{--tw-font-weight:var(--font-weight-medium);font-size:var(--text-theme-sm)!important;line-height:var(--tw-leading,var(--text-theme-sm--line-height))!important;font-weight:var(--font-weight-medium)!important;color:var(--color-gray-800)!important;align-items:center!important;display:flex!important}.flatpickr-day:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)!important}@media (hover:hover){.flatpickr-day:is(.dark *):hover{border-color:var(--color-gray-300)!important;background-color:var(--color-gray-900)!important}}.flatpickr-day.nextMonthDay,.flatpickr-day.prevMonthDay{color:var(--color-gray-400)!important}.flatpickr-months>.flatpickr-month{background:0 0!important}.flatpickr-month .flatpickr-current-month .flatpickr-monthDropdown-months{-webkit-appearance:none;-moz-appearance:none;appearance:none;font-weight:500;background:0 0!important}.flatpickr-month .flatpickr-current-month .flatpickr-monthDropdown-months:focus{border:0!important;outline:none!important}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{top:calc(var(--spacing)*7)!important;background-color:#0000!important}:is(.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month):is(.dark *){fill:var(--color-white)!important;color:var(--color-white)!important}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:calc(var(--spacing)*7)!important}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:calc(var(--spacing)*7)!important}.flatpickr-days{border-style:var(--tw-border-style)!important;border-width:0!important}span.flatpickr-weekday,.flatpickr-months .flatpickr-month{background-image:none!important}:is(span.flatpickr-weekday,.flatpickr-months .flatpickr-month):is(.dark *){fill:var(--color-white)!important;color:var(--color-white)!important}.flatpickr-innerContainer{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:0!important}.flatpickr-months .flatpickr-month{background-image:none!important}.flatpickr-day.inRange{box-shadow:-5px 0 #f9fafb,5px 0 #f9fafb!important}.flatpickr-day.inRange:is(.dark *){--tw-shadow:-5px 0 0 var(--tw-shadow-color,#262d3c),5px 0 0 var(--tw-shadow-color,#262d3c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{border-color:var(--color-gray-50)!important;background-color:var(--color-gray-50)!important}:is(.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus):is(.dark *){border-style:var(--tw-border-style)!important;border-width:0!important;border-color:color-mix(in oklab,var(--color-white)5%,transparent)!important;background-color:color-mix(in oklab,var(--color-white)5%,transparent)!important}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,:is(.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange):is(.dark *){color:var(--color-white)!important}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#465fff;border-color:var(--color-brand-500)!important;background-color:var(--color-brand-500)!important}@media (hover:hover){:is(.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay):hover{border-color:var(--color-brand-500)!important;background-color:var(--color-brand-500)!important}}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:-10px 0 #465fff}@media (hover:hover){:is(.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month):hover{fill:none!important}}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:none!important}.flatpickr-calendar.static{right:calc(var(--spacing)*0)}.fc .fc-view-harness{max-width:100%;overflow-x:auto}.fc .fc-view-harness::-webkit-scrollbar{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.fc .fc-view-harness::-webkit-scrollbar-track{border-radius:3.40282e38px}.fc .fc-view-harness::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:3.40282e38px}.fc .fc-view-harness::-webkit-scrollbar-thumb:is(){background-color:var(--color-gray-700)}.fc-dayGridMonth-view.fc-view.fc-daygrid{min-width:718px}.fc .fc-scrollgrid-section>*{border-bottom-width:0;border-right-width:0}.fc .fc-scrollgrid{border-left-width:0}.fc .fc-toolbar.fc-header-toolbar{gap:calc(var(--spacing)*4);padding-inline:calc(var(--spacing)*6);padding-top:calc(var(--spacing)*6);flex-direction:column}@media (width>=640px){.fc .fc-toolbar.fc-header-toolbar{flex-direction:row}}.fc-button-group{gap:calc(var(--spacing)*2)}.fc-button-group .fc-button{height:calc(var(--spacing)*10);width:calc(var(--spacing)*10);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:#0000;justify-content:center;align-items:center;display:flex;border-radius:var(--radius-lg)!important}@media (hover:hover){.fc-button-group .fc-button:hover{border-color:var(--color-gray-200);background-color:var(--color-gray-50)}}.fc-button-group .fc-button:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.fc-button-group .fc-button:active{--tw-shadow:0 0 #0000;border-color:var(--color-gray-200)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important;background-color:#0000!important}.fc-button-group .fc-button:is(.dark *){border-color:var(--color-gray-800)}@media (hover:hover){.fc-button-group .fc-button:is(.dark *):hover{border-color:var(--color-gray-800);background-color:var(--color-gray-900)}}.fc-button-group .fc-button:is(.dark *):active{border-color:var(--color-gray-800)!important}.fc-button-group .fc-button.fc-prev-button:before{margin-top:calc(var(--spacing)*1);content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.0068 6L9.75684 12.25L16.0068 18.5' stroke='%23344054' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");display:inline-block}.fc-button-group .fc-button.fc-next-button:before{margin-top:calc(var(--spacing)*1);content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.50684 19L15.7568 12.75L9.50684 6.5' stroke='%23344054' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");display:inline-block}.dark .fc-button-group .fc-button.fc-prev-button:before{content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.0068 6L9.75684 12.25L16.0068 18.5' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")}.dark .fc-button-group .fc-button.fc-next-button:before{content:url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.50684 19L15.7568 12.75L9.50684 6.5' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")}.fc-button-group .fc-button .fc-icon{display:none}.fc-addEventButton-button{--tw-font-weight:var(--font-weight-medium);border-radius:var(--radius-lg)!important;border-style:var(--tw-border-style)!important;background-color:var(--color-brand-500)!important;padding-inline:calc(var(--spacing)*4)!important;padding-block:calc(var(--spacing)*2.5)!important;font-size:var(--text-sm)!important;line-height:var(--tw-leading,var(--text-sm--line-height))!important;font-weight:var(--font-weight-medium)!important;border-width:0!important}@media (hover:hover){.fc-addEventButton-button:hover{background-color:var(--color-brand-600)!important}}.fc-addEventButton-button:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.fc-toolbar-title{--tw-font-weight:var(--font-weight-medium);color:var(--color-gray-800);font-size:var(--text-lg)!important;line-height:var(--tw-leading,var(--text-lg--line-height))!important;font-weight:var(--font-weight-medium)!important}.fc-toolbar-title:is(.dark *){color:color-mix(in oklab,var(--color-white)90%,transparent)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child{border-radius:var(--radius-lg);background-color:var(--color-gray-100);padding:calc(var(--spacing)*.5)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child:is(.dark *){background-color:var(--color-gray-900)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button{border-radius:var(--radius-md);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-500);background-color:#0000;border-style:var(--tw-border-style)!important;width:auto!important;height:auto!important;padding-inline:calc(var(--spacing)*5)!important;padding-block:calc(var(--spacing)*2)!important;border-width:0!important}@media (hover:hover){.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button:hover{color:var(--color-gray-700)}}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button:is(.dark *){color:var(--color-gray-400)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button.fc-button-active{background-color:var(--color-white);color:var(--color-gray-900)}.fc-header-toolbar.fc-toolbar .fc-toolbar-chunk:last-child .fc-button.fc-button-active:is(.dark *){background-color:var(--color-gray-800);color:var(--color-white)}.fc-theme-standard th{border-top-style:var(--tw-border-style);background-color:var(--color-gray-50);border-top-width:1px;border-inline-style:var(--tw-border-style)!important;border-inline-width:0!important;border-color:var(--color-gray-200)!important;text-align:left!important}.fc-theme-standard th:is(.dark *){background-color:var(--color-gray-900);border-color:var(--color-gray-800)!important}.fc-theme-standard td,.fc-theme-standard .fc-scrollgrid{border-color:var(--color-gray-200)!important}:is(.fc-theme-standard td,.fc-theme-standard .fc-scrollgrid):is(.dark *){border-color:var(--color-gray-800)!important}.fc .fc-col-header-cell-cushion{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-400);text-transform:uppercase;padding-inline:calc(var(--spacing)*5)!important;padding-block:calc(var(--spacing)*4)!important}.fc .fc-daygrid-day.fc-day-today{background-color:#0000}.fc .fc-daygrid-day{padding:calc(var(--spacing)*2)}.fc .fc-daygrid-day.fc-day-today .fc-scrollgrid-sync-inner{border-radius:var(--radius-sm);background-color:var(--color-gray-100)}.fc .fc-daygrid-day.fc-day-today .fc-scrollgrid-sync-inner:is(.dark *){background-color:color-mix(in oklab,var(--color-white)3%,transparent)}.fc .fc-daygrid-day-number{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-700);padding:calc(var(--spacing)*3)!important}.fc .fc-daygrid-day-number:is(.dark *){color:var(--color-gray-400)}.fc .fc-daygrid-day-top{flex-direction:row!important}.fc .fc-day-other .fc-daygrid-day-top{opacity:1}.fc .fc-day-other .fc-daygrid-day-top .fc-daygrid-day-number{color:var(--color-gray-400)}.fc .fc-day-other .fc-daygrid-day-top .fc-daygrid-day-number:is(.dark *){color:color-mix(in oklab,var(--color-white)30%,transparent)}.event-fc-color{border-radius:var(--radius-lg);padding-block:calc(var(--spacing)*2.5);padding-right:calc(var(--spacing)*3);padding-left:calc(var(--spacing)*4)}.event-fc-color .fc-event-title{padding:calc(var(--spacing)*0);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal);color:var(--color-gray-700)}.fc-daygrid-event-dot{margin-right:calc(var(--spacing)*3);margin-left:calc(var(--spacing)*0);height:calc(var(--spacing)*5);width:calc(var(--spacing)*1);border-radius:var(--radius-sm);--tw-border-style:none;border-style:none}.fc-event:focus{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.fc-daygrid-event.fc-event-start{margin-left:calc(var(--spacing)*3)!important}.event-fc-color.fc-bg-success{border-color:var(--color-success-50);background-color:var(--color-success-50)}.event-fc-color.fc-bg-danger{border-color:var(--color-error-50);background-color:var(--color-error-50)}.event-fc-color.fc-bg-primary{border-color:var(--color-brand-50);background-color:var(--color-brand-50)}.event-fc-color.fc-bg-warning{border-color:var(--color-orange-50);background-color:var(--color-orange-50)}.event-fc-color.fc-bg-success .fc-daygrid-event-dot{background-color:var(--color-success-500)}.event-fc-color.fc-bg-danger .fc-daygrid-event-dot{background-color:var(--color-error-500)}.event-fc-color.fc-bg-primary .fc-daygrid-event-dot{background-color:var(--color-brand-500)}.event-fc-color.fc-bg-warning .fc-daygrid-event-dot{background-color:var(--color-orange-500)}.fc-direction-ltr .fc-timegrid-slot-label-frame{padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*1.5);text-align:left;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-500)}.fc-direction-ltr .fc-timegrid-slot-label-frame:is(.dark *){color:var(--color-gray-400)}.fc .fc-timegrid-axis-cushion{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-gray-500)}.fc .fc-timegrid-axis-cushion:is(.dark *){color:var(--color-gray-400)}.input-date-icon::-webkit-inner-spin-button{opacity:0;-webkit-appearance:none}.input-date-icon::-webkit-calendar-picker-indicator{opacity:0;-webkit-appearance:none}.swiper-button-prev svg,.swiper-button-next svg{width:auto!important;height:auto!important}.carouselTwo .swiper-button-next:after,.carouselTwo .swiper-button-prev:after,.carouselFour .swiper-button-next:after,.carouselFour .swiper-button-prev:after{display:none}.carouselTwo .swiper-button-next.swiper-button-disabled,.carouselTwo .swiper-button-prev.swiper-button-disabled,.carouselFour .swiper-button-next.swiper-button-disabled,.carouselFour .swiper-button-prev.swiper-button-disabled{background-color:color-mix(in oklab,var(--color-white)60%,transparent);opacity:1!important}.carouselTwo .swiper-button-next,.carouselTwo .swiper-button-prev,.carouselFour .swiper-button-next,.carouselFour .swiper-button-prev{height:calc(var(--spacing)*10);width:calc(var(--spacing)*10);border-style:var(--tw-border-style);border-width:.5px;border-color:color-mix(in oklab,var(--color-white)10%,transparent);background-color:color-mix(in oklab,var(--color-white)90%,transparent);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018281a),0px 1px 3px 0px var(--tw-shadow-color,#1018281a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-backdrop-blur:blur(10px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);border-radius:3.40282e38px;color:var(--color-gray-700)!important}.carouselTwo .swiper-button-prev,.carouselFour .swiper-button-prev{left:calc(var(--spacing)*3)!important}@media (width>=640px){:is(.carouselTwo .swiper-button-prev,.carouselFour .swiper-button-prev){left:calc(var(--spacing)*4)!important}}.carouselTwo .swiper-button-next,.carouselFour .swiper-button-next{right:calc(var(--spacing)*3)!important}@media (width>=640px){:is(.carouselTwo .swiper-button-next,.carouselFour .swiper-button-next){right:calc(var(--spacing)*4)!important}}.carouselThree .swiper-pagination,.carouselFour .swiper-pagination{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);align-items:center;gap:calc(var(--spacing)*1.5);border-style:var(--tw-border-style);border-width:.5px;border-color:color-mix(in oklab,var(--color-white)10%,transparent);background-color:color-mix(in oklab,var(--color-white)60%,transparent);padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1.5);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018281a),0px 1px 3px 0px var(--tw-shadow-color,#1018281a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-backdrop-blur:blur(10px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);border-radius:40px;display:inline-flex;bottom:calc(var(--spacing)*3)!important;width:auto!important;left:50%!important}@media (width>=640px){:is(.carouselThree .swiper-pagination,.carouselFour .swiper-pagination){bottom:calc(var(--spacing)*5)!important}}.carouselThree .swiper-pagination-bullet,.carouselFour .swiper-pagination-bullet{height:calc(var(--spacing)*2.5);width:calc(var(--spacing)*2.5);background-color:var(--color-white);opacity:1;--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#1018280d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-duration:.2s;--tw-ease:var(--ease-in-out);transition-duration:.2s;transition-timing-function:var(--ease-in-out);margin:calc(var(--spacing)*0)!important}.carouselThree .swiper-pagination-bullet-active,.carouselFour .swiper-pagination-bullet-active{width:calc(var(--spacing)*6.5);border-radius:var(--radius-xl)}.form-check-input:checked~span{border-style:var(--tw-border-style);border-width:6px;border-color:var(--color-brand-500);background-color:var(--color-brand-500)}.form-check-input:checked~span:is(.dark *){border-color:var(--color-brand-500)}.taskCheckbox:checked~.box span{background-color:var(--color-brand-500);opacity:1}.taskCheckbox:checked~p{color:var(--color-gray-400);text-decoration-line:line-through}.taskCheckbox:checked~.box{border-color:var(--color-brand-500);background-color:var(--color-brand-500)}.taskCheckbox:checked~.box:is(.dark *){border-color:var(--color-brand-500)}.task{opacity:.8;cursor:grabbing;border-radius:.75rem;transition:all .2s;box-shadow:0 1px 3px #1018281a,0 1px 2px #1018280f}.custom-calendar .fc-h-event{color:#000;background-color:#0000;border:none}.fc.fc-media-screen{min-height:100vh}.simplebar-scrollbar:before{background-color:var(--color-gray-200)!important;opacity:1!important;border-radius:3.40282e38px!important}.simplebar-scrollbar:before:is(),.dark .simplebar-scrollbar:before{background-color:var(--color-gray-700)!important}.simplebar-scrollbar.simplebar-visible:before{opacity:1}.animate-slide-in-right{animation:.3s ease-out slide-in-right}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:.3s ease-out fade-in}@keyframes shimmer{0%{background-position:-1000px 0}to{background-position:10000px 0}}.igny8-skeleton-row .animate-pulse{position:relative;overflow:hidden}.igny8-skeleton-row .animate-pulse:after{content:"";background:linear-gradient(90deg,#0000,#fff6,#0000) 0 0/200% 100%;animation:2s infinite shimmer;position:absolute;top:0;right:0;bottom:0;left:0}.dark .igny8-skeleton-row .animate-pulse:after{background:linear-gradient(90deg,#0000,#ffffff1a,#0000)}.html-content-renderer{color:var(--color-gray-700)}.html-content-renderer:is(.dark *){color:var(--color-gray-300)}.html-content-renderer h1,.html-content-renderer h2,.html-content-renderer h3,.html-content-renderer h4,.html-content-renderer h5,.html-content-renderer h6{margin-top:calc(var(--spacing)*4);margin-bottom:calc(var(--spacing)*2);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-900)}:is(.html-content-renderer h1,.html-content-renderer h2,.html-content-renderer h3,.html-content-renderer h4,.html-content-renderer h5,.html-content-renderer h6):is(.dark *){color:var(--color-white)}.html-content-renderer h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.html-content-renderer h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.html-content-renderer h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.html-content-renderer p{margin-bottom:calc(var(--spacing)*3);--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.html-content-renderer ul,.html-content-renderer ol{margin-bottom:calc(var(--spacing)*3);margin-left:calc(var(--spacing)*6);list-style-type:disc}.html-content-renderer ol{list-style-type:decimal}.html-content-renderer li{margin-bottom:calc(var(--spacing)*1)}.html-content-renderer strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-900)}.html-content-renderer strong:is(.dark *){color:var(--color-white)}.html-content-renderer em{font-style:italic}.html-content-renderer code{background-color:var(--color-gray-100);padding-inline:calc(var(--spacing)*1.5);padding-block:calc(var(--spacing)*.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));border-radius:.25rem;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.html-content-renderer code:is(.dark *){background-color:var(--color-gray-800)}.html-content-renderer pre{margin-bottom:calc(var(--spacing)*3);border-radius:var(--radius-lg);background-color:var(--color-gray-100);padding:calc(var(--spacing)*3);overflow-x:auto}.html-content-renderer pre:is(.dark *){background-color:var(--color-gray-800)}.html-content-renderer pre code{padding:calc(var(--spacing)*0);background-color:#0000}.html-content-renderer blockquote{margin-block:calc(var(--spacing)*3);border-left-style:var(--tw-border-style);border-left-width:4px;border-color:var(--color-gray-300);padding-left:calc(var(--spacing)*4);font-style:italic}.html-content-renderer blockquote:is(.dark *){border-color:var(--color-gray-600)}.html-content-renderer table{margin-bottom:calc(var(--spacing)*3);border-collapse:collapse;width:100%}.html-content-renderer table th,.html-content-renderer table td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-300);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*2)}:is(.html-content-renderer table th,.html-content-renderer table td):is(.dark *){border-color:var(--color-gray-700)}.html-content-renderer table th{background-color:var(--color-gray-100);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.html-content-renderer table th:is(.dark *){background-color:var(--color-gray-800)}:where(.content-outline>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.outline-intro{margin-bottom:calc(var(--spacing)*4);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-gray-200);padding-bottom:calc(var(--spacing)*4)}.outline-intro:is(.dark *){border-color:var(--color-gray-700)}.outline-hook{margin-bottom:calc(var(--spacing)*3);border-radius:var(--radius-lg);background-color:var(--color-blue-50);padding:calc(var(--spacing)*3);color:var(--color-blue-900)}.outline-hook:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent);color:var(--color-blue-200)}.outline-paragraph{margin-bottom:calc(var(--spacing)*2);background-color:var(--color-gray-50);padding:calc(var(--spacing)*2);border-radius:.25rem}.outline-paragraph:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}.outline-section{margin-bottom:calc(var(--spacing)*4);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);background-color:var(--color-white);padding:calc(var(--spacing)*4)}.outline-section:is(.dark *){border-color:var(--color-gray-700);background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}.outline-list{margin-left:calc(var(--spacing)*4)}:where(.outline-list>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}.outline-item{color:var(--color-gray-700)}.outline-item:is(.dark *){color:var(--color-gray-300)}.outline-item.nested{margin-left:calc(var(--spacing)*4);color:var(--color-gray-600)}.outline-item.nested:is(.dark *){color:var(--color-gray-400)}.subsection-heading{margin-top:calc(var(--spacing)*3);margin-bottom:calc(var(--spacing)*2);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-800)}.subsection-heading:is(.dark *){color:var(--color-gray-200)}.section-heading{margin-bottom:calc(var(--spacing)*3);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-blue-600)}.section-heading:is(.dark *){color:var(--color-blue-400)}.content-type-badge{margin-bottom:calc(var(--spacing)*2);background-color:var(--color-gray-200);padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*1);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-700);text-transform:uppercase;border-radius:.25rem;display:inline-block}.content-type-badge:is(.dark *){background-color:var(--color-gray-700);color:var(--color-gray-300)}.section-details{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);color:var(--color-gray-600)}.section-details:is(.dark *){color:var(--color-gray-400)}.toggle-content-row{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));--tw-duration:.3s;transition-duration:.3s}.toggle-content-row.collapsed{opacity:0}.toggle-content-row.expanded{opacity:1}.html-content-wrapper{max-height:600px;overflow-y:auto}.html-content-wrapper::-webkit-scrollbar{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.html-content-wrapper::-webkit-scrollbar-track{border-radius:3.40282e38px}.html-content-wrapper::-webkit-scrollbar-thumb{background-color:var(--color-gray-200);border-radius:3.40282e38px}.html-content-wrapper::-webkit-scrollbar-thumb:is(){background-color:var(--color-gray-700)}.normalized-html-content{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);color:var(--color-gray-700);line-height:1.7}.normalized-html-content:is(.dark *){color:var(--color-gray-300)}:where(.normalized-html-content article>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.normalized-html-content h1,.normalized-html-content h2,.normalized-html-content h3,.normalized-html-content h4,.normalized-html-content h5,.normalized-html-content h6{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-gray-900);margin-top:1.5em;margin-bottom:.75em;font-weight:600}:is(.normalized-html-content h1,.normalized-html-content h2,.normalized-html-content h3,.normalized-html-content h4,.normalized-html-content h5,.normalized-html-content h6):is(.dark *){color:var(--color-white)}.normalized-html-content h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height));font-size:1.75em}.normalized-html-content h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height));font-size:1.5em}.normalized-html-content h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));font-size:1.25em}.normalized-html-content h4{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));font-size:1.1em}.normalized-html-content p{margin-bottom:calc(var(--spacing)*4);color:var(--color-gray-700);margin-bottom:1em}.normalized-html-content p:is(.dark *){color:var(--color-gray-300)}.normalized-html-content ul,.normalized-html-content ol{margin-block:calc(var(--spacing)*4);padding-left:calc(var(--spacing)*8);margin:1em 0;padding-left:2em}.normalized-html-content ul{list-style-type:disc}.normalized-html-content ol{list-style-type:decimal}.normalized-html-content li{margin-bottom:calc(var(--spacing)*2);margin-bottom:.5em}.normalized-html-content table{margin-block:calc(var(--spacing)*4);border-collapse:collapse;width:100%;margin:1em 0}.normalized-html-content table th,.normalized-html-content table td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-gray-200);padding:calc(var(--spacing)*2);border:1px solid #e5e7eb;padding:.5em}:is(.normalized-html-content table th,.normalized-html-content table td):is(.dark *){border-color:var(--color-gray-700)}.normalized-html-content table th{background-color:var(--color-gray-50);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);background-color:#f9fafb;font-weight:600}.normalized-html-content table th:is(.dark *){background-color:var(--color-gray-800)}.normalized-html-content strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.normalized-html-content em{font-style:italic}.normalized-html-content a{color:var(--color-blue-600)}@media (hover:hover){.normalized-html-content a:hover{text-decoration-line:underline}}.normalized-html-content a:is(.dark *){color:var(--color-blue-400)}.normalized-html-content blockquote{margin-block:calc(var(--spacing)*4);border-left-style:var(--tw-border-style);border-left-width:4px;border-color:var(--color-gray-300);padding-left:calc(var(--spacing)*4);font-style:italic}.normalized-html-content blockquote:is(.dark *){border-color:var(--color-gray-600)}.normalized-html-content code{background-color:var(--color-gray-100);padding-inline:calc(var(--spacing)*1);padding-block:calc(var(--spacing)*.5);font-family:var(--font-mono);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));border-radius:.25rem}.normalized-html-content code:is(.dark *){background-color:var(--color-gray-800)}.normalized-html-content pre{margin-block:calc(var(--spacing)*4);background-color:var(--color-gray-100);padding:calc(var(--spacing)*4);border-radius:.25rem;overflow-x:auto}.normalized-html-content pre:is(.dark *){background-color:var(--color-gray-800)}.normalized-html-content pre code{padding:calc(var(--spacing)*0);background-color:#0000}.font-mono-custom{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-scroll-snap-strictness{syntax:"*";inherits:false;initial-value:proximity}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}:root{--igny8-blue: #0693e3;--igny8-blue-dark: #0472b8;--igny8-green: #0bbf87;--igny8-green-dark: #08966b;--igny8-amber: #ff7a00;--igny8-amber-dark: #cc5f00;--igny8-red: #ef4444;--igny8-red-dark: #d13333;--igny8-purple: #5d4ae3;--igny8-purple-dark: #3a2f94;--igny8-navy-bg: #0d1b2a;--igny8-navy-bg-2: #142b3f;--igny8-surface: #f8fafc;--igny8-panel: #ffffff;--igny8-panel-2: #f1f5f9;--igny8-text: #555a68;--igny8-text-dim: #64748b;--igny8-text-light: #e5eaf0;--igny8-stroke: #e2e8f0;--igny8-radius: 6px;--igny8-gradient-blue: linear-gradient(135deg, var(--igny8-blue) 0%, var(--igny8-blue-dark) 100%);--igny8-gradient-success: linear-gradient(135deg, var(--igny8-green) 0%, var(--igny8-green-dark) 100%);--igny8-gradient-warning: linear-gradient(135deg, var(--igny8-amber) 0%, var(--igny8-amber-dark) 100%);--igny8-gradient-danger: linear-gradient(135deg, var(--igny8-red) 0%, var(--igny8-red-dark) 100%);--igny8-gradient-purple: linear-gradient(135deg, var(--igny8-purple) 0%, var(--igny8-purple-dark) 100%);--igny8-gradient-panel: linear-gradient(180deg, var(--igny8-panel) 0%, var(--igny8-panel-2) 100%)}.dark{--igny8-surface: #1f2937;--igny8-panel: #1f2937;--igny8-panel-2: #111827;--igny8-text: #e5eaf0;--igny8-text-dim: #9ca3af;--igny8-stroke: #374151}.igny8-bg-blue{background-color:var(--igny8-blue)}.igny8-bg-blue-dark{background-color:var(--igny8-blue-dark)}.igny8-bg-green{background-color:var(--igny8-green)}.igny8-bg-green-dark{background-color:var(--igny8-green-dark)}.igny8-bg-amber{background-color:var(--igny8-amber)}.igny8-bg-amber-dark{background-color:var(--igny8-amber-dark)}.igny8-bg-red{background-color:var(--igny8-red)}.igny8-bg-red-dark{background-color:var(--igny8-red-dark)}.igny8-bg-purple{background-color:var(--igny8-purple)}.igny8-bg-purple-dark{background-color:var(--igny8-purple-dark)}.igny8-bg-navy{background-color:var(--igny8-navy-bg)}.igny8-bg-navy-2{background-color:var(--igny8-navy-bg-2)}.igny8-bg-surface{background-color:var(--igny8-surface)}.igny8-bg-panel{background-color:var(--igny8-panel)}.igny8-bg-panel-2{background-color:var(--igny8-panel-2)}.igny8-text-blue{color:var(--igny8-blue)}.igny8-text-blue-dark{color:var(--igny8-blue-dark)}.igny8-text-green{color:var(--igny8-green)}.igny8-text-green-dark{color:var(--igny8-green-dark)}.igny8-text-amber{color:var(--igny8-amber)}.igny8-text-amber-dark{color:var(--igny8-amber-dark)}.igny8-text-red{color:var(--igny8-red)}.igny8-text-red-dark{color:var(--igny8-red-dark)}.igny8-text-purple{color:var(--igny8-purple)}.igny8-text-purple-dark{color:var(--igny8-purple-dark)}.igny8-text-primary{color:var(--igny8-text)}.igny8-text-dim{color:var(--igny8-text-dim)}.igny8-text-light{color:var(--igny8-text-light)}.igny8-border-blue{border-color:var(--igny8-blue)}.igny8-border-blue-dark{border-color:var(--igny8-blue-dark)}.igny8-border-green{border-color:var(--igny8-green)}.igny8-border-amber{border-color:var(--igny8-amber)}.igny8-border-red{border-color:var(--igny8-red)}.igny8-border-purple{border-color:var(--igny8-purple)}.igny8-border-stroke{border-color:var(--igny8-stroke)}.igny8-gradient-blue{background:var(--igny8-gradient-blue)}.igny8-gradient-success{background:var(--igny8-gradient-success)}.igny8-gradient-warning{background:var(--igny8-gradient-warning)}.igny8-gradient-danger{background:var(--igny8-gradient-danger)}.igny8-gradient-purple{background:var(--igny8-gradient-purple)}.igny8-gradient-panel{background:var(--igny8-gradient-panel)}.igny8-rounded{border-radius:var(--igny8-radius)}.igny8-rounded-xl{border-radius:calc(var(--igny8-radius) * 2)}.igny8-rounded-2xl{border-radius:calc(var(--igny8-radius) * 3)}.igny8-hover-blue:hover{background-color:var(--igny8-blue-dark)}.igny8-hover-green:hover{background-color:var(--igny8-green-dark)}.igny8-hover-amber:hover{background-color:var(--igny8-amber-dark)}.igny8-card{background:var(--igny8-panel);border:1px solid var(--igny8-stroke);border-radius:var(--igny8-radius);padding:18px;box-shadow:0 2px 6px #0000001a,0 4px 10px #0d1b2a0f;transition:box-shadow .25s ease,transform .2s ease}.igny8-card:hover{transform:translateY(-2px);box-shadow:0 6px 14px #00000024,0 8px 20px #0d1b2a1a}.igny8-card-header{display:flex;align-items:center;justify-content:space-between;background:var(--igny8-gradient-blue);color:#fff;padding:12px 16px;border-radius:var(--igny8-radius) var(--igny8-radius) 0 0;margin:-10px -10px 12px}.igny8-btn{display:inline-flex;align-items:center;justify-content:center;padding:4px 12px;font-size:13px;font-weight:500;line-height:1.3;border:none;border-radius:var(--igny8-radius);cursor:pointer;transition:all .2s ease-in-out;color:#fff;text-decoration:none;white-space:nowrap;margin:0 5px}.igny8-btn-primary{background:var(--igny8-blue)}.igny8-btn-primary:hover{background:var(--igny8-blue-dark)}.igny8-btn-success{background:var(--igny8-green)}.igny8-btn-success:hover{background:var(--igny8-green-dark)}.igny8-btn-warning{background:var(--igny8-amber)}.igny8-btn-warning:hover{background:var(--igny8-amber-dark)}.igny8-btn-danger{background:var(--igny8-red)}.igny8-btn-danger:hover{opacity:.9}.igny8-badge{padding:4px 10px;border-radius:4px;font-size:12px;font-weight:500;color:#fff;white-space:nowrap;display:inline-block}.igny8-badge-primary{background:var(--igny8-blue)}.igny8-badge-success{background:var(--igny8-green)}.igny8-badge-warning{background:var(--igny8-amber)}.igny8-badge-danger{background:var(--igny8-red)}.igny8-badge-purple{background:var(--igny8-purple)}.igny8-table-compact th{padding:12px 16px!important;font-size:14px!important;font-weight:600!important;color:#475467!important;text-align:left!important;background-color:#f8fafc!important;border-bottom:2px solid #e2e8f0!important;text-transform:uppercase;letter-spacing:.3px}.dark .igny8-table-compact th{color:#e5eaf0!important;background-color:#0f172a80!important;border-bottom-color:#ffffff1a!important}.igny8-table-compact td{padding:4px 12px!important;font-size:14px!important;border-bottom:1px solid #e2e8f0!important}.dark .igny8-table-compact td{border-bottom-color:#ffffff0d!important}.igny8-input-compact,.igny8-select-compact{height:36px!important;padding:6px 12px!important;font-size:13px!important}.igny8-btn-compact{padding:6px 12px!important;font-size:13px!important;height:36px!important}.igny8-btn-compact-sm{padding:4px 10px!important;font-size:12px!important;height:32px!important}.igny8-select-styled{background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23647085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 12px center!important;padding-right:36px!important}.dark .igny8-select-styled{background-image:url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2398A2B3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}select.igny8-select-styled{cursor:pointer}select.igny8-select-styled option{padding:10px 12px!important;background:#fff!important;color:#334054!important;font-size:13px!important}select.igny8-select-styled option:hover{background:#f1f5f9!important}select.igny8-select-styled option:checked{background:#ede9fe!important;color:#5d4ae3!important;font-weight:600!important}.dark select.igny8-select-styled option{background:#1f2937!important;color:#e5eaf0!important}.dark select.igny8-select-styled option:hover{background:#374151!important}.dark select.igny8-select-styled option:checked{background:#3a2f94!important;color:#e9d5ff!important}.igny8-header-metrics{display:flex;align-items:center;gap:16px;padding:6px 12px;background:transparent;border-radius:6px;box-shadow:0 2px 6px 3px #00000014}.dark .igny8-header-metrics{background:transparent;box-shadow:0 2px 6px 3px #00000014}.igny8-header-metric{display:flex;align-items:center;gap:8px}.igny8-header-metric-separator{width:1px;height:16px;background:#cbd5e1;opacity:.4}.dark .igny8-header-metric-separator{background:#94a3b8;opacity:.3}.igny8-header-metric-label{font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;color:#64748b}.dark .igny8-header-metric-label{color:#94a3b8}.igny8-header-metric-value{font-size:14px;font-weight:700;color:#1e293b;margin-left:4px}.dark .igny8-header-metric-value{color:#fff}.igny8-header-metric-accent{width:2px;height:14px;border-radius:2px}.igny8-header-metric-accent.blue{background:var(--igny8-blue)}.igny8-header-metric-accent.green{background:var(--igny8-green)}.igny8-header-metric-accent.amber{background:var(--igny8-amber)}.igny8-header-metric-accent.purple{background:var(--igny8-purple)}.difficulty-badge{border-radius:3px!important;min-width:28px!important;display:inline-flex!important;justify-content:center!important;align-items:center!important}.difficulty-badge.difficulty-very-hard,.dark .difficulty-badge.difficulty-very-hard{background-color:#dc2626!important;color:#fff!important}.igny8-table-compact th.text-center,.igny8-table-compact td.text-center{text-align:center!important}.igny8-table-container{min-height:500px;transition:min-height .8s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden;will-change:min-height}.igny8-table-container.loading{min-height:500px;overflow:hidden!important;contain:layout style paint}.igny8-table-container.loaded{min-height:auto;overflow:visible;transition:min-height .8s cubic-bezier(.4,0,.2,1);animation:fadeInContainer .3s ease-out}@keyframes fadeInContainer{0%{opacity:.95}to{opacity:1}}.igny8-table-wrapper{width:100%;position:relative;overflow-x:hidden;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.3) transparent;transition:opacity .4s ease-in-out;contain:layout}.igny8-table-container.loading .igny8-table-wrapper{overflow-x:hidden!important;overflow-y:hidden!important;scrollbar-width:none;-ms-overflow-style:none}.igny8-table-container.loading .igny8-table-wrapper::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.igny8-table-container.loaded .igny8-table-wrapper{overflow-x:auto;overflow-y:hidden;animation:showScrollbar .4s ease-out .3s both}@keyframes showScrollbar{0%{scrollbar-width:none}to{scrollbar-width:thin}}.igny8-table-smooth{width:100%;table-layout:fixed;min-width:100%;transition:opacity .5s ease-in-out;contain:layout}.igny8-table-container.loading .igny8-table-smooth{opacity:.8;visibility:visible}.igny8-table-container.loaded .igny8-table-smooth{opacity:1;table-layout:auto;transition:opacity .5s ease-in-out,table-layout .1s ease-out}.igny8-table-body{position:relative;min-height:450px;transition:min-height .8s cubic-bezier(.4,0,.2,1),opacity .5s ease-in-out;contain:layout}.igny8-table-container.loading .igny8-table-body{min-height:450px;opacity:1;height:auto}.igny8-table-container.loaded .igny8-table-body{min-height:0;opacity:1;transition:min-height .8s cubic-bezier(.4,0,.2,1),opacity .5s ease-in-out}.igny8-table-container.loading .igny8-table-body>tr:not(.igny8-skeleton-row){display:none!important;visibility:hidden}.igny8-table-container.loaded .igny8-table-body>tr.igny8-skeleton-row{display:none!important;visibility:hidden;opacity:0;pointer-events:none}.igny8-data-row{animation:fadeInRow .6s ease-out forwards;opacity:0;transform:translateY(8px)}@keyframes fadeInRow{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.igny8-skeleton-row{animation:none!important;opacity:1!important;transform:none!important;display:table-row!important}.igny8-table-container.loading *{backface-visibility:hidden;perspective:1000px} diff --git a/frontend/dist/assets/js/index-DHgSgw93.js b/frontend/dist/assets/js/index-BGcO3ahy.js similarity index 62% rename from frontend/dist/assets/js/index-DHgSgw93.js rename to frontend/dist/assets/js/index-BGcO3ahy.js index e1587df7..d13e5b79 100644 --- a/frontend/dist/assets/js/index-DHgSgw93.js +++ b/frontend/dist/assets/js/index-BGcO3ahy.js @@ -1,6 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/page-dashboard-DxYTR5eF.js","assets/js/vendor-react-core-DjsjKnCi.js","assets/js/vendor-other-CdRIx1s3.js","assets/css/vendor-other-BsM4JrO0.css","assets/js/page-analytics.tsx-1KCk8AGD.js","assets/js/vendor-helmet-MZDArkdS.js","assets/js/vendor-state-CYwAWrAU.js","assets/js/pages-planner-COGkFLJh.js","assets/js/vendor-react-router-BJY_70Cr.js","assets/js/page-authpages-CY7hjDHU.js","assets/js/page-clusters.config.tsx-9GAd-_h-.js","assets/js/page-reference-aC0iABvU.js","assets/js/page-components.tsx-DYfg5dka.js","assets/js/page-keywords.config.tsx-CxJn1kF1.js","assets/js/page-ideas.config.tsx-Cr6kWRFa.js","assets/js/page-delete-modal.config.ts-B7nUJ-QI.js","assets/js/page-bulk-action-modal.config.ts-D-0XtKwF.js","assets/js/page-table-actions.config.tsx-BSR5Zo7l.js","assets/js/pages-writer-CjPEISlq.js","assets/js/page-images.config.tsx-Dy4DVDQH.js","assets/js/page-tasks.config.tsx-mmlIGC4l.js","assets/js/pages-thinker-DjafPZNF.js","assets/js/pages-billing-CR09bFDK.js","assets/js/page-schedules.tsx-KBMo-Hzm.js","assets/js/pages-settings-Da7wPw3M.js","assets/js/page-help-j71zd25J.js"])))=>i.map(i=>d[i]); -import{r as t,j as e,R as Q,c as ee}from"./vendor-react-core-DjsjKnCi.js";/* empty css */import"./vendor-other-CdRIx1s3.js";import{g as te,N as se,A as q,_ as i}from"./page-dashboard-DxYTR5eF.js";import{L as M,u as re,a as H,O as ae,N as ne,B as le,R as oe,b as r}from"./vendor-react-router-BJY_70Cr.js";import{u as ie,v as I,w as de,h as W,x as O,y as z,f as ce,s as me,b as K,i as ue,z as he,A as xe,n as ge,j as pe,D as fe,E as be,T as je}from"./page-authpages-CY7hjDHU.js";import{D as $,a as R}from"./page-components.tsx-DYfg5dka.js";import{d as ye,e as J,u as we,H as _e}from"./pages-planner-COGkFLJh.js";import{u as ke,T as ve}from"./page-reference-aC0iABvU.js";import{N as Ce}from"./page-otherpage-CbNMllJl.js";import{A as Ne}from"./page-analytics.tsx-1KCk8AGD.js";import"./vendor-state-CYwAWrAU.js";import"./page-clusters.config.tsx-9GAd-_h-.js";import"./page-keywords.config.tsx-CxJn1kF1.js";import"./page-ideas.config.tsx-Cr6kWRFa.js";import"./page-delete-modal.config.ts-B7nUJ-QI.js";import"./page-bulk-action-modal.config.ts-D-0XtKwF.js";import"./page-table-actions.config.tsx-BSR5Zo7l.js";import"./vendor-helmet-MZDArkdS.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&l(m)}).observe(document,{childList:!0,subtree:!0});function n(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(o){if(o.ep)return;o.ep=!0;const d=n(o);fetch(o.href,d)}})();const X=t.createContext(void 0),F=()=>{const s=t.useContext(X);if(!s)throw new Error("useSidebar must be used within a SidebarProvider");return s},Se=({children:s})=>{const[a,n]=t.useState(!0),[l,o]=t.useState(!1),[d,m]=t.useState(!1),[u,b]=t.useState(!1),[p,v]=t.useState(null),[_,f]=t.useState(null);t.useEffect(()=>{const j=()=>{const y=window.innerWidth<768;m(y),y||o(!1)};return j(),window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[]);const E=()=>{n(j=>!j)},L=()=>{o(j=>!j)},N=j=>{f(y=>y===j?null:j)};return e.jsx(X.Provider,{value:{isExpanded:d?!1:a,isMobileOpen:l,isHovered:u,activeItem:p,openSubmenu:_,toggleSidebar:E,toggleMobileSidebar:L,setIsHovered:b,setActiveItem:v,toggleSubmenu:N},children:s})},Ee=()=>{const{toggleTheme:s}=ie();return e.jsxs("button",{onClick:s,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 Le(){const[s,a]=t.useState(!1),[n,l]=t.useState(!0);function o(){a(!s)}function d(){a(!1)}const m=()=>{o(),l(!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:m,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($,{isOpen:s,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:o,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(R,{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(R,{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(R,{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(R,{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(R,{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(R,{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(R,{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(R,{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(M,{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 Ie(){var b;const[s,a]=t.useState(!1),n=re(),{user:l,logout:o}=I();function d(){a(!s)}function m(){a(!1)}const u=()=>{o(),n("/signin",{replace:!0}),m()};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:l!=null&&l.email?e.jsx("span",{className:"text-white font-semibold text-sm",children:l.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:(l==null?void 0:l.username)||((b=l==null?void 0:l.email)==null?void 0:b.split("@")[0])||"User"}),e.jsx("svg",{className:`stroke-gray-500 dark:stroke-gray-400 transition-transform duration-200 ${s?"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($,{isOpen:s,onClose:m,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:(l==null?void 0:l.username)||"User"}),e.jsx("span",{className:"mt-0.5 block text-theme-xs text-gray-500 dark:text-gray-400",children:(l==null?void 0:l.email)||"No email"}),(l==null?void 0:l.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:l.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(R,{onItemClick:m,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(R,{onItemClick:m,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(R,{onItemClick:m,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:u,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 Re=()=>{const{metrics:s}=ye();return!s||s.length===0?null:e.jsx("div",{className:"igny8-header-metrics hidden lg:flex",children:s.map((a,n)=>e.jsxs(Q.Fragment,{children:[e.jsxs("div",{className:"igny8-header-metric",children:[e.jsx("div",{className:`igny8-header-metric-accent ${a.accentColor}`}),e.jsx("span",{className:"igny8-header-metric-label",children:a.label}),e.jsx("span",{className:"igny8-header-metric-value",children:typeof a.value=="number"?a.value.toLocaleString():a.value})]}),n0?w=!y.some(h=>a.pathname.startsWith(h)):w=j.some(h=>a.pathname.startsWith(h)),t.useEffect(()=>{b&&m&&u().catch(h=>{console.debug("SiteSwitcher: Failed to refresh user (non-critical):",h)})},[b]),t.useEffect(()=>{if(w){L(!1);return}c(),l||d()},[w,a.pathname,(k=m==null?void 0:m.account)==null?void 0:k.id]);const c=async()=>{try{L(!0);const C=((await te()).results||[]).filter(S=>S.is_active);f(C)}catch(h){console.error("Failed to load sites:",h),n.error(`Failed to load sites: ${h.message}`)}finally{L(!1)}},x=async h=>{try{await se(h);const C=_.find(S=>S.id===h);C&&(o(C),n.success(`Switched to "${C.name}"`)),v(!1)}catch(C){n.error(`Failed to switch site: ${C.message}`)}};function g(){v(!p)}return w||E||_.length===0?null:e.jsxs("div",{className:"relative inline-block",children:[e.jsxs("button",{ref:N,onClick:g,className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:hover:bg-gray-700 dropdown-toggle","aria-label":"Switch site",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})}),e.jsx("span",{className:"max-w-[150px] truncate",children:(l==null?void 0:l.name)||"Select Site"})]}),e.jsx("svg",{className:`w-4 h-4 transition-transform ${p?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e.jsx($,{isOpen:p,onClose:()=>v(!1),anchorRef:N,placement:"bottom-left",className:"w-64 p-2",children:_.map(h=>e.jsxs(R,{onItemClick:()=>x(h.id),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${(l==null?void 0:l.id)===h.id?"bg-blue-50 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300":"text-gray-700 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("span",{className:"flex-1",children:h.name}),(l==null?void 0:l.id)===h.id&&e.jsx("svg",{className:"w-4 h-4 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},h.id))})]})}function De(){const{user:s}=I(),[a,n]=t.useState(!1),l=(s==null?void 0:s.role)==="admin"||(s==null?void 0:s.role)==="developer";t.useEffect(()=>{if(l){const d=localStorage.getItem("debug_resource_tracking_enabled");n(d==="true")}},[l]);const o=()=>{const d=!a;n(d),localStorage.setItem("debug_resource_tracking_enabled",String(d)),window.dispatchEvent(new CustomEvent("debug-resource-tracking-toggle",{detail:d}))};return l?e.jsx("button",{onClick:o,className:`flex items-center justify-center w-10 h-10 rounded-lg transition-colors ${a?"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:a?"Disable Resource Debug":"Enable Resource Debug",children:"🔍"}):null}const Me=()=>{const[s,a]=t.useState(!1),{isMobileOpen:n,toggleSidebar:l,toggleMobileSidebar:o}=F(),d=()=>{window.innerWidth>=1024?l():o()},m=()=>{a(!s)},u=t.useRef(null);return t.useEffect(()=>{const b=p=>{var v;(p.metaKey||p.ctrlKey)&&p.key==="k"&&(p.preventDefault(),(v=u.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(M,{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:m,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:u,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:`${s?"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(Pe,{}),e.jsx(Re,{}),e.jsx(Ee,{}),e.jsx(De,{}),e.jsx(Le,{})]}),e.jsx(Ie,{})]})]})})},Ve=()=>{const{isMobileOpen:s,toggleMobileSidebar:a}=F();return s?e.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900/50 lg:hidden",onClick:a}):null};function Oe(){return e.jsx("div",{className:` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/page-dashboard-DxYTR5eF.js","assets/js/vendor-react-core-DjsjKnCi.js","assets/js/vendor-other-CdRIx1s3.js","assets/css/vendor-other-BsM4JrO0.css","assets/js/page-analytics.tsx-1KCk8AGD.js","assets/js/vendor-helmet-MZDArkdS.js","assets/js/vendor-state-CYwAWrAU.js","assets/js/pages-planner-Biqt-k6C.js","assets/js/vendor-react-router-BJY_70Cr.js","assets/js/page-authpages-CY7hjDHU.js","assets/js/page-clusters.config.tsx-9GAd-_h-.js","assets/js/page-reference-aC0iABvU.js","assets/js/page-components.tsx-DYfg5dka.js","assets/js/page-keywords.config.tsx-CxJn1kF1.js","assets/js/page-ideas.config.tsx-Cr6kWRFa.js","assets/js/page-delete-modal.config.ts-B7nUJ-QI.js","assets/js/page-bulk-action-modal.config.ts-D-0XtKwF.js","assets/js/page-table-actions.config.tsx-BSR5Zo7l.js","assets/js/pages-writer-BNZLXTX1.js","assets/js/page-images.config.tsx-Dy4DVDQH.js","assets/js/page-tasks.config.tsx-mmlIGC4l.js","assets/js/pages-thinker-CAze4ZPc.js","assets/js/pages-billing-CR09bFDK.js","assets/js/page-schedules.tsx-KBMo-Hzm.js","assets/js/pages-settings-GUQ4SeDJ.js","assets/js/page-help-j71zd25J.js"])))=>i.map(i=>d[i]); +import{r as t,j as e,R as Q,c as ee}from"./vendor-react-core-DjsjKnCi.js";/* empty css */import"./vendor-other-CdRIx1s3.js";import{g as te,N as se,A as q,_ as i}from"./page-dashboard-DxYTR5eF.js";import{L as M,u as re,a as H,O as ae,N as ne,B as le,R as oe,b as r}from"./vendor-react-router-BJY_70Cr.js";import{u as ie,v as I,w as de,h as W,x as O,y as z,f as ce,s as me,b as K,i as ue,z as he,A as xe,n as ge,j as pe,D as fe,E as be,T as je}from"./page-authpages-CY7hjDHU.js";import{D as $,a as R}from"./page-components.tsx-DYfg5dka.js";import{d as ye,e as J,u as we,H as _e}from"./pages-planner-Biqt-k6C.js";import{u as ke,T as ve}from"./page-reference-aC0iABvU.js";import{N as Ce}from"./page-otherpage-CbNMllJl.js";import{A as Ne}from"./page-analytics.tsx-1KCk8AGD.js";import"./vendor-state-CYwAWrAU.js";import"./page-clusters.config.tsx-9GAd-_h-.js";import"./page-keywords.config.tsx-CxJn1kF1.js";import"./page-ideas.config.tsx-Cr6kWRFa.js";import"./page-delete-modal.config.ts-B7nUJ-QI.js";import"./page-bulk-action-modal.config.ts-D-0XtKwF.js";import"./page-table-actions.config.tsx-BSR5Zo7l.js";import"./vendor-helmet-MZDArkdS.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&l(m)}).observe(document,{childList:!0,subtree:!0});function n(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(o){if(o.ep)return;o.ep=!0;const d=n(o);fetch(o.href,d)}})();const X=t.createContext(void 0),F=()=>{const s=t.useContext(X);if(!s)throw new Error("useSidebar must be used within a SidebarProvider");return s},Se=({children:s})=>{const[a,n]=t.useState(!0),[l,o]=t.useState(!1),[d,m]=t.useState(!1),[u,b]=t.useState(!1),[p,v]=t.useState(null),[_,f]=t.useState(null);t.useEffect(()=>{const j=()=>{const y=window.innerWidth<768;m(y),y||o(!1)};return j(),window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j)}},[]);const E=()=>{n(j=>!j)},L=()=>{o(j=>!j)},N=j=>{f(y=>y===j?null:j)};return e.jsx(X.Provider,{value:{isExpanded:d?!1:a,isMobileOpen:l,isHovered:u,activeItem:p,openSubmenu:_,toggleSidebar:E,toggleMobileSidebar:L,setIsHovered:b,setActiveItem:v,toggleSubmenu:N},children:s})},Ee=()=>{const{toggleTheme:s}=ie();return e.jsxs("button",{onClick:s,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 Le(){const[s,a]=t.useState(!1),[n,l]=t.useState(!0);function o(){a(!s)}function d(){a(!1)}const m=()=>{o(),l(!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:m,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($,{isOpen:s,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:o,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(R,{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(R,{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(R,{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(R,{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(R,{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(R,{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(R,{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(R,{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(M,{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 Ie(){var b;const[s,a]=t.useState(!1),n=re(),{user:l,logout:o}=I();function d(){a(!s)}function m(){a(!1)}const u=()=>{o(),n("/signin",{replace:!0}),m()};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:l!=null&&l.email?e.jsx("span",{className:"text-white font-semibold text-sm",children:l.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:(l==null?void 0:l.username)||((b=l==null?void 0:l.email)==null?void 0:b.split("@")[0])||"User"}),e.jsx("svg",{className:`stroke-gray-500 dark:stroke-gray-400 transition-transform duration-200 ${s?"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($,{isOpen:s,onClose:m,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:(l==null?void 0:l.username)||"User"}),e.jsx("span",{className:"mt-0.5 block text-theme-xs text-gray-500 dark:text-gray-400",children:(l==null?void 0:l.email)||"No email"}),(l==null?void 0:l.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:l.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(R,{onItemClick:m,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(R,{onItemClick:m,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(R,{onItemClick:m,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:u,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 Re=()=>{const{metrics:s}=ye();return!s||s.length===0?null:e.jsx("div",{className:"igny8-header-metrics hidden lg:flex",children:s.map((a,n)=>e.jsxs(Q.Fragment,{children:[e.jsxs("div",{className:"igny8-header-metric",children:[e.jsx("div",{className:`igny8-header-metric-accent ${a.accentColor}`}),e.jsx("span",{className:"igny8-header-metric-label",children:a.label}),e.jsx("span",{className:"igny8-header-metric-value",children:typeof a.value=="number"?a.value.toLocaleString():a.value})]}),n0?w=!y.some(h=>a.pathname.startsWith(h)):w=j.some(h=>a.pathname.startsWith(h)),t.useEffect(()=>{b&&m&&u().catch(h=>{console.debug("SiteSwitcher: Failed to refresh user (non-critical):",h)})},[b]),t.useEffect(()=>{if(w){L(!1);return}c(),l||d()},[w,a.pathname,(k=m==null?void 0:m.account)==null?void 0:k.id]);const c=async()=>{try{L(!0);const C=((await te()).results||[]).filter(S=>S.is_active);f(C)}catch(h){console.error("Failed to load sites:",h),n.error(`Failed to load sites: ${h.message}`)}finally{L(!1)}},x=async h=>{try{await se(h);const C=_.find(S=>S.id===h);C&&(o(C),n.success(`Switched to "${C.name}"`)),v(!1)}catch(C){n.error(`Failed to switch site: ${C.message}`)}};function g(){v(!p)}return w||E||_.length===0?null:e.jsxs("div",{className:"relative inline-block",children:[e.jsxs("button",{ref:N,onClick:g,className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:hover:bg-gray-700 dropdown-toggle","aria-label":"Switch site",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})}),e.jsx("span",{className:"max-w-[150px] truncate",children:(l==null?void 0:l.name)||"Select Site"})]}),e.jsx("svg",{className:`w-4 h-4 transition-transform ${p?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e.jsx($,{isOpen:p,onClose:()=>v(!1),anchorRef:N,placement:"bottom-left",className:"w-64 p-2",children:_.map(h=>e.jsxs(R,{onItemClick:()=>x(h.id),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${(l==null?void 0:l.id)===h.id?"bg-blue-50 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300":"text-gray-700 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("span",{className:"flex-1",children:h.name}),(l==null?void 0:l.id)===h.id&&e.jsx("svg",{className:"w-4 h-4 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},h.id))})]})}function De(){const{user:s}=I(),[a,n]=t.useState(!1),l=(s==null?void 0:s.role)==="admin"||(s==null?void 0:s.role)==="developer";t.useEffect(()=>{if(l){const d=localStorage.getItem("debug_resource_tracking_enabled");n(d==="true")}},[l]);const o=()=>{const d=!a;n(d),localStorage.setItem("debug_resource_tracking_enabled",String(d)),window.dispatchEvent(new CustomEvent("debug-resource-tracking-toggle",{detail:d}))};return l?e.jsx("button",{onClick:o,className:`flex items-center justify-center w-10 h-10 rounded-lg transition-colors ${a?"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:a?"Disable Resource Debug":"Enable Resource Debug",children:"🔍"}):null}const Me=()=>{const[s,a]=t.useState(!1),{isMobileOpen:n,toggleSidebar:l,toggleMobileSidebar:o}=F(),d=()=>{window.innerWidth>=1024?l():o()},m=()=>{a(!s)},u=t.useRef(null);return t.useEffect(()=>{const b=p=>{var v;(p.metaKey||p.ctrlKey)&&p.key==="k"&&(p.preventDefault(),(v=u.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(M,{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:m,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:u,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:`${s?"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(Pe,{}),e.jsx(Re,{}),e.jsx(Ee,{}),e.jsx(De,{}),e.jsx(Le,{})]}),e.jsx(Ie,{})]})]})})},Ve=()=>{const{isMobileOpen:s,toggleMobileSidebar:a}=F();return s?e.jsx("div",{className:"fixed inset-0 z-40 bg-gray-900/50 lg:hidden",onClick:a}):null};function Oe(){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 ze="1.0.0",He=()=>{var w;const{isExpanded:s,isMobileOpen:a,isHovered:n,setIsHovered:l}=F(),o=H(),{user:d}=I(),m=((w=d==null?void 0:d.account)==null?void 0:w.slug)==="aws-admin"||(d==null?void 0:d.role)==="developer",[u,b]=t.useState(null),[p,v]=t.useState({}),_=t.useRef({}),f=t.useCallback(c=>o.pathname===c,[o.pathname]),E=t.useMemo(()=>[{label:"OVERVIEW",items:[{icon:e.jsx(de,{}),name:"Dashboard",path:"/"},{icon:e.jsx(W,{}),name:"Analytics",path:"/analytics"},{icon:e.jsx(O,{}),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(ce,{}),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(me,{}),name:"Writer",subItems:[{name:"Dashboard",path:"/writer"},{name:"Tasks",path:"/writer/tasks"},{name:"Content",path:"/writer/content"},{name:"Drafts",path:"/writer/drafts"},{name:"Images",path:"/writer/images"},{name:"Published",path:"/writer/published"}]},{icon:e.jsx(K,{}),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(ue,{}),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(he,{}),name:"Billing",subItems:[{name:"Credits",path:"/billing/credits"},{name:"Transactions",path:"/billing/transactions"},{name:"Usage",path:"/billing/usage"}]}]},{label:"HELP",items:[{icon:e.jsx(O,{}),name:"Help & Support",path:"/help"},{icon:e.jsx(O,{}),name:"Documentation",path:"/help/docs"}]}],[]),L=t.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(K,{}),name:"AI Controls",subItems:[{name:"AI Settings",path:"/settings/ai"}]},{icon:e.jsx(W,{}),name:"System Health",subItems:[{name:"Status",path:"/settings/status"}]},{icon:e.jsx(O,{}),name:"Testing Tools",subItems:[{name:"Function Testing",path:"/help/function-testing"},{name:"System Testing",path:"/help/system-testing"}]},{icon:e.jsx(xe,{}),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"}]}]}),[]),N=t.useMemo(()=>m?[...E,L]:E,[m,E,L]);t.useEffect(()=>{const c=o.pathname;let x=!1;N.forEach((g,k)=>{g.items.forEach((h,C)=>{h.subItems&&!x&&h.subItems.some(P=>!!(c===P.path||P.path!=="/"&&c.startsWith(P.path+"/")))&&(b({sectionIndex:k,itemIndex:C}),x=!0)})})},[o.pathname,N]),t.useEffect(()=>{if(u!==null){const c=`${u.sectionIndex}-${u.itemIndex}`,x=requestAnimationFrame(()=>{setTimeout(()=>{const g=_.current[c];if(g){const k=g.scrollHeight;k>0&&v(h=>({...h,[c]:k}))}},50)});return()=>cancelAnimationFrame(x)}},[u]);const j=(c,x)=>{b(g=>g&&g.sectionIndex===c&&g.itemIndex===x?null:{sectionIndex:c,itemIndex:x})},y=(c,x)=>e.jsx("ul",{className:"flex flex-col gap-2",children:c.map((g,k)=>e.jsxs("li",{children:[g.subItems?e.jsxs("button",{onClick:()=>j(x,k),className:`menu-item group ${(u==null?void 0:u.sectionIndex)===x&&(u==null?void 0:u.itemIndex)===k||g.subItems&&g.subItems.some(h=>f(h.path))?"menu-item-active":"menu-item-inactive"} cursor-pointer ${!s&&!n?"lg:justify-center":"lg:justify-start"}`,children:[e.jsx("span",{className:`menu-item-icon-size ${(u==null?void 0:u.sectionIndex)===x&&(u==null?void 0:u.itemIndex)===k||g.subItems&&g.subItems.some(h=>f(h.path))?"menu-item-icon-active":"menu-item-icon-inactive"}`,children:g.icon}),(s||n||a)&&e.jsx("span",{className:"menu-item-text",children:g.name}),(s||n||a)&&e.jsx(pe,{className:`ml-auto w-5 h-5 transition-transform duration-200 ${(u==null?void 0:u.sectionIndex)===x&&(u==null?void 0:u.itemIndex)===k?"rotate-180 text-brand-500":""}`})]}):g.path&&e.jsxs(M,{to:g.path,className:`menu-item group ${f(g.path)?"menu-item-active":"menu-item-inactive"}`,children:[e.jsx("span",{className:`menu-item-icon-size ${f(g.path)?"menu-item-icon-active":"menu-item-icon-inactive"}`,children:g.icon}),(s||n||a)&&e.jsx("span",{className:"menu-item-text",children:g.name})]}),g.subItems&&(s||n||a)&&e.jsx("div",{ref:h=>{_.current[`${x}-${k}`]=h},className:"overflow-hidden transition-all duration-300",style:{height:(u==null?void 0:u.sectionIndex)===x&&(u==null?void 0:u.itemIndex)===k?`${p[`${x}-${k}`]}px`:"0px"},children:e.jsx("ul",{className:"mt-2 flex flex-col gap-1 ml-9",children:g.subItems.map(h=>e.jsx("li",{children:e.jsxs(M,{to:h.path,className:`menu-dropdown-item ${f(h.path)?"menu-dropdown-item-active":"menu-dropdown-item-inactive"}`,children:[h.name,e.jsxs("span",{className:"flex items-center gap-1 ml-auto",children:[h.new&&e.jsx("span",{className:`ml-auto ${f(h.path)?"menu-dropdown-badge-active":"menu-dropdown-badge-inactive"} menu-dropdown-badge`,children:"new"}),h.pro&&e.jsx("span",{className:`ml-auto ${f(h.path)?"menu-dropdown-badge-active":"menu-dropdown-badge-inactive"} menu-dropdown-badge`,children:"pro"})]})]})},h.name))})})]},g.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 ${s||a||n?"w-[290px]":"w-[90px]"} ${a?"translate-x-0":"-translate-x-full"} - lg:translate-x-0`,onMouseEnter:()=>!s&&l(!0),onMouseLeave:()=>l(!1),children:[e.jsxs("div",{className:"py-8 flex flex-col justify-center items-center gap-3",children:[e.jsx(M,{to:"/",className:"flex justify-center items-center",children:s||n||a?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})}),(s||n||a)&&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",ze]})})]}),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:N.map((c,x)=>e.jsxs("div",{children:[e.jsx("h2",{className:`mb-4 text-xs uppercase flex leading-[20px] text-gray-400 ${!s&&!n?"lg:justify-center":"justify-start"}`,children:s||n||a?c.label:e.jsx(ge,{className:"size-6"})}),y(c.items,x)]},c.label))})}),s||n||a?e.jsx(Oe,{}):null]})]})},T=[],D=new Set;function B(s){const[a,n]=t.useState([]);t.useEffect(()=>{const m=()=>{n([...T])};return D.add(m),m(),()=>{D.delete(m)}},[]);const l=t.useCallback((m,u)=>{const b={message:m instanceof Error?m.message:m,source:u||s,timestamp:Date.now(),stack:m instanceof Error?m.stack:void 0};T.push(b),T.length>10&&T.shift(),D.forEach(p=>p([...T])),console.error(`[${b.source}]`,b)},[s]),o=t.useCallback(m=>{T.splice(m,1),D.forEach(u=>u([...T]))},[]),d=t.useCallback(()=>{T.length=0,D.forEach(m=>m([]))},[]);return{errors:a,addError:l,clearError:o,clearAllErrors:d}}const V=new Map,Z=new Set;function A(s,a){a?V.set(s,{source:s,startTime:Date.now(),duration:0}):V.delete(s),Z.forEach(n=>{const l=Array.from(V.values()).map(o=>({...o,duration:Date.now()-o.startTime}));n(l)})}function Fe(){const[s,a]=t.useState([]),{addError:n}=B("LoadingStateMonitor"),l=t.useRef(new Set),o=t.useRef(n);return t.useEffect(()=>{o.current=n},[n]),t.useEffect(()=>{const d=b=>{const p=b.filter(f=>f.duration<6e4);a(p);const v=p.filter(f=>f.duration>5e3&&!l.current.has(f.source));v.length>0&&v.forEach(f=>{l.current.add(f.source),o.current(new Error(`Loading state stuck: ${f.source} (${(f.duration/1e3).toFixed(1)}s)`),"LoadingStateMonitor")}),Array.from(l.current).filter(f=>!p.find(E=>E.source===f&&E.duration>5e3)).forEach(f=>l.current.delete(f))},m=Array.from(V.values()).map(b=>({...b,duration:Date.now()-b.startTime}));d(m),Z.add(d);const u=setInterval(()=>{const b=Array.from(V.values()).map(p=>({...p,duration:Date.now()-p.startTime}));d(b)},1e3);return()=>{Z.delete(d),clearInterval(u)}},[]),t.useEffect(()=>{const d=s.filter(m=>m.duration>1e4);d.length>0&&d.forEach(m=>{console.warn(`Auto-resetting stuck loading state: ${m.source}`),A(m.source,!1),l.current.delete(m.source)})},[s]),null}function Be({enabled:s}){const{user:a}=I(),[n,l]=t.useState([]),[o,d]=t.useState(!1),[m,u]=t.useState(null),b=t.useRef(null),p=t.useRef([]),v=t.useRef(null),_=t.useRef(null),f=(a==null?void 0:a.role)==="admin"||(a==null?void 0:a.role)==="developer";t.useEffect(()=>{if(!s||!f){_.current&&(window.fetch=_.current,_.current=null,v.current=null);return}return u(performance.now()),_.current||(_.current=window.fetch,v.current=window.fetch.bind(window)),window.fetch=async function(...c){performance.now();const[x,g={}]=c;if((typeof x=="string"?x:x.toString()).includes("/request-metrics/"))return _.current.apply(window,c);const h=new Headers(g.headers||{});h.set("X-Debug-Resource-Tracking","true");const C=await v.current(x,{...g,headers:h});performance.now();const S=C.headers.get("X-Resource-Tracking-ID");return S&&(b.current=S,setTimeout(()=>E(S),300)),C},()=>{_.current&&(window.fetch=_.current,_.current=null,v.current=null)}},[s,f]);const E=async(c,x=0)=>{try{const g=_.current||window.fetch,{token:k}=I.getState(),h={"Content-Type":"application/json"};k&&(h.Authorization=`Bearer ${k}`);const C=await g.call(window,`${q}/v1/system/request-metrics/${c}/`,{method:"GET",headers:h,credentials:"include"});if(C.ok){const S=await C.json();p.current=[...p.current,S],l([...p.current])}else if(C.status===401)try{await I.getState().refreshToken();const S=I.getState().token;if(S){const P={"Content-Type":"application/json",Authorization:`Bearer ${S}`},U=await g.call(window,`${q}/v1/system/request-metrics/${c}/`,{method:"GET",headers:P,credentials:"include"});if(U.ok){const Y=await U.json();p.current=[...p.current,Y],l([...p.current]);return}}}catch{console.warn("Token refresh failed, user may need to re-authenticate")}else if(C.status===404){if(x===0){setTimeout(()=>E(c,1),200);return}return}else console.warn("Failed to fetch metrics:",C.status,C.statusText,"for request:",c)}catch(g){if(g instanceof TypeError&&g.message.includes("fetch"))return;console.error("Failed to fetch request metrics:",g)}},L=m?performance.now()-m:null,N=n.reduce((c,x)=>({elapsed_time_ms:c.elapsed_time_ms+x.elapsed_time_ms,cpu_total_ms:c.cpu_total_ms+x.cpu.total_time_ms,memory_delta_mb:c.memory_delta_mb+x.memory.delta_mb,io_read_mb:c.io_read_mb+x.io.read_mb,io_write_mb:c.io_write_mb+x.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((c,x)=>x.elapsed_time_ms>c.elapsed_time_ms?x:c):null,y=n.length>0?n.reduce((c,x)=>x.cpu.total_time_ms>c.cpu.total_time_ms?x:c):null,w=n.length>0?n.reduce((c,x)=>x.memory.delta_mb>c.memory.delta_mb?x:c):null;return!s||!f?null:e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>d(!o),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,")"]})]}),o&&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:[L&&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:[L.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: ",N.elapsed_time_ms.toFixed(2)," ms"]}),e.jsxs("div",{children:["Total CPU Time: ",N.cpu_total_ms.toFixed(2)," ms"]}),e.jsxs("div",{children:["Total Memory Delta: ",N.memory_delta_mb>0?"+":"",N.memory_delta_mb.toFixed(2)," MB"]}),e.jsxs("div",{children:["Total I/O Read: ",N.io_read_mb.toFixed(2)," MB"]}),e.jsxs("div",{children:["Total I/O Write: ",N.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((c,x)=>{const g=c.elapsed_time_ms>1e3,k=c.cpu.total_time_ms>100,h=c.memory.delta_mb>1;return e.jsxs("div",{className:`p-3 rounded border text-xs ${g||k||h?"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:c.method}),e.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate",children:c.path}),(g||k||h)&&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:g?"font-semibold text-red-700 dark:text-red-300":"",children:["⏱️ Time: ",c.elapsed_time_ms.toFixed(2)," ms"]}),e.jsxs("div",{className:k?"font-semibold text-red-700 dark:text-red-300":"",children:["🔥 CPU: ",c.cpu.total_time_ms.toFixed(2)," ms",e.jsxs("span",{className:"text-gray-500",children:[" (User: ",c.cpu.user_time_ms.toFixed(2),"ms, System: ",c.cpu.system_time_ms.toFixed(2),"ms)"]}),e.jsx("br",{}),e.jsxs("span",{className:"ml-4 text-gray-500",children:["System CPU: ",c.cpu.system_percent.toFixed(1),"%"]})]}),e.jsxs("div",{className:h?"font-semibold text-red-700 dark:text-red-300":"",children:["💾 Memory: ",c.memory.delta_mb>0?"+":"",c.memory.delta_mb.toFixed(2)," MB",e.jsxs("span",{className:"text-gray-500",children:[" (Final RSS: ",c.memory.final_rss_mb.toFixed(2)," MB)"]}),e.jsx("br",{}),e.jsxs("span",{className:"ml-4 text-gray-500",children:["System Memory: ",c.memory.system_used_percent.toFixed(1),"%"]})]}),c.io.read_mb>0&&e.jsxs("div",{children:["📖 I/O Read: ",c.io.read_mb.toFixed(2)," MB (",c.io.read_bytes.toLocaleString()," bytes)"]}),c.io.write_mb>0&&e.jsxs("div",{children:["📝 I/O Write: ",c.io.write_mb.toFixed(2)," MB (",c.io.write_bytes.toLocaleString()," bytes)"]})]})]},x)})]}),n.length>0&&e.jsx("button",{onClick:()=>{l([]),p.current=[],u(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 Ze=()=>{const{isExpanded:s,isHovered:a,isMobileOpen:n}=F(),{loadActiveSite:l,activeSite:o}=J(),{loadSectorsForSite:d}=we(),{refreshUser:m,isAuthenticated:u}=I(),{addError:b}=B("AppLayout"),p=t.useRef(!1),v=t.useRef(null),_=t.useRef(!1),f=t.useRef(!1),[E,L]=t.useState(!1),N=t.useRef(0);return t.useEffect(()=>{if(!p.current&&!_.current){p.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);l().catch(y=>{console.error("AppLayout: Error loading active site:",y),b(y,"AppLayout.loadActiveSite")}).finally(()=>{clearTimeout(j),A("site-loading",!1),_.current=!1})}},[]),t.useEffect(()=>{const j=(o==null?void 0:o.id)??null;if(j&&(o!=null&&o.is_active)&&j!==v.current&&!f.current){v.current=j,f.current=!0,A("sector-loading",!0);const y=setTimeout(()=>{f.current&&(console.error("AppLayout: Sector loading timeout after 35 seconds"),A("sector-loading",!1),f.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),f.current=!1})}else if(j&&!(o!=null&&o.is_active)){v.current=null;const{useSectorStore:y}=require("../store/sectorStore");y.getState().clearActiveSector()}},[o==null?void 0:o.id,o==null?void 0:o.is_active]),t.useEffect(()=>{if(!u)return;const j="2.0.2",y="igny8-app-version",w=async(h=!1)=>{const C=Date.now();if(!(!h&&C-N.current<3e4))try{N.current=C,await m(),h&&localStorage.setItem(y,j)}catch(S){console.debug("User data refresh failed (non-critical):",S)}};localStorage.getItem(y)!==j?w(!0):w();const x=()=>{document.visibilityState==="visible"&&w()},g=()=>{w()},k=setInterval(()=>w(),12e4);return document.addEventListener("visibilitychange",x),window.addEventListener("focus",g),()=>{clearInterval(k),document.removeEventListener("visibilitychange",x),window.removeEventListener("focus",g)}},[u,m]),t.useEffect(()=>{const j=localStorage.getItem("debug_resource_tracking_enabled");L(j==="true");const y=w=>{L(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(He,{}),e.jsx(Ve,{})]}),e.jsxs("div",{className:`flex-1 transition-all duration-300 ease-in-out ${s||a?"lg:ml-[290px]":"lg:ml-[90px]"} ${n?"ml-0":""} w-full max-w-full min-[1440px]:max-w-[90%]`,children:[e.jsx(Me,{}),e.jsx("div",{className:"p-4 pb-20 md:p-6 md:pb-24",children:e.jsx(ae,{})}),e.jsx(Be,{enabled:E})]})]})},$e=()=>e.jsx(Se,{children:e.jsx(Ze,{})});function Ue(){const{pathname:s}=H();return t.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[s]),null}function qe({children:s}){const{isAuthenticated:a,loading:n}=I(),l=H(),{addError:o}=B("ProtectedRoute"),[d,m]=t.useState(!1),[u,b]=t.useState("");return t.useEffect(()=>{A("auth-loading",n)},[n]),t.useEffect(()=>{n&&(console.warn("ProtectedRoute: Loading state is true on mount, resetting immediately"),I.setState({loading:!1}))},[]),t.useEffect(()=>{if(n){const p=setTimeout(()=>{b("Authentication check is taking longer than expected. This may indicate a network or server issue."),m(!0),o(new Error("Auth loading stuck for 3 seconds"),"ProtectedRoute")},3e3),v=setTimeout(()=>{console.error("ProtectedRoute: Loading state stuck for 5 seconds, forcing reset"),I.setState({loading:!1}),m(!1)},5e3);return()=>{clearTimeout(p),clearTimeout(v)}}else m(!1)},[n,o]),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:u}),e.jsx("button",{onClick:()=>{I.setState({loading:!1}),m(!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"})]})]})}):a?e.jsx(e.Fragment,{children:s}):e.jsx(ne,{to:"/signin",state:{from:l},replace:!0})}function We(){const{errors:s,clearError:a,clearAllErrors:n}=B("GlobalErrorDisplay"),[l,o]=t.useState(!1);return t.useEffect(()=>{o(s.length>0)},[s.length]),!l||s.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-[9999] max-w-md space-y-2",children:[s.map((d,m)=>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:()=>a(m),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:"×"})]})},m)),s.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 Ke=t.lazy(()=>i(()=>import("./page-dashboard-DxYTR5eF.js").then(s=>s.a8),__vite__mapDeps([0,1,2,3,4,5,6]))),Ge=t.lazy(()=>i(()=>import("./pages-planner-COGkFLJh.js").then(s=>s.D),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Je=t.lazy(()=>i(()=>import("./pages-planner-COGkFLJh.js").then(s=>s.K),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Xe=t.lazy(()=>i(()=>import("./pages-planner-COGkFLJh.js").then(s=>s.C),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Ye=t.lazy(()=>i(()=>import("./pages-planner-COGkFLJh.js").then(s=>s.I),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Qe=t.lazy(()=>i(()=>import("./pages-planner-COGkFLJh.js").then(s=>s.f),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),et=t.lazy(()=>i(()=>import("./pages-writer-CjPEISlq.js").then(s=>s.D),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),tt=t.lazy(()=>i(()=>import("./pages-writer-CjPEISlq.js").then(s=>s.T),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),st=t.lazy(()=>i(()=>import("./pages-writer-CjPEISlq.js").then(s=>s.C),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),rt=t.lazy(()=>i(()=>import("./pages-writer-CjPEISlq.js").then(s=>s.a),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),at=t.lazy(()=>i(()=>import("./pages-writer-CjPEISlq.js").then(s=>s.I),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),nt=t.lazy(()=>i(()=>import("./pages-writer-CjPEISlq.js").then(s=>s.P),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),lt=t.lazy(()=>i(()=>import("./pages-thinker-DjafPZNF.js").then(s=>s.D),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),ot=t.lazy(()=>i(()=>import("./pages-thinker-DjafPZNF.js").then(s=>s.P),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),it=t.lazy(()=>i(()=>import("./pages-thinker-DjafPZNF.js").then(s=>s.A),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),dt=t.lazy(()=>i(()=>import("./pages-thinker-DjafPZNF.js").then(s=>s.a),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),ct=t.lazy(()=>i(()=>import("./pages-thinker-DjafPZNF.js").then(s=>s.S),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),mt=t.lazy(()=>i(()=>import("./pages-thinker-DjafPZNF.js").then(s=>s.I),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),ut=t.lazy(()=>i(()=>import("./pages-billing-CR09bFDK.js").then(s=>s.C),__vite__mapDeps([22,1,2,3,4,5,11,0,6,12,9,8,10]))),ht=t.lazy(()=>i(()=>import("./pages-billing-CR09bFDK.js").then(s=>s.T),__vite__mapDeps([22,1,2,3,4,5,11,0,6,12,9,8,10]))),xt=t.lazy(()=>i(()=>import("./pages-billing-CR09bFDK.js").then(s=>s.U),__vite__mapDeps([22,1,2,3,4,5,11,0,6,12,9,8,10]))),gt=t.lazy(()=>i(()=>import("./page-reference-aC0iABvU.js").then(s=>s.S),__vite__mapDeps([11,1,2,3,4,5,0,6,12,9,8,10]))),pt=t.lazy(()=>i(()=>import("./page-reference-aC0iABvU.js").then(s=>s.I),__vite__mapDeps([11,1,2,3,4,5,0,6,12,9,8,10]))),ft=t.lazy(()=>i(()=>import("./page-analytics.tsx-1KCk8AGD.js").then(s=>s.a),__vite__mapDeps([4,1,2,3,5]))),bt=t.lazy(()=>i(()=>import("./page-schedules.tsx-KBMo-Hzm.js"),__vite__mapDeps([23,1,2,3,4,5]))),jt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.G),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),yt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.U),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),wt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.S),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),_t=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.a),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),kt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.A),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),vt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.M),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ct=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.b),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Nt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.P),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),St=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.I),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Et=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.c),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Lt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.d),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),It=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.e),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Rt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.f),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Tt=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.H),__vite__mapDeps([25,1,2,3,4,5]))),At=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.D),__vite__mapDeps([25,1,2,3,4,5]))),Pt=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.S),__vite__mapDeps([25,1,2,3,4,5]))),Dt=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.F),__vite__mapDeps([25,1,2,3,4,5]))),Mt=t.lazy(()=>i(()=>import("./page-components.tsx-DYfg5dka.js").then(s=>s.f),__vite__mapDeps([12,1,2,3,9,4,5,8,6]))),Vt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.g),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ot=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.h),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),zt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.B),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ht=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.i),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ft=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.j),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Bt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.k),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Zt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.C),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),$t=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.l),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ut=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.D),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),qt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.m),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Wt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.L),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Kt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.n),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Gt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.o),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),G=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.N),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Jt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.p),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Xt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.q),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Yt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.r),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Qt=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.s),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),es=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.R),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),ts=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.t),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),ss=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.T),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),rs=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.u),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),as=t.lazy(()=>i(()=>import("./pages-settings-Da7wPw3M.js").then(s=>s.V),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17])));function ns(){return e.jsxs(e.Fragment,{children:[e.jsx(We,{}),e.jsx(Fe,{}),e.jsxs(le,{children:[e.jsx(Ue,{}),e.jsxs(oe,{children:[e.jsx(r,{path:"/signin",element:e.jsx(fe,{})}),e.jsx(r,{path:"/signup",element:e.jsx(be,{})}),e.jsxs(r,{element:e.jsx(qe,{children:e.jsx($e,{})}),children:[e.jsx(r,{index:!0,path:"/",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ke,{})})}),e.jsx(r,{path:"/planner",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ge,{})})}),e.jsx(r,{path:"/planner/keywords",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Je,{})})}),e.jsx(r,{path:"/planner/clusters",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Xe,{})})}),e.jsx(r,{path:"/planner/ideas",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ye,{})})}),e.jsx(r,{path:"/writer",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(et,{})})}),e.jsx(r,{path:"/writer/tasks",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(tt,{})})}),e.jsx(r,{path:"/writer/content",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(st,{})})}),e.jsx(r,{path:"/writer/drafts",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(rt,{})})}),e.jsx(r,{path:"/writer/images",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(at,{})})}),e.jsx(r,{path:"/writer/published",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(nt,{})})}),e.jsx(r,{path:"/thinker",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(lt,{})})}),e.jsx(r,{path:"/thinker/prompts",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ot,{})})}),e.jsx(r,{path:"/thinker/author-profiles",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(it,{})})}),e.jsx(r,{path:"/thinker/profile",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(dt,{})})}),e.jsx(r,{path:"/thinker/strategies",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ct,{})})}),e.jsx(r,{path:"/thinker/image-testing",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(mt,{})})}),e.jsx(r,{path:"/billing/credits",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ut,{})})}),e.jsx(r,{path:"/billing/transactions",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ht,{})})}),e.jsx(r,{path:"/billing/usage",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(xt,{})})}),e.jsx(r,{path:"/reference/seed-keywords",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(gt,{})})}),e.jsx(r,{path:"/planner/keyword-opportunities",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Qe,{})})}),e.jsx(r,{path:"/reference/industries",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(pt,{})})}),e.jsx(r,{path:"/analytics",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ft,{})})}),e.jsx(r,{path:"/schedules",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(bt,{})})}),e.jsx(r,{path:"/settings",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(jt,{})})}),e.jsx(r,{path:"/settings/users",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(yt,{})})}),e.jsx(r,{path:"/settings/subscriptions",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(wt,{})})}),e.jsx(r,{path:"/settings/system",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(_t,{})})}),e.jsx(r,{path:"/settings/account",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(kt,{})})}),e.jsx(r,{path:"/settings/modules",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(vt,{})})}),e.jsx(r,{path:"/settings/ai",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ct,{})})}),e.jsx(r,{path:"/settings/plans",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Nt,{})})}),e.jsx(r,{path:"/settings/industries",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(St,{})})}),e.jsx(r,{path:"/settings/status",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Et,{})})}),e.jsx(r,{path:"/settings/integration",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Lt,{})})}),e.jsx(r,{path:"/settings/sites",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(It,{})})}),e.jsx(r,{path:"/settings/import-export",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Rt,{})})}),e.jsx(r,{path:"/help",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Tt,{})})}),e.jsx(r,{path:"/help/docs",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(At,{})})}),e.jsx(r,{path:"/help/system-testing",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Pt,{})})}),e.jsx(r,{path:"/help/function-testing",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Dt,{})})}),e.jsx(r,{path:"/ui-elements/alerts",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Vt,{})})}),e.jsx(r,{path:"/ui-elements/avatars",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ot,{})})}),e.jsx(r,{path:"/ui-elements/badges",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(zt,{})})}),e.jsx(r,{path:"/ui-elements/breadcrumb",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ht,{})})}),e.jsx(r,{path:"/ui-elements/buttons",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ft,{})})}),e.jsx(r,{path:"/ui-elements/buttons-group",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Bt,{})})}),e.jsx(r,{path:"/ui-elements/cards",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Zt,{})})}),e.jsx(r,{path:"/ui-elements/carousel",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx($t,{})})}),e.jsx(r,{path:"/ui-elements/dropdowns",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ut,{})})}),e.jsx(r,{path:"/ui-elements/images",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(qt,{})})}),e.jsx(r,{path:"/ui-elements/links",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Wt,{})})}),e.jsx(r,{path:"/ui-elements/list",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Kt,{})})}),e.jsx(r,{path:"/ui-elements/modals",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Gt,{})})}),e.jsx(r,{path:"/ui-elements/notifications",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(G,{})})}),e.jsx(r,{path:"/ui-elements/pagination",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Jt,{})})}),e.jsx(r,{path:"/ui-elements/popovers",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Xt,{})})}),e.jsx(r,{path:"/ui-elements/pricing-table",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Yt,{})})}),e.jsx(r,{path:"/ui-elements/progressbar",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Qt,{})})}),e.jsx(r,{path:"/ui-elements/ribbons",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(es,{})})}),e.jsx(r,{path:"/ui-elements/spinners",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ts,{})})}),e.jsx(r,{path:"/ui-elements/tabs",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ss,{})})}),e.jsx(r,{path:"/ui-elements/tooltips",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(rs,{})})}),e.jsx(r,{path:"/ui-elements/videos",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(as,{})})}),e.jsx(r,{path:"/components",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Mt,{})})}),e.jsx(r,{path:"/notifications",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(G,{})})})]}),e.jsx(r,{path:"*",element:e.jsx(Ce,{})})]})]})]})}class ls extends t.Component{constructor(a){super(a),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a,errorInfo:null}}componentDidCatch(a,n){console.error("ErrorBoundary caught an error:",a,n),this.setState({error:a,errorInfo:n})}render(){var a;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:((a=this.state.error)==null?void 0:a.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}}ee.createRoot(document.getElementById("root")).render(e.jsx(t.StrictMode,{children:e.jsx(ls,{children:e.jsx(je,{children:e.jsx(_e,{children:e.jsx(ve,{children:e.jsx(Ne,{children:e.jsx(ns,{})})})})})})})); + lg:translate-x-0`,onMouseEnter:()=>!s&&l(!0),onMouseLeave:()=>l(!1),children:[e.jsxs("div",{className:"py-8 flex flex-col justify-center items-center gap-3",children:[e.jsx(M,{to:"/",className:"flex justify-center items-center",children:s||n||a?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})}),(s||n||a)&&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",ze]})})]}),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:N.map((c,x)=>e.jsxs("div",{children:[e.jsx("h2",{className:`mb-4 text-xs uppercase flex leading-[20px] text-gray-400 ${!s&&!n?"lg:justify-center":"justify-start"}`,children:s||n||a?c.label:e.jsx(ge,{className:"size-6"})}),y(c.items,x)]},c.label))})}),s||n||a?e.jsx(Oe,{}):null]})]})},A=[],D=new Set;function B(s){const[a,n]=t.useState([]);t.useEffect(()=>{const m=()=>{n([...A])};return D.add(m),m(),()=>{D.delete(m)}},[]);const l=t.useCallback((m,u)=>{const b={message:m instanceof Error?m.message:m,source:u||s,timestamp:Date.now(),stack:m instanceof Error?m.stack:void 0};A.push(b),A.length>10&&A.shift(),D.forEach(p=>p([...A])),console.error(`[${b.source}]`,b)},[s]),o=t.useCallback(m=>{A.splice(m,1),D.forEach(u=>u([...A]))},[]),d=t.useCallback(()=>{A.length=0,D.forEach(m=>m([]))},[]);return{errors:a,addError:l,clearError:o,clearAllErrors:d}}const V=new Map,Z=new Set;function T(s,a){a?V.set(s,{source:s,startTime:Date.now(),duration:0}):V.delete(s),Z.forEach(n=>{const l=Array.from(V.values()).map(o=>({...o,duration:Date.now()-o.startTime}));n(l)})}function Fe(){const[s,a]=t.useState([]),{addError:n}=B("LoadingStateMonitor"),l=t.useRef(new Set),o=t.useRef(n);return t.useEffect(()=>{o.current=n},[n]),t.useEffect(()=>{const d=b=>{const p=b.filter(f=>f.duration<6e4);a(p);const v=p.filter(f=>f.duration>5e3&&!l.current.has(f.source));v.length>0&&v.forEach(f=>{l.current.add(f.source),o.current(new Error(`Loading state stuck: ${f.source} (${(f.duration/1e3).toFixed(1)}s)`),"LoadingStateMonitor")}),Array.from(l.current).filter(f=>!p.find(E=>E.source===f&&E.duration>5e3)).forEach(f=>l.current.delete(f))},m=Array.from(V.values()).map(b=>({...b,duration:Date.now()-b.startTime}));d(m),Z.add(d);const u=setInterval(()=>{const b=Array.from(V.values()).map(p=>({...p,duration:Date.now()-p.startTime}));d(b)},1e3);return()=>{Z.delete(d),clearInterval(u)}},[]),t.useEffect(()=>{const d=s.filter(m=>m.duration>1e4);d.length>0&&d.forEach(m=>{console.warn(`Auto-resetting stuck loading state: ${m.source}`),T(m.source,!1),l.current.delete(m.source)})},[s]),null}function Be({enabled:s}){const{user:a}=I(),[n,l]=t.useState([]),[o,d]=t.useState(!1),[m,u]=t.useState(null),b=t.useRef(null),p=t.useRef([]),v=t.useRef(null),_=t.useRef(null),f=(a==null?void 0:a.role)==="admin"||(a==null?void 0:a.role)==="developer";t.useEffect(()=>{if(!s||!f){_.current&&(window.fetch=_.current,_.current=null,v.current=null);return}return u(performance.now()),_.current||(_.current=window.fetch,v.current=window.fetch.bind(window)),window.fetch=async function(...c){performance.now();const[x,g={}]=c;if((typeof x=="string"?x:x.toString()).includes("/request-metrics/"))return _.current.apply(window,c);const h=new Headers(g.headers||{});h.set("X-Debug-Resource-Tracking","true");const C=await v.current(x,{...g,headers:h});performance.now();const S=C.headers.get("X-Resource-Tracking-ID");return S&&(b.current=S,setTimeout(()=>E(S),300)),C},()=>{_.current&&(window.fetch=_.current,_.current=null,v.current=null)}},[s,f]);const E=async(c,x=0)=>{try{const g=_.current||window.fetch,{token:k}=I.getState(),h={"Content-Type":"application/json"};k&&(h.Authorization=`Bearer ${k}`);try{const C=await g.call(window,`${q}/v1/system/request-metrics/${c}/`,{method:"GET",headers:h,credentials:"include"});if(C.ok){const S=await C.json();p.current=[...p.current,S],l([...p.current])}else if(C.status===401)try{await I.getState().refreshToken();const S=I.getState().token;if(S){const P={"Content-Type":"application/json",Authorization:`Bearer ${S}`},U=await g.call(window,`${q}/v1/system/request-metrics/${c}/`,{method:"GET",headers:P,credentials:"include"});if(U.ok){const Y=await U.json();p.current=[...p.current,Y],l([...p.current]);return}}}catch{}else return C.status===404,void 0}catch{return}}catch{return}},L=m?performance.now()-m:null,N=n.reduce((c,x)=>({elapsed_time_ms:c.elapsed_time_ms+x.elapsed_time_ms,cpu_total_ms:c.cpu_total_ms+x.cpu.total_time_ms,memory_delta_mb:c.memory_delta_mb+x.memory.delta_mb,io_read_mb:c.io_read_mb+x.io.read_mb,io_write_mb:c.io_write_mb+x.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((c,x)=>x.elapsed_time_ms>c.elapsed_time_ms?x:c):null,y=n.length>0?n.reduce((c,x)=>x.cpu.total_time_ms>c.cpu.total_time_ms?x:c):null,w=n.length>0?n.reduce((c,x)=>x.memory.delta_mb>c.memory.delta_mb?x:c):null;return!s||!f?null:e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>d(!o),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,")"]})]}),o&&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:[L&&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:[L.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: ",N.elapsed_time_ms.toFixed(2)," ms"]}),e.jsxs("div",{children:["Total CPU Time: ",N.cpu_total_ms.toFixed(2)," ms"]}),e.jsxs("div",{children:["Total Memory Delta: ",N.memory_delta_mb>0?"+":"",N.memory_delta_mb.toFixed(2)," MB"]}),e.jsxs("div",{children:["Total I/O Read: ",N.io_read_mb.toFixed(2)," MB"]}),e.jsxs("div",{children:["Total I/O Write: ",N.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((c,x)=>{const g=c.elapsed_time_ms>1e3,k=c.cpu.total_time_ms>100,h=c.memory.delta_mb>1;return e.jsxs("div",{className:`p-3 rounded border text-xs ${g||k||h?"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:c.method}),e.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate",children:c.path}),(g||k||h)&&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:g?"font-semibold text-red-700 dark:text-red-300":"",children:["⏱️ Time: ",c.elapsed_time_ms.toFixed(2)," ms"]}),e.jsxs("div",{className:k?"font-semibold text-red-700 dark:text-red-300":"",children:["🔥 CPU: ",c.cpu.total_time_ms.toFixed(2)," ms",e.jsxs("span",{className:"text-gray-500",children:[" (User: ",c.cpu.user_time_ms.toFixed(2),"ms, System: ",c.cpu.system_time_ms.toFixed(2),"ms)"]}),e.jsx("br",{}),e.jsxs("span",{className:"ml-4 text-gray-500",children:["System CPU: ",c.cpu.system_percent.toFixed(1),"%"]})]}),e.jsxs("div",{className:h?"font-semibold text-red-700 dark:text-red-300":"",children:["💾 Memory: ",c.memory.delta_mb>0?"+":"",c.memory.delta_mb.toFixed(2)," MB",e.jsxs("span",{className:"text-gray-500",children:[" (Final RSS: ",c.memory.final_rss_mb.toFixed(2)," MB)"]}),e.jsx("br",{}),e.jsxs("span",{className:"ml-4 text-gray-500",children:["System Memory: ",c.memory.system_used_percent.toFixed(1),"%"]})]}),c.io.read_mb>0&&e.jsxs("div",{children:["📖 I/O Read: ",c.io.read_mb.toFixed(2)," MB (",c.io.read_bytes.toLocaleString()," bytes)"]}),c.io.write_mb>0&&e.jsxs("div",{children:["📝 I/O Write: ",c.io.write_mb.toFixed(2)," MB (",c.io.write_bytes.toLocaleString()," bytes)"]})]})]},x)})]}),n.length>0&&e.jsx("button",{onClick:()=>{l([]),p.current=[],u(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 Ze=()=>{const{isExpanded:s,isHovered:a,isMobileOpen:n}=F(),{loadActiveSite:l,activeSite:o}=J(),{loadSectorsForSite:d}=we(),{refreshUser:m,isAuthenticated:u}=I(),{addError:b}=B("AppLayout"),p=t.useRef(!1),v=t.useRef(null),_=t.useRef(!1),f=t.useRef(!1),[E,L]=t.useState(!1),N=t.useRef(0);return t.useEffect(()=>{if(!p.current&&!_.current){p.current=!0,_.current=!0,T("site-loading",!0);const j=setTimeout(()=>{_.current&&(console.error("AppLayout: Site loading timeout after 35 seconds"),T("site-loading",!1),_.current=!1,b(new Error("Site loading timeout - check network connection"),"AppLayout.loadActiveSite"))},35e3);l().catch(y=>{console.error("AppLayout: Error loading active site:",y),b(y,"AppLayout.loadActiveSite")}).finally(()=>{clearTimeout(j),T("site-loading",!1),_.current=!1})}},[]),t.useEffect(()=>{const j=(o==null?void 0:o.id)??null;if(j&&(o!=null&&o.is_active)&&j!==v.current&&!f.current){v.current=j,f.current=!0,T("sector-loading",!0);const y=setTimeout(()=>{f.current&&(console.error("AppLayout: Sector loading timeout after 35 seconds"),T("sector-loading",!1),f.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),T("sector-loading",!1),f.current=!1})}else if(j&&!(o!=null&&o.is_active)){v.current=null;const{useSectorStore:y}=require("../store/sectorStore");y.getState().clearActiveSector()}},[o==null?void 0:o.id,o==null?void 0:o.is_active]),t.useEffect(()=>{if(!u)return;const j="2.0.2",y="igny8-app-version",w=async(h=!1)=>{const C=Date.now();if(!(!h&&C-N.current<3e4))try{N.current=C,await m(),h&&localStorage.setItem(y,j)}catch(S){console.debug("User data refresh failed (non-critical):",S)}};localStorage.getItem(y)!==j?w(!0):w();const x=()=>{document.visibilityState==="visible"&&w()},g=()=>{w()},k=setInterval(()=>w(),12e4);return document.addEventListener("visibilitychange",x),window.addEventListener("focus",g),()=>{clearInterval(k),document.removeEventListener("visibilitychange",x),window.removeEventListener("focus",g)}},[u,m]),t.useEffect(()=>{const j=localStorage.getItem("debug_resource_tracking_enabled");L(j==="true");const y=w=>{L(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(He,{}),e.jsx(Ve,{})]}),e.jsxs("div",{className:`flex-1 transition-all duration-300 ease-in-out ${s||a?"lg:ml-[290px]":"lg:ml-[90px]"} ${n?"ml-0":""} w-full max-w-full min-[1440px]:max-w-[90%]`,children:[e.jsx(Me,{}),e.jsx("div",{className:"p-4 pb-20 md:p-6 md:pb-24",children:e.jsx(ae,{})}),e.jsx(Be,{enabled:E})]})]})},$e=()=>e.jsx(Se,{children:e.jsx(Ze,{})});function Ue(){const{pathname:s}=H();return t.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[s]),null}function qe({children:s}){const{isAuthenticated:a,loading:n}=I(),l=H(),{addError:o}=B("ProtectedRoute"),[d,m]=t.useState(!1),[u,b]=t.useState("");return t.useEffect(()=>{T("auth-loading",n)},[n]),t.useEffect(()=>{n&&(console.warn("ProtectedRoute: Loading state is true on mount, resetting immediately"),I.setState({loading:!1}))},[]),t.useEffect(()=>{if(n){const p=setTimeout(()=>{b("Authentication check is taking longer than expected. This may indicate a network or server issue."),m(!0),o(new Error("Auth loading stuck for 3 seconds"),"ProtectedRoute")},3e3),v=setTimeout(()=>{console.error("ProtectedRoute: Loading state stuck for 5 seconds, forcing reset"),I.setState({loading:!1}),m(!1)},5e3);return()=>{clearTimeout(p),clearTimeout(v)}}else m(!1)},[n,o]),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:u}),e.jsx("button",{onClick:()=>{I.setState({loading:!1}),m(!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"})]})]})}):a?e.jsx(e.Fragment,{children:s}):e.jsx(ne,{to:"/signin",state:{from:l},replace:!0})}function We(){const{errors:s,clearError:a,clearAllErrors:n}=B("GlobalErrorDisplay"),[l,o]=t.useState(!1);return t.useEffect(()=>{o(s.length>0)},[s.length]),!l||s.length===0?null:e.jsxs("div",{className:"fixed top-4 right-4 z-[9999] max-w-md space-y-2",children:[s.map((d,m)=>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:()=>a(m),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:"×"})]})},m)),s.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 Ke=t.lazy(()=>i(()=>import("./page-dashboard-DxYTR5eF.js").then(s=>s.a8),__vite__mapDeps([0,1,2,3,4,5,6]))),Ge=t.lazy(()=>i(()=>import("./pages-planner-Biqt-k6C.js").then(s=>s.D),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Je=t.lazy(()=>i(()=>import("./pages-planner-Biqt-k6C.js").then(s=>s.K),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Xe=t.lazy(()=>i(()=>import("./pages-planner-Biqt-k6C.js").then(s=>s.C),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Ye=t.lazy(()=>i(()=>import("./pages-planner-Biqt-k6C.js").then(s=>s.I),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),Qe=t.lazy(()=>i(()=>import("./pages-planner-Biqt-k6C.js").then(s=>s.f),__vite__mapDeps([7,1,2,3,8,4,5,9,6,0,10,11,12,13,14,15,16,17]))),et=t.lazy(()=>i(()=>import("./pages-writer-BNZLXTX1.js").then(s=>s.D),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),tt=t.lazy(()=>i(()=>import("./pages-writer-BNZLXTX1.js").then(s=>s.T),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),st=t.lazy(()=>i(()=>import("./pages-writer-BNZLXTX1.js").then(s=>s.C),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),rt=t.lazy(()=>i(()=>import("./pages-writer-BNZLXTX1.js").then(s=>s.a),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),at=t.lazy(()=>i(()=>import("./pages-writer-BNZLXTX1.js").then(s=>s.I),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),nt=t.lazy(()=>i(()=>import("./pages-writer-BNZLXTX1.js").then(s=>s.P),__vite__mapDeps([18,1,2,3,4,5,11,0,6,12,9,8,10,7,13,14,15,16,17,19,20]))),lt=t.lazy(()=>i(()=>import("./pages-thinker-CAze4ZPc.js").then(s=>s.D),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),ot=t.lazy(()=>i(()=>import("./pages-thinker-CAze4ZPc.js").then(s=>s.P),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),it=t.lazy(()=>i(()=>import("./pages-thinker-CAze4ZPc.js").then(s=>s.A),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),dt=t.lazy(()=>i(()=>import("./pages-thinker-CAze4ZPc.js").then(s=>s.a),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),ct=t.lazy(()=>i(()=>import("./pages-thinker-CAze4ZPc.js").then(s=>s.S),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),mt=t.lazy(()=>i(()=>import("./pages-thinker-CAze4ZPc.js").then(s=>s.I),__vite__mapDeps([21,1,2,3,4,5,9,8,6,11,0,12,10,7,13,14,15,16,17]))),ut=t.lazy(()=>i(()=>import("./pages-billing-CR09bFDK.js").then(s=>s.C),__vite__mapDeps([22,1,2,3,4,5,11,0,6,12,9,8,10]))),ht=t.lazy(()=>i(()=>import("./pages-billing-CR09bFDK.js").then(s=>s.T),__vite__mapDeps([22,1,2,3,4,5,11,0,6,12,9,8,10]))),xt=t.lazy(()=>i(()=>import("./pages-billing-CR09bFDK.js").then(s=>s.U),__vite__mapDeps([22,1,2,3,4,5,11,0,6,12,9,8,10]))),gt=t.lazy(()=>i(()=>import("./page-reference-aC0iABvU.js").then(s=>s.S),__vite__mapDeps([11,1,2,3,4,5,0,6,12,9,8,10]))),pt=t.lazy(()=>i(()=>import("./page-reference-aC0iABvU.js").then(s=>s.I),__vite__mapDeps([11,1,2,3,4,5,0,6,12,9,8,10]))),ft=t.lazy(()=>i(()=>import("./page-analytics.tsx-1KCk8AGD.js").then(s=>s.a),__vite__mapDeps([4,1,2,3,5]))),bt=t.lazy(()=>i(()=>import("./page-schedules.tsx-KBMo-Hzm.js"),__vite__mapDeps([23,1,2,3,4,5]))),jt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.G),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),yt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.U),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),wt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.S),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),_t=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.a),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),kt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.A),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),vt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.M),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ct=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.b),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Nt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.P),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),St=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.I),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Et=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.c),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Lt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.d),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),It=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.e),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Rt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.f),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),At=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.H),__vite__mapDeps([25,1,2,3,4,5]))),Tt=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.D),__vite__mapDeps([25,1,2,3,4,5]))),Pt=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.S),__vite__mapDeps([25,1,2,3,4,5]))),Dt=t.lazy(()=>i(()=>import("./page-help-j71zd25J.js").then(s=>s.F),__vite__mapDeps([25,1,2,3,4,5]))),Mt=t.lazy(()=>i(()=>import("./page-components.tsx-DYfg5dka.js").then(s=>s.f),__vite__mapDeps([12,1,2,3,9,4,5,8,6]))),Vt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.g),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ot=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.h),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),zt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.B),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ht=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.i),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ft=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.j),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Bt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.k),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Zt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.C),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),$t=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.l),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Ut=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.D),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),qt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.m),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Wt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.L),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Kt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.n),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Gt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.o),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),G=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.N),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Jt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.p),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Xt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.q),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Yt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.r),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),Qt=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.s),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),es=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.R),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),ts=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.t),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),ss=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.T),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),rs=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.u),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17]))),as=t.lazy(()=>i(()=>import("./pages-settings-GUQ4SeDJ.js").then(s=>s.V),__vite__mapDeps([24,1,2,3,4,5,6,0,11,12,9,8,10,7,13,14,15,16,17])));function ns(){return e.jsxs(e.Fragment,{children:[e.jsx(We,{}),e.jsx(Fe,{}),e.jsxs(le,{children:[e.jsx(Ue,{}),e.jsxs(oe,{children:[e.jsx(r,{path:"/signin",element:e.jsx(fe,{})}),e.jsx(r,{path:"/signup",element:e.jsx(be,{})}),e.jsxs(r,{element:e.jsx(qe,{children:e.jsx($e,{})}),children:[e.jsx(r,{index:!0,path:"/",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ke,{})})}),e.jsx(r,{path:"/planner",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ge,{})})}),e.jsx(r,{path:"/planner/keywords",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Je,{})})}),e.jsx(r,{path:"/planner/clusters",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Xe,{})})}),e.jsx(r,{path:"/planner/ideas",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ye,{})})}),e.jsx(r,{path:"/writer",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(et,{})})}),e.jsx(r,{path:"/writer/tasks",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(tt,{})})}),e.jsx(r,{path:"/writer/content",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(st,{})})}),e.jsx(r,{path:"/writer/drafts",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(rt,{})})}),e.jsx(r,{path:"/writer/images",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(at,{})})}),e.jsx(r,{path:"/writer/published",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(nt,{})})}),e.jsx(r,{path:"/thinker",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(lt,{})})}),e.jsx(r,{path:"/thinker/prompts",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ot,{})})}),e.jsx(r,{path:"/thinker/author-profiles",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(it,{})})}),e.jsx(r,{path:"/thinker/profile",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(dt,{})})}),e.jsx(r,{path:"/thinker/strategies",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ct,{})})}),e.jsx(r,{path:"/thinker/image-testing",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(mt,{})})}),e.jsx(r,{path:"/billing/credits",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ut,{})})}),e.jsx(r,{path:"/billing/transactions",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ht,{})})}),e.jsx(r,{path:"/billing/usage",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(xt,{})})}),e.jsx(r,{path:"/reference/seed-keywords",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(gt,{})})}),e.jsx(r,{path:"/planner/keyword-opportunities",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Qe,{})})}),e.jsx(r,{path:"/reference/industries",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(pt,{})})}),e.jsx(r,{path:"/analytics",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ft,{})})}),e.jsx(r,{path:"/schedules",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(bt,{})})}),e.jsx(r,{path:"/settings",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(jt,{})})}),e.jsx(r,{path:"/settings/users",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(yt,{})})}),e.jsx(r,{path:"/settings/subscriptions",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(wt,{})})}),e.jsx(r,{path:"/settings/system",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(_t,{})})}),e.jsx(r,{path:"/settings/account",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(kt,{})})}),e.jsx(r,{path:"/settings/modules",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(vt,{})})}),e.jsx(r,{path:"/settings/ai",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ct,{})})}),e.jsx(r,{path:"/settings/plans",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Nt,{})})}),e.jsx(r,{path:"/settings/industries",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(St,{})})}),e.jsx(r,{path:"/settings/status",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Et,{})})}),e.jsx(r,{path:"/settings/integration",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Lt,{})})}),e.jsx(r,{path:"/settings/sites",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(It,{})})}),e.jsx(r,{path:"/settings/import-export",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Rt,{})})}),e.jsx(r,{path:"/help",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(At,{})})}),e.jsx(r,{path:"/help/docs",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Tt,{})})}),e.jsx(r,{path:"/help/system-testing",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Pt,{})})}),e.jsx(r,{path:"/help/function-testing",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Dt,{})})}),e.jsx(r,{path:"/ui-elements/alerts",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Vt,{})})}),e.jsx(r,{path:"/ui-elements/avatars",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ot,{})})}),e.jsx(r,{path:"/ui-elements/badges",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(zt,{})})}),e.jsx(r,{path:"/ui-elements/breadcrumb",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ht,{})})}),e.jsx(r,{path:"/ui-elements/buttons",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ft,{})})}),e.jsx(r,{path:"/ui-elements/buttons-group",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Bt,{})})}),e.jsx(r,{path:"/ui-elements/cards",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Zt,{})})}),e.jsx(r,{path:"/ui-elements/carousel",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx($t,{})})}),e.jsx(r,{path:"/ui-elements/dropdowns",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Ut,{})})}),e.jsx(r,{path:"/ui-elements/images",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(qt,{})})}),e.jsx(r,{path:"/ui-elements/links",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Wt,{})})}),e.jsx(r,{path:"/ui-elements/list",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Kt,{})})}),e.jsx(r,{path:"/ui-elements/modals",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Gt,{})})}),e.jsx(r,{path:"/ui-elements/notifications",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(G,{})})}),e.jsx(r,{path:"/ui-elements/pagination",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Jt,{})})}),e.jsx(r,{path:"/ui-elements/popovers",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Xt,{})})}),e.jsx(r,{path:"/ui-elements/pricing-table",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Yt,{})})}),e.jsx(r,{path:"/ui-elements/progressbar",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Qt,{})})}),e.jsx(r,{path:"/ui-elements/ribbons",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(es,{})})}),e.jsx(r,{path:"/ui-elements/spinners",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ts,{})})}),e.jsx(r,{path:"/ui-elements/tabs",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(ss,{})})}),e.jsx(r,{path:"/ui-elements/tooltips",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(rs,{})})}),e.jsx(r,{path:"/ui-elements/videos",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(as,{})})}),e.jsx(r,{path:"/components",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(Mt,{})})}),e.jsx(r,{path:"/notifications",element:e.jsx(t.Suspense,{fallback:null,children:e.jsx(G,{})})})]}),e.jsx(r,{path:"*",element:e.jsx(Ce,{})})]})]})]})}class ls extends t.Component{constructor(a){super(a),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a,errorInfo:null}}componentDidCatch(a,n){console.error("ErrorBoundary caught an error:",a,n),this.setState({error:a,errorInfo:n})}render(){var a;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:((a=this.state.error)==null?void 0:a.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}}ee.createRoot(document.getElementById("root")).render(e.jsx(t.StrictMode,{children:e.jsx(ls,{children:e.jsx(je,{children:e.jsx(_e,{children:e.jsx(ve,{children:e.jsx(Ne,{children:e.jsx(ns,{})})})})})})})); diff --git a/frontend/dist/assets/js/pages-planner-Biqt-k6C.js b/frontend/dist/assets/js/pages-planner-Biqt-k6C.js new file mode 100644 index 00000000..3506ded6 --- /dev/null +++ b/frontend/dist/assets/js/pages-planner-Biqt-k6C.js @@ -0,0 +1,3 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/page-dashboard-DxYTR5eF.js","assets/js/vendor-react-core-DjsjKnCi.js","assets/js/vendor-other-CdRIx1s3.js","assets/css/vendor-other-BsM4JrO0.css","assets/js/page-analytics.tsx-1KCk8AGD.js","assets/js/vendor-helmet-MZDArkdS.js","assets/js/vendor-state-CYwAWrAU.js"])))=>i.map(i=>d[i]); +import{r,j as e,R as Ce}from"./vendor-react-core-DjsjKnCi.js";import{u as Ut,L as Fe,a as Ht}from"./vendor-react-router-BJY_70Cr.js";import{P as qt,C as We}from"./page-analytics.tsx-1KCk8AGD.js";import{f as Dt,g as zt,b as bt,h as Wt,S as Gt,i as Jt,c as Qt,j as wt,k as Bt,B as je,L as st,l as Yt,m as Xt,n as Zt,I as es,C as Lt,o as Ge,p as ts,q as ss,a as kt}from"./page-authpages-CY7hjDHU.js";import{g as Ot,_ as Pe,h as rs,i as as,A as vt,j as ns,k as os,l as ls,m as is,n as cs,a as xt,o as rt,u as ds,p as us,q as gs,r as Pt,s as ms,t as fs,v as ps,w as hs,x as xs,y as ys,z as Rt,B as bs,C as ws,D as ks,E as vs,F as Ss}from"./page-dashboard-DxYTR5eF.js";import{e as St,h as jt,j as js,B as ft,g as Ns}from"./page-clusters.config.tsx-9GAd-_h-.js";import{u as Je}from"./page-reference-aC0iABvU.js";import{M as Qe,D as yt,a as at,A as Cs}from"./page-components.tsx-DYfg5dka.js";import{c as _s}from"./page-keywords.config.tsx-CxJn1kF1.js";import{c as Is}from"./page-ideas.config.tsx-Cr6kWRFa.js";import{g as Es}from"./page-delete-modal.config.ts-B7nUJ-QI.js";import{g as Ms}from"./page-bulk-action-modal.config.ts-D-0XtKwF.js";import{g as $s}from"./page-table-actions.config.tsx-BSR5Zo7l.js";import{c as Nt,p as Ct}from"./vendor-state-CYwAWrAU.js";const Kt=r.createContext(void 0),As=()=>{const t=r.useContext(Kt);if(!t)throw new Error("useHeaderMetrics must be used within a HeaderMetricsProvider");return t},yr=({children:t})=>{const[s,a]=r.useState([]),o=()=>{a([])};return e.jsx(Kt.Provider,{value:{metrics:s,setMetrics:a,clearMetrics:o},children:t})},_t=Nt()(Ct((t,s)=>({activeSite:null,loading:!1,error:null,setActiveSite:a=>{if(t({activeSite:a,error:null}),typeof window<"u")try{const o=s();localStorage.setItem("site-storage",JSON.stringify({state:{activeSite:a},version:0}))}catch(o){console.warn("Failed to persist site to localStorage:",o)}window.dispatchEvent(new CustomEvent("siteChanged",{detail:{siteId:a==null?void 0:a.id}})),a&&typeof window<"u"&&Pe(async()=>{const{useSectorStore:o}=await Promise.resolve().then(()=>Ts);return{useSectorStore:o}},void 0).then(({useSectorStore:o})=>{o.getState().loadSectorsForSite(a.id)}).catch(()=>{})},loadActiveSite:async()=>{t({loading:!0,error:null});try{const o=(await Ot()).results||[],c=o.filter(m=>m.is_active),g=s().activeSite;let u=null;if(g){const m=o.find(p=>p.id===g.id);m&&m.is_active?u=m:(m&&m.is_active,u=c.length>0?c[0]:null)}else c.length>0&&(u=c[0]);if(t({activeSite:u,loading:!1}),u&&typeof window<"u")try{localStorage.setItem("site-storage",JSON.stringify({state:{activeSite:u},version:0}))}catch(m){console.warn("Failed to persist site to localStorage:",m)}}catch(a){t({error:a.message||"Failed to load active site",loading:!1})}},refreshActiveSite:async()=>{const a=s().activeSite;if(!a){await s().loadActiveSite();return}t({loading:!0,error:null});try{const c=((await Ot()).results||[]).find(g=>g.id===a.id);c&&c.is_active?t({activeSite:c,loading:!1}):await s().loadActiveSite()}catch(o){t({error:o.message||"Failed to refresh active site",loading:!1})}}}),{name:"site-storage",partialize:t=>({activeSite:t.activeSite})})),Be=Nt()(Ct((t,s)=>({activeSector:null,sectors:[],loading:!1,error:null,setActiveSector:a=>{if(t({activeSector:a,error:null}),typeof window<"u")try{const o=s();localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:a},version:0}))}catch(o){console.warn("Failed to persist sector to localStorage:",o)}window.dispatchEvent(new CustomEvent("sectorChanged",{detail:{sectorId:a==null?void 0:a.id,siteId:a==null?void 0:a.site_id}}))},loadSectorsForSite:async a=>{t({loading:!0,error:null});try{if(!a)return t({sectors:[],loading:!1}),[];const c=(await rs(a)).map(u=>({id:u.id,name:u.name,slug:u.slug,site_id:a,is_active:u.is_active!==!1,industry_sector:u.industry_sector||null}));t({sectors:c,loading:!1});const g=s().activeSector;if(g&&g.site_id!==a){if(t({activeSector:null}),typeof window<"u")try{localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:null},version:0}))}catch(u){console.warn("Failed to persist sector to localStorage:",u)}window.dispatchEvent(new CustomEvent("sectorChanged",{detail:{sectorId:null,siteId:a}}))}else if(g&&g.site_id===a&&!c.find(m=>m.id===g.id)){if(t({activeSector:null}),typeof window<"u")try{localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:null},version:0}))}catch(m){console.warn("Failed to persist sector to localStorage:",m)}window.dispatchEvent(new CustomEvent("sectorChanged",{detail:{sectorId:null,siteId:a}}))}return c}catch(o){return o.status===403||o.status===404?(console.warn(`Cannot load sectors for site ${a}: site may be inactive or inaccessible`),t({sectors:[],activeSector:null,loading:!1,error:null}),[]):(t({error:o.message||"Failed to load sectors",loading:!1}),[])}},clearActiveSector:()=>{if(t({activeSector:null,sectors:[],error:null}),typeof window<"u")try{localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:null},version:0}))}catch(a){console.warn("Failed to persist sector to localStorage:",a)}}}),{name:"sector-storage",partialize:t=>({activeSector:t.activeSector})})),Ts=Object.freeze(Object.defineProperty({__proto__:null,useSectorStore:Be},Symbol.toStringTag,{value:"Module"})),ze=({value:t,color:s="primary",size:a="md",showLabel:o=!1,label:c,className:g=""})=>{const u={sm:"h-1",md:"h-2",lg:"h-3"},m={primary:"bg-brand-500",success:"bg-success-500",error:"bg-error-500",warning:"bg-warning-500",info:"bg-blue-light-500"},p=Math.min(100,Math.max(0,t));return e.jsxs("div",{className:g,children:[o&&e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:c||`${p}%`}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[p,"%"]})]}),e.jsx("div",{className:`w-full rounded-full bg-gray-200 dark:bg-gray-700 ${u[a]}`,children:e.jsx("div",{className:`rounded-full transition-all duration-300 ${u[a]} ${m[s]}`,style:{width:`${p}%`}})})]})};function Ls(){const t=Ut(),s={keywords:245,clusters:18,ideas:52,mappedKeywords:180,clustersWithIdeas:12,queuedIdeas:35},a=Math.round(s.mappedKeywords/s.keywords*100),o=Math.round(s.clustersWithIdeas/s.clusters*100),c=Math.round(s.queuedIdeas/s.ideas*100),g=[{number:1,title:"Add Keywords",status:"completed",count:s.keywords,path:"/planner/keywords"},{number:2,title:"Select Sector",status:"completed",count:null,path:"/planner"},{number:3,title:"Auto Cluster",status:"pending",count:s.clusters,path:"/planner/clusters"},{number:4,title:"Generate Ideas",status:"pending",count:s.ideas,path:"/planner/ideas"}],u=[{name:"SEO Optimization",volume:45800,keywords:24},{name:"Content Marketing",volume:32100,keywords:18},{name:"Link Building",volume:28700,keywords:15},{name:"Keyword Research",volume:24100,keywords:12},{name:"Analytics",volume:18900,keywords:9}],m=[{status:"New",count:20,color:"blue"},{status:"Scheduled",count:15,color:"amber"},{status:"Published",count:17,color:"green"}],p=[{text:"65 keywords unmapped",action:"Map Keywords",path:"/planner/keywords"},{text:"6 clusters without ideas",action:"Generate Ideas",path:"/planner/ideas"},{text:"17 ideas not queued to writer",action:"Queue to Writer",path:"/writer/tasks"}];return e.jsxs(e.Fragment,{children:[e.jsx(qt,{title:"Planner Dashboard - IGNY8",description:"Content planning overview"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4 md:gap-6",children:[e.jsxs(Fe,{to:"/planner/keywords",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-brand-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Keywords Ready"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.keywords.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Research, analyze, and manage keywords strategy"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-blue-50 rounded-xl dark:bg-blue-500/10 group-hover:bg-blue-100 dark:group-hover:bg-blue-500/20 transition-colors",children:e.jsx(Dt,{className:"text-brand-500 size-6"})})]})]}),e.jsxs(Fe,{to:"/planner/clusters",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-success-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Clusters Built"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.clusters.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Organize keywords into strategic topical clusters"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-green-50 rounded-xl dark:bg-green-500/10 group-hover:bg-green-100 dark:group-hover:bg-green-500/20 transition-colors",children:e.jsx(zt,{className:"text-success-500 size-6"})})]})]}),e.jsxs(Fe,{to:"/planner/ideas",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-warning-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Ideas Generated"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.ideas.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Generate creative content ideas based on semantic strategy"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-amber-50 rounded-xl dark:bg-amber-500/10 group-hover:bg-amber-100 dark:group-hover:bg-amber-500/20 transition-colors",children:e.jsx(bt,{className:"text-warning-500 size-6"})})]})]}),e.jsxs(Fe,{to:"/planner/keywords",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-purple-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Mapped Keywords"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.mappedKeywords.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Keywords successfully mapped to content pages"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-purple-50 rounded-xl dark:bg-purple-500/10 group-hover:bg-purple-100 dark:group-hover:bg-purple-500/20 transition-colors",children:e.jsx(Wt,{className:"text-purple-500 size-6"})})]})]})]}),e.jsx(We,{title:"Planner Workflow Steps",desc:"Track your planning progress",children:e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:g.map(d=>e.jsxs(Fe,{to:d.path,className:"rounded-xl border border-gray-200 bg-gray-50 p-4 dark:border-gray-800 dark:bg-gray-900/50 hover:border-brand-300 hover:bg-brand-50 dark:hover:bg-brand-500/10 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 bg-white border-2 border-gray-300 rounded-full text-sm font-semibold text-gray-600 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400",children:d.number}),e.jsx("h4",{className:"font-medium text-gray-800 dark:text-white/90",children:d.title})]}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("div",{className:"flex items-center gap-1.5",children:d.status==="completed"?e.jsxs(e.Fragment,{children:[e.jsx(Gt,{className:"size-4 text-success-500"}),e.jsx("span",{className:"text-gray-600 dark:text-gray-300 font-medium",children:"Completed"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Jt,{className:"size-4 text-amber-500"}),e.jsx("span",{className:"text-gray-600 dark:text-gray-300 font-medium",children:"Pending"})]})})}),d.count!==null&&e.jsxs("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:[d.count," ",d.title.includes("Keywords")?"keywords":d.title.includes("Clusters")?"clusters":"ideas"," ",d.status==="completed"?"added":""]}),d.status==="pending"&&e.jsx("button",{type:"button",onClick:f=>{f.preventDefault(),f.stopPropagation(),t(d.path)},className:"mt-3 inline-block text-xs font-medium text-brand-500 hover:text-brand-600 cursor-pointer",children:"Start Now →"})]},d.number))})}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[e.jsx(We,{title:"Progress & Readiness Summary",desc:"Planning workflow progress tracking",className:"lg:col-span-1",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Keyword Mapping"}),e.jsxs("span",{className:"text-sm font-semibold text-gray-800 dark:text-white/90",children:[a,"%"]})]}),e.jsx(ze,{value:a,color:"primary",size:"md"}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[s.mappedKeywords," of ",s.keywords," keywords mapped"]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Clusters With Ideas"}),e.jsxs("span",{className:"text-sm font-semibold text-gray-800 dark:text-white/90",children:[o,"%"]})]}),e.jsx(ze,{value:o,color:"success",size:"md"}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[s.clustersWithIdeas," of ",s.clusters," clusters have ideas"]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Ideas Queued to Writer"}),e.jsxs("span",{className:"text-sm font-semibold text-gray-800 dark:text-white/90",children:[c,"%"]})]}),e.jsx(ze,{value:c,color:"warning",size:"md"}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[s.queuedIdeas," of ",s.ideas," ideas queued"]})]})]})}),e.jsx(We,{title:"Top 5 Clusters by Volume",desc:"Highest volume keyword clusters",className:"lg:col-span-1",children:e.jsx("div",{className:"space-y-4",children:u.map((d,f)=>{const n=u[0].volume,x=Math.round(d.volume/n*100);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-white/90",children:d.name}),e.jsx("span",{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:d.volume.toLocaleString()})]}),e.jsx(ze,{value:x,color:f%2===0?"primary":"success",size:"sm"})]},f)})})}),e.jsx(We,{title:"Ideas by Status",desc:"Content ideas workflow status",className:"lg:col-span-1",children:e.jsx("div",{className:"space-y-4",children:m.map((d,f)=>{const n=m.reduce((L,z)=>L+z.count,0),x=Math.round(d.count/n*100);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-white/90",children:d.status}),e.jsx("span",{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:d.count})]}),e.jsx(ze,{value:x,color:d.color==="blue"?"primary":d.color==="amber"?"warning":"success",size:"sm"})]},f)})})})]}),e.jsx(We,{title:"Next Actions",desc:"Actionable items requiring attention",children:e.jsx("div",{className:"space-y-3",children:p.map((d,f)=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-gray-50 dark:bg-gray-900/50 border border-gray-200 dark:border-gray-800",children:[e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:d.text}),e.jsxs(Fe,{to:d.path,className:"inline-flex items-center gap-1 text-sm font-medium text-brand-500 hover:text-brand-600",children:[d.action,e.jsx(Qt,{className:"size-4"})]})]},f))})})]})]})}const br=Object.freeze(Object.defineProperty({__proto__:null,default:Ls},Symbol.toStringTag,{value:"Module"})),Os=({children:t,className:s})=>e.jsx("table",{className:`min-w-full w-full ${s}`,children:t}),Ps=({children:t,className:s})=>e.jsx("thead",{className:s,children:t}),Rs=({children:t,className:s})=>e.jsx("tbody",{className:s,children:t}),pt=({children:t,className:s})=>e.jsx("tr",{className:s,children:t}),De=({children:t,isHeader:s=!1,className:a})=>{const o=s?"th":"td";return e.jsx(o,{className:` ${a}`,children:t})},nt=({options:t,placeholder:s="Select an option",onChange:a,className:o="",defaultValue:c="",value:g,disabled:u=!1})=>{const m=g!==void 0,[p,d]=r.useState(!1),[f,n]=r.useState(c),x=m?g||"":f,L=r.useRef(null),z=r.useRef(null);r.useEffect(()=>{m||n(c)},[c,m]);const F=String(x||""),le=t.find($=>String($.value||"")===F),q=le?le.label:s,ie=!le;r.useEffect(()=>{const $=A=>{L.current&&!L.current.contains(A.target)&&z.current&&!z.current.contains(A.target)&&d(!1)};if(p)return document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[p]);const C=$=>{const A=$==null?"":String($);m||n(A),a(A),d(!1)},M=$=>{$.key==="Escape"?d(!1):($.key==="Enter"||$.key===" ")&&($.preventDefault(),d(!p))};return e.jsxs("div",{className:`relative ${o}`,children:[e.jsxs("button",{ref:z,type:"button",onClick:()=>!u&&d(!p),disabled:u,onKeyDown:M,className:`igny8-select-styled h-9 w-full appearance-none rounded-lg border border-gray-300 bg-transparent px-3 py-2 pr-10 text-sm shadow-theme-xs focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:focus:border-brand-800 ${ie?"text-gray-400 dark:text-gray-400":"text-gray-800 dark:text-white/90"} ${p?"border-brand-300 ring-3 ring-brand-500/10 dark:border-brand-800":""} ${u?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("span",{className:"block text-left truncate",children:q}),e.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",children:e.jsx(wt,{className:`h-4 w-4 text-gray-400 transition-transform ${p?"transform rotate-180":""}`})})]}),p&&e.jsx("div",{ref:L,className:"absolute z-50 left-0 right-0 mt-1 rounded-lg border border-gray-200 bg-white shadow-theme-lg dark:border-gray-800 dark:bg-gray-dark overflow-hidden max-h-60 overflow-y-auto",children:e.jsx("div",{className:"py-1",children:t.map($=>{const A=String($.value||""),P=String(x||"")===A;return e.jsxs("button",{type:"button",onClick:h=>{h.preventDefault(),h.stopPropagation(),C(A)},className:`w-full text-left px-3 py-2 text-sm transition-colors flex items-center gap-2 ${P?"bg-brand-500 text-white":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800"}`,children:[$.icon&&e.jsx("span",{className:"flex-shrink-0",children:$.icon}),e.jsx("span",{children:$.label})]},`option-${$.value||"empty"}-${$.label}`)})})})]})};function Fs({isOpen:t,onClose:s,onConfirm:a,title:o,message:c,confirmText:g="Export",isLoading:u=!1}){return e.jsx(Qe,{isOpen:t,onClose:s,className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-50 rounded-xl dark:bg-blue-500/10",children:e.jsx(Bt,{className:"w-5 h-5 text-blue-500"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-white",children:o})]}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:c}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(je,{variant:"outline",onClick:s,disabled:u,children:"Cancel"}),e.jsx(je,{variant:"primary",onClick:a,disabled:u,children:u?"Exporting...":g})]})]})})}function Ds({isOpen:t,onClose:s,onConfirm:a,title:o,message:c,confirmText:g="Update Status",statusOptions:u,isLoading:m=!1}){const[p,d]=r.useState(""),f=async()=>{p&&(await a(p),d(""))},n=()=>{d(""),s()};return e.jsx(Qe,{isOpen:t,onClose:n,className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-50 rounded-xl dark:bg-blue-500/10",children:e.jsx(Bt,{className:"w-5 h-5 text-blue-500"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-white",children:o})]}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:c}),e.jsxs("div",{className:"mb-6",children:[e.jsx(st,{className:"mb-2",children:"New Status"}),e.jsx(nt,{options:u,placeholder:"Select status",value:p,onChange:x=>d(x||""),className:"w-full"})]}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(je,{variant:"outline",onClick:n,disabled:m,children:"Cancel"}),e.jsx(je,{variant:"primary",onClick:f,disabled:m||!p,children:m?"Updating...":g})]})]})})}const zs=({currentPage:t,totalPages:s,pageSize:a,onPageChange:o,onPageSizeChange:c,className:g=""})=>{const m=(()=>{const f=[];if(s<=7)for(let n=1;n<=s;n++)f.push(n);else if(t<=3){for(let n=1;n<=5;n++)f.push(n);f.push("..."),f.push(s)}else if(t>=s-2){f.push(1),f.push("...");for(let n=s-4;n<=s;n++)f.push(n)}else{f.push(1),f.push("...");for(let n=t-1;n<=t+1;n++)f.push(n);f.push("..."),f.push(s)}return f})(),p=t===1,d=t===s;return e.jsxs("div",{className:`flex items-center gap-3 ${g}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap",children:"Show:"}),e.jsxs("select",{id:"page-size",value:a,onChange:f=>c(Number(f.target.value)),className:"h-8 px-2 text-sm rounded-lg border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-brand-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700",children:[e.jsx("option",{value:10,children:"10"}),e.jsx("option",{value:20,children:"20"}),e.jsx("option",{value:50,children:"50"})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap",children:"per page"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>!p&&o(t-1),disabled:p,type:"button",className:"flex items-center justify-center w-7 h-7 rounded-lg border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200 transition-colors","aria-label":"Previous page",children:e.jsx(Yt,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex items-center gap-0.5",children:m.map((f,n)=>{if(f==="...")return e.jsx("span",{className:"flex items-center justify-center w-7 h-7 text-xs font-medium text-gray-700 dark:text-gray-400",children:"..."},`ellipsis-${n}`);const x=f,L=x===t;return e.jsx("button",{className:`flex items-center justify-center w-7 h-7 text-xs font-medium rounded-lg transition-colors ${L?"text-white bg-brand-500 hover:bg-brand-600 shadow-sm":"text-gray-700 hover:bg-brand-500 hover:text-white dark:text-gray-400 dark:hover:text-white dark:hover:bg-brand-500"}`,onClick:()=>o(x),type:"button","aria-label":`Go to page ${x}`,"aria-current":L?"page":void 0,children:x},x)})}),e.jsx("button",{onClick:()=>!d&&o(t+1),disabled:d,type:"button",className:"flex items-center justify-center w-7 h-7 rounded-lg border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200 transition-colors","aria-label":"Next page",children:e.jsx(Xt,{className:"w-4 h-4"})})]})]})};function Bs(){const{activeSite:t}=_t(),{activeSector:s,sectors:a,setActiveSector:o,loading:c}=Be(),[g,u]=r.useState(!1),m=r.useRef(null);if(!t)return null;if(!c&&a.length===0)return e.jsx("div",{className:"flex items-center gap-2 px-3 py-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsx("span",{children:"No sectors available"})});const p=d=>{if(d===null)o(null),u(!1);else{const f=a.find(n=>n.id===d);f&&(o(f),u(!1))}};return e.jsxs("div",{className:"relative inline-block",children:[e.jsxs("button",{ref:m,onClick:()=>u(!g),className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:hover:bg-gray-700 dropdown-toggle","aria-label":"Select sector",disabled:c||a.length===0,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),e.jsx("span",{className:"max-w-[150px] truncate",children:c?"Loading...":(s==null?void 0:s.name)||"All Sectors"})]}),e.jsx("svg",{className:`w-4 h-4 transition-transform ${g?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e.jsxs(yt,{isOpen:g,onClose:()=>u(!1),anchorRef:m,placement:"bottom-right",className:"w-64 p-2 overflow-y-auto max-h-[300px]",children:[e.jsxs(at,{onItemClick:()=>p(null),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${s?"text-gray-700 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300":"bg-blue-50 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300"}`,children:[e.jsx("span",{className:"flex-1",children:"All Sectors"}),!s&&e.jsx("svg",{className:"w-4 h-4 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]}),a.map(d=>e.jsxs(at,{onItemClick:()=>p(d.id),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${(s==null?void 0:s.id)===d.id?"bg-blue-50 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300":"text-gray-700 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("span",{className:"flex-1",children:d.name}),(s==null?void 0:s.id)===d.id&&e.jsx("svg",{className:"w-4 h-4 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},d.id))]})]})}const Ye=Nt()(Ct(t=>({pageSize:10,setPageSize:s=>t({pageSize:s})}),{name:"igny8-page-size"}));function Ks(t){if(!t)return"";const s=document.createElement("div");return s.innerHTML=t,s.querySelectorAll("script").forEach(c=>c.remove()),s.querySelectorAll("*").forEach(c=>{const g=c.attributes;for(let u=g.length-1;u>=0;u--){const m=g[u];m.name.startsWith("on")&&c.removeAttribute(m.name),(m.name==="href"||m.name==="src")&&m.value.startsWith("javascript:")&&c.removeAttribute(m.name)}}),s.innerHTML}function Vs(t){return t?/<[a-z][\s\S]*>/i.test(t):!1}function ht(t){if(!t)return"";let s='
';return t.introduction&&(s+='
',typeof t.introduction=="string"?s+=`
${he(t.introduction)}
`:typeof t.introduction=="object"&&(t.introduction.hook&&(s+=`
Hook: ${he(t.introduction.hook)}
`),t.introduction.paragraphs&&Array.isArray(t.introduction.paragraphs)&&t.introduction.paragraphs.forEach((a,o)=>{a.details&&(s+=`
Intro Paragraph ${o+1}: ${he(a.details)}
`)})),s+="
"),t.sections&&Array.isArray(t.sections)&&t.sections.forEach(a=>{if(a){if(s+='
',a.title){const o=a.title.replace(/^H2:\s*/i,"").trim();o.toLowerCase()==="conclusion"?s+=`

${he(o)}

`:s+=`

${he(o)}

`}a.content&&(Array.isArray(a.content)?a.content.forEach(o=>{if(o.title){const c=o.title.replace(/^H3:\s*/i,"").trim();s+=`

${he(c)}

`}o.content&&(s+=`
${he(String(o.content))}
`)}):typeof a.content=="string"&&(s+=`
${he(a.content)}
`)),s+="
"}}),t.H2&&(Array.isArray(t.H2)?t.H2.forEach(a=>{if(a.heading||typeof a=="string"){s+='
';const o=a.heading||a;s+=`

${he(o)}

`,a.content_type&&(s+=`
${he(a.content_type.replace("_"," ").toUpperCase())}
`),a.subsections&&Array.isArray(a.subsections)&&a.subsections.forEach(c=>{const g=c.subheading||c.heading||c;s+=`

${he(g)}

`,c.details&&(s+=`
${he(c.details)}
`)}),a.details&&(s+=`
${he(a.details)}
`),s+="
"}}):typeof t.H2=="string"?(s+='
',s+=`

${he(t.H2)}

`,s+="
"):typeof t.H2=="object"&&Object.entries(t.H2).forEach(([a,o])=>{s+='
',s+=`

${he(o)}

`,s+="
"})),t.H3&&!t.H2&&(s+='
',typeof t.H3=="string"?s+=`

${he(t.H3)}

`:typeof t.H3=="object"&&Object.entries(t.H3).forEach(([a,o])=>{s+=`

${he(o)}

`}),s+="
"),s+="
",s}function he(t){const s=document.createElement("div");return s.textContent=t,s.innerHTML}const Us=({content:t,className:s="",maxHeight:a})=>{const o=r.useMemo(()=>{if(!t)return'
No content available
';if(typeof t=="object"&&t!==null){if(t.H2||t.H3||t.introduction||t.sections)return ht(t);try{return Object.keys(t).length>0?ht(t):he(JSON.stringify(t,null,2))}catch{return he(JSON.stringify(t,null,2))}}if(typeof t=="string"){try{const m=JSON.parse(t);if(typeof m=="object"&&(m.H2||m.H3||m.introduction||m.sections))return ht(m)}catch{}if(Vs(t)){const m=Ks(t);return m.trim().startsWith("${m}`:`
${m}
`}const c=t.split(` +`);let g='
',u=!1;for(const m of c){const p=m.trim();if(!p){u&&(g+="",u=!1),g+="
";continue}if(p.match(/^[-*]\s+/)){u||(g+='
    ',u=!0);const d=p.replace(/^[-*]\s+/,"");p.startsWith(" ")||p.startsWith(" ")?g+=`
  • ${he(d)}
  • `:g+=`
  • ${he(d)}
  • `}else if(p.match(/^[-*]\s*H2[:]/i)){u&&(g+="
",u=!1);const d=p.replace(/^[-*]\s*H2[:]\s*/i,"");g+=`

${he(d)}

`}else if(p.match(/^[-*]\s*H3[:]/i)){u&&(g+="",u=!1);const d=p.replace(/^[-*]\s*H3[:]\s*/i,"");g+=`

${he(d)}

`}else u&&(g+="",u=!1),g+=`

${he(p)}

`}return u&&(g+=""),g+="
",g}return he(String(t))},[t]);return e.jsx("div",{className:`html-content-renderer ${s}`,style:a?{maxHeight:a,overflow:"auto"}:void 0,dangerouslySetInnerHTML:{__html:o}})},Hs=({row:t,contentKey:s,contentLabel:a="Content",colSpan:o,isExpanded:c,defaultExpanded:g=!1,onToggle:u,className:m=""})=>{const[p,d]=r.useState(g),f=c!==void 0?c:p,[n,x]=r.useState("auto"),L=r.useRef(null);let z=t[s];(!z||typeof z=="string"&&z.trim().length===0)&&(z=t.description||t.content_outline||null);const F=z&&(typeof z=="string"?z.trim().length>0:typeof z=="object"&&z!==null&&Object.keys(z).length>0);return r.useEffect(()=>{if(f&&L.current){const le=L.current.scrollHeight;x(le)}else x(0)},[f,z]),!F||!f?null:e.jsx("tr",{className:`toggle-content-row expanded ${m}`,"aria-hidden":!1,children:e.jsx("td",{colSpan:o,className:"px-5 py-0 bg-gray-50 dark:bg-gray-800/50 border-b border-gray-200 dark:border-white/[0.05]",children:e.jsx("div",{ref:L,className:"overflow-hidden",children:e.jsxs("div",{className:"py-4 px-2",children:[e.jsx("div",{className:"mb-2 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 tracking-wide",children:a}),e.jsx("div",{className:"html-content-wrapper",children:e.jsx(Us,{content:z,className:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed"})})]})})})})},qs=({isExpanded:t,onClick:s,hasContent:a,className:o=""})=>a?e.jsx("button",{type:"button",onClick:s,className:`inline-flex items-center justify-center w-8 h-8 rounded-lg transition-all duration-200 ${t?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"} ${o}`,"aria-label":t?"Collapse content":"Expand content","aria-expanded":t,children:e.jsx(wt,{className:`w-4 h-4 transition-transform duration-200 ${t?"rotate-180":""}`})}):e.jsx("span",{className:`inline-flex items-center justify-center w-8 h-8 text-gray-300 dark:text-gray-600 ${o}`,children:e.jsx(Zt,{className:"w-4 h-4"})});function ot({title:t,titleIcon:s,subtitle:a,columns:o,data:c,loading:g=!1,showContent:u=!0,filters:m=[],filterValues:p={},onFilterChange:d,onFilterReset:f,renderFilters:n,onEdit:x,onCreate:L,createLabel:z="+ Add",onCreateIcon:F,onExportCSV:le,onExportIcon:q,onImport:ie,onImportIcon:C,headerMetrics:M=[],selectionLabel:$="items",pagination:A,selection:N,sorting:P,onDelete:h,onBulkDelete:T,onBulkExport:H,onBulkUpdateStatus:V,onBulkAction:J,onRowAction:W,onExport:R,getItemDisplayName:U=K=>K.name||K.keyword||K.title||String(K.id),className:ee=""}){const K=Ht(),[S,O]=r.useState(!1),[ne,xe]=r.useState(new Map),de=Ce.useRef(new Map),j=Ce.useRef(null),v=Es(K.pathname),w=Ms(K.pathname),G=$s(K.pathname),X=(G==null?void 0:G.rowActions)||[],Q=(G==null?void 0:G.bulkActions)||[],[se,re]=r.useState((N==null?void 0:N.selectedIds)||[]),[fe,te]=r.useState(new Set),[ue,Z]=r.useState({isOpen:!1,items:[],isBulk:!1,isLoading:!1}),[y,I]=r.useState({isOpen:!1,itemCount:0,isLoading:!1}),[B,ce]=r.useState({isOpen:!1,itemCount:0,isLoading:!1}),{setMetrics:ve}=As(),ye=Je(),{pageSize:Le,setPageSize:k}=Ye(),Y=N!=null&&N.selectedIds?JSON.stringify(N.selectedIds):"";r.useEffect(()=>{N!=null&&N.selectedIds&&re(N.selectedIds)},[Y]);const oe=i=>{!h||!v||Z({isOpen:!0,items:[i],isBulk:!1,isLoading:!1})},ae=i=>{if(!T||!v)return;const E=c.filter(l=>i.includes(String(l.id)));Z({isOpen:!0,items:E,isBulk:!0,isLoading:!1})},we=async()=>{if(!(ue.items.length===0||!v)){Z(i=>({...i,isLoading:!0}));try{if(ue.isBulk){if(T){const i=ue.items.map(b=>b.id),E=await T(i),l=(E==null?void 0:E.deleted_count)||ue.items.length;ye.success(`${l} ${v.itemNamePlural} deleted successfully`)}}else h&&(await h(ue.items[0].id),ye.success(`${v.itemNameSingular.charAt(0).toUpperCase()+v.itemNameSingular.slice(1)} deleted successfully`));Z({isOpen:!1,items:[],isBulk:!1,isLoading:!1}),N&&N.onSelectionChange([])}catch(i){ye.error(`Failed to delete: ${i.message}`),Z(E=>({...E,isLoading:!1}))}}},Ee=async(i,E)=>{var l;xe(b=>{const _=new Map(b);return _.set(E.id||E,!1),_}),i==="edit"&&x?x(E):i==="delete"&&h&&v?oe(E):i==="export"&&R?await R(E):W?W(i,E).catch(b=>{ye.error(`Action failed: ${b.message}`)}):J?J(i,[((l=E.id)==null?void 0:l.toString())||String(E)]):ye.info(`Action "${i}" not yet implemented`)},be=(i,E)=>{if(!N)return;const l=N.selectedIds.length>0?N.selectedIds:E;if(i==="delete"&&T&&v)ae(l);else if(i==="export"&&H&&w){const b=l.length;I({isOpen:!0,itemCount:b,isLoading:!1})}else i==="update_status"&&V&&w?ce({isOpen:!0,itemCount:l.length,isLoading:!1}):J?J(i,l).catch(b=>{ye.error(`Bulk action failed: ${b.message}`)}):ye.info(`Bulk action "${i}" not yet implemented`);O(!1)},lt=async()=>{if(!H||!N)return;const i=N.selectedIds.length>0?N.selectedIds:se;I(E=>({...E,isLoading:!0}));try{await H(i),ye.success("Export successful"),I({isOpen:!1,itemCount:0,isLoading:!1}),N.onSelectionChange([])}catch(E){ye.error(`Export failed: ${E.message}`),I(l=>({...l,isLoading:!1}))}},it=async i=>{if(!(!V||!N)){ce(E=>({...E,isLoading:!0}));try{await V(N.selectedIds,i),ye.success("Status updated successfully"),ce({isOpen:!1,itemCount:0,isLoading:!1}),N.onSelectionChange([])}catch(E){ye.error(`Failed to update status: ${E.message}`),ce(l=>({...l,isLoading:!1}))}}},Ke=r.useRef(""),Oe=r.useRef(!1),Re=r.useMemo(()=>{if(!M||M.length===0)return"";try{return M.map(i=>`${i.label}:${String(i.value)}`).join("|")}catch{return""}},[M]);r.useEffect(()=>{if(Re!==Ke.current)return Re?(ve(M),Oe.current=!0,Ke.current=Re):Oe.current&&(ve([]),Oe.current=!1,Ke.current=""),()=>{Oe.current&&(ve([]),Oe.current=!1)}},[Re]);const Ve=(n||m.length>0)&&Object.values(p).some(i=>i===""||i===null||i===void 0?!1:typeof i=="object"&&("min"in i||"max"in i)?i.min!==""&&i.min!==null&&i.min!==void 0||i.max!==""&&i.max!==null&&i.max!==void 0:!0),ct=i=>{if(!i.sortable||!P)return;const E=i.sortField||i.key,l=P.sortBy===E?P.sortDirection:null;let b="asc";if(l==="asc")b="desc";else if(l==="desc"){P.onSort("created_at","desc");return}P.onSort(E,b)},Xe=i=>{if(!i.sortable||!P)return null;const E=i.sortField||i.key;return P.sortBy!==E?e.jsx("span",{className:"ml-1 cursor-pointer text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:"⇅"}):P.sortDirection==="asc"?e.jsx("span",{className:"ml-1 cursor-pointer text-brand-500",children:"↑"}):e.jsx("span",{className:"ml-1 cursor-pointer text-brand-500",children:"↓"})},_e=i=>{if(i){const E=c.filter(l=>!l.isAdded).map(l=>{var b;return((b=l.id)==null?void 0:b.toString())||""}).filter(l=>l!=="");re(E),N==null||N.onSelectionChange(E)}else re([]),N==null||N.onSelectionChange([])},dt=(i,E)=>{const l=c.find(_=>String(_.id)===i);if(l&&l.isAdded)return;const b=E?[...se,i]:se.filter(_=>_!==i);re(b),N==null||N.onSelectionChange(b)};return e.jsxs("div",{className:ee,children:[e.jsxs("div",{className:"flex justify-between items-center mb-6 overflow-visible",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white/90 flex items-center gap-2",children:[s&&e.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-50 rounded-xl dark:bg-blue-500/10",children:s}),t]}),a&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:a})]}),e.jsx("div",{className:"flex-shrink-0 overflow-visible",children:e.jsx(Bs,{})})]}),(n||m.length>0)&&e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"w-[75%] igny8-filter-bar p-3 rounded-lg bg-transparent",style:{boxShadow:"0 2px 6px 3px rgba(0, 0, 0, 0.08)"},children:e.jsxs("div",{className:"flex flex-nowrap gap-3 items-center justify-between w-full",children:[e.jsx("div",{className:"flex flex-nowrap gap-3 items-center flex-1 min-w-0 w-full",children:n?e.jsx("div",{className:"flex flex-nowrap gap-3 items-center flex-1 min-w-0 w-full",children:n}):e.jsx(e.Fragment,{children:m.map(i=>{if(i.type==="custom"&&i.customRender)return e.jsx(Ce.Fragment,{children:i.customRender()},i.key);if(i.type==="text")return e.jsx(es,{type:"text",placeholder:i.placeholder||`Search ${i.label.toLowerCase()}...`,value:p[i.key]||"",onChange:E=>{d==null||d(i.key,E.target.value)},className:"flex-1 min-w-[200px] h-9"},i.key);if(i.type==="select"){const E=p[i.key]||"";return e.jsx(nt,{options:i.options||[],placeholder:i.label,value:E,onChange:l=>{const b=l==null?"":String(l);d==null||d(i.key,b)},className:i.className||"flex-1 min-w-[140px]"},i.key)}return null})})}),Ve&&f&&e.jsx(je,{variant:"secondary",size:"sm",onClick:f,className:"flex-shrink-0",children:"Clear Filters"})]})})}),e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[Q.length>0&&e.jsx("div",{className:"inline-block",children:Q.length===1?e.jsxs(je,{size:"md",onClick:()=>{se.length>0&&be(Q[0].key,se)},disabled:se.length===0,variant:Q[0].variant==="success"?"success":(Q[0].variant==="danger","primary"),startIcon:Q[0].icon,className:se.length===0?"opacity-50 cursor-not-allowed":"",children:[Q[0].label,se.length>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium rounded-full bg-white/20 text-white",children:se.length})]}):e.jsxs(e.Fragment,{children:[e.jsxs(je,{ref:j,size:"md",onClick:()=>se.length>0&&O(!S),disabled:se.length===0,className:`dropdown-toggle ${se.length===0?"opacity-50 cursor-not-allowed":""}`,endIcon:e.jsx(wt,{className:"w-4 h-4"}),children:["Bulk Actions",se.length>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium rounded-full bg-blue-100 text-blue-800 dark:bg-blue-500/20 dark:text-blue-300",children:se.length})]}),e.jsx(yt,{isOpen:S&&se.length>0,onClose:()=>O(!1),anchorRef:j,placement:"bottom-left",className:"w-48 p-2",children:Q.map((i,E)=>{const l=i.key==="delete",b=l&&E>0;return e.jsxs(Ce.Fragment,{children:[b&&e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"}),e.jsxs(at,{onItemClick:()=>{be(i.key,se)},className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${l?"text-error-500 hover:bg-error-50 hover:text-error-600 dark:text-error-400 dark:hover:bg-error-500/15 dark:hover:text-error-300":"text-gray-700 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300"}`,children:[i.icon&&e.jsx("span",{className:"flex-shrink-0 w-5 h-5",children:i.icon}),e.jsx("span",{className:"text-left",children:i.label})]})]},i.key)})})]})}),e.jsxs("div",{className:"flex gap-2",children:[le&&e.jsx(je,{variant:"secondary",size:"md",endIcon:q,onClick:le,children:"Export CSV"}),ie&&e.jsx(je,{variant:"secondary",size:"md",endIcon:C,onClick:ie,children:"Import"}),L&&e.jsx(je,{variant:"primary",size:"md",endIcon:F,onClick:L,children:z})]})]}),e.jsx("div",{className:`rounded-xl border border-gray-200 bg-white dark:border-white/[0.05] dark:bg-white/[0.03] igny8-table-container ${u?"loaded":"loading"}`,style:{overflowX:"auto",overflowY:"visible"},children:e.jsx("div",{className:"igny8-table-wrapper",style:{overflow:"visible"},children:e.jsxs(Os,{className:"igny8-table-compact igny8-table-smooth",children:[e.jsx(Ps,{className:"border-b border-gray-100 dark:border-white/[0.05]",children:e.jsxs(pt,{children:[N&&e.jsx(De,{isHeader:!0,className:"px-5 py-3 font-medium text-gray-500 text-start text-theme-xs dark:text-gray-400 w-12",children:u&&e.jsx(Lt,{checked:(()=>{const i=c.filter(E=>!E.isAdded);return i.length>0&&se.length===i.length})(),onChange:_e,id:"select-all"})}),o.map((i,E)=>{const l=E===o.length-1;return e.jsx(De,{isHeader:!0,className:`px-5 py-3 font-medium text-gray-500 text-${i.align||"start"} text-theme-xs dark:text-gray-400 ${i.sortable?"cursor-pointer hover:text-gray-700 dark:hover:text-gray-300":""} ${l&&X.length>0?"pr-16":""}`,children:i.sortable?e.jsxs("div",{onClick:()=>ct(i),className:"flex items-center",children:[i.label,Xe(i)]}):e.jsxs(e.Fragment,{children:[i.label,Xe(i)]})},i.key)})]})}),e.jsx(Rs,{className:"divide-y divide-gray-100 dark:divide-white/[0.05] igny8-table-body",children:u?c.length===0?null:c.map((i,E)=>{var At;const l=i.id||E,b=fe.has(l),_=o.find(Ne=>Ne.toggleable),pe=(_==null?void 0:_.toggleContentKey)||(_==null?void 0:_.key),ge=(_==null?void 0:_.toggleContentLabel)||"Content",ke=pe?i[pe]:null,D=ke&&(typeof ke=="string"?ke.trim().length>0:typeof ke=="object"&&ke!==null&&Object.keys(ke).length>0),me=(N?1:0)+o.length,$e=(Ne,Ae)=>{te(Ue=>{const Ie=new Set(Ue),He=Ae??l;return Ne?Ie.add(He):Ie.delete(He),Ie})},$t=!!i.isAdded;return e.jsxs(Ce.Fragment,{children:[e.jsxs(pt,{className:`igny8-data-row ${$t?"bg-blue-50 dark:bg-blue-500/10":""}`,children:[N&&e.jsx(De,{className:"px-5 py-4 text-start",children:e.jsx(Lt,{checked:se.includes(((At=i.id)==null?void 0:At.toString())||""),onChange:Ne=>{var Ae;return dt(((Ae=i.id)==null?void 0:Ae.toString())||"",Ne)},id:`checkbox-${i.id}`,disabled:$t})}),o.map((Ne,Ae)=>{var He;const Ue=Ae===o.length-1,Ie=i.id||E;if(Ue&&X.length>0&&!de.current.has(Ie)){const qe=Ce.createRef();de.current.set(Ie,qe)}return e.jsxs(De,{className:`px-5 py-4 text-${Ne.align||"start"} text-gray-800 dark:text-white/90 ${Ue&&X.length>0?"relative pr-16":""}`,children:[e.jsxs("div",{className:`flex items-center ${Ne.toggleable&&D?"justify-between w-full":""} gap-2`,children:[e.jsx("div",{className:"flex-1",children:Ne.render?Ne.render(i[Ne.key],i):e.jsx("span",{children:((He=i[Ne.key])==null?void 0:He.toString())||"-"})}),Ne.toggleable&&D&&e.jsx("div",{onClick:qe=>qe.stopPropagation(),children:e.jsx(qs,{isExpanded:b,onClick:()=>{$e(!b,l)},hasContent:D})})]}),Ue&&X.length>0&&(()=>{const qe=!!i.isAdded;if(X.length===1){const Se=X[0];return qe?e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 z-10",children:e.jsx("span",{className:"text-sm font-medium text-blue-light-500 dark:text-blue-light-400",children:"Added"})}):e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 z-10",children:e.jsxs("button",{type:"button",onClick:Me=>{Me.stopPropagation(),Ee(Se.key,i)},className:"flex items-center gap-1 text-sm font-medium text-success-500 hover:text-success-600 dark:text-success-400 dark:hover:text-success-300 transition-colors cursor-pointer",children:[Se.label,e.jsx("span",{className:"inline-flex items-center",children:e.jsx(Ge,{className:"w-4 h-4 fill-current"})})]})})}const ut=de.current.get(Ie);if(!ut)return null;const Vt=ne.get(Ie)||!1;return e.jsxs(e.Fragment,{children:[e.jsx("button",{ref:ut,type:"button",onClick:Se=>{Se.stopPropagation(),xe(Me=>{const Te=new Map(Me);return Te.forEach((gt,Ze)=>{Ze!==Ie&&Te.set(Ze,!1)}),Te.set(Ie,!Te.get(Ie)),Te})},className:"absolute right-2 top-1/2 -translate-y-1/2 inline-flex items-center justify-center w-8 h-8 rounded-lg transition-colors text-gray-500 hover:text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:bg-gray-800 dropdown-toggle z-10",title:"Actions",children:e.jsx(ts,{className:"w-5 h-5"})}),e.jsx(yt,{isOpen:Vt,onClose:()=>{xe(Se=>{const Me=new Map(Se);return Me.set(Ie,!1),Me})},anchorRef:ut,placement:"right",className:"w-48 p-2",children:X.map(Se=>{const Me=Se.key==="edit",Te=Se.key==="delete",gt=Se.key==="export",Ze=()=>{var Tt;if(!Se.icon)return null;const et=Se.icon,tt=((Tt=et.props)==null?void 0:Tt.className)||"",mt=tt.includes("w-")?"":"w-5 h-5 ";return Me?Ce.cloneElement(et,{className:`${mt}text-blue-light-500 ${tt}`.trim()}):Te?Ce.cloneElement(et,{className:`${mt}text-error-500 ${tt}`.trim()}):gt?Ce.cloneElement(et,{className:`${mt}text-gray-600 dark:text-gray-400 ${tt}`.trim()}):Se.icon};return e.jsxs(Ce.Fragment,{children:[e.jsxs(at,{onItemClick:()=>Ee(Se.key,i),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${Me?"text-blue-light-500 hover:bg-blue-light-50 hover:text-blue-light-600 dark:text-blue-light-400 dark:hover:bg-blue-light-500/15 dark:hover:text-blue-light-300":Te?"text-error-500 hover:bg-error-50 hover:text-error-600 dark:text-error-400 dark:hover:bg-error-500/15 dark:hover:text-error-300":"text-gray-700 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("span",{className:"flex-shrink-0 w-5 h-5",children:Ze()}),e.jsx("span",{className:"text-left",children:Se.label})]}),gt&&e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"})]},Se.key)})})]})})()]},Ne.key)})]}),_&&D&&e.jsx(Hs,{row:i,contentKey:pe||"",contentLabel:ge,colSpan:me,isExpanded:b,onToggle:$e})]},i.id||E)}):Array.from({length:10}).map((i,E)=>e.jsxs(pt,{className:"igny8-skeleton-row",children:[N&&e.jsx(De,{children:e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"})}),o.map((l,b)=>e.jsx(De,{children:e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"})},b))]},`skeleton-${E}`))})]})})}),v&&e.jsx(Cs,{isOpen:ue.isOpen,onClose:()=>Z({isOpen:!1,items:[],isBulk:!1,isLoading:!1}),onConfirm:we,title:v.title,message:ue.isBulk?v.multipleItemsMessage(ue.items.length):v.singleItemMessage,variant:"danger",isConfirmation:!0,confirmText:"Delete",cancelText:"Cancel",isLoading:ue.isLoading,itemsList:ue.items.map(i=>U(i))}),w&&e.jsx(Fs,{isOpen:y.isOpen,onClose:()=>I({isOpen:!1,itemCount:0,isLoading:!1}),onConfirm:lt,title:w.export.title,message:w.export.message(y.itemCount),confirmText:w.export.confirmText,isLoading:y.isLoading}),w&&e.jsx(Ds,{isOpen:B.isOpen,onClose:()=>ce({isOpen:!1,itemCount:0,isLoading:!1}),onConfirm:it,title:w.updateStatus.title,message:w.updateStatus.message(B.itemCount),confirmText:w.updateStatus.confirmText,statusOptions:w.updateStatus.statusOptions,isLoading:B.isLoading}),A&&e.jsx("div",{className:"mt-6 border-t border-gray-200 dark:border-gray-800 pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Showing ",c.length," of ",A.totalCount," ",$||"items"]}),e.jsx(zs,{currentPage:A.currentPage,totalPages:A.totalPages,pageSize:Le,onPageChange:i=>{A.onPageChange(i)},onPageSizeChange:i=>{k(i),A.onPageChange(1)}})]})})]})}function It({isOpen:t,onClose:s,onSubmit:a,title:o,fields:c=[],submitLabel:g="Create",cancelLabel:u="Cancel",isLoading:m=!1,className:p="max-w-2xl",customFooter:d,customBody:f}){return e.jsx(Qe,{isOpen:t,onClose:s,className:p,children:e.jsxs("div",{className:"p-6",children:[e.jsx("h3",{className:"text-lg font-semibold mb-6 text-gray-800 dark:text-white",children:o}),e.jsxs("form",{onSubmit:n=>{n.preventDefault(),a()},className:"space-y-4",children:[f||e.jsxs(e.Fragment,{children:[c.find(n=>n.key==="keyword")&&e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[c.find(n=>n.key==="keyword").label,c.find(n=>n.key==="keyword").required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("input",{type:"text",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:c.find(n=>n.key==="keyword").value||"",onChange:n=>c.find(x=>x.key==="keyword").onChange(n.target.value),placeholder:c.find(n=>n.key==="keyword").placeholder,required:c.find(n=>n.key==="keyword").required})]}),(c.find(n=>n.key==="volume")||c.find(n=>n.key==="difficulty"))&&e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.find(n=>n.key==="volume")&&e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[c.find(n=>n.key==="volume").label,c.find(n=>n.key==="volume").required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("input",{type:"number",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:c.find(n=>n.key==="volume").value||"",onChange:n=>{const x=n.target.value===""?"":parseInt(n.target.value)||0;c.find(L=>L.key==="volume").onChange(x)},placeholder:c.find(n=>n.key==="volume").placeholder,required:c.find(n=>n.key==="volume").required})]}),c.find(n=>n.key==="difficulty")&&(()=>{const n=c.find(x=>x.key==="difficulty");return e.jsxs("div",{children:[e.jsxs(st,{className:"mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),n.type==="select"?e.jsx(nt,{options:n.options||[],placeholder:n.placeholder||n.label,value:n.value||"",onChange:x=>n.onChange(x),className:"w-full"}):e.jsx("input",{type:"number",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:n.value||"",onChange:x=>{const L=x.target.value===""?"":parseInt(x.target.value)||0;n.onChange(L)},placeholder:n.placeholder,required:n.required,min:n.min,max:n.max})]})})()]}),c.filter(n=>n.key!=="keyword"&&n.key!=="volume"&&n.key!=="difficulty").map(n=>n.type==="select"?e.jsxs("div",{children:[e.jsxs(st,{className:"mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(nt,{options:n.options||[],placeholder:n.placeholder||n.label,value:n.value||"",onChange:x=>n.onChange(x),className:"w-full"})]},n.key):n.type==="textarea"?e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("textarea",{rows:n.rows||4,className:"w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:n.value||"",onChange:x=>n.onChange(x.target.value),placeholder:n.placeholder,required:n.required})]},n.key):e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("input",{type:n.type,className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:n.value||"",onChange:x=>n.onChange(x.target.value),placeholder:n.placeholder,required:n.required,min:n.min,max:n.max})]},n.key))]}),d||e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(je,{type:"button",variant:"outline",onClick:s,disabled:m,children:u}),e.jsx(je,{type:"submit",variant:"primary",disabled:m,children:m?"Processing...":g})]})]})]})})}let Ft=0;const Ws=()=>(Ft++,`modal-${String(Ft).padStart(2,"0")}`);function Et({isOpen:t,title:s,percentage:a,status:o,message:c,details:g,onClose:u,onCancel:m,taskId:p,functionId:d}){const f=Ce.useRef(null);Ce.useEffect(()=>{f.current||(f.current=Ws())},[]);const n=f.current||"modal-01",x=d?`${d}-${n}`:null,L=Ce.useRef(!1);r.useEffect(()=>{if(o==="completed"&&u&&!L.current){L.current=!0;const le=setTimeout(()=>{u()},2e3);return()=>clearTimeout(le)}o!=="completed"&&(L.current=!1)},[o,u]);const z=()=>o==="error"?"error":o==="completed"?"success":"primary",F=()=>o==="completed"?e.jsx("svg",{className:"w-6 h-6 text-success-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):o==="error"?e.jsx("svg",{className:"w-6 h-6 text-error-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}):e.jsxs("svg",{className:"w-6 h-6 text-brand-500 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});return e.jsx(Qe,{isOpen:t,onClose:u||(()=>{}),className:"max-w-lg",showCloseButton:o==="completed"||o==="error",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[e.jsx("div",{className:"flex-shrink-0 mt-1",children:F()}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:s}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:c})]})]}),e.jsx("div",{className:"mb-6",children:e.jsx(ze,{value:a,color:z(),size:"lg",showLabel:!0,label:`${Math.round(a)}%`})}),g&&e.jsxs("div",{className:"mb-6 space-y-2",children:[g.currentItem&&e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:[e.jsx("span",{className:"font-medium",children:"Current:"})," ",e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:g.currentItem})]}),g.total>0&&e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:[e.jsx("span",{className:"font-medium",children:"Progress:"})," ",e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:[g.current," of ",g.total," completed"]})]}),g.phase&&e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Phase: ",g.phase]})]}),(x||p)&&!1,e.jsxs("div",{className:"flex justify-end gap-3",children:[m&&o!=="completed"&&o!=="error"&&e.jsx(je,{variant:"secondary",size:"sm",onClick:m,disabled:o==="processing",children:"Cancel"}),(o==="completed"||o==="error")&&u&&e.jsx(je,{variant:"primary",size:"sm",onClick:u,children:o==="completed"?"Close":"Dismiss"})]})]})})}function Mt(){const[t,s]=r.useState(!1),[a,o]=r.useState(null),[c,g]=r.useState(""),[u,m]=r.useState(void 0),[p,d]=r.useState({percentage:0,message:"Initializing...",status:"pending"}),f=r.useRef(0),n=r.useRef(null),x=r.useRef(null),L=(C,M="",$=[])=>{const A=(C==null?void 0:C.toUpperCase())||"",N=M.toLowerCase(),P=(S,O)=>{const ne=O.match(S);return ne&&ne[1]?ne[1]:""};let h=P(/(\d+)\s+keyword/i,M),T=P(/(\d+)\s+cluster/i,M),H=P(/(\d+)\s+task/i,M),V=P(/(\d+)\s+item/i,M);if(!h&&!H&&!V){const S=P(/loaded\s+(\d+)\s+items?/i,M);S&&(V=S)}if(!T){const S=P(/created\s+(\d+)\s+clusters?/i,M);S&&(T=S)}if(!h&&!H&&!V)for(const S of $){const O=S.message||"";if(h||(h=P(/(\d+)\s+keyword/i,O)),H||(H=P(/(\d+)\s+task/i,O)),V||(V=P(/loaded\s+(\d+)\s+items?/i,O)),T||(T=P(/(\d+)\s+cluster/i,O)||P(/created\s+(\d+)\s+clusters?/i,O)),(h||H||V)&&T)break}const J=h,W=T,R=H||V,U=N.includes("content")||N.includes("generating content")||N.includes("article"),ee=N.includes("cluster")&&!N.includes("content"),K=N.includes("idea");return A.includes("INIT")||A.includes("INITIALIZ")?{percentage:0,friendlyMessage:"Getting started..."}:A.includes("PREP")||A.includes("PREPAR")?U?{percentage:10,friendlyMessage:R?`Preparing ${R} task${R!=="1"?"s":""}...`:"Preparing content generation..."}:ee?{percentage:16,friendlyMessage:J?`Preparing ${J} keyword${J!=="1"?"s":""}...`:"Preparing your keywords..."}:K?{percentage:10,friendlyMessage:W?`Preparing ${W} cluster${W!=="1"?"s":""}...`:"Preparing clusters..."}:{percentage:10,friendlyMessage:"Preparing..."}:A.includes("AI_CALL")||A.includes("CALLING")?U?{percentage:50,friendlyMessage:"Generating content with AI..."}:ee?{percentage:50,friendlyMessage:"Finding related keywords..."}:K?{percentage:50,friendlyMessage:"Generating ideas..."}:{percentage:50,friendlyMessage:"Processing with AI..."}:A.includes("PARSE")||A.includes("PARSING")?U?{percentage:70,friendlyMessage:"Processing content..."}:ee?{percentage:70,friendlyMessage:"Organizing results..."}:K?{percentage:70,friendlyMessage:"Processing ideas..."}:{percentage:70,friendlyMessage:"Processing results..."}:A.includes("SAVE")||A.includes("SAVING")||A.includes("CREAT")&&!A.includes("CONTENT")?U?{percentage:85,friendlyMessage:R?`Saving content for ${R} task${R!=="1"?"s":""}...`:"Saving content..."}:ee?{percentage:85,friendlyMessage:W?`Saving ${W} cluster${W!=="1"?"s":""}...`:"Saving clusters..."}:K?{percentage:85,friendlyMessage:R?`Saving ${R} idea${R!=="1"?"s":""}...`:"Saving ideas..."}:{percentage:85,friendlyMessage:"Saving results..."}:A.includes("DONE")||A.includes("COMPLETE")?U?{percentage:100,friendlyMessage:R?`Done! Generated content for ${R} task${R!=="1"?"s":""}`:"Done! Content generation complete"}:ee?{percentage:100,friendlyMessage:J&&W?`Done! Created ${W} cluster${W!=="1"?"s":""} from ${J} keyword${J!=="1"?"s":""}`:J?`Done! Processed ${J} keyword${J!=="1"?"s":""}`:W?`Done! Created ${W} cluster${W!=="1"?"s":""}`:"Done! Clustering complete"}:K?{percentage:100,friendlyMessage:R?`Done! Generated ${R} idea${R!=="1"?"s":""}`:"Done! Ideas generation complete"}:{percentage:100,friendlyMessage:"Done! Task complete"}:{percentage:f.current,friendlyMessage:M||"Processing..."}};r.useEffect(()=>{if(!a||!t||a.startsWith("temp-"))return;let C=null,M=0,$=!1;const A=300,N=async()=>{if(!$)try{if(M++,M>A){d({percentage:0,message:"Task is taking longer than expected. Please check manually.",status:"error"}),$=!0,C&&(clearInterval(C),C=null);return}const P=await as(`/v1/system/settings/task_progress/${a}/`);if(P.state==="PROGRESS"){const h=P.meta||{};let T=null;const H=[...h.request_steps||[],...h.response_steps||[]];if(H.length>0){const O=[...H].sort((ne,xe)=>(xe.stepNumber||0)-(ne.stepNumber||0))[0];if(O&&O.stepName){const ne=O.stepName.toUpperCase();ne.includes("INIT")?T="INIT":ne.includes("PREP")?T="PREP":ne.includes("AI_CALL")||ne.includes("CALL")?T="AI_CALL":ne.includes("PARSE")?T="PARSE":ne.includes("SAVE")||ne.includes("CREAT")?T="SAVE":ne.includes("DONE")||ne.includes("COMPLETE")?T="DONE":T=ne}}if(!T){const S=(h.phase||"").toLowerCase(),O=(h.message||"").toLowerCase();S.includes("initializ")||O.includes("initializ")||O.includes("getting started")?T="INIT":S.includes("prepar")||S.includes("prep")||O.includes("prepar")||O.includes("loading")?T="PREP":S.includes("analyzing")||S.includes("ai_call")||O.includes("analyzing")||O.includes("finding related")?T="AI_CALL":S.includes("pars")||O.includes("pars")||O.includes("organizing")?T="PARSE":S.includes("sav")||S.includes("creat")||O.includes("sav")||O.includes("creat")||O.includes("cluster")&&!O.includes("content")?T="SAVE":(S.includes("done")||S.includes("complet")||O.includes("done")||O.includes("complet"))&&(T="DONE")}const V=h.message||"",J=`${c} ${V}`,W=L(T||"",J,H),R=W.percentage,U=W.friendlyMessage,ee=n.current!==T,K=f.current;if(x.current&&(clearTimeout(x.current),x.current=null),R>K){let S=K;const O=()=>{S{n.current=T,O()},500):(n.current=T,O())}else n.current=T,f.current=R,d({percentage:R,message:U,status:"processing",details:{current:h.current||0,total:h.total||0,completed:h.completed||0,currentItem:h.current_item,phase:h.phase}});if(h.request_steps||h.response_steps){const{useAIRequestLogsStore:S}=await Pe(async()=>{const{useAIRequestLogsStore:xe}=await import("./page-dashboard-DxYTR5eF.js").then(de=>de.a6);return{useAIRequestLogsStore:xe}},__vite__mapDeps([0,1,2,3,4,5,6])).catch(()=>({useAIRequestLogsStore:null})),ne=((S==null?void 0:S.getState().logs)||[]).find(xe=>{var de,j;return((j=(de=xe.response)==null?void 0:de.data)==null?void 0:j.task_id)===a});if(ne){const xe=S==null?void 0:S.getState().addRequestStep,de=S==null?void 0:S.getState().addResponseStep;h.request_steps&&Array.isArray(h.request_steps)&&h.request_steps.forEach(j=>{ne.requestSteps.find(v=>v.stepNumber===j.stepNumber)||xe==null||xe(ne.id,j)}),h.response_steps&&Array.isArray(h.response_steps)&&h.response_steps.forEach(j=>{ne.responseSteps.find(v=>v.stepNumber===j.stepNumber)||de==null||de(ne.id,j)})}}}else if(P.state==="SUCCESS"){const h=P.meta||{};x.current&&(clearTimeout(x.current),x.current=null);const T=h.message||"",H=[...h.request_steps||[],...h.response_steps||[]],V=L("DONE",T,H);if(n.current="DONE",f.current=100,d({percentage:100,message:V.friendlyMessage,status:"completed",details:h.details}),h.request_steps||h.response_steps){const{useAIRequestLogsStore:J}=await Pe(async()=>{const{useAIRequestLogsStore:U}=await import("./page-dashboard-DxYTR5eF.js").then(ee=>ee.a6);return{useAIRequestLogsStore:U}},__vite__mapDeps([0,1,2,3,4,5,6])).catch(()=>({useAIRequestLogsStore:null})),W=(J==null?void 0:J.getState().logs)||[],R=W.find(U=>{var ee,K;return((K=(ee=U.response)==null?void 0:ee.data)==null?void 0:K.task_id)===a})||W[0];if(R){const U=J==null?void 0:J.getState().addRequestStep,ee=J==null?void 0:J.getState().addResponseStep;h.request_steps&&Array.isArray(h.request_steps)&&h.request_steps.forEach(K=>{R.requestSteps.find(S=>S.stepNumber===K.stepNumber)||U==null||U(R.id,K)}),h.response_steps&&Array.isArray(h.response_steps)&&h.response_steps.forEach(K=>{R.responseSteps.find(S=>S.stepNumber===K.stepNumber)||ee==null||ee(R.id,K)})}}$=!0,C&&(clearInterval(C),C=null)}else if(P.state==="FAILURE"){const h=P.meta||{},T=h.error||h.message||P.error||"Task failed - exception details unavailable",H=h.error_type||"Error";if(d({percentage:0,message:T.includes("exception details unavailable")?T:`Error: ${T}`,status:"error",details:h.error_type?`${H}: ${T}`:T}),h.request_steps||h.response_steps){const{useAIRequestLogsStore:V}=await Pe(async()=>{const{useAIRequestLogsStore:R}=await import("./page-dashboard-DxYTR5eF.js").then(U=>U.a6);return{useAIRequestLogsStore:R}},__vite__mapDeps([0,1,2,3,4,5,6])).catch(()=>({useAIRequestLogsStore:null})),W=((V==null?void 0:V.getState().logs)||[]).find(R=>{var U,ee;return((ee=(U=R.response)==null?void 0:U.data)==null?void 0:ee.task_id)===a});if(W){const R=V==null?void 0:V.getState().addRequestStep,U=V==null?void 0:V.getState().addResponseStep;h.request_steps&&Array.isArray(h.request_steps)&&h.request_steps.forEach(ee=>{W.requestSteps.find(K=>K.stepNumber===ee.stepNumber)||R==null||R(W.id,ee)}),h.response_steps&&Array.isArray(h.response_steps)&&h.response_steps.forEach(ee=>{W.responseSteps.find(K=>K.stepNumber===ee.stepNumber)||U==null||U(W.id,ee)})}}$=!0,C&&(clearInterval(C),C=null)}else d({percentage:0,message:"Task is starting...",status:"pending"})}catch(P){if(console.error("Error polling task status:",P),M>5){let h=P.message||"Unknown error";h.includes("HTTP_ERROR")&&(h=h.replace(/^API Error \(\d+\): HTTP_ERROR - /,"").trim()||"Server error"),d({percentage:0,message:`Error checking task status: ${h}`,status:"error"}),$=!0,C&&(clearInterval(C),C=null)}}};return N(),C=setInterval(()=>{$||N()},2e3),()=>{$=!0,C&&(clearInterval(C),C=null),x.current&&(clearTimeout(x.current),x.current=null),f.current=0,n.current=null}},[a,t]);const z=r.useCallback((C,M,$)=>{x.current&&(clearTimeout(x.current),x.current=null),f.current=0,n.current=null,o(C),g(M),m($),s(!0),d({percentage:0,message:"Getting started...",status:"pending"})},[]),F=r.useCallback(C=>{o(C),d({percentage:0,message:"Initializing...",status:"pending"})},[]),le=r.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null),f.current=0,n.current=null,s(!1),o(null),g("")},[]),q=r.useCallback(C=>{d({percentage:0,message:C,status:"error"})},[]),ie=r.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null),f.current=0,n.current=null,d({percentage:0,message:"Getting started...",status:"pending"}),o(null),g(""),s(!1)},[]);return{progress:p,isOpen:t,openModal:z,updateTaskId:F,closeModal:le,setError:q,reset:ie,title:c,taskId:a,functionId:u}}const Gs=t=>{const s=new URLSearchParams;t.filters&&Object.entries(t.filters).forEach(([g,u])=>{u!==""&&u!==null&&u!==void 0&&s.append(g,String(u))});const a=s.toString(),o=t.endpoint.endsWith("/")?t.endpoint:`${t.endpoint}/`;return`${vt}${o}${a?`?${a}`:""}`},Js=async(t,s,a)=>{const o=t.format||"csv",c=Gs(t);s==null||s(`Exporting ${o.toUpperCase()}...`);try{const g=await fetch(c,{method:"GET",credentials:"include"});if(!g.ok){const d=await g.text();throw new Error(`Export failed: ${g.statusText} - ${d}`)}const u=await g.blob(),m=window.URL.createObjectURL(u),p=document.createElement("a");p.href=m,p.download=`${t.filename}.${o}`,document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(m),s==null||s(`Export successful: ${t.filename}.${o}`)}catch(g){const u=g instanceof Error?g:new Error("Export failed");throw a==null||a(u),u}},Qs=async(t,s,a,o)=>{var p,d;const c=s.acceptedFormats||[".csv"],g="."+((p=t.name.split(".").pop())==null?void 0:p.toLowerCase());if(!c.includes(g)){const f=new Error(`Invalid file format. Accepted formats: ${c.join(", ")}`);throw o==null||o(f),f}const u=s.maxFileSize||5*1024*1024;if(t.size>u){const f=new Error(`File size exceeds ${u/1024/1024}MB limit`);throw o==null||o(f),f}a==null||a(`Importing ${t.name}...`);const m=new FormData;m.append("file",t);try{const f=s.endpoint.endsWith("/")?s.endpoint:`${s.endpoint}/`,n=new URLSearchParams;s.queryParams&&Object.entries(s.queryParams).forEach(([le,q])=>{q!==""&&q!==null&&q!==void 0&&n.append(le,String(q))});const x=n.toString(),L=`${vt}${f}${x?`?${x}`:""}`,z=await fetch(L,{method:"POST",body:m,credentials:"include"});if(!z.ok){const le=await z.text();throw new Error(`Import failed: ${z.statusText} - ${le}`)}const F=await z.json();return a==null||a(`Import successful: ${F.imported||0} rows imported`),(d=s.onSuccess)==null||d.call(s,F),F}catch(f){const n=f instanceof Error?f:new Error("Import failed");throw o==null||o(n),n}},Ys=({className:t,onChange:s,accept:a,disabled:o=!1})=>e.jsx("input",{type:"file",accept:a,disabled:o,className:`focus:border-ring-brand-300 h-11 w-full overflow-hidden rounded-lg border border-gray-300 bg-transparent text-sm text-gray-500 shadow-theme-xs transition-colors file:mr-5 file:border-collapse file:cursor-pointer file:rounded-l-lg file:border-0 file:border-r file:border-solid file:border-gray-200 file:bg-gray-50 file:py-3 file:pl-3.5 file:pr-3 file:text-sm file:text-gray-700 placeholder:text-gray-400 hover:file:bg-gray-100 focus:outline-hidden focus:file:ring-brand-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-400 dark:text-white/90 dark:file:border-gray-800 dark:file:bg-white/[0.03] dark:file:text-gray-400 dark:placeholder:text-gray-400 disabled:opacity-50 disabled:cursor-not-allowed ${t}`,onChange:s});function Xs(t){const{exportEndpoint:s,importEndpoint:a,filename:o,acceptedFormats:c=[".csv"],maxFileSize:g=5*1024*1024,onImportSuccess:u,onExportSuccess:m,onError:p}=t,[d,f]=r.useState(!1),[n,x]=r.useState(!1),L=r.useCallback(async(q="csv",ie={})=>{x(!0);try{await Js({endpoint:s,filename:o,format:q,filters:ie},M=>console.log(M),M=>{throw p==null||p(M),M}),m==null||m()}catch(C){const M=C instanceof Error?C:new Error("Export failed");throw p==null||p(M),M}finally{x(!1)}},[s,o,p,m]),z=r.useCallback(async q=>{x(!0);try{const ie={endpoint:a,acceptedFormats:c,maxFileSize:g,queryParams:t.importQueryParams,onSuccess:M=>{u==null||u(M)}},C=await Qs(q,ie,M=>console.log(M),M=>{throw p==null||p(M),M});return f(!1),C}catch(ie){const C=ie instanceof Error?ie:new Error("Import failed");throw p==null||p(C),C}finally{x(!1)}},[a,c,g,u,p]),F=r.useCallback(async q=>{var C;const ie=(C=q.target.files)==null?void 0:C[0];ie&&(await z(ie),q.target.value="")},[z]);return{handleExport:L,handleImportClick:()=>f(!0),ImportModal:()=>e.jsx(Qe,{isOpen:d,onClose:()=>f(!1),className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("h2",{className:"text-xl font-bold mb-6 text-gray-800 dark:text-white",children:["Import ",o.charAt(0).toUpperCase()+o.slice(1)]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(st,{children:"CSV File"}),e.jsx(Ys,{onChange:F,accept:c.join(","),disabled:n}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:["Upload a CSV file (max ",g/1024/1024,"MB)"]})]}),e.jsx("div",{className:"flex justify-end gap-4 pt-4",children:e.jsx(je,{variant:"outline",onClick:()=>f(!1),disabled:n,children:"Close"})})]})]})})}}const Zs=(t,s,a)=>Xs({exportEndpoint:"/v1/planner/keywords/export/",importEndpoint:"/v1/planner/keywords/import_keywords/",filename:"keywords",acceptedFormats:[".csv"],maxFileSize:5*1024*1024,importQueryParams:a,onImportSuccess:t,onError:s});function er(){const t=Je(),{activeSite:s}=_t(),{activeSector:a,loadSectorsForSite:o}=Be(),{pageSize:c}=Ye(),[g,u]=r.useState([]),[m,p]=r.useState([]),[d,f]=r.useState([]),[n,x]=r.useState(!0),[L,z]=r.useState(!1),[F,le]=r.useState(""),[q,ie]=r.useState(""),[C,M]=r.useState(""),[$,A]=r.useState(""),[N,P]=r.useState(""),[h,T]=r.useState(""),[H,V]=r.useState(""),[J,W]=r.useState(!1),[R,U]=r.useState(""),[ee,K]=r.useState(""),S=r.useRef(null),O=r.useRef(null),[ne,xe]=r.useState([]),[de,j]=r.useState(1),[v,w]=r.useState(1),[G,X]=r.useState(0),[Q,se]=r.useState("created_at"),[re,fe]=r.useState("desc"),[te,ue]=r.useState(!1),[Z,y]=r.useState(!1),[I,B]=r.useState(!1),[ce,ve]=r.useState(null),[ye,Le]=r.useState({seed_keyword_id:0,volume_override:null,difficulty_override:null,cluster_id:null,status:"pending"}),k=Mt(),Y=r.useRef(!1),[oe,ae]=r.useState([]),we=r.useRef(null),Ee=r.useRef(-1);r.useEffect(()=>{s&&o(s.id)},[s,o]),r.useEffect(()=>{(async()=>{if(!s||!a||!s.industry){f([]);return}try{z(!0);const b=await xt({industry:s.industry,sector:a.industry_sector||void 0}),_=new Set(g.map(ge=>ge.seed_keyword_id)),pe=(b.results||[]).filter(ge=>!_.has(ge.id));f(pe)}catch(b){console.error("Failed to load available seed keywords:",b),f([])}finally{z(!1)}})()},[s,a,g]),r.useEffect(()=>{(async()=>{try{const b=await rt({ordering:"name"});p(b.results||[])}catch(b){console.error("Error fetching clusters:",b)}})()},[]);const be=r.useCallback(async()=>{x(!0),ue(!1);try{const l=Q?`${re==="desc"?"-":""}${Q}`:"-created_at",b={...F&&{search:F},...q&&{status:q},...C&&{cluster_id:C},...$&&{intent:$},...(a==null?void 0:a.id)&&{sector_id:a.id},page:de,page_size:c||10,ordering:l};if(N){const pe=parseInt(N),ge=St(pe);if(ge!==null){const ke=jt(ge);ke&&(b.difficulty_min=ke.min,b.difficulty_max=ke.max)}}h!==""&&h!==null&&h!==void 0&&(b.volume_min=Number(h)),H!==""&&H!==null&&H!==void 0&&(b.volume_max=Number(H));const _=await ns(b);u(_.results||[]),X(_.count||0),w(Math.ceil((_.count||0)/c)),setTimeout(()=>{ue(!0),x(!1)},100)}catch(l){console.error("Error loading keywords:",l),t.error(`Failed to load keywords: ${l.message}`),ue(!0),x(!1)}},[de,q,C,$,N,h,H,Q,re,F,s,a,c]);r.useEffect(()=>{const l=()=>{be(),(async()=>{try{const pe=await rt({ordering:"name"});p(pe.results||[])}catch(pe){console.error("Error fetching clusters:",pe)}})()},b=()=>{be()};return window.addEventListener("siteChanged",l),window.addEventListener("sectorChanged",b),()=>{window.removeEventListener("siteChanged",l),window.removeEventListener("sectorChanged",b)}},[be]),r.useEffect(()=>{const l=b=>{S.current&&!S.current.contains(b.target)&&O.current&&!O.current.contains(b.target)&&(W(!1),U(h),K(H))};if(J)return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[J,h,H]),r.useEffect(()=>{be()},[be]),r.useEffect(()=>{const l=setTimeout(()=>{j(1)},500);return()=>clearTimeout(l)},[F]),r.useEffect(()=>{const l=de===1;j(1),l&&setTimeout(()=>{be()},0)},[c]);const lt=(l,b)=>{se(l||"created_at"),fe(b),j(1)},{handleExport:it,handleImportClick:Ke,ImportModal:Oe}=Zs(()=>{t.success("Import successful","Keywords imported successfully."),be()},l=>{t.error("Import failed",l.message)},s&&a?{site_id:s.id,sector_id:a.id}:void 0),Re=r.useCallback(async(l,b)=>{if(l==="auto_cluster"){if(b.length===0){t.error("Please select at least one keyword to cluster");return}if(b.length>20){t.error("Maximum 20 keywords allowed for clustering");return}const _=b.map(D=>parseInt(D)),pe=a==null?void 0:a.id,ge=g.filter(D=>_.includes(D.id)),ke={ids:_,keyword_count:_.length,keyword_names:ge.map(D=>D.keyword),sector_id:pe};ae(D=>[...D,{timestamp:new Date().toISOString(),type:"request",action:"auto_cluster (Bulk Action)",data:ke}]);try{const D=await os(_,pe);if(D&&D.success===!1){const me=D.error||"Failed to cluster keywords";ae($e=>[...$e,{timestamp:new Date().toISOString(),type:"error",action:"auto_cluster (Bulk Action)",data:{error:me,keyword_count:_.length}}]),t.error(me);return}if(D&&D.success)D.task_id?(ae(me=>[...me,{timestamp:new Date().toISOString(),type:"success",action:"auto_cluster (Bulk Action)",data:{task_id:D.task_id,message:D.message,keyword_count:_.length}}]),Y.current=!1,k.openModal(D.task_id,"Auto-Clustering Keywords","ai-auto-cluster-01")):(ae(me=>[...me,{timestamp:new Date().toISOString(),type:"success",action:"auto_cluster (Bulk Action)",data:{clusters_created:D.clusters_created||0,keywords_updated:D.keywords_updated||0,keyword_count:_.length,message:D.message}}]),t.success(`Clustering complete: ${D.clusters_created||0} clusters created, ${D.keywords_updated||0} keywords updated`),Y.current||(Y.current=!0,be()));else{const me=(D==null?void 0:D.error)||"Unexpected response format";ae($e=>[...$e,{timestamp:new Date().toISOString(),type:"error",action:"auto_cluster (Bulk Action)",data:{error:me,keyword_count:_.length}}]),t.error(me)}}catch(D){let me="Failed to cluster keywords";D.message&&(me=D.message.replace(/^API Error \(\d+\): [^-]+ - /,"").trim(),(!me||me===D.message)&&(me=D.message)),ae($e=>[...$e,{timestamp:new Date().toISOString(),type:"error",action:"auto_cluster (Bulk Action)",data:{error:me,keyword_count:_.length}}]),t.error(me)}}else t.info(`Bulk action "${l}" for ${b.length} items`)},[t,a,be,k,g]);r.useEffect(()=>{var ke;if(!k.taskId||!k.isOpen)return;const l=k.progress,b=((ke=l.details)==null?void 0:ke.phase)||"",_=l.percentage,pe=l.message,ge=l.status;if(b&&b!==we.current){const D=ge==="error"?"error":ge==="completed"?"success":"step";ae(me=>[...me,{timestamp:new Date().toISOString(),type:D,action:k.title||"AI Function",stepName:b,percentage:_,data:{step:b,message:pe,percentage:_,status:ge,details:l.details}}]),we.current=b,Ee.current=_}else if(b&&Math.abs(_-Ee.current)>=10){const D=ge==="error"?"error":ge==="completed"?"success":"step";ae(me=>[...me,{timestamp:new Date().toISOString(),type:D,action:k.title||"AI Function",stepName:b,percentage:_,data:{step:b,message:pe,percentage:_,status:ge,details:l.details}}]),Ee.current=_}else if((ge==="error"||ge==="completed")&&(b!==we.current||ge==="error"&&we.current!=="error"||ge==="completed"&&we.current!=="completed")){const D=ge==="error"?"error":"success";ae(me=>[...me,{timestamp:new Date().toISOString(),type:D,action:k.title||"AI Function",stepName:b||"Final",percentage:_,data:{step:b||"Final",message:pe,percentage:_,status:ge,details:l.details}}]),we.current=b||ge}},[k.progress,k.taskId,k.isOpen,k.title]),r.useEffect(()=>{k.isOpen||(we.current=null,Ee.current=-1),Y.current=!1},[k.isOpen,k.taskId]);const Ve=r.useCallback(()=>{Le({seed_keyword_id:0,volume_override:null,difficulty_override:null,cluster_id:null,status:"pending"}),B(!1),ve(null)},[]),ct=r.useCallback(async l=>{try{if(!l||l.length===0)throw new Error("No records selected for export");const b=l.join(","),_=`${vt}/v1/planner/keywords/export/?ids=${encodeURIComponent(b)}`,pe=await fetch(_,{method:"GET",credentials:"include"});if(!pe.ok){const me=await pe.text();throw new Error(`Export failed: ${pe.statusText} - ${me}`)}const ge=await pe.blob(),ke=window.URL.createObjectURL(ge),D=document.createElement("a");D.href=ke,D.download="keywords.csv",document.body.appendChild(D),D.click(),document.body.removeChild(D),window.URL.revokeObjectURL(ke)}catch(b){throw b}},[]),Xe=r.useCallback(async(l,b)=>{try{const _=l.map(pe=>parseInt(pe));await ls(_,b),await be()}catch(_){throw _}},[be]),_e=r.useMemo(()=>_s({clusters:m,activeSector:a,availableSeedKeywords:d,formData:ye,setFormData:Le,searchTerm:F,setSearchTerm:le,statusFilter:q,setStatusFilter:ie,intentFilter:$,setIntentFilter:A,difficultyFilter:N,setDifficultyFilter:P,clusterFilter:C,setClusterFilter:M,volumeMin:h,volumeMax:H,setVolumeMin:T,setVolumeMax:V,isVolumeDropdownOpen:J,setIsVolumeDropdownOpen:W,tempVolumeMin:R,tempVolumeMax:ee,setTempVolumeMin:U,setTempVolumeMax:K,volumeButtonRef:O,volumeDropdownRef:S,setCurrentPage:j,loadKeywords:be}),[m,a,d,ye,F,q,$,N,C,h,H,J,R,ee,be,s]),dt=r.useMemo(()=>_e!=null&&_e.headerMetrics?_e.headerMetrics.map(l=>({label:l.label,value:l.calculate({keywords:g,totalCount:G,clusters:m}),accentColor:l.accentColor})):[],[_e==null?void 0:_e.headerMetrics,g,G,m]),i=async()=>{try{if(!s){t.error("Please select an active site first");return}if(I&&ce)await ds(ce.id,ye),t.success("Keyword updated successfully");else{if(!a){t.error("Please select a sector for this site first");return}if(!ye.seed_keyword_id){t.error("Please select a seed keyword");return}const l=a.id,b={...ye,site_id:s.id,sector_id:l};await us(b),t.success("Keyword attached successfully")}y(!1),Ve(),be()}catch(l){t.error(`Failed to save: ${l.message}`)}},E=r.useCallback(l=>{ve(l),B(!0),Le({seed_keyword_id:l.seed_keyword_id,volume_override:l.volume_override||null,difficulty_override:l.difficulty_override||null,cluster_id:l.cluster_id,status:l.status}),y(!0)},[]);return e.jsxs(e.Fragment,{children:[e.jsx(ot,{title:"Keywords",titleIcon:e.jsx(Dt,{className:"text-brand-500 size-5"}),subtitle:"Manage and organize SEO keywords for content planning",columns:_e.columns,data:g,loading:n,showContent:te,filters:_e.filters,filterValues:{search:F,status:q,intent:$,difficulty:N,cluster_id:C,volumeMin:h,volumeMax:H},onFilterChange:(l,b)=>{const _=b==null?"":String(b);l==="search"?le(_):l==="status"?(ie(_),j(1)):l==="intent"?(A(_),j(1)):l==="difficulty"?(P(_),j(1)):l==="cluster_id"&&(M(_),j(1))},onEdit:E,onCreate:()=>{Ve(),y(!0)},createLabel:"Add Keyword",onCreateIcon:e.jsx(Ge,{}),onDelete:async l=>{await cs(l),be()},onBulkDelete:async l=>{const b=await is(l);return be(),b},onBulkExport:ct,onBulkUpdateStatus:Xe,onBulkAction:Re,getItemDisplayName:l=>l.keyword,onExport:async()=>{try{await it("csv",{search:F,status:q,cluster_id:C,intent:$,difficulty:N}),t.success("Export successful","Keywords exported successfully.")}catch(l){t.error("Export failed",l.message)}},onExportIcon:e.jsx(kt,{}),onImport:Ke,onImportIcon:e.jsx(ss,{}),selectionLabel:"keyword",pagination:{currentPage:de,totalPages:v,totalCount:G,onPageChange:l=>{j(l)}},selection:{selectedIds:ne,onSelectionChange:xe},sorting:{sortBy:Q,sortDirection:re,onSort:lt},headerMetrics:dt,onFilterReset:()=>{le(""),ie(""),M(""),A(""),P(""),T(""),V(""),U(""),K(""),W(!1),j(1)}}),e.jsx(It,{isOpen:Z,onClose:()=>{y(!1),Ve()},onSubmit:i,title:I?"Edit Keyword":"Add Keyword",submitLabel:I?"Update":"Create",fields:_e.formFields(m)}),e.jsx(Oe,{}),e.jsx(Et,{isOpen:k.isOpen,title:k.title,percentage:k.progress.percentage,status:k.progress.status,message:k.progress.message,details:k.progress.details,taskId:k.taskId||void 0,functionId:k.functionId,onClose:()=>{k.closeModal(),k.progress.status==="completed"&&!Y.current&&(Y.current=!0,be())}}),oe.length>0&&e.jsxs("div",{className:"mt-6 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:"AI Function Logs"}),e.jsx("button",{onClick:()=>ae([]),className:"text-xs text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:"Clear Logs"})]}),e.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:oe.slice().reverse().map((l,b)=>e.jsxs("div",{className:`p-3 rounded border text-xs font-mono ${l.type==="request"?"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800":l.type==="success"?"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800":l.type==="error"?"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800":"bg-purple-50 dark:bg-purple-900/20 border-purple-200 dark:border-purple-800"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{className:`font-semibold ${l.type==="request"?"text-blue-700 dark:text-blue-300":l.type==="success"?"text-green-700 dark:text-green-300":l.type==="error"?"text-red-700 dark:text-red-300":"text-purple-700 dark:text-purple-300"}`,children:["[",l.type.toUpperCase(),"]"]}),e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:l.action}),l.stepName&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400",children:l.stepName}),l.percentage!==void 0&&e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[l.percentage,"%"]})]}),e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:new Date(l.timestamp).toLocaleTimeString()})]}),e.jsx("pre",{className:"text-xs text-gray-700 dark:text-gray-300 whitespace-pre-wrap break-words",children:JSON.stringify(l.data,null,2)})]},b))})]})]})}const wr=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"}));function tr(){const t=Je(),{activeSector:s}=Be(),{pageSize:a}=Ye(),[o,c]=r.useState([]),[g,u]=r.useState(!0),[m,p]=r.useState(""),[d,f]=r.useState(""),[n,x]=r.useState(""),[L,z]=r.useState(""),[F,le]=r.useState(""),[q,ie]=r.useState(!1),[C,M]=r.useState(""),[$,A]=r.useState(""),N=r.useRef(null),P=r.useRef(null),[h,T]=r.useState([]),[H,V]=r.useState(1),[J,W]=r.useState(1),[R,U]=r.useState(0),[ee,K]=r.useState("name"),[S,O]=r.useState("asc"),[ne,xe]=r.useState(!1),[de,j]=r.useState(!1),[v,w]=r.useState(!1),[G,X]=r.useState(null),[Q,se]=r.useState({name:"",description:"",status:"active"}),re=Mt(),fe=r.useRef(!1),te=r.useCallback(async()=>{u(!0),xe(!1);try{const k=ee?`${S==="desc"?"-":""}${ee}`:"name",Y={...m&&{search:m},...d&&{status:d},...(s==null?void 0:s.id)&&{sector_id:s.id},page:H,page_size:a,ordering:k};if(n){const ae=parseInt(n),we=St(ae);if(we!==null){const Ee=jt(we);Ee&&(Y.difficulty_min=Ee.min,Y.difficulty_max=Ee.max)}}L!==""&&L!==null&&L!==void 0&&(Y.volume_min=Number(L)),F!==""&&F!==null&&F!==void 0&&(Y.volume_max=Number(F));const oe=await rt(Y);c(oe.results||[]),U(oe.count||0),W(Math.ceil((oe.count||0)/a)),setTimeout(()=>{xe(!0),u(!1)},100)}catch(k){console.error("Error loading clusters:",k),t.error(`Failed to load clusters: ${k.message}`),xe(!0),u(!1)}},[H,d,ee,S,m,n,L,F,s,a]);r.useEffect(()=>{te()},[te]),r.useEffect(()=>{const k=()=>{te()},Y=()=>{te()};return window.addEventListener("siteChanged",k),window.addEventListener("sectorChanged",Y),()=>{window.removeEventListener("siteChanged",k),window.removeEventListener("sectorChanged",Y)}},[te]),r.useEffect(()=>{const k=setTimeout(()=>{H===1?te():V(1)},500);return()=>clearTimeout(k)},[m,H,te]),r.useEffect(()=>{V(1)},[a]);const ue=(k,Y)=>{K(k||"name"),O(Y),V(1)},Z=r.useCallback(async(k,Y)=>{try{const oe=k.map(ae=>parseInt(ae));await gs(oe,Y),await te()}catch(oe){throw oe}},[te]),y=r.useCallback(async k=>{try{if(!k||k.length===0)throw new Error("No records selected for export");t.info("Export functionality coming soon")}catch(Y){throw Y}},[]),I=r.useCallback(async(k,Y)=>{if(k==="generate_ideas")try{const oe=await Pt([Y.id]);oe.success&&oe.task_id?re.openModal(oe.task_id,"Generating Ideas","ai-generate-ideas-01"):oe.success&&oe.ideas_created?(t.success(oe.message||"Ideas generated successfully"),await te()):t.error(oe.error||"Failed to generate ideas")}catch(oe){t.error(`Failed to generate ideas: ${oe.message}`)}},[t,re,te]),B=r.useCallback(async(k,Y)=>{if(k==="auto_generate_ideas"){if(Y.length===0){t.error("Please select at least one cluster to generate ideas");return}if(Y.length>5){t.error("Maximum 5 clusters allowed for idea generation");return}try{const oe=Y.map(we=>parseInt(we)),ae=await Pt(oe);if(ae&&ae.success===!1){const we=ae.error||"Failed to generate ideas";t.error(we);return}if(ae&&ae.success)ae.task_id?(fe.current=!1,re.openModal(ae.task_id,"Generating Content Ideas","ai-generate-ideas-01")):(t.success(`Ideas generation complete: ${ae.ideas_created||0} ideas created`),fe.current||(fe.current=!0,te()));else{const we=(ae==null?void 0:ae.error)||"Unexpected response format";t.error(we)}}catch(oe){let ae="Failed to generate ideas";oe.message&&(ae=oe.message.replace(/^API Error \(\d+\): [^-]+ - /,"").trim(),(!ae||ae===oe.message)&&(ae=oe.message)),t.error(ae)}}else t.info(`Bulk action "${k}" for ${Y.length} items`)},[t,te,re]);r.useEffect(()=>{const k=Y=>{N.current&&!N.current.contains(Y.target)&&P.current&&!P.current.contains(Y.target)&&ie(!1)};return q&&document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[q]);const ce=r.useMemo(()=>js({activeSector:s,formData:Q,setFormData:se,searchTerm:m,setSearchTerm:p,statusFilter:d,setStatusFilter:f,difficultyFilter:n,setDifficultyFilter:x,volumeMin:L,volumeMax:F,setVolumeMin:z,setVolumeMax:le,isVolumeDropdownOpen:q,setIsVolumeDropdownOpen:ie,tempVolumeMin:C,tempVolumeMax:$,setTempVolumeMin:M,setTempVolumeMax:A,volumeButtonRef:P,volumeDropdownRef:N,setCurrentPage:V,loadClusters:te}),[s,Q,m,d,n,L,F,q,C,$,te]),ve=r.useMemo(()=>ce!=null&&ce.headerMetrics?ce.headerMetrics.map(k=>({label:k.label,value:k.calculate({clusters:o,totalCount:R}),accentColor:k.accentColor})):[],[ce==null?void 0:ce.headerMetrics,o,R]),ye=r.useCallback(()=>{se({name:"",description:"",status:"active"}),w(!1),X(null)},[]),Le=async()=>{try{v&&G?(await ps(G.id,Q),t.success("Cluster updated successfully")):(await hs(Q),t.success("Cluster created successfully")),j(!1),ye(),te()}catch(k){t.error(`Failed to save: ${k.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(ot,{title:"Keyword Clusters",titleIcon:e.jsx(zt,{className:"text-success-500 size-5"}),subtitle:"Organize keywords into content clusters for better SEO strategy",columns:ce.columns,data:o,loading:g,showContent:ne,filters:ce.filters,filterValues:{search:m,status:d,difficulty:n,volumeMin:L,volumeMax:F},onFilterChange:(k,Y)=>{const oe=Y==null?"":String(Y);k==="search"?p(oe):k==="status"?f(oe):k==="difficulty"&&x(oe),V(1)},onEdit:k=>{X(k),se({name:k.name||"",description:k.description||"",status:k.status||"active"}),w(!0),j(!0)},onCreate:()=>{ye(),j(!0)},createLabel:"Create Cluster",onCreateIcon:e.jsx(Ge,{}),onDelete:async k=>{await fs(k),te()},onBulkDelete:async k=>{const Y=await ms(k);return te(),Y},onBulkExport:y,onBulkUpdateStatus:Z,onBulkAction:B,onRowAction:I,getItemDisplayName:k=>k.name,onExport:async()=>{t.info("Export functionality coming soon")},onExportIcon:e.jsx(kt,{}),selectionLabel:"cluster",pagination:{currentPage:H,totalPages:J,totalCount:R,onPageChange:V},selection:{selectedIds:h,onSelectionChange:T},sorting:{sortBy:ee,sortDirection:S,onSort:ue},headerMetrics:ve,onFilterReset:()=>{p(""),f(""),x(""),z(""),le(""),V(1)}}),e.jsx(Et,{isOpen:re.isOpen,title:re.title,percentage:re.progress.percentage,status:re.progress.status,message:re.progress.message,details:re.progress.details,taskId:re.taskId||void 0,functionId:re.functionId,onClose:()=>{re.closeModal(),re.progress.status==="completed"&&!fe.current&&(fe.current=!0,te())}}),e.jsx(It,{isOpen:de,onClose:()=>{j(!1),ye()},onSubmit:Le,title:v?"Edit Cluster":"Add Cluster",submitLabel:v?"Update":"Create",fields:ce.formFields()})]})}const kr=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"}));function sr(){const t=Je(),{activeSector:s}=Be(),{pageSize:a}=Ye(),[o,c]=r.useState([]),[g,u]=r.useState([]),[m,p]=r.useState(!0),[d,f]=r.useState(""),[n,x]=r.useState(""),[L,z]=r.useState(""),[F,le]=r.useState(""),[q,ie]=r.useState(""),[C,M]=r.useState([]),[$,A]=r.useState(1),[N,P]=r.useState(1),[h,T]=r.useState(0),[H,V]=r.useState("created_at"),[J,W]=r.useState("desc"),[R,U]=r.useState(!1),[ee,K]=r.useState(!1),[S,O]=r.useState(!1),[ne,xe]=r.useState(null),[de,j]=r.useState({idea_title:"",description:"",content_structure:"blog_post",content_type:"blog_post",target_keywords:"",keyword_cluster_id:null,status:"new",estimated_word_count:1e3}),v=Mt();r.useEffect(()=>{(async()=>{try{const I=await rt({ordering:"name"});u(I.results||[])}catch(I){console.error("Error fetching clusters:",I)}})()},[]);const w=r.useCallback(async()=>{p(!0),U(!1);try{const y=H?`${J==="desc"?"-":""}${H}`:"-created_at",I={...d&&{search:d},...n&&{status:n},...L&&{keyword_cluster_id:L},...F&&{content_structure:F},...q&&{content_type:q},page:$,page_size:a,ordering:y},B=await xs(I);c(B.results||[]),T(B.count||0),P(Math.ceil((B.count||0)/a)),setTimeout(()=>{U(!0),p(!1)},100)}catch(y){console.error("Error loading ideas:",y),t.error(`Failed to load ideas: ${y.message}`),U(!0),p(!1)}},[$,n,L,F,q,H,J,d,s,a]);r.useEffect(()=>{w()},[w]),r.useEffect(()=>{const y=()=>{w()},I=()=>{w()};return window.addEventListener("siteChanged",y),window.addEventListener("sectorChanged",I),()=>{window.removeEventListener("siteChanged",y),window.removeEventListener("sectorChanged",I)}},[w]),r.useEffect(()=>{A(1)},[a]),r.useEffect(()=>{const y=setTimeout(()=>{$===1?w():A(1)},500);return()=>clearTimeout(y)},[d,$,w]);const G=(y,I)=>{V(y||"created_at"),W(I),A(1)},X=r.useCallback(async(y,I)=>{try{const B=y.map(ce=>parseInt(ce));await ys(B,I),await w()}catch(B){throw B}},[w]),Q=r.useCallback(async y=>{try{if(!y||y.length===0)throw new Error("No records selected for export");t.info("Export functionality coming soon")}catch(I){throw I}},[]),se=r.useCallback(async(y,I)=>{if(y==="queue_to_writer"){if(I.status!=="new"){t.error(`Only ideas with status "new" can be queued. Current status: ${I.status}`);return}try{const B=await Rt([I.id]);t.success(`Queue complete: ${B.created_count||0} task created`),await w()}catch(B){t.error(`Failed to queue idea: ${B.message}`)}}},[t,w]),re=r.useCallback(async(y,I)=>{if(y==="queue_to_writer"){if(I.length===0){t.error("Please select at least one idea to queue");return}try{const B=I.map(ve=>parseInt(ve)),ce=await Rt(B);t.success(`Queue complete: ${ce.created_count||0} tasks created from ${I.length} ideas`),await w()}catch(B){t.error(`Failed to queue ideas: ${B.message}`)}}else t.info(`Bulk action "${y}" for ${I.length} items`)},[t,w]),fe=r.useMemo(()=>Is({clusters:g,activeSector:s,formData:de,setFormData:j,searchTerm:d,setSearchTerm:f,statusFilter:n,setStatusFilter:x,clusterFilter:L,setClusterFilter:z,structureFilter:F,setStructureFilter:le,typeFilter:q,setTypeFilter:ie,setCurrentPage:A}),[g,s,de,d,n,L,F,q]),te=r.useMemo(()=>fe!=null&&fe.headerMetrics?fe.headerMetrics.map(y=>({label:y.label,value:y.calculate({ideas:o,totalCount:h}),accentColor:y.accentColor})):[],[fe==null?void 0:fe.headerMetrics,o,h]),ue=r.useCallback(()=>{j({idea_title:"",description:"",content_structure:"blog_post",content_type:"blog_post",target_keywords:"",keyword_cluster_id:null,status:"new",estimated_word_count:1e3}),O(!1),xe(null)},[]),Z=async()=>{try{S&&ne?(await ks(ne.id,de),t.success("Idea updated successfully")):(await vs(de),t.success("Idea created successfully")),K(!1),ue(),w()}catch(y){t.error(`Failed to save: ${y.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(ot,{title:"Content Ideas",titleIcon:e.jsx(bt,{className:"text-warning-500 size-5"}),subtitle:"Generate and organize content ideas based on keyword research",columns:fe.columns,data:o,loading:m,showContent:R,filters:fe.filters,filterValues:{search:d,status:n,keyword_cluster_id:L,content_structure:F,content_type:q},onFilterChange:(y,I)=>{const B=I==null?"":String(I);y==="search"?f(B):y==="status"?x(B):y==="keyword_cluster_id"?z(B):y==="content_structure"?le(B):y==="content_type"&&ie(B),A(1)},onEdit:y=>{xe(y),j({idea_title:y.idea_title||"",description:y.description||"",content_structure:y.content_structure||"blog_post",content_type:y.content_type||"blog_post",target_keywords:y.target_keywords||"",keyword_cluster_id:y.keyword_cluster_id||null,status:y.status||"new",estimated_word_count:y.estimated_word_count||1e3}),O(!0),K(!0)},onCreate:()=>{ue(),K(!0)},createLabel:"Add Idea",onCreateIcon:e.jsx(Ge,{}),onDelete:async y=>{await ws(y),w()},onBulkDelete:async y=>{const I=await bs(y);return w(),I},onBulkExport:Q,onBulkUpdateStatus:X,onBulkAction:re,onRowAction:se,getItemDisplayName:y=>y.idea_title,onExport:async()=>{t.info("Export functionality coming soon")},onExportIcon:e.jsx(kt,{}),selectionLabel:"idea",pagination:{currentPage:$,totalPages:N,totalCount:h,onPageChange:A},selection:{selectedIds:C,onSelectionChange:M},sorting:{sortBy:H,sortDirection:J,onSort:G},headerMetrics:te,onFilterReset:()=>{f(""),x(""),z(""),le(""),ie(""),A(1)}}),e.jsx(Et,{isOpen:v.isOpen,title:v.title,percentage:v.progress.percentage,status:v.progress.status,message:v.progress.message,details:v.progress.details,taskId:v.taskId||void 0,functionId:v.functionId,onClose:()=>{const y=v.progress.status==="completed";v.closeModal(),y&&w()}}),e.jsx(It,{isOpen:ee,onClose:()=>{K(!1),ue()},onSubmit:Z,title:S?"Edit Idea":"Add Idea",submitLabel:S?"Update":"Create",fields:fe.formFields(g)})]})}const vr=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"}));function rr(){const t=Je(),{activeSite:s}=_t(),{activeSector:a,loadSectorsForSite:o}=Be(),{pageSize:c}=Ye(),[g,u]=r.useState([]),[m,p]=r.useState(!0),[d,f]=r.useState(!1),[n,x]=r.useState([]),L=r.useRef(new Set),[z,F]=r.useState(1),[le,q]=r.useState(1),[ie,C]=r.useState(0),[M,$]=r.useState("keyword"),[A,N]=r.useState("asc"),[P,h]=r.useState(""),[T,H]=r.useState(""),[V,J]=r.useState(""),[W,R]=r.useState(""),[U,ee]=r.useState("");r.useEffect(()=>{s!=null&&s.id&&o(s.id)},[s==null?void 0:s.id]);const K=r.useCallback(async()=>{if(!s||!s.industry){u([]),C(0),q(1),p(!1);return}p(!0),f(!1);try{let j=new Set;try{const{fetchKeywords:Z,fetchSiteSectors:y}=await Pe(async()=>{const{fetchKeywords:B,fetchSiteSectors:ce}=await import("./page-dashboard-DxYTR5eF.js").then(ve=>ve.a7);return{fetchKeywords:B,fetchSiteSectors:ce}},__vite__mapDeps([0,1,2,3,4,5,6])),I=await y(s.id);for(const B of I)try{((await Z({site_id:s.id,sector_id:B.id,page_size:1e3})).results||[]).forEach(ve=>{const ye=ve.seed_keyword_id||ve.seed_keyword&&ve.seed_keyword.id;ye&&j.add(Number(ye))})}catch(ce){console.warn(`Could not fetch attached keywords for sector ${B.id}:`,ce)}}catch(Z){console.warn("Could not fetch sectors or attached keywords:",Z)}const v={industry:s.industry,page_size:1e3};a&&a.industry_sector&&(v.sector=a.industry_sector),P&&(v.search=P),T&&(v.intent=T);let w=[],G=1,X=!0;for(;X;){const Z={...v,page:G},y=await xt(Z);if(y.results&&y.results.length>0&&(w=[...w,...y.results]),X=y.next!==null&&y.next!==void 0,G++,G>100){console.warn("Reached maximum page limit (100) while fetching seed keywords");break}}let Q=w.map(Z=>{const y=j.has(Number(Z.id))||L.current.has(Number(Z.id));return{...Z,isAdded:!!y}});if(V){const Z=parseInt(V),y=St(Z);if(y!==null){const I=jt(y);I&&(Q=Q.filter(B=>B.difficulty>=I.min&&B.difficulty<=I.max))}}W!==""&&W!==null&&W!==void 0&&(Q=Q.filter(Z=>Z.volume>=Number(W))),U!==""&&U!==null&&U!==void 0&&(Q=Q.filter(Z=>Z.volume<=Number(U))),M&&Q.sort((Z,y)=>{let I,B;if(M==="keyword")I=Z.keyword.toLowerCase(),B=y.keyword.toLowerCase();else if(M==="volume")I=Z.volume,B=y.volume;else if(M==="difficulty")I=Z.difficulty,B=y.difficulty;else if(M==="intent")I=Z.intent.toLowerCase(),B=y.intent.toLowerCase();else return 0;return IB?A==="asc"?1:-1:0});const se=Q.length,re=c||10,fe=(z-1)*re,te=fe+re,ue=Q.slice(fe,te);u(ue),C(se),q(Math.ceil(se/re)),f(!0)}catch(j){console.error("Error loading seed keywords:",j),t.error(`Failed to load keyword opportunities: ${j.message}`),u([]),C(0),q(1)}finally{p(!1)}},[s,a,z,c,P,T,V,W,U,M,A]);r.useEffect(()=>{K()},[K]),r.useEffect(()=>{const j=setTimeout(()=>{F(1)},500);return()=>clearTimeout(j)},[P]),r.useEffect(()=>{F(1)},[c]);const S=(j,v)=>{$(j||"keyword"),N(v),F(1)},O=r.useCallback(async j=>{var w;if(!s){t.error("Please select an active site first");return}let v=a;if(!v)try{const{fetchSiteSectors:G}=await Pe(async()=>{const{fetchSiteSectors:Q}=await import("./page-dashboard-DxYTR5eF.js").then(se=>se.a7);return{fetchSiteSectors:Q}},__vite__mapDeps([0,1,2,3,4,5,6])),X=await G(s.id);if(X.length===0){t.error("No sectors available for this site. Please create a sector first.");return}v={id:X[0].id,name:X[0].name,slug:X[0].slug,site_id:s.id,is_active:X[0].is_active!==!1,industry_sector:X[0].industry_sector||null}}catch(G){t.error(`Failed to get sectors: ${G.message}`);return}try{const G=await Ss(j,s.id,v.id);G.success?(t.success(`Successfully added ${G.created} keyword(s) to workflow`),j.forEach(X=>{L.current.add(X)}),x([]),u(X=>X.map(Q=>j.includes(Q.id)?{...Q,isAdded:!0}:Q))):t.error(`Failed to add keywords: ${((w=G.errors)==null?void 0:w.join(", "))||"Unknown error"}`)}catch(G){t.error(`Failed to add keywords: ${G.message}`)}},[s,a,t]),ne=r.useCallback(async j=>{if(j.length===0){t.error("Please select at least one keyword");return}const v=j.filter(G=>{const X=g.find(Q=>String(Q.id)===G);return X&&!X.isAdded});if(v.length===0){t.error("All selected keywords are already added to workflow");return}v.lengthparseInt(G));await O(w)},[O,t,g]),xe=r.useCallback(async()=>{if(!s||!s.industry){t.error("Please select an active site first");return}try{const j={industry:s.industry,page_size:1e3};a!=null&&a.industry_sector&&(j.sector=a.industry_sector);const w=(await xt(j)).results||[];if(w.length===0){t.error("No keywords available to add");return}const{fetchKeywords:G,fetchSiteSectors:X}=await Pe(async()=>{const{fetchKeywords:te,fetchSiteSectors:ue}=await import("./page-dashboard-DxYTR5eF.js").then(Z=>Z.a7);return{fetchKeywords:te,fetchSiteSectors:ue}},__vite__mapDeps([0,1,2,3,4,5,6])),Q=await X(s.id);let se=new Set;for(const te of Q)try{((await G({site_id:s.id,sector_id:te.id,page_size:1e3})).results||[]).forEach(Z=>{const y=Z.seed_keyword_id||Z.seed_keyword&&Z.seed_keyword.id;y&&se.add(Number(y))})}catch(ue){console.warn(`Could not fetch attached keywords for sector ${te.id}:`,ue)}const re=w.filter(te=>!se.has(te.id));if(re.length===0){t.error("All keywords are already added to workflow");return}re.lengthte.id);await O(fe)}catch(j){t.error(`Failed to load all keywords: ${j.message}`)}},[s,a,O,t]),de=r.useMemo(()=>({columns:[{key:"keyword",label:"Keyword",sortable:!0,sortField:"keyword"},...!a?[{key:"sector_name",label:"Sector",sortable:!1,render:(v,w)=>e.jsx(ft,{color:"info",size:"sm",variant:"light",children:w.sector_name||"-"})}]:[],{key:"volume",label:"Volume",sortable:!0,sortField:"volume",render:v=>v.toLocaleString()},{key:"difficulty",label:"Difficulty",sortable:!0,sortField:"difficulty",align:"center",render:v=>{const w=Ns(v),G=typeof w=="number"&&w===5?"solid":typeof w=="number"&&(w===2||w===3||w===4)?"light":typeof w=="number"&&w===1?"solid":"light",X=typeof w=="number"&&w===1||typeof w=="number"&&w===2?"success":typeof w=="number"&&w===3?"warning":typeof w=="number"&&w===4||typeof w=="number"&&w===5?"error":"light";return typeof w=="number"?e.jsx(ft,{color:X,variant:G,size:"sm",children:w}):w}},{key:"intent",label:"Intent",sortable:!0,sortField:"intent",render:v=>{const w=G=>{const X=(G==null?void 0:G.toLowerCase())||"";return X==="transactional"||X==="commercial"?"success":X==="navigational"?"warning":"info"};return e.jsx(ft,{color:w(v),size:"sm",variant:(v==null?void 0:v.toLowerCase())==="informational"?"light":void 0,children:v})}}],filters:[{key:"search",label:"Search",type:"text",placeholder:"Search keywords..."},{key:"intent",label:"Intent",type:"select",options:[{value:"",label:"All Intent"},{value:"informational",label:"Informational"},{value:"navigational",label:"Navigational"},{value:"transactional",label:"Transactional"},{value:"commercial",label:"Commercial"}]},{key:"difficulty",label:"Difficulty",type:"select",options:[{value:"",label:"All Difficulty"},{value:"1",label:"1 - Very Easy"},{value:"2",label:"2 - Easy"},{value:"3",label:"3 - Medium"},{value:"4",label:"4 - Hard"},{value:"5",label:"5 - Very Hard"}]}]}),[a]);return e.jsx(e.Fragment,{children:e.jsx(ot,{title:"Keyword Opportunities",titleIcon:e.jsx(bt,{className:"text-brand-500 size-5"}),subtitle:"Discover and add keywords to your workflow",columns:de.columns,data:g,loading:m,showContent:d,filters:de.filters,filterValues:{search:P,intent:T,difficulty:V},onFilterChange:(j,v)=>{const w=v==null?"":String(v);j==="search"?h(w):j==="intent"?(H(w),F(1)):j==="difficulty"&&(J(w),F(1))},onRowAction:async(j,v)=>{if(j==="add_to_workflow"){if(v.isAdded){t.info("This keyword is already added to workflow");return}await O([v.id])}},onBulkAction:async(j,v)=>{j==="add_selected_to_workflow"&&await ne(v)},onCreate:xe,createLabel:"Add All to Workflow",onCreateIcon:e.jsx(Ge,{}),pagination:{currentPage:z,totalPages:le,totalCount:ie,onPageChange:F},sorting:{sortBy:M,sortDirection:A,onSort:S},selection:{selectedIds:n,onSelectionChange:x}})})}const Sr=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"}));export{kr as C,br as D,It as F,yr as H,vr as I,wr as K,ze as P,nt as S,ot as T,Ye as a,Mt as b,Et as c,As as d,_t as e,Sr as f,Be as u}; diff --git a/frontend/dist/assets/js/pages-planner-COGkFLJh.js b/frontend/dist/assets/js/pages-planner-COGkFLJh.js deleted file mode 100644 index 90b1a44b..00000000 --- a/frontend/dist/assets/js/pages-planner-COGkFLJh.js +++ /dev/null @@ -1,3 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/page-dashboard-DxYTR5eF.js","assets/js/vendor-react-core-DjsjKnCi.js","assets/js/vendor-other-CdRIx1s3.js","assets/css/vendor-other-BsM4JrO0.css","assets/js/page-analytics.tsx-1KCk8AGD.js","assets/js/vendor-helmet-MZDArkdS.js","assets/js/vendor-state-CYwAWrAU.js"])))=>i.map(i=>d[i]); -import{r,j as e,R as je}from"./vendor-react-core-DjsjKnCi.js";import{u as Vt,L as Ae,a as Ut}from"./vendor-react-router-BJY_70Cr.js";import{P as Ht,C as Ke}from"./page-analytics.tsx-1KCk8AGD.js";import{f as Ft,g as Rt,b as pt,h as qt,S as Wt,i as Gt,c as Jt,j as xt,k as Pt,B as ye,L as et,l as Qt,m as Yt,n as Xt,I as Zt,C as At,o as Ve,p as es,q as ts,a as yt}from"./page-authpages-CY7hjDHU.js";import{g as Tt,_ as Me,h as ss,i as rs,A as bt,j as as,k as ns,l as os,m as ls,n as is,a as ft,o as tt,u as cs,p as ds,q as us,r as Lt,s as ms,t as gs,v as fs,w as hs,x as ps,y as xs,z as Ot,B as ys,C as bs,D as ws,E as vs,F as ks}from"./page-dashboard-DxYTR5eF.js";import{e as wt,h as vt,j as js,B as ut,g as Ss}from"./page-clusters.config.tsx-9GAd-_h-.js";import{u as Ue}from"./page-reference-aC0iABvU.js";import{M as He,D as ht,a as st,A as Ns}from"./page-components.tsx-DYfg5dka.js";import{c as Cs}from"./page-keywords.config.tsx-CxJn1kF1.js";import{c as _s}from"./page-ideas.config.tsx-Cr6kWRFa.js";import{g as Is}from"./page-delete-modal.config.ts-B7nUJ-QI.js";import{g as Es}from"./page-bulk-action-modal.config.ts-D-0XtKwF.js";import{g as Ms}from"./page-table-actions.config.tsx-BSR5Zo7l.js";import{c as kt,p as jt}from"./vendor-state-CYwAWrAU.js";const zt=r.createContext(void 0),$s=()=>{const t=r.useContext(zt);if(!t)throw new Error("useHeaderMetrics must be used within a HeaderMetricsProvider");return t},pr=({children:t})=>{const[s,a]=r.useState([]),l=()=>{a([])};return e.jsx(zt.Provider,{value:{metrics:s,setMetrics:a,clearMetrics:l},children:t})},St=kt()(jt((t,s)=>({activeSite:null,loading:!1,error:null,setActiveSite:a=>{if(t({activeSite:a,error:null}),typeof window<"u")try{const l=s();localStorage.setItem("site-storage",JSON.stringify({state:{activeSite:a},version:0}))}catch(l){console.warn("Failed to persist site to localStorage:",l)}window.dispatchEvent(new CustomEvent("siteChanged",{detail:{siteId:a==null?void 0:a.id}})),a&&typeof window<"u"&&Me(async()=>{const{useSectorStore:l}=await Promise.resolve().then(()=>As);return{useSectorStore:l}},void 0).then(({useSectorStore:l})=>{l.getState().loadSectorsForSite(a.id)}).catch(()=>{})},loadActiveSite:async()=>{t({loading:!0,error:null});try{const l=(await Tt()).results||[],c=l.filter(d=>d.is_active),f=s().activeSite;let m=null;if(f){const d=l.find(h=>h.id===f.id);d&&d.is_active?m=d:(d&&d.is_active,m=c.length>0?c[0]:null)}else c.length>0&&(m=c[0]);if(t({activeSite:m,loading:!1}),m&&typeof window<"u")try{localStorage.setItem("site-storage",JSON.stringify({state:{activeSite:m},version:0}))}catch(d){console.warn("Failed to persist site to localStorage:",d)}}catch(a){t({error:a.message||"Failed to load active site",loading:!1})}},refreshActiveSite:async()=>{const a=s().activeSite;if(!a){await s().loadActiveSite();return}t({loading:!0,error:null});try{const c=((await Tt()).results||[]).find(f=>f.id===a.id);c&&c.is_active?t({activeSite:c,loading:!1}):await s().loadActiveSite()}catch(l){t({error:l.message||"Failed to refresh active site",loading:!1})}}}),{name:"site-storage",partialize:t=>({activeSite:t.activeSite})})),Oe=kt()(jt((t,s)=>({activeSector:null,sectors:[],loading:!1,error:null,setActiveSector:a=>{if(t({activeSector:a,error:null}),typeof window<"u")try{const l=s();localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:a},version:0}))}catch(l){console.warn("Failed to persist sector to localStorage:",l)}window.dispatchEvent(new CustomEvent("sectorChanged",{detail:{sectorId:a==null?void 0:a.id,siteId:a==null?void 0:a.site_id}}))},loadSectorsForSite:async a=>{t({loading:!0,error:null});try{if(!a)return t({sectors:[],loading:!1}),[];const c=(await ss(a)).map(m=>({id:m.id,name:m.name,slug:m.slug,site_id:a,is_active:m.is_active!==!1,industry_sector:m.industry_sector||null}));t({sectors:c,loading:!1});const f=s().activeSector;if(f&&f.site_id!==a){if(t({activeSector:null}),typeof window<"u")try{localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:null},version:0}))}catch(m){console.warn("Failed to persist sector to localStorage:",m)}window.dispatchEvent(new CustomEvent("sectorChanged",{detail:{sectorId:null,siteId:a}}))}else if(f&&f.site_id===a&&!c.find(d=>d.id===f.id)){if(t({activeSector:null}),typeof window<"u")try{localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:null},version:0}))}catch(d){console.warn("Failed to persist sector to localStorage:",d)}window.dispatchEvent(new CustomEvent("sectorChanged",{detail:{sectorId:null,siteId:a}}))}return c}catch(l){return l.status===403||l.status===404?(console.warn(`Cannot load sectors for site ${a}: site may be inactive or inaccessible`),t({sectors:[],activeSector:null,loading:!1,error:null}),[]):(t({error:l.message||"Failed to load sectors",loading:!1}),[])}},clearActiveSector:()=>{if(t({activeSector:null,sectors:[],error:null}),typeof window<"u")try{localStorage.setItem("sector-storage",JSON.stringify({state:{activeSector:null},version:0}))}catch(a){console.warn("Failed to persist sector to localStorage:",a)}}}),{name:"sector-storage",partialize:t=>({activeSector:t.activeSector})})),As=Object.freeze(Object.defineProperty({__proto__:null,useSectorStore:Oe},Symbol.toStringTag,{value:"Module"})),Le=({value:t,color:s="primary",size:a="md",showLabel:l=!1,label:c,className:f=""})=>{const m={sm:"h-1",md:"h-2",lg:"h-3"},d={primary:"bg-brand-500",success:"bg-success-500",error:"bg-error-500",warning:"bg-warning-500",info:"bg-blue-light-500"},h=Math.min(100,Math.max(0,t));return e.jsxs("div",{className:f,children:[l&&e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:c||`${h}%`}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[h,"%"]})]}),e.jsx("div",{className:`w-full rounded-full bg-gray-200 dark:bg-gray-700 ${m[a]}`,children:e.jsx("div",{className:`rounded-full transition-all duration-300 ${m[a]} ${d[s]}`,style:{width:`${h}%`}})})]})};function Ts(){const t=Vt(),s={keywords:245,clusters:18,ideas:52,mappedKeywords:180,clustersWithIdeas:12,queuedIdeas:35},a=Math.round(s.mappedKeywords/s.keywords*100),l=Math.round(s.clustersWithIdeas/s.clusters*100),c=Math.round(s.queuedIdeas/s.ideas*100),f=[{number:1,title:"Add Keywords",status:"completed",count:s.keywords,path:"/planner/keywords"},{number:2,title:"Select Sector",status:"completed",count:null,path:"/planner"},{number:3,title:"Auto Cluster",status:"pending",count:s.clusters,path:"/planner/clusters"},{number:4,title:"Generate Ideas",status:"pending",count:s.ideas,path:"/planner/ideas"}],m=[{name:"SEO Optimization",volume:45800,keywords:24},{name:"Content Marketing",volume:32100,keywords:18},{name:"Link Building",volume:28700,keywords:15},{name:"Keyword Research",volume:24100,keywords:12},{name:"Analytics",volume:18900,keywords:9}],d=[{status:"New",count:20,color:"blue"},{status:"Scheduled",count:15,color:"amber"},{status:"Published",count:17,color:"green"}],h=[{text:"65 keywords unmapped",action:"Map Keywords",path:"/planner/keywords"},{text:"6 clusters without ideas",action:"Generate Ideas",path:"/planner/ideas"},{text:"17 ideas not queued to writer",action:"Queue to Writer",path:"/writer/tasks"}];return e.jsxs(e.Fragment,{children:[e.jsx(Ht,{title:"Planner Dashboard - IGNY8",description:"Content planning overview"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4 md:gap-6",children:[e.jsxs(Ae,{to:"/planner/keywords",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-brand-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Keywords Ready"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.keywords.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Research, analyze, and manage keywords strategy"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-blue-50 rounded-xl dark:bg-blue-500/10 group-hover:bg-blue-100 dark:group-hover:bg-blue-500/20 transition-colors",children:e.jsx(Ft,{className:"text-brand-500 size-6"})})]})]}),e.jsxs(Ae,{to:"/planner/clusters",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-success-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Clusters Built"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.clusters.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Organize keywords into strategic topical clusters"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-green-50 rounded-xl dark:bg-green-500/10 group-hover:bg-green-100 dark:group-hover:bg-green-500/20 transition-colors",children:e.jsx(Rt,{className:"text-success-500 size-6"})})]})]}),e.jsxs(Ae,{to:"/planner/ideas",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-warning-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Ideas Generated"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.ideas.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Generate creative content ideas based on semantic strategy"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-amber-50 rounded-xl dark:bg-amber-500/10 group-hover:bg-amber-100 dark:group-hover:bg-amber-500/20 transition-colors",children:e.jsx(pt,{className:"text-warning-500 size-6"})})]})]}),e.jsxs(Ae,{to:"/planner/keywords",className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6 hover:shadow-md transition-shadow cursor-pointer group relative overflow-hidden",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 bg-purple-500"}),e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Mapped Keywords"}),e.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:s.mappedKeywords.toLocaleString()}),e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Keywords successfully mapped to content pages"})]}),e.jsx("div",{className:"flex items-center justify-center w-12 h-12 bg-purple-50 rounded-xl dark:bg-purple-500/10 group-hover:bg-purple-100 dark:group-hover:bg-purple-500/20 transition-colors",children:e.jsx(qt,{className:"text-purple-500 size-6"})})]})]})]}),e.jsx(Ke,{title:"Planner Workflow Steps",desc:"Track your planning progress",children:e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:f.map(u=>e.jsxs(Ae,{to:u.path,className:"rounded-xl border border-gray-200 bg-gray-50 p-4 dark:border-gray-800 dark:bg-gray-900/50 hover:border-brand-300 hover:bg-brand-50 dark:hover:bg-brand-500/10 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 bg-white border-2 border-gray-300 rounded-full text-sm font-semibold text-gray-600 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400",children:u.number}),e.jsx("h4",{className:"font-medium text-gray-800 dark:text-white/90",children:u.title})]}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("div",{className:"flex items-center gap-1.5",children:u.status==="completed"?e.jsxs(e.Fragment,{children:[e.jsx(Wt,{className:"size-4 text-success-500"}),e.jsx("span",{className:"text-gray-600 dark:text-gray-300 font-medium",children:"Completed"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Gt,{className:"size-4 text-amber-500"}),e.jsx("span",{className:"text-gray-600 dark:text-gray-300 font-medium",children:"Pending"})]})})}),u.count!==null&&e.jsxs("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:[u.count," ",u.title.includes("Keywords")?"keywords":u.title.includes("Clusters")?"clusters":"ideas"," ",u.status==="completed"?"added":""]}),u.status==="pending"&&e.jsx("button",{type:"button",onClick:g=>{g.preventDefault(),g.stopPropagation(),t(u.path)},className:"mt-3 inline-block text-xs font-medium text-brand-500 hover:text-brand-600 cursor-pointer",children:"Start Now →"})]},u.number))})}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[e.jsx(Ke,{title:"Progress & Readiness Summary",desc:"Planning workflow progress tracking",className:"lg:col-span-1",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Keyword Mapping"}),e.jsxs("span",{className:"text-sm font-semibold text-gray-800 dark:text-white/90",children:[a,"%"]})]}),e.jsx(Le,{value:a,color:"primary",size:"md"}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[s.mappedKeywords," of ",s.keywords," keywords mapped"]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Clusters With Ideas"}),e.jsxs("span",{className:"text-sm font-semibold text-gray-800 dark:text-white/90",children:[l,"%"]})]}),e.jsx(Le,{value:l,color:"success",size:"md"}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[s.clustersWithIdeas," of ",s.clusters," clusters have ideas"]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Ideas Queued to Writer"}),e.jsxs("span",{className:"text-sm font-semibold text-gray-800 dark:text-white/90",children:[c,"%"]})]}),e.jsx(Le,{value:c,color:"warning",size:"md"}),e.jsxs("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[s.queuedIdeas," of ",s.ideas," ideas queued"]})]})]})}),e.jsx(Ke,{title:"Top 5 Clusters by Volume",desc:"Highest volume keyword clusters",className:"lg:col-span-1",children:e.jsx("div",{className:"space-y-4",children:m.map((u,g)=>{const n=m[0].volume,j=Math.round(u.volume/n*100);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-white/90",children:u.name}),e.jsx("span",{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:u.volume.toLocaleString()})]}),e.jsx(Le,{value:j,color:g%2===0?"primary":"success",size:"sm"})]},g)})})}),e.jsx(Ke,{title:"Ideas by Status",desc:"Content ideas workflow status",className:"lg:col-span-1",children:e.jsx("div",{className:"space-y-4",children:d.map((u,g)=>{const n=d.reduce((O,P)=>O+P.count,0),j=Math.round(u.count/n*100);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-sm font-medium text-gray-800 dark:text-white/90",children:u.status}),e.jsx("span",{className:"text-sm font-semibold text-gray-600 dark:text-gray-400",children:u.count})]}),e.jsx(Le,{value:j,color:u.color==="blue"?"primary":u.color==="amber"?"warning":"success",size:"sm"})]},g)})})})]}),e.jsx(Ke,{title:"Next Actions",desc:"Actionable items requiring attention",children:e.jsx("div",{className:"space-y-3",children:h.map((u,g)=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-gray-50 dark:bg-gray-900/50 border border-gray-200 dark:border-gray-800",children:[e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:u.text}),e.jsxs(Ae,{to:u.path,className:"inline-flex items-center gap-1 text-sm font-medium text-brand-500 hover:text-brand-600",children:[u.action,e.jsx(Jt,{className:"size-4"})]})]},g))})})]})]})}const xr=Object.freeze(Object.defineProperty({__proto__:null,default:Ts},Symbol.toStringTag,{value:"Module"})),Ls=({children:t,className:s})=>e.jsx("table",{className:`min-w-full w-full ${s}`,children:t}),Os=({children:t,className:s})=>e.jsx("thead",{className:s,children:t}),Fs=({children:t,className:s})=>e.jsx("tbody",{className:s,children:t}),mt=({children:t,className:s})=>e.jsx("tr",{className:s,children:t}),Te=({children:t,isHeader:s=!1,className:a})=>{const l=s?"th":"td";return e.jsx(l,{className:` ${a}`,children:t})},rt=({options:t,placeholder:s="Select an option",onChange:a,className:l="",defaultValue:c="",value:f,disabled:m=!1})=>{const d=f!==void 0,[h,u]=r.useState(!1),[g,n]=r.useState(c),j=d?f||"":g,O=r.useRef(null),P=r.useRef(null);r.useEffect(()=>{d||n(c)},[c,d]);const F=String(j||""),ne=t.find(E=>String(E.value||"")===F),b=ne?ne.label:s,q=!ne;r.useEffect(()=>{const E=A=>{O.current&&!O.current.contains(A.target)&&P.current&&!P.current.contains(A.target)&&u(!1)};if(h)return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[h]);const D=E=>{const A=E==null?"":String(E);d||n(A),a(A),u(!1)},C=E=>{E.key==="Escape"?u(!1):(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),u(!h))};return e.jsxs("div",{className:`relative ${l}`,children:[e.jsxs("button",{ref:P,type:"button",onClick:()=>!m&&u(!h),disabled:m,onKeyDown:C,className:`igny8-select-styled h-9 w-full appearance-none rounded-lg border border-gray-300 bg-transparent px-3 py-2 pr-10 text-sm shadow-theme-xs focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:focus:border-brand-800 ${q?"text-gray-400 dark:text-gray-400":"text-gray-800 dark:text-white/90"} ${h?"border-brand-300 ring-3 ring-brand-500/10 dark:border-brand-800":""} ${m?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("span",{className:"block text-left truncate",children:b}),e.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",children:e.jsx(xt,{className:`h-4 w-4 text-gray-400 transition-transform ${h?"transform rotate-180":""}`})})]}),h&&e.jsx("div",{ref:O,className:"absolute z-50 left-0 right-0 mt-1 rounded-lg border border-gray-200 bg-white shadow-theme-lg dark:border-gray-800 dark:bg-gray-dark overflow-hidden max-h-60 overflow-y-auto",children:e.jsx("div",{className:"py-1",children:t.map(E=>{const A=String(E.value||""),S=String(j||"")===A;return e.jsxs("button",{type:"button",onClick:T=>{T.preventDefault(),T.stopPropagation(),D(A)},className:`w-full text-left px-3 py-2 text-sm transition-colors flex items-center gap-2 ${S?"bg-brand-500 text-white":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800"}`,children:[E.icon&&e.jsx("span",{className:"flex-shrink-0",children:E.icon}),e.jsx("span",{children:E.label})]},`option-${E.value||"empty"}-${E.label}`)})})})]})};function Rs({isOpen:t,onClose:s,onConfirm:a,title:l,message:c,confirmText:f="Export",isLoading:m=!1}){return e.jsx(He,{isOpen:t,onClose:s,className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-50 rounded-xl dark:bg-blue-500/10",children:e.jsx(Pt,{className:"w-5 h-5 text-blue-500"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-white",children:l})]}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:c}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(ye,{variant:"outline",onClick:s,disabled:m,children:"Cancel"}),e.jsx(ye,{variant:"primary",onClick:a,disabled:m,children:m?"Exporting...":f})]})]})})}function Ps({isOpen:t,onClose:s,onConfirm:a,title:l,message:c,confirmText:f="Update Status",statusOptions:m,isLoading:d=!1}){const[h,u]=r.useState(""),g=async()=>{h&&(await a(h),u(""))},n=()=>{u(""),s()};return e.jsx(He,{isOpen:t,onClose:n,className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-50 rounded-xl dark:bg-blue-500/10",children:e.jsx(Pt,{className:"w-5 h-5 text-blue-500"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-800 dark:text-white",children:l})]}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:c}),e.jsxs("div",{className:"mb-6",children:[e.jsx(et,{className:"mb-2",children:"New Status"}),e.jsx(rt,{options:m,placeholder:"Select status",value:h,onChange:j=>u(j||""),className:"w-full"})]}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(ye,{variant:"outline",onClick:n,disabled:d,children:"Cancel"}),e.jsx(ye,{variant:"primary",onClick:g,disabled:d||!h,children:d?"Updating...":f})]})]})})}const zs=({currentPage:t,totalPages:s,pageSize:a,onPageChange:l,onPageSizeChange:c,className:f=""})=>{const d=(()=>{const g=[];if(s<=7)for(let n=1;n<=s;n++)g.push(n);else if(t<=3){for(let n=1;n<=5;n++)g.push(n);g.push("..."),g.push(s)}else if(t>=s-2){g.push(1),g.push("...");for(let n=s-4;n<=s;n++)g.push(n)}else{g.push(1),g.push("...");for(let n=t-1;n<=t+1;n++)g.push(n);g.push("..."),g.push(s)}return g})(),h=t===1,u=t===s;return e.jsxs("div",{className:`flex items-center gap-3 ${f}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap",children:"Show:"}),e.jsxs("select",{id:"page-size",value:a,onChange:g=>c(Number(g.target.value)),className:"h-8 px-2 text-sm rounded-lg border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-brand-500 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700",children:[e.jsx("option",{value:10,children:"10"}),e.jsx("option",{value:20,children:"20"}),e.jsx("option",{value:50,children:"50"})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 whitespace-nowrap",children:"per page"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>!h&&l(t-1),disabled:h,type:"button",className:"flex items-center justify-center w-7 h-7 rounded-lg border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200 transition-colors","aria-label":"Previous page",children:e.jsx(Qt,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex items-center gap-0.5",children:d.map((g,n)=>{if(g==="...")return e.jsx("span",{className:"flex items-center justify-center w-7 h-7 text-xs font-medium text-gray-700 dark:text-gray-400",children:"..."},`ellipsis-${n}`);const j=g,O=j===t;return e.jsx("button",{className:`flex items-center justify-center w-7 h-7 text-xs font-medium rounded-lg transition-colors ${O?"text-white bg-brand-500 hover:bg-brand-600 shadow-sm":"text-gray-700 hover:bg-brand-500 hover:text-white dark:text-gray-400 dark:hover:text-white dark:hover:bg-brand-500"}`,onClick:()=>l(j),type:"button","aria-label":`Go to page ${j}`,"aria-current":O?"page":void 0,children:j},j)})}),e.jsx("button",{onClick:()=>!u&&l(t+1),disabled:u,type:"button",className:"flex items-center justify-center w-7 h-7 rounded-lg border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200 transition-colors","aria-label":"Next page",children:e.jsx(Yt,{className:"w-4 h-4"})})]})]})};function Ds(){const{activeSite:t}=St(),{activeSector:s,sectors:a,setActiveSector:l,loading:c}=Oe(),[f,m]=r.useState(!1),d=r.useRef(null);if(!t)return null;if(!c&&a.length===0)return e.jsx("div",{className:"flex items-center gap-2 px-3 py-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsx("span",{children:"No sectors available"})});const h=u=>{if(u===null)l(null),m(!1);else{const g=a.find(n=>n.id===u);g&&(l(g),m(!1))}};return e.jsxs("div",{className:"relative inline-block",children:[e.jsxs("button",{ref:d,onClick:()=>m(!f),className:"flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 dark:hover:bg-gray-700 dropdown-toggle","aria-label":"Select sector",disabled:c||a.length===0,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),e.jsx("span",{className:"max-w-[150px] truncate",children:c?"Loading...":(s==null?void 0:s.name)||"All Sectors"})]}),e.jsx("svg",{className:`w-4 h-4 transition-transform ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e.jsxs(ht,{isOpen:f,onClose:()=>m(!1),anchorRef:d,placement:"bottom-right",className:"w-64 p-2 overflow-y-auto max-h-[300px]",children:[e.jsxs(st,{onItemClick:()=>h(null),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${s?"text-gray-700 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300":"bg-blue-50 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300"}`,children:[e.jsx("span",{className:"flex-1",children:"All Sectors"}),!s&&e.jsx("svg",{className:"w-4 h-4 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]}),a.map(u=>e.jsxs(st,{onItemClick:()=>h(u.id),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${(s==null?void 0:s.id)===u.id?"bg-blue-50 text-blue-700 dark:bg-blue-500/20 dark:text-blue-300":"text-gray-700 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("span",{className:"flex-1",children:u.name}),(s==null?void 0:s.id)===u.id&&e.jsx("svg",{className:"w-4 h-4 text-blue-600 dark:text-blue-400",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},u.id))]})]})}const qe=kt()(jt(t=>({pageSize:10,setPageSize:s=>t({pageSize:s})}),{name:"igny8-page-size"}));function Bs(t){if(!t)return"";const s=document.createElement("div");return s.innerHTML=t,s.querySelectorAll("script").forEach(c=>c.remove()),s.querySelectorAll("*").forEach(c=>{const f=c.attributes;for(let m=f.length-1;m>=0;m--){const d=f[m];d.name.startsWith("on")&&c.removeAttribute(d.name),(d.name==="href"||d.name==="src")&&d.value.startsWith("javascript:")&&c.removeAttribute(d.name)}}),s.innerHTML}function Ks(t){return t?/<[a-z][\s\S]*>/i.test(t):!1}function gt(t){if(!t)return"";let s='
';return t.introduction&&(s+='
',typeof t.introduction=="string"?s+=`
${ce(t.introduction)}
`:typeof t.introduction=="object"&&(t.introduction.hook&&(s+=`
Hook: ${ce(t.introduction.hook)}
`),t.introduction.paragraphs&&Array.isArray(t.introduction.paragraphs)&&t.introduction.paragraphs.forEach((a,l)=>{a.details&&(s+=`
Intro Paragraph ${l+1}: ${ce(a.details)}
`)})),s+="
"),t.sections&&Array.isArray(t.sections)&&t.sections.forEach(a=>{if(a){if(s+='
',a.title){const l=a.title.replace(/^H2:\s*/i,"").trim();l.toLowerCase()==="conclusion"?s+=`

${ce(l)}

`:s+=`

${ce(l)}

`}a.content&&(Array.isArray(a.content)?a.content.forEach(l=>{if(l.title){const c=l.title.replace(/^H3:\s*/i,"").trim();s+=`

${ce(c)}

`}l.content&&(s+=`
${ce(String(l.content))}
`)}):typeof a.content=="string"&&(s+=`
${ce(a.content)}
`)),s+="
"}}),t.H2&&(Array.isArray(t.H2)?t.H2.forEach(a=>{if(a.heading||typeof a=="string"){s+='
';const l=a.heading||a;s+=`

${ce(l)}

`,a.content_type&&(s+=`
${ce(a.content_type.replace("_"," ").toUpperCase())}
`),a.subsections&&Array.isArray(a.subsections)&&a.subsections.forEach(c=>{const f=c.subheading||c.heading||c;s+=`

${ce(f)}

`,c.details&&(s+=`
${ce(c.details)}
`)}),a.details&&(s+=`
${ce(a.details)}
`),s+="
"}}):typeof t.H2=="string"?(s+='
',s+=`

${ce(t.H2)}

`,s+="
"):typeof t.H2=="object"&&Object.entries(t.H2).forEach(([a,l])=>{s+='
',s+=`

${ce(l)}

`,s+="
"})),t.H3&&!t.H2&&(s+='
',typeof t.H3=="string"?s+=`

${ce(t.H3)}

`:typeof t.H3=="object"&&Object.entries(t.H3).forEach(([a,l])=>{s+=`

${ce(l)}

`}),s+="
"),s+="
",s}function ce(t){const s=document.createElement("div");return s.textContent=t,s.innerHTML}const Vs=({content:t,className:s="",maxHeight:a})=>{const l=r.useMemo(()=>{if(!t)return'
No content available
';if(typeof t=="object"&&t!==null){if(t.H2||t.H3||t.introduction||t.sections)return gt(t);try{return Object.keys(t).length>0?gt(t):ce(JSON.stringify(t,null,2))}catch{return ce(JSON.stringify(t,null,2))}}if(typeof t=="string"){try{const d=JSON.parse(t);if(typeof d=="object"&&(d.H2||d.H3||d.introduction||d.sections))return gt(d)}catch{}if(Ks(t)){const d=Bs(t);return d.trim().startsWith("${d}`:`
${d}
`}const c=t.split(` -`);let f='
',m=!1;for(const d of c){const h=d.trim();if(!h){m&&(f+="",m=!1),f+="
";continue}if(h.match(/^[-*]\s+/)){m||(f+='
    ',m=!0);const u=h.replace(/^[-*]\s+/,"");h.startsWith(" ")||h.startsWith(" ")?f+=`
  • ${ce(u)}
  • `:f+=`
  • ${ce(u)}
  • `}else if(h.match(/^[-*]\s*H2[:]/i)){m&&(f+="
",m=!1);const u=h.replace(/^[-*]\s*H2[:]\s*/i,"");f+=`

${ce(u)}

`}else if(h.match(/^[-*]\s*H3[:]/i)){m&&(f+="",m=!1);const u=h.replace(/^[-*]\s*H3[:]\s*/i,"");f+=`

${ce(u)}

`}else m&&(f+="",m=!1),f+=`

${ce(h)}

`}return m&&(f+=""),f+="
",f}return ce(String(t))},[t]);return e.jsx("div",{className:`html-content-renderer ${s}`,style:a?{maxHeight:a,overflow:"auto"}:void 0,dangerouslySetInnerHTML:{__html:l}})},Us=({row:t,contentKey:s,contentLabel:a="Content",colSpan:l,isExpanded:c,defaultExpanded:f=!1,onToggle:m,className:d=""})=>{const[h,u]=r.useState(f),g=c!==void 0?c:h,[n,j]=r.useState("auto"),O=r.useRef(null);let P=t[s];(!P||typeof P=="string"&&P.trim().length===0)&&(P=t.description||t.content_outline||null);const F=P&&(typeof P=="string"?P.trim().length>0:typeof P=="object"&&P!==null&&Object.keys(P).length>0);return r.useEffect(()=>{if(g&&O.current){const ne=O.current.scrollHeight;j(ne)}else j(0)},[g,P]),!F||!g?null:e.jsx("tr",{className:`toggle-content-row expanded ${d}`,"aria-hidden":!1,children:e.jsx("td",{colSpan:l,className:"px-5 py-0 bg-gray-50 dark:bg-gray-800/50 border-b border-gray-200 dark:border-white/[0.05]",children:e.jsx("div",{ref:O,className:"overflow-hidden",children:e.jsxs("div",{className:"py-4 px-2",children:[e.jsx("div",{className:"mb-2 text-xs font-semibold uppercase text-gray-500 dark:text-gray-400 tracking-wide",children:a}),e.jsx("div",{className:"html-content-wrapper",children:e.jsx(Vs,{content:P,className:"text-sm text-gray-700 dark:text-gray-300 leading-relaxed"})})]})})})})},Hs=({isExpanded:t,onClick:s,hasContent:a,className:l=""})=>a?e.jsx("button",{type:"button",onClick:s,className:`inline-flex items-center justify-center w-8 h-8 rounded-lg transition-all duration-200 ${t?"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20":"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"} ${l}`,"aria-label":t?"Collapse content":"Expand content","aria-expanded":t,children:e.jsx(xt,{className:`w-4 h-4 transition-transform duration-200 ${t?"rotate-180":""}`})}):e.jsx("span",{className:`inline-flex items-center justify-center w-8 h-8 text-gray-300 dark:text-gray-600 ${l}`,children:e.jsx(Xt,{className:"w-4 h-4"})});function at({title:t,titleIcon:s,subtitle:a,columns:l,data:c,loading:f=!1,showContent:m=!0,filters:d=[],filterValues:h={},onFilterChange:u,onFilterReset:g,renderFilters:n,onEdit:j,onCreate:O,createLabel:P="+ Add",onCreateIcon:F,onExportCSV:ne,onExportIcon:b,onImport:q,onImportIcon:D,headerMetrics:C=[],selectionLabel:E="items",pagination:A,selection:i,sorting:S,onDelete:T,onBulkDelete:Z,onBulkExport:M,onBulkUpdateStatus:K,onBulkAction:Q,onRowAction:Y,onExport:L,getItemDisplayName:R=re=>re.name||re.keyword||re.title||String(re.id),className:X=""}){const re=Ut(),[ie,oe]=r.useState(!1),[be,we]=r.useState(new Map),ge=je.useRef(new Map),N=je.useRef(null),w=Is(re.pathname),x=Es(re.pathname),V=Ms(re.pathname),W=(V==null?void 0:V.rowActions)||[],H=(V==null?void 0:V.bulkActions)||[],[ee,te]=r.useState((i==null?void 0:i.selectedIds)||[]),[G,fe]=r.useState(new Set),[le,J]=r.useState({isOpen:!1,items:[],isBulk:!1,isLoading:!1}),[p,_]=r.useState({isOpen:!1,itemCount:0,isLoading:!1}),[I,me]=r.useState({isOpen:!1,itemCount:0,isLoading:!1}),{setMetrics:he}=$s(),ue=Ue(),{pageSize:$,setPageSize:z}=qe(),se=i!=null&&i.selectedIds?JSON.stringify(i.selectedIds):"";r.useEffect(()=>{i!=null&&i.selectedIds&&te(i.selectedIds)},[se]);const ae=o=>{!T||!w||J({isOpen:!0,items:[o],isBulk:!1,isLoading:!1})},Ne=o=>{if(!Z||!w)return;const y=c.filter(k=>o.includes(String(k.id)));J({isOpen:!0,items:y,isBulk:!0,isLoading:!1})},Ie=async()=>{if(!(le.items.length===0||!w)){J(o=>({...o,isLoading:!0}));try{if(le.isBulk){if(Z){const o=le.items.map(U=>U.id),y=await Z(o),k=(y==null?void 0:y.deleted_count)||le.items.length;ue.success(`${k} ${w.itemNamePlural} deleted successfully`)}}else T&&(await T(le.items[0].id),ue.success(`${w.itemNameSingular.charAt(0).toUpperCase()+w.itemNameSingular.slice(1)} deleted successfully`));J({isOpen:!1,items:[],isBulk:!1,isLoading:!1}),i&&i.onSelectionChange([])}catch(o){ue.error(`Failed to delete: ${o.message}`),J(y=>({...y,isLoading:!1}))}}},We=async(o,y)=>{var k;we(U=>{const de=new Map(U);return de.set(y.id||y,!1),de}),o==="edit"&&j?j(y):o==="delete"&&T&&w?ae(y):o==="export"&&L?await L(y):Y?Y(o,y).catch(U=>{ue.error(`Action failed: ${U.message}`)}):Q?Q(o,[((k=y.id)==null?void 0:k.toString())||String(y)]):ue.info(`Action "${o}" not yet implemented`)},Ge=(o,y)=>{if(!i)return;const k=i.selectedIds.length>0?i.selectedIds:y;if(o==="delete"&&Z&&w)Ne(k);else if(o==="export"&&M&&x){const U=k.length;_({isOpen:!0,itemCount:U,isLoading:!1})}else o==="update_status"&&K&&x?me({isOpen:!0,itemCount:k.length,isLoading:!1}):Q?Q(o,k).catch(U=>{ue.error(`Bulk action failed: ${U.message}`)}):ue.info(`Bulk action "${o}" not yet implemented`);oe(!1)},nt=async()=>{if(!M||!i)return;const o=i.selectedIds.length>0?i.selectedIds:ee;_(y=>({...y,isLoading:!0}));try{await M(o),ue.success("Export successful"),_({isOpen:!1,itemCount:0,isLoading:!1}),i.onSelectionChange([])}catch(y){ue.error(`Export failed: ${y.message}`),_(k=>({...k,isLoading:!1}))}},Fe=async o=>{if(!(!K||!i)){me(y=>({...y,isLoading:!0}));try{await K(i.selectedIds,o),ue.success("Status updated successfully"),me({isOpen:!1,itemCount:0,isLoading:!1}),i.onSelectionChange([])}catch(y){ue.error(`Failed to update status: ${y.message}`),me(k=>({...k,isLoading:!1}))}}},Re=r.useRef(""),Ee=r.useRef(!1),xe=r.useMemo(()=>{if(!C||C.length===0)return"";try{return C.map(o=>`${o.label}:${String(o.value)}`).join("|")}catch{return""}},[C]);r.useEffect(()=>{if(xe!==Re.current)return xe?(he(C),Ee.current=!0,Re.current=xe):Ee.current&&(he([]),Ee.current=!1,Re.current=""),()=>{Ee.current&&(he([]),Ee.current=!1)}},[xe]);const ot=(n||d.length>0)&&Object.values(h).some(o=>o===""||o===null||o===void 0?!1:typeof o=="object"&&("min"in o||"max"in o)?o.min!==""&&o.min!==null&&o.min!==void 0||o.max!==""&&o.max!==null&&o.max!==void 0:!0),lt=o=>{if(!o.sortable||!S)return;const y=o.sortField||o.key,k=S.sortBy===y?S.sortDirection:null;let U="asc";if(k==="asc")U="desc";else if(k==="desc"){S.onSort("created_at","desc");return}S.onSort(y,U)},Je=o=>{if(!o.sortable||!S)return null;const y=o.sortField||o.key;return S.sortBy!==y?e.jsx("span",{className:"ml-1 cursor-pointer text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:"⇅"}):S.sortDirection==="asc"?e.jsx("span",{className:"ml-1 cursor-pointer text-brand-500",children:"↑"}):e.jsx("span",{className:"ml-1 cursor-pointer text-brand-500",children:"↓"})},v=o=>{if(o){const y=c.filter(k=>!k.isAdded).map(k=>{var U;return((U=k.id)==null?void 0:U.toString())||""}).filter(k=>k!=="");te(y),i==null||i.onSelectionChange(y)}else te([]),i==null||i.onSelectionChange([])},B=(o,y)=>{const k=c.find(de=>String(de.id)===o);if(k&&k.isAdded)return;const U=y?[...ee,o]:ee.filter(de=>de!==o);te(U),i==null||i.onSelectionChange(U)};return e.jsxs("div",{className:X,children:[e.jsxs("div",{className:"flex justify-between items-center mb-6 overflow-visible",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white/90 flex items-center gap-2",children:[s&&e.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-blue-50 rounded-xl dark:bg-blue-500/10",children:s}),t]}),a&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:a})]}),e.jsx("div",{className:"flex-shrink-0 overflow-visible",children:e.jsx(Ds,{})})]}),(n||d.length>0)&&e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"w-[75%] igny8-filter-bar p-3 rounded-lg bg-transparent",style:{boxShadow:"0 2px 6px 3px rgba(0, 0, 0, 0.08)"},children:e.jsxs("div",{className:"flex flex-nowrap gap-3 items-center justify-between w-full",children:[e.jsx("div",{className:"flex flex-nowrap gap-3 items-center flex-1 min-w-0 w-full",children:n?e.jsx("div",{className:"flex flex-nowrap gap-3 items-center flex-1 min-w-0 w-full",children:n}):e.jsx(e.Fragment,{children:d.map(o=>{if(o.type==="custom"&&o.customRender)return e.jsx(je.Fragment,{children:o.customRender()},o.key);if(o.type==="text")return e.jsx(Zt,{type:"text",placeholder:o.placeholder||`Search ${o.label.toLowerCase()}...`,value:h[o.key]||"",onChange:y=>{u==null||u(o.key,y.target.value)},className:"flex-1 min-w-[200px] h-9"},o.key);if(o.type==="select"){const y=h[o.key]||"";return e.jsx(rt,{options:o.options||[],placeholder:o.label,value:y,onChange:k=>{const U=k==null?"":String(k);u==null||u(o.key,U)},className:o.className||"flex-1 min-w-[140px]"},o.key)}return null})})}),ot&&g&&e.jsx(ye,{variant:"secondary",size:"sm",onClick:g,className:"flex-shrink-0",children:"Clear Filters"})]})})}),e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[H.length>0&&e.jsx("div",{className:"inline-block",children:H.length===1?e.jsxs(ye,{size:"md",onClick:()=>{ee.length>0&&Ge(H[0].key,ee)},disabled:ee.length===0,variant:H[0].variant==="success"?"success":(H[0].variant==="danger","primary"),startIcon:H[0].icon,className:ee.length===0?"opacity-50 cursor-not-allowed":"",children:[H[0].label,ee.length>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium rounded-full bg-white/20 text-white",children:ee.length})]}):e.jsxs(e.Fragment,{children:[e.jsxs(ye,{ref:N,size:"md",onClick:()=>ee.length>0&&oe(!ie),disabled:ee.length===0,className:`dropdown-toggle ${ee.length===0?"opacity-50 cursor-not-allowed":""}`,endIcon:e.jsx(xt,{className:"w-4 h-4"}),children:["Bulk Actions",ee.length>0&&e.jsx("span",{className:"ml-2 inline-flex items-center justify-center px-2 py-0.5 text-xs font-medium rounded-full bg-blue-100 text-blue-800 dark:bg-blue-500/20 dark:text-blue-300",children:ee.length})]}),e.jsx(ht,{isOpen:ie&&ee.length>0,onClose:()=>oe(!1),anchorRef:N,placement:"bottom-left",className:"w-48 p-2",children:H.map((o,y)=>{const k=o.key==="delete",U=k&&y>0;return e.jsxs(je.Fragment,{children:[U&&e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"}),e.jsxs(st,{onItemClick:()=>{Ge(o.key,ee)},className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${k?"text-error-500 hover:bg-error-50 hover:text-error-600 dark:text-error-400 dark:hover:bg-error-500/15 dark:hover:text-error-300":"text-gray-700 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300"}`,children:[o.icon&&e.jsx("span",{className:"flex-shrink-0 w-5 h-5",children:o.icon}),e.jsx("span",{className:"text-left",children:o.label})]})]},o.key)})})]})}),e.jsxs("div",{className:"flex gap-2",children:[ne&&e.jsx(ye,{variant:"secondary",size:"md",endIcon:b,onClick:ne,children:"Export CSV"}),q&&e.jsx(ye,{variant:"secondary",size:"md",endIcon:D,onClick:q,children:"Import"}),O&&e.jsx(ye,{variant:"primary",size:"md",endIcon:F,onClick:O,children:P})]})]}),e.jsx("div",{className:`rounded-xl border border-gray-200 bg-white dark:border-white/[0.05] dark:bg-white/[0.03] igny8-table-container ${m?"loaded":"loading"}`,style:{overflowX:"auto",overflowY:"visible"},children:e.jsx("div",{className:"igny8-table-wrapper",style:{overflow:"visible"},children:e.jsxs(Ls,{className:"igny8-table-compact igny8-table-smooth",children:[e.jsx(Os,{className:"border-b border-gray-100 dark:border-white/[0.05]",children:e.jsxs(mt,{children:[i&&e.jsx(Te,{isHeader:!0,className:"px-5 py-3 font-medium text-gray-500 text-start text-theme-xs dark:text-gray-400 w-12",children:m&&e.jsx(At,{checked:(()=>{const o=c.filter(y=>!y.isAdded);return o.length>0&&ee.length===o.length})(),onChange:v,id:"select-all"})}),l.map((o,y)=>{const k=y===l.length-1;return e.jsx(Te,{isHeader:!0,className:`px-5 py-3 font-medium text-gray-500 text-${o.align||"start"} text-theme-xs dark:text-gray-400 ${o.sortable?"cursor-pointer hover:text-gray-700 dark:hover:text-gray-300":""} ${k&&W.length>0?"pr-16":""}`,children:o.sortable?e.jsxs("div",{onClick:()=>lt(o),className:"flex items-center",children:[o.label,Je(o)]}):e.jsxs(e.Fragment,{children:[o.label,Je(o)]})},o.key)})]})}),e.jsx(Fs,{className:"divide-y divide-gray-100 dark:divide-white/[0.05] igny8-table-body",children:m?c.length===0?null:c.map((o,y)=>{var Mt;const k=o.id||y,U=G.has(k),de=l.find(ve=>ve.toggleable),Pe=(de==null?void 0:de.toggleContentKey)||(de==null?void 0:de.key),Dt=(de==null?void 0:de.toggleContentLabel)||"Content",$e=Pe?o[Pe]:null,Qe=$e&&(typeof $e=="string"?$e.trim().length>0:typeof $e=="object"&&$e!==null&&Object.keys($e).length>0),Bt=(i?1:0)+l.length,It=(ve,Ce)=>{fe(ze=>{const ke=new Set(ze),De=Ce??k;return ve?ke.add(De):ke.delete(De),ke})},Et=!!o.isAdded;return e.jsxs(je.Fragment,{children:[e.jsxs(mt,{className:`igny8-data-row ${Et?"bg-blue-50 dark:bg-blue-500/10":""}`,children:[i&&e.jsx(Te,{className:"px-5 py-4 text-start",children:e.jsx(At,{checked:ee.includes(((Mt=o.id)==null?void 0:Mt.toString())||""),onChange:ve=>{var Ce;return B(((Ce=o.id)==null?void 0:Ce.toString())||"",ve)},id:`checkbox-${o.id}`,disabled:Et})}),l.map((ve,Ce)=>{var De;const ze=Ce===l.length-1,ke=o.id||y;if(ze&&W.length>0&&!ge.current.has(ke)){const Be=je.createRef();ge.current.set(ke,Be)}return e.jsxs(Te,{className:`px-5 py-4 text-${ve.align||"start"} text-gray-800 dark:text-white/90 ${ze&&W.length>0?"relative pr-16":""}`,children:[e.jsxs("div",{className:`flex items-center ${ve.toggleable&&Qe?"justify-between w-full":""} gap-2`,children:[e.jsx("div",{className:"flex-1",children:ve.render?ve.render(o[ve.key],o):e.jsx("span",{children:((De=o[ve.key])==null?void 0:De.toString())||"-"})}),ve.toggleable&&Qe&&e.jsx("div",{onClick:Be=>Be.stopPropagation(),children:e.jsx(Hs,{isExpanded:U,onClick:()=>{It(!U,k)},hasContent:Qe})})]}),ze&&W.length>0&&(()=>{const Be=!!o.isAdded;if(W.length===1){const pe=W[0];return Be?e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 z-10",children:e.jsx("span",{className:"text-sm font-medium text-blue-light-500 dark:text-blue-light-400",children:"Added"})}):e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 z-10",children:e.jsxs("button",{type:"button",onClick:Se=>{Se.stopPropagation(),We(pe.key,o)},className:"flex items-center gap-1 text-sm font-medium text-success-500 hover:text-success-600 dark:text-success-400 dark:hover:text-success-300 transition-colors cursor-pointer",children:[pe.label,e.jsx("span",{className:"inline-flex items-center",children:e.jsx(Ve,{className:"w-4 h-4 fill-current"})})]})})}const it=ge.current.get(ke);if(!it)return null;const Kt=be.get(ke)||!1;return e.jsxs(e.Fragment,{children:[e.jsx("button",{ref:it,type:"button",onClick:pe=>{pe.stopPropagation(),we(Se=>{const _e=new Map(Se);return _e.forEach((ct,Ye)=>{Ye!==ke&&_e.set(Ye,!1)}),_e.set(ke,!_e.get(ke)),_e})},className:"absolute right-2 top-1/2 -translate-y-1/2 inline-flex items-center justify-center w-8 h-8 rounded-lg transition-colors text-gray-500 hover:text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-gray-300 dark:hover:bg-gray-800 dropdown-toggle z-10",title:"Actions",children:e.jsx(es,{className:"w-5 h-5"})}),e.jsx(ht,{isOpen:Kt,onClose:()=>{we(pe=>{const Se=new Map(pe);return Se.set(ke,!1),Se})},anchorRef:it,placement:"right",className:"w-48 p-2",children:W.map(pe=>{const Se=pe.key==="edit",_e=pe.key==="delete",ct=pe.key==="export",Ye=()=>{var $t;if(!pe.icon)return null;const Xe=pe.icon,Ze=(($t=Xe.props)==null?void 0:$t.className)||"",dt=Ze.includes("w-")?"":"w-5 h-5 ";return Se?je.cloneElement(Xe,{className:`${dt}text-blue-light-500 ${Ze}`.trim()}):_e?je.cloneElement(Xe,{className:`${dt}text-error-500 ${Ze}`.trim()}):ct?je.cloneElement(Xe,{className:`${dt}text-gray-600 dark:text-gray-400 ${Ze}`.trim()}):pe.icon};return e.jsxs(je.Fragment,{children:[e.jsxs(st,{onItemClick:()=>We(pe.key,o),className:`flex items-center gap-3 px-3 py-2 font-medium rounded-lg text-sm text-left ${Se?"text-blue-light-500 hover:bg-blue-light-50 hover:text-blue-light-600 dark:text-blue-light-400 dark:hover:bg-blue-light-500/15 dark:hover:text-blue-light-300":_e?"text-error-500 hover:bg-error-50 hover:text-error-600 dark:text-error-400 dark:hover:bg-error-500/15 dark:hover:text-error-300":"text-gray-700 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("span",{className:"flex-shrink-0 w-5 h-5",children:Ye()}),e.jsx("span",{className:"text-left",children:pe.label})]}),ct&&e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"})]},pe.key)})})]})})()]},ve.key)})]}),de&&Qe&&e.jsx(Us,{row:o,contentKey:Pe||"",contentLabel:Dt,colSpan:Bt,isExpanded:U,onToggle:It})]},o.id||y)}):Array.from({length:10}).map((o,y)=>e.jsxs(mt,{className:"igny8-skeleton-row",children:[i&&e.jsx(Te,{children:e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"})}),l.map((k,U)=>e.jsx(Te,{children:e.jsx("div",{className:"h-4 bg-gray-200 dark:bg-gray-700 rounded animate-pulse"})},U))]},`skeleton-${y}`))})]})})}),w&&e.jsx(Ns,{isOpen:le.isOpen,onClose:()=>J({isOpen:!1,items:[],isBulk:!1,isLoading:!1}),onConfirm:Ie,title:w.title,message:le.isBulk?w.multipleItemsMessage(le.items.length):w.singleItemMessage,variant:"danger",isConfirmation:!0,confirmText:"Delete",cancelText:"Cancel",isLoading:le.isLoading,itemsList:le.items.map(o=>R(o))}),x&&e.jsx(Rs,{isOpen:p.isOpen,onClose:()=>_({isOpen:!1,itemCount:0,isLoading:!1}),onConfirm:nt,title:x.export.title,message:x.export.message(p.itemCount),confirmText:x.export.confirmText,isLoading:p.isLoading}),x&&e.jsx(Ps,{isOpen:I.isOpen,onClose:()=>me({isOpen:!1,itemCount:0,isLoading:!1}),onConfirm:Fe,title:x.updateStatus.title,message:x.updateStatus.message(I.itemCount),confirmText:x.updateStatus.confirmText,statusOptions:x.updateStatus.statusOptions,isLoading:I.isLoading}),A&&e.jsx("div",{className:"mt-6 border-t border-gray-200 dark:border-gray-800 pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Showing ",c.length," of ",A.totalCount," ",E||"items"]}),e.jsx(zs,{currentPage:A.currentPage,totalPages:A.totalPages,pageSize:$,onPageChange:o=>{A.onPageChange(o)},onPageSizeChange:o=>{z(o),A.onPageChange(1)}})]})})]})}function Nt({isOpen:t,onClose:s,onSubmit:a,title:l,fields:c=[],submitLabel:f="Create",cancelLabel:m="Cancel",isLoading:d=!1,className:h="max-w-2xl",customFooter:u,customBody:g}){return e.jsx(He,{isOpen:t,onClose:s,className:h,children:e.jsxs("div",{className:"p-6",children:[e.jsx("h3",{className:"text-lg font-semibold mb-6 text-gray-800 dark:text-white",children:l}),e.jsxs("form",{onSubmit:n=>{n.preventDefault(),a()},className:"space-y-4",children:[g||e.jsxs(e.Fragment,{children:[c.find(n=>n.key==="keyword")&&e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[c.find(n=>n.key==="keyword").label,c.find(n=>n.key==="keyword").required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("input",{type:"text",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:c.find(n=>n.key==="keyword").value||"",onChange:n=>c.find(j=>j.key==="keyword").onChange(n.target.value),placeholder:c.find(n=>n.key==="keyword").placeholder,required:c.find(n=>n.key==="keyword").required})]}),(c.find(n=>n.key==="volume")||c.find(n=>n.key==="difficulty"))&&e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.find(n=>n.key==="volume")&&e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[c.find(n=>n.key==="volume").label,c.find(n=>n.key==="volume").required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("input",{type:"number",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:c.find(n=>n.key==="volume").value||"",onChange:n=>{const j=n.target.value===""?"":parseInt(n.target.value)||0;c.find(O=>O.key==="volume").onChange(j)},placeholder:c.find(n=>n.key==="volume").placeholder,required:c.find(n=>n.key==="volume").required})]}),c.find(n=>n.key==="difficulty")&&(()=>{const n=c.find(j=>j.key==="difficulty");return e.jsxs("div",{children:[e.jsxs(et,{className:"mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),n.type==="select"?e.jsx(rt,{options:n.options||[],placeholder:n.placeholder||n.label,value:n.value||"",onChange:j=>n.onChange(j),className:"w-full"}):e.jsx("input",{type:"number",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:n.value||"",onChange:j=>{const O=j.target.value===""?"":parseInt(j.target.value)||0;n.onChange(O)},placeholder:n.placeholder,required:n.required,min:n.min,max:n.max})]})})()]}),c.filter(n=>n.key!=="keyword"&&n.key!=="volume"&&n.key!=="difficulty").map(n=>n.type==="select"?e.jsxs("div",{children:[e.jsxs(et,{className:"mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(rt,{options:n.options||[],placeholder:n.placeholder||n.label,value:n.value||"",onChange:j=>n.onChange(j),className:"w-full"})]},n.key):n.type==="textarea"?e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("textarea",{rows:n.rows||4,className:"w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:n.value||"",onChange:j=>n.onChange(j.target.value),placeholder:n.placeholder,required:n.required})]},n.key):e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:[n.label,n.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx("input",{type:n.type,className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:n.value||"",onChange:j=>n.onChange(j.target.value),placeholder:n.placeholder,required:n.required,min:n.min,max:n.max})]},n.key))]}),u||e.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[e.jsx(ye,{type:"button",variant:"outline",onClick:s,disabled:d,children:m}),e.jsx(ye,{type:"submit",variant:"primary",disabled:d,children:d?"Processing...":f})]})]})]})})}function Ct({isOpen:t,title:s,percentage:a,status:l,message:c,details:f,onClose:m,onCancel:d,taskId:h}){r.useEffect(()=>{if(l==="completed"&&m){const n=setTimeout(()=>{m()},2e3);return()=>clearTimeout(n)}},[l,m]);const u=()=>l==="error"?"error":l==="completed"?"success":"primary",g=()=>l==="completed"?e.jsx("svg",{className:"w-6 h-6 text-success-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):l==="error"?e.jsx("svg",{className:"w-6 h-6 text-error-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}):e.jsxs("svg",{className:"w-6 h-6 text-brand-500 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});return e.jsx(He,{isOpen:t,onClose:m||(()=>{}),className:"max-w-lg",showCloseButton:l==="completed"||l==="error",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[e.jsx("div",{className:"flex-shrink-0 mt-1",children:g()}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:s}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:c})]})]}),e.jsx("div",{className:"mb-6",children:e.jsx(Le,{value:a,color:u(),size:"lg",showLabel:!0,label:`${Math.round(a)}%`})}),f&&e.jsxs("div",{className:"mb-6 space-y-2",children:[f.currentItem&&e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:[e.jsx("span",{className:"font-medium",children:"Current:"})," ",e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:f.currentItem})]}),f.total>0&&e.jsxs("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:[e.jsx("span",{className:"font-medium",children:"Progress:"})," ",e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:[f.current," of ",f.total," completed"]})]}),f.phase&&e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-500",children:["Phase: ",f.phase]})]}),h&&!1,e.jsxs("div",{className:"flex justify-end gap-3",children:[d&&l!=="completed"&&l!=="error"&&e.jsx(ye,{variant:"secondary",size:"sm",onClick:d,disabled:l==="processing",children:"Cancel"}),(l==="completed"||l==="error")&&m&&e.jsx(ye,{variant:"primary",size:"sm",onClick:m,children:l==="completed"?"Close":"Dismiss"})]})]})})}function _t(){const[t,s]=r.useState(!1),[a,l]=r.useState(null),[c,f]=r.useState(""),[m,d]=r.useState({percentage:0,message:"Initializing...",status:"pending"}),h=r.useRef(0),u=r.useRef(null),g=r.useRef(null),n=(b,q="",D=[])=>{const C=(b==null?void 0:b.toUpperCase())||"",E=(Z,M)=>{const K=M.match(Z);return K&&K[1]?K[1]:""};let A=E(/(\d+)\s+keyword/i,q),i=E(/(\d+)\s+cluster/i,q);if(!A){const Z=E(/loaded\s+(\d+)\s+items?/i,q);Z&&(A=Z)}if(!i){const Z=E(/created\s+(\d+)\s+clusters?/i,q);Z&&(i=Z)}if(!A||!i)for(const Z of D){const M=Z.message||"";if(A||(A=E(/(\d+)\s+keyword/i,M)||E(/loaded\s+(\d+)\s+items?/i,M)),i||(i=E(/(\d+)\s+cluster/i,M)||E(/created\s+(\d+)\s+clusters?/i,M)),A&&i)break}const S=A,T=i;return C.includes("INIT")||C.includes("INITIALIZ")?{percentage:0,friendlyMessage:"Getting started..."}:C.includes("PREP")||C.includes("PREPAR")?{percentage:16,friendlyMessage:S?`Preparing ${S} keyword${S!=="1"?"s":""}...`:"Preparing your keywords..."}:C.includes("AI_CALL")||C.includes("CALLING")?{percentage:50,friendlyMessage:"Finding related keywords..."}:C.includes("PARSE")||C.includes("PARSING")?{percentage:70,friendlyMessage:"Organizing results..."}:C.includes("SAVE")||C.includes("SAVING")||C.includes("CREAT")?{percentage:85,friendlyMessage:T?`Saving ${T} cluster${T!=="1"?"s":""}...`:"Saving clusters..."}:C.includes("DONE")||C.includes("COMPLETE")?{percentage:100,friendlyMessage:S&&T?`Done! Created ${T} cluster${T!=="1"?"s":""} from ${S} keyword${S!=="1"?"s":""}`:S?`Done! Processed ${S} keyword${S!=="1"?"s":""}`:T?`Done! Created ${T} cluster${T!=="1"?"s":""}`:"Done! Clustering complete"}:{percentage:h.current,friendlyMessage:q||"Processing..."}};r.useEffect(()=>{if(!a||!t||a.startsWith("temp-"))return;let b=null,q=0,D=!1;const C=300,E=async()=>{if(!D)try{if(q++,q>C){d({percentage:0,message:"Task is taking longer than expected. Please check manually.",status:"error"}),D=!0,b&&(clearInterval(b),b=null);return}const A=await rs(`/v1/system/settings/task_progress/${a}/`);if(A.state==="PROGRESS"){const i=A.meta||{};let S=null;const T=[...i.request_steps||[],...i.response_steps||[]];if(T.length>0){const R=[...T].sort((X,re)=>(re.stepNumber||0)-(X.stepNumber||0))[0];if(R&&R.stepName){const X=R.stepName.toUpperCase();X.includes("INIT")?S="INIT":X.includes("PREP")?S="PREP":X.includes("AI_CALL")||X.includes("CALL")?S="AI_CALL":X.includes("PARSE")?S="PARSE":X.includes("SAVE")||X.includes("CREAT")?S="SAVE":X.includes("DONE")||X.includes("COMPLETE")?S="DONE":S=X}}if(!S){const L=(i.phase||"").toLowerCase(),R=(i.message||"").toLowerCase();L.includes("initializ")||R.includes("initializ")||R.includes("getting started")?S="INIT":L.includes("prepar")||L.includes("prep")||R.includes("prepar")||R.includes("loading")?S="PREP":L.includes("analyzing")||L.includes("ai_call")||R.includes("analyzing")||R.includes("finding related")?S="AI_CALL":L.includes("pars")||R.includes("pars")||R.includes("organizing")?S="PARSE":L.includes("sav")||L.includes("creat")||R.includes("sav")||R.includes("creat")||R.includes("cluster")?S="SAVE":(L.includes("done")||L.includes("complet")||R.includes("done")||R.includes("complet"))&&(S="DONE")}const Z=i.message||"",M=n(S||"",Z,T),K=M.percentage,Q=M.friendlyMessage,Y=u.current!==S;if(g.current&&(clearTimeout(g.current),g.current=null),Y&&u.current!==null?g.current=setTimeout(()=>{u.current=S,h.current=K,d({percentage:K,message:Q,status:"processing",details:{current:i.current||0,total:i.total||0,completed:i.completed||0,currentItem:i.current_item,phase:i.phase}})},500):(u.current=S,h.current=K,d({percentage:K,message:Q,status:"processing",details:{current:i.current||0,total:i.total||0,completed:i.completed||0,currentItem:i.current_item,phase:i.phase}})),i.request_steps||i.response_steps){const{useAIRequestLogsStore:L}=await Me(async()=>{const{useAIRequestLogsStore:re}=await import("./page-dashboard-DxYTR5eF.js").then(ie=>ie.a6);return{useAIRequestLogsStore:re}},__vite__mapDeps([0,1,2,3,4,5,6])).catch(()=>({useAIRequestLogsStore:null})),X=((L==null?void 0:L.getState().logs)||[]).find(re=>{var ie,oe;return((oe=(ie=re.response)==null?void 0:ie.data)==null?void 0:oe.task_id)===a});if(X){const re=L==null?void 0:L.getState().addRequestStep,ie=L==null?void 0:L.getState().addResponseStep;i.request_steps&&Array.isArray(i.request_steps)&&i.request_steps.forEach(oe=>{X.requestSteps.find(be=>be.stepNumber===oe.stepNumber)||re==null||re(X.id,oe)}),i.response_steps&&Array.isArray(i.response_steps)&&i.response_steps.forEach(oe=>{X.responseSteps.find(be=>be.stepNumber===oe.stepNumber)||ie==null||ie(X.id,oe)})}}}else if(A.state==="SUCCESS"){const i=A.meta||{};g.current&&(clearTimeout(g.current),g.current=null);const S=i.message||"",T=[...i.request_steps||[],...i.response_steps||[]],Z=n("DONE",S,T);if(u.current="DONE",h.current=100,d({percentage:100,message:Z.friendlyMessage,status:"completed",details:i.details}),i.request_steps||i.response_steps){const{useAIRequestLogsStore:M}=await Me(async()=>{const{useAIRequestLogsStore:Y}=await import("./page-dashboard-DxYTR5eF.js").then(L=>L.a6);return{useAIRequestLogsStore:Y}},__vite__mapDeps([0,1,2,3,4,5,6])).catch(()=>({useAIRequestLogsStore:null})),K=(M==null?void 0:M.getState().logs)||[],Q=K.find(Y=>{var L,R;return((R=(L=Y.response)==null?void 0:L.data)==null?void 0:R.task_id)===a})||K[0];if(Q){const Y=M==null?void 0:M.getState().addRequestStep,L=M==null?void 0:M.getState().addResponseStep;i.request_steps&&Array.isArray(i.request_steps)&&i.request_steps.forEach(R=>{Q.requestSteps.find(X=>X.stepNumber===R.stepNumber)||Y==null||Y(Q.id,R)}),i.response_steps&&Array.isArray(i.response_steps)&&i.response_steps.forEach(R=>{Q.responseSteps.find(X=>X.stepNumber===R.stepNumber)||L==null||L(Q.id,R)})}}D=!0,b&&(clearInterval(b),b=null)}else if(A.state==="FAILURE"){const i=A.meta||{},S=i.error||"Task failed";if(d({percentage:0,message:`Error: ${S}`,status:"error"}),i.request_steps||i.response_steps){const{useAIRequestLogsStore:T}=await Me(async()=>{const{useAIRequestLogsStore:K}=await import("./page-dashboard-DxYTR5eF.js").then(Q=>Q.a6);return{useAIRequestLogsStore:K}},__vite__mapDeps([0,1,2,3,4,5,6])).catch(()=>({useAIRequestLogsStore:null})),M=((T==null?void 0:T.getState().logs)||[]).find(K=>{var Q,Y;return((Y=(Q=K.response)==null?void 0:Q.data)==null?void 0:Y.task_id)===a});if(M){const K=T==null?void 0:T.getState().addRequestStep,Q=T==null?void 0:T.getState().addResponseStep;i.request_steps&&Array.isArray(i.request_steps)&&i.request_steps.forEach(Y=>{M.requestSteps.find(L=>L.stepNumber===Y.stepNumber)||K==null||K(M.id,Y)}),i.response_steps&&Array.isArray(i.response_steps)&&i.response_steps.forEach(Y=>{M.responseSteps.find(L=>L.stepNumber===Y.stepNumber)||Q==null||Q(M.id,Y)})}}D=!0,b&&(clearInterval(b),b=null)}else d({percentage:0,message:"Task is starting...",status:"pending"})}catch(A){if(console.error("Error polling task status:",A),q>5){let i=A.message||"Unknown error";i.includes("HTTP_ERROR")&&(i=i.replace(/^API Error \(\d+\): HTTP_ERROR - /,"").trim()||"Server error"),d({percentage:0,message:`Error checking task status: ${i}`,status:"error"}),D=!0,b&&(clearInterval(b),b=null)}}};return E(),b=setInterval(()=>{D||E()},2e3),()=>{D=!0,b&&(clearInterval(b),b=null),g.current&&(clearTimeout(g.current),g.current=null)}},[a,t]);const j=r.useCallback((b,q)=>{g.current&&(clearTimeout(g.current),g.current=null),h.current=0,u.current=null,l(b),f(q),s(!0),d({percentage:0,message:"Getting started...",status:"pending"})},[]),O=r.useCallback(b=>{l(b),d({percentage:0,message:"Initializing...",status:"pending"})},[]),P=r.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),h.current=0,u.current=null,s(!1),l(null),f("")},[]),F=r.useCallback(b=>{d({percentage:0,message:b,status:"error"})},[]),ne=r.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),h.current=0,u.current=null,d({percentage:0,message:"Getting started...",status:"pending"}),l(null),f(""),s(!1)},[]);return{progress:m,isOpen:t,openModal:j,updateTaskId:O,closeModal:P,setError:F,reset:ne,title:c,taskId:a}}const qs=t=>{const s=new URLSearchParams;t.filters&&Object.entries(t.filters).forEach(([f,m])=>{m!==""&&m!==null&&m!==void 0&&s.append(f,String(m))});const a=s.toString(),l=t.endpoint.endsWith("/")?t.endpoint:`${t.endpoint}/`;return`${bt}${l}${a?`?${a}`:""}`},Ws=async(t,s,a)=>{const l=t.format||"csv",c=qs(t);s==null||s(`Exporting ${l.toUpperCase()}...`);try{const f=await fetch(c,{method:"GET",credentials:"include"});if(!f.ok){const u=await f.text();throw new Error(`Export failed: ${f.statusText} - ${u}`)}const m=await f.blob(),d=window.URL.createObjectURL(m),h=document.createElement("a");h.href=d,h.download=`${t.filename}.${l}`,document.body.appendChild(h),h.click(),document.body.removeChild(h),window.URL.revokeObjectURL(d),s==null||s(`Export successful: ${t.filename}.${l}`)}catch(f){const m=f instanceof Error?f:new Error("Export failed");throw a==null||a(m),m}},Gs=async(t,s,a,l)=>{var h,u;const c=s.acceptedFormats||[".csv"],f="."+((h=t.name.split(".").pop())==null?void 0:h.toLowerCase());if(!c.includes(f)){const g=new Error(`Invalid file format. Accepted formats: ${c.join(", ")}`);throw l==null||l(g),g}const m=s.maxFileSize||5*1024*1024;if(t.size>m){const g=new Error(`File size exceeds ${m/1024/1024}MB limit`);throw l==null||l(g),g}a==null||a(`Importing ${t.name}...`);const d=new FormData;d.append("file",t);try{const g=s.endpoint.endsWith("/")?s.endpoint:`${s.endpoint}/`,n=new URLSearchParams;s.queryParams&&Object.entries(s.queryParams).forEach(([ne,b])=>{b!==""&&b!==null&&b!==void 0&&n.append(ne,String(b))});const j=n.toString(),O=`${bt}${g}${j?`?${j}`:""}`,P=await fetch(O,{method:"POST",body:d,credentials:"include"});if(!P.ok){const ne=await P.text();throw new Error(`Import failed: ${P.statusText} - ${ne}`)}const F=await P.json();return a==null||a(`Import successful: ${F.imported||0} rows imported`),(u=s.onSuccess)==null||u.call(s,F),F}catch(g){const n=g instanceof Error?g:new Error("Import failed");throw l==null||l(n),n}},Js=({className:t,onChange:s,accept:a,disabled:l=!1})=>e.jsx("input",{type:"file",accept:a,disabled:l,className:`focus:border-ring-brand-300 h-11 w-full overflow-hidden rounded-lg border border-gray-300 bg-transparent text-sm text-gray-500 shadow-theme-xs transition-colors file:mr-5 file:border-collapse file:cursor-pointer file:rounded-l-lg file:border-0 file:border-r file:border-solid file:border-gray-200 file:bg-gray-50 file:py-3 file:pl-3.5 file:pr-3 file:text-sm file:text-gray-700 placeholder:text-gray-400 hover:file:bg-gray-100 focus:outline-hidden focus:file:ring-brand-300 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-400 dark:text-white/90 dark:file:border-gray-800 dark:file:bg-white/[0.03] dark:file:text-gray-400 dark:placeholder:text-gray-400 disabled:opacity-50 disabled:cursor-not-allowed ${t}`,onChange:s});function Qs(t){const{exportEndpoint:s,importEndpoint:a,filename:l,acceptedFormats:c=[".csv"],maxFileSize:f=5*1024*1024,onImportSuccess:m,onExportSuccess:d,onError:h}=t,[u,g]=r.useState(!1),[n,j]=r.useState(!1),O=r.useCallback(async(b="csv",q={})=>{j(!0);try{await Ws({endpoint:s,filename:l,format:b,filters:q},C=>console.log(C),C=>{throw h==null||h(C),C}),d==null||d()}catch(D){const C=D instanceof Error?D:new Error("Export failed");throw h==null||h(C),C}finally{j(!1)}},[s,l,h,d]),P=r.useCallback(async b=>{j(!0);try{const q={endpoint:a,acceptedFormats:c,maxFileSize:f,queryParams:t.importQueryParams,onSuccess:C=>{m==null||m(C)}},D=await Gs(b,q,C=>console.log(C),C=>{throw h==null||h(C),C});return g(!1),D}catch(q){const D=q instanceof Error?q:new Error("Import failed");throw h==null||h(D),D}finally{j(!1)}},[a,c,f,m,h]),F=r.useCallback(async b=>{var D;const q=(D=b.target.files)==null?void 0:D[0];q&&(await P(q),b.target.value="")},[P]);return{handleExport:O,handleImportClick:()=>g(!0),ImportModal:()=>e.jsx(He,{isOpen:u,onClose:()=>g(!1),className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("h2",{className:"text-xl font-bold mb-6 text-gray-800 dark:text-white",children:["Import ",l.charAt(0).toUpperCase()+l.slice(1)]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(et,{children:"CSV File"}),e.jsx(Js,{onChange:F,accept:c.join(","),disabled:n}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:["Upload a CSV file (max ",f/1024/1024,"MB)"]})]}),e.jsx("div",{className:"flex justify-end gap-4 pt-4",children:e.jsx(ye,{variant:"outline",onClick:()=>g(!1),disabled:n,children:"Close"})})]})]})})}}const Ys=(t,s,a)=>Qs({exportEndpoint:"/v1/planner/keywords/export/",importEndpoint:"/v1/planner/keywords/import_keywords/",filename:"keywords",acceptedFormats:[".csv"],maxFileSize:5*1024*1024,importQueryParams:a,onImportSuccess:t,onError:s});function Xs(){const t=Ue(),{activeSite:s}=St(),{activeSector:a,loadSectorsForSite:l}=Oe(),{pageSize:c}=qe(),[f,m]=r.useState([]),[d,h]=r.useState([]),[u,g]=r.useState([]),[n,j]=r.useState(!0),[O,P]=r.useState(!1),[F,ne]=r.useState(""),[b,q]=r.useState(""),[D,C]=r.useState(""),[E,A]=r.useState(""),[i,S]=r.useState(""),[T,Z]=r.useState(""),[M,K]=r.useState(""),[Q,Y]=r.useState(!1),[L,R]=r.useState(""),[X,re]=r.useState(""),ie=r.useRef(null),oe=r.useRef(null),[be,we]=r.useState([]),[ge,N]=r.useState(1),[w,x]=r.useState(1),[V,W]=r.useState(0),[H,ee]=r.useState("created_at"),[te,G]=r.useState("desc"),[fe,le]=r.useState(!1),[J,p]=r.useState(!1),[_,I]=r.useState(!1),[me,he]=r.useState(null),[ue,$]=r.useState({seed_keyword_id:0,volume_override:null,difficulty_override:null,cluster_id:null,status:"pending"}),z=_t(),se=r.useRef(!1);r.useEffect(()=>{s&&l(s.id)},[s,l]),r.useEffect(()=>{(async()=>{if(!s||!a||!s.industry){g([]);return}try{P(!0);const B=await ft({industry:s.industry,sector:a.industry_sector||void 0}),o=new Set(f.map(k=>k.seed_keyword_id)),y=(B.results||[]).filter(k=>!o.has(k.id));g(y)}catch(B){console.error("Failed to load available seed keywords:",B),g([])}finally{P(!1)}})()},[s,a,f]),r.useEffect(()=>{(async()=>{try{const B=await tt({ordering:"name"});h(B.results||[])}catch(B){console.error("Error fetching clusters:",B)}})()},[]);const ae=r.useCallback(async()=>{j(!0),le(!1);try{const v=H?`${te==="desc"?"-":""}${H}`:"-created_at",B={...F&&{search:F},...b&&{status:b},...D&&{cluster_id:D},...E&&{intent:E},...(a==null?void 0:a.id)&&{sector_id:a.id},page:ge,page_size:c||10,ordering:v};if(i){const y=parseInt(i),k=wt(y);if(k!==null){const U=vt(k);U&&(B.difficulty_min=U.min,B.difficulty_max=U.max)}}T!==""&&T!==null&&T!==void 0&&(B.volume_min=Number(T)),M!==""&&M!==null&&M!==void 0&&(B.volume_max=Number(M));const o=await as(B);m(o.results||[]),W(o.count||0),x(Math.ceil((o.count||0)/c)),setTimeout(()=>{le(!0),j(!1)},100)}catch(v){console.error("Error loading keywords:",v),t.error(`Failed to load keywords: ${v.message}`),le(!0),j(!1)}},[ge,b,D,E,i,T,M,H,te,F,s,a,c]);r.useEffect(()=>{const v=()=>{ae(),(async()=>{try{const y=await tt({ordering:"name"});h(y.results||[])}catch(y){console.error("Error fetching clusters:",y)}})()},B=()=>{ae()};return window.addEventListener("siteChanged",v),window.addEventListener("sectorChanged",B),()=>{window.removeEventListener("siteChanged",v),window.removeEventListener("sectorChanged",B)}},[ae]),r.useEffect(()=>{const v=B=>{ie.current&&!ie.current.contains(B.target)&&oe.current&&!oe.current.contains(B.target)&&(Y(!1),R(T),re(M))};if(Q)return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[Q,T,M]),r.useEffect(()=>{ae()},[ae]),r.useEffect(()=>{const v=setTimeout(()=>{N(1)},500);return()=>clearTimeout(v)},[F]),r.useEffect(()=>{const v=ge===1;N(1),v&&setTimeout(()=>{ae()},0)},[c]);const Ne=(v,B)=>{ee(v||"created_at"),G(B),N(1)},{handleExport:Ie,handleImportClick:We,ImportModal:Ge}=Ys(()=>{t.success("Import successful","Keywords imported successfully."),ae()},v=>{t.error("Import failed",v.message)},s&&a?{site_id:s.id,sector_id:a.id}:void 0),nt=r.useCallback(async(v,B)=>{if(v==="auto_cluster"){if(B.length===0){t.error("Please select at least one keyword to cluster");return}if(B.length>20){t.error("Maximum 20 keywords allowed for clustering");return}try{const o=B.map(U=>parseInt(U)),y=a==null?void 0:a.id,k=await ns(o,y);if(k&&k.success===!1){const U=k.error||"Failed to cluster keywords";t.error(U);return}if(k&&k.success)k.task_id?(se.current=!1,z.openModal(k.task_id,"Auto-Clustering Keywords")):(t.success(`Clustering complete: ${k.clusters_created||0} clusters created, ${k.keywords_updated||0} keywords updated`),se.current||(se.current=!0,ae()));else{const U=(k==null?void 0:k.error)||"Unexpected response format";t.error(U)}}catch(o){let y="Failed to cluster keywords";o.message&&(y=o.message.replace(/^API Error \(\d+\): [^-]+ - /,"").trim(),(!y||y===o.message)&&(y=o.message)),t.error(y)}}else t.info(`Bulk action "${v}" for ${B.length} items`)},[t,a,ae,z]),Fe=r.useCallback(()=>{$({seed_keyword_id:0,volume_override:null,difficulty_override:null,cluster_id:null,status:"pending"}),I(!1),he(null)},[]),Re=r.useCallback(async v=>{try{if(!v||v.length===0)throw new Error("No records selected for export");const B=v.join(","),o=`${bt}/v1/planner/keywords/export/?ids=${encodeURIComponent(B)}`,y=await fetch(o,{method:"GET",credentials:"include"});if(!y.ok){const Pe=await y.text();throw new Error(`Export failed: ${y.statusText} - ${Pe}`)}const k=await y.blob(),U=window.URL.createObjectURL(k),de=document.createElement("a");de.href=U,de.download="keywords.csv",document.body.appendChild(de),de.click(),document.body.removeChild(de),window.URL.revokeObjectURL(U)}catch(B){throw B}},[]),Ee=r.useCallback(async(v,B)=>{try{const o=v.map(y=>parseInt(y));await os(o,B),await ae()}catch(o){throw o}},[ae]),xe=r.useMemo(()=>Cs({clusters:d,activeSector:a,availableSeedKeywords:u,formData:ue,setFormData:$,searchTerm:F,setSearchTerm:ne,statusFilter:b,setStatusFilter:q,intentFilter:E,setIntentFilter:A,difficultyFilter:i,setDifficultyFilter:S,clusterFilter:D,setClusterFilter:C,volumeMin:T,volumeMax:M,setVolumeMin:Z,setVolumeMax:K,isVolumeDropdownOpen:Q,setIsVolumeDropdownOpen:Y,tempVolumeMin:L,tempVolumeMax:X,setTempVolumeMin:R,setTempVolumeMax:re,volumeButtonRef:oe,volumeDropdownRef:ie,setCurrentPage:N,loadKeywords:ae}),[d,a,u,ue,F,b,E,i,D,T,M,Q,L,X,ae,s]),ot=r.useMemo(()=>xe!=null&&xe.headerMetrics?xe.headerMetrics.map(v=>({label:v.label,value:v.calculate({keywords:f,totalCount:V,clusters:d}),accentColor:v.accentColor})):[],[xe==null?void 0:xe.headerMetrics,f,V,d]),lt=async()=>{try{if(!s){t.error("Please select an active site first");return}if(_&&me)await cs(me.id,ue),t.success("Keyword updated successfully");else{if(!a){t.error("Please select a sector for this site first");return}if(!ue.seed_keyword_id){t.error("Please select a seed keyword");return}const v=a.id,B={...ue,site_id:s.id,sector_id:v};await ds(B),t.success("Keyword attached successfully")}p(!1),Fe(),ae()}catch(v){t.error(`Failed to save: ${v.message}`)}},Je=r.useCallback(v=>{he(v),I(!0),$({seed_keyword_id:v.seed_keyword_id,volume_override:v.volume_override||null,difficulty_override:v.difficulty_override||null,cluster_id:v.cluster_id,status:v.status}),p(!0)},[]);return e.jsxs(e.Fragment,{children:[e.jsx(at,{title:"Keywords",titleIcon:e.jsx(Ft,{className:"text-brand-500 size-5"}),subtitle:"Manage and organize SEO keywords for content planning",columns:xe.columns,data:f,loading:n,showContent:fe,filters:xe.filters,filterValues:{search:F,status:b,intent:E,difficulty:i,cluster_id:D,volumeMin:T,volumeMax:M},onFilterChange:(v,B)=>{const o=B==null?"":String(B);v==="search"?ne(o):v==="status"?(q(o),N(1)):v==="intent"?(A(o),N(1)):v==="difficulty"?(S(o),N(1)):v==="cluster_id"&&(C(o),N(1))},onEdit:Je,onCreate:()=>{Fe(),p(!0)},createLabel:"Add Keyword",onCreateIcon:e.jsx(Ve,{}),onDelete:async v=>{await is(v),ae()},onBulkDelete:async v=>{const B=await ls(v);return ae(),B},onBulkExport:Re,onBulkUpdateStatus:Ee,onBulkAction:nt,getItemDisplayName:v=>v.keyword,onExport:async()=>{try{await Ie("csv",{search:F,status:b,cluster_id:D,intent:E,difficulty:i}),t.success("Export successful","Keywords exported successfully.")}catch(v){t.error("Export failed",v.message)}},onExportIcon:e.jsx(yt,{}),onImport:We,onImportIcon:e.jsx(ts,{}),selectionLabel:"keyword",pagination:{currentPage:ge,totalPages:w,totalCount:V,onPageChange:v=>{N(v)}},selection:{selectedIds:be,onSelectionChange:we},sorting:{sortBy:H,sortDirection:te,onSort:Ne},headerMetrics:ot,onFilterReset:()=>{ne(""),q(""),C(""),A(""),S(""),Z(""),K(""),R(""),re(""),Y(!1),N(1)}}),e.jsx(Nt,{isOpen:J,onClose:()=>{p(!1),Fe()},onSubmit:lt,title:_?"Edit Keyword":"Add Keyword",submitLabel:_?"Update":"Create",fields:xe.formFields(d)}),e.jsx(Ge,{}),e.jsx(Ct,{isOpen:z.isOpen,title:z.title,percentage:z.progress.percentage,status:z.progress.status,message:z.progress.message,details:z.progress.details,taskId:z.taskId||void 0,onClose:()=>{z.closeModal(),z.progress.status==="completed"&&!se.current&&(se.current=!0,ae())}})]})}const yr=Object.freeze(Object.defineProperty({__proto__:null,default:Xs},Symbol.toStringTag,{value:"Module"}));function Zs(){const t=Ue(),{activeSector:s}=Oe(),{pageSize:a}=qe(),[l,c]=r.useState([]),[f,m]=r.useState(!0),[d,h]=r.useState(""),[u,g]=r.useState(""),[n,j]=r.useState(""),[O,P]=r.useState(""),[F,ne]=r.useState(""),[b,q]=r.useState(!1),[D,C]=r.useState(""),[E,A]=r.useState(""),i=r.useRef(null),S=r.useRef(null),[T,Z]=r.useState([]),[M,K]=r.useState(1),[Q,Y]=r.useState(1),[L,R]=r.useState(0),[X,re]=r.useState("name"),[ie,oe]=r.useState("asc"),[be,we]=r.useState(!1),[ge,N]=r.useState(!1),[w,x]=r.useState(!1),[V,W]=r.useState(null),[H,ee]=r.useState({name:"",description:"",status:"active"}),te=_t(),G=r.useCallback(async()=>{m(!0),we(!1);try{const $=X?`${ie==="desc"?"-":""}${X}`:"name",z={...d&&{search:d},...u&&{status:u},...(s==null?void 0:s.id)&&{sector_id:s.id},page:M,page_size:a,ordering:$};if(n){const ae=parseInt(n),Ne=wt(ae);if(Ne!==null){const Ie=vt(Ne);Ie&&(z.difficulty_min=Ie.min,z.difficulty_max=Ie.max)}}O!==""&&O!==null&&O!==void 0&&(z.volume_min=Number(O)),F!==""&&F!==null&&F!==void 0&&(z.volume_max=Number(F));const se=await tt(z);c(se.results||[]),R(se.count||0),Y(Math.ceil((se.count||0)/a)),setTimeout(()=>{we(!0),m(!1)},100)}catch($){console.error("Error loading clusters:",$),t.error(`Failed to load clusters: ${$.message}`),we(!0),m(!1)}},[M,u,X,ie,d,n,O,F,s,a]);r.useEffect(()=>{G()},[G]),r.useEffect(()=>{const $=()=>{G()},z=()=>{G()};return window.addEventListener("siteChanged",$),window.addEventListener("sectorChanged",z),()=>{window.removeEventListener("siteChanged",$),window.removeEventListener("sectorChanged",z)}},[G]),r.useEffect(()=>{const $=setTimeout(()=>{M===1?G():K(1)},500);return()=>clearTimeout($)},[d,M,G]),r.useEffect(()=>{K(1)},[a]);const fe=($,z)=>{re($||"name"),oe(z),K(1)},le=r.useCallback(async($,z)=>{try{const se=$.map(ae=>parseInt(ae));await us(se,z),await G()}catch(se){throw se}},[G]),J=r.useCallback(async $=>{try{if(!$||$.length===0)throw new Error("No records selected for export");t.info("Export functionality coming soon")}catch(z){throw z}},[]),p=r.useCallback(async($,z)=>{if($==="generate_ideas")try{const se=await Lt([z.id]);se.success&&se.task_id?te.openModal(se.task_id,"Generating Ideas"):se.success&&se.ideas_created?(t.success(se.message||"Ideas generated successfully"),await G()):t.error(se.error||"Failed to generate ideas")}catch(se){t.error(`Failed to generate ideas: ${se.message}`)}},[t,te,G]),_=r.useCallback(async($,z)=>{if($==="auto_generate_ideas"){if(z.length===0){t.error("Please select at least one cluster to generate ideas");return}if(z.length>5){t.error("Maximum 5 clusters allowed for idea generation");return}try{const se=z.map(Ne=>parseInt(Ne)),ae=await Lt(se);ae.success?ae.task_id?te.openModal(ae.task_id,"Generating Content Ideas"):(t.success(`Ideas generation complete: ${ae.ideas_created||0} ideas created`),await G()):t.error(ae.error||"Failed to generate ideas")}catch(se){t.error(`Failed to generate ideas: ${se.message}`)}}else t.info(`Bulk action "${$}" for ${z.length} items`)},[t,G,te]);r.useEffect(()=>{const $=z=>{i.current&&!i.current.contains(z.target)&&S.current&&!S.current.contains(z.target)&&q(!1)};return b&&document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[b]);const I=r.useMemo(()=>js({activeSector:s,formData:H,setFormData:ee,searchTerm:d,setSearchTerm:h,statusFilter:u,setStatusFilter:g,difficultyFilter:n,setDifficultyFilter:j,volumeMin:O,volumeMax:F,setVolumeMin:P,setVolumeMax:ne,isVolumeDropdownOpen:b,setIsVolumeDropdownOpen:q,tempVolumeMin:D,tempVolumeMax:E,setTempVolumeMin:C,setTempVolumeMax:A,volumeButtonRef:S,volumeDropdownRef:i,setCurrentPage:K,loadClusters:G}),[s,H,d,u,n,O,F,b,D,E,G]),me=r.useMemo(()=>I!=null&&I.headerMetrics?I.headerMetrics.map($=>({label:$.label,value:$.calculate({clusters:l,totalCount:L}),accentColor:$.accentColor})):[],[I==null?void 0:I.headerMetrics,l,L]),he=r.useCallback(()=>{ee({name:"",description:"",status:"active"}),x(!1),W(null)},[]),ue=async()=>{try{w&&V?(await fs(V.id,H),t.success("Cluster updated successfully")):(await hs(H),t.success("Cluster created successfully")),N(!1),he(),G()}catch($){t.error(`Failed to save: ${$.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(at,{title:"Keyword Clusters",titleIcon:e.jsx(Rt,{className:"text-success-500 size-5"}),subtitle:"Organize keywords into content clusters for better SEO strategy",columns:I.columns,data:l,loading:f,showContent:be,filters:I.filters,filterValues:{search:d,status:u,difficulty:n,volumeMin:O,volumeMax:F},onFilterChange:($,z)=>{const se=z==null?"":String(z);$==="search"?h(se):$==="status"?g(se):$==="difficulty"&&j(se),K(1)},onEdit:$=>{W($),ee({name:$.name||"",description:$.description||"",status:$.status||"active"}),x(!0),N(!0)},onCreate:()=>{he(),N(!0)},createLabel:"Create Cluster",onCreateIcon:e.jsx(Ve,{}),onDelete:async $=>{await gs($),G()},onBulkDelete:async $=>{const z=await ms($);return G(),z},onBulkExport:J,onBulkUpdateStatus:le,onBulkAction:_,onRowAction:p,getItemDisplayName:$=>$.name,onExport:async()=>{t.info("Export functionality coming soon")},onExportIcon:e.jsx(yt,{}),selectionLabel:"cluster",pagination:{currentPage:M,totalPages:Q,totalCount:L,onPageChange:K},selection:{selectedIds:T,onSelectionChange:Z},sorting:{sortBy:X,sortDirection:ie,onSort:fe},headerMetrics:me,onFilterReset:()=>{h(""),g(""),j(""),P(""),ne(""),K(1)}}),e.jsx(Ct,{isOpen:te.isOpen,title:te.title,percentage:te.progress.percentage,status:te.progress.status,message:te.progress.message,details:te.progress.details,taskId:te.taskId||void 0,onClose:()=>{const $=te.progress.status==="completed";te.closeModal(),$&&G()}}),e.jsx(Nt,{isOpen:ge,onClose:()=>{N(!1),he()},onSubmit:ue,title:w?"Edit Cluster":"Add Cluster",submitLabel:w?"Update":"Create",fields:I.formFields()})]})}const br=Object.freeze(Object.defineProperty({__proto__:null,default:Zs},Symbol.toStringTag,{value:"Module"}));function er(){const t=Ue(),{activeSector:s}=Oe(),{pageSize:a}=qe(),[l,c]=r.useState([]),[f,m]=r.useState([]),[d,h]=r.useState(!0),[u,g]=r.useState(""),[n,j]=r.useState(""),[O,P]=r.useState(""),[F,ne]=r.useState(""),[b,q]=r.useState(""),[D,C]=r.useState([]),[E,A]=r.useState(1),[i,S]=r.useState(1),[T,Z]=r.useState(0),[M,K]=r.useState("created_at"),[Q,Y]=r.useState("desc"),[L,R]=r.useState(!1),[X,re]=r.useState(!1),[ie,oe]=r.useState(!1),[be,we]=r.useState(null),[ge,N]=r.useState({idea_title:"",description:"",content_structure:"blog_post",content_type:"blog_post",target_keywords:"",keyword_cluster_id:null,status:"new",estimated_word_count:1e3}),w=_t();r.useEffect(()=>{(async()=>{try{const _=await tt({ordering:"name"});m(_.results||[])}catch(_){console.error("Error fetching clusters:",_)}})()},[]);const x=r.useCallback(async()=>{h(!0),R(!1);try{const p=M?`${Q==="desc"?"-":""}${M}`:"-created_at",_={...u&&{search:u},...n&&{status:n},...O&&{keyword_cluster_id:O},...F&&{content_structure:F},...b&&{content_type:b},page:E,page_size:a,ordering:p},I=await ps(_);c(I.results||[]),Z(I.count||0),S(Math.ceil((I.count||0)/a)),setTimeout(()=>{R(!0),h(!1)},100)}catch(p){console.error("Error loading ideas:",p),t.error(`Failed to load ideas: ${p.message}`),R(!0),h(!1)}},[E,n,O,F,b,M,Q,u,s,a]);r.useEffect(()=>{x()},[x]),r.useEffect(()=>{const p=()=>{x()},_=()=>{x()};return window.addEventListener("siteChanged",p),window.addEventListener("sectorChanged",_),()=>{window.removeEventListener("siteChanged",p),window.removeEventListener("sectorChanged",_)}},[x]),r.useEffect(()=>{A(1)},[a]),r.useEffect(()=>{const p=setTimeout(()=>{E===1?x():A(1)},500);return()=>clearTimeout(p)},[u,E,x]);const V=(p,_)=>{K(p||"created_at"),Y(_),A(1)},W=r.useCallback(async(p,_)=>{try{const I=p.map(me=>parseInt(me));await xs(I,_),await x()}catch(I){throw I}},[x]),H=r.useCallback(async p=>{try{if(!p||p.length===0)throw new Error("No records selected for export");t.info("Export functionality coming soon")}catch(_){throw _}},[]),ee=r.useCallback(async(p,_)=>{if(p==="queue_to_writer"){if(_.status!=="new"){t.error(`Only ideas with status "new" can be queued. Current status: ${_.status}`);return}try{const I=await Ot([_.id]);t.success(`Queue complete: ${I.created_count||0} task created`),await x()}catch(I){t.error(`Failed to queue idea: ${I.message}`)}}},[t,x]),te=r.useCallback(async(p,_)=>{if(p==="queue_to_writer"){if(_.length===0){t.error("Please select at least one idea to queue");return}try{const I=_.map(he=>parseInt(he)),me=await Ot(I);t.success(`Queue complete: ${me.created_count||0} tasks created from ${_.length} ideas`),await x()}catch(I){t.error(`Failed to queue ideas: ${I.message}`)}}else t.info(`Bulk action "${p}" for ${_.length} items`)},[t,x]),G=r.useMemo(()=>_s({clusters:f,activeSector:s,formData:ge,setFormData:N,searchTerm:u,setSearchTerm:g,statusFilter:n,setStatusFilter:j,clusterFilter:O,setClusterFilter:P,structureFilter:F,setStructureFilter:ne,typeFilter:b,setTypeFilter:q,setCurrentPage:A}),[f,s,ge,u,n,O,F,b]),fe=r.useMemo(()=>G!=null&&G.headerMetrics?G.headerMetrics.map(p=>({label:p.label,value:p.calculate({ideas:l,totalCount:T}),accentColor:p.accentColor})):[],[G==null?void 0:G.headerMetrics,l,T]),le=r.useCallback(()=>{N({idea_title:"",description:"",content_structure:"blog_post",content_type:"blog_post",target_keywords:"",keyword_cluster_id:null,status:"new",estimated_word_count:1e3}),oe(!1),we(null)},[]),J=async()=>{try{ie&&be?(await ws(be.id,ge),t.success("Idea updated successfully")):(await vs(ge),t.success("Idea created successfully")),re(!1),le(),x()}catch(p){t.error(`Failed to save: ${p.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(at,{title:"Content Ideas",titleIcon:e.jsx(pt,{className:"text-warning-500 size-5"}),subtitle:"Generate and organize content ideas based on keyword research",columns:G.columns,data:l,loading:d,showContent:L,filters:G.filters,filterValues:{search:u,status:n,keyword_cluster_id:O,content_structure:F,content_type:b},onFilterChange:(p,_)=>{const I=_==null?"":String(_);p==="search"?g(I):p==="status"?j(I):p==="keyword_cluster_id"?P(I):p==="content_structure"?ne(I):p==="content_type"&&q(I),A(1)},onEdit:p=>{we(p),N({idea_title:p.idea_title||"",description:p.description||"",content_structure:p.content_structure||"blog_post",content_type:p.content_type||"blog_post",target_keywords:p.target_keywords||"",keyword_cluster_id:p.keyword_cluster_id||null,status:p.status||"new",estimated_word_count:p.estimated_word_count||1e3}),oe(!0),re(!0)},onCreate:()=>{le(),re(!0)},createLabel:"Add Idea",onCreateIcon:e.jsx(Ve,{}),onDelete:async p=>{await bs(p),x()},onBulkDelete:async p=>{const _=await ys(p);return x(),_},onBulkExport:H,onBulkUpdateStatus:W,onBulkAction:te,onRowAction:ee,getItemDisplayName:p=>p.idea_title,onExport:async()=>{t.info("Export functionality coming soon")},onExportIcon:e.jsx(yt,{}),selectionLabel:"idea",pagination:{currentPage:E,totalPages:i,totalCount:T,onPageChange:A},selection:{selectedIds:D,onSelectionChange:C},sorting:{sortBy:M,sortDirection:Q,onSort:V},headerMetrics:fe,onFilterReset:()=>{g(""),j(""),P(""),ne(""),q(""),A(1)}}),e.jsx(Ct,{isOpen:w.isOpen,title:w.title,percentage:w.progress.percentage,status:w.progress.status,message:w.progress.message,details:w.progress.details,taskId:w.taskId||void 0,onClose:()=>{const p=w.progress.status==="completed";w.closeModal(),p&&x()}}),e.jsx(Nt,{isOpen:X,onClose:()=>{re(!1),le()},onSubmit:J,title:ie?"Edit Idea":"Add Idea",submitLabel:ie?"Update":"Create",fields:G.formFields(f)})]})}const wr=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"}));function tr(){const t=Ue(),{activeSite:s}=St(),{activeSector:a,loadSectorsForSite:l}=Oe(),{pageSize:c}=qe(),[f,m]=r.useState([]),[d,h]=r.useState(!0),[u,g]=r.useState(!1),[n,j]=r.useState([]),O=r.useRef(new Set),[P,F]=r.useState(1),[ne,b]=r.useState(1),[q,D]=r.useState(0),[C,E]=r.useState("keyword"),[A,i]=r.useState("asc"),[S,T]=r.useState(""),[Z,M]=r.useState(""),[K,Q]=r.useState(""),[Y,L]=r.useState(""),[R,X]=r.useState("");r.useEffect(()=>{s!=null&&s.id&&l(s.id)},[s==null?void 0:s.id]);const re=r.useCallback(async()=>{if(!s||!s.industry){m([]),D(0),b(1),h(!1);return}h(!0),g(!1);try{let N=new Set;try{const{fetchKeywords:J,fetchSiteSectors:p}=await Me(async()=>{const{fetchKeywords:I,fetchSiteSectors:me}=await import("./page-dashboard-DxYTR5eF.js").then(he=>he.a7);return{fetchKeywords:I,fetchSiteSectors:me}},__vite__mapDeps([0,1,2,3,4,5,6])),_=await p(s.id);for(const I of _)try{((await J({site_id:s.id,sector_id:I.id,page_size:1e3})).results||[]).forEach(he=>{const ue=he.seed_keyword_id||he.seed_keyword&&he.seed_keyword.id;ue&&N.add(Number(ue))})}catch(me){console.warn(`Could not fetch attached keywords for sector ${I.id}:`,me)}}catch(J){console.warn("Could not fetch sectors or attached keywords:",J)}const w={industry:s.industry,page_size:1e3};a&&a.industry_sector&&(w.sector=a.industry_sector),S&&(w.search=S),Z&&(w.intent=Z);let x=[],V=1,W=!0;for(;W;){const J={...w,page:V},p=await ft(J);if(p.results&&p.results.length>0&&(x=[...x,...p.results]),W=p.next!==null&&p.next!==void 0,V++,V>100){console.warn("Reached maximum page limit (100) while fetching seed keywords");break}}let H=x.map(J=>{const p=N.has(Number(J.id))||O.current.has(Number(J.id));return{...J,isAdded:!!p}});if(K){const J=parseInt(K),p=wt(J);if(p!==null){const _=vt(p);_&&(H=H.filter(I=>I.difficulty>=_.min&&I.difficulty<=_.max))}}Y!==""&&Y!==null&&Y!==void 0&&(H=H.filter(J=>J.volume>=Number(Y))),R!==""&&R!==null&&R!==void 0&&(H=H.filter(J=>J.volume<=Number(R))),C&&H.sort((J,p)=>{let _,I;if(C==="keyword")_=J.keyword.toLowerCase(),I=p.keyword.toLowerCase();else if(C==="volume")_=J.volume,I=p.volume;else if(C==="difficulty")_=J.difficulty,I=p.difficulty;else if(C==="intent")_=J.intent.toLowerCase(),I=p.intent.toLowerCase();else return 0;return _I?A==="asc"?1:-1:0});const ee=H.length,te=c||10,G=(P-1)*te,fe=G+te,le=H.slice(G,fe);m(le),D(ee),b(Math.ceil(ee/te)),g(!0)}catch(N){console.error("Error loading seed keywords:",N),t.error(`Failed to load keyword opportunities: ${N.message}`),m([]),D(0),b(1)}finally{h(!1)}},[s,a,P,c,S,Z,K,Y,R,C,A]);r.useEffect(()=>{re()},[re]),r.useEffect(()=>{const N=setTimeout(()=>{F(1)},500);return()=>clearTimeout(N)},[S]),r.useEffect(()=>{F(1)},[c]);const ie=(N,w)=>{E(N||"keyword"),i(w),F(1)},oe=r.useCallback(async N=>{var x;if(!s){t.error("Please select an active site first");return}let w=a;if(!w)try{const{fetchSiteSectors:V}=await Me(async()=>{const{fetchSiteSectors:H}=await import("./page-dashboard-DxYTR5eF.js").then(ee=>ee.a7);return{fetchSiteSectors:H}},__vite__mapDeps([0,1,2,3,4,5,6])),W=await V(s.id);if(W.length===0){t.error("No sectors available for this site. Please create a sector first.");return}w={id:W[0].id,name:W[0].name,slug:W[0].slug,site_id:s.id,is_active:W[0].is_active!==!1,industry_sector:W[0].industry_sector||null}}catch(V){t.error(`Failed to get sectors: ${V.message}`);return}try{const V=await ks(N,s.id,w.id);V.success?(t.success(`Successfully added ${V.created} keyword(s) to workflow`),N.forEach(W=>{O.current.add(W)}),j([]),m(W=>W.map(H=>N.includes(H.id)?{...H,isAdded:!0}:H))):t.error(`Failed to add keywords: ${((x=V.errors)==null?void 0:x.join(", "))||"Unknown error"}`)}catch(V){t.error(`Failed to add keywords: ${V.message}`)}},[s,a,t]),be=r.useCallback(async N=>{if(N.length===0){t.error("Please select at least one keyword");return}const w=N.filter(V=>{const W=f.find(H=>String(H.id)===V);return W&&!W.isAdded});if(w.length===0){t.error("All selected keywords are already added to workflow");return}w.lengthparseInt(V));await oe(x)},[oe,t,f]),we=r.useCallback(async()=>{if(!s||!s.industry){t.error("Please select an active site first");return}try{const N={industry:s.industry,page_size:1e3};a!=null&&a.industry_sector&&(N.sector=a.industry_sector);const x=(await ft(N)).results||[];if(x.length===0){t.error("No keywords available to add");return}const{fetchKeywords:V,fetchSiteSectors:W}=await Me(async()=>{const{fetchKeywords:fe,fetchSiteSectors:le}=await import("./page-dashboard-DxYTR5eF.js").then(J=>J.a7);return{fetchKeywords:fe,fetchSiteSectors:le}},__vite__mapDeps([0,1,2,3,4,5,6])),H=await W(s.id);let ee=new Set;for(const fe of H)try{((await V({site_id:s.id,sector_id:fe.id,page_size:1e3})).results||[]).forEach(J=>{const p=J.seed_keyword_id||J.seed_keyword&&J.seed_keyword.id;p&&ee.add(Number(p))})}catch(le){console.warn(`Could not fetch attached keywords for sector ${fe.id}:`,le)}const te=x.filter(fe=>!ee.has(fe.id));if(te.length===0){t.error("All keywords are already added to workflow");return}te.lengthfe.id);await oe(G)}catch(N){t.error(`Failed to load all keywords: ${N.message}`)}},[s,a,oe,t]),ge=r.useMemo(()=>({columns:[{key:"keyword",label:"Keyword",sortable:!0,sortField:"keyword"},...!a?[{key:"sector_name",label:"Sector",sortable:!1,render:(w,x)=>e.jsx(ut,{color:"info",size:"sm",variant:"light",children:x.sector_name||"-"})}]:[],{key:"volume",label:"Volume",sortable:!0,sortField:"volume",render:w=>w.toLocaleString()},{key:"difficulty",label:"Difficulty",sortable:!0,sortField:"difficulty",align:"center",render:w=>{const x=Ss(w),V=typeof x=="number"&&x===5?"solid":typeof x=="number"&&(x===2||x===3||x===4)?"light":typeof x=="number"&&x===1?"solid":"light",W=typeof x=="number"&&x===1||typeof x=="number"&&x===2?"success":typeof x=="number"&&x===3?"warning":typeof x=="number"&&x===4||typeof x=="number"&&x===5?"error":"light";return typeof x=="number"?e.jsx(ut,{color:W,variant:V,size:"sm",children:x}):x}},{key:"intent",label:"Intent",sortable:!0,sortField:"intent",render:w=>{const x=V=>{const W=(V==null?void 0:V.toLowerCase())||"";return W==="transactional"||W==="commercial"?"success":W==="navigational"?"warning":"info"};return e.jsx(ut,{color:x(w),size:"sm",variant:(w==null?void 0:w.toLowerCase())==="informational"?"light":void 0,children:w})}}],filters:[{key:"search",label:"Search",type:"text",placeholder:"Search keywords..."},{key:"intent",label:"Intent",type:"select",options:[{value:"",label:"All Intent"},{value:"informational",label:"Informational"},{value:"navigational",label:"Navigational"},{value:"transactional",label:"Transactional"},{value:"commercial",label:"Commercial"}]},{key:"difficulty",label:"Difficulty",type:"select",options:[{value:"",label:"All Difficulty"},{value:"1",label:"1 - Very Easy"},{value:"2",label:"2 - Easy"},{value:"3",label:"3 - Medium"},{value:"4",label:"4 - Hard"},{value:"5",label:"5 - Very Hard"}]}]}),[a]);return e.jsx(e.Fragment,{children:e.jsx(at,{title:"Keyword Opportunities",titleIcon:e.jsx(pt,{className:"text-brand-500 size-5"}),subtitle:"Discover and add keywords to your workflow",columns:ge.columns,data:f,loading:d,showContent:u,filters:ge.filters,filterValues:{search:S,intent:Z,difficulty:K},onFilterChange:(N,w)=>{const x=w==null?"":String(w);N==="search"?T(x):N==="intent"?(M(x),F(1)):N==="difficulty"&&(Q(x),F(1))},onRowAction:async(N,w)=>{if(N==="add_to_workflow"){if(w.isAdded){t.info("This keyword is already added to workflow");return}await oe([w.id])}},onBulkAction:async(N,w)=>{N==="add_selected_to_workflow"&&await be(w)},onCreate:we,createLabel:"Add All to Workflow",onCreateIcon:e.jsx(Ve,{}),pagination:{currentPage:P,totalPages:ne,totalCount:q,onPageChange:F},sorting:{sortBy:C,sortDirection:A,onSort:ie},selection:{selectedIds:n,onSelectionChange:j}})})}const vr=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"}));export{br as C,xr as D,Nt as F,pr as H,wr as I,yr as K,Le as P,rt as S,at as T,qe as a,_t as b,Ct as c,$s as d,St as e,vr as f,Oe as u}; diff --git a/frontend/dist/assets/js/pages-settings-Da7wPw3M.js b/frontend/dist/assets/js/pages-settings-GUQ4SeDJ.js similarity index 99% rename from frontend/dist/assets/js/pages-settings-Da7wPw3M.js rename to frontend/dist/assets/js/pages-settings-GUQ4SeDJ.js index 77123bfd..d3c8ad1c 100644 --- a/frontend/dist/assets/js/pages-settings-Da7wPw3M.js +++ b/frontend/dist/assets/js/pages-settings-GUQ4SeDJ.js @@ -1,4 +1,4 @@ -import{r as o,j as e}from"./vendor-react-core-DjsjKnCi.js";import{P,C as u}from"./page-analytics.tsx-1KCk8AGD.js";import{c as It,p as At}from"./vendor-state-CYwAWrAU.js";import{G as Pt,H as Mt,I as Dt,J as Rt,K as $t,L as Ft,M as Ot,i as Y,f as Tt,g as Et,N as ft,O as Ne,h as zt,P as Bt,Q as Gt,R as Wt}from"./page-dashboard-DxYTR5eF.js";import{u as q}from"./page-reference-aC0iABvU.js";import{L as J,B as f,C as jt,o as E,r as ae}from"./page-authpages-CY7hjDHU.js";import{C as ee,M as ge,b as Ce,c as Se,d as Vt,e as Ut,D as Te,a as ie,A as be,P as _e}from"./page-components.tsx-DYfg5dka.js";import{B as C}from"./page-clusters.config.tsx-9GAd-_h-.js";import{S as xe,F as ye,P as X}from"./pages-planner-COGkFLJh.js";import{L as _t}from"./vendor-react-router-BJY_70Cr.js";const Ht=It()(At((t,s)=>({accountSettings:{},moduleSettings:{},loading:!1,error:null,loadAccountSettings:async()=>{t({loading:!0,error:null});try{const a=await Ot(),r={};a.results.forEach(i=>{r[i.key]=i}),t({accountSettings:r,loading:!1})}catch(a){t({error:a.message,loading:!1})}},loadAccountSetting:async a=>{try{const r=await Ft(a);t(i=>({accountSettings:{...i.accountSettings,[a]:r}}))}catch(r){t({error:r.message})}},updateAccountSetting:async(a,r)=>{t({loading:!0,error:null});try{const i=s().accountSettings[a];let l;i?l=await Rt(a,{config:r}):l=await $t({key:a,config:r}),t(n=>({accountSettings:{...n.accountSettings,[a]:l},loading:!1}))}catch(i){throw t({error:i.message,loading:!1}),i}},loadModuleSettings:async a=>{t({loading:!0,error:null});try{const r=await Dt(a),i={};r.forEach(l=>{i[l.key]=l}),t(l=>({moduleSettings:{...l.moduleSettings,[a]:i},loading:!1}))}catch(r){t({error:r.message,loading:!1})}},updateModuleSetting:async(a,r,i)=>{var l;t({loading:!0,error:null});try{const n=(l=s().moduleSettings[a])==null?void 0:l[r];let x;n?x=await Pt(a,r,{config:i}):x=await Mt({module_name:a,key:r,config:i}),t(g=>({moduleSettings:{...g.moduleSettings,[a]:{...g.moduleSettings[a]||{},[r]:x}},loading:!1}))}catch(n){throw t({error:n.message,loading:!1}),n}},reset:()=>{t({accountSettings:{},moduleSettings:{},loading:!1,error:null})}}),{name:"settings-storage",partialize:t=>({accountSettings:t.accountSettings,moduleSettings:t.moduleSettings})}));function Zt(){const t=q(),{accountSettings:s,loading:a,loadAccountSettings:r,updateAccountSetting:i}=Ht(),[l,n]=o.useState({records_per_page:20,default_sort:"created_at",default_sort_direction:"desc"});o.useEffect(()=>{r()},[r]),o.useEffect(()=>{s.table_settings&&n(s.table_settings.config)},[s]);const x=async()=>{try{await i("table_settings",l),t.success("Settings saved successfully")}catch(g){t.error(`Failed to save settings: ${g.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"General Settings - IGNY8",description:"Plugin configuration"}),e.jsx(u,{title:"General Settings",desc:"Configure plugin settings, automation, and table preferences",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"Table Settings"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(J,{htmlFor:"records_per_page",children:"Records Per Page"}),e.jsx("input",{id:"records_per_page",type:"number",min:"5",max:"100",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:l.records_per_page,onChange:g=>n({...l,records_per_page:parseInt(g.target.value)||20})})]}),e.jsxs("div",{children:[e.jsx(J,{htmlFor:"default_sort",children:"Default Sort Field"}),e.jsx("input",{id:"default_sort",type:"text",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:l.default_sort,onChange:g=>n({...l,default_sort:g.target.value})})]}),e.jsxs("div",{children:[e.jsx(J,{htmlFor:"default_sort_direction",children:"Default Sort Direction"}),e.jsxs("select",{id:"default_sort_direction",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-brand-800",value:l.default_sort_direction,onChange:g=>n({...l,default_sort_direction:g.target.value}),children:[e.jsx("option",{value:"asc",children:"Ascending"}),e.jsx("option",{value:"desc",children:"Descending"})]})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(f,{onClick:x,disabled:a,className:"px-6",children:a?"Saving...":"Save Settings"})})]})})]})}const dr=Object.freeze(Object.defineProperty({__proto__:null,default:Zt},Symbol.toStringTag,{value:"Module"}));function Kt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/auth/users/");a(n.results||[])}catch(n){t.error(`Failed to load users: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Users"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Users"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage account users and permissions"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Email"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Username"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Role"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800",children:[e.jsx("td",{className:"py-3 px-4 text-sm text-gray-900 dark:text-white",children:n.email}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:n.username}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:"primary",children:n.role})}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:n.is_active?"success":"dark",children:n.is_active?"Active":"Inactive"})})]},n.id))})]})})})]})}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:Kt},Symbol.toStringTag,{value:"Module"}));function qt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const x=await Y("/v1/auth/subscriptions/");a(x.results||[])}catch(x){t.error(`Failed to load subscriptions: ${x.message}`)}finally{i(!1)}},n=x=>{switch(x){case"active":return"success";case"past_due":return"warning";case"canceled":return"error";default:return"primary"}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Subscriptions"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Subscriptions"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage account subscriptions"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Account"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Period Start"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Period End"})]})}),e.jsx("tbody",{children:s.map(x=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800",children:[e.jsx("td",{className:"py-3 px-4 text-sm text-gray-900 dark:text-white",children:x.account_name}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:n(x.status),children:x.status})}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:new Date(x.current_period_start).toLocaleDateString()}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:new Date(x.current_period_end).toLocaleDateString()})]},x.id))})]})})})]})}const xr=Object.freeze(Object.defineProperty({__proto__:null,default:qt},Symbol.toStringTag,{value:"Module"}));function Yt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/system/");a(n.results||[])}catch(n){t.error(`Failed to load system settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"System Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"System Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Global platform-wide settings"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"System settings management interface coming soon."})})]})}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:Yt},Symbol.toStringTag,{value:"Module"}));function Jt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/account/");a(n.results||[])}catch(n){t.error(`Failed to load account settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Account Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Account Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Account-level configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Account settings management interface coming soon."})})]})}const gr=Object.freeze(Object.defineProperty({__proto__:null,default:Jt},Symbol.toStringTag,{value:"Module"}));function Qt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/modules/");a(n.results||[])}catch(n){t.error(`Failed to load module settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Module Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Module Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Module-specific configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Module settings management interface coming soon."})})]})}const ur=Object.freeze(Object.defineProperty({__proto__:null,default:Qt},Symbol.toStringTag,{value:"Module"}));function Xt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/ai/");a(n.results||[])}catch(n){t.error(`Failed to load AI settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"AI Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"AI Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"AI-specific configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"AI settings management interface coming soon."})})]})}const hr=Object.freeze(Object.defineProperty({__proto__:null,default:Xt},Symbol.toStringTag,{value:"Module"})),yt=()=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-success-500",children:e.jsx("path",{d:"M13.4017 4.35986L6.12166 11.6399L2.59833 8.11657",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),Le=()=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-gray-400",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.05394 4.78033C3.76105 4.48744 3.76105 4.01256 4.05394 3.71967C4.34684 3.42678 4.82171 3.42678 5.1146 3.71967L8.33437 6.93944L11.5521 3.72173C11.845 3.42883 12.3199 3.42883 12.6127 3.72173C12.9056 4.01462 12.9056 4.48949 12.6127 4.78239L9.39503 8.0001L12.6127 11.2178C12.9056 11.5107 12.9056 11.9856 12.6127 12.2785C12.3198 12.5713 11.845 12.5713 11.5521 12.2785L8.33437 9.06076L5.11462 12.2805C4.82173 12.5734 4.34685 12.5734 4.05396 12.2805C3.76107 11.9876 3.76107 11.5127 4.05396 11.2199L7.27371 8.0001L4.05394 4.78033Z",fill:"currentColor"})});function ve({variant:t="1",title:s,subtitle:a,plans:r,showToggle:i=!1,onPlanSelect:l,className:n=""}){const[x,g]=o.useState("monthly"),N=d=>{d.disabled||l==null||l(d)},T=d=>typeof d=="number"?d.toFixed(2):d,_=d=>{const w=typeof d.monthlyPrice=="number"?d.monthlyPrice:typeof d.price=="number"?d.price:parseFloat(String(d.price||0));if(x==="annually"&&i){const j=w*12*.8,S=w*12;return{price:j,originalPrice:S}}return{price:w}};return t==="1"?e.jsxs("div",{className:`space-y-6 ${n}`,children:[s&&e.jsx("div",{className:"mx-auto w-full max-w-[385px]",children:e.jsx("h2",{className:"font-bold text-center text-gray-800 mb-7 text-title-sm dark:text-white/90",children:s})}),i&&e.jsx("div",{className:"mb-10 text-center",children:e.jsxs("div",{className:"relative inline-flex p-1 mx-auto bg-gray-200 rounded-full z-1 dark:bg-gray-800",children:[e.jsx("span",{className:`absolute top-1/2 -z-1 flex h-11 w-[120px] -translate-y-1/2 rounded-full bg-white shadow-theme-xs duration-200 ease-linear dark:bg-white/10 ${x==="monthly"?"translate-x-0":"translate-x-[120px]"}`}),e.jsx("button",{onClick:()=>g("monthly"),className:`flex h-11 w-[120px] items-center justify-center text-base font-medium transition-colors ${x==="monthly"?"text-gray-800 dark:text-white/90":"text-gray-500 hover:text-gray-700 dark:hover:text-white/80 dark:text-gray-400"}`,children:"Monthly"}),e.jsx("button",{onClick:()=>g("annually"),className:`flex h-11 w-[120px] items-center justify-center text-base font-medium transition-colors ${x==="annually"?"text-gray-800 dark:text-white/90":"text-gray-500 hover:text-gray-700 dark:hover:text-white/80 dark:text-gray-400"}`,children:"Annually"})]})}),e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:gap-6",children:r.map((d,w)=>{const j=d.highlighted||!1,S=_(d),I=x==="annually"&&i?"/year":d.period||"/month";return e.jsxs("div",{className:`rounded-2xl border p-6 flex flex-col ${j?"bg-gray-800 border-gray-800 dark:border-white/10 dark:bg-white/10":"border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]"}`,children:[e.jsx("span",{className:`block mb-3 font-semibold text-theme-xl ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:d.name}),e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-end",children:[e.jsxs("h2",{className:`font-bold text-title-md ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:["$",T(S.price)]}),e.jsx("span",{className:`inline-block mb-1 text-sm ${j?"text-white/70":"text-gray-500 dark:text-gray-400"}`,children:I})]}),(S.originalPrice||d.originalPrice)&&e.jsxs("span",{className:`font-semibold line-through text-theme-xl ${j?"text-gray-300":"text-gray-400"}`,children:["$",T(S.originalPrice||d.originalPrice||0)]})]}),d.description&&e.jsx("p",{className:`text-sm ${j?"text-white/70":"text-gray-500 dark:text-gray-400"}`,children:d.description}),e.jsx("div",{className:`w-full h-px my-6 ${j?"bg-white/20":"bg-gray-200 dark:bg-gray-800"}`}),e.jsx("ul",{className:"mb-8 space-y-3 flex-grow",children:d.features.map((h,O)=>{const $=h.startsWith("!"),Z=$?h.substring(1):h;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${j?"text-white/80":$?"text-gray-400":"text-gray-500 dark:text-gray-400"}`,children:[$?e.jsx(Le,{}):e.jsx(yt,{}),Z]},O)})}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium text-white shadow-theme-xs transition-colors mt-auto ${j?"bg-brand-500 hover:bg-brand-600 dark:hover:bg-brand-600":"bg-gray-800 hover:bg-brand-500 dark:bg-white/10 dark:hover:bg-brand-600"} ${d.disabled?"opacity-50 cursor-not-allowed":""}`,children:d.buttonText||"Choose Plan"})]},d.id||w)})})]}):t==="2"?e.jsx("div",{className:`space-y-6 ${n}`,children:e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 xl:gap-6",children:r.map((d,w)=>{const j=d.highlighted||w===1;return e.jsxs("div",{className:`rounded-2xl border p-6 xl:p-8 ${j?"border-2 border-brand-500 bg-white dark:border-brand-500 dark:bg-white/[0.03]":"border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between -mb-4",children:[e.jsx("span",{className:"block font-semibold text-gray-800 text-theme-xl dark:text-white/90",children:d.name}),d.icon&&e.jsx("span",{className:"flex h-[56px] dark:bg-brand-500/10 w-[56px] items-center justify-center rounded-[10.5px] bg-brand-50 text-brand-500",children:d.icon})]}),e.jsxs("div",{className:"flex items-end",children:[e.jsxs("h2",{className:"font-bold text-gray-800 text-title-md dark:text-white/90",children:["$",T(d.price)]}),e.jsx("span",{className:"inline-block mb-1 text-sm text-gray-500 dark:text-gray-400",children:d.period||" / Lifetime"})]}),d.description&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:d.description}),e.jsx("div",{className:"w-full h-px my-6 bg-gray-200 dark:bg-gray-800"}),e.jsx("ul",{className:"mb-8 space-y-3",children:d.features.map((S,I)=>{const h=S.startsWith("!"),O=h?S.substring(1):S;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${h?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,children:[h?e.jsx(Le,{}):e.jsx(yt,{}),O]},I)})}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium text-white shadow-theme-xs transition-colors ${j?"bg-brand-500 hover:bg-brand-600":"bg-gray-800 hover:bg-brand-500 dark:bg-white/10 dark:hover:bg-brand-600"} ${d.disabled?"opacity-50 cursor-not-allowed":""}`,children:d.buttonText||(j?"Choose This Plan":"Choose Starter")})]},d.id||w)})})}):t==="3"?e.jsx("div",{className:`space-y-6 ${n}`,children:e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 xl:gap-3 2xl:grid-cols-4",children:r.map((d,w)=>{const j=d.recommended||w===2;return e.jsx("div",{children:e.jsxs("div",{className:`rounded-2xl p-6 ${j?"relative bg-brand-500":"bg-white dark:bg-white/[0.03]"}`,children:[j&&e.jsx("div",{className:"absolute px-3 py-1 font-medium text-white rounded-lg right-4 top-4 -z-1 bg-white/10 text-theme-xs",children:"Recommended"}),e.jsx("span",{className:`block font-semibold text-theme-xl ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:d.name}),d.description&&e.jsx("p",{className:`mt-1 text-sm ${j?"text-white/90":"text-gray-500 dark:text-gray-400"}`,children:d.description}),e.jsx("h2",{className:`mb-0.5 mt-4 text-title-sm font-bold ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:typeof d.price=="string"&&d.price.toLowerCase()==="free"?"Free":`$${T(d.price)}`}),e.jsx("span",{className:`inline-block mb-6 text-sm ${j?"text-white/90":"text-gray-500 dark:text-gray-400"}`,children:d.period||"For a Lifetime"}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex h-11 w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium shadow-theme-xs transition-colors ${j?"bg-white text-gray-800 hover:bg-gray-50":d.disabled?"border border-gray-300 bg-white text-gray-400 disabled:pointer-events-none dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-white/[0.03] dark:hover:text-gray-200":"bg-brand-500 text-white hover:bg-brand-600"}`,children:d.buttonText||(d.disabled?"Current Plan":"Try for Free")}),e.jsx("ul",{className:"mt-6 space-y-3",children:d.features.map((S,I)=>{const h=S.startsWith("!"),O=h?S.substring(1):S;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${j?"text-white":h?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,children:[h?e.jsx(Le,{}):e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:j?"text-white":"text-success-500",children:e.jsx("path",{d:"M13.4017 4.35986L6.12166 11.6399L2.59833 8.11657",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),O]},I)})})]})},d.id||w)})})}):null}const me=t=>t.toLocaleString(),es=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toString(),ts=t=>{const s=[];if(s.push(`${t.max_sites} ${t.max_sites===1?"Site":"Sites"}`),s.push(`${t.max_users} ${t.max_users===1?"User":"Users"}`),s.push(`${me(t.max_keywords)} Keywords`),s.push(`${me(t.max_clusters)} Clusters`),s.push(`${me(t.max_content_ideas)} Content Ideas`),s.push(`${es(t.monthly_word_count_limit)} Words/Month`),s.push(`${t.daily_content_tasks} Daily Content Tasks`),s.push(`${t.monthly_image_count} Images/Month`),t.image_model_choices&&t.image_model_choices.length>0){const a=t.image_model_choices.map(r=>r.toUpperCase()).join(", ");s.push(`${a} Image Models`)}return s.push(`${me(t.included_credits)} AI Credits Included`),s.push(`${me(t.monthly_ai_credit_limit)} Monthly AI Credit Limit`),t.features&&Array.isArray(t.features)&&(t.features.includes("ai_writer")&&s.push("AI Writer"),t.features.includes("image_gen")&&s.push("Image Generation"),t.features.includes("auto_publish")&&s.push("Auto Publish"),t.features.includes("custom_prompts")&&s.push("Custom Prompts")),s},ss=(t,s,a)=>{const r=typeof t.price=="number"?t.price:parseFloat(String(t.price||0)),i=t.slug.toLowerCase()==="growth";return{id:t.id,name:t.name,monthlyPrice:r,price:r,period:"/month",description:rs(t),features:ts(t),buttonText:"Choose Plan",highlighted:i}},rs=t=>{const s=t.slug.toLowerCase();return s.includes("free")?"Perfect for getting started":s.includes("starter")?"For solo designers & freelancers":s.includes("growth")?"For growing businesses":s.includes("scale")||s.includes("enterprise")?"For teams and large organizations":"Choose the perfect plan for your needs"};function as(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const N=((await Y("/v1/auth/plans/")).results||[]).filter(T=>T.is_active).sort((T,_)=>{const d=typeof T.price=="number"?T.price:parseFloat(String(T.price||0)),w=typeof _.price=="number"?_.price:parseFloat(String(_.price||0));return d-w});a(N)}catch(g){t.error(`Failed to load plans: ${g.message}`)}finally{i(!1)}},n=g=>{console.log("Selected plan:",g),t.success(`Selected plan: ${g.name}`)},x=s.map((g,N)=>ss(g,N,s.length));return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Plans"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Plans"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Choose the perfect plan for your needs. All plans include our core features."})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading plans..."})}):x.length===0?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"No active plans available"})}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{variant:"1",title:"Flexible Plans Tailored to Fit Your Unique Needs!",plans:x,showToggle:!0,onPlanSelect:n}),e.jsx("div",{className:"mt-8 text-center",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Need more details? View all features and limits for each plan."})})]})]})}const pr=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"}));function is(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Tt();a(n.industries||[])}catch(n){t.error(`Failed to load industries: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Industries"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Industries"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage global industry templates (Admin Only)"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map(n=>e.jsxs(ee,{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n.name}),e.jsx(C,{variant:"light",color:n.is_active?"success":"dark",children:n.is_active?"Active":"Inactive"})]}),n.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:n.description}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Sectors: ",n.sectors_count||0]})]},n.id))})]})}const br=Object.freeze(Object.defineProperty({__proto__:null,default:is},Symbol.toStringTag,{value:"Module"})),le=t=>{switch(t){case"healthy":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400";case"warning":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400";case"critical":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400";default:return"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-400"}};function ns(){var x,g,N,T,_,d,w,j,S,I,h,O,$,Z,W,A,R,U,F,H,c,p,v,M,k,b,y,L,G,z,D,ue,de,he,ce,m,V,Q,te,we,pe,Re,$e,Fe,Oe,Ee,ze,Be,Ge,We,Ve,Ue,He,Ze,Ke,qe,Ye,Je,Qe,Xe,et,tt,st,rt,at,it,nt,lt,ot,dt,ct,xt,mt,gt,ut,ht,pt,bt;const[t,s]=o.useState(null),[a,r]=o.useState(!0),[i,l]=o.useState(null),n=async()=>{try{const se=await Y("/v1/system/status/");s(se),l(null)}catch(se){l(se instanceof Error?se.message:"Unknown error")}finally{r(!1)}};return o.useEffect(()=>{n();const se=setInterval(n,3e4);return()=>clearInterval(se)},[]),a?e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsx(u,{title:"System Status",desc:"Loading system information...",children:e.jsx("div",{className:"text-center py-8",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 dark:border-white mx-auto"})})})]}):i||!t?e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsx(u,{title:"System Status",desc:"Error loading system information",children:e.jsx("div",{className:"text-center py-8 text-red-600 dark:text-red-400",children:i||"Failed to load system status"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(u,{title:"System Resources",desc:"CPU, Memory, and Disk Usage",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"CPU"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((g=(x=t.system)==null?void 0:x.cpu)==null?void 0:g.status)||"unknown")}`,children:((T=(N=t.system)==null?void 0:N.cpu)==null?void 0:T.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((d=(_=t.system)==null?void 0:_.cpu)==null?void 0:d.usage_percent)||0)<80?"bg-green-500":(((j=(w=t.system)==null?void 0:w.cpu)==null?void 0:j.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((I=(S=t.system)==null?void 0:S.cpu)==null?void 0:I.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[($=(O=(h=t.system)==null?void 0:h.cpu)==null?void 0:O.usage_percent)==null?void 0:$.toFixed(1),"% used (",(W=(Z=t.system)==null?void 0:Z.cpu)==null?void 0:W.cores," cores)"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Memory"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((R=(A=t.system)==null?void 0:A.memory)==null?void 0:R.status)||"unknown")}`,children:((F=(U=t.system)==null?void 0:U.memory)==null?void 0:F.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((c=(H=t.system)==null?void 0:H.memory)==null?void 0:c.usage_percent)||0)<80?"bg-green-500":(((v=(p=t.system)==null?void 0:p.memory)==null?void 0:v.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((k=(M=t.system)==null?void 0:M.memory)==null?void 0:k.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[(L=(y=(b=t.system)==null?void 0:b.memory)==null?void 0:y.used_gb)==null?void 0:L.toFixed(1)," GB / ",(D=(z=(G=t.system)==null?void 0:G.memory)==null?void 0:z.total_gb)==null?void 0:D.toFixed(1)," GB"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Disk"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((de=(ue=t.system)==null?void 0:ue.disk)==null?void 0:de.status)||"unknown")}`,children:((ce=(he=t.system)==null?void 0:he.disk)==null?void 0:ce.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((V=(m=t.system)==null?void 0:m.disk)==null?void 0:V.usage_percent)||0)<80?"bg-green-500":(((te=(Q=t.system)==null?void 0:Q.disk)==null?void 0:te.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((pe=(we=t.system)==null?void 0:we.disk)==null?void 0:pe.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[(Fe=($e=(Re=t.system)==null?void 0:Re.disk)==null?void 0:$e.used_gb)==null?void 0:Fe.toFixed(1)," GB / ",(ze=(Ee=(Oe=t.system)==null?void 0:Oe.disk)==null?void 0:Ee.total_gb)==null?void 0:ze.toFixed(1)," GB"]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx(u,{title:"Database",desc:"PostgreSQL Status",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Status"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((Be=t.database)==null?void 0:Be.status)||"unknown")}`,children:(Ge=t.database)!=null&&Ge.connected?"Connected":"Disconnected"})]}),((We=t.database)==null?void 0:We.version)&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Version:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:t.database.version.split(",")[0]})]}),((Ve=t.database)==null?void 0:Ve.size)&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Size:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:t.database.size})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Active Connections:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Ue=t.database)==null?void 0:Ue.active_connections)||0})]})]})}),e.jsx(u,{title:"Redis",desc:"Cache & Message Broker",children:e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Status"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((He=t.redis)==null?void 0:He.status)||"unknown")}`,children:(Ze=t.redis)!=null&&Ze.connected?"Connected":"Disconnected"})]})})}),e.jsx(u,{title:"Celery",desc:"Task Queue Workers",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Workers"}),e.jsxs("span",{className:`text-xs px-2 py-1 rounded ${le(((Ke=t.celery)==null?void 0:Ke.status)||"unknown")}`,children:[((qe=t.celery)==null?void 0:qe.worker_count)||0," active"]})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Active Tasks:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Je=(Ye=t.celery)==null?void 0:Ye.tasks)==null?void 0:Je.active)||0})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Scheduled:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Xe=(Qe=t.celery)==null?void 0:Qe.tasks)==null?void 0:Xe.scheduled)||0})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Reserved:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((tt=(et=t.celery)==null?void 0:et.tasks)==null?void 0:tt.reserved)||0})]})]})})]}),e.jsx(u,{title:"Process Monitoring",desc:"Resource usage by technology stack",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Stack"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Processes"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"CPU %"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Memory (MB)"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:Object.entries(((st=t.processes)==null?void 0:st.by_stack)||{}).map(([se,ke])=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 text-sm font-medium text-gray-800 dark:text-gray-200 capitalize",children:se}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:ke.count}),e.jsxs("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:[ke.cpu.toFixed(2),"%"]}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:ke.memory_mb.toFixed(2)})]},se))})]})})}),e.jsx(u,{title:"Module Statistics",desc:"Data counts by module",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Planner Module"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Keywords:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((it=(at=(rt=t.modules)==null?void 0:rt.planner)==null?void 0:at.keywords)==null?void 0:it.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Clusters:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((ot=(lt=(nt=t.modules)==null?void 0:nt.planner)==null?void 0:lt.clusters)==null?void 0:ot.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Content Ideas:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((xt=(ct=(dt=t.modules)==null?void 0:dt.planner)==null?void 0:ct.content_ideas)==null?void 0:xt.toLocaleString())||0})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Writer Module"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Tasks:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((ut=(gt=(mt=t.modules)==null?void 0:mt.writer)==null?void 0:gt.tasks)==null?void 0:ut.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Images:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((bt=(pt=(ht=t.modules)==null?void 0:ht.writer)==null?void 0:pt.images)==null?void 0:bt.toLocaleString())||0})]})]})]})]})}),e.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Last updated: ",new Date(t.timestamp).toLocaleString()]})]})]})}const fr=Object.freeze(Object.defineProperty({__proto__:null,default:ns},Symbol.toStringTag,{value:"Module"})),De=({label:t,defaultChecked:s=!1,checked:a,disabled:r=!1,onChange:i,color:l="blue"})=>{const n=a!==void 0,[x,g]=o.useState(s);o.useEffect(()=>{n&&a!==x&&g(a)},[a,n,x]),o.useEffect(()=>{!n&&s!==x&&g(s)},[s,n,x]);const N=n?a??!1:x,T=()=>{if(r)return;const d=!N;n||g(d),i&&i(d)},_=l==="blue"?{background:N?"bg-brand-500 ":"bg-gray-200 dark:bg-white/10",knob:N?"translate-x-full bg-white":"translate-x-0 bg-white"}:{background:N?"bg-gray-800 dark:bg-white/10":"bg-gray-200 dark:bg-white/10",knob:N?"translate-x-full bg-white":"translate-x-0 bg-white"};return e.jsxs("label",{className:`flex cursor-pointer select-none items-center gap-3 text-sm font-medium ${r?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,onClick:T,children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:`block transition duration-150 ease-linear h-6 w-11 rounded-full ${r?"bg-gray-100 pointer-events-none dark:bg-gray-800":_.background}`}),e.jsx("div",{className:`absolute left-0.5 top-0.5 h-5 w-5 rounded-full shadow-theme-sm duration-150 ease-linear transform ${_.knob}`})]}),t]})};function Lt(t){const{resourceId:s,getEndpoint:a,saveEndpoint:r,initialEnabled:i=!1,extractEnabled:l=A=>(A==null?void 0:A.enabled)??!1,buildPayload:n=(A,R)=>({...A,enabled:R}),onToggleSuccess:x,onToggleError:g,loadOnMount:N=!0}=t,[T,_]=o.useState(i),[d,w]=o.useState(!1),[j,S]=o.useState(null),[I,h]=o.useState(null),O=o.useCallback(async()=>{w(!0),S(null);try{const A=a.replace("{id}",s),R=await Y(A);if(R.success&&R.data){const U=R.data;h(U);const F=l(U);_(F)}else h({}),_(i)}catch(A){const R=A instanceof Error?A:new Error(String(A));S(R),console.error(`Error loading state for ${s}:`,R)}finally{w(!1)}},[s,a,l,i]),$=o.useCallback(async A=>{w(!0),S(null);try{const R=r.replace("{id}",s),U=n(I||{},A),F=await Y(R,{method:"POST",body:JSON.stringify(U)});if(F.success){const H={...I||{},enabled:A};h(H),_(A),x&&x(A,H)}else throw new Error(F.error||"Failed to save state")}catch(R){const U=R instanceof Error?R:new Error(String(R));S(U),console.error(`Error saving state for ${s}:`,U),g&&g(U)}finally{w(!1)}},[s,r,n,I,x,g]),Z=o.useCallback(async A=>{await $(A)},[$]),W=o.useCallback(async()=>{await O()},[O]);return o.useEffect(()=>{N&&O()},[N]),{enabled:T,toggle:Z,loading:d,error:j,data:I,refresh:W}}function vt({icon:t,title:s,description:a,enabled:r,validationStatus:i,onToggle:l,onSettings:n,onDetails:x,integrationId:g,getEndpoint:N,saveEndpoint:T,onToggleSuccess:_,onToggleError:d,modelName:w}){const j=q(),S=g?Lt({resourceId:g,getEndpoint:N||"/v1/system/settings/integrations/{id}/",saveEndpoint:T||"/v1/system/settings/integrations/{id}/save/",initialEnabled:!1,onToggleSuccess:(A,R)=>{j.success(`${g} ${A?"enabled":"disabled"}`),_&&_(A,R)},onToggleError:A=>{j.error(`Failed to update ${g}: ${A.message}`),d&&d(A)}}):null,I=S?S.enabled:r??!1,h=S?A=>{S.toggle(A)}:A=>{l&&l(A)},O=S?S.loading:!1,$=()=>!I||i==="not_configured"?"bg-gray-400 dark:bg-gray-500":i==="pending"?"bg-gray-400 dark:bg-gray-500 animate-pulse":i==="success"?"bg-green-500 dark:bg-green-600":i==="error"?"bg-red-500 dark:bg-red-600":"bg-gray-400 dark:bg-gray-500",W=!I||i==="not_configured"?{text:"Disabled",color:"text-gray-400 dark:text-gray-500",bold:!1}:i==="pending"?{text:"Pending",color:"text-gray-400 dark:text-gray-500",bold:!1}:i==="success"?{text:"Enabled",color:"text-gray-800 dark:text-white",bold:!0}:i==="error"?{text:"Error",color:"text-red-600 dark:text-red-400",bold:!1}:{text:"Disabled",color:"text-gray-400 dark:text-gray-500",bold:!1};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:t}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400",children:a}),g==="runware"?e.jsx("div",{className:"absolute top-5 right-5",children:e.jsx("span",{className:`text-sm font-semibold ${w?"text-gray-800 dark:text-white":"text-gray-400 dark:text-gray-500"}`,children:w||"Disabled"})}):e.jsxs("div",{className:"absolute top-5 right-5 flex items-center gap-2",children:[e.jsx("span",{className:`text-sm ${W.color} ${W.bold?"font-bold":""} transition-colors duration-200`,children:W.text}),e.jsx("div",{className:`w-[25px] h-[25px] rounded-full ${$()} transition-colors duration-200`,title:i==="not_configured"?"Not configured":i==="pending"?"Validating...":i==="success"?"Validated successfully":i==="error"?"Validation failed":"Unknown status"})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:n,className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:x,className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:I,disabled:O,onChange:h})]})]})}function wt({title:t,description:s,integrationId:a,icon:r}){var _;const[i,l]=o.useState(!1),[n,x]=o.useState(null),[g,N]=o.useState(!1);if(a!=="openai"&&a!=="runware")return null;const T=async(d=!1)=>{l(!0),N(d),x(null);try{const w=await Y(`/v1/system/settings/integrations/${a}/`);let j="",S="gpt-4.1";if(w.success&&w.data&&(j=w.data.apiKey||"",S=w.data.model||"gpt-4.1"),!j){x({success:!1,message:"API key not configured. Please configure your API key in settings first."}),l(!1);return}const I={apiKey:j};a==="openai"&&(I.config={model:S,with_response:d});const h=await Y(`/v1/system/settings/integrations/${a}/test/`,{method:"POST",body:JSON.stringify(I)});h.success?x({success:!0,message:h.message||"API connection successful!",model_used:h.model_used||h.model,response:h.response,tokens_used:h.tokens_used,total_tokens:h.total_tokens,cost:h.cost,full_response:h.full_response||{image_url:h.image_url,provider:h.provider,size:h.size}}):x({success:!1,message:h.error||h.message||"API connection failed"})}catch(w){x({success:!1,message:`API connection failed: ${w.message||"Unknown error"}`})}finally{l(!1)}};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-3",children:a==="openai"?e.jsxs(e.Fragment,{children:[e.jsx(f,{variant:"outline",onClick:()=>T(!1),disabled:i,className:"flex-1",children:i&&!g?"Testing...":"Test OpenAI Connection"}),e.jsx(f,{variant:"outline",onClick:()=>T(!0),disabled:i,className:"flex-1",children:i&&g?"Testing...":"Test OpenAI Response (Ping)"})]}):e.jsx(f,{variant:"outline",onClick:()=>T(!1),disabled:i,className:"flex-1",children:i?"Testing...":"Test Runware Connection"})}),n&&e.jsxs("div",{className:"space-y-3",children:[n.success&&e.jsxs("div",{className:"flex items-center gap-2 text-green-600 dark:text-green-400",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm font-medium",children:n.message})]}),!n.success&&e.jsxs("div",{className:"flex items-center gap-2 text-red-600 dark:text-red-400",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm font-medium",children:n.message})]}),n.success&&e.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border-l-4 border-blue-500 p-4 rounded",children:e.jsx("div",{className:"space-y-2 text-sm",children:a==="openai"&&g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Model Used:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white font-mono-custom",children:n.model_used||"N/A"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Expected:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:'"OK! Ping Received"'})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Actual Response:"})," ",e.jsxs("span",{className:"text-gray-900 dark:text-white",children:['"',n.response||"N/A",'"']})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Token Limit Sent:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"N/A (from your settings)"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Tokens Used:"})," ",e.jsxs("span",{className:"text-gray-900 dark:text-white",children:[n.tokens_used||"N/A"," (input/output)"]})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Total Tokens:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.total_tokens||"N/A"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Cost:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.cost||"$0.0000"})]})]}):a==="runware"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Provider:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"Runware"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Model:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white font-mono-custom",children:n.model_used||"runware:97@1"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Image Size:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"128 x 128 (test image)"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Cost:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.cost||"$0.0360"})]}),((_=n.full_response)==null?void 0:_.image_url)&&e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Test Image:"})," ",e.jsx("a",{href:n.full_response.image_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:"View Image"})]})]}):null})})]})]})})]})}function ls({title:t,description:s,integrationId:a,icon:r}){const i=q(),[l,n]=o.useState(!1),[x,g]=o.useState(""),[N,T]=o.useState("text, watermark, logo, overlay, title, caption, writing on walls, writing on objects, UI, infographic elements, post title"),[_,d]=o.useState("realistic"),[w,j]=o.useState("1024x1024"),[S,I]=o.useState("webp"),[h,O]=o.useState({}),$={"dall-e-3":["1024x1024","1024x1792","1792x1024"],"dall-e-2":["256x256","512x512","1024x1024"]},Z=()=>{const y=(h.service||"openai")==="openai"?h.model||"dall-e-3":null;return y&&$[y]?$[y]:$["dall-e-3"]};o.useEffect(()=>{const b=Z();b.length>0&&!b.includes(w)&&j(b[0])},[h.model,h.service]);const[W,A]=o.useState(null),[R,U]=o.useState(null),F="https://api.igny8.com/api";o.useEffect(()=>{(async()=>{try{const y=await fetch(`${F}/v1/system/settings/integrations/image_generation/`,{credentials:"include"});if(y.ok){const L=await y.json();L.success&&L.data&&O(L.data)}}catch(y){console.error("Error loading image settings:",y)}})()},[F]);const H=async()=>{if(console.log("[ImageGenerationCard] handleGenerate called"),!x.trim()){i.error("Please enter a prompt description");return}n(!0),U(null),A(null);try{const b=h.service||"openai",y=b==="openai"?h.model||"dall-e-3":h.runwareModel||"runware:97@1";console.log("[ImageGenerationCard] Service and model:",{service:b,model:y,imageSettings:h});const L=`Create a high-quality ${_} image. ${x}`;console.log("[ImageGenerationCard] Full prompt:",L.substring(0,100)+"...");const G={prompt:L,negative_prompt:N,image_type:_,image_size:w,image_format:S,provider:b,model:y};console.log("[ImageGenerationCard] Making request to image generation endpoint"),console.log("[ImageGenerationCard] Request body:",G);const z=await Y("/v1/system/settings/integrations/image_generation/generate/",{method:"POST",body:JSON.stringify(G)});if(console.log("[ImageGenerationCard] Response data:",z),!z.success)throw new Error(z.error||"Failed to generate image");const D={url:z.image_url,revised_prompt:z.revised_prompt,model:z.model||y,provider:z.provider||b,size:w,format:S.toUpperCase(),cost:z.cost};A(D),window.dispatchEvent(new CustomEvent("imageGenerated",{detail:D})),console.log("[ImageGenerationCard] Image generation successful:",D),i.success("Image generated successfully!")}catch(b){console.error("[ImageGenerationCard] Error in handleGenerate:",{error:b,message:b.message,stack:b.stack});const y=b.message||"Failed to generate image";U(y),window.dispatchEvent(new CustomEvent("imageGenerationError",{detail:y})),i.error(y)}finally{console.log("[ImageGenerationCard] handleGenerate completed"),n(!1)}},c=()=>{if((h.service||"openai")==="openai"){const y=h.model||"dall-e-3";return`OpenAI ${{"dall-e-3":"DALL·E 3","dall-e-2":"DALL·E 2","gpt-image-1":"GPT Image 1 (Full)","gpt-image-1-mini":"GPT Image 1 Mini"}[y]||y}`}else return"Runware"},p={"1024x1024":"Square - 1024 x 1024","1024x1792":"Portrait - 1024 x 1792","1792x1024":"Landscape - 1792 x 1024","256x256":"Small - 256 x 256","512x512":"Medium - 512 x 512"},v=Z().map(b=>({value:b,label:p[b]||b})),M=[{value:"realistic",label:"Realistic"},{value:"illustration",label:"Illustration"},{value:"3D render",label:"3D Render"},{value:"minimalist",label:"Minimalist"},{value:"cartoon",label:"Cartoon"}],k=[{value:"webp",label:"WEBP"},{value:"jpg",label:"JPG"},{value:"png",label:"PNG"}];return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[r&&e.jsx("div",{className:"mb-4 inline-flex h-10 w-10 items-center justify-center",children:r}),e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-blue-50 px-4 py-3 dark:bg-blue-900/20",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"text-blue-600 dark:text-blue-400",children:e.jsx("path",{d:"M10 2L3 7V17C3 17.5304 3.21071 18.0391 3.58579 18.4142C3.96086 18.7893 4.46957 19 5 19H15C15.5304 19 16.0391 18.7893 16.4142 18.4142C16.7893 18.0391 17 17.5304 17 17V7L10 2Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:"Provider & Model"}),e.jsx("p",{className:"text-sm font-semibold text-blue-900 dark:text-blue-200",children:c()})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Prompt Description *"}),e.jsx("textarea",{value:x,onChange:b=>g(b.target.value),rows:6,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",placeholder:"Describe the visual elements, style, mood, and composition you want in the image..."}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Describe the visual elements, style, mood, and composition you want in the image."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Negative Prompt"}),e.jsx("textarea",{value:N,onChange:b=>T(b.target.value),rows:2,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",placeholder:"Describe what you DON'T want in the image..."}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Specify elements to avoid in the generated image (text, watermarks, logos, etc.)."})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Type"}),e.jsx("select",{value:_,onChange:b=>d(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:M.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Size"}),e.jsx("select",{value:w,onChange:b=>j(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:v.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Format"}),e.jsx("select",{value:S,onChange:b=>I(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:k.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(f,{onClick:H,disabled:l||!x.trim(),className:"inline-flex items-center gap-2 px-6 py-2.5",children:l?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"})]}),"Generate Image"]})})})]})}),R&&e.jsx("div",{className:"mt-4 rounded-lg border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20",children:e.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:R})})]})}function os({title:t,description:s,icon:a,generatedImage:r,error:i}){const[l,n]=o.useState(r),[x,g]=o.useState(i);return o.useEffect(()=>{const N=_=>{n(_.detail),g(null)},T=_=>{g(_.detail),n(null)};return window.addEventListener("imageGenerated",N),window.addEventListener("imageGenerationError",T),()=>{window.removeEventListener("imageGenerated",N),window.removeEventListener("imageGenerationError",T)}},[]),o.useEffect(()=>{n(r)},[r]),o.useEffect(()=>{g(i)},[i]),e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[a&&e.jsx("div",{className:"mb-4 inline-flex h-10 w-10 items-center justify-center",children:a}),e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:x?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"mb-4 rounded-full bg-red-100 p-4 dark:bg-red-900/20",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-red-600 dark:text-red-400",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),e.jsx("h4",{className:"mb-2 text-lg font-semibold text-gray-800 dark:text-white",children:"Generation Failed"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:x})]}):l!=null&&l.url?e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700",children:e.jsx("img",{src:l.url,alt:"Generated image",className:"w-full object-contain",style:{maxHeight:"400px"}})}),e.jsxs("div",{className:"space-y-3 rounded-lg bg-gray-50 p-4 dark:bg-gray-800/50",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-white",children:"Image Details"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Size:"}),e.jsxs("span",{className:"ml-2 text-gray-800 dark:text-white",children:[l.size||"1024x1024"," pixels"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Format:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.format||"WEBP"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Model:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.model||"DALL·E 3"})]}),l.cost&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Cost:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.cost})]})]}),l.revised_prompt&&e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-gray-600 dark:text-gray-400",children:"Revised Prompt:"}),e.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:l.revised_prompt})]}),l.negative_prompt&&e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-gray-600 dark:text-gray-400",children:"Negative Prompt:"}),e.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:l.negative_prompt})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"View Original"]}),e.jsxs("button",{onClick:()=>{navigator.clipboard.writeText(l.url)},className:"inline-flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),e.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy URL"]})]})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-4 dark:bg-gray-800",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400 dark:text-gray-500",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"})]})}),e.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500",children:'No image generated yet. Fill out the form and click "Generate Image" to create your first AI image.'})]})})]})}function ds({icon:t,title:s,description:a,validationStatus:r,onSettings:i,onDetails:l}){const n=q(),x=Lt({resourceId:"image_generation",getEndpoint:"/v1/system/settings/integrations/{id}/",saveEndpoint:"/v1/system/settings/integrations/{id}/save/",initialEnabled:!1,onToggleSuccess:I=>{n.success(`Image generation service ${I?"enabled":"disabled"}`)},onToggleError:I=>{n.error(`Failed to update image generation service: ${I.message}`)}}),g=x.enabled,N=x.loading,[T,_]=o.useState({}),d="https://api.igny8.com/api";o.useEffect(()=>{(async()=>{try{const h=await fetch(`${d}/v1/system/settings/integrations/image_generation/`,{credentials:"include"});if(h.ok){const O=await h.json();O.success&&O.data&&_(O.data)}}catch(h){console.error("Error loading image settings:",h)}})()},[d,g]);const w=I=>{x.toggle(I)},j=()=>{const I=T.service||"openai";if(I==="openai"){const h=T.model||"dall-e-3";return`OpenAI ${{"dall-e-3":"DALL·E 3","dall-e-2":"DALL·E 2","gpt-image-1":"GPT Image 1 (Full)","gpt-image-1-mini":"GPT Image 1 Mini"}[h]||h}`}else if(I==="runware"){const h=T.runwareModel||"runware:97@1";return`Runware ${{"runware:97@1":"HiDream-I1 Full","runware:gen3a_turbo":"Gen3a Turbo","runware:gen3a":"Gen3a"}[h]||h}`}return"Not configured"},S=()=>(T.service,!(T.model||T.runwareModel)||r==="not_configured"||r==="pending"?"text-gray-400 dark:text-gray-500":"text-black dark:text-white");return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:t}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400",children:a}),e.jsx("div",{className:"absolute top-5 right-5 h-fit",children:e.jsx("p",{className:`text-lg font-semibold ${S()} transition-colors duration-200`,children:j()})})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:i,className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:l,className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:g,disabled:N,onChange:w})]})]})}const K=({variant:t,title:s,message:a,showLink:r=!1,linkHref:i="#",linkText:l="Learn more"})=>{const n={success:{container:"border-b-2 border-success-500 bg-success-50 dark:border-success-500/30 dark:bg-success-500/15",icon:"text-success-500"},error:{container:"border-b-2 border-error-500 bg-error-50 dark:border-error-500/30 dark:bg-error-500/15",icon:"text-error-500"},warning:{container:"border-b-2 border-warning-500 bg-warning-50 dark:border-warning-500/30 dark:bg-warning-500/15",icon:"text-warning-500"},info:{container:"border-b-2 border-blue-light-500 bg-blue-light-50 dark:border-blue-light-500/30 dark:bg-blue-light-500/15",icon:"text-blue-light-500"}},x={success: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:"M3.70186 12.0001C3.70186 7.41711 7.41711 3.70186 12.0001 3.70186C16.5831 3.70186 20.2984 7.41711 20.2984 12.0001C20.2984 16.5831 16.5831 20.2984 12.0001 20.2984C7.41711 20.2984 3.70186 16.5831 3.70186 12.0001ZM12.0001 1.90186C6.423 1.90186 1.90186 6.423 1.90186 12.0001C1.90186 17.5772 6.423 22.0984 12.0001 22.0984C17.5772 22.0984 22.0984 17.5772 22.0984 12.0001C22.0984 6.423 17.5772 1.90186 12.0001 1.90186ZM15.6197 10.7395C15.9712 10.388 15.9712 9.81819 15.6197 9.46672C15.2683 9.11525 14.6984 9.11525 14.347 9.46672L11.1894 12.6243L9.6533 11.0883C9.30183 10.7368 8.73198 10.7368 8.38051 11.0883C8.02904 11.4397 8.02904 12.0096 8.38051 12.3611L10.553 14.5335C10.7217 14.7023 10.9507 14.7971 11.1894 14.7971C11.428 14.7971 11.657 14.7023 11.8257 14.5335L15.6197 10.7395Z"})}),error:e.jsx("svg",{className:"fill-current",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:"M20.3499 12.0004C20.3499 16.612 16.6115 20.3504 11.9999 20.3504C7.38832 20.3504 3.6499 16.612 3.6499 12.0004C3.6499 7.38881 7.38833 3.65039 11.9999 3.65039C16.6115 3.65039 20.3499 7.38881 20.3499 12.0004ZM11.9999 22.1504C17.6056 22.1504 22.1499 17.6061 22.1499 12.0004C22.1499 6.3947 17.6056 1.85039 11.9999 1.85039C6.39421 1.85039 1.8499 6.3947 1.8499 12.0004C1.8499 17.6061 6.39421 22.1504 11.9999 22.1504ZM13.0008 16.4753C13.0008 15.923 12.5531 15.4753 12.0008 15.4753L11.9998 15.4753C11.4475 15.4753 10.9998 15.923 10.9998 16.4753C10.9998 17.0276 11.4475 17.4753 11.9998 17.4753L12.0008 17.4753C12.5531 17.4753 13.0008 17.0276 13.0008 16.4753ZM11.9998 6.62898C12.414 6.62898 12.7498 6.96476 12.7498 7.37898L12.7498 13.0555C12.7498 13.4697 12.414 13.8055 11.9998 13.8055C11.5856 13.8055 11.2498 13.4697 11.2498 13.0555L11.2498 7.37898C11.2498 6.96476 11.5856 6.62898 11.9998 6.62898Z",fill:"#F04438"})}),warning:e.jsx("svg",{className:"fill-current",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.6501 12.0001C3.6501 7.38852 7.38852 3.6501 12.0001 3.6501C16.6117 3.6501 20.3501 7.38852 20.3501 12.0001C20.3501 16.6117 16.6117 20.3501 12.0001 20.3501C7.38852 20.3501 3.6501 16.6117 3.6501 12.0001ZM12.0001 1.8501C6.39441 1.8501 1.8501 6.39441 1.8501 12.0001C1.8501 17.6058 6.39441 22.1501 12.0001 22.1501C17.6058 22.1501 22.1501 17.6058 22.1501 12.0001C22.1501 6.39441 17.6058 1.8501 12.0001 1.8501ZM10.9992 7.52517C10.9992 8.07746 11.4469 8.52517 11.9992 8.52517H12.0002C12.5525 8.52517 13.0002 8.07746 13.0002 7.52517C13.0002 6.97289 12.5525 6.52517 12.0002 6.52517H11.9992C11.4469 6.52517 10.9992 6.97289 10.9992 7.52517ZM12.0002 17.3715C11.586 17.3715 11.2502 17.0357 11.2502 16.6215V10.945C11.2502 10.5308 11.586 10.195 12.0002 10.195C12.4144 10.195 12.7502 10.5308 12.7502 10.945V16.6215C12.7502 17.0357 12.4144 17.3715 12.0002 17.3715Z",fill:""})}),info:e.jsx("svg",{className:"fill-current",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.6501 11.9996C3.6501 7.38803 7.38852 3.64961 12.0001 3.64961C16.6117 3.64961 20.3501 7.38803 20.3501 11.9996C20.3501 16.6112 16.6117 20.3496 12.0001 20.3496C7.38852 20.3496 3.6501 16.6112 3.6501 11.9996ZM12.0001 1.84961C6.39441 1.84961 1.8501 6.39392 1.8501 11.9996C1.8501 17.6053 6.39441 22.1496 12.0001 22.1496C17.6058 22.1496 22.1501 17.6053 22.1501 11.9996C22.1501 6.39392 17.6058 1.84961 12.0001 1.84961ZM10.9992 7.52468C10.9992 8.07697 11.4469 8.52468 11.9992 8.52468H12.0002C12.5525 8.52468 13.0002 8.07697 13.0002 7.52468C13.0002 6.9724 12.5525 6.52468 12.0002 6.52468H11.9992C11.4469 6.52468 10.9992 6.9724 10.9992 7.52468ZM12.0002 17.371C11.586 17.371 11.2502 17.0352 11.2502 16.621V10.9445C11.2502 10.5303 11.586 10.1945 12.0002 10.1945C12.4144 10.1945 12.7502 10.5303 12.7502 10.9445V16.621C12.7502 17.0352 12.4144 17.371 12.0002 17.371Z",fill:""})})};return e.jsx("div",{className:`rounded-xl p-4 ${n[t].container}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`-mt-0.5 ${n[t].icon}`,children:x[t]}),e.jsxs("div",{children:[e.jsx("h4",{className:"mb-1 text-sm font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 whitespace-pre-line",children:a}),r&&e.jsx(_t,{to:i,className:"inline-block mt-3 text-sm font-medium text-gray-500 underline dark:text-gray-400",children:l})]})]})})},Ie=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("path",{d:"M12.321 24.9775C11.9035 24.3455 12.9535 23.389 12.5264 22.5859C12.2802 22.1227 11.8779 21.8341 11.3946 21.7735C10.9308 21.7153 10.4531 21.8851 10.1486 22.2169C9.66775 22.7401 9.59299 23.4523 9.68599 23.7043C9.72002 23.7967 9.77351 23.8219 9.81181 23.8273C10.0737 23.8618 10.221 23.1897 10.3115 23.0497C10.5614 22.6639 11.129 22.5471 11.5211 22.8007C12.2643 23.2814 11.6198 24.0584 11.6754 24.7147C11.7295 25.3537 12.1277 25.6105 12.4851 25.6375C12.8328 25.6507 13.0759 25.4575 13.1373 25.3165C13.2845 24.9799 12.6644 25.4975 12.321 24.9775Z",fill:"#0C111D"}),e.jsx("path",{d:"M27.8512 19.1761C27.6563 19.1492 27.4432 19.1498 27.2215 19.1761C27.0532 18.9637 26.9024 18.6199 26.8173 18.2185C26.6659 17.5045 26.6817 16.9873 27.1042 16.9201C27.5266 16.8529 27.7309 17.2849 27.8822 17.9989C27.9837 18.4789 27.9643 18.9199 27.8512 19.1761Z",fill:"#0C111D"}),e.jsx("path",{d:"M23.2243 19.6009C23.241 19.7626 23.2469 19.9262 23.2422 20.0769C23.6509 20.1009 23.9405 20.295 24.0175 20.4182C24.0571 20.4818 24.0412 20.5232 24.0285 20.5424C23.9862 20.6082 23.8955 20.598 23.7055 20.5767C23.5396 20.5581 23.3609 20.5417 23.1752 20.5503C23.0742 20.8602 22.7745 20.8892 22.564 20.66C22.417 20.7048 22.1281 20.8892 22.0421 20.6888C22.0413 20.5893 22.1453 20.4447 22.3337 20.317C22.2051 20.0718 22.1189 19.8092 22.068 19.5373C21.801 19.5854 21.5607 19.6602 21.3725 19.7188C21.284 19.7464 20.9343 19.9044 20.8933 19.7263C20.8659 19.6033 21.0574 19.4005 21.2598 19.2541C21.486 19.0935 21.7369 18.9794 21.997 18.9135C21.9914 18.5263 22.0902 18.2561 22.3716 18.2113C22.7204 18.1558 22.9366 18.4244 23.0863 18.9218C23.5079 19.0389 23.9289 19.3294 24.1148 19.6297C24.1871 19.7461 24.2011 19.8361 24.1543 19.8835C24.0375 20.0046 23.3901 19.6535 23.2243 19.6009Z",fill:"#0C111D"}),e.jsx("path",{d:"M25.9967 21.3415C26.2641 21.4711 26.5583 21.4201 26.6544 21.2275C26.7504 21.0349 26.6112 20.7739 26.3438 20.6443C26.0763 20.5147 25.7821 20.5657 25.6861 20.7583C25.5901 20.9509 25.7292 21.2119 25.9967 21.3415Z",fill:"#0C111D"}),e.jsx("path",{d:"M27.3132 20.3851C27.3181 20.0905 27.4986 19.8553 27.7156 19.8589C27.9326 19.8631 28.1046 20.1043 28.0998 20.3983C28.0949 20.6923 27.9144 20.9275 27.6974 20.9239C27.4804 20.9203 27.3084 20.6791 27.3132 20.3851Z",fill:"#0C111D"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.1978 23.9929C33.196 23.9868 33.202 24.0079 33.1978 23.9929C33.6336 23.9929 34.318 24.4873 34.318 25.6819C34.318 26.8705 33.8184 28.2169 33.7004 28.5157C31.9006 32.7733 27.605 35.1433 22.4882 34.9933C17.7179 34.8535 13.6497 32.3689 11.8693 28.3183C10.7928 28.3195 9.68291 27.8521 8.83923 27.1141C7.94996 26.3365 7.40169 25.3303 7.29471 24.2809C7.21144 23.4637 7.31294 22.7035 7.57249 22.0405L6.5726 21.2041C1.99679 17.3906 16.3084 1.68861 20.8854 5.6294C20.9085 5.6492 22.4427 7.13479 22.4463 7.13839C24.6532 6.21344 30.5665 4.45236 30.5731 8.55199C30.5755 9.91338 29.6966 11.501 28.2882 12.9416C29.9158 14.4315 29.4867 16.5479 29.7458 18.4897L30.3111 18.6445C31.3888 18.9427 32.1553 19.3405 32.5303 19.7293C32.9054 20.1175 33.0914 20.4937 33.1589 20.9347C33.2221 21.2905 33.2136 21.9187 32.7382 22.6213C32.9094 23.0746 33.0656 23.5264 33.1978 23.9929ZM11.7885 27.2137C11.9483 27.2173 12.107 27.2071 12.2626 27.1807C13.9347 26.8993 14.3724 25.1065 14.097 23.3461C13.7858 21.3583 12.4237 20.6575 11.4991 20.6077C11.242 20.5945 11.0031 20.6173 10.8062 20.6563C9.15591 20.9845 8.22409 22.3705 8.40766 24.1705C8.5736 25.7995 10.2427 27.1729 11.7885 27.2137ZM8.05086 21.1447C8.6046 20.3509 9.50967 19.7767 10.5369 19.5793C11.8444 16.115 14.0277 12.923 16.9174 10.7264C19.0619 8.96058 21.3747 7.69399 21.3747 7.69399C21.3747 7.69399 20.1292 6.26839 19.753 6.16339C17.4389 5.5466 12.4413 8.94858 9.25013 13.4438C7.95908 15.2624 6.11064 18.4831 6.99444 20.1397C7.10324 20.3449 7.7202 20.8723 8.05086 21.1447ZM26.8118 26.4181C26.8154 26.4553 26.7924 26.4937 26.7589 26.5075C26.7589 26.5075 24.8995 27.3613 21.9461 26.4595C22.0523 27.3448 23.1259 27.6803 23.8759 27.8017C27.5357 28.4233 30.9573 26.3575 31.7274 25.8373C31.8596 25.748 31.7258 25.9776 31.7019 26.0113C30.7591 27.2119 28.2244 28.6021 24.9269 28.6015C23.4888 28.6009 22.0512 28.1011 21.5236 27.3325C20.7048 26.1403 21.4829 24.3997 22.8475 24.5809C25.1541 24.838 27.5188 24.6448 29.6541 23.6665C31.5159 22.8133 32.2191 21.8749 32.1134 21.1147C31.9493 19.9366 30.2026 19.7524 29.3197 19.4659C28.9356 19.3405 28.7459 19.2403 28.7028 18.5269C28.6839 18.2155 28.6292 17.129 28.6092 16.6796C28.5739 15.893 28.4779 14.8172 27.802 14.3732C27.6257 14.2574 27.43 14.2016 27.2239 14.1908C27.0596 14.1829 26.9622 14.2055 26.9098 14.2176C26.8981 14.2204 26.8886 14.2226 26.8811 14.2238C26.5161 14.285 26.2925 14.4697 26.0287 14.6874C26.0135 14.7 25.9982 14.7126 25.9827 14.7254C25.1396 15.419 24.4279 15.5324 23.6358 15.4988C23.3892 15.4884 23.135 15.4638 22.8668 15.4378C22.6201 15.4139 22.3617 15.3889 22.0865 15.3728L21.7503 15.3536C20.424 15.2864 19.0017 16.4168 18.7652 18.0223C18.5011 19.8145 19.5028 20.9122 20.1542 21.6261C20.3152 21.8025 20.4548 21.9555 20.5486 22.0897C20.6088 22.1707 20.6787 22.2847 20.6787 22.3933C20.6787 22.5229 20.5936 22.6255 20.5103 22.7131C19.1573 24.0865 18.7245 26.2687 19.2345 28.0873C19.2983 28.3141 19.3792 28.5313 19.4746 28.7389C20.6708 31.4983 24.3823 32.7835 28.0074 31.6147C30.5481 30.7955 32.7929 28.8159 33.25 26.0851C33.3588 25.3735 33.199 25.0987 32.9814 24.9661C32.751 24.8263 32.475 24.8749 32.475 24.8749C32.475 24.8749 32.3492 24.0247 31.993 23.2519C30.936 24.0751 29.5756 24.6535 28.5399 24.9469C26.8804 25.4168 25.0879 25.5998 23.373 25.3782C22.6775 25.2883 22.2102 25.228 22.0099 25.8703C24.2972 26.6971 26.7182 26.3431 26.7182 26.3431C26.765 26.3383 26.8069 26.3719 26.8118 26.4181ZM20.2125 10.3736C18.9616 11.0054 17.5648 12.1304 16.4305 13.4246C16.3904 13.4708 16.45 13.5344 16.4992 13.499C17.479 12.7952 18.8224 12.1412 20.5821 11.7176C22.5533 11.243 24.451 11.4422 25.6101 11.7044C25.6685 11.7176 25.7049 11.6186 25.6533 11.5898C24.8874 11.1656 23.7118 10.8776 22.8779 10.8716C22.8371 10.871 22.814 10.8242 22.8384 10.7918C22.9824 10.6004 23.18 10.4114 23.3605 10.2746C23.4006 10.2434 23.3763 10.1792 23.3252 10.1822C22.2878 10.2451 19.9183 11.3255 19.9268 11.2862C19.9876 10.9982 20.1791 10.6178 20.2781 10.4402C20.3019 10.3982 20.2557 10.352 20.2125 10.3736Z",fill:"#0C111D"})]}),kt=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#625DF5"}),e.jsx("path",{d:"M20 12L28 20L20 28L12 20L20 12Z",fill:"white"})]});function cs(){var F,H;const t=q(),[s,a]=o.useState({openai:{id:"openai",enabled:!1,apiKey:"",model:"gpt-4.1"},runware:{id:"runware",enabled:!1,apiKey:""},image_generation:{id:"image_generation",enabled:!1,service:"openai",provider:"openai",model:"dall-e-3",runwareModel:"runware:97@1",image_type:"realistic",max_in_article_images:2,image_format:"webp",desktop_enabled:!0,mobile_enabled:!0}}),[r,i]=o.useState(null),[l,n]=o.useState(!1),[x,g]=o.useState(!1),[N,T]=o.useState(!1),[_,d]=o.useState(!1),[w,j]=o.useState({openai:"not_configured",runware:"not_configured",image_generation:"not_configured"}),S=o.useCallback(async(c,p,v,M)=>{const k="https://api.igny8.com/api";if(!["openai","runware"].includes(c))return;if(!(v&&v.trim()!=="")||!p){j(y=>({...y,[c]:"not_configured"}));return}j(y=>({...y,[c]:"pending"}));try{const y={apiKey:v};c==="openai"&&(y.config={model:M||"gpt-4.1",with_response:!1});const L=await fetch(`${k}/v1/system/settings/integrations/${c}/test/`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(y)}),G=await L.json();L.ok&&G.success?j(z=>({...z,[c]:"success"})):(console.error(`Validation failed for ${c}:`,G.error||G.message),j(z=>({...z,[c]:"error"})))}catch(y){console.error(`Error validating ${c}:`,y),j(L=>({...L,[c]:"error"}))}},[]),I=o.useCallback(async()=>{a(c=>(["openai","runware"].forEach(p=>{const v=c[p];if(!v)return;const M=v.enabled===!0,k=v.apiKey,b=v.model;S(p,M,k,b)}),c))},[S]);o.useEffect(()=>{h()},[]),o.useEffect(()=>{if(!Object.values(s).some(v=>v.apiKey!==void 0||v.enabled!==void 0))return;const p=setTimeout(()=>{I()},500);return()=>clearTimeout(p)},[s.openai.enabled,s.runware.enabled,s.openai.apiKey,s.runware.apiKey]);const h=async()=>{try{const c="https://api.igny8.com/api",v=["openai","runware","image_generation"].map(async k=>{try{const b=await fetch(`${c}/v1/system/settings/integrations/${k}/`,{credentials:"include"});if(b.ok){const y=await b.json();if(y.success&&y.data)return{id:k,config:y.data}}return{id:k,config:null}}catch(b){return console.error(`Error loading ${k} settings:`,b),{id:k,config:null}}}),M=await Promise.all(v);a(k=>{const b={...k};return M.forEach(({id:y,config:L})=>{L&&k[y]&&(b[y]={...k[y],...L,enabled:L.enabled!==void 0?L.enabled:k[y].enabled})}),b})}catch(c){console.error("Error loading integration settings:",c)}},O=c=>{i(c),g(!0)},$=c=>{i(c),n(!0)},Z=async()=>{if(!r)return;if(r!=="openai"&&r!=="runware"){t.warning("Connection testing is only available for OpenAI and Runware");return}const c=s[r],p=c.apiKey;if(!p){t.error("Please enter an API key first");return}d(!0),r&&j(v=>({...v,[r]:"pending"}));try{const v=await Y(`/v1/system/settings/integrations/${r}/test/`,{method:"POST",body:JSON.stringify({apiKey:p,config:c})});if(v.success)t.success(v.message||"API connection test successful!"),v.response&&t.info(`Response: ${v.response}`),v.tokens_used&&t.info(`Tokens used: ${v.tokens_used}`),r&&j(M=>({...M,[r]:"success"}));else throw new Error(v.error||"Connection test failed")}catch(v){console.error("Error testing connection:",v),t.error(`Connection test failed: ${v.message||"Unknown error"}`),r&&j(M=>({...M,[r]:"error"}))}finally{d(!1)}},W=async()=>{if(r){T(!0);try{const c=s[r];let p={...c};r==="image_generation"&&(p={...c,provider:c.service||c.provider||"openai",model:c.service==="openai"?c.model||"dall-e-3":c.service==="runware"?c.runwareModel||"runware:97@1":c.model,image_type:c.image_type||"realistic",max_in_article_images:c.max_in_article_images||2,image_format:c.image_format||"webp",desktop_enabled:c.desktop_enabled!==void 0?c.desktop_enabled:!0,mobile_enabled:c.mobile_enabled!==void 0?c.mobile_enabled:!0});const M=`https://api.igny8.com/api/v1/system/settings/integrations/${r}/save/`,k=await fetch(M,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(p)});if(!(k.headers.get("content-type")||"").includes("application/json")){const L=await k.text();if(L.trim().startsWith("{h().then(()=>{setTimeout(()=>I(),300)}).catch(L=>{console.error("Error reloading settings after save:",L)})},100);else throw new Error(y.error||"Failed to save settings")}catch(c){console.error("Error saving integration settings:",c),t.error(`Failed to save settings: ${c.message||"Unknown error"}`)}finally{T(!1)}}},A=c=>{const p=s[c];if(c==="openai")return[{label:"App Name",value:"OpenAI API"},{label:"API Key",value:p.apiKey?`${p.apiKey.substring(0,20)}...`:"Not configured"},{label:"Model",value:p.model||"Not set"}];if(c==="runware")return[{label:"App Name",value:"Runware API"},{label:"API Key",value:p.apiKey?`${p.apiKey.substring(0,20)}...`:"Not configured"}];if(c==="image_generation"){const v=p.service||"openai",M=v==="openai"?p.model||"Not set":p.runwareModel||"Not set";return[{label:"Service",value:v==="openai"?"OpenAI":"Runware"},{label:"Model",value:M}]}return[]},R=o.useCallback(c=>{const p=s[c];if(c==="openai")return[{key:"apiKey",label:"OpenAI API Key",type:"password",value:p.apiKey||"",onChange:v=>{a({...s,[c]:{...p,apiKey:v}})},placeholder:"Enter your OpenAI API key",required:!0},{key:"model",label:"AI Model",type:"select",value:p.model||"gpt-4.1",onChange:v=>{a({...s,[c]:{...p,model:v}})},options:[{value:"gpt-4.1",label:"GPT-4.1 - $2.00 / $8.00 per 1M tokens"},{value:"gpt-4o-mini",label:"GPT-4o mini - $0.15 / $0.60 per 1M tokens"},{value:"gpt-4o",label:"GPT-4o - $2.50 / $10.00 per 1M tokens"}]}];if(c==="runware")return[{key:"apiKey",label:"Runware API Key",type:"password",value:p.apiKey||"",onChange:v=>{a({...s,[c]:{...p,apiKey:v}})},placeholder:"Enter your Runware API key",required:!0}];if(c==="image_generation"){const v=p.service||"openai",M=[{key:"service",label:"Image Generation Service",type:"select",value:v,onChange:k=>{a({...s,[c]:{...p,service:k,model:k==="openai"?"dall-e-3":void 0,runwareModel:k==="runware"?"runware:97@1":void 0}})},options:[{value:"openai",label:"OpenAI - Multiple models available"},{value:"runware",label:"Runware - $0.036 per image"}]}];return v==="openai"?M.push({key:"model",label:"OpenAI Image Model",type:"select",value:p.model||"dall-e-3",onChange:k=>{a({...s,[c]:{...p,model:k}})},options:[{value:"dall-e-3",label:"DALL·E 3 - $0.040 per image"},{value:"dall-e-2",label:"DALL·E 2 - $0.020 per image"}]}):v==="runware"&&M.push({key:"runwareModel",label:"Runware Model",type:"select",value:p.runwareModel||"runware:97@1",onChange:k=>{a({...s,[c]:{...p,runwareModel:k}})},options:[{value:"runware:97@1",label:"HiDream-I1 Full - $0.036 per image"},{value:"runware:gen3a_turbo",label:"Gen3a Turbo - $0.036 per image"},{value:"runware:gen3a",label:"Gen3a - $0.036 per image"}]}),M.push({key:"image_type",label:"Image Type",type:"select",value:p.image_type||"realistic",onChange:k=>{a({...s,[c]:{...p,image_type:k}})},options:[{value:"realistic",label:"Realistic"},{value:"artistic",label:"Artistic"},{value:"cartoon",label:"Cartoon"}]},{key:"max_in_article_images",label:"Max In-Article Images",type:"select",value:String(p.max_in_article_images||2),onChange:k=>{a({...s,[c]:{...p,max_in_article_images:parseInt(k)}})},options:[{value:"1",label:"1 Image"},{value:"2",label:"2 Images"},{value:"3",label:"3 Images"},{value:"4",label:"4 Images"},{value:"5",label:"5 Images"}]},{key:"image_format",label:"Image Format",type:"select",value:p.image_format||"webp",onChange:k=>{a({...s,[c]:{...p,image_format:k}})},options:[{value:"webp",label:"WEBP"},{value:"jpg",label:"JPG"},{value:"png",label:"PNG"}]}),M}return[]},[s]),U=o.useMemo(()=>{var c,p,v;if(!(r!=="image_generation"||!x))try{const M=R(r),k=M.find(D=>D.key==="service"),b=((c=s[r])==null?void 0:c.service)||"openai",y=M.find(D=>b==="openai"?D.key==="model":D.key==="runwareModel"),L=M.find(D=>D.key==="max_in_article_images"),G=M.find(D=>D.key==="image_type"),z=M.find(D=>D.key==="image_format");return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[k&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[k.label,k.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:k.options||[],placeholder:k.placeholder||k.label,value:k.value||"",onChange:D=>k.onChange(D),className:"w-full"})]}),y&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[y.label,y.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:y.options||[],placeholder:y.placeholder||y.label,value:y.value||"",onChange:D=>y.onChange(D),className:"w-full"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(J,{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Max Images"}),e.jsx("div",{className:"p-3 rounded-lg border border-gray-200 dark:border-gray-700 bg-gradient-to-r from-purple-500 to-blue-500 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:"Featured Image"}),e.jsx("div",{className:"text-xs opacity-90",children:"1280×832 pixels"})]}),e.jsx("div",{className:"text-xs bg-white/20 px-2 py-1 rounded",children:"Always Enabled"})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(jt,{checked:((p=s[r])==null?void 0:p.desktop_enabled)!==!1,onChange:D=>{a({...s,[r]:{...s[r],desktop_enabled:D}})}}),e.jsxs("div",{children:[e.jsx(J,{className:"font-medium text-gray-700 dark:text-gray-300",children:"Desktop Images"}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"1024×1024 pixels"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(jt,{checked:((v=s[r])==null?void 0:v.mobile_enabled)!==!1,onChange:D=>{a({...s,[r]:{...s[r],mobile_enabled:D}})}}),e.jsxs("div",{children:[e.jsx(J,{className:"font-medium text-gray-700 dark:text-gray-300",children:"Mobile Images"}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"960×1280 pixels"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[L&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[L.label,L.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:L.options||[],placeholder:L.placeholder||L.label,value:L.value||"",onChange:D=>L.onChange(D),className:"w-full"})]}),G&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[G.label,G.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:G.options||[],placeholder:G.placeholder||G.label,value:G.value||"",onChange:D=>G.onChange(D),className:"w-full"})]}),z&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[z.label,z.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:z.options||[],placeholder:z.placeholder||z.label,value:z.value||"",onChange:D=>z.onChange(D),className:"w-full"})]})]})]})}catch(M){return console.error("Error rendering image generation form:",M),e.jsx("div",{className:"text-error-500",children:"Error loading form. Please refresh the page."})}},[r,s,x,R]);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"API Integration - IGNY8",description:"External integrations"}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsx(vt,{icon:e.jsx(Ie,{}),title:"OpenAI",description:"AI-powered content generation and analysis with DALL-E image generation",validationStatus:w.openai,integrationId:"openai",onToggleSuccess:(c,p)=>{const v=(p==null?void 0:p.apiKey)||s.openai.apiKey,M=(p==null?void 0:p.model)||s.openai.model;S("openai",c,v,M)},onSettings:()=>O("openai"),onDetails:()=>$("openai")}),e.jsx(wt,{title:"OpenAI API Validation",description:"Two-way response validation with actual request and response testing",integrationId:"openai",icon:e.jsx(Ie,{})})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(vt,{icon:e.jsx(kt,{}),title:"Runware",description:"High-quality AI image generation with Runware's models ($0.036 per image)",validationStatus:w.runware,integrationId:"runware",modelName:((F=s.image_generation)==null?void 0:F.service)==="runware"&&s.image_generation.runwareModel?{"runware:97@1":"HiDream-I1 Full","runware:gen3a_turbo":"Gen3a Turbo","runware:gen3a":"Gen3a"}[s.image_generation.runwareModel]||s.image_generation.runwareModel:void 0,onToggleSuccess:(c,p)=>{const v=(p==null?void 0:p.apiKey)||s.runware.apiKey;S("runware",c,v)},onSettings:()=>O("runware"),onDetails:()=>$("runware")}),e.jsx(wt,{title:"Runware API Validation",description:"Using 128x128 image generation request for connection testing",integrationId:"runware",icon:e.jsx(kt,{})})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(ds,{icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#9333EA"}),e.jsx("path",{d:"M12 16L20 10L28 16V28C28 28.5304 27.7893 29.0391 27.4142 29.4142C27.0391 29.7893 26.5304 30 26 30H14C13.4696 30 12.9609 29.7893 12.5858 29.4142C12.2107 29.0391 12 28.5304 12 28V16Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16 30V20H24V30",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),title:"Image Generation Service",description:"Default image generation service and model selection for app-wide use",validationStatus:w.image_generation,onSettings:()=>O("image_generation"),onDetails:()=>$("image_generation")}),e.jsx(K,{variant:"info",title:"AI Integration & Image Generation Testing",message:`Configure and test your AI integrations on this page. +import{r as o,j as e}from"./vendor-react-core-DjsjKnCi.js";import{P,C as u}from"./page-analytics.tsx-1KCk8AGD.js";import{c as It,p as At}from"./vendor-state-CYwAWrAU.js";import{G as Pt,H as Mt,I as Dt,J as Rt,K as $t,L as Ft,M as Ot,i as Y,f as Tt,g as Et,N as ft,O as Ne,h as zt,P as Bt,Q as Gt,R as Wt}from"./page-dashboard-DxYTR5eF.js";import{u as q}from"./page-reference-aC0iABvU.js";import{L as J,B as f,C as jt,o as E,r as ae}from"./page-authpages-CY7hjDHU.js";import{C as ee,M as ge,b as Ce,c as Se,d as Vt,e as Ut,D as Te,a as ie,A as be,P as _e}from"./page-components.tsx-DYfg5dka.js";import{B as C}from"./page-clusters.config.tsx-9GAd-_h-.js";import{S as xe,F as ye,P as X}from"./pages-planner-Biqt-k6C.js";import{L as _t}from"./vendor-react-router-BJY_70Cr.js";const Ht=It()(At((t,s)=>({accountSettings:{},moduleSettings:{},loading:!1,error:null,loadAccountSettings:async()=>{t({loading:!0,error:null});try{const a=await Ot(),r={};a.results.forEach(i=>{r[i.key]=i}),t({accountSettings:r,loading:!1})}catch(a){t({error:a.message,loading:!1})}},loadAccountSetting:async a=>{try{const r=await Ft(a);t(i=>({accountSettings:{...i.accountSettings,[a]:r}}))}catch(r){t({error:r.message})}},updateAccountSetting:async(a,r)=>{t({loading:!0,error:null});try{const i=s().accountSettings[a];let l;i?l=await Rt(a,{config:r}):l=await $t({key:a,config:r}),t(n=>({accountSettings:{...n.accountSettings,[a]:l},loading:!1}))}catch(i){throw t({error:i.message,loading:!1}),i}},loadModuleSettings:async a=>{t({loading:!0,error:null});try{const r=await Dt(a),i={};r.forEach(l=>{i[l.key]=l}),t(l=>({moduleSettings:{...l.moduleSettings,[a]:i},loading:!1}))}catch(r){t({error:r.message,loading:!1})}},updateModuleSetting:async(a,r,i)=>{var l;t({loading:!0,error:null});try{const n=(l=s().moduleSettings[a])==null?void 0:l[r];let x;n?x=await Pt(a,r,{config:i}):x=await Mt({module_name:a,key:r,config:i}),t(g=>({moduleSettings:{...g.moduleSettings,[a]:{...g.moduleSettings[a]||{},[r]:x}},loading:!1}))}catch(n){throw t({error:n.message,loading:!1}),n}},reset:()=>{t({accountSettings:{},moduleSettings:{},loading:!1,error:null})}}),{name:"settings-storage",partialize:t=>({accountSettings:t.accountSettings,moduleSettings:t.moduleSettings})}));function Zt(){const t=q(),{accountSettings:s,loading:a,loadAccountSettings:r,updateAccountSetting:i}=Ht(),[l,n]=o.useState({records_per_page:20,default_sort:"created_at",default_sort_direction:"desc"});o.useEffect(()=>{r()},[r]),o.useEffect(()=>{s.table_settings&&n(s.table_settings.config)},[s]);const x=async()=>{try{await i("table_settings",l),t.success("Settings saved successfully")}catch(g){t.error(`Failed to save settings: ${g.message}`)}};return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"General Settings - IGNY8",description:"Plugin configuration"}),e.jsx(u,{title:"General Settings",desc:"Configure plugin settings, automation, and table preferences",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"Table Settings"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(J,{htmlFor:"records_per_page",children:"Records Per Page"}),e.jsx("input",{id:"records_per_page",type:"number",min:"5",max:"100",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:l.records_per_page,onChange:g=>n({...l,records_per_page:parseInt(g.target.value)||20})})]}),e.jsxs("div",{children:[e.jsx(J,{htmlFor:"default_sort",children:"Default Sort Field"}),e.jsx("input",{id:"default_sort",type:"text",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 placeholder:text-gray-400 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:placeholder:text-white/30 dark:focus:border-brand-800",value:l.default_sort,onChange:g=>n({...l,default_sort:g.target.value})})]}),e.jsxs("div",{children:[e.jsx(J,{htmlFor:"default_sort_direction",children:"Default Sort Direction"}),e.jsxs("select",{id:"default_sort_direction",className:"h-9 w-full rounded-lg border border-gray-300 bg-transparent px-3 py-2 text-sm shadow-theme-xs text-gray-800 focus:border-brand-300 focus:outline-hidden focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-brand-800",value:l.default_sort_direction,onChange:g=>n({...l,default_sort_direction:g.target.value}),children:[e.jsx("option",{value:"asc",children:"Ascending"}),e.jsx("option",{value:"desc",children:"Descending"})]})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(f,{onClick:x,disabled:a,className:"px-6",children:a?"Saving...":"Save Settings"})})]})})]})}const dr=Object.freeze(Object.defineProperty({__proto__:null,default:Zt},Symbol.toStringTag,{value:"Module"}));function Kt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/auth/users/");a(n.results||[])}catch(n){t.error(`Failed to load users: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Users"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Users"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage account users and permissions"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Email"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Username"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Role"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800",children:[e.jsx("td",{className:"py-3 px-4 text-sm text-gray-900 dark:text-white",children:n.email}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:n.username}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:"primary",children:n.role})}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:n.is_active?"success":"dark",children:n.is_active?"Active":"Inactive"})})]},n.id))})]})})})]})}const cr=Object.freeze(Object.defineProperty({__proto__:null,default:Kt},Symbol.toStringTag,{value:"Module"}));function qt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const x=await Y("/v1/auth/subscriptions/");a(x.results||[])}catch(x){t.error(`Failed to load subscriptions: ${x.message}`)}finally{i(!1)}},n=x=>{switch(x){case"active":return"success";case"past_due":return"warning";case"canceled":return"error";default:return"primary"}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Subscriptions"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Subscriptions"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage account subscriptions"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 dark:border-gray-700",children:[e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Account"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Status"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Period Start"}),e.jsx("th",{className:"text-left py-3 px-4 text-sm font-medium text-gray-700 dark:text-gray-300",children:"Period End"})]})}),e.jsx("tbody",{children:s.map(x=>e.jsxs("tr",{className:"border-b border-gray-100 dark:border-gray-800",children:[e.jsx("td",{className:"py-3 px-4 text-sm text-gray-900 dark:text-white",children:x.account_name}),e.jsx("td",{className:"py-3 px-4",children:e.jsx(C,{variant:"light",color:n(x.status),children:x.status})}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:new Date(x.current_period_start).toLocaleDateString()}),e.jsx("td",{className:"py-3 px-4 text-sm text-gray-600 dark:text-gray-400",children:new Date(x.current_period_end).toLocaleDateString()})]},x.id))})]})})})]})}const xr=Object.freeze(Object.defineProperty({__proto__:null,default:qt},Symbol.toStringTag,{value:"Module"}));function Yt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/system/");a(n.results||[])}catch(n){t.error(`Failed to load system settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"System Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"System Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Global platform-wide settings"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"System settings management interface coming soon."})})]})}const mr=Object.freeze(Object.defineProperty({__proto__:null,default:Yt},Symbol.toStringTag,{value:"Module"}));function Jt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/account/");a(n.results||[])}catch(n){t.error(`Failed to load account settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Account Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Account Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Account-level configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Account settings management interface coming soon."})})]})}const gr=Object.freeze(Object.defineProperty({__proto__:null,default:Jt},Symbol.toStringTag,{value:"Module"}));function Qt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/modules/");a(n.results||[])}catch(n){t.error(`Failed to load module settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Module Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Module Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Module-specific configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Module settings management interface coming soon."})})]})}const ur=Object.freeze(Object.defineProperty({__proto__:null,default:Qt},Symbol.toStringTag,{value:"Module"}));function Xt(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Y("/v1/system/settings/ai/");a(n.results||[])}catch(n){t.error(`Failed to load AI settings: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"AI Settings"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"AI Settings"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"AI-specific configuration"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx(ee,{className:"p-6",children:e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"AI settings management interface coming soon."})})]})}const hr=Object.freeze(Object.defineProperty({__proto__:null,default:Xt},Symbol.toStringTag,{value:"Module"})),yt=()=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-success-500",children:e.jsx("path",{d:"M13.4017 4.35986L6.12166 11.6399L2.59833 8.11657",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),Le=()=>e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-gray-400",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.05394 4.78033C3.76105 4.48744 3.76105 4.01256 4.05394 3.71967C4.34684 3.42678 4.82171 3.42678 5.1146 3.71967L8.33437 6.93944L11.5521 3.72173C11.845 3.42883 12.3199 3.42883 12.6127 3.72173C12.9056 4.01462 12.9056 4.48949 12.6127 4.78239L9.39503 8.0001L12.6127 11.2178C12.9056 11.5107 12.9056 11.9856 12.6127 12.2785C12.3198 12.5713 11.845 12.5713 11.5521 12.2785L8.33437 9.06076L5.11462 12.2805C4.82173 12.5734 4.34685 12.5734 4.05396 12.2805C3.76107 11.9876 3.76107 11.5127 4.05396 11.2199L7.27371 8.0001L4.05394 4.78033Z",fill:"currentColor"})});function ve({variant:t="1",title:s,subtitle:a,plans:r,showToggle:i=!1,onPlanSelect:l,className:n=""}){const[x,g]=o.useState("monthly"),N=d=>{d.disabled||l==null||l(d)},T=d=>typeof d=="number"?d.toFixed(2):d,_=d=>{const w=typeof d.monthlyPrice=="number"?d.monthlyPrice:typeof d.price=="number"?d.price:parseFloat(String(d.price||0));if(x==="annually"&&i){const j=w*12*.8,S=w*12;return{price:j,originalPrice:S}}return{price:w}};return t==="1"?e.jsxs("div",{className:`space-y-6 ${n}`,children:[s&&e.jsx("div",{className:"mx-auto w-full max-w-[385px]",children:e.jsx("h2",{className:"font-bold text-center text-gray-800 mb-7 text-title-sm dark:text-white/90",children:s})}),i&&e.jsx("div",{className:"mb-10 text-center",children:e.jsxs("div",{className:"relative inline-flex p-1 mx-auto bg-gray-200 rounded-full z-1 dark:bg-gray-800",children:[e.jsx("span",{className:`absolute top-1/2 -z-1 flex h-11 w-[120px] -translate-y-1/2 rounded-full bg-white shadow-theme-xs duration-200 ease-linear dark:bg-white/10 ${x==="monthly"?"translate-x-0":"translate-x-[120px]"}`}),e.jsx("button",{onClick:()=>g("monthly"),className:`flex h-11 w-[120px] items-center justify-center text-base font-medium transition-colors ${x==="monthly"?"text-gray-800 dark:text-white/90":"text-gray-500 hover:text-gray-700 dark:hover:text-white/80 dark:text-gray-400"}`,children:"Monthly"}),e.jsx("button",{onClick:()=>g("annually"),className:`flex h-11 w-[120px] items-center justify-center text-base font-medium transition-colors ${x==="annually"?"text-gray-800 dark:text-white/90":"text-gray-500 hover:text-gray-700 dark:hover:text-white/80 dark:text-gray-400"}`,children:"Annually"})]})}),e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:gap-6",children:r.map((d,w)=>{const j=d.highlighted||!1,S=_(d),I=x==="annually"&&i?"/year":d.period||"/month";return e.jsxs("div",{className:`rounded-2xl border p-6 flex flex-col ${j?"bg-gray-800 border-gray-800 dark:border-white/10 dark:bg-white/10":"border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]"}`,children:[e.jsx("span",{className:`block mb-3 font-semibold text-theme-xl ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:d.name}),e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("div",{className:"flex items-end",children:[e.jsxs("h2",{className:`font-bold text-title-md ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:["$",T(S.price)]}),e.jsx("span",{className:`inline-block mb-1 text-sm ${j?"text-white/70":"text-gray-500 dark:text-gray-400"}`,children:I})]}),(S.originalPrice||d.originalPrice)&&e.jsxs("span",{className:`font-semibold line-through text-theme-xl ${j?"text-gray-300":"text-gray-400"}`,children:["$",T(S.originalPrice||d.originalPrice||0)]})]}),d.description&&e.jsx("p",{className:`text-sm ${j?"text-white/70":"text-gray-500 dark:text-gray-400"}`,children:d.description}),e.jsx("div",{className:`w-full h-px my-6 ${j?"bg-white/20":"bg-gray-200 dark:bg-gray-800"}`}),e.jsx("ul",{className:"mb-8 space-y-3 flex-grow",children:d.features.map((h,O)=>{const $=h.startsWith("!"),Z=$?h.substring(1):h;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${j?"text-white/80":$?"text-gray-400":"text-gray-500 dark:text-gray-400"}`,children:[$?e.jsx(Le,{}):e.jsx(yt,{}),Z]},O)})}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium text-white shadow-theme-xs transition-colors mt-auto ${j?"bg-brand-500 hover:bg-brand-600 dark:hover:bg-brand-600":"bg-gray-800 hover:bg-brand-500 dark:bg-white/10 dark:hover:bg-brand-600"} ${d.disabled?"opacity-50 cursor-not-allowed":""}`,children:d.buttonText||"Choose Plan"})]},d.id||w)})})]}):t==="2"?e.jsx("div",{className:`space-y-6 ${n}`,children:e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 xl:gap-6",children:r.map((d,w)=>{const j=d.highlighted||w===1;return e.jsxs("div",{className:`rounded-2xl border p-6 xl:p-8 ${j?"border-2 border-brand-500 bg-white dark:border-brand-500 dark:bg-white/[0.03]":"border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between -mb-4",children:[e.jsx("span",{className:"block font-semibold text-gray-800 text-theme-xl dark:text-white/90",children:d.name}),d.icon&&e.jsx("span",{className:"flex h-[56px] dark:bg-brand-500/10 w-[56px] items-center justify-center rounded-[10.5px] bg-brand-50 text-brand-500",children:d.icon})]}),e.jsxs("div",{className:"flex items-end",children:[e.jsxs("h2",{className:"font-bold text-gray-800 text-title-md dark:text-white/90",children:["$",T(d.price)]}),e.jsx("span",{className:"inline-block mb-1 text-sm text-gray-500 dark:text-gray-400",children:d.period||" / Lifetime"})]}),d.description&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:d.description}),e.jsx("div",{className:"w-full h-px my-6 bg-gray-200 dark:bg-gray-800"}),e.jsx("ul",{className:"mb-8 space-y-3",children:d.features.map((S,I)=>{const h=S.startsWith("!"),O=h?S.substring(1):S;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${h?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,children:[h?e.jsx(Le,{}):e.jsx(yt,{}),O]},I)})}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium text-white shadow-theme-xs transition-colors ${j?"bg-brand-500 hover:bg-brand-600":"bg-gray-800 hover:bg-brand-500 dark:bg-white/10 dark:hover:bg-brand-600"} ${d.disabled?"opacity-50 cursor-not-allowed":""}`,children:d.buttonText||(j?"Choose This Plan":"Choose Starter")})]},d.id||w)})})}):t==="3"?e.jsx("div",{className:`space-y-6 ${n}`,children:e.jsx("div",{className:"grid gap-5 grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 xl:gap-3 2xl:grid-cols-4",children:r.map((d,w)=>{const j=d.recommended||w===2;return e.jsx("div",{children:e.jsxs("div",{className:`rounded-2xl p-6 ${j?"relative bg-brand-500":"bg-white dark:bg-white/[0.03]"}`,children:[j&&e.jsx("div",{className:"absolute px-3 py-1 font-medium text-white rounded-lg right-4 top-4 -z-1 bg-white/10 text-theme-xs",children:"Recommended"}),e.jsx("span",{className:`block font-semibold text-theme-xl ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:d.name}),d.description&&e.jsx("p",{className:`mt-1 text-sm ${j?"text-white/90":"text-gray-500 dark:text-gray-400"}`,children:d.description}),e.jsx("h2",{className:`mb-0.5 mt-4 text-title-sm font-bold ${j?"text-white":"text-gray-800 dark:text-white/90"}`,children:typeof d.price=="string"&&d.price.toLowerCase()==="free"?"Free":`$${T(d.price)}`}),e.jsx("span",{className:`inline-block mb-6 text-sm ${j?"text-white/90":"text-gray-500 dark:text-gray-400"}`,children:d.period||"For a Lifetime"}),e.jsx("button",{onClick:()=>N(d),disabled:d.disabled,className:`flex h-11 w-full items-center justify-center rounded-lg p-3.5 text-sm font-medium shadow-theme-xs transition-colors ${j?"bg-white text-gray-800 hover:bg-gray-50":d.disabled?"border border-gray-300 bg-white text-gray-400 disabled:pointer-events-none dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-white/[0.03] dark:hover:text-gray-200":"bg-brand-500 text-white hover:bg-brand-600"}`,children:d.buttonText||(d.disabled?"Current Plan":"Try for Free")}),e.jsx("ul",{className:"mt-6 space-y-3",children:d.features.map((S,I)=>{const h=S.startsWith("!"),O=h?S.substring(1):S;return e.jsxs("li",{className:`flex items-center gap-3 text-sm ${j?"text-white":h?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,children:[h?e.jsx(Le,{}):e.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:j?"text-white":"text-success-500",children:e.jsx("path",{d:"M13.4017 4.35986L6.12166 11.6399L2.59833 8.11657",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}),O]},I)})})]})},d.id||w)})})}):null}const me=t=>t.toLocaleString(),es=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(0)}K`:t.toString(),ts=t=>{const s=[];if(s.push(`${t.max_sites} ${t.max_sites===1?"Site":"Sites"}`),s.push(`${t.max_users} ${t.max_users===1?"User":"Users"}`),s.push(`${me(t.max_keywords)} Keywords`),s.push(`${me(t.max_clusters)} Clusters`),s.push(`${me(t.max_content_ideas)} Content Ideas`),s.push(`${es(t.monthly_word_count_limit)} Words/Month`),s.push(`${t.daily_content_tasks} Daily Content Tasks`),s.push(`${t.monthly_image_count} Images/Month`),t.image_model_choices&&t.image_model_choices.length>0){const a=t.image_model_choices.map(r=>r.toUpperCase()).join(", ");s.push(`${a} Image Models`)}return s.push(`${me(t.included_credits)} AI Credits Included`),s.push(`${me(t.monthly_ai_credit_limit)} Monthly AI Credit Limit`),t.features&&Array.isArray(t.features)&&(t.features.includes("ai_writer")&&s.push("AI Writer"),t.features.includes("image_gen")&&s.push("Image Generation"),t.features.includes("auto_publish")&&s.push("Auto Publish"),t.features.includes("custom_prompts")&&s.push("Custom Prompts")),s},ss=(t,s,a)=>{const r=typeof t.price=="number"?t.price:parseFloat(String(t.price||0)),i=t.slug.toLowerCase()==="growth";return{id:t.id,name:t.name,monthlyPrice:r,price:r,period:"/month",description:rs(t),features:ts(t),buttonText:"Choose Plan",highlighted:i}},rs=t=>{const s=t.slug.toLowerCase();return s.includes("free")?"Perfect for getting started":s.includes("starter")?"For solo designers & freelancers":s.includes("growth")?"For growing businesses":s.includes("scale")||s.includes("enterprise")?"For teams and large organizations":"Choose the perfect plan for your needs"};function as(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const N=((await Y("/v1/auth/plans/")).results||[]).filter(T=>T.is_active).sort((T,_)=>{const d=typeof T.price=="number"?T.price:parseFloat(String(T.price||0)),w=typeof _.price=="number"?_.price:parseFloat(String(_.price||0));return d-w});a(N)}catch(g){t.error(`Failed to load plans: ${g.message}`)}finally{i(!1)}},n=g=>{console.log("Selected plan:",g),t.success(`Selected plan: ${g.name}`)},x=s.map((g,N)=>ss(g,N,s.length));return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Plans"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Plans"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Choose the perfect plan for your needs. All plans include our core features."})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading plans..."})}):x.length===0?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"No active plans available"})}):e.jsxs(e.Fragment,{children:[e.jsx(ve,{variant:"1",title:"Flexible Plans Tailored to Fit Your Unique Needs!",plans:x,showToggle:!0,onPlanSelect:n}),e.jsx("div",{className:"mt-8 text-center",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Need more details? View all features and limits for each plan."})})]})]})}const pr=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"}));function is(){const t=q(),[s,a]=o.useState([]),[r,i]=o.useState(!0);o.useEffect(()=>{l()},[]);const l=async()=>{try{i(!0);const n=await Tt();a(n.industries||[])}catch(n){t.error(`Failed to load industries: ${n.message}`)}finally{i(!1)}};return e.jsxs("div",{className:"p-6",children:[e.jsx(P,{title:"Industries"}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Industries"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage global industry templates (Admin Only)"})]}),r?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map(n=>e.jsxs(ee,{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:n.name}),e.jsx(C,{variant:"light",color:n.is_active?"success":"dark",children:n.is_active?"Active":"Inactive"})]}),n.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:n.description}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Sectors: ",n.sectors_count||0]})]},n.id))})]})}const br=Object.freeze(Object.defineProperty({__proto__:null,default:is},Symbol.toStringTag,{value:"Module"})),le=t=>{switch(t){case"healthy":return"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400";case"warning":return"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400";case"critical":return"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400";default:return"bg-gray-100 text-gray-800 dark:bg-gray-900/30 dark:text-gray-400"}};function ns(){var x,g,N,T,_,d,w,j,S,I,h,O,$,Z,W,A,R,U,F,H,c,p,v,M,k,b,y,L,G,z,D,ue,de,he,ce,m,V,Q,te,we,pe,Re,$e,Fe,Oe,Ee,ze,Be,Ge,We,Ve,Ue,He,Ze,Ke,qe,Ye,Je,Qe,Xe,et,tt,st,rt,at,it,nt,lt,ot,dt,ct,xt,mt,gt,ut,ht,pt,bt;const[t,s]=o.useState(null),[a,r]=o.useState(!0),[i,l]=o.useState(null),n=async()=>{try{const se=await Y("/v1/system/status/");s(se),l(null)}catch(se){l(se instanceof Error?se.message:"Unknown error")}finally{r(!1)}};return o.useEffect(()=>{n();const se=setInterval(n,3e4);return()=>clearInterval(se)},[]),a?e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsx(u,{title:"System Status",desc:"Loading system information...",children:e.jsx("div",{className:"text-center py-8",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 dark:border-white mx-auto"})})})]}):i||!t?e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsx(u,{title:"System Status",desc:"Error loading system information",children:e.jsx("div",{className:"text-center py-8 text-red-600 dark:text-red-400",children:i||"Failed to load system status"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"System Status - IGNY8",description:"System monitoring"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(u,{title:"System Resources",desc:"CPU, Memory, and Disk Usage",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"CPU"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((g=(x=t.system)==null?void 0:x.cpu)==null?void 0:g.status)||"unknown")}`,children:((T=(N=t.system)==null?void 0:N.cpu)==null?void 0:T.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((d=(_=t.system)==null?void 0:_.cpu)==null?void 0:d.usage_percent)||0)<80?"bg-green-500":(((j=(w=t.system)==null?void 0:w.cpu)==null?void 0:j.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((I=(S=t.system)==null?void 0:S.cpu)==null?void 0:I.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[($=(O=(h=t.system)==null?void 0:h.cpu)==null?void 0:O.usage_percent)==null?void 0:$.toFixed(1),"% used (",(W=(Z=t.system)==null?void 0:Z.cpu)==null?void 0:W.cores," cores)"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Memory"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((R=(A=t.system)==null?void 0:A.memory)==null?void 0:R.status)||"unknown")}`,children:((F=(U=t.system)==null?void 0:U.memory)==null?void 0:F.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((c=(H=t.system)==null?void 0:H.memory)==null?void 0:c.usage_percent)||0)<80?"bg-green-500":(((v=(p=t.system)==null?void 0:p.memory)==null?void 0:v.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((k=(M=t.system)==null?void 0:M.memory)==null?void 0:k.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[(L=(y=(b=t.system)==null?void 0:b.memory)==null?void 0:y.used_gb)==null?void 0:L.toFixed(1)," GB / ",(D=(z=(G=t.system)==null?void 0:G.memory)==null?void 0:z.total_gb)==null?void 0:D.toFixed(1)," GB"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Disk"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((de=(ue=t.system)==null?void 0:ue.disk)==null?void 0:de.status)||"unknown")}`,children:((ce=(he=t.system)==null?void 0:he.disk)==null?void 0:ce.status)||"unknown"})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-4",children:e.jsx("div",{className:`h-4 rounded-full ${(((V=(m=t.system)==null?void 0:m.disk)==null?void 0:V.usage_percent)||0)<80?"bg-green-500":(((te=(Q=t.system)==null?void 0:Q.disk)==null?void 0:te.usage_percent)||0)<95?"bg-yellow-500":"bg-red-500"}`,style:{width:`${((pe=(we=t.system)==null?void 0:we.disk)==null?void 0:pe.usage_percent)||0}%`}})}),e.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[(Fe=($e=(Re=t.system)==null?void 0:Re.disk)==null?void 0:$e.used_gb)==null?void 0:Fe.toFixed(1)," GB / ",(ze=(Ee=(Oe=t.system)==null?void 0:Oe.disk)==null?void 0:Ee.total_gb)==null?void 0:ze.toFixed(1)," GB"]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx(u,{title:"Database",desc:"PostgreSQL Status",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Status"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((Be=t.database)==null?void 0:Be.status)||"unknown")}`,children:(Ge=t.database)!=null&&Ge.connected?"Connected":"Disconnected"})]}),((We=t.database)==null?void 0:We.version)&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Version:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:t.database.version.split(",")[0]})]}),((Ve=t.database)==null?void 0:Ve.size)&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Size:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:t.database.size})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Active Connections:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Ue=t.database)==null?void 0:Ue.active_connections)||0})]})]})}),e.jsx(u,{title:"Redis",desc:"Cache & Message Broker",children:e.jsx("div",{className:"space-y-3",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Status"}),e.jsx("span",{className:`text-xs px-2 py-1 rounded ${le(((He=t.redis)==null?void 0:He.status)||"unknown")}`,children:(Ze=t.redis)!=null&&Ze.connected?"Connected":"Disconnected"})]})})}),e.jsx(u,{title:"Celery",desc:"Task Queue Workers",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Workers"}),e.jsxs("span",{className:`text-xs px-2 py-1 rounded ${le(((Ke=t.celery)==null?void 0:Ke.status)||"unknown")}`,children:[((qe=t.celery)==null?void 0:qe.worker_count)||0," active"]})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Active Tasks:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Je=(Ye=t.celery)==null?void 0:Ye.tasks)==null?void 0:Je.active)||0})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Scheduled:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((Xe=(Qe=t.celery)==null?void 0:Qe.tasks)==null?void 0:Xe.scheduled)||0})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Reserved:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-gray-200",children:((tt=(et=t.celery)==null?void 0:et.tasks)==null?void 0:tt.reserved)||0})]})]})})]}),e.jsx(u,{title:"Process Monitoring",desc:"Resource usage by technology stack",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Stack"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Processes"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"CPU %"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase",children:"Memory (MB)"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:Object.entries(((st=t.processes)==null?void 0:st.by_stack)||{}).map(([se,ke])=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-4 py-3 text-sm font-medium text-gray-800 dark:text-gray-200 capitalize",children:se}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:ke.count}),e.jsxs("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:[ke.cpu.toFixed(2),"%"]}),e.jsx("td",{className:"px-4 py-3 text-sm text-gray-600 dark:text-gray-400",children:ke.memory_mb.toFixed(2)})]},se))})]})})}),e.jsx(u,{title:"Module Statistics",desc:"Data counts by module",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Planner Module"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Keywords:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((it=(at=(rt=t.modules)==null?void 0:rt.planner)==null?void 0:at.keywords)==null?void 0:it.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Clusters:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((ot=(lt=(nt=t.modules)==null?void 0:nt.planner)==null?void 0:lt.clusters)==null?void 0:ot.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Content Ideas:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((xt=(ct=(dt=t.modules)==null?void 0:dt.planner)==null?void 0:ct.content_ideas)==null?void 0:xt.toLocaleString())||0})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-gray-200",children:"Writer Module"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Tasks:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((ut=(gt=(mt=t.modules)==null?void 0:mt.writer)==null?void 0:gt.tasks)==null?void 0:ut.toLocaleString())||0})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Images:"}),e.jsx("span",{className:"text-gray-800 dark:text-gray-200",children:((bt=(pt=(ht=t.modules)==null?void 0:ht.writer)==null?void 0:pt.images)==null?void 0:bt.toLocaleString())||0})]})]})]})]})}),e.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:["Last updated: ",new Date(t.timestamp).toLocaleString()]})]})]})}const fr=Object.freeze(Object.defineProperty({__proto__:null,default:ns},Symbol.toStringTag,{value:"Module"})),De=({label:t,defaultChecked:s=!1,checked:a,disabled:r=!1,onChange:i,color:l="blue"})=>{const n=a!==void 0,[x,g]=o.useState(s);o.useEffect(()=>{n&&a!==x&&g(a)},[a,n,x]),o.useEffect(()=>{!n&&s!==x&&g(s)},[s,n,x]);const N=n?a??!1:x,T=()=>{if(r)return;const d=!N;n||g(d),i&&i(d)},_=l==="blue"?{background:N?"bg-brand-500 ":"bg-gray-200 dark:bg-white/10",knob:N?"translate-x-full bg-white":"translate-x-0 bg-white"}:{background:N?"bg-gray-800 dark:bg-white/10":"bg-gray-200 dark:bg-white/10",knob:N?"translate-x-full bg-white":"translate-x-0 bg-white"};return e.jsxs("label",{className:`flex cursor-pointer select-none items-center gap-3 text-sm font-medium ${r?"text-gray-400":"text-gray-700 dark:text-gray-400"}`,onClick:T,children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:`block transition duration-150 ease-linear h-6 w-11 rounded-full ${r?"bg-gray-100 pointer-events-none dark:bg-gray-800":_.background}`}),e.jsx("div",{className:`absolute left-0.5 top-0.5 h-5 w-5 rounded-full shadow-theme-sm duration-150 ease-linear transform ${_.knob}`})]}),t]})};function Lt(t){const{resourceId:s,getEndpoint:a,saveEndpoint:r,initialEnabled:i=!1,extractEnabled:l=A=>(A==null?void 0:A.enabled)??!1,buildPayload:n=(A,R)=>({...A,enabled:R}),onToggleSuccess:x,onToggleError:g,loadOnMount:N=!0}=t,[T,_]=o.useState(i),[d,w]=o.useState(!1),[j,S]=o.useState(null),[I,h]=o.useState(null),O=o.useCallback(async()=>{w(!0),S(null);try{const A=a.replace("{id}",s),R=await Y(A);if(R.success&&R.data){const U=R.data;h(U);const F=l(U);_(F)}else h({}),_(i)}catch(A){const R=A instanceof Error?A:new Error(String(A));S(R),console.error(`Error loading state for ${s}:`,R)}finally{w(!1)}},[s,a,l,i]),$=o.useCallback(async A=>{w(!0),S(null);try{const R=r.replace("{id}",s),U=n(I||{},A),F=await Y(R,{method:"POST",body:JSON.stringify(U)});if(F.success){const H={...I||{},enabled:A};h(H),_(A),x&&x(A,H)}else throw new Error(F.error||"Failed to save state")}catch(R){const U=R instanceof Error?R:new Error(String(R));S(U),console.error(`Error saving state for ${s}:`,U),g&&g(U)}finally{w(!1)}},[s,r,n,I,x,g]),Z=o.useCallback(async A=>{await $(A)},[$]),W=o.useCallback(async()=>{await O()},[O]);return o.useEffect(()=>{N&&O()},[N]),{enabled:T,toggle:Z,loading:d,error:j,data:I,refresh:W}}function vt({icon:t,title:s,description:a,enabled:r,validationStatus:i,onToggle:l,onSettings:n,onDetails:x,integrationId:g,getEndpoint:N,saveEndpoint:T,onToggleSuccess:_,onToggleError:d,modelName:w}){const j=q(),S=g?Lt({resourceId:g,getEndpoint:N||"/v1/system/settings/integrations/{id}/",saveEndpoint:T||"/v1/system/settings/integrations/{id}/save/",initialEnabled:!1,onToggleSuccess:(A,R)=>{j.success(`${g} ${A?"enabled":"disabled"}`),_&&_(A,R)},onToggleError:A=>{j.error(`Failed to update ${g}: ${A.message}`),d&&d(A)}}):null,I=S?S.enabled:r??!1,h=S?A=>{S.toggle(A)}:A=>{l&&l(A)},O=S?S.loading:!1,$=()=>!I||i==="not_configured"?"bg-gray-400 dark:bg-gray-500":i==="pending"?"bg-gray-400 dark:bg-gray-500 animate-pulse":i==="success"?"bg-green-500 dark:bg-green-600":i==="error"?"bg-red-500 dark:bg-red-600":"bg-gray-400 dark:bg-gray-500",W=!I||i==="not_configured"?{text:"Disabled",color:"text-gray-400 dark:text-gray-500",bold:!1}:i==="pending"?{text:"Pending",color:"text-gray-400 dark:text-gray-500",bold:!1}:i==="success"?{text:"Enabled",color:"text-gray-800 dark:text-white",bold:!0}:i==="error"?{text:"Error",color:"text-red-600 dark:text-red-400",bold:!1}:{text:"Disabled",color:"text-gray-400 dark:text-gray-500",bold:!1};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:t}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400",children:a}),g==="runware"?e.jsx("div",{className:"absolute top-5 right-5",children:e.jsx("span",{className:`text-sm font-semibold ${w?"text-gray-800 dark:text-white":"text-gray-400 dark:text-gray-500"}`,children:w||"Disabled"})}):e.jsxs("div",{className:"absolute top-5 right-5 flex items-center gap-2",children:[e.jsx("span",{className:`text-sm ${W.color} ${W.bold?"font-bold":""} transition-colors duration-200`,children:W.text}),e.jsx("div",{className:`w-[25px] h-[25px] rounded-full ${$()} transition-colors duration-200`,title:i==="not_configured"?"Not configured":i==="pending"?"Validating...":i==="success"?"Validated successfully":i==="error"?"Validation failed":"Unknown status"})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:n,className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:x,className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:I,disabled:O,onChange:h})]})]})}function wt({title:t,description:s,integrationId:a,icon:r}){var _;const[i,l]=o.useState(!1),[n,x]=o.useState(null),[g,N]=o.useState(!1);if(a!=="openai"&&a!=="runware")return null;const T=async(d=!1)=>{l(!0),N(d),x(null);try{const w=await Y(`/v1/system/settings/integrations/${a}/`);let j="",S="gpt-4.1";if(w.success&&w.data&&(j=w.data.apiKey||"",S=w.data.model||"gpt-4.1"),!j){x({success:!1,message:"API key not configured. Please configure your API key in settings first."}),l(!1);return}const I={apiKey:j};a==="openai"&&(I.config={model:S,with_response:d});const h=await Y(`/v1/system/settings/integrations/${a}/test/`,{method:"POST",body:JSON.stringify(I)});h.success?x({success:!0,message:h.message||"API connection successful!",model_used:h.model_used||h.model,response:h.response,tokens_used:h.tokens_used,total_tokens:h.total_tokens,cost:h.cost,full_response:h.full_response||{image_url:h.image_url,provider:h.provider,size:h.size}}):x({success:!1,message:h.error||h.message||"API connection failed"})}catch(w){x({success:!1,message:`API connection failed: ${w.message||"Unknown error"}`})}finally{l(!1)}};return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex gap-3",children:a==="openai"?e.jsxs(e.Fragment,{children:[e.jsx(f,{variant:"outline",onClick:()=>T(!1),disabled:i,className:"flex-1",children:i&&!g?"Testing...":"Test OpenAI Connection"}),e.jsx(f,{variant:"outline",onClick:()=>T(!0),disabled:i,className:"flex-1",children:i&&g?"Testing...":"Test OpenAI Response (Ping)"})]}):e.jsx(f,{variant:"outline",onClick:()=>T(!1),disabled:i,className:"flex-1",children:i?"Testing...":"Test Runware Connection"})}),n&&e.jsxs("div",{className:"space-y-3",children:[n.success&&e.jsxs("div",{className:"flex items-center gap-2 text-green-600 dark:text-green-400",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm font-medium",children:n.message})]}),!n.success&&e.jsxs("div",{className:"flex items-center gap-2 text-red-600 dark:text-red-400",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm font-medium",children:n.message})]}),n.success&&e.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border-l-4 border-blue-500 p-4 rounded",children:e.jsx("div",{className:"space-y-2 text-sm",children:a==="openai"&&g?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Model Used:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white font-mono-custom",children:n.model_used||"N/A"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Expected:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:'"OK! Ping Received"'})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Actual Response:"})," ",e.jsxs("span",{className:"text-gray-900 dark:text-white",children:['"',n.response||"N/A",'"']})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Token Limit Sent:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"N/A (from your settings)"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Tokens Used:"})," ",e.jsxs("span",{className:"text-gray-900 dark:text-white",children:[n.tokens_used||"N/A"," (input/output)"]})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Total Tokens:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.total_tokens||"N/A"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Cost:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.cost||"$0.0000"})]})]}):a==="runware"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Provider:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"Runware"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Model:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white font-mono-custom",children:n.model_used||"runware:97@1"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Image Size:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:"128 x 128 (test image)"})]}),e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Cost:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:n.cost||"$0.0360"})]}),((_=n.full_response)==null?void 0:_.image_url)&&e.jsxs("div",{children:[e.jsx("strong",{className:"text-gray-700 dark:text-gray-300",children:"Test Image:"})," ",e.jsx("a",{href:n.full_response.image_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:"View Image"})]})]}):null})})]})]})})]})}function ls({title:t,description:s,integrationId:a,icon:r}){const i=q(),[l,n]=o.useState(!1),[x,g]=o.useState(""),[N,T]=o.useState("text, watermark, logo, overlay, title, caption, writing on walls, writing on objects, UI, infographic elements, post title"),[_,d]=o.useState("realistic"),[w,j]=o.useState("1024x1024"),[S,I]=o.useState("webp"),[h,O]=o.useState({}),$={"dall-e-3":["1024x1024","1024x1792","1792x1024"],"dall-e-2":["256x256","512x512","1024x1024"]},Z=()=>{const y=(h.service||"openai")==="openai"?h.model||"dall-e-3":null;return y&&$[y]?$[y]:$["dall-e-3"]};o.useEffect(()=>{const b=Z();b.length>0&&!b.includes(w)&&j(b[0])},[h.model,h.service]);const[W,A]=o.useState(null),[R,U]=o.useState(null),F="https://api.igny8.com/api";o.useEffect(()=>{(async()=>{try{const y=await fetch(`${F}/v1/system/settings/integrations/image_generation/`,{credentials:"include"});if(y.ok){const L=await y.json();L.success&&L.data&&O(L.data)}}catch(y){console.error("Error loading image settings:",y)}})()},[F]);const H=async()=>{if(console.log("[ImageGenerationCard] handleGenerate called"),!x.trim()){i.error("Please enter a prompt description");return}n(!0),U(null),A(null);try{const b=h.service||"openai",y=b==="openai"?h.model||"dall-e-3":h.runwareModel||"runware:97@1";console.log("[ImageGenerationCard] Service and model:",{service:b,model:y,imageSettings:h});const L=`Create a high-quality ${_} image. ${x}`;console.log("[ImageGenerationCard] Full prompt:",L.substring(0,100)+"...");const G={prompt:L,negative_prompt:N,image_type:_,image_size:w,image_format:S,provider:b,model:y};console.log("[ImageGenerationCard] Making request to image generation endpoint"),console.log("[ImageGenerationCard] Request body:",G);const z=await Y("/v1/system/settings/integrations/image_generation/generate/",{method:"POST",body:JSON.stringify(G)});if(console.log("[ImageGenerationCard] Response data:",z),!z.success)throw new Error(z.error||"Failed to generate image");const D={url:z.image_url,revised_prompt:z.revised_prompt,model:z.model||y,provider:z.provider||b,size:w,format:S.toUpperCase(),cost:z.cost};A(D),window.dispatchEvent(new CustomEvent("imageGenerated",{detail:D})),console.log("[ImageGenerationCard] Image generation successful:",D),i.success("Image generated successfully!")}catch(b){console.error("[ImageGenerationCard] Error in handleGenerate:",{error:b,message:b.message,stack:b.stack});const y=b.message||"Failed to generate image";U(y),window.dispatchEvent(new CustomEvent("imageGenerationError",{detail:y})),i.error(y)}finally{console.log("[ImageGenerationCard] handleGenerate completed"),n(!1)}},c=()=>{if((h.service||"openai")==="openai"){const y=h.model||"dall-e-3";return`OpenAI ${{"dall-e-3":"DALL·E 3","dall-e-2":"DALL·E 2","gpt-image-1":"GPT Image 1 (Full)","gpt-image-1-mini":"GPT Image 1 Mini"}[y]||y}`}else return"Runware"},p={"1024x1024":"Square - 1024 x 1024","1024x1792":"Portrait - 1024 x 1792","1792x1024":"Landscape - 1792 x 1024","256x256":"Small - 256 x 256","512x512":"Medium - 512 x 512"},v=Z().map(b=>({value:b,label:p[b]||b})),M=[{value:"realistic",label:"Realistic"},{value:"illustration",label:"Illustration"},{value:"3D render",label:"3D Render"},{value:"minimalist",label:"Minimalist"},{value:"cartoon",label:"Cartoon"}],k=[{value:"webp",label:"WEBP"},{value:"jpg",label:"JPG"},{value:"png",label:"PNG"}];return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[r&&e.jsx("div",{className:"mb-4 inline-flex h-10 w-10 items-center justify-center",children:r}),e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-3 rounded-lg bg-blue-50 px-4 py-3 dark:bg-blue-900/20",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"text-blue-600 dark:text-blue-400",children:e.jsx("path",{d:"M10 2L3 7V17C3 17.5304 3.21071 18.0391 3.58579 18.4142C3.96086 18.7893 4.46957 19 5 19H15C15.5304 19 16.0391 18.7893 16.4142 18.4142C16.7893 18.0391 17 17.5304 17 17V7L10 2Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-blue-600 dark:text-blue-400",children:"Provider & Model"}),e.jsx("p",{className:"text-sm font-semibold text-blue-900 dark:text-blue-200",children:c()})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Prompt Description *"}),e.jsx("textarea",{value:x,onChange:b=>g(b.target.value),rows:6,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",placeholder:"Describe the visual elements, style, mood, and composition you want in the image..."}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Describe the visual elements, style, mood, and composition you want in the image."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Negative Prompt"}),e.jsx("textarea",{value:N,onChange:b=>T(b.target.value),rows:2,className:"w-full rounded-lg border border-gray-300 px-4 py-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",placeholder:"Describe what you DON'T want in the image..."}),e.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Specify elements to avoid in the generated image (text, watermarks, logos, etc.)."})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Type"}),e.jsx("select",{value:_,onChange:b=>d(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:M.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Size"}),e.jsx("select",{value:w,onChange:b=>j(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:v.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Image Format"}),e.jsx("select",{value:S,onChange:b=>I(b.target.value),className:"w-full rounded-lg border border-gray-300 px-4 py-2.5 text-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20 dark:border-gray-700 dark:bg-gray-800 dark:text-white",children:k.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(f,{onClick:H,disabled:l||!x.trim(),className:"inline-flex items-center gap-2 px-6 py-2.5",children:l?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating..."]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"})]}),"Generate Image"]})})})]})}),R&&e.jsx("div",{className:"mt-4 rounded-lg border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20",children:e.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:R})})]})}function os({title:t,description:s,icon:a,generatedImage:r,error:i}){const[l,n]=o.useState(r),[x,g]=o.useState(i);return o.useEffect(()=>{const N=_=>{n(_.detail),g(null)},T=_=>{g(_.detail),n(null)};return window.addEventListener("imageGenerated",N),window.addEventListener("imageGenerationError",T),()=>{window.removeEventListener("imageGenerated",N),window.removeEventListener("imageGenerationError",T)}},[]),o.useEffect(()=>{n(r)},[r]),o.useEffect(()=>{g(i)},[i]),e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-6",children:[a&&e.jsx("div",{className:"mb-4 inline-flex h-10 w-10 items-center justify-center",children:a}),e.jsx("h3",{className:"mb-2 text-base font-semibold text-gray-800 dark:text-white/90",children:t}),s&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})]}),e.jsx("div",{className:"border-t border-gray-200 p-5 dark:border-gray-800",children:x?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"mb-4 rounded-full bg-red-100 p-4 dark:bg-red-900/20",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-red-600 dark:text-red-400",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),e.jsx("h4",{className:"mb-2 text-lg font-semibold text-gray-800 dark:text-white",children:"Generation Failed"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:x})]}):l!=null&&l.url?e.jsxs("div",{className:"space-y-5",children:[e.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700",children:e.jsx("img",{src:l.url,alt:"Generated image",className:"w-full object-contain",style:{maxHeight:"400px"}})}),e.jsxs("div",{className:"space-y-3 rounded-lg bg-gray-50 p-4 dark:bg-gray-800/50",children:[e.jsx("h4",{className:"text-sm font-semibold text-gray-800 dark:text-white",children:"Image Details"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Size:"}),e.jsxs("span",{className:"ml-2 text-gray-800 dark:text-white",children:[l.size||"1024x1024"," pixels"]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Format:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.format||"WEBP"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Model:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.model||"DALL·E 3"})]}),l.cost&&e.jsxs("div",{children:[e.jsx("span",{className:"font-medium text-gray-600 dark:text-gray-400",children:"Cost:"}),e.jsx("span",{className:"ml-2 text-gray-800 dark:text-white",children:l.cost})]})]}),l.revised_prompt&&e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-gray-600 dark:text-gray-400",children:"Revised Prompt:"}),e.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:l.revised_prompt})]}),l.negative_prompt&&e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-gray-600 dark:text-gray-400",children:"Negative Prompt:"}),e.jsx("p",{className:"text-xs text-gray-700 dark:text-gray-300",children:l.negative_prompt})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),e.jsx("polyline",{points:"15 3 21 3 21 9"}),e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"View Original"]}),e.jsxs("button",{onClick:()=>{navigator.clipboard.writeText(l.url)},className:"inline-flex items-center gap-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),e.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),"Copy URL"]})]})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx("div",{className:"mb-4 rounded-full bg-gray-100 p-4 dark:bg-gray-800",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400 dark:text-gray-500",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("circle",{cx:"9",cy:"9",r:"2"}),e.jsx("path",{d:"M21 15l-3.086-3.086a2 2 0 00-2.828 0L6 21"})]})}),e.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500",children:'No image generated yet. Fill out the form and click "Generate Image" to create your first AI image.'})]})})]})}function ds({icon:t,title:s,description:a,validationStatus:r,onSettings:i,onDetails:l}){const n=q(),x=Lt({resourceId:"image_generation",getEndpoint:"/v1/system/settings/integrations/{id}/",saveEndpoint:"/v1/system/settings/integrations/{id}/save/",initialEnabled:!1,onToggleSuccess:I=>{n.success(`Image generation service ${I?"enabled":"disabled"}`)},onToggleError:I=>{n.error(`Failed to update image generation service: ${I.message}`)}}),g=x.enabled,N=x.loading,[T,_]=o.useState({}),d="https://api.igny8.com/api";o.useEffect(()=>{(async()=>{try{const h=await fetch(`${d}/v1/system/settings/integrations/image_generation/`,{credentials:"include"});if(h.ok){const O=await h.json();O.success&&O.data&&_(O.data)}}catch(h){console.error("Error loading image settings:",h)}})()},[d,g]);const w=I=>{x.toggle(I)},j=()=>{const I=T.service||"openai";if(I==="openai"){const h=T.model||"dall-e-3";return`OpenAI ${{"dall-e-3":"DALL·E 3","dall-e-2":"DALL·E 2","gpt-image-1":"GPT Image 1 (Full)","gpt-image-1-mini":"GPT Image 1 Mini"}[h]||h}`}else if(I==="runware"){const h=T.runwareModel||"runware:97@1";return`Runware ${{"runware:97@1":"HiDream-I1 Full","runware:gen3a_turbo":"Gen3a Turbo","runware:gen3a":"Gen3a"}[h]||h}`}return"Not configured"},S=()=>(T.service,!(T.model||T.runwareModel)||r==="not_configured"||r==="pending"?"text-gray-400 dark:text-gray-500":"text-black dark:text-white");return e.jsxs("article",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/3",children:[e.jsxs("div",{className:"relative p-5 pb-9",children:[e.jsx("div",{className:"mb-5 inline-flex h-10 w-10 items-center justify-center",children:t}),e.jsx("h3",{className:"mb-3 text-lg font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"max-w-xs text-sm text-gray-500 dark:text-gray-400",children:a}),e.jsx("div",{className:"absolute top-5 right-5 h-fit",children:e.jsx("p",{className:`text-lg font-semibold ${S()} transition-colors duration-200`,children:j()})})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-200 p-5 dark:border-gray-800",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(f,{variant:"outline",size:"md",onClick:i,className:"shadow-theme-xs inline-flex h-11 w-11 items-center justify-center rounded-lg border border-gray-300 text-gray-700 dark:border-gray-700 dark:text-gray-400",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[e.jsx("path",{d:"M5.64615 4.59906C5.05459 4.25752 4.29808 4.46015 3.95654 5.05171L2.69321 7.23986C2.35175 7.83128 2.5544 8.58754 3.14582 8.92899C3.97016 9.40493 3.97017 10.5948 3.14583 11.0707C2.55441 11.4122 2.35178 12.1684 2.69323 12.7598L3.95657 14.948C4.2981 15.5395 5.05461 15.7422 5.64617 15.4006C6.4706 14.9247 7.50129 15.5196 7.50129 16.4715C7.50129 17.1545 8.05496 17.7082 8.73794 17.7082H11.2649C11.9478 17.7082 12.5013 17.1545 12.5013 16.4717C12.5013 15.5201 13.5315 14.9251 14.3556 15.401C14.9469 15.7423 15.7029 15.5397 16.0443 14.9485L17.3079 12.7598C17.6494 12.1684 17.4467 11.4121 16.8553 11.0707C16.031 10.5948 16.031 9.40494 16.8554 8.92902C17.4468 8.58757 17.6494 7.83133 17.3079 7.23992L16.0443 5.05123C15.7029 4.45996 14.9469 4.25737 14.3556 4.59874C13.5315 5.07456 12.5013 4.47961 12.5013 3.52798C12.5013 2.84515 11.9477 2.2915 11.2649 2.2915L8.73795 2.2915C8.05496 2.2915 7.50129 2.84518 7.50129 3.52816C7.50129 4.48015 6.47059 5.07505 5.64615 4.59906Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M12.5714 9.99977C12.5714 11.4196 11.4204 12.5706 10.0005 12.5706C8.58069 12.5706 7.42969 11.4196 7.42969 9.99977C7.42969 8.57994 8.58069 7.42894 10.0005 7.42894C11.4204 7.42894 12.5714 8.57994 12.5714 9.99977Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsx(f,{variant:"outline",size:"md",onClick:l,className:"shadow-theme-xs inline-flex h-11 items-center justify-center rounded-lg border border-gray-300 px-4 py-3 text-sm font-medium text-gray-700 dark:border-gray-700 dark:text-gray-400",children:"Details"})]}),e.jsx(De,{label:"",checked:g,disabled:N,onChange:w})]})]})}const K=({variant:t,title:s,message:a,showLink:r=!1,linkHref:i="#",linkText:l="Learn more"})=>{const n={success:{container:"border-b-2 border-success-500 bg-success-50 dark:border-success-500/30 dark:bg-success-500/15",icon:"text-success-500"},error:{container:"border-b-2 border-error-500 bg-error-50 dark:border-error-500/30 dark:bg-error-500/15",icon:"text-error-500"},warning:{container:"border-b-2 border-warning-500 bg-warning-50 dark:border-warning-500/30 dark:bg-warning-500/15",icon:"text-warning-500"},info:{container:"border-b-2 border-blue-light-500 bg-blue-light-50 dark:border-blue-light-500/30 dark:bg-blue-light-500/15",icon:"text-blue-light-500"}},x={success: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:"M3.70186 12.0001C3.70186 7.41711 7.41711 3.70186 12.0001 3.70186C16.5831 3.70186 20.2984 7.41711 20.2984 12.0001C20.2984 16.5831 16.5831 20.2984 12.0001 20.2984C7.41711 20.2984 3.70186 16.5831 3.70186 12.0001ZM12.0001 1.90186C6.423 1.90186 1.90186 6.423 1.90186 12.0001C1.90186 17.5772 6.423 22.0984 12.0001 22.0984C17.5772 22.0984 22.0984 17.5772 22.0984 12.0001C22.0984 6.423 17.5772 1.90186 12.0001 1.90186ZM15.6197 10.7395C15.9712 10.388 15.9712 9.81819 15.6197 9.46672C15.2683 9.11525 14.6984 9.11525 14.347 9.46672L11.1894 12.6243L9.6533 11.0883C9.30183 10.7368 8.73198 10.7368 8.38051 11.0883C8.02904 11.4397 8.02904 12.0096 8.38051 12.3611L10.553 14.5335C10.7217 14.7023 10.9507 14.7971 11.1894 14.7971C11.428 14.7971 11.657 14.7023 11.8257 14.5335L15.6197 10.7395Z"})}),error:e.jsx("svg",{className:"fill-current",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:"M20.3499 12.0004C20.3499 16.612 16.6115 20.3504 11.9999 20.3504C7.38832 20.3504 3.6499 16.612 3.6499 12.0004C3.6499 7.38881 7.38833 3.65039 11.9999 3.65039C16.6115 3.65039 20.3499 7.38881 20.3499 12.0004ZM11.9999 22.1504C17.6056 22.1504 22.1499 17.6061 22.1499 12.0004C22.1499 6.3947 17.6056 1.85039 11.9999 1.85039C6.39421 1.85039 1.8499 6.3947 1.8499 12.0004C1.8499 17.6061 6.39421 22.1504 11.9999 22.1504ZM13.0008 16.4753C13.0008 15.923 12.5531 15.4753 12.0008 15.4753L11.9998 15.4753C11.4475 15.4753 10.9998 15.923 10.9998 16.4753C10.9998 17.0276 11.4475 17.4753 11.9998 17.4753L12.0008 17.4753C12.5531 17.4753 13.0008 17.0276 13.0008 16.4753ZM11.9998 6.62898C12.414 6.62898 12.7498 6.96476 12.7498 7.37898L12.7498 13.0555C12.7498 13.4697 12.414 13.8055 11.9998 13.8055C11.5856 13.8055 11.2498 13.4697 11.2498 13.0555L11.2498 7.37898C11.2498 6.96476 11.5856 6.62898 11.9998 6.62898Z",fill:"#F04438"})}),warning:e.jsx("svg",{className:"fill-current",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.6501 12.0001C3.6501 7.38852 7.38852 3.6501 12.0001 3.6501C16.6117 3.6501 20.3501 7.38852 20.3501 12.0001C20.3501 16.6117 16.6117 20.3501 12.0001 20.3501C7.38852 20.3501 3.6501 16.6117 3.6501 12.0001ZM12.0001 1.8501C6.39441 1.8501 1.8501 6.39441 1.8501 12.0001C1.8501 17.6058 6.39441 22.1501 12.0001 22.1501C17.6058 22.1501 22.1501 17.6058 22.1501 12.0001C22.1501 6.39441 17.6058 1.8501 12.0001 1.8501ZM10.9992 7.52517C10.9992 8.07746 11.4469 8.52517 11.9992 8.52517H12.0002C12.5525 8.52517 13.0002 8.07746 13.0002 7.52517C13.0002 6.97289 12.5525 6.52517 12.0002 6.52517H11.9992C11.4469 6.52517 10.9992 6.97289 10.9992 7.52517ZM12.0002 17.3715C11.586 17.3715 11.2502 17.0357 11.2502 16.6215V10.945C11.2502 10.5308 11.586 10.195 12.0002 10.195C12.4144 10.195 12.7502 10.5308 12.7502 10.945V16.6215C12.7502 17.0357 12.4144 17.3715 12.0002 17.3715Z",fill:""})}),info:e.jsx("svg",{className:"fill-current",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.6501 11.9996C3.6501 7.38803 7.38852 3.64961 12.0001 3.64961C16.6117 3.64961 20.3501 7.38803 20.3501 11.9996C20.3501 16.6112 16.6117 20.3496 12.0001 20.3496C7.38852 20.3496 3.6501 16.6112 3.6501 11.9996ZM12.0001 1.84961C6.39441 1.84961 1.8501 6.39392 1.8501 11.9996C1.8501 17.6053 6.39441 22.1496 12.0001 22.1496C17.6058 22.1496 22.1501 17.6053 22.1501 11.9996C22.1501 6.39392 17.6058 1.84961 12.0001 1.84961ZM10.9992 7.52468C10.9992 8.07697 11.4469 8.52468 11.9992 8.52468H12.0002C12.5525 8.52468 13.0002 8.07697 13.0002 7.52468C13.0002 6.9724 12.5525 6.52468 12.0002 6.52468H11.9992C11.4469 6.52468 10.9992 6.9724 10.9992 7.52468ZM12.0002 17.371C11.586 17.371 11.2502 17.0352 11.2502 16.621V10.9445C11.2502 10.5303 11.586 10.1945 12.0002 10.1945C12.4144 10.1945 12.7502 10.5303 12.7502 10.9445V16.621C12.7502 17.0352 12.4144 17.371 12.0002 17.371Z",fill:""})})};return e.jsx("div",{className:`rounded-xl p-4 ${n[t].container}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`-mt-0.5 ${n[t].icon}`,children:x[t]}),e.jsxs("div",{children:[e.jsx("h4",{className:"mb-1 text-sm font-semibold text-gray-800 dark:text-white/90",children:s}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 whitespace-pre-line",children:a}),r&&e.jsx(_t,{to:i,className:"inline-block mt-3 text-sm font-medium text-gray-500 underline dark:text-gray-400",children:l})]})]})})},Ie=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("path",{d:"M12.321 24.9775C11.9035 24.3455 12.9535 23.389 12.5264 22.5859C12.2802 22.1227 11.8779 21.8341 11.3946 21.7735C10.9308 21.7153 10.4531 21.8851 10.1486 22.2169C9.66775 22.7401 9.59299 23.4523 9.68599 23.7043C9.72002 23.7967 9.77351 23.8219 9.81181 23.8273C10.0737 23.8618 10.221 23.1897 10.3115 23.0497C10.5614 22.6639 11.129 22.5471 11.5211 22.8007C12.2643 23.2814 11.6198 24.0584 11.6754 24.7147C11.7295 25.3537 12.1277 25.6105 12.4851 25.6375C12.8328 25.6507 13.0759 25.4575 13.1373 25.3165C13.2845 24.9799 12.6644 25.4975 12.321 24.9775Z",fill:"#0C111D"}),e.jsx("path",{d:"M27.8512 19.1761C27.6563 19.1492 27.4432 19.1498 27.2215 19.1761C27.0532 18.9637 26.9024 18.6199 26.8173 18.2185C26.6659 17.5045 26.6817 16.9873 27.1042 16.9201C27.5266 16.8529 27.7309 17.2849 27.8822 17.9989C27.9837 18.4789 27.9643 18.9199 27.8512 19.1761Z",fill:"#0C111D"}),e.jsx("path",{d:"M23.2243 19.6009C23.241 19.7626 23.2469 19.9262 23.2422 20.0769C23.6509 20.1009 23.9405 20.295 24.0175 20.4182C24.0571 20.4818 24.0412 20.5232 24.0285 20.5424C23.9862 20.6082 23.8955 20.598 23.7055 20.5767C23.5396 20.5581 23.3609 20.5417 23.1752 20.5503C23.0742 20.8602 22.7745 20.8892 22.564 20.66C22.417 20.7048 22.1281 20.8892 22.0421 20.6888C22.0413 20.5893 22.1453 20.4447 22.3337 20.317C22.2051 20.0718 22.1189 19.8092 22.068 19.5373C21.801 19.5854 21.5607 19.6602 21.3725 19.7188C21.284 19.7464 20.9343 19.9044 20.8933 19.7263C20.8659 19.6033 21.0574 19.4005 21.2598 19.2541C21.486 19.0935 21.7369 18.9794 21.997 18.9135C21.9914 18.5263 22.0902 18.2561 22.3716 18.2113C22.7204 18.1558 22.9366 18.4244 23.0863 18.9218C23.5079 19.0389 23.9289 19.3294 24.1148 19.6297C24.1871 19.7461 24.2011 19.8361 24.1543 19.8835C24.0375 20.0046 23.3901 19.6535 23.2243 19.6009Z",fill:"#0C111D"}),e.jsx("path",{d:"M25.9967 21.3415C26.2641 21.4711 26.5583 21.4201 26.6544 21.2275C26.7504 21.0349 26.6112 20.7739 26.3438 20.6443C26.0763 20.5147 25.7821 20.5657 25.6861 20.7583C25.5901 20.9509 25.7292 21.2119 25.9967 21.3415Z",fill:"#0C111D"}),e.jsx("path",{d:"M27.3132 20.3851C27.3181 20.0905 27.4986 19.8553 27.7156 19.8589C27.9326 19.8631 28.1046 20.1043 28.0998 20.3983C28.0949 20.6923 27.9144 20.9275 27.6974 20.9239C27.4804 20.9203 27.3084 20.6791 27.3132 20.3851Z",fill:"#0C111D"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.1978 23.9929C33.196 23.9868 33.202 24.0079 33.1978 23.9929C33.6336 23.9929 34.318 24.4873 34.318 25.6819C34.318 26.8705 33.8184 28.2169 33.7004 28.5157C31.9006 32.7733 27.605 35.1433 22.4882 34.9933C17.7179 34.8535 13.6497 32.3689 11.8693 28.3183C10.7928 28.3195 9.68291 27.8521 8.83923 27.1141C7.94996 26.3365 7.40169 25.3303 7.29471 24.2809C7.21144 23.4637 7.31294 22.7035 7.57249 22.0405L6.5726 21.2041C1.99679 17.3906 16.3084 1.68861 20.8854 5.6294C20.9085 5.6492 22.4427 7.13479 22.4463 7.13839C24.6532 6.21344 30.5665 4.45236 30.5731 8.55199C30.5755 9.91338 29.6966 11.501 28.2882 12.9416C29.9158 14.4315 29.4867 16.5479 29.7458 18.4897L30.3111 18.6445C31.3888 18.9427 32.1553 19.3405 32.5303 19.7293C32.9054 20.1175 33.0914 20.4937 33.1589 20.9347C33.2221 21.2905 33.2136 21.9187 32.7382 22.6213C32.9094 23.0746 33.0656 23.5264 33.1978 23.9929ZM11.7885 27.2137C11.9483 27.2173 12.107 27.2071 12.2626 27.1807C13.9347 26.8993 14.3724 25.1065 14.097 23.3461C13.7858 21.3583 12.4237 20.6575 11.4991 20.6077C11.242 20.5945 11.0031 20.6173 10.8062 20.6563C9.15591 20.9845 8.22409 22.3705 8.40766 24.1705C8.5736 25.7995 10.2427 27.1729 11.7885 27.2137ZM8.05086 21.1447C8.6046 20.3509 9.50967 19.7767 10.5369 19.5793C11.8444 16.115 14.0277 12.923 16.9174 10.7264C19.0619 8.96058 21.3747 7.69399 21.3747 7.69399C21.3747 7.69399 20.1292 6.26839 19.753 6.16339C17.4389 5.5466 12.4413 8.94858 9.25013 13.4438C7.95908 15.2624 6.11064 18.4831 6.99444 20.1397C7.10324 20.3449 7.7202 20.8723 8.05086 21.1447ZM26.8118 26.4181C26.8154 26.4553 26.7924 26.4937 26.7589 26.5075C26.7589 26.5075 24.8995 27.3613 21.9461 26.4595C22.0523 27.3448 23.1259 27.6803 23.8759 27.8017C27.5357 28.4233 30.9573 26.3575 31.7274 25.8373C31.8596 25.748 31.7258 25.9776 31.7019 26.0113C30.7591 27.2119 28.2244 28.6021 24.9269 28.6015C23.4888 28.6009 22.0512 28.1011 21.5236 27.3325C20.7048 26.1403 21.4829 24.3997 22.8475 24.5809C25.1541 24.838 27.5188 24.6448 29.6541 23.6665C31.5159 22.8133 32.2191 21.8749 32.1134 21.1147C31.9493 19.9366 30.2026 19.7524 29.3197 19.4659C28.9356 19.3405 28.7459 19.2403 28.7028 18.5269C28.6839 18.2155 28.6292 17.129 28.6092 16.6796C28.5739 15.893 28.4779 14.8172 27.802 14.3732C27.6257 14.2574 27.43 14.2016 27.2239 14.1908C27.0596 14.1829 26.9622 14.2055 26.9098 14.2176C26.8981 14.2204 26.8886 14.2226 26.8811 14.2238C26.5161 14.285 26.2925 14.4697 26.0287 14.6874C26.0135 14.7 25.9982 14.7126 25.9827 14.7254C25.1396 15.419 24.4279 15.5324 23.6358 15.4988C23.3892 15.4884 23.135 15.4638 22.8668 15.4378C22.6201 15.4139 22.3617 15.3889 22.0865 15.3728L21.7503 15.3536C20.424 15.2864 19.0017 16.4168 18.7652 18.0223C18.5011 19.8145 19.5028 20.9122 20.1542 21.6261C20.3152 21.8025 20.4548 21.9555 20.5486 22.0897C20.6088 22.1707 20.6787 22.2847 20.6787 22.3933C20.6787 22.5229 20.5936 22.6255 20.5103 22.7131C19.1573 24.0865 18.7245 26.2687 19.2345 28.0873C19.2983 28.3141 19.3792 28.5313 19.4746 28.7389C20.6708 31.4983 24.3823 32.7835 28.0074 31.6147C30.5481 30.7955 32.7929 28.8159 33.25 26.0851C33.3588 25.3735 33.199 25.0987 32.9814 24.9661C32.751 24.8263 32.475 24.8749 32.475 24.8749C32.475 24.8749 32.3492 24.0247 31.993 23.2519C30.936 24.0751 29.5756 24.6535 28.5399 24.9469C26.8804 25.4168 25.0879 25.5998 23.373 25.3782C22.6775 25.2883 22.2102 25.228 22.0099 25.8703C24.2972 26.6971 26.7182 26.3431 26.7182 26.3431C26.765 26.3383 26.8069 26.3719 26.8118 26.4181ZM20.2125 10.3736C18.9616 11.0054 17.5648 12.1304 16.4305 13.4246C16.3904 13.4708 16.45 13.5344 16.4992 13.499C17.479 12.7952 18.8224 12.1412 20.5821 11.7176C22.5533 11.243 24.451 11.4422 25.6101 11.7044C25.6685 11.7176 25.7049 11.6186 25.6533 11.5898C24.8874 11.1656 23.7118 10.8776 22.8779 10.8716C22.8371 10.871 22.814 10.8242 22.8384 10.7918C22.9824 10.6004 23.18 10.4114 23.3605 10.2746C23.4006 10.2434 23.3763 10.1792 23.3252 10.1822C22.2878 10.2451 19.9183 11.3255 19.9268 11.2862C19.9876 10.9982 20.1791 10.6178 20.2781 10.4402C20.3019 10.3982 20.2557 10.352 20.2125 10.3736Z",fill:"#0C111D"})]}),kt=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#625DF5"}),e.jsx("path",{d:"M20 12L28 20L20 28L12 20L20 12Z",fill:"white"})]});function cs(){var F,H;const t=q(),[s,a]=o.useState({openai:{id:"openai",enabled:!1,apiKey:"",model:"gpt-4.1"},runware:{id:"runware",enabled:!1,apiKey:""},image_generation:{id:"image_generation",enabled:!1,service:"openai",provider:"openai",model:"dall-e-3",runwareModel:"runware:97@1",image_type:"realistic",max_in_article_images:2,image_format:"webp",desktop_enabled:!0,mobile_enabled:!0}}),[r,i]=o.useState(null),[l,n]=o.useState(!1),[x,g]=o.useState(!1),[N,T]=o.useState(!1),[_,d]=o.useState(!1),[w,j]=o.useState({openai:"not_configured",runware:"not_configured",image_generation:"not_configured"}),S=o.useCallback(async(c,p,v,M)=>{const k="https://api.igny8.com/api";if(!["openai","runware"].includes(c))return;if(!(v&&v.trim()!=="")||!p){j(y=>({...y,[c]:"not_configured"}));return}j(y=>({...y,[c]:"pending"}));try{const y={apiKey:v};c==="openai"&&(y.config={model:M||"gpt-4.1",with_response:!1});const L=await fetch(`${k}/v1/system/settings/integrations/${c}/test/`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(y)}),G=await L.json();L.ok&&G.success?j(z=>({...z,[c]:"success"})):(console.error(`Validation failed for ${c}:`,G.error||G.message),j(z=>({...z,[c]:"error"})))}catch(y){console.error(`Error validating ${c}:`,y),j(L=>({...L,[c]:"error"}))}},[]),I=o.useCallback(async()=>{a(c=>(["openai","runware"].forEach(p=>{const v=c[p];if(!v)return;const M=v.enabled===!0,k=v.apiKey,b=v.model;S(p,M,k,b)}),c))},[S]);o.useEffect(()=>{h()},[]),o.useEffect(()=>{if(!Object.values(s).some(v=>v.apiKey!==void 0||v.enabled!==void 0))return;const p=setTimeout(()=>{I()},500);return()=>clearTimeout(p)},[s.openai.enabled,s.runware.enabled,s.openai.apiKey,s.runware.apiKey]);const h=async()=>{try{const c="https://api.igny8.com/api",v=["openai","runware","image_generation"].map(async k=>{try{const b=await fetch(`${c}/v1/system/settings/integrations/${k}/`,{credentials:"include"});if(b.ok){const y=await b.json();if(y.success&&y.data)return{id:k,config:y.data}}return{id:k,config:null}}catch(b){return console.error(`Error loading ${k} settings:`,b),{id:k,config:null}}}),M=await Promise.all(v);a(k=>{const b={...k};return M.forEach(({id:y,config:L})=>{L&&k[y]&&(b[y]={...k[y],...L,enabled:L.enabled!==void 0?L.enabled:k[y].enabled})}),b})}catch(c){console.error("Error loading integration settings:",c)}},O=c=>{i(c),g(!0)},$=c=>{i(c),n(!0)},Z=async()=>{if(!r)return;if(r!=="openai"&&r!=="runware"){t.warning("Connection testing is only available for OpenAI and Runware");return}const c=s[r],p=c.apiKey;if(!p){t.error("Please enter an API key first");return}d(!0),r&&j(v=>({...v,[r]:"pending"}));try{const v=await Y(`/v1/system/settings/integrations/${r}/test/`,{method:"POST",body:JSON.stringify({apiKey:p,config:c})});if(v.success)t.success(v.message||"API connection test successful!"),v.response&&t.info(`Response: ${v.response}`),v.tokens_used&&t.info(`Tokens used: ${v.tokens_used}`),r&&j(M=>({...M,[r]:"success"}));else throw new Error(v.error||"Connection test failed")}catch(v){console.error("Error testing connection:",v),t.error(`Connection test failed: ${v.message||"Unknown error"}`),r&&j(M=>({...M,[r]:"error"}))}finally{d(!1)}},W=async()=>{if(r){T(!0);try{const c=s[r];let p={...c};r==="image_generation"&&(p={...c,provider:c.service||c.provider||"openai",model:c.service==="openai"?c.model||"dall-e-3":c.service==="runware"?c.runwareModel||"runware:97@1":c.model,image_type:c.image_type||"realistic",max_in_article_images:c.max_in_article_images||2,image_format:c.image_format||"webp",desktop_enabled:c.desktop_enabled!==void 0?c.desktop_enabled:!0,mobile_enabled:c.mobile_enabled!==void 0?c.mobile_enabled:!0});const M=`https://api.igny8.com/api/v1/system/settings/integrations/${r}/save/`,k=await fetch(M,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(p)});if(!(k.headers.get("content-type")||"").includes("application/json")){const L=await k.text();if(L.trim().startsWith("{h().then(()=>{setTimeout(()=>I(),300)}).catch(L=>{console.error("Error reloading settings after save:",L)})},100);else throw new Error(y.error||"Failed to save settings")}catch(c){console.error("Error saving integration settings:",c),t.error(`Failed to save settings: ${c.message||"Unknown error"}`)}finally{T(!1)}}},A=c=>{const p=s[c];if(c==="openai")return[{label:"App Name",value:"OpenAI API"},{label:"API Key",value:p.apiKey?`${p.apiKey.substring(0,20)}...`:"Not configured"},{label:"Model",value:p.model||"Not set"}];if(c==="runware")return[{label:"App Name",value:"Runware API"},{label:"API Key",value:p.apiKey?`${p.apiKey.substring(0,20)}...`:"Not configured"}];if(c==="image_generation"){const v=p.service||"openai",M=v==="openai"?p.model||"Not set":p.runwareModel||"Not set";return[{label:"Service",value:v==="openai"?"OpenAI":"Runware"},{label:"Model",value:M}]}return[]},R=o.useCallback(c=>{const p=s[c];if(c==="openai")return[{key:"apiKey",label:"OpenAI API Key",type:"password",value:p.apiKey||"",onChange:v=>{a({...s,[c]:{...p,apiKey:v}})},placeholder:"Enter your OpenAI API key",required:!0},{key:"model",label:"AI Model",type:"select",value:p.model||"gpt-4.1",onChange:v=>{a({...s,[c]:{...p,model:v}})},options:[{value:"gpt-4.1",label:"GPT-4.1 - $2.00 / $8.00 per 1M tokens"},{value:"gpt-4o-mini",label:"GPT-4o mini - $0.15 / $0.60 per 1M tokens"},{value:"gpt-4o",label:"GPT-4o - $2.50 / $10.00 per 1M tokens"}]}];if(c==="runware")return[{key:"apiKey",label:"Runware API Key",type:"password",value:p.apiKey||"",onChange:v=>{a({...s,[c]:{...p,apiKey:v}})},placeholder:"Enter your Runware API key",required:!0}];if(c==="image_generation"){const v=p.service||"openai",M=[{key:"service",label:"Image Generation Service",type:"select",value:v,onChange:k=>{a({...s,[c]:{...p,service:k,model:k==="openai"?"dall-e-3":void 0,runwareModel:k==="runware"?"runware:97@1":void 0}})},options:[{value:"openai",label:"OpenAI - Multiple models available"},{value:"runware",label:"Runware - $0.036 per image"}]}];return v==="openai"?M.push({key:"model",label:"OpenAI Image Model",type:"select",value:p.model||"dall-e-3",onChange:k=>{a({...s,[c]:{...p,model:k}})},options:[{value:"dall-e-3",label:"DALL·E 3 - $0.040 per image"},{value:"dall-e-2",label:"DALL·E 2 - $0.020 per image"}]}):v==="runware"&&M.push({key:"runwareModel",label:"Runware Model",type:"select",value:p.runwareModel||"runware:97@1",onChange:k=>{a({...s,[c]:{...p,runwareModel:k}})},options:[{value:"runware:97@1",label:"HiDream-I1 Full - $0.036 per image"},{value:"runware:gen3a_turbo",label:"Gen3a Turbo - $0.036 per image"},{value:"runware:gen3a",label:"Gen3a - $0.036 per image"}]}),M.push({key:"image_type",label:"Image Type",type:"select",value:p.image_type||"realistic",onChange:k=>{a({...s,[c]:{...p,image_type:k}})},options:[{value:"realistic",label:"Realistic"},{value:"artistic",label:"Artistic"},{value:"cartoon",label:"Cartoon"}]},{key:"max_in_article_images",label:"Max In-Article Images",type:"select",value:String(p.max_in_article_images||2),onChange:k=>{a({...s,[c]:{...p,max_in_article_images:parseInt(k)}})},options:[{value:"1",label:"1 Image"},{value:"2",label:"2 Images"},{value:"3",label:"3 Images"},{value:"4",label:"4 Images"},{value:"5",label:"5 Images"}]},{key:"image_format",label:"Image Format",type:"select",value:p.image_format||"webp",onChange:k=>{a({...s,[c]:{...p,image_format:k}})},options:[{value:"webp",label:"WEBP"},{value:"jpg",label:"JPG"},{value:"png",label:"PNG"}]}),M}return[]},[s]),U=o.useMemo(()=>{var c,p,v;if(!(r!=="image_generation"||!x))try{const M=R(r),k=M.find(D=>D.key==="service"),b=((c=s[r])==null?void 0:c.service)||"openai",y=M.find(D=>b==="openai"?D.key==="model":D.key==="runwareModel"),L=M.find(D=>D.key==="max_in_article_images"),G=M.find(D=>D.key==="image_type"),z=M.find(D=>D.key==="image_format");return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[k&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[k.label,k.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:k.options||[],placeholder:k.placeholder||k.label,value:k.value||"",onChange:D=>k.onChange(D),className:"w-full"})]}),y&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[y.label,y.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:y.options||[],placeholder:y.placeholder||y.label,value:y.value||"",onChange:D=>y.onChange(D),className:"w-full"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(J,{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Max Images"}),e.jsx("div",{className:"p-3 rounded-lg border border-gray-200 dark:border-gray-700 bg-gradient-to-r from-purple-500 to-blue-500 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:"Featured Image"}),e.jsx("div",{className:"text-xs opacity-90",children:"1280×832 pixels"})]}),e.jsx("div",{className:"text-xs bg-white/20 px-2 py-1 rounded",children:"Always Enabled"})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(jt,{checked:((p=s[r])==null?void 0:p.desktop_enabled)!==!1,onChange:D=>{a({...s,[r]:{...s[r],desktop_enabled:D}})}}),e.jsxs("div",{children:[e.jsx(J,{className:"font-medium text-gray-700 dark:text-gray-300",children:"Desktop Images"}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"1024×1024 pixels"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 dark:border-gray-700",children:[e.jsx(jt,{checked:((v=s[r])==null?void 0:v.mobile_enabled)!==!1,onChange:D=>{a({...s,[r]:{...s[r],mobile_enabled:D}})}}),e.jsxs("div",{children:[e.jsx(J,{className:"font-medium text-gray-700 dark:text-gray-300",children:"Mobile Images"}),e.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"960×1280 pixels"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[L&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[L.label,L.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:L.options||[],placeholder:L.placeholder||L.label,value:L.value||"",onChange:D=>L.onChange(D),className:"w-full"})]}),G&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[G.label,G.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:G.options||[],placeholder:G.placeholder||G.label,value:G.value||"",onChange:D=>G.onChange(D),className:"w-full"})]}),z&&e.jsxs("div",{children:[e.jsxs(J,{className:"mb-2",children:[z.label,z.required&&e.jsx("span",{className:"text-error-500 ml-1",children:"*"})]}),e.jsx(xe,{options:z.options||[],placeholder:z.placeholder||z.label,value:z.value||"",onChange:D=>z.onChange(D),className:"w-full"})]})]})]})}catch(M){return console.error("Error rendering image generation form:",M),e.jsx("div",{className:"text-error-500",children:"Error loading form. Please refresh the page."})}},[r,s,x,R]);return e.jsxs(e.Fragment,{children:[e.jsx(P,{title:"API Integration - IGNY8",description:"External integrations"}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsx(vt,{icon:e.jsx(Ie,{}),title:"OpenAI",description:"AI-powered content generation and analysis with DALL-E image generation",validationStatus:w.openai,integrationId:"openai",onToggleSuccess:(c,p)=>{const v=(p==null?void 0:p.apiKey)||s.openai.apiKey,M=(p==null?void 0:p.model)||s.openai.model;S("openai",c,v,M)},onSettings:()=>O("openai"),onDetails:()=>$("openai")}),e.jsx(wt,{title:"OpenAI API Validation",description:"Two-way response validation with actual request and response testing",integrationId:"openai",icon:e.jsx(Ie,{})})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(vt,{icon:e.jsx(kt,{}),title:"Runware",description:"High-quality AI image generation with Runware's models ($0.036 per image)",validationStatus:w.runware,integrationId:"runware",modelName:((F=s.image_generation)==null?void 0:F.service)==="runware"&&s.image_generation.runwareModel?{"runware:97@1":"HiDream-I1 Full","runware:gen3a_turbo":"Gen3a Turbo","runware:gen3a":"Gen3a"}[s.image_generation.runwareModel]||s.image_generation.runwareModel:void 0,onToggleSuccess:(c,p)=>{const v=(p==null?void 0:p.apiKey)||s.runware.apiKey;S("runware",c,v)},onSettings:()=>O("runware"),onDetails:()=>$("runware")}),e.jsx(wt,{title:"Runware API Validation",description:"Using 128x128 image generation request for connection testing",integrationId:"runware",icon:e.jsx(kt,{})})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(ds,{icon:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#9333EA"}),e.jsx("path",{d:"M12 16L20 10L28 16V28C28 28.5304 27.7893 29.0391 27.4142 29.4142C27.0391 29.7893 26.5304 30 26 30H14C13.4696 30 12.9609 29.7893 12.5858 29.4142C12.2107 29.0391 12 28.5304 12 28V16Z",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16 30V20H24V30",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),title:"Image Generation Service",description:"Default image generation service and model selection for app-wide use",validationStatus:w.image_generation,onSettings:()=>O("image_generation"),onDetails:()=>$("image_generation")}),e.jsx(K,{variant:"info",title:"AI Integration & Image Generation Testing",message:`Configure and test your AI integrations on this page. Set up OpenAI and Runware API keys, validate connections, and test image generation with different models and parameters. Before you start, please read the documentation for each integration. diff --git a/frontend/dist/assets/js/pages-thinker-DjafPZNF.js b/frontend/dist/assets/js/pages-thinker-CAze4ZPc.js similarity index 99% rename from frontend/dist/assets/js/pages-thinker-DjafPZNF.js rename to frontend/dist/assets/js/pages-thinker-CAze4ZPc.js index d51e5837..5f3e91cd 100644 --- a/frontend/dist/assets/js/pages-thinker-DjafPZNF.js +++ b/frontend/dist/assets/js/pages-thinker-CAze4ZPc.js @@ -1 +1 @@ -import{j as e,r as g}from"./vendor-react-core-DjsjKnCi.js";import{P as f,C as N}from"./page-analytics.tsx-1KCk8AGD.js";import{b as C,B as p,o as I}from"./page-authpages-CY7hjDHU.js";import{u as P}from"./page-reference-aC0iABvU.js";import{i as _,S as A,T as E,U as O,V as T}from"./page-dashboard-DxYTR5eF.js";import{C as F}from"./page-components.tsx-DYfg5dka.js";import{F as G}from"./pages-planner-COGkFLJh.js";import{B as D}from"./page-clusters.config.tsx-9GAd-_h-.js";function Y(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Thinker Dashboard - IGNY8",description:"AI thinker overview"}),e.jsx(N,{title:"Coming Soon",desc:"AI thinker overview",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Thinker Dashboard - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Overview of AI tools and strategies will be displayed here"})]})})]})}const Q=Object.freeze(Object.defineProperty({__proto__:null,default:Y},Symbol.toStringTag,{value:"Module"})),S=({placeholder:o="Enter your message",rows:d=3,value:j="",onChange:b,className:y="",disabled:s=!1,error:n=!1,hint:m=""})=>{const u=x=>{b&&b(x.target.value)};let l=`w-full rounded-lg border px-4 py-2.5 text-sm shadow-theme-xs focus:outline-hidden ${y} `;return s?l+=" bg-gray-100 opacity-50 text-gray-500 border-gray-300 cursor-not-allowed opacity40 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700":n?l+=" bg-transparent border-gray-300 focus:border-error-300 focus:ring-3 focus:ring-error-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-error-800":l+=" bg-transparent text-gray-900 dark:text-gray-300 text-gray-900 border-gray-300 focus:border-brand-300 focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-brand-800",e.jsxs("div",{className:"relative",children:[e.jsx("textarea",{placeholder:o,rows:d,value:j,onChange:u,disabled:s,className:l}),m&&e.jsx("p",{className:`mt-2 text-sm ${n?"text-error-500":"text-gray-500 dark:text-gray-400"}`,children:m})]})},v=[{key:"clustering",label:"Clustering Prompt",description:"Group keywords into topic clusters. Use [IGNY8_KEYWORDS] to inject keyword data.",icon:"🌐",color:"green"},{key:"ideas",label:"Ideas Generation Prompt",description:"Generate content ideas from clusters. Use [IGNY8_CLUSTERS] and [IGNY8_CLUSTER_KEYWORDS] to inject data.",icon:"💡",color:"amber"},{key:"content_generation",label:"Content Generation Prompt",description:"Generate content from ideas. Use [IGNY8_IDEA], [IGNY8_CLUSTER], and [IGNY8_KEYWORDS] to inject data.",icon:"📝",color:"blue"},{key:"image_prompt_extraction",label:"Image Prompt Extraction",description:"Extract image prompts from article content. Use {title}, {content}, {max_images} placeholders.",icon:"🔍",color:"indigo"},{key:"image_prompt_template",label:"Image Prompt Template",description:"Template for generating image prompts. Use {post_title}, {image_prompt}, {image_type} placeholders.",icon:"🖼️",color:"purple"},{key:"negative_prompt",label:"Negative Prompt",description:"Specify elements to avoid in generated images (text, watermarks, logos, etc.).",icon:"🚫",color:"red"}];function M(){const o=P(),[d,j]=g.useState({}),[b,y]=g.useState(!0),[s,n]=g.useState({});g.useEffect(()=>{m()},[]);const m=async()=>{y(!0);try{const t=v.map(async c=>{try{const h=await _(`/v1/system/prompts/by_type/${c.key}/`);return{key:c.key,data:h}}catch(h){return console.error(`Error loading prompt ${c.key}:`,h),{key:c.key,data:null}}}),a=await Promise.all(t),i={};a.forEach(({key:c,data:h})=>{var k;h?i[c]=h:i[c]={prompt_type:c,prompt_type_display:((k=v.find(r=>r.key===c))==null?void 0:k.label)||c,prompt_value:"",default_prompt:"",is_active:!0}}),j(i)}catch(t){console.error("Error loading prompts:",t),o.error("Failed to load prompts")}finally{y(!1)}},u=async t=>{const a=d[t];if(a){n({...s,[t]:!0});try{const i=await _("/v1/system/prompts/save/",{method:"POST",body:JSON.stringify({prompt_type:t,prompt_value:a.prompt_value})});if(i.success)o.success(i.message||"Prompt saved successfully"),await m();else throw new Error(i.error||"Failed to save prompt")}catch(i){console.error("Error saving prompt:",i),o.error(`Failed to save prompt: ${i.message}`)}finally{n({...s,[t]:!1})}}},l=async t=>{if(confirm("Are you sure you want to reset this prompt to default? This will overwrite any custom changes.")){n({...s,[t]:!0});try{const a=await _("/v1/system/prompts/reset/",{method:"POST",body:JSON.stringify({prompt_type:t})});if(a.success)o.success(a.message||"Prompt reset to default"),await m();else throw new Error(a.error||"Failed to reset prompt")}catch(a){console.error("Error resetting prompt:",a),o.error(`Failed to reset prompt: ${a.message}`)}finally{n({...s,[t]:!1})}}},x=(t,a)=>{j({...d,[t]:{...d[t],prompt_value:a}})};return b?e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Prompts - IGNY8",description:"AI prompts management"}),e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-500 mx-auto"}),e.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-400",children:"Loading prompts..."})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Prompts - IGNY8",description:"AI prompts management"}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(C,{className:"text-primary-500 size-6"}),e.jsx("h1",{className:"text-2xl font-semibold text-gray-800 dark:text-white",children:"AI Prompts Management"})]}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure AI prompt templates for clustering, idea generation, content writing, and image generation"})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white mb-1",children:"Planner Prompts"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Configure AI prompt templates for clustering and idea generation"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:v.filter(t=>["clustering","ideas"].includes(t.key)).map(t=>{const a=d[t.key]||{prompt_type:t.key,prompt_type_display:t.label,prompt_value:""};return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900",children:[e.jsx("div",{className:"p-5 border-b border-gray-200 dark:border-gray-800",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-white",children:t.label}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t.description})]})]})})}),e.jsxs("div",{className:"p-5",children:[e.jsx(S,{value:a.prompt_value||"",onChange:i=>x(t.key,i),rows:12,placeholder:"Enter prompt template...",className:"font-mono-custom text-sm"}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx(p,{onClick:()=>u(t.key),disabled:s[t.key],className:"flex-1",variant:"solid",color:"primary",children:s[t.key]?"Saving...":"Save Prompt"}),e.jsx(p,{onClick:()=>l(t.key),disabled:s[t.key],variant:"outline",children:"Reset to Default"})]})]})]},t.key)})})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white mb-1",children:"Writer Prompts"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Configure AI prompt templates for content writing"})]}),e.jsx("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900",children:v.filter(t=>t.key==="content_generation").map(t=>{const a=d[t.key]||{prompt_type:t.key,prompt_type_display:t.label,prompt_value:""};return e.jsxs("div",{children:[e.jsx("div",{className:"p-5 border-b border-gray-200 dark:border-gray-800",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-white",children:t.label}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t.description})]})]})})}),e.jsxs("div",{className:"p-5",children:[e.jsx(S,{value:a.prompt_value||"",onChange:i=>x(t.key,i),rows:15,placeholder:"Enter prompt template...",className:"font-mono-custom text-sm"}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx(p,{onClick:()=>u(t.key),disabled:s[t.key],className:"flex-1",variant:"solid",color:"primary",children:s[t.key]?"Saving...":"Save Prompt"}),e.jsx(p,{onClick:()=>l(t.key),disabled:s[t.key],variant:"outline",children:"Reset to Default"})]})]})]},t.key)})})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white mb-1",children:"Image Generation"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Configure AI image generation prompts"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:v.filter(t=>["image_prompt_extraction","image_prompt_template","negative_prompt"].includes(t.key)).map(t=>{const a=d[t.key]||{prompt_type:t.key,prompt_type_display:t.label,prompt_value:""};return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900",children:[e.jsx("div",{className:"p-5 border-b border-gray-200 dark:border-gray-800",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-white",children:t.label}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t.description})]})]})})}),e.jsxs("div",{className:"p-5",children:[e.jsx(S,{value:a.prompt_value||"",onChange:i=>x(t.key,i),rows:t.key==="negative_prompt"?4:8,placeholder:"Enter prompt template...",className:"font-mono-custom text-sm"}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx(p,{onClick:()=>u(t.key),disabled:s[t.key],className:"flex-1",variant:"solid",color:"primary",children:s[t.key]?"Saving...":"Save Prompt"}),t.key==="image_prompt_template"&&e.jsx(p,{onClick:()=>l(t.key),disabled:s[t.key],variant:"outline",children:"Reset to Default"})]})]})]},t.key)})})]})]})]})}const X=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));function $(){const o=P(),[d,j]=g.useState([]),[b,y]=g.useState(!0),[s,n]=g.useState(!1),[m,u]=g.useState(null),[l,x]=g.useState({name:"",description:"",tone:"",language:"en",is_active:!0});g.useEffect(()=>{t()},[]);const t=async()=>{try{y(!0);const r=await A();j(r.results||[])}catch(r){o.error(`Failed to load author profiles: ${r.message}`)}finally{y(!1)}},a=()=>{u(null),x({name:"",description:"",tone:"",language:"en",is_active:!0}),n(!0)},i=r=>{u(r),x({name:r.name,description:r.description,tone:r.tone,language:r.language,is_active:r.is_active}),n(!0)},c=async()=>{try{m?(await E(m.id,l),o.success("Author profile updated successfully")):(await O(l),o.success("Author profile created successfully")),n(!1),t()}catch(r){o.error(`Failed to save: ${r.message}`)}},h=async r=>{if(confirm("Are you sure you want to delete this author profile?"))try{await T(r),o.success("Author profile deleted successfully"),t()}catch(w){o.error(`Failed to delete: ${w.message}`)}},k=[{name:"name",label:"Name",type:"text",required:!0},{name:"description",label:"Description",type:"textarea",required:!1},{name:"tone",label:"Tone",type:"text",required:!0},{name:"language",label:"Language",type:"text",required:!0},{name:"is_active",label:"Active",type:"checkbox",required:!1}];return e.jsxs("div",{className:"p-6",children:[e.jsx(f,{title:"Author Profiles"}),e.jsxs("div",{className:"mb-6 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Author Profiles"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage writing style profiles"})]}),e.jsxs(p,{onClick:a,variant:"primary",children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),"Create Profile"]})]}),b?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.map(r=>e.jsxs(F,{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r.name}),e.jsx(D,{variant:"light",color:r.is_active?"success":"dark",children:r.is_active?"Active":"Inactive"})]}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:r.description}),e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Tone:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:r.tone})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Language:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:r.language})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{variant:"secondary",size:"sm",onClick:()=>i(r),children:"Edit"}),e.jsx(p,{variant:"danger",size:"sm",onClick:()=>h(r.id),children:"Delete"})]})]},r.id))}),e.jsx(G,{isOpen:s,onClose:()=>n(!1),onSave:c,title:m?"Edit Author Profile":"Create Author Profile",fields:k,data:l,onChange:x})]})}const Z=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"}));function R(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"AI Profile - IGNY8",description:"AI profile settings"}),e.jsx(N,{title:"Coming Soon",desc:"AI profile settings",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"AI Profile Settings - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Configure AI personality and writing style"})]})})]})}const ee=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));function z(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Strategies - IGNY8",description:"Content strategies"}),e.jsx(N,{title:"Coming Soon",desc:"Content strategies",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Content Strategies - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Plan and manage content strategies and approaches"})]})})]})}const te=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));function L(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Image Testing - IGNY8",description:"AI image testing"}),e.jsx(N,{title:"Coming Soon",desc:"AI image testing",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Image Testing - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Test and configure AI image generation capabilities"})]})})]})}const re=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"}));export{Z as A,Q as D,re as I,X as P,te as S,ee as a}; +import{j as e,r as g}from"./vendor-react-core-DjsjKnCi.js";import{P as f,C as N}from"./page-analytics.tsx-1KCk8AGD.js";import{b as C,B as p,o as I}from"./page-authpages-CY7hjDHU.js";import{u as P}from"./page-reference-aC0iABvU.js";import{i as _,S as A,T as E,U as O,V as T}from"./page-dashboard-DxYTR5eF.js";import{C as F}from"./page-components.tsx-DYfg5dka.js";import{F as G}from"./pages-planner-Biqt-k6C.js";import{B as D}from"./page-clusters.config.tsx-9GAd-_h-.js";function Y(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Thinker Dashboard - IGNY8",description:"AI thinker overview"}),e.jsx(N,{title:"Coming Soon",desc:"AI thinker overview",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Thinker Dashboard - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Overview of AI tools and strategies will be displayed here"})]})})]})}const Q=Object.freeze(Object.defineProperty({__proto__:null,default:Y},Symbol.toStringTag,{value:"Module"})),S=({placeholder:o="Enter your message",rows:d=3,value:j="",onChange:b,className:y="",disabled:s=!1,error:n=!1,hint:m=""})=>{const u=x=>{b&&b(x.target.value)};let l=`w-full rounded-lg border px-4 py-2.5 text-sm shadow-theme-xs focus:outline-hidden ${y} `;return s?l+=" bg-gray-100 opacity-50 text-gray-500 border-gray-300 cursor-not-allowed opacity40 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700":n?l+=" bg-transparent border-gray-300 focus:border-error-300 focus:ring-3 focus:ring-error-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-error-800":l+=" bg-transparent text-gray-900 dark:text-gray-300 text-gray-900 border-gray-300 focus:border-brand-300 focus:ring-3 focus:ring-brand-500/10 dark:border-gray-700 dark:bg-gray-900 dark:text-white/90 dark:focus:border-brand-800",e.jsxs("div",{className:"relative",children:[e.jsx("textarea",{placeholder:o,rows:d,value:j,onChange:u,disabled:s,className:l}),m&&e.jsx("p",{className:`mt-2 text-sm ${n?"text-error-500":"text-gray-500 dark:text-gray-400"}`,children:m})]})},v=[{key:"clustering",label:"Clustering Prompt",description:"Group keywords into topic clusters. Use [IGNY8_KEYWORDS] to inject keyword data.",icon:"🌐",color:"green"},{key:"ideas",label:"Ideas Generation Prompt",description:"Generate content ideas from clusters. Use [IGNY8_CLUSTERS] and [IGNY8_CLUSTER_KEYWORDS] to inject data.",icon:"💡",color:"amber"},{key:"content_generation",label:"Content Generation Prompt",description:"Generate content from ideas. Use [IGNY8_IDEA], [IGNY8_CLUSTER], and [IGNY8_KEYWORDS] to inject data.",icon:"📝",color:"blue"},{key:"image_prompt_extraction",label:"Image Prompt Extraction",description:"Extract image prompts from article content. Use {title}, {content}, {max_images} placeholders.",icon:"🔍",color:"indigo"},{key:"image_prompt_template",label:"Image Prompt Template",description:"Template for generating image prompts. Use {post_title}, {image_prompt}, {image_type} placeholders.",icon:"🖼️",color:"purple"},{key:"negative_prompt",label:"Negative Prompt",description:"Specify elements to avoid in generated images (text, watermarks, logos, etc.).",icon:"🚫",color:"red"}];function M(){const o=P(),[d,j]=g.useState({}),[b,y]=g.useState(!0),[s,n]=g.useState({});g.useEffect(()=>{m()},[]);const m=async()=>{y(!0);try{const t=v.map(async c=>{try{const h=await _(`/v1/system/prompts/by_type/${c.key}/`);return{key:c.key,data:h}}catch(h){return console.error(`Error loading prompt ${c.key}:`,h),{key:c.key,data:null}}}),a=await Promise.all(t),i={};a.forEach(({key:c,data:h})=>{var k;h?i[c]=h:i[c]={prompt_type:c,prompt_type_display:((k=v.find(r=>r.key===c))==null?void 0:k.label)||c,prompt_value:"",default_prompt:"",is_active:!0}}),j(i)}catch(t){console.error("Error loading prompts:",t),o.error("Failed to load prompts")}finally{y(!1)}},u=async t=>{const a=d[t];if(a){n({...s,[t]:!0});try{const i=await _("/v1/system/prompts/save/",{method:"POST",body:JSON.stringify({prompt_type:t,prompt_value:a.prompt_value})});if(i.success)o.success(i.message||"Prompt saved successfully"),await m();else throw new Error(i.error||"Failed to save prompt")}catch(i){console.error("Error saving prompt:",i),o.error(`Failed to save prompt: ${i.message}`)}finally{n({...s,[t]:!1})}}},l=async t=>{if(confirm("Are you sure you want to reset this prompt to default? This will overwrite any custom changes.")){n({...s,[t]:!0});try{const a=await _("/v1/system/prompts/reset/",{method:"POST",body:JSON.stringify({prompt_type:t})});if(a.success)o.success(a.message||"Prompt reset to default"),await m();else throw new Error(a.error||"Failed to reset prompt")}catch(a){console.error("Error resetting prompt:",a),o.error(`Failed to reset prompt: ${a.message}`)}finally{n({...s,[t]:!1})}}},x=(t,a)=>{j({...d,[t]:{...d[t],prompt_value:a}})};return b?e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Prompts - IGNY8",description:"AI prompts management"}),e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-500 mx-auto"}),e.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-400",children:"Loading prompts..."})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Prompts - IGNY8",description:"AI prompts management"}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(C,{className:"text-primary-500 size-6"}),e.jsx("h1",{className:"text-2xl font-semibold text-gray-800 dark:text-white",children:"AI Prompts Management"})]}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure AI prompt templates for clustering, idea generation, content writing, and image generation"})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white mb-1",children:"Planner Prompts"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Configure AI prompt templates for clustering and idea generation"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:v.filter(t=>["clustering","ideas"].includes(t.key)).map(t=>{const a=d[t.key]||{prompt_type:t.key,prompt_type_display:t.label,prompt_value:""};return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900",children:[e.jsx("div",{className:"p-5 border-b border-gray-200 dark:border-gray-800",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-white",children:t.label}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t.description})]})]})})}),e.jsxs("div",{className:"p-5",children:[e.jsx(S,{value:a.prompt_value||"",onChange:i=>x(t.key,i),rows:12,placeholder:"Enter prompt template...",className:"font-mono-custom text-sm"}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx(p,{onClick:()=>u(t.key),disabled:s[t.key],className:"flex-1",variant:"solid",color:"primary",children:s[t.key]?"Saving...":"Save Prompt"}),e.jsx(p,{onClick:()=>l(t.key),disabled:s[t.key],variant:"outline",children:"Reset to Default"})]})]})]},t.key)})})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white mb-1",children:"Writer Prompts"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Configure AI prompt templates for content writing"})]}),e.jsx("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900",children:v.filter(t=>t.key==="content_generation").map(t=>{const a=d[t.key]||{prompt_type:t.key,prompt_type_display:t.label,prompt_value:""};return e.jsxs("div",{children:[e.jsx("div",{className:"p-5 border-b border-gray-200 dark:border-gray-800",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-white",children:t.label}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t.description})]})]})})}),e.jsxs("div",{className:"p-5",children:[e.jsx(S,{value:a.prompt_value||"",onChange:i=>x(t.key,i),rows:15,placeholder:"Enter prompt template...",className:"font-mono-custom text-sm"}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx(p,{onClick:()=>u(t.key),disabled:s[t.key],className:"flex-1",variant:"solid",color:"primary",children:s[t.key]?"Saving...":"Save Prompt"}),e.jsx(p,{onClick:()=>l(t.key),disabled:s[t.key],variant:"outline",children:"Reset to Default"})]})]})]},t.key)})})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-800 dark:text-white mb-1",children:"Image Generation"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Configure AI image generation prompts"})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:v.filter(t=>["image_prompt_extraction","image_prompt_template","negative_prompt"].includes(t.key)).map(t=>{const a=d[t.key]||{prompt_type:t.key,prompt_type_display:t.label,prompt_value:""};return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900",children:[e.jsx("div",{className:"p-5 border-b border-gray-200 dark:border-gray-800",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:t.icon}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-800 dark:text-white",children:t.label}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t.description})]})]})})}),e.jsxs("div",{className:"p-5",children:[e.jsx(S,{value:a.prompt_value||"",onChange:i=>x(t.key,i),rows:t.key==="negative_prompt"?4:8,placeholder:"Enter prompt template...",className:"font-mono-custom text-sm"}),e.jsxs("div",{className:"flex gap-3 mt-4",children:[e.jsx(p,{onClick:()=>u(t.key),disabled:s[t.key],className:"flex-1",variant:"solid",color:"primary",children:s[t.key]?"Saving...":"Save Prompt"}),t.key==="image_prompt_template"&&e.jsx(p,{onClick:()=>l(t.key),disabled:s[t.key],variant:"outline",children:"Reset to Default"})]})]})]},t.key)})})]})]})]})}const X=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));function $(){const o=P(),[d,j]=g.useState([]),[b,y]=g.useState(!0),[s,n]=g.useState(!1),[m,u]=g.useState(null),[l,x]=g.useState({name:"",description:"",tone:"",language:"en",is_active:!0});g.useEffect(()=>{t()},[]);const t=async()=>{try{y(!0);const r=await A();j(r.results||[])}catch(r){o.error(`Failed to load author profiles: ${r.message}`)}finally{y(!1)}},a=()=>{u(null),x({name:"",description:"",tone:"",language:"en",is_active:!0}),n(!0)},i=r=>{u(r),x({name:r.name,description:r.description,tone:r.tone,language:r.language,is_active:r.is_active}),n(!0)},c=async()=>{try{m?(await E(m.id,l),o.success("Author profile updated successfully")):(await O(l),o.success("Author profile created successfully")),n(!1),t()}catch(r){o.error(`Failed to save: ${r.message}`)}},h=async r=>{if(confirm("Are you sure you want to delete this author profile?"))try{await T(r),o.success("Author profile deleted successfully"),t()}catch(w){o.error(`Failed to delete: ${w.message}`)}},k=[{name:"name",label:"Name",type:"text",required:!0},{name:"description",label:"Description",type:"textarea",required:!1},{name:"tone",label:"Tone",type:"text",required:!0},{name:"language",label:"Language",type:"text",required:!0},{name:"is_active",label:"Active",type:"checkbox",required:!1}];return e.jsxs("div",{className:"p-6",children:[e.jsx(f,{title:"Author Profiles"}),e.jsxs("div",{className:"mb-6 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Author Profiles"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Manage writing style profiles"})]}),e.jsxs(p,{onClick:a,variant:"primary",children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),"Create Profile"]})]}),b?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx("div",{className:"text-gray-500",children:"Loading..."})}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.map(r=>e.jsxs(F,{className:"p-6",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r.name}),e.jsx(D,{variant:"light",color:r.is_active?"success":"dark",children:r.is_active?"Active":"Inactive"})]}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:r.description}),e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Tone:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:r.tone})]}),e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Language:"})," ",e.jsx("span",{className:"text-gray-900 dark:text-white",children:r.language})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{variant:"secondary",size:"sm",onClick:()=>i(r),children:"Edit"}),e.jsx(p,{variant:"danger",size:"sm",onClick:()=>h(r.id),children:"Delete"})]})]},r.id))}),e.jsx(G,{isOpen:s,onClose:()=>n(!1),onSave:c,title:m?"Edit Author Profile":"Create Author Profile",fields:k,data:l,onChange:x})]})}const Z=Object.freeze(Object.defineProperty({__proto__:null,default:$},Symbol.toStringTag,{value:"Module"}));function R(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"AI Profile - IGNY8",description:"AI profile settings"}),e.jsx(N,{title:"Coming Soon",desc:"AI profile settings",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"AI Profile Settings - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Configure AI personality and writing style"})]})})]})}const ee=Object.freeze(Object.defineProperty({__proto__:null,default:R},Symbol.toStringTag,{value:"Module"}));function z(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Strategies - IGNY8",description:"Content strategies"}),e.jsx(N,{title:"Coming Soon",desc:"Content strategies",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Content Strategies - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Plan and manage content strategies and approaches"})]})})]})}const te=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));function L(){return e.jsxs(e.Fragment,{children:[e.jsx(f,{title:"Image Testing - IGNY8",description:"AI image testing"}),e.jsx(N,{title:"Coming Soon",desc:"AI image testing",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Image Testing - Coming Soon"}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Test and configure AI image generation capabilities"})]})})]})}const re=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"}));export{Z as A,Q as D,re as I,X as P,te as S,ee as a}; diff --git a/frontend/dist/assets/js/pages-writer-BNZLXTX1.js b/frontend/dist/assets/js/pages-writer-BNZLXTX1.js new file mode 100644 index 00000000..49aa110b --- /dev/null +++ b/frontend/dist/assets/js/pages-writer-BNZLXTX1.js @@ -0,0 +1 @@ +import{j as t,r as s}from"./vendor-react-core-DjsjKnCi.js";import{P as ie,C as ke}from"./page-analytics.tsx-1KCk8AGD.js";import{u as ae}from"./page-reference-aC0iABvU.js";import{W as be,X as Se,Y as _e,Z as we,$ as je,a0 as Ce,o as Ie,a1 as Te,a2 as Ne,a3 as ve,a4 as Fe,a5 as le}from"./page-dashboard-DxYTR5eF.js";import{C as De}from"./page-components.tsx-DYfg5dka.js";import{u as Ee,a as Me,b as Oe,T as de,c as Pe,F as $e}from"./pages-planner-Biqt-k6C.js";import{a as ue,o as Ae,s as Be,t as Le}from"./page-authpages-CY7hjDHU.js";import{c as Re}from"./page-images.config.tsx-Dy4DVDQH.js";import{c as ze}from"./page-tasks.config.tsx-mmlIGC4l.js";function qe(){return t.jsxs(t.Fragment,{children:[t.jsx(ie,{title:"Writer Dashboard - IGNY8",description:"Content creation overview"}),t.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3 md:gap-6 mb-6",children:[t.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6",children:[t.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Tasks"}),t.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:"-"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Queued tasks"})]}),t.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6",children:[t.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Drafts"}),t.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:"-"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Draft content"})]}),t.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6",children:[t.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Published"}),t.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:"-"}),t.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Published content"})]})]}),t.jsx(ke,{title:"Coming Soon",desc:"Content creation overview",children:t.jsxs("div",{className:"text-center py-8",children:[t.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Writer Dashboard - Coming Soon"}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Overview of content tasks and workflow will be displayed here"})]})})]})}const st=Object.freeze(Object.defineProperty({__proto__:null,default:qe},Symbol.toStringTag,{value:"Module"}));function re(){const o=ae(),{activeSector:j}=Ee(),{pageSize:D}=Me(),[C,E]=s.useState([]),[b,L]=s.useState([]),[I,m]=s.useState(!0),[x,$]=s.useState(""),[M,R]=s.useState(""),[y,T]=s.useState(""),[O,z]=s.useState(""),[S,q]=s.useState(""),[A,Q]=s.useState([]),[N,v]=s.useState(1),[X,G]=s.useState(1),[_,Z]=s.useState(0),[B,K]=s.useState("created_at"),[f,ee]=s.useState("desc"),[n,u]=s.useState(!1),[F,k]=s.useState(!1),[U,V]=s.useState(!1),[ne,oe]=s.useState(null),[H,te]=s.useState({title:"",description:"",keywords:"",cluster_id:null,content_structure:"blog_post",content_type:"blog_post",status:"queued",word_count:0}),c=Oe(),[ce,p]=s.useState([]),P=s.useRef(null),J=s.useRef(-1),W=s.useRef(!1);s.useEffect(()=>{(async()=>{try{const a=await Ie({ordering:"name"});L(a.results||[])}catch(a){console.error("Error fetching clusters:",a)}})()},[]);const g=s.useCallback(async()=>{m(!0),u(!1);try{const e=B?`${f==="desc"?"-":""}${B}`:"-created_at",a={...x&&{search:x},...M&&{status:M},...y&&{cluster_id:y},...O&&{content_structure:O},...S&&{content_type:S},page:N,page_size:D,ordering:e},r=await be(a);E(r.results||[]),Z(r.count||0),G(Math.ceil((r.count||0)/D)),setTimeout(()=>{u(!0),m(!1)},100)}catch(e){console.error("Error loading tasks:",e),o.error(`Failed to load tasks: ${e.message}`),u(!0),m(!1)}},[N,M,y,O,S,B,f,x,j,D]);s.useEffect(()=>{g()},[g]),s.useEffect(()=>{const e=()=>{g()},a=()=>{g()};return window.addEventListener("siteChanged",e),window.addEventListener("sectorChanged",a),()=>{window.removeEventListener("siteChanged",e),window.removeEventListener("sectorChanged",a)}},[g]),s.useEffect(()=>{v(1)},[D]),s.useEffect(()=>{const e=setTimeout(()=>{N===1?g():v(1)},500);return()=>clearTimeout(e)},[x,N,g]);const ge=(e,a)=>{K(e||"created_at"),ee(a),v(1)},me=s.useCallback(async(e,a)=>{try{const r=e.map(i=>parseInt(i));await Se(r,a),await g()}catch(r){throw r}},[g]),pe=s.useCallback(async e=>{try{if(!e||e.length===0)throw new Error("No records selected for export");o.info("Export functionality coming soon")}catch(a){throw a}},[]),xe=s.useCallback(async(e,a)=>{if(e==="generate_content"){if(!a.title){o.error("Task must have a title to generate content");return}const r={ids:[a.id],task_title:a.title,task_id:a.id};p(i=>[...i,{timestamp:new Date().toISOString(),type:"request",action:"generate_content (Row Action)",data:r}]);try{const i=await _e([a.id]);i.success?i.task_id?(p(d=>[...d,{timestamp:new Date().toISOString(),type:"success",action:"generate_content (Row Action)",data:{task_id:i.task_id,message:i.message}}]),c.openModal(i.task_id,"Generating Content","ai-generate-content-03"),o.success("Content generation started")):(p(d=>[...d,{timestamp:new Date().toISOString(),type:"success",action:"generate_content (Row Action)",data:{tasks_updated:i.tasks_updated||0,message:i.message}}]),o.success(`Content generated successfully: ${i.tasks_updated||0} article generated`),await g()):(p(d=>[...d,{timestamp:new Date().toISOString(),type:"error",action:"generate_content (Row Action)",data:{error:i.error||"Failed to generate content"}}]),o.error(i.error||"Failed to generate content"))}catch(i){p(d=>[...d,{timestamp:new Date().toISOString(),type:"error",action:"generate_content (Row Action)",data:{error:i.message||"Unknown error occurred"}}]),o.error(`Failed to generate content: ${i.message}`)}}},[o,g,c]),fe=s.useCallback(async(e,a)=>{if(e==="generate_images"){if(a.length===0){o.error("Please select at least one task to generate images");return}if(a.length>10){o.error("Maximum 10 tasks allowed for image generation");return}const r=a.map(l=>parseInt(l)),i=C.filter(l=>r.includes(l.id)),d={ids:r,task_count:r.length,task_titles:i.map(l=>l.title)};p(l=>[...l,{timestamp:new Date().toISOString(),type:"request",action:"generate_images (Bulk Action)",data:d}]);try{const l=await we(r);l.success?l.task_id?(p(h=>[...h,{timestamp:new Date().toISOString(),type:"success",action:"generate_images (Bulk Action)",data:{task_id:l.task_id,message:l.message,task_count:r.length}}]),c.openModal(l.task_id,"Generating Images"),o.success("Image generation started")):(p(h=>[...h,{timestamp:new Date().toISOString(),type:"success",action:"generate_images (Bulk Action)",data:{images_created:l.images_created||0,message:l.message,task_count:r.length}}]),o.success(`Image generation complete: ${l.images_created||0} images generated`),await g()):(p(h=>[...h,{timestamp:new Date().toISOString(),type:"error",action:"generate_images (Bulk Action)",data:{error:l.error||"Failed to generate images",task_count:r.length}}]),o.error(l.error||"Failed to generate images"))}catch(l){p(h=>[...h,{timestamp:new Date().toISOString(),type:"error",action:"generate_images (Bulk Action)",data:{error:l.message||"Unknown error occurred",task_count:r.length}}]),o.error(`Failed to generate images: ${l.message}`)}}else o.info(`Bulk action "${e}" for ${a.length} items`)},[o,g,c,C]);s.useEffect(()=>{var l;if(!c.taskId||!c.isOpen)return;const e=c.progress,a=((l=e.details)==null?void 0:l.phase)||"",r=e.percentage,i=e.message,d=e.status;if(a&&a!==P.current){const h=d==="error"?"error":d==="completed"?"success":"step";p(Y=>[...Y,{timestamp:new Date().toISOString(),type:h,action:c.title||"AI Function",stepName:a,percentage:r,data:{step:a,message:i,percentage:r,status:d,details:e.details}}]),P.current=a,J.current=r}else if(a&&Math.abs(r-J.current)>=10){const h=d==="error"?"error":d==="completed"?"success":"step";p(Y=>[...Y,{timestamp:new Date().toISOString(),type:h,action:c.title||"AI Function",stepName:a,percentage:r,data:{step:a,message:i,percentage:r,status:d,details:e.details}}]),J.current=r}else if((d==="error"||d==="completed")&&(a!==P.current||d==="error"&&P.current!=="error"||d==="completed"&&P.current!=="completed")){const h=d==="error"?"error":"success";p(Y=>[...Y,{timestamp:new Date().toISOString(),type:h,action:c.title||"AI Function",stepName:a||"Final",percentage:r,data:{step:a||"Final",message:i,percentage:r,status:d,details:e.details}}]),P.current=a||d}},[c.progress,c.taskId,c.isOpen,c.title]),s.useEffect(()=>{c.isOpen||(P.current=null,J.current=-1),W.current=!1},[c.isOpen,c.taskId]);const w=s.useMemo(()=>ze({clusters:b,activeSector:j,formData:H,setFormData:te,searchTerm:x,setSearchTerm:$,statusFilter:M,setStatusFilter:R,clusterFilter:y,setClusterFilter:T,structureFilter:O,setStructureFilter:z,typeFilter:S,setTypeFilter:q,setCurrentPage:v}),[b,j,H,x,M,y,O,S]),he=s.useMemo(()=>w!=null&&w.headerMetrics?w.headerMetrics.map(e=>({label:e.label,value:e.calculate({tasks:C,totalCount:_}),accentColor:e.accentColor})):[],[w==null?void 0:w.headerMetrics,C,_]),se=s.useCallback(()=>{te({title:"",description:"",keywords:"",cluster_id:null,content_structure:"blog_post",content_type:"blog_post",status:"queued",word_count:0}),V(!1),oe(null)},[]),ye=async()=>{try{U&&ne?(await Te(ne.id,H),o.success("Task updated successfully")):(await Ne(H),o.success("Task created successfully")),k(!1),se(),g()}catch(e){o.error(`Failed to save: ${e.message}`)}};return t.jsxs(t.Fragment,{children:[t.jsx(de,{title:"Content Tasks",titleIcon:t.jsx(Be,{className:"text-brand-500 size-5"}),subtitle:"Manage content generation queue and tasks",columns:w.columns,data:C,loading:I,showContent:n,filters:w.filters,filterValues:{search:x,status:M,cluster_id:y,content_structure:O,content_type:S},onFilterChange:(e,a)=>{const r=a==null?"":String(a);e==="search"?$(r):e==="status"?R(r):e==="cluster_id"?T(r):e==="content_structure"?z(r):e==="content_type"&&q(r),v(1)},onEdit:e=>{oe(e),te({title:e.title||"",description:e.description||"",keywords:e.keywords||"",cluster_id:e.cluster_id||null,content_structure:e.content_structure||"blog_post",content_type:e.content_type||"blog_post",status:e.status||"queued",word_count:e.word_count||0}),V(!0),k(!0)},onCreate:()=>{se(),k(!0)},createLabel:"Add Task",onCreateIcon:t.jsx(Ae,{}),onDelete:async e=>{await Ce(e),g()},onBulkDelete:async e=>{const a=await je(e);return g(),a},onBulkExport:pe,onBulkUpdateStatus:me,onBulkAction:fe,onRowAction:xe,getItemDisplayName:e=>e.title,onExport:async()=>{o.info("Export functionality coming soon")},onExportIcon:t.jsx(ue,{}),selectionLabel:"task",pagination:{currentPage:N,totalPages:X,totalCount:_,onPageChange:v},selection:{selectedIds:A,onSelectionChange:Q},sorting:{sortBy:B,sortDirection:f,onSort:ge},headerMetrics:he,onFilterReset:()=>{$(""),R(""),T(""),z(""),q(""),v(1)}}),t.jsx(Pe,{isOpen:c.isOpen,title:c.title,percentage:c.progress.percentage,status:c.progress.status,message:c.progress.message,details:c.progress.details,taskId:c.taskId||void 0,functionId:c.functionId,onClose:()=>{const e=c.progress.status==="completed";c.closeModal(),e&&!W.current&&(W.current=!0,g(),setTimeout(()=>{W.current=!1},1e3))}}),ce.length>0&&t.jsxs("div",{className:"mt-6 bg-gray-50 dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100",children:"AI Function Logs"}),t.jsx("button",{onClick:()=>p([]),className:"text-xs text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:"Clear Logs"})]}),t.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:ce.slice().reverse().map((e,a)=>t.jsxs("div",{className:`p-3 rounded border text-xs font-mono ${e.type==="request"?"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800":e.type==="success"?"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800":e.type==="error"?"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800":"bg-purple-50 dark:bg-purple-900/20 border-purple-200 dark:border-purple-800"}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t.jsxs("span",{className:`font-semibold ${e.type==="request"?"text-blue-700 dark:text-blue-300":e.type==="success"?"text-green-700 dark:text-green-300":e.type==="error"?"text-red-700 dark:text-red-300":"text-purple-700 dark:text-purple-300"}`,children:["[",e.type.toUpperCase(),"]"]}),t.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:e.action}),e.stepName&&t.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400",children:e.stepName}),e.percentage!==void 0&&t.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e.percentage,"%"]})]}),t.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:new Date(e.timestamp).toLocaleTimeString()})]}),t.jsx("pre",{className:"text-xs text-gray-700 dark:text-gray-300 whitespace-pre-wrap break-words",children:JSON.stringify(e.data,null,2)})]},a))})]}),t.jsx($e,{isOpen:F,onClose:()=>{k(!1),se()},onSubmit:ye,title:U?"Edit Task":"Add Task",submitLabel:U?"Update":"Create",fields:w.formFields(b)})]})}const at=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"}));function Ge(){const o=ae(),[j,D]=s.useState([]),[C,E]=s.useState(!0),[b,L]=s.useState(null);s.useEffect(()=>{I()},[]);const I=async()=>{try{E(!0);const m=await ve();D(m.results||[])}catch(m){o.error(`Failed to load content: ${m.message}`)}finally{E(!1)}};return t.jsxs("div",{className:"p-6",children:[t.jsx(ie,{title:"Content"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Content"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"View all generated content"})]}),C?t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsx("div",{className:"text-gray-500",children:"Loading..."})}):t.jsx("div",{className:"space-y-4",children:j.map(m=>t.jsxs(De,{className:"p-6",children:[t.jsxs("div",{className:"flex justify-between items-start mb-4",children:[t.jsxs("div",{children:[t.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Task #",m.task]}),t.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Generated: ",new Date(m.generated_at).toLocaleString()]})]}),t.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[m.word_count," words"]})]}),t.jsx("div",{className:"prose dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:m.html_content}})]},m.id))})]})}const rt=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"}));function Ue(){return t.jsx(re,{})}const nt=Object.freeze(Object.defineProperty({__proto__:null,default:Ue},Symbol.toStringTag,{value:"Module"}));function Ve(){const o=ae(),[j,D]=s.useState([]),[C,E]=s.useState(!0),[b,L]=s.useState(""),[I,m]=s.useState(""),[x,$]=s.useState(""),[M,R]=s.useState([]),[y,T]=s.useState(1),[O,z]=s.useState(1),[S,q]=s.useState(0),[A,Q]=s.useState("created_at"),[N,v]=s.useState("desc"),[X,G]=s.useState(!1),_=s.useCallback(async()=>{E(!0),G(!1);try{const n=A?`${N==="desc"?"-":""}${A}`:"-created_at",u={...I&&{image_type:I},...x&&{status:x},page:y,ordering:n};let k=(await Fe(u)).results||[];b&&(k=k.filter(U=>{var V;return(V=U.task_title)==null?void 0:V.toLowerCase().includes(b.toLowerCase())})),D(k),q(k.length),z(Math.ceil(k.length/10)),setTimeout(()=>{G(!0),E(!1)},100)}catch(n){console.error("Error loading images:",n),o.error(`Failed to load images: ${n.message}`),G(!0),E(!1)}},[y,I,x,A,N,b]);s.useEffect(()=>{_()},[_]),s.useEffect(()=>{const n=setTimeout(()=>{y===1?_():T(1)},500);return()=>clearTimeout(n)},[b,y,_]);const Z=(n,u)=>{Q(n||"created_at"),v(u),T(1)},B=s.useCallback(async n=>{try{if(!n||n.length===0)throw new Error("No records selected for export");o.info("Export functionality coming soon")}catch(u){throw u}},[]),K=s.useCallback(async(n,u)=>{if(n==="generate_images")try{const F=u.map(k=>parseInt(k));o.info(`Generate images for ${u.length} items`)}catch(F){o.error(`Failed to generate images: ${F.message}`)}else o.info(`Bulk action "${n}" for ${u.length} items`)},[]),f=s.useMemo(()=>Re(),[b,I,x]),ee=s.useMemo(()=>f!=null&&f.headerMetrics?f.headerMetrics.map(n=>({label:n.label,value:n.calculate({images:j,totalCount:S}),accentColor:n.accentColor})):[],[f==null?void 0:f.headerMetrics,j,S]);return t.jsx(de,{title:"Task Images",titleIcon:t.jsx(Le,{className:"text-purple-500 size-5"}),subtitle:"Manage images for content tasks",columns:f.columns,data:j,loading:C,showContent:X,filters:f.filters,filterValues:{search:b,image_type:I,status:x},onFilterChange:(n,u)=>{const F=u==null?"":String(u);n==="search"?L(F):n==="image_type"?m(F):n==="status"&&$(F),T(1)},onDelete:async n=>{await le(n),_()},onBulkDelete:async n=>{for(const u of n)await le(u);return _(),{deleted_count:n.length}},onBulkExport:B,onBulkAction:K,getItemDisplayName:n=>n.task_title||`Image ${n.id}`,onExport:async()=>{o.info("Export functionality coming soon")},onExportIcon:t.jsx(ue,{}),selectionLabel:"image",pagination:{currentPage:y,totalPages:O,totalCount:S,onPageChange:T},selection:{selectedIds:M,onSelectionChange:R},sorting:{sortBy:A,sortDirection:N,onSort:Z},headerMetrics:ee,onFilterReset:()=>{L(""),m(""),$(""),T(1)}})}const ot=Object.freeze(Object.defineProperty({__proto__:null,default:Ve},Symbol.toStringTag,{value:"Module"}));function We(){return t.jsx(re,{})}const ct=Object.freeze(Object.defineProperty({__proto__:null,default:We},Symbol.toStringTag,{value:"Module"}));export{rt as C,st as D,ot as I,ct as P,at as T,nt as a}; diff --git a/frontend/dist/assets/js/pages-writer-CjPEISlq.js b/frontend/dist/assets/js/pages-writer-CjPEISlq.js deleted file mode 100644 index e9df568a..00000000 --- a/frontend/dist/assets/js/pages-writer-CjPEISlq.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s,r as e}from"./vendor-react-core-DjsjKnCi.js";import{P as ee,C as ue}from"./page-analytics.tsx-1KCk8AGD.js";import{u as Q}from"./page-reference-aC0iABvU.js";import{W as ge,X as me,Y as fe,Z as he,$ as pe,a0 as xe,o as ye,a1 as ke,a2 as Se,a3 as be,a4 as _e,a5 as K}from"./page-dashboard-DxYTR5eF.js";import{C as Ce}from"./page-components.tsx-DYfg5dka.js";import{u as we,a as je,b as Te,T as te,c as ve,F as Ie}from"./pages-planner-COGkFLJh.js";import{a as se,o as Ee,s as Me,t as Ne}from"./page-authpages-CY7hjDHU.js";import{c as Fe}from"./page-images.config.tsx-Dy4DVDQH.js";import{c as Pe}from"./page-tasks.config.tsx-mmlIGC4l.js";function $e(){return s.jsxs(s.Fragment,{children:[s.jsx(ee,{title:"Writer Dashboard - IGNY8",description:"Content creation overview"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3 md:gap-6 mb-6",children:[s.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6",children:[s.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Tasks"}),s.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:"-"}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Queued tasks"})]}),s.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6",children:[s.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Drafts"}),s.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:"-"}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Draft content"})]}),s.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] md:p-6",children:[s.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Published"}),s.jsx("h4",{className:"mt-2 font-bold text-gray-800 text-title-sm dark:text-white/90",children:"-"}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:"Published content"})]})]}),s.jsx(ue,{title:"Coming Soon",desc:"Content creation overview",children:s.jsxs("div",{className:"text-center py-8",children:[s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Writer Dashboard - Coming Soon"}),s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:"Overview of content tasks and workflow will be displayed here"})]})})]})}const He=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"}));function X(){const r=Q(),{activeSector:k}=we(),{pageSize:j}=je(),[E,T]=e.useState([]),[h,$]=e.useState([]),[S,i]=e.useState(!0),[d,N]=e.useState(""),[v,D]=e.useState(""),[m,b]=e.useState(""),[I,B]=e.useState(""),[p,O]=e.useState(""),[F,R]=e.useState([]),[_,C]=e.useState(1),[V,L]=e.useState(1),[x,q]=e.useState(0),[P,U]=e.useState("created_at"),[u,W]=e.useState("desc"),[a,l]=e.useState(!1),[w,f]=e.useState(!1),[z,A]=e.useState(!1),[Z,J]=e.useState(null),[G,Y]=e.useState({title:"",description:"",keywords:"",cluster_id:null,content_structure:"blog_post",content_type:"blog_post",status:"queued",word_count:0}),g=Te();e.useEffect(()=>{(async()=>{try{const o=await ye({ordering:"name"});$(o.results||[])}catch(o){console.error("Error fetching clusters:",o)}})()},[]);const c=e.useCallback(async()=>{i(!0),l(!1);try{const t=P?`${u==="desc"?"-":""}${P}`:"-created_at",o={...d&&{search:d},...v&&{status:v},...m&&{cluster_id:m},...I&&{content_structure:I},...p&&{content_type:p},page:_,page_size:j,ordering:t},n=await ge(o);T(n.results||[]),q(n.count||0),L(Math.ceil((n.count||0)/j)),setTimeout(()=>{l(!0),i(!1)},100)}catch(t){console.error("Error loading tasks:",t),r.error(`Failed to load tasks: ${t.message}`),l(!0),i(!1)}},[_,v,m,I,p,P,u,d,k,j]);e.useEffect(()=>{c()},[c]),e.useEffect(()=>{const t=()=>{c()},o=()=>{c()};return window.addEventListener("siteChanged",t),window.addEventListener("sectorChanged",o),()=>{window.removeEventListener("siteChanged",t),window.removeEventListener("sectorChanged",o)}},[c]),e.useEffect(()=>{C(1)},[j]),e.useEffect(()=>{const t=setTimeout(()=>{_===1?c():C(1)},500);return()=>clearTimeout(t)},[d,_,c]);const ae=(t,o)=>{U(t||"created_at"),W(o),C(1)},re=e.useCallback(async(t,o)=>{try{const n=t.map(M=>parseInt(M));await me(n,o),await c()}catch(n){throw n}},[c]),oe=e.useCallback(async t=>{try{if(!t||t.length===0)throw new Error("No records selected for export");r.info("Export functionality coming soon")}catch(o){throw o}},[]),ne=e.useCallback(async(t,o)=>{if(t==="generate_content"){if(!o.title){r.error("Task must have a title to generate content");return}try{const n=await fe([o.id]);n.success?n.task_id?(g.openModal(n.task_id,"Generating Content"),r.success("Content generation started")):(r.success(`Content generated successfully: ${n.tasks_updated||0} article generated`),await c()):r.error(n.error||"Failed to generate content")}catch(n){r.error(`Failed to generate content: ${n.message}`)}}},[r,c,g]),le=e.useCallback(async(t,o)=>{if(t==="generate_images"){if(o.length===0){r.error("Please select at least one task to generate images");return}if(o.length>10){r.error("Maximum 10 tasks allowed for image generation");return}try{const n=o.map(de=>parseInt(de)),M=await he(n);M.success?M.task_id?(g.openModal(M.task_id,"Generating Images"),r.success("Image generation started")):(r.success(`Image generation complete: ${M.images_created||0} images generated`),await c()):r.error(M.error||"Failed to generate images")}catch(n){r.error(`Failed to generate images: ${n.message}`)}}else r.info(`Bulk action "${t}" for ${o.length} items`)},[r,c,g]),y=e.useMemo(()=>Pe({clusters:h,activeSector:k,formData:G,setFormData:Y,searchTerm:d,setSearchTerm:N,statusFilter:v,setStatusFilter:D,clusterFilter:m,setClusterFilter:b,structureFilter:I,setStructureFilter:B,typeFilter:p,setTypeFilter:O,setCurrentPage:C}),[h,k,G,d,v,m,I,p]),ce=e.useMemo(()=>y!=null&&y.headerMetrics?y.headerMetrics.map(t=>({label:t.label,value:t.calculate({tasks:E,totalCount:x}),accentColor:t.accentColor})):[],[y==null?void 0:y.headerMetrics,E,x]),H=e.useCallback(()=>{Y({title:"",description:"",keywords:"",cluster_id:null,content_structure:"blog_post",content_type:"blog_post",status:"queued",word_count:0}),A(!1),J(null)},[]),ie=async()=>{try{z&&Z?(await ke(Z.id,G),r.success("Task updated successfully")):(await Se(G),r.success("Task created successfully")),f(!1),H(),c()}catch(t){r.error(`Failed to save: ${t.message}`)}};return s.jsxs(s.Fragment,{children:[s.jsx(te,{title:"Content Tasks",titleIcon:s.jsx(Me,{className:"text-brand-500 size-5"}),subtitle:"Manage content generation queue and tasks",columns:y.columns,data:E,loading:S,showContent:a,filters:y.filters,filterValues:{search:d,status:v,cluster_id:m,content_structure:I,content_type:p},onFilterChange:(t,o)=>{const n=o==null?"":String(o);t==="search"?N(n):t==="status"?D(n):t==="cluster_id"?b(n):t==="content_structure"?B(n):t==="content_type"&&O(n),C(1)},onEdit:t=>{J(t),Y({title:t.title||"",description:t.description||"",keywords:t.keywords||"",cluster_id:t.cluster_id||null,content_structure:t.content_structure||"blog_post",content_type:t.content_type||"blog_post",status:t.status||"queued",word_count:t.word_count||0}),A(!0),f(!0)},onCreate:()=>{H(),f(!0)},createLabel:"Add Task",onCreateIcon:s.jsx(Ee,{}),onDelete:async t=>{await xe(t),c()},onBulkDelete:async t=>{const o=await pe(t);return c(),o},onBulkExport:oe,onBulkUpdateStatus:re,onBulkAction:le,onRowAction:ne,getItemDisplayName:t=>t.title,onExport:async()=>{r.info("Export functionality coming soon")},onExportIcon:s.jsx(se,{}),selectionLabel:"task",pagination:{currentPage:_,totalPages:V,totalCount:x,onPageChange:C},selection:{selectedIds:F,onSelectionChange:R},sorting:{sortBy:P,sortDirection:u,onSort:ae},headerMetrics:ce,onFilterReset:()=>{N(""),D(""),b(""),B(""),O(""),C(1)}}),s.jsx(ve,{isOpen:g.isOpen,title:g.title,percentage:g.progress.percentage,status:g.progress.status,message:g.progress.message,details:g.progress.details,taskId:g.taskId||void 0,onClose:()=>{const t=g.progress.status==="completed";g.closeModal(),t&&c()}}),s.jsx(Ie,{isOpen:w,onClose:()=>{f(!1),H()},onSubmit:ie,title:z?"Edit Task":"Add Task",submitLabel:z?"Update":"Create",fields:y.formFields(h)})]})}const Qe=Object.freeze(Object.defineProperty({__proto__:null,default:X},Symbol.toStringTag,{value:"Module"}));function De(){const r=Q(),[k,j]=e.useState([]),[E,T]=e.useState(!0),[h,$]=e.useState(null);e.useEffect(()=>{S()},[]);const S=async()=>{try{T(!0);const i=await be();j(i.results||[])}catch(i){r.error(`Failed to load content: ${i.message}`)}finally{T(!1)}};return s.jsxs("div",{className:"p-6",children:[s.jsx(ee,{title:"Content"}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Content"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"View all generated content"})]}),E?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-gray-500",children:"Loading..."})}):s.jsx("div",{className:"space-y-4",children:k.map(i=>s.jsxs(Ce,{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-start mb-4",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Task #",i.task]}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Generated: ",new Date(i.generated_at).toLocaleString()]})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[i.word_count," words"]})]}),s.jsx("div",{className:"prose dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:i.html_content}})]},i.id))})]})}const Xe=Object.freeze(Object.defineProperty({__proto__:null,default:De},Symbol.toStringTag,{value:"Module"}));function Be(){return s.jsx(X,{})}const Ze=Object.freeze(Object.defineProperty({__proto__:null,default:Be},Symbol.toStringTag,{value:"Module"}));function Oe(){const r=Q(),[k,j]=e.useState([]),[E,T]=e.useState(!0),[h,$]=e.useState(""),[S,i]=e.useState(""),[d,N]=e.useState(""),[v,D]=e.useState([]),[m,b]=e.useState(1),[I,B]=e.useState(1),[p,O]=e.useState(0),[F,R]=e.useState("created_at"),[_,C]=e.useState("desc"),[V,L]=e.useState(!1),x=e.useCallback(async()=>{T(!0),L(!1);try{const a=F?`${_==="desc"?"-":""}${F}`:"-created_at",l={...S&&{image_type:S},...d&&{status:d},page:m,ordering:a};let f=(await _e(l)).results||[];h&&(f=f.filter(z=>{var A;return(A=z.task_title)==null?void 0:A.toLowerCase().includes(h.toLowerCase())})),j(f),O(f.length),B(Math.ceil(f.length/10)),setTimeout(()=>{L(!0),T(!1)},100)}catch(a){console.error("Error loading images:",a),r.error(`Failed to load images: ${a.message}`),L(!0),T(!1)}},[m,S,d,F,_,h]);e.useEffect(()=>{x()},[x]),e.useEffect(()=>{const a=setTimeout(()=>{m===1?x():b(1)},500);return()=>clearTimeout(a)},[h,m,x]);const q=(a,l)=>{R(a||"created_at"),C(l),b(1)},P=e.useCallback(async a=>{try{if(!a||a.length===0)throw new Error("No records selected for export");r.info("Export functionality coming soon")}catch(l){throw l}},[]),U=e.useCallback(async(a,l)=>{if(a==="generate_images")try{const w=l.map(f=>parseInt(f));r.info(`Generate images for ${l.length} items`)}catch(w){r.error(`Failed to generate images: ${w.message}`)}else r.info(`Bulk action "${a}" for ${l.length} items`)},[]),u=e.useMemo(()=>Fe(),[h,S,d]),W=e.useMemo(()=>u!=null&&u.headerMetrics?u.headerMetrics.map(a=>({label:a.label,value:a.calculate({images:k,totalCount:p}),accentColor:a.accentColor})):[],[u==null?void 0:u.headerMetrics,k,p]);return s.jsx(te,{title:"Task Images",titleIcon:s.jsx(Ne,{className:"text-purple-500 size-5"}),subtitle:"Manage images for content tasks",columns:u.columns,data:k,loading:E,showContent:V,filters:u.filters,filterValues:{search:h,image_type:S,status:d},onFilterChange:(a,l)=>{const w=l==null?"":String(l);a==="search"?$(w):a==="image_type"?i(w):a==="status"&&N(w),b(1)},onDelete:async a=>{await K(a),x()},onBulkDelete:async a=>{for(const l of a)await K(l);return x(),{deleted_count:a.length}},onBulkExport:P,onBulkAction:U,getItemDisplayName:a=>a.task_title||`Image ${a.id}`,onExport:async()=>{r.info("Export functionality coming soon")},onExportIcon:s.jsx(se,{}),selectionLabel:"image",pagination:{currentPage:m,totalPages:I,totalCount:p,onPageChange:b},selection:{selectedIds:v,onSelectionChange:D},sorting:{sortBy:F,sortDirection:_,onSort:q},headerMetrics:W,onFilterReset:()=>{$(""),i(""),N(""),b(1)}})}const Je=Object.freeze(Object.defineProperty({__proto__:null,default:Oe},Symbol.toStringTag,{value:"Module"}));function Le(){return s.jsx(X,{})}const Ke=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"}));export{Xe as C,He as D,Je as I,Ke as P,Qe as T,Ze as a}; diff --git a/frontend/dist/index.html b/frontend/dist/index.html index df574fcb..81cafbfd 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -4,7 +4,7 @@ - + @@ -21,10 +21,10 @@ - + - + diff --git a/frontend/src/components/common/ProgressModal.tsx b/frontend/src/components/common/ProgressModal.tsx index 0087cbea..9c9a3917 100644 --- a/frontend/src/components/common/ProgressModal.tsx +++ b/frontend/src/components/common/ProgressModal.tsx @@ -43,10 +43,13 @@ export default function ProgressModal({ }: ProgressModalProps) { // Generate modal instance ID on first render const modalInstanceIdRef = React.useRef(null); - if (!modalInstanceIdRef.current) { - modalInstanceIdRef.current = getModalInstanceId(); - } - const modalInstanceId = modalInstanceIdRef.current; + React.useEffect(() => { + if (!modalInstanceIdRef.current) { + modalInstanceIdRef.current = getModalInstanceId(); + } + }, []); + + const modalInstanceId = modalInstanceIdRef.current || 'modal-01'; // Build full function ID with modal instance const fullFunctionId = functionId ? `${functionId}-${modalInstanceId}` : null; diff --git a/frontend/src/components/debug/ResourceDebugOverlay.tsx b/frontend/src/components/debug/ResourceDebugOverlay.tsx index b178e138..b37eb453 100644 --- a/frontend/src/components/debug/ResourceDebugOverlay.tsx +++ b/frontend/src/components/debug/ResourceDebugOverlay.tsx @@ -182,6 +182,10 @@ export default function ResourceDebugOverlay({ enabled }: ResourceDebugOverlayPr // Metrics are optional and not critical for functionality return; } + } catch (error) { + // Silently ignore all errors + return; + } }; // Calculate page load time