@manojkmfsi/monodog 1.1.38 → 1.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/monodog-dashboard/dist/assets/index-C08ciT3A.js +20 -0
  3. package/monodog-dashboard/dist/assets/index-C08ciT3A.js.map +1 -0
  4. package/monodog-dashboard/dist/assets/index-Dc2vaUOq.css +1 -0
  5. package/monodog-dashboard/{index.html → dist/index.html} +2 -1
  6. package/package.json +2 -2
  7. package/monodog-dashboard/THEME_SYSTEM.md +0 -309
  8. package/monodog-dashboard/__tests__/AuthCallbackPage.test.ts +0 -138
  9. package/monodog-dashboard/__tests__/ConfigInspector.test.ts +0 -33
  10. package/monodog-dashboard/__tests__/DependencyGraph.test.ts +0 -72
  11. package/monodog-dashboard/__tests__/HealthStatus.test.ts +0 -69
  12. package/monodog-dashboard/__tests__/LoginPage.test.ts +0 -79
  13. package/monodog-dashboard/__tests__/PackageDetail.test.ts +0 -22
  14. package/monodog-dashboard/__tests__/ReleaseManager.test.tsx +0 -510
  15. package/monodog-dashboard/__tests__/api-client.test.ts +0 -475
  16. package/monodog-dashboard/__tests__/components.test.ts +0 -117
  17. package/monodog-dashboard/__tests__/dashboard.utils.test.ts +0 -144
  18. package/monodog-dashboard/__tests__/dependency.utils.test.ts +0 -125
  19. package/monodog-dashboard/__tests__/monorepoService.unit.test.ts +0 -103
  20. package/monodog-dashboard/__tests__/packages.utils.test.ts +0 -37
  21. package/monodog-dashboard/__tests__/pages.test.ts +0 -103
  22. package/monodog-dashboard/package-lock.json +0 -4587
  23. package/monodog-dashboard/postcss.config.js +0 -6
  24. package/monodog-dashboard/src/components/App.tsx +0 -36
  25. package/monodog-dashboard/src/components/LoadingState.tsx +0 -18
  26. package/monodog-dashboard/src/components/PermissionGuard.tsx +0 -92
  27. package/monodog-dashboard/src/components/ProtectedRoute.tsx +0 -24
  28. package/monodog-dashboard/src/components/configuration/Configuration.tsx +0 -91
  29. package/monodog-dashboard/src/components/configuration/components/BrandingSettings.tsx +0 -128
  30. package/monodog-dashboard/src/components/configuration/components/ConfigurationHeader.tsx +0 -34
  31. package/monodog-dashboard/src/components/configuration/components/ConfigurationModal.tsx +0 -20
  32. package/monodog-dashboard/src/components/configuration/components/ConfigurationTabs.tsx +0 -30
  33. package/monodog-dashboard/src/components/configuration/components/FeatureToggles.tsx +0 -66
  34. package/monodog-dashboard/src/components/configuration/components/GeneralSettings.tsx +0 -77
  35. package/monodog-dashboard/src/components/configuration/components/MonorepoSettings.tsx +0 -179
  36. package/monodog-dashboard/src/components/configuration/components/index.ts +0 -8
  37. package/monodog-dashboard/src/components/configuration/types/config.types.ts +0 -52
  38. package/monodog-dashboard/src/components/configuration/utils/config.utils.tsx +0 -115
  39. package/monodog-dashboard/src/components/main-dashboard/Dashboard.tsx +0 -242
  40. package/monodog-dashboard/src/components/main-dashboard/Layout.tsx +0 -112
  41. package/monodog-dashboard/src/components/main-dashboard/components/Header.tsx +0 -47
  42. package/monodog-dashboard/src/components/main-dashboard/components/PackageDistribution.tsx +0 -35
  43. package/monodog-dashboard/src/components/main-dashboard/components/PackageSearchFilter.tsx +0 -47
  44. package/monodog-dashboard/src/components/main-dashboard/components/PackageTable.tsx +0 -87
  45. package/monodog-dashboard/src/components/main-dashboard/components/QuickActions.tsx +0 -60
  46. package/monodog-dashboard/src/components/main-dashboard/components/StatsCards.tsx +0 -73
  47. package/monodog-dashboard/src/components/main-dashboard/components/index.ts +0 -7
  48. package/monodog-dashboard/src/components/main-dashboard/types/dashboard.types.ts +0 -33
  49. package/monodog-dashboard/src/components/main-dashboard/utils/dashboard.utils.tsx +0 -70
  50. package/monodog-dashboard/src/components/modules/ci-integration/CIIntegration.tsx +0 -277
  51. package/monodog-dashboard/src/components/modules/ci-integration/components/BuildDetails.tsx +0 -228
  52. package/monodog-dashboard/src/components/modules/ci-integration/components/BuildList.tsx +0 -212
  53. package/monodog-dashboard/src/components/modules/ci-integration/components/BuildOverview.tsx +0 -158
  54. package/monodog-dashboard/src/components/modules/ci-integration/components/CIIntegrationHeader.tsx +0 -38
  55. package/monodog-dashboard/src/components/modules/ci-integration/components/ErrorState.tsx +0 -25
  56. package/monodog-dashboard/src/components/modules/ci-integration/components/LoadingState.tsx +0 -16
  57. package/monodog-dashboard/src/components/modules/ci-integration/components/PipelineStatus.tsx +0 -223
  58. package/monodog-dashboard/src/components/modules/ci-integration/components/index.ts +0 -8
  59. package/monodog-dashboard/src/components/modules/ci-integration/types/ci.types.ts +0 -97
  60. package/monodog-dashboard/src/components/modules/ci-integration/utils/ci.utils.tsx +0 -264
  61. package/monodog-dashboard/src/components/modules/config-inspector/ConfigInspector.tsx +0 -324
  62. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigEditor.tsx +0 -93
  63. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigInspectorHeader.tsx +0 -36
  64. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigPreview.tsx +0 -89
  65. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigSidebar.tsx +0 -141
  66. package/monodog-dashboard/src/components/modules/config-inspector/components/ConfigToolbar.tsx +0 -184
  67. package/monodog-dashboard/src/components/modules/config-inspector/components/ErrorState.tsx +0 -25
  68. package/monodog-dashboard/src/components/modules/config-inspector/components/LoadingState.tsx +0 -16
  69. package/monodog-dashboard/src/components/modules/config-inspector/components/ValidationPanel.tsx +0 -155
  70. package/monodog-dashboard/src/components/modules/config-inspector/components/index.ts +0 -9
  71. package/monodog-dashboard/src/components/modules/config-inspector/types/config.types.ts +0 -100
  72. package/monodog-dashboard/src/components/modules/config-inspector/utils/config.utils.tsx +0 -704
  73. package/monodog-dashboard/src/components/modules/dependency-graph/DependencyGraph.tsx +0 -224
  74. package/monodog-dashboard/src/components/modules/dependency-graph/components/CircularDependencies.tsx +0 -177
  75. package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyDetails.tsx +0 -192
  76. package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyGraphHeader.tsx +0 -30
  77. package/monodog-dashboard/src/components/modules/dependency-graph/components/DependencyList.tsx +0 -177
  78. package/monodog-dashboard/src/components/modules/dependency-graph/components/ErrorState.tsx +0 -25
  79. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphLegend.tsx +0 -89
  80. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphStats.tsx +0 -141
  81. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphToolbar.tsx +0 -107
  82. package/monodog-dashboard/src/components/modules/dependency-graph/components/GraphVisualization.tsx +0 -179
  83. package/monodog-dashboard/src/components/modules/dependency-graph/components/LoadingState.tsx +0 -16
  84. package/monodog-dashboard/src/components/modules/dependency-graph/components/index.ts +0 -11
  85. package/monodog-dashboard/src/components/modules/dependency-graph/types/dependency.types.ts +0 -105
  86. package/monodog-dashboard/src/components/modules/dependency-graph/utils/dependency.utils.tsx +0 -433
  87. package/monodog-dashboard/src/components/modules/health-status/HealthStatus.tsx +0 -739
  88. package/monodog-dashboard/src/components/modules/health-status/components/ErrorState.tsx +0 -25
  89. package/monodog-dashboard/src/components/modules/health-status/components/HealthActions.tsx +0 -122
  90. package/monodog-dashboard/src/components/modules/health-status/components/HealthAlerts.tsx +0 -151
  91. package/monodog-dashboard/src/components/modules/health-status/components/HealthMetrics.tsx +0 -132
  92. package/monodog-dashboard/src/components/modules/health-status/components/HealthStatusHeader.tsx +0 -30
  93. package/monodog-dashboard/src/components/modules/health-status/components/LoadingState.tsx +0 -16
  94. package/monodog-dashboard/src/components/modules/health-status/components/OverallHealthScore.tsx +0 -122
  95. package/monodog-dashboard/src/components/modules/health-status/components/PackageHealthList.tsx +0 -195
  96. package/monodog-dashboard/src/components/modules/health-status/types/health.types.ts +0 -80
  97. package/monodog-dashboard/src/components/modules/health-status/utils/health.utils.tsx +0 -220
  98. package/monodog-dashboard/src/components/modules/packages/PackageDetail.tsx +0 -255
  99. package/monodog-dashboard/src/components/modules/packages/PackagesOverview.tsx +0 -166
  100. package/monodog-dashboard/src/components/modules/packages/components/ConfigurationTab.tsx +0 -311
  101. package/monodog-dashboard/src/components/modules/packages/components/DependenciesTab.tsx +0 -154
  102. package/monodog-dashboard/src/components/modules/packages/components/ErrorState.tsx +0 -21
  103. package/monodog-dashboard/src/components/modules/packages/components/HealthMetricsTab.tsx +0 -275
  104. package/monodog-dashboard/src/components/modules/packages/components/LoadingState.tsx +0 -14
  105. package/monodog-dashboard/src/components/modules/packages/components/PackageDetailHeader.tsx +0 -167
  106. package/monodog-dashboard/src/components/modules/packages/components/PackageDetailTabs.tsx +0 -49
  107. package/monodog-dashboard/src/components/modules/packages/components/PackageStats.tsx +0 -70
  108. package/monodog-dashboard/src/components/modules/packages/components/PackagesTable.tsx +0 -163
  109. package/monodog-dashboard/src/components/modules/packages/components/RecentCommitsTab.tsx +0 -90
  110. package/monodog-dashboard/src/components/modules/packages/components/SearchAndFilter.tsx +0 -66
  111. package/monodog-dashboard/src/components/modules/packages/components/index.ts +0 -12
  112. package/monodog-dashboard/src/components/modules/packages/types/packages.types.ts +0 -101
  113. package/monodog-dashboard/src/components/modules/packages/utils/packages.utils.tsx +0 -178
  114. package/monodog-dashboard/src/components/pipeline/JobsList.tsx +0 -83
  115. package/monodog-dashboard/src/components/pipeline/LogViewer.tsx +0 -392
  116. package/monodog-dashboard/src/components/pipeline/PipelineManager.tsx +0 -562
  117. package/monodog-dashboard/src/components/pipeline/WorkflowRunsList.tsx +0 -272
  118. package/monodog-dashboard/src/components/pipeline/WorkflowTrigger.tsx +0 -182
  119. package/monodog-dashboard/src/components/pipeline/utils/pipeline.utils.tsx +0 -11
  120. package/monodog-dashboard/src/components/publish-control/PublishControl.tsx +0 -229
  121. package/monodog-dashboard/src/components/publish-control/components/ChangelogViewer.tsx +0 -103
  122. package/monodog-dashboard/src/components/publish-control/components/ErrorState.tsx +0 -23
  123. package/monodog-dashboard/src/components/publish-control/components/LoadingState.tsx +0 -10
  124. package/monodog-dashboard/src/components/publish-control/components/PackageReleaseTable.tsx +0 -140
  125. package/monodog-dashboard/src/components/publish-control/components/PublishHeader.tsx +0 -30
  126. package/monodog-dashboard/src/components/publish-control/components/QuickActionCards.tsx +0 -56
  127. package/monodog-dashboard/src/components/publish-control/components/ReleaseSchedule.tsx +0 -104
  128. package/monodog-dashboard/src/components/publish-control/components/index.ts +0 -8
  129. package/monodog-dashboard/src/components/publish-control/types/publish.types.ts +0 -39
  130. package/monodog-dashboard/src/components/publish-control/utils/publish.utils.ts +0 -59
  131. package/monodog-dashboard/src/components/release-manager/ReleaseManager.tsx +0 -342
  132. package/monodog-dashboard/src/components/release-manager/components/ChangesetPreview.tsx +0 -123
  133. package/monodog-dashboard/src/components/release-manager/components/ErrorState.tsx +0 -38
  134. package/monodog-dashboard/src/components/release-manager/components/LoadingState.tsx +0 -18
  135. package/monodog-dashboard/src/components/release-manager/components/PackageSelector.tsx +0 -137
  136. package/monodog-dashboard/src/components/release-manager/components/PublishConfirmation.tsx +0 -150
  137. package/monodog-dashboard/src/components/release-manager/components/ReleaseValidation.tsx +0 -138
  138. package/monodog-dashboard/src/components/release-manager/components/VersionBumpSelector.tsx +0 -142
  139. package/monodog-dashboard/src/components/release-manager/types/index.ts +0 -9
  140. package/monodog-dashboard/src/components/release-manager/types/release-manager.types.ts +0 -29
  141. package/monodog-dashboard/src/components/setup-guide/SetupGuide.tsx +0 -96
  142. package/monodog-dashboard/src/components/setup-guide/components/SetupHeader.tsx +0 -24
  143. package/monodog-dashboard/src/components/setup-guide/components/SetupModal.tsx +0 -24
  144. package/monodog-dashboard/src/components/setup-guide/components/SetupProgress.tsx +0 -29
  145. package/monodog-dashboard/src/components/setup-guide/components/StepContent.tsx +0 -272
  146. package/monodog-dashboard/src/components/setup-guide/components/StepNavigation.tsx +0 -62
  147. package/monodog-dashboard/src/components/setup-guide/components/index.ts +0 -6
  148. package/monodog-dashboard/src/components/setup-guide/types/setup.types.ts +0 -38
  149. package/monodog-dashboard/src/components/setup-guide/utils/setup.utils.ts +0 -79
  150. package/monodog-dashboard/src/constants/api-config.ts +0 -81
  151. package/monodog-dashboard/src/constants/index.ts +0 -9
  152. package/monodog-dashboard/src/constants/messages.ts +0 -40
  153. package/monodog-dashboard/src/icons/heroicons.ts +0 -65
  154. package/monodog-dashboard/src/icons/index.tsx +0 -1788
  155. package/monodog-dashboard/src/index.css +0 -175
  156. package/monodog-dashboard/src/main.tsx +0 -9
  157. package/monodog-dashboard/src/pages/AuthCallbackPage.tsx +0 -103
  158. package/monodog-dashboard/src/pages/CIPage.tsx +0 -6
  159. package/monodog-dashboard/src/pages/ConfigPage.tsx +0 -6
  160. package/monodog-dashboard/src/pages/DashboardPage.tsx +0 -6
  161. package/monodog-dashboard/src/pages/DependenciesPage.tsx +0 -6
  162. package/monodog-dashboard/src/pages/HealthPage.tsx +0 -6
  163. package/monodog-dashboard/src/pages/LoginPage.tsx +0 -77
  164. package/monodog-dashboard/src/pages/PackageDetailPage.tsx +0 -6
  165. package/monodog-dashboard/src/pages/PackagesPage.tsx +0 -6
  166. package/monodog-dashboard/src/pages/PipelinePage.tsx +0 -22
  167. package/monodog-dashboard/src/pages/PublishPage.tsx +0 -6
  168. package/monodog-dashboard/src/pages/ReleaseManagerPage.tsx +0 -9
  169. package/monodog-dashboard/src/pages/index.ts +0 -28
  170. package/monodog-dashboard/src/routes/AppRouter.tsx +0 -89
  171. package/monodog-dashboard/src/routes/AppRouterPages.tsx +0 -56
  172. package/monodog-dashboard/src/routes/index.ts +0 -10
  173. package/monodog-dashboard/src/routes/routes.config.ts +0 -94
  174. package/monodog-dashboard/src/services/api/api-client.ts +0 -189
  175. package/monodog-dashboard/src/services/api/index.ts +0 -30
  176. package/monodog-dashboard/src/services/api/types/api.types.ts +0 -63
  177. package/monodog-dashboard/src/services/auth-context.tsx +0 -344
  178. package/monodog-dashboard/src/services/monorepoService.ts +0 -733
  179. package/monodog-dashboard/src/services/permission-context.tsx +0 -193
  180. package/monodog-dashboard/src/theme/COMPONENT_UPDATES.md +0 -273
  181. package/monodog-dashboard/src/theme/INTEGRATION.md +0 -381
  182. package/monodog-dashboard/src/theme/README.md +0 -239
  183. package/monodog-dashboard/src/theme/examples.tsx +0 -386
  184. package/monodog-dashboard/src/theme/index.ts +0 -402
  185. package/monodog-dashboard/src/theme/migration-guide.md +0 -335
  186. package/monodog-dashboard/src/types/auth-context.types.ts +0 -51
  187. package/monodog-dashboard/src/types/component.types.ts +0 -96
  188. package/monodog-dashboard/src/types/icons.types.ts +0 -13
  189. package/monodog-dashboard/src/types/index.ts +0 -68
  190. package/monodog-dashboard/src/types/monorepo-service.types.ts +0 -53
  191. package/monodog-dashboard/src/types/permission-context.types.ts +0 -49
  192. package/monodog-dashboard/src/types/pipeline.types.ts +0 -89
  193. package/monodog-dashboard/src/types/routes.types.ts +0 -12
  194. package/monodog-dashboard/src/utils/cookies.ts +0 -47
  195. package/monodog-dashboard/tailwind.config.js +0 -68
  196. package/monodog-dashboard/tsconfig.app.json +0 -14
  197. package/monodog-dashboard/tsconfig.json +0 -17
  198. package/monodog-dashboard/tsconfig.node.json +0 -10
  199. package/monodog-dashboard/vite.config.ts +0 -9
@@ -0,0 +1,20 @@
1
+ function mp(r,s){for(var a=0;a<s.length;a++){const i=s[a];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in r)){const d=Object.getOwnPropertyDescriptor(i,c);d&&Object.defineProperty(r,c,d.get?d:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function a(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=a(c);fetch(c.href,d)}})();function fp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Go={exports:{}},dl={},Ko={exports:{}},Ce={};var mm;function hp(){if(mm)return Ce;mm=1;var r=Symbol.for("react.element"),s=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function k(S){return S===null||typeof S!="object"?null:(S=y&&S[y]||S["@@iterator"],typeof S=="function"?S:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,R={};function b(S,F,ee){this.props=S,this.context=F,this.refs=R,this.updater=ee||M}b.prototype.isReactComponent={},b.prototype.setState=function(S,F){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,F,"setState")},b.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function D(){}D.prototype=b.prototype;function _(S,F,ee){this.props=S,this.context=F,this.refs=R,this.updater=ee||M}var I=_.prototype=new D;I.constructor=_,N(I,b.prototype),I.isPureReactComponent=!0;var U=Array.isArray,q=Object.prototype.hasOwnProperty,he={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function pe(S,F,ee){var ue,ne={},Ne=null,_e=null;if(F!=null)for(ue in F.ref!==void 0&&(_e=F.ref),F.key!==void 0&&(Ne=""+F.key),F)q.call(F,ue)&&!$.hasOwnProperty(ue)&&(ne[ue]=F[ue]);var ke=arguments.length-2;if(ke===1)ne.children=ee;else if(1<ke){for(var Oe=Array(ke),lt=0;lt<ke;lt++)Oe[lt]=arguments[lt+2];ne.children=Oe}if(S&&S.defaultProps)for(ue in ke=S.defaultProps,ke)ne[ue]===void 0&&(ne[ue]=ke[ue]);return{$$typeof:r,type:S,key:Ne,ref:_e,props:ne,_owner:he.current}}function we(S,F){return{$$typeof:r,type:S.type,key:F,ref:S.ref,props:S.props,_owner:S._owner}}function je(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function te(S){var F={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ee){return F[ee]})}var ve=/\/+/g;function ce(S,F){return typeof S=="object"&&S!==null&&S.key!=null?te(""+S.key):F.toString(36)}function ge(S,F,ee,ue,ne){var Ne=typeof S;(Ne==="undefined"||Ne==="boolean")&&(S=null);var _e=!1;if(S===null)_e=!0;else switch(Ne){case"string":case"number":_e=!0;break;case"object":switch(S.$$typeof){case r:case s:_e=!0}}if(_e)return _e=S,ne=ne(_e),S=ue===""?"."+ce(_e,0):ue,U(ne)?(ee="",S!=null&&(ee=S.replace(ve,"$&/")+"/"),ge(ne,F,ee,"",function(lt){return lt})):ne!=null&&(je(ne)&&(ne=we(ne,ee+(!ne.key||_e&&_e.key===ne.key?"":(""+ne.key).replace(ve,"$&/")+"/")+S)),F.push(ne)),1;if(_e=0,ue=ue===""?".":ue+":",U(S))for(var ke=0;ke<S.length;ke++){Ne=S[ke];var Oe=ue+ce(Ne,ke);_e+=ge(Ne,F,ee,Oe,ne)}else if(Oe=k(S),typeof Oe=="function")for(S=Oe.call(S),ke=0;!(Ne=S.next()).done;)Ne=Ne.value,Oe=ue+ce(Ne,ke++),_e+=ge(Ne,F,ee,Oe,ne);else if(Ne==="object")throw F=String(S),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return _e}function oe(S,F,ee){if(S==null)return S;var ue=[],ne=0;return ge(S,ue,"","",function(Ne){return F.call(ee,Ne,ne++)}),ue}function Q(S){if(S._status===-1){var F=S._result;F=F(),F.then(function(ee){(S._status===0||S._status===-1)&&(S._status=1,S._result=ee)},function(ee){(S._status===0||S._status===-1)&&(S._status=2,S._result=ee)}),S._status===-1&&(S._status=0,S._result=F)}if(S._status===1)return S._result.default;throw S._result}var J={current:null},B={transition:null},Y={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:B,ReactCurrentOwner:he};function K(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:oe,forEach:function(S,F,ee){oe(S,function(){F.apply(this,arguments)},ee)},count:function(S){var F=0;return oe(S,function(){F++}),F},toArray:function(S){return oe(S,function(F){return F})||[]},only:function(S){if(!je(S))throw Error("React.Children.only expected to receive a single React element child.");return S}},Ce.Component=b,Ce.Fragment=a,Ce.Profiler=c,Ce.PureComponent=_,Ce.StrictMode=i,Ce.Suspense=h,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,Ce.act=K,Ce.cloneElement=function(S,F,ee){if(S==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+S+".");var ue=N({},S.props),ne=S.key,Ne=S.ref,_e=S._owner;if(F!=null){if(F.ref!==void 0&&(Ne=F.ref,_e=he.current),F.key!==void 0&&(ne=""+F.key),S.type&&S.type.defaultProps)var ke=S.type.defaultProps;for(Oe in F)q.call(F,Oe)&&!$.hasOwnProperty(Oe)&&(ue[Oe]=F[Oe]===void 0&&ke!==void 0?ke[Oe]:F[Oe])}var Oe=arguments.length-2;if(Oe===1)ue.children=ee;else if(1<Oe){ke=Array(Oe);for(var lt=0;lt<Oe;lt++)ke[lt]=arguments[lt+2];ue.children=ke}return{$$typeof:r,type:S.type,key:ne,ref:Ne,props:ue,_owner:_e}},Ce.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},S.Provider={$$typeof:d,_context:S},S.Consumer=S},Ce.createElement=pe,Ce.createFactory=function(S){var F=pe.bind(null,S);return F.type=S,F},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(S){return{$$typeof:p,render:S}},Ce.isValidElement=je,Ce.lazy=function(S){return{$$typeof:v,_payload:{_status:-1,_result:S},_init:Q}},Ce.memo=function(S,F){return{$$typeof:g,type:S,compare:F===void 0?null:F}},Ce.startTransition=function(S){var F=B.transition;B.transition={};try{S()}finally{B.transition=F}},Ce.unstable_act=K,Ce.useCallback=function(S,F){return J.current.useCallback(S,F)},Ce.useContext=function(S){return J.current.useContext(S)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(S){return J.current.useDeferredValue(S)},Ce.useEffect=function(S,F){return J.current.useEffect(S,F)},Ce.useId=function(){return J.current.useId()},Ce.useImperativeHandle=function(S,F,ee){return J.current.useImperativeHandle(S,F,ee)},Ce.useInsertionEffect=function(S,F){return J.current.useInsertionEffect(S,F)},Ce.useLayoutEffect=function(S,F){return J.current.useLayoutEffect(S,F)},Ce.useMemo=function(S,F){return J.current.useMemo(S,F)},Ce.useReducer=function(S,F,ee){return J.current.useReducer(S,F,ee)},Ce.useRef=function(S){return J.current.useRef(S)},Ce.useState=function(S){return J.current.useState(S)},Ce.useSyncExternalStore=function(S,F,ee){return J.current.useSyncExternalStore(S,F,ee)},Ce.useTransition=function(){return J.current.useTransition()},Ce.version="18.3.1",Ce}var fm;function wc(){return fm||(fm=1,Ko.exports=hp()),Ko.exports}var hm;function pp(){if(hm)return dl;hm=1;var r=wc(),s=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function m(p,h,g){var v,y={},k=null,M=null;g!==void 0&&(k=""+g),h.key!==void 0&&(k=""+h.key),h.ref!==void 0&&(M=h.ref);for(v in h)i.call(h,v)&&!d.hasOwnProperty(v)&&(y[v]=h[v]);if(p&&p.defaultProps)for(v in h=p.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:s,type:p,key:k,ref:M,props:y,_owner:c.current}}return dl.Fragment=a,dl.jsx=m,dl.jsxs=m,dl}var pm;function xp(){return pm||(pm=1,Go.exports=pp()),Go.exports}var t=xp(),Ba={},Yo={exports:{}},Et={},qo={exports:{}},Qo={};var xm;function gp(){return xm||(xm=1,(function(r){function s(B,Y){var K=B.length;B.push(Y);e:for(;0<K;){var S=K-1>>>1,F=B[S];if(0<c(F,Y))B[S]=Y,B[K]=F,K=S;else break e}}function a(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var Y=B[0],K=B.pop();if(K!==Y){B[0]=K;e:for(var S=0,F=B.length,ee=F>>>1;S<ee;){var ue=2*(S+1)-1,ne=B[ue],Ne=ue+1,_e=B[Ne];if(0>c(ne,K))Ne<F&&0>c(_e,ne)?(B[S]=_e,B[Ne]=K,S=Ne):(B[S]=ne,B[ue]=K,S=ue);else if(Ne<F&&0>c(_e,K))B[S]=_e,B[Ne]=K,S=Ne;else break e}}return Y}function c(B,Y){var K=B.sortIndex-Y.sortIndex;return K!==0?K:B.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var m=Date,p=m.now();r.unstable_now=function(){return m.now()-p}}var h=[],g=[],v=1,y=null,k=3,M=!1,N=!1,R=!1,b=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(B){for(var Y=a(g);Y!==null;){if(Y.callback===null)i(g);else if(Y.startTime<=B)i(g),Y.sortIndex=Y.expirationTime,s(h,Y);else break;Y=a(g)}}function U(B){if(R=!1,I(B),!N)if(a(h)!==null)N=!0,Q(q);else{var Y=a(g);Y!==null&&J(U,Y.startTime-B)}}function q(B,Y){N=!1,R&&(R=!1,D(pe),pe=-1),M=!0;var K=k;try{for(I(Y),y=a(h);y!==null&&(!(y.expirationTime>Y)||B&&!te());){var S=y.callback;if(typeof S=="function"){y.callback=null,k=y.priorityLevel;var F=S(y.expirationTime<=Y);Y=r.unstable_now(),typeof F=="function"?y.callback=F:y===a(h)&&i(h),I(Y)}else i(h);y=a(h)}if(y!==null)var ee=!0;else{var ue=a(g);ue!==null&&J(U,ue.startTime-Y),ee=!1}return ee}finally{y=null,k=K,M=!1}}var he=!1,$=null,pe=-1,we=5,je=-1;function te(){return!(r.unstable_now()-je<we)}function ve(){if($!==null){var B=r.unstable_now();je=B;var Y=!0;try{Y=$(!0,B)}finally{Y?ce():(he=!1,$=null)}}else he=!1}var ce;if(typeof _=="function")ce=function(){_(ve)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,oe=ge.port2;ge.port1.onmessage=ve,ce=function(){oe.postMessage(null)}}else ce=function(){b(ve,0)};function Q(B){$=B,he||(he=!0,ce())}function J(B,Y){pe=b(function(){B(r.unstable_now())},Y)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(B){B.callback=null},r.unstable_continueExecution=function(){N||M||(N=!0,Q(q))},r.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):we=0<B?Math.floor(1e3/B):5},r.unstable_getCurrentPriorityLevel=function(){return k},r.unstable_getFirstCallbackNode=function(){return a(h)},r.unstable_next=function(B){switch(k){case 1:case 2:case 3:var Y=3;break;default:Y=k}var K=k;k=Y;try{return B()}finally{k=K}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=k;k=B;try{return Y()}finally{k=K}},r.unstable_scheduleCallback=function(B,Y,K){var S=r.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?S+K:S):K=S,B){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=K+F,B={id:v++,callback:Y,priorityLevel:B,startTime:K,expirationTime:F,sortIndex:-1},K>S?(B.sortIndex=K,s(g,B),a(h)===null&&B===a(g)&&(R?(D(pe),pe=-1):R=!0,J(U,K-S))):(B.sortIndex=F,s(h,B),N||M||(N=!0,Q(q))),B},r.unstable_shouldYield=te,r.unstable_wrapCallback=function(B){var Y=k;return function(){var K=k;k=Y;try{return B.apply(this,arguments)}finally{k=K}}}})(Qo)),Qo}var gm;function yp(){return gm||(gm=1,qo.exports=gp()),qo.exports}var ym;function vp(){if(ym)return Et;ym=1;var r=wc(),s=yp();function a(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,l=1;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,c={};function d(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(c[e]=n,e=0;e<n.length;e++)i.add(n[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function k(e){return h.call(y,e)?!0:h.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function M(e,n,l,o){if(l!==null&&l.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:l!==null?!l.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,l,o){if(n===null||typeof n>"u"||M(e,n,l,o))return!0;if(o)return!1;if(l!==null)switch(l.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function R(e,n,l,o,u,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=l,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new R(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new R(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new R(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new R(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new R(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new R(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new R(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new R(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new R(e,5,!1,e.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function _(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(D,_);b[n]=new R(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(D,_);b[n]=new R(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(D,_);b[n]=new R(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new R(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new R(e,1,!1,e.toLowerCase(),null,!0,!0)});function I(e,n,l,o){var u=b.hasOwnProperty(n)?b[n]:null;(u!==null?u.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,l,u,o)&&(l=null),o||u===null?k(n)&&(l===null?e.removeAttribute(n):e.setAttribute(n,""+l)):u.mustUseProperty?e[u.propertyName]=l===null?u.type===3?!1:"":l:(n=u.attributeName,o=u.attributeNamespace,l===null?e.removeAttribute(n):(u=u.type,l=u===3||u===4&&l===!0?"":""+l,o?e.setAttributeNS(o,n,l):e.setAttribute(n,l))))}var U=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),he=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),pe=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),te=Symbol.for("react.context"),ve=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),ge=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),J=Symbol.for("react.offscreen"),B=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var K=Object.assign,S;function F(e){if(S===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);S=n&&n[1]||""}return`
2
+ `+S+e}var ee=!1;function ue(e,n){if(!e||ee)return"";ee=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(L){var o=L}Reflect.construct(e,[],n)}else{try{n.call()}catch(L){o=L}e.call(n.prototype)}else{try{throw Error()}catch(L){o=L}e()}}catch(L){if(L&&o&&typeof L.stack=="string"){for(var u=L.stack.split(`
3
+ `),f=o.stack.split(`
4
+ `),x=u.length-1,j=f.length-1;1<=x&&0<=j&&u[x]!==f[j];)j--;for(;1<=x&&0<=j;x--,j--)if(u[x]!==f[j]){if(x!==1||j!==1)do if(x--,j--,0>j||u[x]!==f[j]){var C=`
5
+ `+u[x].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=x&&0<=j);break}}}finally{ee=!1,Error.prepareStackTrace=l}return(e=e?e.displayName||e.name:"")?F(e):""}function ne(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return""}}function Ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case he:return"Portal";case we:return"Profiler";case pe:return"StrictMode";case ce:return"Suspense";case ge:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case te:return(e.displayName||"Context")+".Consumer";case je:return(e._context.displayName||"Context")+".Provider";case ve:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oe:return n=e.displayName||null,n!==null?n:Ne(e.type)||"Memo";case Q:n=e._payload,e=e._init;try{return Ne(e(n))}catch{}}return null}function _e(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ne(n);case 8:return n===pe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function ke(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oe(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function lt(e){var n=Oe(e)?"checked":"value",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,f=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){o=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function fr(e){e._valueTracker||(e._valueTracker=lt(e))}function bs(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Oe(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function In(e,n){var l=n.checked;return K({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??e._wrapperState.initialChecked})}function cn(e,n){var l=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;l=ke(n.value!=null?n.value:l),e._wrapperState={initialChecked:o,initialValue:l,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ur(e,n){n=n.checked,n!=null&&I(e,"checked",n,!1)}function hr(e,n){Ur(e,n);var l=ke(n.value),o=n.type;if(l!=null)o==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+l):e.value!==""+l&&(e.value=""+l);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Mn(e,n.type,l):n.hasOwnProperty("defaultValue")&&Mn(e,n.type,ke(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function yn(e,n,l){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,l||n===e.value||(e.value=n),e.defaultValue=n}l=e.name,l!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,l!==""&&(e.name=l)}function Mn(e,n,l){(n!=="number"||Yt(e.ownerDocument)!==e)&&(l==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+l&&(e.defaultValue=""+l))}var un=Array.isArray;function vn(e,n,l,o){if(e=e.options,n){n={};for(var u=0;u<l.length;u++)n["$"+l[u]]=!0;for(l=0;l<e.length;l++)u=n.hasOwnProperty("$"+e[l].value),e[l].selected!==u&&(e[l].selected=u),u&&o&&(e[l].defaultSelected=!0)}else{for(l=""+ke(l),n=null,u=0;u<e.length;u++){if(e[u].value===l){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Br(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(a(91));return K({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _l(e,n){var l=n.value;if(l==null){if(l=n.children,n=n.defaultValue,l!=null){if(n!=null)throw Error(a(92));if(un(l)){if(1<l.length)throw Error(a(93));l=l[0]}n=l}n==null&&(n=""),l=n}e._wrapperState={initialValue:ke(l)}}function zr(e,n){var l=ke(n.value),o=ke(n.defaultValue);l!=null&&(l=""+l,l!==e.value&&(e.value=l),n.defaultValue==null&&e.defaultValue!==l&&(e.defaultValue=l)),o!=null&&(e.defaultValue=""+o)}function Dn(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function jn(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jt(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?jn(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Fn,Ss=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,l,o,u){MSApp.execUnsafeLocalFunction(function(){return e(n,l,o,u)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Fn=Fn||document.createElement("div"),Fn.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Fn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Un(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var wn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Al=["Webkit","ms","Moz","O"];Object.keys(wn).forEach(function(e){Al.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),wn[n]=wn[e]})});function pr(e,n,l){return n==null||typeof n=="boolean"||n===""?"":l||typeof n!="number"||n===0||wn.hasOwnProperty(e)&&wn[e]?(""+n).trim():n+"px"}function xr(e,n){e=e.style;for(var l in n)if(n.hasOwnProperty(l)){var o=l.indexOf("--")===0,u=pr(l,n[l],o);l==="float"&&(l="cssFloat"),o?e.setProperty(l,u):e[l]=u}}var qt=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dn(e,n){if(n){if(qt[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(a(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(a(61))}if(n.style!=null&&typeof n.style!="object")throw Error(a(62))}}function gr(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yr=null;function Cs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bn=null,Qt=null,zn=null;function Hn(e){if(e=Qs(e)){if(typeof Bn!="function")throw Error(a(280));var n=e.stateNode;n&&(n=ta(n),Bn(e.stateNode,e.type,n))}}function Pl(e){Qt?zn?zn.push(e):zn=[e]:Qt=e}function Ll(){if(Qt){var e=Qt,n=zn;if(zn=Qt=null,Hn(e),n)for(e=0;e<n.length;e++)Hn(n[e])}}function $e(e,n){return e(n)}function Nn(){}var Es=!1;function ks(e,n,l){if(Es)return e(n,l);Es=!0;try{return $e(e,n,l)}finally{Es=!1,(Qt!==null||zn!==null)&&(Nn(),Ll())}}function bn(e,n){var l=e.stateNode;if(l===null)return null;var o=ta(l);if(o===null)return null;l=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var Hr=!1;if(p)try{var $n={};Object.defineProperty($n,"passive",{get:function(){Hr=!0}}),window.addEventListener("test",$n,$n),window.removeEventListener("test",$n,$n)}catch{Hr=!1}function di(e,n,l,o,u,f,x,j,C){var L=Array.prototype.slice.call(arguments,3);try{n.apply(l,L)}catch(H){this.onError(H)}}var ot=!1,Ft=null,vr=!1,$r=null,Ts={onError:function(e){ot=!0,Ft=e}};function Ol(e,n,l,o,u,f,x,j,C){ot=!1,Ft=null,di.apply(Ts,arguments)}function Jt(e,n,l,o,u,f,x,j,C){if(Ol.apply(this,arguments),ot){if(ot){var L=Ft;ot=!1,Ft=null}else throw Error(a(198));vr||(vr=!0,$r=L)}}function mn(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function Rs(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function _s(e){if(mn(e)!==e)throw Error(a(188))}function Il(e){var n=e.alternate;if(!n){if(n=mn(e),n===null)throw Error(a(188));return n!==e?null:e}for(var l=e,o=n;;){var u=l.return;if(u===null)break;var f=u.alternate;if(f===null){if(o=u.return,o!==null){l=o;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===l)return _s(u),e;if(f===o)return _s(u),n;f=f.sibling}throw Error(a(188))}if(l.return!==o.return)l=u,o=f;else{for(var x=!1,j=u.child;j;){if(j===l){x=!0,l=u,o=f;break}if(j===o){x=!0,o=u,l=f;break}j=j.sibling}if(!x){for(j=f.child;j;){if(j===l){x=!0,l=f,o=u;break}if(j===o){x=!0,o=f,l=u;break}j=j.sibling}if(!x)throw Error(a(189))}}if(l.alternate!==o)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:n}function Ml(e){return e=Il(e),e!==null?ie(e):null}function ie(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=ie(e);if(n!==null)return n;e=e.sibling}return null}var E=s.unstable_scheduleCallback,W=s.unstable_cancelCallback,se=s.unstable_shouldYield,Ie=s.unstable_requestPaint,Se=s.unstable_now,Ve=s.unstable_getCurrentPriorityLevel,Ze=s.unstable_ImmediatePriority,Ut=s.unstable_UserBlockingPriority,Xt=s.unstable_NormalPriority,As=s.unstable_LowPriority,qe=s.unstable_IdlePriority,jr=null,_t=null;function kh(e){if(_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(jr,e,void 0,(e.current.flags&128)===128)}catch{}}var Zt=Math.clz32?Math.clz32:_h,Th=Math.log,Rh=Math.LN2;function _h(e){return e>>>=0,e===0?32:31-(Th(e)/Rh|0)|0}var Dl=64,Fl=4194304;function Ps(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ul(e,n){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,f=e.pingedLanes,x=l&268435455;if(x!==0){var j=x&~u;j!==0?o=Ps(j):(f&=x,f!==0&&(o=Ps(f)))}else x=l&~u,x!==0?o=Ps(x):f!==0&&(o=Ps(f));if(o===0)return 0;if(n!==0&&n!==o&&(n&u)===0&&(u=o&-o,f=n&-n,u>=f||u===16&&(f&4194240)!==0))return n;if((o&4)!==0&&(o|=l&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)l=31-Zt(n),u=1<<l,o|=e[l],n&=~u;return o}function Ah(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ph(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-Zt(f),j=1<<x,C=u[x];C===-1?((j&l)===0||(j&o)!==0)&&(u[x]=Ah(j,n)):C<=n&&(e.expiredLanes|=j),f&=~j}}function mi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $c(){var e=Dl;return Dl<<=1,(Dl&4194240)===0&&(Dl=64),e}function fi(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Ls(e,n,l){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Zt(n),e[n]=l}function Lh(e,n){var l=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<l;){var u=31-Zt(l),f=1<<u;n[u]=0,o[u]=-1,e[u]=-1,l&=~f}}function hi(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-Zt(l),u=1<<o;u&n|e[o]&n&&(e[o]|=n),l&=~u}}var Le=0;function Vc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Wc,pi,Gc,Kc,Yc,xi=!1,Bl=[],Vn=null,Wn=null,Gn=null,Os=new Map,Is=new Map,Kn=[],Oh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qc(e,n){switch(e){case"focusin":case"focusout":Vn=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":Gn=null;break;case"pointerover":case"pointerout":Os.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Is.delete(n.pointerId)}}function Ms(e,n,l,o,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Qs(n),n!==null&&pi(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Ih(e,n,l,o,u){switch(n){case"focusin":return Vn=Ms(Vn,e,n,l,o,u),!0;case"dragenter":return Wn=Ms(Wn,e,n,l,o,u),!0;case"mouseover":return Gn=Ms(Gn,e,n,l,o,u),!0;case"pointerover":var f=u.pointerId;return Os.set(f,Ms(Os.get(f)||null,e,n,l,o,u)),!0;case"gotpointercapture":return f=u.pointerId,Is.set(f,Ms(Is.get(f)||null,e,n,l,o,u)),!0}return!1}function Qc(e){var n=wr(e.target);if(n!==null){var l=mn(n);if(l!==null){if(n=l.tag,n===13){if(n=Rs(l),n!==null){e.blockedOn=n,Yc(e.priority,function(){Gc(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=yi(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);yr=o,l.target.dispatchEvent(o),yr=null}else return n=Qs(l),n!==null&&pi(n),e.blockedOn=l,!1;n.shift()}return!0}function Jc(e,n,l){zl(e)&&l.delete(n)}function Mh(){xi=!1,Vn!==null&&zl(Vn)&&(Vn=null),Wn!==null&&zl(Wn)&&(Wn=null),Gn!==null&&zl(Gn)&&(Gn=null),Os.forEach(Jc),Is.forEach(Jc)}function Ds(e,n){e.blockedOn===n&&(e.blockedOn=null,xi||(xi=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Mh)))}function Fs(e){function n(u){return Ds(u,e)}if(0<Bl.length){Ds(Bl[0],e);for(var l=1;l<Bl.length;l++){var o=Bl[l];o.blockedOn===e&&(o.blockedOn=null)}}for(Vn!==null&&Ds(Vn,e),Wn!==null&&Ds(Wn,e),Gn!==null&&Ds(Gn,e),Os.forEach(n),Is.forEach(n),l=0;l<Kn.length;l++)o=Kn[l],o.blockedOn===e&&(o.blockedOn=null);for(;0<Kn.length&&(l=Kn[0],l.blockedOn===null);)Qc(l),l.blockedOn===null&&Kn.shift()}var Vr=U.ReactCurrentBatchConfig,Hl=!0;function Dh(e,n,l,o){var u=Le,f=Vr.transition;Vr.transition=null;try{Le=1,gi(e,n,l,o)}finally{Le=u,Vr.transition=f}}function Fh(e,n,l,o){var u=Le,f=Vr.transition;Vr.transition=null;try{Le=4,gi(e,n,l,o)}finally{Le=u,Vr.transition=f}}function gi(e,n,l,o){if(Hl){var u=yi(e,n,l,o);if(u===null)Ii(e,n,o,$l,l),qc(e,o);else if(Ih(u,e,n,l,o))o.stopPropagation();else if(qc(e,o),n&4&&-1<Oh.indexOf(e)){for(;u!==null;){var f=Qs(u);if(f!==null&&Wc(f),f=yi(e,n,l,o),f===null&&Ii(e,n,o,$l,l),f===u)break;u=f}u!==null&&o.stopPropagation()}else Ii(e,n,o,null,l)}}var $l=null;function yi(e,n,l,o){if($l=null,e=Cs(o),e=wr(e),e!==null)if(n=mn(e),n===null)e=null;else if(l=n.tag,l===13){if(e=Rs(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return $l=e,null}function Xc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ve()){case Ze:return 1;case Ut:return 4;case Xt:case As:return 16;case qe:return 536870912;default:return 16}default:return 16}}var Yn=null,vi=null,Vl=null;function Zc(){if(Vl)return Vl;var e,n=vi,l=n.length,o,u="value"in Yn?Yn.value:Yn.textContent,f=u.length;for(e=0;e<l&&n[e]===u[e];e++);var x=l-e;for(o=1;o<=x&&n[l-o]===u[f-o];o++);return Vl=u.slice(e,1<o?1-o:void 0)}function Wl(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Gl(){return!0}function eu(){return!1}function At(e){function n(l,o,u,f,x){this._reactName=l,this._targetInst=u,this.type=o,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(l=e[j],this[j]=l?l(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Gl:eu,this.isPropagationStopped=eu,this}return K(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Gl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),n}var Wr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ji=At(Wr),Us=K({},Wr,{view:0,detail:0}),Uh=At(Us),wi,Ni,Bs,Kl=K({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Si,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Bs&&(Bs&&e.type==="mousemove"?(wi=e.screenX-Bs.screenX,Ni=e.screenY-Bs.screenY):Ni=wi=0,Bs=e),wi)},movementY:function(e){return"movementY"in e?e.movementY:Ni}}),tu=At(Kl),Bh=K({},Kl,{dataTransfer:0}),zh=At(Bh),Hh=K({},Us,{relatedTarget:0}),bi=At(Hh),$h=K({},Wr,{animationName:0,elapsedTime:0,pseudoElement:0}),Vh=At($h),Wh=K({},Wr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gh=At(Wh),Kh=K({},Wr,{data:0}),nu=At(Kh),Yh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jh(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Qh[e])?!!n[e]:!1}function Si(){return Jh}var Xh=K({},Us,{key:function(e){if(e.key){var n=Yh[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Wl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Si,charCode:function(e){return e.type==="keypress"?Wl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zh=At(Xh),e0=K({},Kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ru=At(e0),t0=K({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Si}),n0=At(t0),r0=K({},Wr,{propertyName:0,elapsedTime:0,pseudoElement:0}),s0=At(r0),l0=K({},Kl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),a0=At(l0),i0=[9,13,27,32],Ci=p&&"CompositionEvent"in window,zs=null;p&&"documentMode"in document&&(zs=document.documentMode);var o0=p&&"TextEvent"in window&&!zs,su=p&&(!Ci||zs&&8<zs&&11>=zs),lu=" ",au=!1;function iu(e,n){switch(e){case"keyup":return i0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gr=!1;function c0(e,n){switch(e){case"compositionend":return ou(n);case"keypress":return n.which!==32?null:(au=!0,lu);case"textInput":return e=n.data,e===lu&&au?null:e;default:return null}}function u0(e,n){if(Gr)return e==="compositionend"||!Ci&&iu(e,n)?(e=Zc(),Vl=vi=Yn=null,Gr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return su&&n.locale!=="ko"?null:n.data;default:return null}}var d0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!d0[e.type]:n==="textarea"}function uu(e,n,l,o){Pl(o),n=Xl(n,"onChange"),0<n.length&&(l=new ji("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var Hs=null,$s=null;function m0(e){Tu(e,0)}function Yl(e){var n=Jr(e);if(bs(n))return e}function f0(e,n){if(e==="change")return n}var du=!1;if(p){var Ei;if(p){var ki="oninput"in document;if(!ki){var mu=document.createElement("div");mu.setAttribute("oninput","return;"),ki=typeof mu.oninput=="function"}Ei=ki}else Ei=!1;du=Ei&&(!document.documentMode||9<document.documentMode)}function fu(){Hs&&(Hs.detachEvent("onpropertychange",hu),$s=Hs=null)}function hu(e){if(e.propertyName==="value"&&Yl($s)){var n=[];uu(n,$s,e,Cs(e)),ks(m0,n)}}function h0(e,n,l){e==="focusin"?(fu(),Hs=n,$s=l,Hs.attachEvent("onpropertychange",hu)):e==="focusout"&&fu()}function p0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yl($s)}function x0(e,n){if(e==="click")return Yl(n)}function g0(e,n){if(e==="input"||e==="change")return Yl(n)}function y0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var en=typeof Object.is=="function"?Object.is:y0;function Vs(e,n){if(en(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var u=l[o];if(!h.call(n,u)||!en(e[u],n[u]))return!1}return!0}function pu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xu(e,n){var l=pu(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=pu(l)}}function gu(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?gu(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function yu(){for(var e=window,n=Yt();n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=Yt(e.document)}return n}function Ti(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function v0(e){var n=yu(),l=e.focusedElem,o=e.selectionRange;if(n!==l&&l&&l.ownerDocument&&gu(l.ownerDocument.documentElement,l)){if(o!==null&&Ti(l)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in l)l.selectionStart=n,l.selectionEnd=Math.min(e,l.value.length);else if(e=(n=l.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var u=l.textContent.length,f=Math.min(o.start,u);o=o.end===void 0?f:Math.min(o.end,u),!e.extend&&f>o&&(u=o,o=f,f=u),u=xu(l,f);var x=xu(l,o);u&&x&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(u.node,u.offset),e.removeAllRanges(),f>o?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=l;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<n.length;l++)e=n[l],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var j0=p&&"documentMode"in document&&11>=document.documentMode,Kr=null,Ri=null,Ws=null,_i=!1;function vu(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_i||Kr==null||Kr!==Yt(o)||(o=Kr,"selectionStart"in o&&Ti(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ws&&Vs(Ws,o)||(Ws=o,o=Xl(Ri,"onSelect"),0<o.length&&(n=new ji("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Kr)))}function ql(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Yr={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionend:ql("Transition","TransitionEnd")},Ai={},ju={};p&&(ju=document.createElement("div").style,"AnimationEvent"in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),"TransitionEvent"in window||delete Yr.transitionend.transition);function Ql(e){if(Ai[e])return Ai[e];if(!Yr[e])return e;var n=Yr[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in ju)return Ai[e]=n[l];return e}var wu=Ql("animationend"),Nu=Ql("animationiteration"),bu=Ql("animationstart"),Su=Ql("transitionend"),Cu=new Map,Eu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function qn(e,n){Cu.set(e,n),d(n,[e])}for(var Pi=0;Pi<Eu.length;Pi++){var Li=Eu[Pi],w0=Li.toLowerCase(),N0=Li[0].toUpperCase()+Li.slice(1);qn(w0,"on"+N0)}qn(wu,"onAnimationEnd"),qn(Nu,"onAnimationIteration"),qn(bu,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(Su,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),b0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gs));function ku(e,n,l){var o=e.type||"unknown-event";e.currentTarget=l,Jt(o,n,void 0,e),e.currentTarget=null}function Tu(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],u=o.event;o=o.listeners;e:{var f=void 0;if(n)for(var x=o.length-1;0<=x;x--){var j=o[x],C=j.instance,L=j.currentTarget;if(j=j.listener,C!==f&&u.isPropagationStopped())break e;ku(u,j,L),f=C}else for(x=0;x<o.length;x++){if(j=o[x],C=j.instance,L=j.currentTarget,j=j.listener,C!==f&&u.isPropagationStopped())break e;ku(u,j,L),f=C}}}if(vr)throw e=$r,vr=!1,$r=null,e}function De(e,n){var l=n[zi];l===void 0&&(l=n[zi]=new Set);var o=e+"__bubble";l.has(o)||(Ru(n,e,2,!1),l.add(o))}function Oi(e,n,l){var o=0;n&&(o|=4),Ru(l,e,o,n)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function Ks(e){if(!e[Jl]){e[Jl]=!0,i.forEach(function(l){l!=="selectionchange"&&(b0.has(l)||Oi(l,!1,e),Oi(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Jl]||(n[Jl]=!0,Oi("selectionchange",!1,n))}}function Ru(e,n,l,o){switch(Xc(n)){case 1:var u=Dh;break;case 4:u=Fh;break;default:u=gi}l=u.bind(null,n,l,e),u=void 0,!Hr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(n,l,{capture:!0,passive:u}):e.addEventListener(n,l,!0):u!==void 0?e.addEventListener(n,l,{passive:u}):e.addEventListener(n,l,!1)}function Ii(e,n,l,o,u){var f=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var j=o.stateNode.containerInfo;if(j===u||j.nodeType===8&&j.parentNode===u)break;if(x===4)for(x=o.return;x!==null;){var C=x.tag;if((C===3||C===4)&&(C=x.stateNode.containerInfo,C===u||C.nodeType===8&&C.parentNode===u))return;x=x.return}for(;j!==null;){if(x=wr(j),x===null)return;if(C=x.tag,C===5||C===6){o=f=x;continue e}j=j.parentNode}}o=o.return}ks(function(){var L=f,H=Cs(l),V=[];e:{var z=Cu.get(e);if(z!==void 0){var X=ji,re=e;switch(e){case"keypress":if(Wl(l)===0)break e;case"keydown":case"keyup":X=Zh;break;case"focusin":re="focus",X=bi;break;case"focusout":re="blur",X=bi;break;case"beforeblur":case"afterblur":X=bi;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=zh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=n0;break;case wu:case Nu:case bu:X=Vh;break;case Su:X=s0;break;case"scroll":X=Uh;break;case"wheel":X=a0;break;case"copy":case"cut":case"paste":X=Gh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=ru}var le=(n&4)!==0,Ke=!le&&e==="scroll",A=le?z!==null?z+"Capture":null:z;le=[];for(var T=L,P;T!==null;){P=T;var G=P.stateNode;if(P.tag===5&&G!==null&&(P=G,A!==null&&(G=bn(T,A),G!=null&&le.push(Ys(T,G,P)))),Ke)break;T=T.return}0<le.length&&(z=new X(z,re,null,l,H),V.push({event:z,listeners:le}))}}if((n&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",z&&l!==yr&&(re=l.relatedTarget||l.fromElement)&&(wr(re)||re[Sn]))break e;if((X||z)&&(z=H.window===H?H:(z=H.ownerDocument)?z.defaultView||z.parentWindow:window,X?(re=l.relatedTarget||l.toElement,X=L,re=re?wr(re):null,re!==null&&(Ke=mn(re),re!==Ke||re.tag!==5&&re.tag!==6)&&(re=null)):(X=null,re=L),X!==re)){if(le=tu,G="onMouseLeave",A="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=ru,G="onPointerLeave",A="onPointerEnter",T="pointer"),Ke=X==null?z:Jr(X),P=re==null?z:Jr(re),z=new le(G,T+"leave",X,l,H),z.target=Ke,z.relatedTarget=P,G=null,wr(H)===L&&(le=new le(A,T+"enter",re,l,H),le.target=P,le.relatedTarget=Ke,G=le),Ke=G,X&&re)t:{for(le=X,A=re,T=0,P=le;P;P=qr(P))T++;for(P=0,G=A;G;G=qr(G))P++;for(;0<T-P;)le=qr(le),T--;for(;0<P-T;)A=qr(A),P--;for(;T--;){if(le===A||A!==null&&le===A.alternate)break t;le=qr(le),A=qr(A)}le=null}else le=null;X!==null&&_u(V,z,X,le,!1),re!==null&&Ke!==null&&_u(V,Ke,re,le,!0)}}e:{if(z=L?Jr(L):window,X=z.nodeName&&z.nodeName.toLowerCase(),X==="select"||X==="input"&&z.type==="file")var ae=f0;else if(cu(z))if(du)ae=g0;else{ae=p0;var de=h0}else(X=z.nodeName)&&X.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")&&(ae=x0);if(ae&&(ae=ae(e,L))){uu(V,ae,l,H);break e}de&&de(e,z,L),e==="focusout"&&(de=z._wrapperState)&&de.controlled&&z.type==="number"&&Mn(z,"number",z.value)}switch(de=L?Jr(L):window,e){case"focusin":(cu(de)||de.contentEditable==="true")&&(Kr=de,Ri=L,Ws=null);break;case"focusout":Ws=Ri=Kr=null;break;case"mousedown":_i=!0;break;case"contextmenu":case"mouseup":case"dragend":_i=!1,vu(V,l,H);break;case"selectionchange":if(j0)break;case"keydown":case"keyup":vu(V,l,H)}var me;if(Ci)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else Gr?iu(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(su&&l.locale!=="ko"&&(Gr||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&Gr&&(me=Zc()):(Yn=H,vi="value"in Yn?Yn.value:Yn.textContent,Gr=!0)),de=Xl(L,ye),0<de.length&&(ye=new nu(ye,e,null,l,H),V.push({event:ye,listeners:de}),me?ye.data=me:(me=ou(l),me!==null&&(ye.data=me)))),(me=o0?c0(e,l):u0(e,l))&&(L=Xl(L,"onBeforeInput"),0<L.length&&(H=new nu("onBeforeInput","beforeinput",null,l,H),V.push({event:H,listeners:L}),H.data=me))}Tu(V,n)})}function Ys(e,n,l){return{instance:e,listener:n,currentTarget:l}}function Xl(e,n){for(var l=n+"Capture",o=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=bn(e,l),f!=null&&o.unshift(Ys(e,f,u)),f=bn(e,n),f!=null&&o.push(Ys(e,f,u))),e=e.return}return o}function qr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _u(e,n,l,o,u){for(var f=n._reactName,x=[];l!==null&&l!==o;){var j=l,C=j.alternate,L=j.stateNode;if(C!==null&&C===o)break;j.tag===5&&L!==null&&(j=L,u?(C=bn(l,f),C!=null&&x.unshift(Ys(l,C,j))):u||(C=bn(l,f),C!=null&&x.push(Ys(l,C,j)))),l=l.return}x.length!==0&&e.push({event:n,listeners:x})}var S0=/\r\n?/g,C0=/\u0000|\uFFFD/g;function Au(e){return(typeof e=="string"?e:""+e).replace(S0,`
6
+ `).replace(C0,"")}function Zl(e,n,l){if(n=Au(n),Au(e)!==n&&l)throw Error(a(425))}function ea(){}var Mi=null,Di=null;function Fi(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ui=typeof setTimeout=="function"?setTimeout:void 0,E0=typeof clearTimeout=="function"?clearTimeout:void 0,Pu=typeof Promise=="function"?Promise:void 0,k0=typeof queueMicrotask=="function"?queueMicrotask:typeof Pu<"u"?function(e){return Pu.resolve(null).then(e).catch(T0)}:Ui;function T0(e){setTimeout(function(){throw e})}function Bi(e,n){var l=n,o=0;do{var u=l.nextSibling;if(e.removeChild(l),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(o===0){e.removeChild(u),Fs(n);return}o--}else l!=="$"&&l!=="$?"&&l!=="$!"||o++;l=u}while(l);Fs(n)}function Qn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Lu(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"){if(n===0)return e;n--}else l==="/$"&&n++}e=e.previousSibling}return null}var Qr=Math.random().toString(36).slice(2),fn="__reactFiber$"+Qr,qs="__reactProps$"+Qr,Sn="__reactContainer$"+Qr,zi="__reactEvents$"+Qr,R0="__reactListeners$"+Qr,_0="__reactHandles$"+Qr;function wr(e){var n=e[fn];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Sn]||l[fn]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=Lu(e);e!==null;){if(l=e[fn])return l;e=Lu(e)}return n}e=l,l=e.parentNode}return null}function Qs(e){return e=e[fn]||e[Sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function ta(e){return e[qs]||null}var Hi=[],Xr=-1;function Jn(e){return{current:e}}function Fe(e){0>Xr||(e.current=Hi[Xr],Hi[Xr]=null,Xr--)}function Me(e,n){Xr++,Hi[Xr]=e.current,e.current=n}var Xn={},ct=Jn(Xn),wt=Jn(!1),Nr=Xn;function Zr(e,n){var l=e.type.contextTypes;if(!l)return Xn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in l)u[f]=n[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function Nt(e){return e=e.childContextTypes,e!=null}function na(){Fe(wt),Fe(ct)}function Ou(e,n,l){if(ct.current!==Xn)throw Error(a(168));Me(ct,n),Me(wt,l)}function Iu(e,n,l){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return l;o=o.getChildContext();for(var u in o)if(!(u in n))throw Error(a(108,_e(e)||"Unknown",u));return K({},l,o)}function ra(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xn,Nr=ct.current,Me(ct,e),Me(wt,wt.current),!0}function Mu(e,n,l){var o=e.stateNode;if(!o)throw Error(a(169));l?(e=Iu(e,n,Nr),o.__reactInternalMemoizedMergedChildContext=e,Fe(wt),Fe(ct),Me(ct,e)):Fe(wt),Me(wt,l)}var Cn=null,sa=!1,$i=!1;function Du(e){Cn===null?Cn=[e]:Cn.push(e)}function A0(e){sa=!0,Du(e)}function Zn(){if(!$i&&Cn!==null){$i=!0;var e=0,n=Le;try{var l=Cn;for(Le=1;e<l.length;e++){var o=l[e];do o=o(!0);while(o!==null)}Cn=null,sa=!1}catch(u){throw Cn!==null&&(Cn=Cn.slice(e+1)),E(Ze,Zn),u}finally{Le=n,$i=!1}}return null}var es=[],ts=0,la=null,aa=0,Bt=[],zt=0,br=null,En=1,kn="";function Sr(e,n){es[ts++]=aa,es[ts++]=la,la=e,aa=n}function Fu(e,n,l){Bt[zt++]=En,Bt[zt++]=kn,Bt[zt++]=br,br=e;var o=En;e=kn;var u=32-Zt(o)-1;o&=~(1<<u),l+=1;var f=32-Zt(n)+u;if(30<f){var x=u-u%5;f=(o&(1<<x)-1).toString(32),o>>=x,u-=x,En=1<<32-Zt(n)+u|l<<u|o,kn=f+e}else En=1<<f|l<<u|o,kn=e}function Vi(e){e.return!==null&&(Sr(e,1),Fu(e,1,0))}function Wi(e){for(;e===la;)la=es[--ts],es[ts]=null,aa=es[--ts],es[ts]=null;for(;e===br;)br=Bt[--zt],Bt[zt]=null,kn=Bt[--zt],Bt[zt]=null,En=Bt[--zt],Bt[zt]=null}var Pt=null,Lt=null,Ue=!1,tn=null;function Uu(e,n){var l=Wt(5,null,null,0);l.elementType="DELETED",l.stateNode=n,l.return=e,n=e.deletions,n===null?(e.deletions=[l],e.flags|=16):n.push(l)}function Bu(e,n){switch(e.tag){case 5:var l=e.type;return n=n.nodeType!==1||l.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Pt=e,Lt=Qn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Pt=e,Lt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(l=br!==null?{id:En,overflow:kn}:null,e.memoizedState={dehydrated:n,treeContext:l,retryLane:1073741824},l=Wt(18,null,null,0),l.stateNode=n,l.return=e,e.child=l,Pt=e,Lt=null,!0):!1;default:return!1}}function Gi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ki(e){if(Ue){var n=Lt;if(n){var l=n;if(!Bu(e,n)){if(Gi(e))throw Error(a(418));n=Qn(l.nextSibling);var o=Pt;n&&Bu(e,n)?Uu(o,l):(e.flags=e.flags&-4097|2,Ue=!1,Pt=e)}}else{if(Gi(e))throw Error(a(418));e.flags=e.flags&-4097|2,Ue=!1,Pt=e}}}function zu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pt=e}function ia(e){if(e!==Pt)return!1;if(!Ue)return zu(e),Ue=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Fi(e.type,e.memoizedProps)),n&&(n=Lt)){if(Gi(e))throw Hu(),Error(a(418));for(;n;)Uu(e,n),n=Qn(n.nextSibling)}if(zu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"){if(n===0){Lt=Qn(e.nextSibling);break e}n--}else l!=="$"&&l!=="$!"&&l!=="$?"||n++}e=e.nextSibling}Lt=null}}else Lt=Pt?Qn(e.stateNode.nextSibling):null;return!0}function Hu(){for(var e=Lt;e;)e=Qn(e.nextSibling)}function ns(){Lt=Pt=null,Ue=!1}function Yi(e){tn===null?tn=[e]:tn.push(e)}var P0=U.ReactCurrentBatchConfig;function Js(e,n,l){if(e=l.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(a(309));var o=l.stateNode}if(!o)throw Error(a(147,e));var u=o,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var j=u.refs;x===null?delete j[f]:j[f]=x},n._stringRef=f,n)}if(typeof e!="string")throw Error(a(284));if(!l._owner)throw Error(a(290,e))}return e}function oa(e,n){throw e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function $u(e){var n=e._init;return n(e._payload)}function Vu(e){function n(A,T){if(e){var P=A.deletions;P===null?(A.deletions=[T],A.flags|=16):P.push(T)}}function l(A,T){if(!e)return null;for(;T!==null;)n(A,T),T=T.sibling;return null}function o(A,T){for(A=new Map;T!==null;)T.key!==null?A.set(T.key,T):A.set(T.index,T),T=T.sibling;return A}function u(A,T){return A=ir(A,T),A.index=0,A.sibling=null,A}function f(A,T,P){return A.index=P,e?(P=A.alternate,P!==null?(P=P.index,P<T?(A.flags|=2,T):P):(A.flags|=2,T)):(A.flags|=1048576,T)}function x(A){return e&&A.alternate===null&&(A.flags|=2),A}function j(A,T,P,G){return T===null||T.tag!==6?(T=Bo(P,A.mode,G),T.return=A,T):(T=u(T,P),T.return=A,T)}function C(A,T,P,G){var ae=P.type;return ae===$?H(A,T,P.props.children,G,P.key):T!==null&&(T.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Q&&$u(ae)===T.type)?(G=u(T,P.props),G.ref=Js(A,T,P),G.return=A,G):(G=Pa(P.type,P.key,P.props,null,A.mode,G),G.ref=Js(A,T,P),G.return=A,G)}function L(A,T,P,G){return T===null||T.tag!==4||T.stateNode.containerInfo!==P.containerInfo||T.stateNode.implementation!==P.implementation?(T=zo(P,A.mode,G),T.return=A,T):(T=u(T,P.children||[]),T.return=A,T)}function H(A,T,P,G,ae){return T===null||T.tag!==7?(T=Pr(P,A.mode,G,ae),T.return=A,T):(T=u(T,P),T.return=A,T)}function V(A,T,P){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Bo(""+T,A.mode,P),T.return=A,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case q:return P=Pa(T.type,T.key,T.props,null,A.mode,P),P.ref=Js(A,null,T),P.return=A,P;case he:return T=zo(T,A.mode,P),T.return=A,T;case Q:var G=T._init;return V(A,G(T._payload),P)}if(un(T)||Y(T))return T=Pr(T,A.mode,P,null),T.return=A,T;oa(A,T)}return null}function z(A,T,P,G){var ae=T!==null?T.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return ae!==null?null:j(A,T,""+P,G);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case q:return P.key===ae?C(A,T,P,G):null;case he:return P.key===ae?L(A,T,P,G):null;case Q:return ae=P._init,z(A,T,ae(P._payload),G)}if(un(P)||Y(P))return ae!==null?null:H(A,T,P,G,null);oa(A,P)}return null}function X(A,T,P,G,ae){if(typeof G=="string"&&G!==""||typeof G=="number")return A=A.get(P)||null,j(T,A,""+G,ae);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case q:return A=A.get(G.key===null?P:G.key)||null,C(T,A,G,ae);case he:return A=A.get(G.key===null?P:G.key)||null,L(T,A,G,ae);case Q:var de=G._init;return X(A,T,P,de(G._payload),ae)}if(un(G)||Y(G))return A=A.get(P)||null,H(T,A,G,ae,null);oa(T,G)}return null}function re(A,T,P,G){for(var ae=null,de=null,me=T,ye=T=0,nt=null;me!==null&&ye<P.length;ye++){me.index>ye?(nt=me,me=null):nt=me.sibling;var Pe=z(A,me,P[ye],G);if(Pe===null){me===null&&(me=nt);break}e&&me&&Pe.alternate===null&&n(A,me),T=f(Pe,T,ye),de===null?ae=Pe:de.sibling=Pe,de=Pe,me=nt}if(ye===P.length)return l(A,me),Ue&&Sr(A,ye),ae;if(me===null){for(;ye<P.length;ye++)me=V(A,P[ye],G),me!==null&&(T=f(me,T,ye),de===null?ae=me:de.sibling=me,de=me);return Ue&&Sr(A,ye),ae}for(me=o(A,me);ye<P.length;ye++)nt=X(me,A,ye,P[ye],G),nt!==null&&(e&&nt.alternate!==null&&me.delete(nt.key===null?ye:nt.key),T=f(nt,T,ye),de===null?ae=nt:de.sibling=nt,de=nt);return e&&me.forEach(function(or){return n(A,or)}),Ue&&Sr(A,ye),ae}function le(A,T,P,G){var ae=Y(P);if(typeof ae!="function")throw Error(a(150));if(P=ae.call(P),P==null)throw Error(a(151));for(var de=ae=null,me=T,ye=T=0,nt=null,Pe=P.next();me!==null&&!Pe.done;ye++,Pe=P.next()){me.index>ye?(nt=me,me=null):nt=me.sibling;var or=z(A,me,Pe.value,G);if(or===null){me===null&&(me=nt);break}e&&me&&or.alternate===null&&n(A,me),T=f(or,T,ye),de===null?ae=or:de.sibling=or,de=or,me=nt}if(Pe.done)return l(A,me),Ue&&Sr(A,ye),ae;if(me===null){for(;!Pe.done;ye++,Pe=P.next())Pe=V(A,Pe.value,G),Pe!==null&&(T=f(Pe,T,ye),de===null?ae=Pe:de.sibling=Pe,de=Pe);return Ue&&Sr(A,ye),ae}for(me=o(A,me);!Pe.done;ye++,Pe=P.next())Pe=X(me,A,ye,Pe.value,G),Pe!==null&&(e&&Pe.alternate!==null&&me.delete(Pe.key===null?ye:Pe.key),T=f(Pe,T,ye),de===null?ae=Pe:de.sibling=Pe,de=Pe);return e&&me.forEach(function(dp){return n(A,dp)}),Ue&&Sr(A,ye),ae}function Ke(A,T,P,G){if(typeof P=="object"&&P!==null&&P.type===$&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case q:e:{for(var ae=P.key,de=T;de!==null;){if(de.key===ae){if(ae=P.type,ae===$){if(de.tag===7){l(A,de.sibling),T=u(de,P.props.children),T.return=A,A=T;break e}}else if(de.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Q&&$u(ae)===de.type){l(A,de.sibling),T=u(de,P.props),T.ref=Js(A,de,P),T.return=A,A=T;break e}l(A,de);break}else n(A,de);de=de.sibling}P.type===$?(T=Pr(P.props.children,A.mode,G,P.key),T.return=A,A=T):(G=Pa(P.type,P.key,P.props,null,A.mode,G),G.ref=Js(A,T,P),G.return=A,A=G)}return x(A);case he:e:{for(de=P.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===P.containerInfo&&T.stateNode.implementation===P.implementation){l(A,T.sibling),T=u(T,P.children||[]),T.return=A,A=T;break e}else{l(A,T);break}else n(A,T);T=T.sibling}T=zo(P,A.mode,G),T.return=A,A=T}return x(A);case Q:return de=P._init,Ke(A,T,de(P._payload),G)}if(un(P))return re(A,T,P,G);if(Y(P))return le(A,T,P,G);oa(A,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,T!==null&&T.tag===6?(l(A,T.sibling),T=u(T,P),T.return=A,A=T):(l(A,T),T=Bo(P,A.mode,G),T.return=A,A=T),x(A)):l(A,T)}return Ke}var rs=Vu(!0),Wu=Vu(!1),ca=Jn(null),ua=null,ss=null,qi=null;function Qi(){qi=ss=ua=null}function Ji(e){var n=ca.current;Fe(ca),e._currentValue=n}function Xi(e,n,l){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===l)break;e=e.return}}function ls(e,n){ua=e,qi=ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(bt=!0),e.firstContext=null)}function Ht(e){var n=e._currentValue;if(qi!==e)if(e={context:e,memoizedValue:n,next:null},ss===null){if(ua===null)throw Error(a(308));ss=e,ua.dependencies={lanes:0,firstContext:e}}else ss=ss.next=e;return n}var Cr=null;function Zi(e){Cr===null?Cr=[e]:Cr.push(e)}function Gu(e,n,l,o){var u=n.interleaved;return u===null?(l.next=l,Zi(n)):(l.next=u.next,u.next=l),n.interleaved=l,Tn(e,o)}function Tn(e,n){e.lanes|=n;var l=e.alternate;for(l!==null&&(l.lanes|=n),l=e,e=e.return;e!==null;)e.childLanes|=n,l=e.alternate,l!==null&&(l.childLanes|=n),l=e,e=e.return;return l.tag===3?l.stateNode:null}var er=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ku(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function tr(e,n,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,Tn(e,l)}return u=o.interleaved,u===null?(n.next=n,Zi(o)):(n.next=u.next,u.next=n),o.interleaved=n,Tn(e,l)}function da(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,hi(e,l)}}function Yu(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var u=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};f===null?u=f=x:f=f.next=x,l=l.next}while(l!==null);f===null?u=f=n:f=f.next=n}else u=f=n;l={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}function ma(e,n,l,o){var u=e.updateQueue;er=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var C=j,L=C.next;C.next=null,x===null?f=L:x.next=L,x=C;var H=e.alternate;H!==null&&(H=H.updateQueue,j=H.lastBaseUpdate,j!==x&&(j===null?H.firstBaseUpdate=L:j.next=L,H.lastBaseUpdate=C))}if(f!==null){var V=u.baseState;x=0,H=L=C=null,j=f;do{var z=j.lane,X=j.eventTime;if((o&z)===z){H!==null&&(H=H.next={eventTime:X,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var re=e,le=j;switch(z=n,X=l,le.tag){case 1:if(re=le.payload,typeof re=="function"){V=re.call(X,V,z);break e}V=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=le.payload,z=typeof re=="function"?re.call(X,V,z):re,z==null)break e;V=K({},V,z);break e;case 2:er=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,z=u.effects,z===null?u.effects=[j]:z.push(j))}else X={eventTime:X,lane:z,tag:j.tag,payload:j.payload,callback:j.callback,next:null},H===null?(L=H=X,C=V):H=H.next=X,x|=z;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;z=j,j=z.next,z.next=null,u.lastBaseUpdate=z,u.shared.pending=null}}while(!0);if(H===null&&(C=V),u.baseState=C,u.firstBaseUpdate=L,u.lastBaseUpdate=H,n=u.shared.interleaved,n!==null){u=n;do x|=u.lane,u=u.next;while(u!==n)}else f===null&&(u.shared.lanes=0);Tr|=x,e.lanes=x,e.memoizedState=V}}function qu(e,n,l){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],u=o.callback;if(u!==null){if(o.callback=null,o=l,typeof u!="function")throw Error(a(191,u));u.call(o)}}}var Xs={},hn=Jn(Xs),Zs=Jn(Xs),el=Jn(Xs);function Er(e){if(e===Xs)throw Error(a(174));return e}function to(e,n){switch(Me(el,n),Me(Zs,e),Me(hn,Xs),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:jt(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=jt(n,e)}Fe(hn),Me(hn,n)}function as(){Fe(hn),Fe(Zs),Fe(el)}function Qu(e){Er(el.current);var n=Er(hn.current),l=jt(n,e.type);n!==l&&(Me(Zs,e),Me(hn,l))}function no(e){Zs.current===e&&(Fe(hn),Fe(Zs))}var ze=Jn(0);function fa(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ro=[];function so(){for(var e=0;e<ro.length;e++)ro[e]._workInProgressVersionPrimary=null;ro.length=0}var ha=U.ReactCurrentDispatcher,lo=U.ReactCurrentBatchConfig,kr=0,He=null,Je=null,et=null,pa=!1,tl=!1,nl=0,L0=0;function ut(){throw Error(a(321))}function ao(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!en(e[l],n[l]))return!1;return!0}function io(e,n,l,o,u,f){if(kr=f,He=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ha.current=e===null||e.memoizedState===null?D0:F0,e=l(o,u),tl){f=0;do{if(tl=!1,nl=0,25<=f)throw Error(a(301));f+=1,et=Je=null,n.updateQueue=null,ha.current=U0,e=l(o,u)}while(tl)}if(ha.current=ya,n=Je!==null&&Je.next!==null,kr=0,et=Je=He=null,pa=!1,n)throw Error(a(300));return e}function oo(){var e=nl!==0;return nl=0,e}function pn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?He.memoizedState=et=e:et=et.next=e,et}function $t(){if(Je===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var n=et===null?He.memoizedState:et.next;if(n!==null)et=n,Je=e;else{if(e===null)throw Error(a(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},et===null?He.memoizedState=et=e:et=et.next=e}return et}function rl(e,n){return typeof n=="function"?n(e):n}function co(e){var n=$t(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var o=Je,u=o.baseQueue,f=l.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}o.baseQueue=u=f,l.pending=null}if(u!==null){f=u.next,o=o.baseState;var j=x=null,C=null,L=f;do{var H=L.lane;if((kr&H)===H)C!==null&&(C=C.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),o=L.hasEagerState?L.eagerState:e(o,L.action);else{var V={lane:H,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};C===null?(j=C=V,x=o):C=C.next=V,He.lanes|=H,Tr|=H}L=L.next}while(L!==null&&L!==f);C===null?x=o:C.next=j,en(o,n.memoizedState)||(bt=!0),n.memoizedState=o,n.baseState=x,n.baseQueue=C,l.lastRenderedState=o}if(e=l.interleaved,e!==null){u=e;do f=u.lane,He.lanes|=f,Tr|=f,u=u.next;while(u!==e)}else u===null&&(l.lanes=0);return[n.memoizedState,l.dispatch]}function uo(e){var n=$t(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var o=l.dispatch,u=l.pending,f=n.memoizedState;if(u!==null){l.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);en(f,n.memoizedState)||(bt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),l.lastRenderedState=f}return[f,o]}function Ju(){}function Xu(e,n){var l=He,o=$t(),u=n(),f=!en(o.memoizedState,u);if(f&&(o.memoizedState=u,bt=!0),o=o.queue,mo(td.bind(null,l,o,e),[e]),o.getSnapshot!==n||f||et!==null&&et.memoizedState.tag&1){if(l.flags|=2048,sl(9,ed.bind(null,l,o,u,n),void 0,null),tt===null)throw Error(a(349));(kr&30)!==0||Zu(l,n,u)}return u}function Zu(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=He.updateQueue,n===null?(n={lastEffect:null,stores:null},He.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function ed(e,n,l,o){n.value=l,n.getSnapshot=o,nd(n)&&rd(e)}function td(e,n,l){return l(function(){nd(n)&&rd(e)})}function nd(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!en(e,l)}catch{return!0}}function rd(e){var n=Tn(e,1);n!==null&&ln(n,e,1,-1)}function sd(e){var n=pn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rl,lastRenderedState:e},n.queue=e,e=e.dispatch=M0.bind(null,He,e),[n.memoizedState,e]}function sl(e,n,l,o){return e={tag:e,create:n,destroy:l,deps:o,next:null},n=He.updateQueue,n===null?(n={lastEffect:null,stores:null},He.updateQueue=n,n.lastEffect=e.next=e):(l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e)),e}function ld(){return $t().memoizedState}function xa(e,n,l,o){var u=pn();He.flags|=e,u.memoizedState=sl(1|n,l,void 0,o===void 0?null:o)}function ga(e,n,l,o){var u=$t();o=o===void 0?null:o;var f=void 0;if(Je!==null){var x=Je.memoizedState;if(f=x.destroy,o!==null&&ao(o,x.deps)){u.memoizedState=sl(n,l,f,o);return}}He.flags|=e,u.memoizedState=sl(1|n,l,f,o)}function ad(e,n){return xa(8390656,8,e,n)}function mo(e,n){return ga(2048,8,e,n)}function id(e,n){return ga(4,2,e,n)}function od(e,n){return ga(4,4,e,n)}function cd(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function ud(e,n,l){return l=l!=null?l.concat([e]):null,ga(4,4,cd.bind(null,n,e),l)}function fo(){}function dd(e,n){var l=$t();n=n===void 0?null:n;var o=l.memoizedState;return o!==null&&n!==null&&ao(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function md(e,n){var l=$t();n=n===void 0?null:n;var o=l.memoizedState;return o!==null&&n!==null&&ao(n,o[1])?o[0]:(e=e(),l.memoizedState=[e,n],e)}function fd(e,n,l){return(kr&21)===0?(e.baseState&&(e.baseState=!1,bt=!0),e.memoizedState=l):(en(l,n)||(l=$c(),He.lanes|=l,Tr|=l,e.baseState=!0),n)}function O0(e,n){var l=Le;Le=l!==0&&4>l?l:4,e(!0);var o=lo.transition;lo.transition={};try{e(!1),n()}finally{Le=l,lo.transition=o}}function hd(){return $t().memoizedState}function I0(e,n,l){var o=lr(e);if(l={lane:o,action:l,hasEagerState:!1,eagerState:null,next:null},pd(e))xd(n,l);else if(l=Gu(e,n,l,o),l!==null){var u=xt();ln(l,e,o,u),gd(l,n,o)}}function M0(e,n,l){var o=lr(e),u={lane:o,action:l,hasEagerState:!1,eagerState:null,next:null};if(pd(e))xd(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,j=f(x,l);if(u.hasEagerState=!0,u.eagerState=j,en(j,x)){var C=n.interleaved;C===null?(u.next=u,Zi(n)):(u.next=C.next,C.next=u),n.interleaved=u;return}}catch{}l=Gu(e,n,u,o),l!==null&&(u=xt(),ln(l,e,o,u),gd(l,n,o))}}function pd(e){var n=e.alternate;return e===He||n!==null&&n===He}function xd(e,n){tl=pa=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function gd(e,n,l){if((l&4194240)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,hi(e,l)}}var ya={readContext:Ht,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},D0={readContext:Ht,useCallback:function(e,n){return pn().memoizedState=[e,n===void 0?null:n],e},useContext:Ht,useEffect:ad,useImperativeHandle:function(e,n,l){return l=l!=null?l.concat([e]):null,xa(4194308,4,cd.bind(null,n,e),l)},useLayoutEffect:function(e,n){return xa(4194308,4,e,n)},useInsertionEffect:function(e,n){return xa(4,2,e,n)},useMemo:function(e,n){var l=pn();return n=n===void 0?null:n,e=e(),l.memoizedState=[e,n],e},useReducer:function(e,n,l){var o=pn();return n=l!==void 0?l(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=I0.bind(null,He,e),[o.memoizedState,e]},useRef:function(e){var n=pn();return e={current:e},n.memoizedState=e},useState:sd,useDebugValue:fo,useDeferredValue:function(e){return pn().memoizedState=e},useTransition:function(){var e=sd(!1),n=e[0];return e=O0.bind(null,e[1]),pn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,l){var o=He,u=pn();if(Ue){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),tt===null)throw Error(a(349));(kr&30)!==0||Zu(o,n,l)}u.memoizedState=l;var f={value:l,getSnapshot:n};return u.queue=f,ad(td.bind(null,o,f,e),[e]),o.flags|=2048,sl(9,ed.bind(null,o,f,l,n),void 0,null),l},useId:function(){var e=pn(),n=tt.identifierPrefix;if(Ue){var l=kn,o=En;l=(o&~(1<<32-Zt(o)-1)).toString(32)+l,n=":"+n+"R"+l,l=nl++,0<l&&(n+="H"+l.toString(32)),n+=":"}else l=L0++,n=":"+n+"r"+l.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},F0={readContext:Ht,useCallback:dd,useContext:Ht,useEffect:mo,useImperativeHandle:ud,useInsertionEffect:id,useLayoutEffect:od,useMemo:md,useReducer:co,useRef:ld,useState:function(){return co(rl)},useDebugValue:fo,useDeferredValue:function(e){var n=$t();return fd(n,Je.memoizedState,e)},useTransition:function(){var e=co(rl)[0],n=$t().memoizedState;return[e,n]},useMutableSource:Ju,useSyncExternalStore:Xu,useId:hd,unstable_isNewReconciler:!1},U0={readContext:Ht,useCallback:dd,useContext:Ht,useEffect:mo,useImperativeHandle:ud,useInsertionEffect:id,useLayoutEffect:od,useMemo:md,useReducer:uo,useRef:ld,useState:function(){return uo(rl)},useDebugValue:fo,useDeferredValue:function(e){var n=$t();return Je===null?n.memoizedState=e:fd(n,Je.memoizedState,e)},useTransition:function(){var e=uo(rl)[0],n=$t().memoizedState;return[e,n]},useMutableSource:Ju,useSyncExternalStore:Xu,useId:hd,unstable_isNewReconciler:!1};function nn(e,n){if(e&&e.defaultProps){n=K({},n),e=e.defaultProps;for(var l in e)n[l]===void 0&&(n[l]=e[l]);return n}return n}function ho(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:K({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var va={isMounted:function(e){return(e=e._reactInternals)?mn(e)===e:!1},enqueueSetState:function(e,n,l){e=e._reactInternals;var o=xt(),u=lr(e),f=Rn(o,u);f.payload=n,l!=null&&(f.callback=l),n=tr(e,f,u),n!==null&&(ln(n,e,u,o),da(n,e,u))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=xt(),u=lr(e),f=Rn(o,u);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=tr(e,f,u),n!==null&&(ln(n,e,u,o),da(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=xt(),o=lr(e),u=Rn(l,o);u.tag=2,n!=null&&(u.callback=n),n=tr(e,u,o),n!==null&&(ln(n,e,o,l),da(n,e,o))}};function yd(e,n,l,o,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,x):n.prototype&&n.prototype.isPureReactComponent?!Vs(l,o)||!Vs(u,f):!0}function vd(e,n,l){var o=!1,u=Xn,f=n.contextType;return typeof f=="object"&&f!==null?f=Ht(f):(u=Nt(n)?Nr:ct.current,o=n.contextTypes,f=(o=o!=null)?Zr(e,u):Xn),n=new n(l,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=va,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function jd(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&va.enqueueReplaceState(n,n.state,null)}function po(e,n,l,o){var u=e.stateNode;u.props=l,u.state=e.memoizedState,u.refs={},eo(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=Ht(f):(f=Nt(n)?Nr:ct.current,u.context=Zr(e,f)),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(ho(e,n,f,l),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&va.enqueueReplaceState(u,u.state,null),ma(e,l,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function is(e,n){try{var l="",o=n;do l+=ne(o),o=o.return;while(o);var u=l}catch(f){u=`
7
+ Error generating stack: `+f.message+`
8
+ `+f.stack}return{value:e,source:n,stack:u,digest:null}}function xo(e,n,l){return{value:e,source:null,stack:l??null,digest:n??null}}function go(e,n){try{console.error(n.value)}catch(l){setTimeout(function(){throw l})}}var B0=typeof WeakMap=="function"?WeakMap:Map;function wd(e,n,l){l=Rn(-1,l),l.tag=3,l.payload={element:null};var o=n.value;return l.callback=function(){Ea||(Ea=!0,Po=o),go(e,n)},l}function Nd(e,n,l){l=Rn(-1,l),l.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=n.value;l.payload=function(){return o(u)},l.callback=function(){go(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(l.callback=function(){go(e,n),typeof o!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),l}function bd(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new B0;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(l)||(u.add(l),e=ep.bind(null,e,n,l),n.then(e,e))}function Sd(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Cd(e,n,l,o,u){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(n=Rn(-1,1),n.tag=2,tr(l,n,1))),l.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var z0=U.ReactCurrentOwner,bt=!1;function pt(e,n,l,o){n.child=e===null?Wu(n,null,l,o):rs(n,e.child,l,o)}function Ed(e,n,l,o,u){l=l.render;var f=n.ref;return ls(n,u),o=io(e,n,l,o,f,u),l=oo(),e!==null&&!bt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,_n(e,n,u)):(Ue&&l&&Vi(n),n.flags|=1,pt(e,n,o,u),n.child)}function kd(e,n,l,o,u){if(e===null){var f=l.type;return typeof f=="function"&&!Uo(f)&&f.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(n.tag=15,n.type=f,Td(e,n,f,o,u)):(e=Pa(l.type,null,o,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&u)===0){var x=f.memoizedProps;if(l=l.compare,l=l!==null?l:Vs,l(x,o)&&e.ref===n.ref)return _n(e,n,u)}return n.flags|=1,e=ir(f,o),e.ref=n.ref,e.return=n,n.child=e}function Td(e,n,l,o,u){if(e!==null){var f=e.memoizedProps;if(Vs(f,o)&&e.ref===n.ref)if(bt=!1,n.pendingProps=o=f,(e.lanes&u)!==0)(e.flags&131072)!==0&&(bt=!0);else return n.lanes=e.lanes,_n(e,n,u)}return yo(e,n,l,o,u)}function Rd(e,n,l){var o=n.pendingProps,u=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(cs,Ot),Ot|=l;else{if((l&1073741824)===0)return e=f!==null?f.baseLanes|l:l,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Me(cs,Ot),Ot|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:l,Me(cs,Ot),Ot|=o}else f!==null?(o=f.baseLanes|l,n.memoizedState=null):o=l,Me(cs,Ot),Ot|=o;return pt(e,n,u,l),n.child}function _d(e,n){var l=n.ref;(e===null&&l!==null||e!==null&&e.ref!==l)&&(n.flags|=512,n.flags|=2097152)}function yo(e,n,l,o,u){var f=Nt(l)?Nr:ct.current;return f=Zr(n,f),ls(n,u),l=io(e,n,l,o,f,u),o=oo(),e!==null&&!bt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,_n(e,n,u)):(Ue&&o&&Vi(n),n.flags|=1,pt(e,n,l,u),n.child)}function Ad(e,n,l,o,u){if(Nt(l)){var f=!0;ra(n)}else f=!1;if(ls(n,u),n.stateNode===null)wa(e,n),vd(n,l,o),po(n,l,o,u),o=!0;else if(e===null){var x=n.stateNode,j=n.memoizedProps;x.props=j;var C=x.context,L=l.contextType;typeof L=="object"&&L!==null?L=Ht(L):(L=Nt(l)?Nr:ct.current,L=Zr(n,L));var H=l.getDerivedStateFromProps,V=typeof H=="function"||typeof x.getSnapshotBeforeUpdate=="function";V||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==o||C!==L)&&jd(n,x,o,L),er=!1;var z=n.memoizedState;x.state=z,ma(n,o,x,u),C=n.memoizedState,j!==o||z!==C||wt.current||er?(typeof H=="function"&&(ho(n,l,H,o),C=n.memoizedState),(j=er||yd(n,l,j,o,z,C,L))?(V||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=C),x.props=o,x.state=C,x.context=L,o=j):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{x=n.stateNode,Ku(e,n),j=n.memoizedProps,L=n.type===n.elementType?j:nn(n.type,j),x.props=L,V=n.pendingProps,z=x.context,C=l.contextType,typeof C=="object"&&C!==null?C=Ht(C):(C=Nt(l)?Nr:ct.current,C=Zr(n,C));var X=l.getDerivedStateFromProps;(H=typeof X=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==V||z!==C)&&jd(n,x,o,C),er=!1,z=n.memoizedState,x.state=z,ma(n,o,x,u);var re=n.memoizedState;j!==V||z!==re||wt.current||er?(typeof X=="function"&&(ho(n,l,X,o),re=n.memoizedState),(L=er||yd(n,l,L,o,z,re,C)||!1)?(H||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(o,re,C),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(o,re,C)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=re),x.props=o,x.state=re,x.context=C,o=L):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&z===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&z===e.memoizedState||(n.flags|=1024),o=!1)}return vo(e,n,l,o,f,u)}function vo(e,n,l,o,u,f){_d(e,n);var x=(n.flags&128)!==0;if(!o&&!x)return u&&Mu(n,l,!1),_n(e,n,f);o=n.stateNode,z0.current=n;var j=x&&typeof l.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&x?(n.child=rs(n,e.child,null,f),n.child=rs(n,null,j,f)):pt(e,n,j,f),n.memoizedState=o.state,u&&Mu(n,l,!0),n.child}function Pd(e){var n=e.stateNode;n.pendingContext?Ou(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Ou(e,n.context,!1),to(e,n.containerInfo)}function Ld(e,n,l,o,u){return ns(),Yi(u),n.flags|=256,pt(e,n,l,o),n.child}var jo={dehydrated:null,treeContext:null,retryLane:0};function wo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Od(e,n,l){var o=n.pendingProps,u=ze.current,f=!1,x=(n.flags&128)!==0,j;if((j=x)||(j=e!==null&&e.memoizedState===null?!1:(u&2)!==0),j?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Me(ze,u&1),e===null)return Ki(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=o.children,e=o.fallback,f?(o=n.mode,f=n.child,x={mode:"hidden",children:x},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=La(x,o,0,null),e=Pr(e,o,l,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=wo(l),n.memoizedState=jo,e):No(n,x));if(u=e.memoizedState,u!==null&&(j=u.dehydrated,j!==null))return H0(e,n,x,o,j,u,l);if(f){f=o.fallback,x=n.mode,u=e.child,j=u.sibling;var C={mode:"hidden",children:o.children};return(x&1)===0&&n.child!==u?(o=n.child,o.childLanes=0,o.pendingProps=C,n.deletions=null):(o=ir(u,C),o.subtreeFlags=u.subtreeFlags&14680064),j!==null?f=ir(j,f):(f=Pr(f,x,l,null),f.flags|=2),f.return=n,o.return=n,o.sibling=f,n.child=o,o=f,f=n.child,x=e.child.memoizedState,x=x===null?wo(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~l,n.memoizedState=jo,o}return f=e.child,e=f.sibling,o=ir(f,{mode:"visible",children:o.children}),(n.mode&1)===0&&(o.lanes=l),o.return=n,o.sibling=null,e!==null&&(l=n.deletions,l===null?(n.deletions=[e],n.flags|=16):l.push(e)),n.child=o,n.memoizedState=null,o}function No(e,n){return n=La({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function ja(e,n,l,o){return o!==null&&Yi(o),rs(n,e.child,null,l),e=No(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function H0(e,n,l,o,u,f,x){if(l)return n.flags&256?(n.flags&=-257,o=xo(Error(a(422))),ja(e,n,x,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=o.fallback,u=n.mode,o=La({mode:"visible",children:o.children},u,0,null),f=Pr(f,u,x,null),f.flags|=2,o.return=n,f.return=n,o.sibling=f,n.child=o,(n.mode&1)!==0&&rs(n,e.child,null,x),n.child.memoizedState=wo(x),n.memoizedState=jo,f);if((n.mode&1)===0)return ja(e,n,x,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var j=o.dgst;return o=j,f=Error(a(419)),o=xo(f,o,void 0),ja(e,n,x,o)}if(j=(x&e.childLanes)!==0,bt||j){if(o=tt,o!==null){switch(x&-x){case 4:u=2;break;case 16:u=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|x))!==0?0:u,u!==0&&u!==f.retryLane&&(f.retryLane=u,Tn(e,u),ln(o,e,u,-1))}return Fo(),o=xo(Error(a(421))),ja(e,n,x,o)}return u.data==="$?"?(n.flags|=128,n.child=e.child,n=tp.bind(null,e),u._reactRetry=n,null):(e=f.treeContext,Lt=Qn(u.nextSibling),Pt=n,Ue=!0,tn=null,e!==null&&(Bt[zt++]=En,Bt[zt++]=kn,Bt[zt++]=br,En=e.id,kn=e.overflow,br=n),n=No(n,o.children),n.flags|=4096,n)}function Id(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Xi(e.return,n,l)}function bo(e,n,l,o,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:u}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=l,f.tailMode=u)}function Md(e,n,l){var o=n.pendingProps,u=o.revealOrder,f=o.tail;if(pt(e,n,o.children,l),o=ze.current,(o&2)!==0)o=o&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Id(e,l,n);else if(e.tag===19)Id(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Me(ze,o),(n.mode&1)===0)n.memoizedState=null;else switch(u){case"forwards":for(l=n.child,u=null;l!==null;)e=l.alternate,e!==null&&fa(e)===null&&(u=l),l=l.sibling;l=u,l===null?(u=n.child,n.child=null):(u=l.sibling,l.sibling=null),bo(n,!1,u,l,f);break;case"backwards":for(l=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&fa(e)===null){n.child=u;break}e=u.sibling,u.sibling=l,l=u,u=e}bo(n,!0,l,null,f);break;case"together":bo(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function wa(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function _n(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Tr|=n.lanes,(l&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,l=ir(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=ir(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function $0(e,n,l){switch(n.tag){case 3:Pd(n),ns();break;case 5:Qu(n);break;case 1:Nt(n.type)&&ra(n);break;case 4:to(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,u=n.memoizedProps.value;Me(ca,o._currentValue),o._currentValue=u;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(Me(ze,ze.current&1),n.flags|=128,null):(l&n.child.childLanes)!==0?Od(e,n,l):(Me(ze,ze.current&1),e=_n(e,n,l),e!==null?e.sibling:null);Me(ze,ze.current&1);break;case 19:if(o=(l&n.childLanes)!==0,(e.flags&128)!==0){if(o)return Md(e,n,l);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Me(ze,ze.current),o)break;return null;case 22:case 23:return n.lanes=0,Rd(e,n,l)}return _n(e,n,l)}var Dd,So,Fd,Ud;Dd=function(e,n){for(var l=n.child;l!==null;){if(l.tag===5||l.tag===6)e.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===n)break;for(;l.sibling===null;){if(l.return===null||l.return===n)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},So=function(){},Fd=function(e,n,l,o){var u=e.memoizedProps;if(u!==o){e=n.stateNode,Er(hn.current);var f=null;switch(l){case"input":u=In(e,u),o=In(e,o),f=[];break;case"select":u=K({},u,{value:void 0}),o=K({},o,{value:void 0}),f=[];break;case"textarea":u=Br(e,u),o=Br(e,o),f=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=ea)}dn(l,o);var x;l=null;for(L in u)if(!o.hasOwnProperty(L)&&u.hasOwnProperty(L)&&u[L]!=null)if(L==="style"){var j=u[L];for(x in j)j.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(c.hasOwnProperty(L)?f||(f=[]):(f=f||[]).push(L,null));for(L in o){var C=o[L];if(j=u?.[L],o.hasOwnProperty(L)&&C!==j&&(C!=null||j!=null))if(L==="style")if(j){for(x in j)!j.hasOwnProperty(x)||C&&C.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in C)C.hasOwnProperty(x)&&j[x]!==C[x]&&(l||(l={}),l[x]=C[x])}else l||(f||(f=[]),f.push(L,l)),l=C;else L==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,j=j?j.__html:void 0,C!=null&&j!==C&&(f=f||[]).push(L,C)):L==="children"?typeof C!="string"&&typeof C!="number"||(f=f||[]).push(L,""+C):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(c.hasOwnProperty(L)?(C!=null&&L==="onScroll"&&De("scroll",e),f||j===C||(f=[])):(f=f||[]).push(L,C))}l&&(f=f||[]).push("style",l);var L=f;(n.updateQueue=L)&&(n.flags|=4)}},Ud=function(e,n,l,o){l!==o&&(n.flags|=4)};function ll(e,n){if(!Ue)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function dt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(n)for(var u=e.child;u!==null;)l|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)l|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function V0(e,n,l){var o=n.pendingProps;switch(Wi(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return Nt(n.type)&&na(),dt(n),null;case 3:return o=n.stateNode,as(),Fe(wt),Fe(ct),so(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(ia(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,tn!==null&&(Io(tn),tn=null))),So(e,n),dt(n),null;case 5:no(n);var u=Er(el.current);if(l=n.type,e!==null&&n.stateNode!=null)Fd(e,n,l,o,u),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(a(166));return dt(n),null}if(e=Er(hn.current),ia(n)){o=n.stateNode,l=n.type;var f=n.memoizedProps;switch(o[fn]=n,o[qs]=f,e=(n.mode&1)!==0,l){case"dialog":De("cancel",o),De("close",o);break;case"iframe":case"object":case"embed":De("load",o);break;case"video":case"audio":for(u=0;u<Gs.length;u++)De(Gs[u],o);break;case"source":De("error",o);break;case"img":case"image":case"link":De("error",o),De("load",o);break;case"details":De("toggle",o);break;case"input":cn(o,f),De("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},De("invalid",o);break;case"textarea":_l(o,f),De("invalid",o)}dn(l,f),u=null;for(var x in f)if(f.hasOwnProperty(x)){var j=f[x];x==="children"?typeof j=="string"?o.textContent!==j&&(f.suppressHydrationWarning!==!0&&Zl(o.textContent,j,e),u=["children",j]):typeof j=="number"&&o.textContent!==""+j&&(f.suppressHydrationWarning!==!0&&Zl(o.textContent,j,e),u=["children",""+j]):c.hasOwnProperty(x)&&j!=null&&x==="onScroll"&&De("scroll",o)}switch(l){case"input":fr(o),yn(o,f,!0);break;case"textarea":fr(o),Dn(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=ea)}o=u,n.updateQueue=o,o!==null&&(n.flags|=4)}else{x=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=jn(l)),e==="http://www.w3.org/1999/xhtml"?l==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=x.createElement(l,{is:o.is}):(e=x.createElement(l),l==="select"&&(x=e,o.multiple?x.multiple=!0:o.size&&(x.size=o.size))):e=x.createElementNS(e,l),e[fn]=n,e[qs]=o,Dd(e,n,!1,!1),n.stateNode=e;e:{switch(x=gr(l,o),l){case"dialog":De("cancel",e),De("close",e),u=o;break;case"iframe":case"object":case"embed":De("load",e),u=o;break;case"video":case"audio":for(u=0;u<Gs.length;u++)De(Gs[u],e);u=o;break;case"source":De("error",e),u=o;break;case"img":case"image":case"link":De("error",e),De("load",e),u=o;break;case"details":De("toggle",e),u=o;break;case"input":cn(e,o),u=In(e,o),De("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=K({},o,{value:void 0}),De("invalid",e);break;case"textarea":_l(e,o),u=Br(e,o),De("invalid",e);break;default:u=o}dn(l,u),j=u;for(f in j)if(j.hasOwnProperty(f)){var C=j[f];f==="style"?xr(e,C):f==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,C!=null&&Ss(e,C)):f==="children"?typeof C=="string"?(l!=="textarea"||C!=="")&&Un(e,C):typeof C=="number"&&Un(e,""+C):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(c.hasOwnProperty(f)?C!=null&&f==="onScroll"&&De("scroll",e):C!=null&&I(e,f,C,x))}switch(l){case"input":fr(e),yn(e,o,!1);break;case"textarea":fr(e),Dn(e);break;case"option":o.value!=null&&e.setAttribute("value",""+ke(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?vn(e,!!o.multiple,f,!1):o.defaultValue!=null&&vn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=ea)}switch(l){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return dt(n),null;case 6:if(e&&n.stateNode!=null)Ud(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(a(166));if(l=Er(el.current),Er(hn.current),ia(n)){if(o=n.stateNode,l=n.memoizedProps,o[fn]=n,(f=o.nodeValue!==l)&&(e=Pt,e!==null))switch(e.tag){case 3:Zl(o.nodeValue,l,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Zl(o.nodeValue,l,(e.mode&1)!==0)}f&&(n.flags|=4)}else o=(l.nodeType===9?l:l.ownerDocument).createTextNode(o),o[fn]=n,n.stateNode=o}return dt(n),null;case 13:if(Fe(ze),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&Lt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Hu(),ns(),n.flags|=98560,f=!1;else if(f=ia(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[fn]=n}else ns(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else tn!==null&&(Io(tn),tn=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=l,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(ze.current&1)!==0?Xe===0&&(Xe=3):Fo())),n.updateQueue!==null&&(n.flags|=4),dt(n),null);case 4:return as(),So(e,n),e===null&&Ks(n.stateNode.containerInfo),dt(n),null;case 10:return Ji(n.type._context),dt(n),null;case 17:return Nt(n.type)&&na(),dt(n),null;case 19:if(Fe(ze),f=n.memoizedState,f===null)return dt(n),null;if(o=(n.flags&128)!==0,x=f.rendering,x===null)if(o)ll(f,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=fa(e),x!==null){for(n.flags|=128,ll(f,!1),o=x.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=l,l=n.child;l!==null;)f=l,e=o,f.flags&=14680066,x=f.alternate,x===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),l=l.sibling;return Me(ze,ze.current&1|2),n.child}e=e.sibling}f.tail!==null&&Se()>us&&(n.flags|=128,o=!0,ll(f,!1),n.lanes=4194304)}else{if(!o)if(e=fa(x),e!==null){if(n.flags|=128,o=!0,l=e.updateQueue,l!==null&&(n.updateQueue=l,n.flags|=4),ll(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!Ue)return dt(n),null}else 2*Se()-f.renderingStartTime>us&&l!==1073741824&&(n.flags|=128,o=!0,ll(f,!1),n.lanes=4194304);f.isBackwards?(x.sibling=n.child,n.child=x):(l=f.last,l!==null?l.sibling=x:n.child=x,f.last=x)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Se(),n.sibling=null,l=ze.current,Me(ze,o?l&1|2:l&1),n):(dt(n),null);case 22:case 23:return Do(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&(n.mode&1)!==0?(Ot&1073741824)!==0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),null;case 24:return null;case 25:return null}throw Error(a(156,n.tag))}function W0(e,n){switch(Wi(n),n.tag){case 1:return Nt(n.type)&&na(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return as(),Fe(wt),Fe(ct),so(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return no(n),null;case 13:if(Fe(ze),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));ns()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Fe(ze),null;case 4:return as(),null;case 10:return Ji(n.type._context),null;case 22:case 23:return Do(),null;case 24:return null;default:return null}}var Na=!1,mt=!1,G0=typeof WeakSet=="function"?WeakSet:Set,Z=null;function os(e,n){var l=e.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(o){We(e,n,o)}else l.current=null}function Co(e,n,l){try{l()}catch(o){We(e,n,o)}}var Bd=!1;function K0(e,n){if(Mi=Hl,e=yu(),Ti(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var u=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var x=0,j=-1,C=-1,L=0,H=0,V=e,z=null;t:for(;;){for(var X;V!==l||u!==0&&V.nodeType!==3||(j=x+u),V!==f||o!==0&&V.nodeType!==3||(C=x+o),V.nodeType===3&&(x+=V.nodeValue.length),(X=V.firstChild)!==null;)z=V,V=X;for(;;){if(V===e)break t;if(z===l&&++L===u&&(j=x),z===f&&++H===o&&(C=x),(X=V.nextSibling)!==null)break;V=z,z=V.parentNode}V=X}l=j===-1||C===-1?null:{start:j,end:C}}else l=null}l=l||{start:0,end:0}}else l=null;for(Di={focusedElem:e,selectionRange:l},Hl=!1,Z=n;Z!==null;)if(n=Z,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Z=e;else for(;Z!==null;){n=Z;try{var re=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var le=re.memoizedProps,Ke=re.memoizedState,A=n.stateNode,T=A.getSnapshotBeforeUpdate(n.elementType===n.type?le:nn(n.type,le),Ke);A.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var P=n.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(G){We(n,n.return,G)}if(e=n.sibling,e!==null){e.return=n.return,Z=e;break}Z=n.return}return re=Bd,Bd=!1,re}function al(e,n,l){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var f=u.destroy;u.destroy=void 0,f!==void 0&&Co(n,l,f)}u=u.next}while(u!==o)}}function ba(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var l=n=n.next;do{if((l.tag&e)===e){var o=l.create;l.destroy=o()}l=l.next}while(l!==n)}}function Eo(e){var n=e.ref;if(n!==null){var l=e.stateNode;e.tag,e=l,typeof n=="function"?n(e):n.current=e}}function zd(e){var n=e.alternate;n!==null&&(e.alternate=null,zd(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[fn],delete n[qs],delete n[zi],delete n[R0],delete n[_0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hd(e){return e.tag===5||e.tag===3||e.tag===4}function $d(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ko(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.nodeType===8?l.parentNode.insertBefore(e,n):l.insertBefore(e,n):(l.nodeType===8?(n=l.parentNode,n.insertBefore(e,l)):(n=l,n.appendChild(e)),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=ea));else if(o!==4&&(e=e.child,e!==null))for(ko(e,n,l),e=e.sibling;e!==null;)ko(e,n,l),e=e.sibling}function To(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(To(e,n,l),e=e.sibling;e!==null;)To(e,n,l),e=e.sibling}var at=null,rn=!1;function nr(e,n,l){for(l=l.child;l!==null;)Vd(e,n,l),l=l.sibling}function Vd(e,n,l){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(jr,l)}catch{}switch(l.tag){case 5:mt||os(l,n);case 6:var o=at,u=rn;at=null,nr(e,n,l),at=o,rn=u,at!==null&&(rn?(e=at,l=l.stateNode,e.nodeType===8?e.parentNode.removeChild(l):e.removeChild(l)):at.removeChild(l.stateNode));break;case 18:at!==null&&(rn?(e=at,l=l.stateNode,e.nodeType===8?Bi(e.parentNode,l):e.nodeType===1&&Bi(e,l),Fs(e)):Bi(at,l.stateNode));break;case 4:o=at,u=rn,at=l.stateNode.containerInfo,rn=!0,nr(e,n,l),at=o,rn=u;break;case 0:case 11:case 14:case 15:if(!mt&&(o=l.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var f=u,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&Co(l,n,x),u=u.next}while(u!==o)}nr(e,n,l);break;case 1:if(!mt&&(os(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=l.memoizedProps,o.state=l.memoizedState,o.componentWillUnmount()}catch(j){We(l,n,j)}nr(e,n,l);break;case 21:nr(e,n,l);break;case 22:l.mode&1?(mt=(o=mt)||l.memoizedState!==null,nr(e,n,l),mt=o):nr(e,n,l);break;default:nr(e,n,l)}}function Wd(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var l=e.stateNode;l===null&&(l=e.stateNode=new G0),n.forEach(function(o){var u=np.bind(null,e,o);l.has(o)||(l.add(o),o.then(u,u))})}}function sn(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var u=l[o];try{var f=e,x=n,j=x;e:for(;j!==null;){switch(j.tag){case 5:at=j.stateNode,rn=!1;break e;case 3:at=j.stateNode.containerInfo,rn=!0;break e;case 4:at=j.stateNode.containerInfo,rn=!0;break e}j=j.return}if(at===null)throw Error(a(160));Vd(f,x,u),at=null,rn=!1;var C=u.alternate;C!==null&&(C.return=null),u.return=null}catch(L){We(u,n,L)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Gd(n,e),n=n.sibling}function Gd(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(n,e),xn(e),o&4){try{al(3,e,e.return),ba(3,e)}catch(le){We(e,e.return,le)}try{al(5,e,e.return)}catch(le){We(e,e.return,le)}}break;case 1:sn(n,e),xn(e),o&512&&l!==null&&os(l,l.return);break;case 5:if(sn(n,e),xn(e),o&512&&l!==null&&os(l,l.return),e.flags&32){var u=e.stateNode;try{Un(u,"")}catch(le){We(e,e.return,le)}}if(o&4&&(u=e.stateNode,u!=null)){var f=e.memoizedProps,x=l!==null?l.memoizedProps:f,j=e.type,C=e.updateQueue;if(e.updateQueue=null,C!==null)try{j==="input"&&f.type==="radio"&&f.name!=null&&Ur(u,f),gr(j,x);var L=gr(j,f);for(x=0;x<C.length;x+=2){var H=C[x],V=C[x+1];H==="style"?xr(u,V):H==="dangerouslySetInnerHTML"?Ss(u,V):H==="children"?Un(u,V):I(u,H,V,L)}switch(j){case"input":hr(u,f);break;case"textarea":zr(u,f);break;case"select":var z=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!f.multiple;var X=f.value;X!=null?vn(u,!!f.multiple,X,!1):z!==!!f.multiple&&(f.defaultValue!=null?vn(u,!!f.multiple,f.defaultValue,!0):vn(u,!!f.multiple,f.multiple?[]:"",!1))}u[qs]=f}catch(le){We(e,e.return,le)}}break;case 6:if(sn(n,e),xn(e),o&4){if(e.stateNode===null)throw Error(a(162));u=e.stateNode,f=e.memoizedProps;try{u.nodeValue=f}catch(le){We(e,e.return,le)}}break;case 3:if(sn(n,e),xn(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{Fs(n.containerInfo)}catch(le){We(e,e.return,le)}break;case 4:sn(n,e),xn(e);break;case 13:sn(n,e),xn(e),u=e.child,u.flags&8192&&(f=u.memoizedState!==null,u.stateNode.isHidden=f,!f||u.alternate!==null&&u.alternate.memoizedState!==null||(Ao=Se())),o&4&&Wd(e);break;case 22:if(H=l!==null&&l.memoizedState!==null,e.mode&1?(mt=(L=mt)||H,sn(n,e),mt=L):sn(n,e),xn(e),o&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!H&&(e.mode&1)!==0)for(Z=e,H=e.child;H!==null;){for(V=Z=H;Z!==null;){switch(z=Z,X=z.child,z.tag){case 0:case 11:case 14:case 15:al(4,z,z.return);break;case 1:os(z,z.return);var re=z.stateNode;if(typeof re.componentWillUnmount=="function"){o=z,l=z.return;try{n=o,re.props=n.memoizedProps,re.state=n.memoizedState,re.componentWillUnmount()}catch(le){We(o,l,le)}}break;case 5:os(z,z.return);break;case 22:if(z.memoizedState!==null){qd(V);continue}}X!==null?(X.return=z,Z=X):qd(V)}H=H.sibling}e:for(H=null,V=e;;){if(V.tag===5){if(H===null){H=V;try{u=V.stateNode,L?(f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(j=V.stateNode,C=V.memoizedProps.style,x=C!=null&&C.hasOwnProperty("display")?C.display:null,j.style.display=pr("display",x))}catch(le){We(e,e.return,le)}}}else if(V.tag===6){if(H===null)try{V.stateNode.nodeValue=L?"":V.memoizedProps}catch(le){We(e,e.return,le)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;H===V&&(H=null),V=V.return}H===V&&(H=null),V.sibling.return=V.return,V=V.sibling}}break;case 19:sn(n,e),xn(e),o&4&&Wd(e);break;case 21:break;default:sn(n,e),xn(e)}}function xn(e){var n=e.flags;if(n&2){try{e:{for(var l=e.return;l!==null;){if(Hd(l)){var o=l;break e}l=l.return}throw Error(a(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(Un(u,""),o.flags&=-33);var f=$d(e);To(e,f,u);break;case 3:case 4:var x=o.stateNode.containerInfo,j=$d(e);ko(e,j,x);break;default:throw Error(a(161))}}catch(C){We(e,e.return,C)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Y0(e,n,l){Z=e,Kd(e)}function Kd(e,n,l){for(var o=(e.mode&1)!==0;Z!==null;){var u=Z,f=u.child;if(u.tag===22&&o){var x=u.memoizedState!==null||Na;if(!x){var j=u.alternate,C=j!==null&&j.memoizedState!==null||mt;j=Na;var L=mt;if(Na=x,(mt=C)&&!L)for(Z=u;Z!==null;)x=Z,C=x.child,x.tag===22&&x.memoizedState!==null?Qd(u):C!==null?(C.return=x,Z=C):Qd(u);for(;f!==null;)Z=f,Kd(f),f=f.sibling;Z=u,Na=j,mt=L}Yd(e)}else(u.subtreeFlags&8772)!==0&&f!==null?(f.return=u,Z=f):Yd(e)}}function Yd(e){for(;Z!==null;){var n=Z;if((n.flags&8772)!==0){var l=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:mt||ba(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!mt)if(l===null)o.componentDidMount();else{var u=n.elementType===n.type?l.memoizedProps:nn(n.type,l.memoizedProps);o.componentDidUpdate(u,l.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&qu(n,f,o);break;case 3:var x=n.updateQueue;if(x!==null){if(l=null,n.child!==null)switch(n.child.tag){case 5:l=n.child.stateNode;break;case 1:l=n.child.stateNode}qu(n,x,l)}break;case 5:var j=n.stateNode;if(l===null&&n.flags&4){l=j;var C=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":C.autoFocus&&l.focus();break;case"img":C.src&&(l.src=C.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var L=n.alternate;if(L!==null){var H=L.memoizedState;if(H!==null){var V=H.dehydrated;V!==null&&Fs(V)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}mt||n.flags&512&&Eo(n)}catch(z){We(n,n.return,z)}}if(n===e){Z=null;break}if(l=n.sibling,l!==null){l.return=n.return,Z=l;break}Z=n.return}}function qd(e){for(;Z!==null;){var n=Z;if(n===e){Z=null;break}var l=n.sibling;if(l!==null){l.return=n.return,Z=l;break}Z=n.return}}function Qd(e){for(;Z!==null;){var n=Z;try{switch(n.tag){case 0:case 11:case 15:var l=n.return;try{ba(4,n)}catch(C){We(n,l,C)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var u=n.return;try{o.componentDidMount()}catch(C){We(n,u,C)}}var f=n.return;try{Eo(n)}catch(C){We(n,f,C)}break;case 5:var x=n.return;try{Eo(n)}catch(C){We(n,x,C)}}}catch(C){We(n,n.return,C)}if(n===e){Z=null;break}var j=n.sibling;if(j!==null){j.return=n.return,Z=j;break}Z=n.return}}var q0=Math.ceil,Sa=U.ReactCurrentDispatcher,Ro=U.ReactCurrentOwner,Vt=U.ReactCurrentBatchConfig,Ae=0,tt=null,Qe=null,it=0,Ot=0,cs=Jn(0),Xe=0,il=null,Tr=0,Ca=0,_o=0,ol=null,St=null,Ao=0,us=1/0,An=null,Ea=!1,Po=null,rr=null,ka=!1,sr=null,Ta=0,cl=0,Lo=null,Ra=-1,_a=0;function xt(){return(Ae&6)!==0?Se():Ra!==-1?Ra:Ra=Se()}function lr(e){return(e.mode&1)===0?1:(Ae&2)!==0&&it!==0?it&-it:P0.transition!==null?(_a===0&&(_a=$c()),_a):(e=Le,e!==0||(e=window.event,e=e===void 0?16:Xc(e.type)),e)}function ln(e,n,l,o){if(50<cl)throw cl=0,Lo=null,Error(a(185));Ls(e,l,o),((Ae&2)===0||e!==tt)&&(e===tt&&((Ae&2)===0&&(Ca|=l),Xe===4&&ar(e,it)),Ct(e,o),l===1&&Ae===0&&(n.mode&1)===0&&(us=Se()+500,sa&&Zn()))}function Ct(e,n){var l=e.callbackNode;Ph(e,n);var o=Ul(e,e===tt?it:0);if(o===0)l!==null&&W(l),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(l!=null&&W(l),n===1)e.tag===0?A0(Xd.bind(null,e)):Du(Xd.bind(null,e)),k0(function(){(Ae&6)===0&&Zn()}),l=null;else{switch(Vc(o)){case 1:l=Ze;break;case 4:l=Ut;break;case 16:l=Xt;break;case 536870912:l=qe;break;default:l=Xt}l=am(l,Jd.bind(null,e))}e.callbackPriority=n,e.callbackNode=l}}function Jd(e,n){if(Ra=-1,_a=0,(Ae&6)!==0)throw Error(a(327));var l=e.callbackNode;if(ds()&&e.callbackNode!==l)return null;var o=Ul(e,e===tt?it:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||n)n=Aa(e,o);else{n=o;var u=Ae;Ae|=2;var f=em();(tt!==e||it!==n)&&(An=null,us=Se()+500,_r(e,n));do try{X0();break}catch(j){Zd(e,j)}while(!0);Qi(),Sa.current=f,Ae=u,Qe!==null?n=0:(tt=null,it=0,n=Xe)}if(n!==0){if(n===2&&(u=mi(e),u!==0&&(o=u,n=Oo(e,u))),n===1)throw l=il,_r(e,0),ar(e,o),Ct(e,Se()),l;if(n===6)ar(e,o);else{if(u=e.current.alternate,(o&30)===0&&!Q0(u)&&(n=Aa(e,o),n===2&&(f=mi(e),f!==0&&(o=f,n=Oo(e,f))),n===1))throw l=il,_r(e,0),ar(e,o),Ct(e,Se()),l;switch(e.finishedWork=u,e.finishedLanes=o,n){case 0:case 1:throw Error(a(345));case 2:Ar(e,St,An);break;case 3:if(ar(e,o),(o&130023424)===o&&(n=Ao+500-Se(),10<n)){if(Ul(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){xt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Ui(Ar.bind(null,e,St,An),n);break}Ar(e,St,An);break;case 4:if(ar(e,o),(o&4194240)===o)break;for(n=e.eventTimes,u=-1;0<o;){var x=31-Zt(o);f=1<<x,x=n[x],x>u&&(u=x),o&=~f}if(o=u,o=Se()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*q0(o/1960))-o,10<o){e.timeoutHandle=Ui(Ar.bind(null,e,St,An),o);break}Ar(e,St,An);break;case 5:Ar(e,St,An);break;default:throw Error(a(329))}}}return Ct(e,Se()),e.callbackNode===l?Jd.bind(null,e):null}function Oo(e,n){var l=ol;return e.current.memoizedState.isDehydrated&&(_r(e,n).flags|=256),e=Aa(e,n),e!==2&&(n=St,St=l,n!==null&&Io(n)),e}function Io(e){St===null?St=e:St.push.apply(St,e)}function Q0(e){for(var n=e;;){if(n.flags&16384){var l=n.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var o=0;o<l.length;o++){var u=l[o],f=u.getSnapshot;u=u.value;try{if(!en(f(),u))return!1}catch{return!1}}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ar(e,n){for(n&=~_o,n&=~Ca,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var l=31-Zt(n),o=1<<l;e[l]=-1,n&=~o}}function Xd(e){if((Ae&6)!==0)throw Error(a(327));ds();var n=Ul(e,0);if((n&1)===0)return Ct(e,Se()),null;var l=Aa(e,n);if(e.tag!==0&&l===2){var o=mi(e);o!==0&&(n=o,l=Oo(e,o))}if(l===1)throw l=il,_r(e,0),ar(e,n),Ct(e,Se()),l;if(l===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Ar(e,St,An),Ct(e,Se()),null}function Mo(e,n){var l=Ae;Ae|=1;try{return e(n)}finally{Ae=l,Ae===0&&(us=Se()+500,sa&&Zn())}}function Rr(e){sr!==null&&sr.tag===0&&(Ae&6)===0&&ds();var n=Ae;Ae|=1;var l=Vt.transition,o=Le;try{if(Vt.transition=null,Le=1,e)return e()}finally{Le=o,Vt.transition=l,Ae=n,(Ae&6)===0&&Zn()}}function Do(){Ot=cs.current,Fe(cs)}function _r(e,n){e.finishedWork=null,e.finishedLanes=0;var l=e.timeoutHandle;if(l!==-1&&(e.timeoutHandle=-1,E0(l)),Qe!==null)for(l=Qe.return;l!==null;){var o=l;switch(Wi(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&na();break;case 3:as(),Fe(wt),Fe(ct),so();break;case 5:no(o);break;case 4:as();break;case 13:Fe(ze);break;case 19:Fe(ze);break;case 10:Ji(o.type._context);break;case 22:case 23:Do()}l=l.return}if(tt=e,Qe=e=ir(e.current,null),it=Ot=n,Xe=0,il=null,_o=Ca=Tr=0,St=ol=null,Cr!==null){for(n=0;n<Cr.length;n++)if(l=Cr[n],o=l.interleaved,o!==null){l.interleaved=null;var u=o.next,f=l.pending;if(f!==null){var x=f.next;f.next=u,o.next=x}l.pending=o}Cr=null}return e}function Zd(e,n){do{var l=Qe;try{if(Qi(),ha.current=ya,pa){for(var o=He.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}pa=!1}if(kr=0,et=Je=He=null,tl=!1,nl=0,Ro.current=null,l===null||l.return===null){Xe=1,il=n,Qe=null;break}e:{var f=e,x=l.return,j=l,C=n;if(n=it,j.flags|=32768,C!==null&&typeof C=="object"&&typeof C.then=="function"){var L=C,H=j,V=H.tag;if((H.mode&1)===0&&(V===0||V===11||V===15)){var z=H.alternate;z?(H.updateQueue=z.updateQueue,H.memoizedState=z.memoizedState,H.lanes=z.lanes):(H.updateQueue=null,H.memoizedState=null)}var X=Sd(x);if(X!==null){X.flags&=-257,Cd(X,x,j,f,n),X.mode&1&&bd(f,L,n),n=X,C=L;var re=n.updateQueue;if(re===null){var le=new Set;le.add(C),n.updateQueue=le}else re.add(C);break e}else{if((n&1)===0){bd(f,L,n),Fo();break e}C=Error(a(426))}}else if(Ue&&j.mode&1){var Ke=Sd(x);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Cd(Ke,x,j,f,n),Yi(is(C,j));break e}}f=C=is(C,j),Xe!==4&&(Xe=2),ol===null?ol=[f]:ol.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var A=wd(f,C,n);Yu(f,A);break e;case 1:j=C;var T=f.type,P=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(rr===null||!rr.has(P)))){f.flags|=65536,n&=-n,f.lanes|=n;var G=Nd(f,j,n);Yu(f,G);break e}}f=f.return}while(f!==null)}nm(l)}catch(ae){n=ae,Qe===l&&l!==null&&(Qe=l=l.return);continue}break}while(!0)}function em(){var e=Sa.current;return Sa.current=ya,e===null?ya:e}function Fo(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),tt===null||(Tr&268435455)===0&&(Ca&268435455)===0||ar(tt,it)}function Aa(e,n){var l=Ae;Ae|=2;var o=em();(tt!==e||it!==n)&&(An=null,_r(e,n));do try{J0();break}catch(u){Zd(e,u)}while(!0);if(Qi(),Ae=l,Sa.current=o,Qe!==null)throw Error(a(261));return tt=null,it=0,Xe}function J0(){for(;Qe!==null;)tm(Qe)}function X0(){for(;Qe!==null&&!se();)tm(Qe)}function tm(e){var n=lm(e.alternate,e,Ot);e.memoizedProps=e.pendingProps,n===null?nm(e):Qe=n,Ro.current=null}function nm(e){var n=e;do{var l=n.alternate;if(e=n.return,(n.flags&32768)===0){if(l=V0(l,n,Ot),l!==null){Qe=l;return}}else{if(l=W0(l,n),l!==null){l.flags&=32767,Qe=l;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Qe=null;return}}if(n=n.sibling,n!==null){Qe=n;return}Qe=n=e}while(n!==null);Xe===0&&(Xe=5)}function Ar(e,n,l){var o=Le,u=Vt.transition;try{Vt.transition=null,Le=1,Z0(e,n,l,o)}finally{Vt.transition=u,Le=o}return null}function Z0(e,n,l,o){do ds();while(sr!==null);if((Ae&6)!==0)throw Error(a(327));l=e.finishedWork;var u=e.finishedLanes;if(l===null)return null;if(e.finishedWork=null,e.finishedLanes=0,l===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var f=l.lanes|l.childLanes;if(Lh(e,f),e===tt&&(Qe=tt=null,it=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ka||(ka=!0,am(Xt,function(){return ds(),null})),f=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||f){f=Vt.transition,Vt.transition=null;var x=Le;Le=1;var j=Ae;Ae|=4,Ro.current=null,K0(e,l),Gd(l,e),v0(Di),Hl=!!Mi,Di=Mi=null,e.current=l,Y0(l),Ie(),Ae=j,Le=x,Vt.transition=f}else e.current=l;if(ka&&(ka=!1,sr=e,Ta=u),f=e.pendingLanes,f===0&&(rr=null),kh(l.stateNode),Ct(e,Se()),n!==null)for(o=e.onRecoverableError,l=0;l<n.length;l++)u=n[l],o(u.value,{componentStack:u.stack,digest:u.digest});if(Ea)throw Ea=!1,e=Po,Po=null,e;return(Ta&1)!==0&&e.tag!==0&&ds(),f=e.pendingLanes,(f&1)!==0?e===Lo?cl++:(cl=0,Lo=e):cl=0,Zn(),null}function ds(){if(sr!==null){var e=Vc(Ta),n=Vt.transition,l=Le;try{if(Vt.transition=null,Le=16>e?16:e,sr===null)var o=!1;else{if(e=sr,sr=null,Ta=0,(Ae&6)!==0)throw Error(a(331));var u=Ae;for(Ae|=4,Z=e.current;Z!==null;){var f=Z,x=f.child;if((Z.flags&16)!==0){var j=f.deletions;if(j!==null){for(var C=0;C<j.length;C++){var L=j[C];for(Z=L;Z!==null;){var H=Z;switch(H.tag){case 0:case 11:case 15:al(8,H,f)}var V=H.child;if(V!==null)V.return=H,Z=V;else for(;Z!==null;){H=Z;var z=H.sibling,X=H.return;if(zd(H),H===L){Z=null;break}if(z!==null){z.return=X,Z=z;break}Z=X}}}var re=f.alternate;if(re!==null){var le=re.child;if(le!==null){re.child=null;do{var Ke=le.sibling;le.sibling=null,le=Ke}while(le!==null)}}Z=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,Z=x;else e:for(;Z!==null;){if(f=Z,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:al(9,f,f.return)}var A=f.sibling;if(A!==null){A.return=f.return,Z=A;break e}Z=f.return}}var T=e.current;for(Z=T;Z!==null;){x=Z;var P=x.child;if((x.subtreeFlags&2064)!==0&&P!==null)P.return=x,Z=P;else e:for(x=T;Z!==null;){if(j=Z,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:ba(9,j)}}catch(ae){We(j,j.return,ae)}if(j===x){Z=null;break e}var G=j.sibling;if(G!==null){G.return=j.return,Z=G;break e}Z=j.return}}if(Ae=u,Zn(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(jr,e)}catch{}o=!0}return o}finally{Le=l,Vt.transition=n}}return!1}function rm(e,n,l){n=is(l,n),n=wd(e,n,1),e=tr(e,n,1),n=xt(),e!==null&&(Ls(e,1,n),Ct(e,n))}function We(e,n,l){if(e.tag===3)rm(e,e,l);else for(;n!==null;){if(n.tag===3){rm(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(rr===null||!rr.has(o))){e=is(l,e),e=Nd(n,e,1),n=tr(n,e,1),e=xt(),n!==null&&(Ls(n,1,e),Ct(n,e));break}}n=n.return}}function ep(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),n=xt(),e.pingedLanes|=e.suspendedLanes&l,tt===e&&(it&l)===l&&(Xe===4||Xe===3&&(it&130023424)===it&&500>Se()-Ao?_r(e,0):_o|=l),Ct(e,n)}function sm(e,n){n===0&&((e.mode&1)===0?n=1:(n=Fl,Fl<<=1,(Fl&130023424)===0&&(Fl=4194304)));var l=xt();e=Tn(e,n),e!==null&&(Ls(e,n,l),Ct(e,l))}function tp(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),sm(e,l)}function np(e,n){var l=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(a(314))}o!==null&&o.delete(n),sm(e,l)}var lm;lm=function(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps||wt.current)bt=!0;else{if((e.lanes&l)===0&&(n.flags&128)===0)return bt=!1,$0(e,n,l);bt=(e.flags&131072)!==0}else bt=!1,Ue&&(n.flags&1048576)!==0&&Fu(n,aa,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;wa(e,n),e=n.pendingProps;var u=Zr(n,ct.current);ls(n,l),u=io(null,n,o,e,u,l);var f=oo();return n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,Nt(o)?(f=!0,ra(n)):f=!1,n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,eo(n),u.updater=va,n.stateNode=u,u._reactInternals=n,po(n,o,e,l),n=vo(null,n,o,!0,f,l)):(n.tag=0,Ue&&f&&Vi(n),pt(null,n,u,l),n=n.child),n;case 16:o=n.elementType;e:{switch(wa(e,n),e=n.pendingProps,u=o._init,o=u(o._payload),n.type=o,u=n.tag=sp(o),e=nn(o,e),u){case 0:n=yo(null,n,o,e,l);break e;case 1:n=Ad(null,n,o,e,l);break e;case 11:n=Ed(null,n,o,e,l);break e;case 14:n=kd(null,n,o,nn(o.type,e),l);break e}throw Error(a(306,o,""))}return n;case 0:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:nn(o,u),yo(e,n,o,u,l);case 1:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:nn(o,u),Ad(e,n,o,u,l);case 3:e:{if(Pd(n),e===null)throw Error(a(387));o=n.pendingProps,f=n.memoizedState,u=f.element,Ku(e,n),ma(n,o,null,l);var x=n.memoizedState;if(o=x.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){u=is(Error(a(423)),n),n=Ld(e,n,o,l,u);break e}else if(o!==u){u=is(Error(a(424)),n),n=Ld(e,n,o,l,u);break e}else for(Lt=Qn(n.stateNode.containerInfo.firstChild),Pt=n,Ue=!0,tn=null,l=Wu(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ns(),o===u){n=_n(e,n,l);break e}pt(e,n,o,l)}n=n.child}return n;case 5:return Qu(n),e===null&&Ki(n),o=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,x=u.children,Fi(o,u)?x=null:f!==null&&Fi(o,f)&&(n.flags|=32),_d(e,n),pt(e,n,x,l),n.child;case 6:return e===null&&Ki(n),null;case 13:return Od(e,n,l);case 4:return to(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=rs(n,null,o,l):pt(e,n,o,l),n.child;case 11:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:nn(o,u),Ed(e,n,o,u,l);case 7:return pt(e,n,n.pendingProps,l),n.child;case 8:return pt(e,n,n.pendingProps.children,l),n.child;case 12:return pt(e,n,n.pendingProps.children,l),n.child;case 10:e:{if(o=n.type._context,u=n.pendingProps,f=n.memoizedProps,x=u.value,Me(ca,o._currentValue),o._currentValue=x,f!==null)if(en(f.value,x)){if(f.children===u.children&&!wt.current){n=_n(e,n,l);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var j=f.dependencies;if(j!==null){x=f.child;for(var C=j.firstContext;C!==null;){if(C.context===o){if(f.tag===1){C=Rn(-1,l&-l),C.tag=2;var L=f.updateQueue;if(L!==null){L=L.shared;var H=L.pending;H===null?C.next=C:(C.next=H.next,H.next=C),L.pending=C}}f.lanes|=l,C=f.alternate,C!==null&&(C.lanes|=l),Xi(f.return,l,n),j.lanes|=l;break}C=C.next}}else if(f.tag===10)x=f.type===n.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(a(341));x.lanes|=l,j=x.alternate,j!==null&&(j.lanes|=l),Xi(x,l,n),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===n){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}pt(e,n,u.children,l),n=n.child}return n;case 9:return u=n.type,o=n.pendingProps.children,ls(n,l),u=Ht(u),o=o(u),n.flags|=1,pt(e,n,o,l),n.child;case 14:return o=n.type,u=nn(o,n.pendingProps),u=nn(o.type,u),kd(e,n,o,u,l);case 15:return Td(e,n,n.type,n.pendingProps,l);case 17:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:nn(o,u),wa(e,n),n.tag=1,Nt(o)?(e=!0,ra(n)):e=!1,ls(n,l),vd(n,o,u),po(n,o,u,l),vo(null,n,o,!0,e,l);case 19:return Md(e,n,l);case 22:return Rd(e,n,l)}throw Error(a(156,n.tag))};function am(e,n){return E(e,n)}function rp(e,n,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,n,l,o){return new rp(e,n,l,o)}function Uo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sp(e){if(typeof e=="function")return Uo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ve)return 11;if(e===oe)return 14}return 2}function ir(e,n){var l=e.alternate;return l===null?(l=Wt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&14680064,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l}function Pa(e,n,l,o,u,f){var x=2;if(o=e,typeof e=="function")Uo(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case $:return Pr(l.children,u,f,n);case pe:x=8,u|=8;break;case we:return e=Wt(12,l,n,u|2),e.elementType=we,e.lanes=f,e;case ce:return e=Wt(13,l,n,u),e.elementType=ce,e.lanes=f,e;case ge:return e=Wt(19,l,n,u),e.elementType=ge,e.lanes=f,e;case J:return La(l,u,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case je:x=10;break e;case te:x=9;break e;case ve:x=11;break e;case oe:x=14;break e;case Q:x=16,o=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return n=Wt(x,l,n,u),n.elementType=e,n.type=o,n.lanes=f,n}function Pr(e,n,l,o){return e=Wt(7,e,o,n),e.lanes=l,e}function La(e,n,l,o){return e=Wt(22,e,o,n),e.elementType=J,e.lanes=l,e.stateNode={isHidden:!1},e}function Bo(e,n,l){return e=Wt(6,e,null,n),e.lanes=l,e}function zo(e,n,l){return n=Wt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function lp(e,n,l,o,u){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fi(0),this.expirationTimes=fi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fi(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Ho(e,n,l,o,u,f,x,j,C){return e=new lp(e,n,l,j,C),n===1?(n=1,f===!0&&(n|=8)):n=0,f=Wt(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},eo(f),e}function ap(e,n,l){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:he,key:o==null?null:""+o,children:e,containerInfo:n,implementation:l}}function im(e){if(!e)return Xn;e=e._reactInternals;e:{if(mn(e)!==e||e.tag!==1)throw Error(a(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(Nt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(a(171))}if(e.tag===1){var l=e.type;if(Nt(l))return Iu(e,l,n)}return n}function om(e,n,l,o,u,f,x,j,C){return e=Ho(l,o,!0,e,u,f,x,j,C),e.context=im(null),l=e.current,o=xt(),u=lr(l),f=Rn(o,u),f.callback=n??null,tr(l,f,u),e.current.lanes=u,Ls(e,u,o),Ct(e,o),e}function Oa(e,n,l,o){var u=n.current,f=xt(),x=lr(u);return l=im(l),n.context===null?n.context=l:n.pendingContext=l,n=Rn(f,x),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=tr(u,n,x),e!==null&&(ln(e,u,x,f),da(e,u,x)),x}function Ia(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function cm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function $o(e,n){cm(e,n),(e=e.alternate)&&cm(e,n)}function ip(){return null}var um=typeof reportError=="function"?reportError:function(e){console.error(e)};function Vo(e){this._internalRoot=e}Ma.prototype.render=Vo.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));Oa(e,n,null,null)},Ma.prototype.unmount=Vo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Rr(function(){Oa(null,e,null,null)}),n[Sn]=null}};function Ma(e){this._internalRoot=e}Ma.prototype.unstable_scheduleHydration=function(e){if(e){var n=Kc();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Kn.length&&n!==0&&n<Kn[l].priority;l++);Kn.splice(l,0,e),l===0&&Qc(e)}};function Wo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Da(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dm(){}function op(e,n,l,o,u){if(u){if(typeof o=="function"){var f=o;o=function(){var L=Ia(x);f.call(L)}}var x=om(n,o,e,0,null,!1,!1,"",dm);return e._reactRootContainer=x,e[Sn]=x.current,Ks(e.nodeType===8?e.parentNode:e),Rr(),x}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var j=o;o=function(){var L=Ia(C);j.call(L)}}var C=Ho(e,0,!1,null,null,!1,!1,"",dm);return e._reactRootContainer=C,e[Sn]=C.current,Ks(e.nodeType===8?e.parentNode:e),Rr(function(){Oa(n,C,l,o)}),C}function Fa(e,n,l,o,u){var f=l._reactRootContainer;if(f){var x=f;if(typeof u=="function"){var j=u;u=function(){var C=Ia(x);j.call(C)}}Oa(n,x,e,u)}else x=op(l,n,e,u,o);return Ia(x)}Wc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var l=Ps(n.pendingLanes);l!==0&&(hi(n,l|1),Ct(n,Se()),(Ae&6)===0&&(us=Se()+500,Zn()))}break;case 13:Rr(function(){var o=Tn(e,1);if(o!==null){var u=xt();ln(o,e,1,u)}}),$o(e,1)}},pi=function(e){if(e.tag===13){var n=Tn(e,134217728);if(n!==null){var l=xt();ln(n,e,134217728,l)}$o(e,134217728)}},Gc=function(e){if(e.tag===13){var n=lr(e),l=Tn(e,n);if(l!==null){var o=xt();ln(l,e,n,o)}$o(e,n)}},Kc=function(){return Le},Yc=function(e,n){var l=Le;try{return Le=e,n()}finally{Le=l}},Bn=function(e,n,l){switch(n){case"input":if(hr(e,l),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var u=ta(o);if(!u)throw Error(a(90));bs(o),hr(o,u)}}}break;case"textarea":zr(e,l);break;case"select":n=l.value,n!=null&&vn(e,!!l.multiple,n,!1)}},$e=Mo,Nn=Rr;var cp={usingClientEntryPoint:!1,Events:[Qs,Jr,ta,Pl,Ll,Mo]},ul={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},up={bundleType:ul.bundleType,version:ul.version,rendererPackageName:ul.rendererPackageName,rendererConfig:ul.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ml(e),e===null?null:e.stateNode},findFiberByHostInstance:ul.findFiberByHostInstance||ip,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ua=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ua.isDisabled&&Ua.supportsFiber)try{jr=Ua.inject(up),_t=Ua}catch{}}return Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cp,Et.createPortal=function(e,n){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wo(n))throw Error(a(200));return ap(e,n,null,l)},Et.createRoot=function(e,n){if(!Wo(e))throw Error(a(299));var l=!1,o="",u=um;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),n=Ho(e,1,!1,null,null,l,!1,o,u),e[Sn]=n.current,Ks(e.nodeType===8?e.parentNode:e),new Vo(n)},Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=Ml(n),e=e===null?null:e.stateNode,e},Et.flushSync=function(e){return Rr(e)},Et.hydrate=function(e,n,l){if(!Da(n))throw Error(a(200));return Fa(null,e,n,!0,l)},Et.hydrateRoot=function(e,n,l){if(!Wo(e))throw Error(a(405));var o=l!=null&&l.hydratedSources||null,u=!1,f="",x=um;if(l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),n=om(n,null,e,1,l??null,u,!1,f,x),e[Sn]=n.current,Ks(e),o)for(e=0;e<o.length;e++)l=o[e],u=l._getVersion,u=u(l._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[l,u]:n.mutableSourceEagerHydrationData.push(l,u);return new Ma(n)},Et.render=function(e,n,l){if(!Da(n))throw Error(a(200));return Fa(null,e,n,!1,l)},Et.unmountComponentAtNode=function(e){if(!Da(e))throw Error(a(40));return e._reactRootContainer?(Rr(function(){Fa(null,null,e,!1,function(){e._reactRootContainer=null,e[Sn]=null})}),!0):!1},Et.unstable_batchedUpdates=Mo,Et.unstable_renderSubtreeIntoContainer=function(e,n,l,o){if(!Da(l))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return Fa(e,n,l,!1,o)},Et.version="18.3.1-next-f1338f8080-20240426",Et}var vm;function vf(){if(vm)return Yo.exports;vm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(s){console.error(s)}}return r(),Yo.exports=vp(),Yo.exports}var jm;function jp(){if(jm)return Ba;jm=1;var r=vf();return Ba.createRoot=r.createRoot,Ba.hydrateRoot=r.hydrateRoot,Ba}var wp=jp(),w=wc();const jf=fp(w),Np=mp({__proto__:null,default:jf},[w]);vf();function vl(){return vl=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[i]=a[i])}return r},vl.apply(this,arguments)}var cr;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(cr||(cr={}));const wm="popstate";function bp(r){r===void 0&&(r={});function s(i,c){let{pathname:d,search:m,hash:p}=i.location;return oc("",{pathname:d,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function a(i,c){return typeof c=="string"?c:Ya(c)}return Cp(s,a,null,r)}function Ye(r,s){if(r===!1||r===null||typeof r>"u")throw new Error(s)}function Nc(r,s){if(!r){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function Sp(){return Math.random().toString(36).substr(2,8)}function Nm(r,s){return{usr:r.state,key:r.key,idx:s}}function oc(r,s,a,i){return a===void 0&&(a=null),vl({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof s=="string"?ys(s):s,{state:a,key:s&&s.key||i||Sp()})}function Ya(r){let{pathname:s="/",search:a="",hash:i=""}=r;return a&&a!=="?"&&(s+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(s+=i.charAt(0)==="#"?i:"#"+i),s}function ys(r){let s={};if(r){let a=r.indexOf("#");a>=0&&(s.hash=r.substr(a),r=r.substr(0,a));let i=r.indexOf("?");i>=0&&(s.search=r.substr(i),r=r.substr(0,i)),r&&(s.pathname=r)}return s}function Cp(r,s,a,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,m=c.history,p=cr.Pop,h=null,g=v();g==null&&(g=0,m.replaceState(vl({},m.state,{idx:g}),""));function v(){return(m.state||{idx:null}).idx}function y(){p=cr.Pop;let b=v(),D=b==null?null:b-g;g=b,h&&h({action:p,location:R.location,delta:D})}function k(b,D){p=cr.Push;let _=oc(R.location,b,D);g=v()+1;let I=Nm(_,g),U=R.createHref(_);try{m.pushState(I,"",U)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;c.location.assign(U)}d&&h&&h({action:p,location:R.location,delta:1})}function M(b,D){p=cr.Replace;let _=oc(R.location,b,D);g=v();let I=Nm(_,g),U=R.createHref(_);m.replaceState(I,"",U),d&&h&&h({action:p,location:R.location,delta:0})}function N(b){let D=c.location.origin!=="null"?c.location.origin:c.location.href,_=typeof b=="string"?b:Ya(b);return _=_.replace(/ $/,"%20"),Ye(D,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,D)}let R={get action(){return p},get location(){return r(c,m)},listen(b){if(h)throw new Error("A history only accepts one active listener");return c.addEventListener(wm,y),h=b,()=>{c.removeEventListener(wm,y),h=null}},createHref(b){return s(c,b)},createURL:N,encodeLocation(b){let D=N(b);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:k,replace:M,go(b){return m.go(b)}};return R}var bm;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(bm||(bm={}));function Ep(r,s,a){return a===void 0&&(a="/"),kp(r,s,a)}function kp(r,s,a,i){let c=typeof s=="string"?ys(s):s,d=bc(c.pathname||"/",a);if(d==null)return null;let m=wf(r);Tp(m);let p=null;for(let h=0;p==null&&h<m.length;++h){let g=Bp(d);p=Dp(m[h],g)}return p}function wf(r,s,a,i){s===void 0&&(s=[]),a===void 0&&(a=[]),i===void 0&&(i="");let c=(d,m,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};h.relativePath.startsWith("/")&&(Ye(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=ur([i,h.relativePath]),v=a.concat(h);d.children&&d.children.length>0&&(Ye(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),wf(d.children,s,v,g)),!(d.path==null&&!d.index)&&s.push({path:g,score:Ip(g,d.index),routesMeta:v})};return r.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,m);else for(let h of Nf(d.path))c(d,m,h)}),s}function Nf(r){let s=r.split("/");if(s.length===0)return[];let[a,...i]=s,c=a.endsWith("?"),d=a.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let m=Nf(i.join("/")),p=[];return p.push(...m.map(h=>h===""?d:[d,h].join("/"))),c&&p.push(...m),p.map(h=>r.startsWith("/")&&h===""?"/":h)}function Tp(r){r.sort((s,a)=>s.score!==a.score?a.score-s.score:Mp(s.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}const Rp=/^:[\w-]+$/,_p=3,Ap=2,Pp=1,Lp=10,Op=-2,Sm=r=>r==="*";function Ip(r,s){let a=r.split("/"),i=a.length;return a.some(Sm)&&(i+=Op),s&&(i+=Ap),a.filter(c=>!Sm(c)).reduce((c,d)=>c+(Rp.test(d)?_p:d===""?Pp:Lp),i)}function Mp(r,s){return r.length===s.length&&r.slice(0,-1).every((i,c)=>i===s[c])?r[r.length-1]-s[s.length-1]:0}function Dp(r,s,a){let{routesMeta:i}=r,c={},d="/",m=[];for(let p=0;p<i.length;++p){let h=i[p],g=p===i.length-1,v=d==="/"?s:s.slice(d.length)||"/",y=Fp({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},v),k=h.route;if(!y)return null;Object.assign(c,y.params),m.push({params:c,pathname:ur([d,y.pathname]),pathnameBase:Wp(ur([d,y.pathnameBase])),route:k}),y.pathnameBase!=="/"&&(d=ur([d,y.pathnameBase]))}return m}function Fp(r,s){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[a,i]=Up(r.path,r.caseSensitive,r.end),c=s.match(a);if(!c)return null;let d=c[0],m=d.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:i.reduce((g,v,y)=>{let{paramName:k,isOptional:M}=v;if(k==="*"){let R=p[y]||"";m=d.slice(0,d.length-R.length).replace(/(.)\/+$/,"$1")}const N=p[y];return M&&!N?g[k]=void 0:g[k]=(N||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:m,pattern:r}}function Up(r,s,a){s===void 0&&(s=!1),a===void 0&&(a=!0),Nc(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,h)=>(i.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),i]}function Bp(r){try{return r.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Nc(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),r}}function bc(r,s){if(s==="/")return r;if(!r.toLowerCase().startsWith(s.toLowerCase()))return null;let a=s.endsWith("/")?s.length-1:s.length,i=r.charAt(a);return i&&i!=="/"?null:r.slice(a)||"/"}const zp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hp=r=>zp.test(r);function $p(r,s){s===void 0&&(s="/");let{pathname:a,search:i="",hash:c=""}=typeof r=="string"?ys(r):r,d;if(a)if(Hp(a))d=a;else{if(a.includes("//")){let m=a;a=a.replace(/\/\/+/g,"/"),Nc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+a))}a.startsWith("/")?d=Cm(a.substring(1),"/"):d=Cm(a,s)}else d=s;return{pathname:d,search:Gp(i),hash:Kp(c)}}function Cm(r,s){let a=s.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?a.length>1&&a.pop():c!=="."&&a.push(c)}),a.length>1?a.join("/"):"/"}function Jo(r,s,a,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+a+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Vp(r){return r.filter((s,a)=>a===0||s.route.path&&s.route.path.length>0)}function Sc(r,s){let a=Vp(r);return s?a.map((i,c)=>c===a.length-1?i.pathname:i.pathnameBase):a.map(i=>i.pathnameBase)}function Cc(r,s,a,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=ys(r):(c=vl({},r),Ye(!c.pathname||!c.pathname.includes("?"),Jo("?","pathname","search",c)),Ye(!c.pathname||!c.pathname.includes("#"),Jo("#","pathname","hash",c)),Ye(!c.search||!c.search.includes("#"),Jo("#","search","hash",c)));let d=r===""||c.pathname==="",m=d?"/":c.pathname,p;if(m==null)p=a;else{let y=s.length-1;if(!i&&m.startsWith("..")){let k=m.split("/");for(;k[0]==="..";)k.shift(),y-=1;c.pathname=k.join("/")}p=y>=0?s[y]:"/"}let h=$p(c,p),g=m&&m!=="/"&&m.endsWith("/"),v=(d||m===".")&&a.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}const ur=r=>r.join("/").replace(/\/\/+/g,"/"),Wp=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),Gp=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Kp=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function Yp(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const bf=["post","put","patch","delete"];new Set(bf);const qp=["get",...bf];new Set(qp);function jl(){return jl=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[i]=a[i])}return r},jl.apply(this,arguments)}const Ec=w.createContext(null),Qp=w.createContext(null),mr=w.createContext(null),ei=w.createContext(null),Ln=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Sf=w.createContext(null);function Jp(r,s){let{relative:a}=s===void 0?{}:s;vs()||Ye(!1);let{basename:i,navigator:c}=w.useContext(mr),{hash:d,pathname:m,search:p}=Ef(r,{relative:a}),h=m;return i!=="/"&&(h=m==="/"?i:ur([i,m])),c.createHref({pathname:h,search:p,hash:d})}function vs(){return w.useContext(ei)!=null}function js(){return vs()||Ye(!1),w.useContext(ei).location}function Cf(r){w.useContext(mr).static||w.useLayoutEffect(r)}function kc(){let{isDataRoute:r}=w.useContext(Ln);return r?dx():Xp()}function Xp(){vs()||Ye(!1);let r=w.useContext(Ec),{basename:s,future:a,navigator:i}=w.useContext(mr),{matches:c}=w.useContext(Ln),{pathname:d}=js(),m=JSON.stringify(Sc(c,a.v7_relativeSplatPath)),p=w.useRef(!1);return Cf(()=>{p.current=!0}),w.useCallback(function(g,v){if(v===void 0&&(v={}),!p.current)return;if(typeof g=="number"){i.go(g);return}let y=Cc(g,JSON.parse(m),d,v.relative==="path");r==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:ur([s,y.pathname])),(v.replace?i.replace:i.push)(y,v.state,v)},[s,i,m,d,r])}function Zp(){let{matches:r}=w.useContext(Ln),s=r[r.length-1];return s?s.params:{}}function Ef(r,s){let{relative:a}=s===void 0?{}:s,{future:i}=w.useContext(mr),{matches:c}=w.useContext(Ln),{pathname:d}=js(),m=JSON.stringify(Sc(c,i.v7_relativeSplatPath));return w.useMemo(()=>Cc(r,JSON.parse(m),d,a==="path"),[r,m,d,a])}function ex(r,s){return tx(r,s)}function tx(r,s,a,i){vs()||Ye(!1);let{navigator:c}=w.useContext(mr),{matches:d}=w.useContext(Ln),m=d[d.length-1],p=m?m.params:{};m&&m.pathname;let h=m?m.pathnameBase:"/";m&&m.route;let g=js(),v;if(s){var y;let b=typeof s=="string"?ys(s):s;h==="/"||(y=b.pathname)!=null&&y.startsWith(h)||Ye(!1),v=b}else v=g;let k=v.pathname||"/",M=k;if(h!=="/"){let b=h.replace(/^\//,"").split("/");M="/"+k.replace(/^\//,"").split("/").slice(b.length).join("/")}let N=Ep(r,{pathname:M}),R=ax(N&&N.map(b=>Object.assign({},b,{params:Object.assign({},p,b.params),pathname:ur([h,c.encodeLocation?c.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?h:ur([h,c.encodeLocation?c.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),d,a,i);return s&&R?w.createElement(ei.Provider,{value:{location:jl({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:cr.Pop}},R):R}function nx(){let r=ux(),s=Yp(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),a=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),a?w.createElement("pre",{style:c},a):null,null)}const rx=w.createElement(nx,null);class sx extends w.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,a){return a.location!==s.location||a.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:a.error,location:a.location,revalidation:s.revalidation||a.revalidation}}componentDidCatch(s,a){console.error("React Router caught the following error during render",s,a)}render(){return this.state.error!==void 0?w.createElement(Ln.Provider,{value:this.props.routeContext},w.createElement(Sf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lx(r){let{routeContext:s,match:a,children:i}=r,c=w.useContext(Ec);return c&&c.static&&c.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=a.route.id),w.createElement(Ln.Provider,{value:s},i)}function ax(r,s,a,i){var c;if(s===void 0&&(s=[]),a===void 0&&(a=null),i===void 0&&(i=null),r==null){var d;if(!a)return null;if(a.errors)r=a.matches;else if((d=i)!=null&&d.v7_partialHydration&&s.length===0&&!a.initialized&&a.matches.length>0)r=a.matches;else return null}let m=r,p=(c=a)==null?void 0:c.errors;if(p!=null){let v=m.findIndex(y=>y.route.id&&p?.[y.route.id]!==void 0);v>=0||Ye(!1),m=m.slice(0,Math.min(m.length,v+1))}let h=!1,g=-1;if(a&&i&&i.v7_partialHydration)for(let v=0;v<m.length;v++){let y=m[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=v),y.route.id){let{loaderData:k,errors:M}=a,N=y.route.loader&&k[y.route.id]===void 0&&(!M||M[y.route.id]===void 0);if(y.route.lazy||N){h=!0,g>=0?m=m.slice(0,g+1):m=[m[0]];break}}}return m.reduceRight((v,y,k)=>{let M,N=!1,R=null,b=null;a&&(M=p&&y.route.id?p[y.route.id]:void 0,R=y.route.errorElement||rx,h&&(g<0&&k===0?(mx("route-fallback"),N=!0,b=null):g===k&&(N=!0,b=y.route.hydrateFallbackElement||null)));let D=s.concat(m.slice(0,k+1)),_=()=>{let I;return M?I=R:N?I=b:y.route.Component?I=w.createElement(y.route.Component,null):y.route.element?I=y.route.element:I=v,w.createElement(lx,{match:y,routeContext:{outlet:v,matches:D,isDataRoute:a!=null},children:I})};return a&&(y.route.ErrorBoundary||y.route.errorElement||k===0)?w.createElement(sx,{location:a.location,revalidation:a.revalidation,component:R,error:M,children:_(),routeContext:{outlet:null,matches:D,isDataRoute:!0}}):_()},null)}var kf=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(kf||{}),Tf=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(Tf||{});function ix(r){let s=w.useContext(Ec);return s||Ye(!1),s}function ox(r){let s=w.useContext(Qp);return s||Ye(!1),s}function cx(r){let s=w.useContext(Ln);return s||Ye(!1),s}function Rf(r){let s=cx(),a=s.matches[s.matches.length-1];return a.route.id||Ye(!1),a.route.id}function ux(){var r;let s=w.useContext(Sf),a=ox(),i=Rf();return s!==void 0?s:(r=a.errors)==null?void 0:r[i]}function dx(){let{router:r}=ix(kf.UseNavigateStable),s=Rf(Tf.UseNavigateStable),a=w.useRef(!1);return Cf(()=>{a.current=!0}),w.useCallback(function(c,d){d===void 0&&(d={}),a.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,jl({fromRouteId:s},d)))},[r,s])}const Em={};function mx(r,s,a){Em[r]||(Em[r]=!0)}function fx(r,s){r?.v7_startTransition,r?.v7_relativeSplatPath}function hx(r){let{to:s,replace:a,state:i,relative:c}=r;vs()||Ye(!1);let{future:d,static:m}=w.useContext(mr),{matches:p}=w.useContext(Ln),{pathname:h}=js(),g=kc(),v=Cc(s,Sc(p,d.v7_relativeSplatPath),h,c==="path"),y=JSON.stringify(v);return w.useEffect(()=>g(JSON.parse(y),{replace:a,state:i,relative:c}),[g,y,c,a,i]),null}function ps(r){Ye(!1)}function px(r){let{basename:s="/",children:a=null,location:i,navigationType:c=cr.Pop,navigator:d,static:m=!1,future:p}=r;vs()&&Ye(!1);let h=s.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:h,navigator:d,static:m,future:jl({v7_relativeSplatPath:!1},p)}),[h,p,d,m]);typeof i=="string"&&(i=ys(i));let{pathname:v="/",search:y="",hash:k="",state:M=null,key:N="default"}=i,R=w.useMemo(()=>{let b=bc(v,h);return b==null?null:{location:{pathname:b,search:y,hash:k,state:M,key:N},navigationType:c}},[h,v,y,k,M,N,c]);return R==null?null:w.createElement(mr.Provider,{value:g},w.createElement(ei.Provider,{children:a,value:R}))}function _f(r){let{children:s,location:a}=r;return ex(cc(s),a)}new Promise(()=>{});function cc(r,s){s===void 0&&(s=[]);let a=[];return w.Children.forEach(r,(i,c)=>{if(!w.isValidElement(i))return;let d=[...s,c];if(i.type===w.Fragment){a.push.apply(a,cc(i.props.children,d));return}i.type!==ps&&Ye(!1),!i.props.index||!i.props.children||Ye(!1);let m={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(m.children=cc(i.props.children,d)),a.push(m)}),a}function uc(){return uc=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[i]=a[i])}return r},uc.apply(this,arguments)}function xx(r,s){if(r==null)return{};var a={},i=Object.keys(r),c,d;for(d=0;d<i.length;d++)c=i[d],!(s.indexOf(c)>=0)&&(a[c]=r[c]);return a}function gx(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function yx(r,s){return r.button===0&&(!s||s==="_self")&&!gx(r)}const vx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],jx="6";try{window.__reactRouterVersion=jx}catch{}const wx="startTransition",km=Np[wx];function Nx(r){let{basename:s,children:a,future:i,window:c}=r,d=w.useRef();d.current==null&&(d.current=bp({window:c,v5Compat:!0}));let m=d.current,[p,h]=w.useState({action:m.action,location:m.location}),{v7_startTransition:g}=i||{},v=w.useCallback(y=>{g&&km?km(()=>h(y)):h(y)},[h,g]);return w.useLayoutEffect(()=>m.listen(v),[m,v]),w.useEffect(()=>fx(i),[i]),w.createElement(px,{basename:s,children:a,location:p.location,navigationType:p.action,navigator:m,future:i})}const bx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pn=w.forwardRef(function(s,a){let{onClick:i,relative:c,reloadDocument:d,replace:m,state:p,target:h,to:g,preventScrollReset:v,viewTransition:y}=s,k=xx(s,vx),{basename:M}=w.useContext(mr),N,R=!1;if(typeof g=="string"&&Sx.test(g)&&(N=g,bx))try{let I=new URL(window.location.href),U=g.startsWith("//")?new URL(I.protocol+g):new URL(g),q=bc(U.pathname,M);U.origin===I.origin&&q!=null?g=q+U.search+U.hash:R=!0}catch{}let b=Jp(g,{relative:c}),D=Cx(g,{replace:m,state:p,target:h,preventScrollReset:v,relative:c,viewTransition:y});function _(I){i&&i(I),I.defaultPrevented||D(I)}return w.createElement("a",uc({},k,{href:N||b,onClick:R||d?i:_,ref:a,target:h}))});var Tm;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Tm||(Tm={}));var Rm;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Rm||(Rm={}));function Cx(r,s){let{target:a,replace:i,state:c,preventScrollReset:d,relative:m,viewTransition:p}=s===void 0?{}:s,h=kc(),g=js(),v=Ef(r,{relative:m});return w.useCallback(y=>{if(yx(y,a)){y.preventDefault();let k=i!==void 0?i:Ya(g)===Ya(v);h(r,{replace:k,state:c,preventScrollReset:d,relative:m,viewTransition:p})}},[g,h,v,i,c,a,r,d,m,p])}const Af=[{path:"/",name:"dashboard",component:"Dashboard",title:"Dashboard",description:"Main dashboard overview",exact:!0},{path:"/packages",name:"packages",component:"PackagesOverview",title:"Packages",description:"Package management and overview",exact:!0},{path:"/packages/:name",name:"package-detail",component:"PackageDetail",title:"Package Details",description:"Detailed view of a specific package"},{path:"/dependencies",name:"dependencies",component:"DependencyGraph",title:"Dependencies",description:"Dependency graph visualization"},{path:"/health",name:"health",component:"HealthStatus",title:"Health Status",description:"Monorepo health monitoring"},{path:"/publish",name:"publish",component:"PublishControl",title:"Publish Control",description:"Package publishing and versioning"},{path:"/release",name:"release",component:"ReleaseManager",title:"Release Manager",description:"Comprehensive release management with Changesets",protected:!0},{path:"/ci",name:"ci",component:"CIIntegration",title:"CI/CD",description:"Continuous integration and deployment"},{path:"/pipeline",name:"pipeline",component:"Pipeline",title:"Release Pipeline",description:"Real-time release pipeline monitoring and management",protected:!0},{path:"/config",name:"config",component:"ConfigInspector",title:"Configuration",description:"Configuration file inspector"}];Af.filter(r=>!r.path.includes(":")&&r.path!=="/");const fe="w-6 h-6",Ex=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M10.5 3.75H5.625a1.875 1.875 0 0 0-1.875 1.875V20.25a1.875 1.875 0 0 0 1.875 1.875h12.75a1.875 1.875 0 0 0 1.875-1.875V5.625a1.875 1.875 0 0 0-1.875-1.875H13.5m-3 0V3m0 .75H9m1.5 0h1.5m-9 6.75h12m-12 4.5h12"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})}),Dt=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})}),ti=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),ws=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),kx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}):t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:[t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),Tx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5.996 0 1.956-.11 2.895-.327m4.326-3.494a11.952 11.952 0 0 0 3.464-5.192c-1.292-4.338-5.31-7.5-10.066-7.5-.996 0-1.956.11-2.895.327m0 0a11.966 11.966 0 0 0-4.576 3.84m4.576-3.84a11.966 11.966 0 0 1 4.576 3.84M6.502 16.503a3 3 0 1 1 4.243-4.243m-4.243 4.243L3.75 19.75"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),Rx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:[t.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25z"}),t.jsx("path",{d:"M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})]}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),ni=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M8 5v14l11-7z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.591-.784l12 9c.54.406.54 1.358 0 1.764l-12 9c-.674.614-1.591.07-1.591-.784V5.653z"})}),Tc=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M7 14l5-5 5 5z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18"})}),Pf=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M7 10l5 5 5-5z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3"})}),_x=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),_m=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5L15.75 12l-7.5 7.5"})}),yl=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}),Ax=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),Rt=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),It=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.3 10.3l-1.3 1.3L13.3 15l1.3 1.3-1.3 1.3L12 16.3l-1.3 1.3-1.3-1.3L10.7 15 9.4 13.7l1.3-1.3L10.7 11l-1.3-1.3 1.3-1.3L12 10.3l1.3-1.3 1.3 1.3L13.3 11l1.3 1.3z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),bl=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})}),Sl=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M5 9.2h3V19H5zM10.6 5h2.8v14h-2.8zm5.6 8H19v6h-2.8z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75zM9.75 6.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v13.5c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V6.875zm6-4.5c-.621 0-1.125.504-1.125 1.125v15.75c0 .621.504 1.125 1.125 1.125h2.25a1.125 1.125 0 0 0 1.125-1.125V3.375c0-.621-.504-1.125-1.125-1.125h-2.25z"})}),Rc=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Lf=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM16 16v-3.5h-3v3.5h-3l4 4 4-4h-2z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.6 4.6 0 0 1-.88-9.1A5 5 0 1 1 15.9 6L16 6a5 5 0 1 1 .9 9.9m-5 5v-5m0 0L9.7 10.7M12 16l2.3-2.3"})}),Px=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.75 7.5A2.25 2.25 0 0 1 8 5.25h8a2.25 2.25 0 0 1 2.25 2.25v8a2.25 2.25 0 0 1-2.25 2.25H8A2.25 2.25 0 0 1 5.75 15V7.5Z"})}),ri=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"})}),_c=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2z"})}),qa=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),Ac=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 8h10M7 12h10m-7 4h7M9 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-4l-2-2z"})}),Lx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),Ox=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.185 0-2.25 1.065-2.25 2.25v5.338a2.25 2.25 0 0 0 .375 1.322l1.968 2.332c.494.583.745 1.379.745 2.191V17.5a2.25 2.25 0 0 0 2.25 2.25h5a2.25 2.25 0 0 0 2.25-2.25v-1.5a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 1-.75.75h-5a.75.75 0 0 1-.75-.75V9.991a.75.75 0 0 1-.75-.75V4.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 0 1.5 0V4.5c0-.647-.146-1.262-.406-1.812z"})}),Pc=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.402.402.937.629 1.531.629a2.16 2.16 0 0 0 1.532-.629l7.04-7.04a2.16 2.16 0 0 0 .628-1.532c0-.595-.227-1.129-.628-1.531l-9.58-9.581a2.25 2.25 0 0 0-1.592-.659H9.568z"})}),Of=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zM14.25 15h.008v.008H14.25V15zm0 2.25h.008v.008H14.25v-.008zM16.5 15h.008v.008H16.5V15zm0 2.25h.008v.008H16.5v-.008z"})}),Be=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),si=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.039l1.758-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})}),On=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:[t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})," "]}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})}),Lc=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5z"})}),li=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),xs=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9-3.75h.008v.008H12V8.25z"})}),st=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})}),dr=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z"})}),If=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:[t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Mr=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:[t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Ix=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0H8.25m4.125 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0H12.25m4.125 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),Am=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})}),Pm=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.655.355-1.08.852-1.358 1.446-.201.416-.348.665-.518.923a2.712 2.712 0 0 0-.5 1.703c0 .462.1.946.348 1.384.245.531.645 1.046 1.28 1.696a.75.75 0 0 0 1.067-.03c.635-.64 1.035-1.165 1.28-1.696.248-.438.348-.922.348-1.384a2.712 2.712 0 0 0-.5-1.703c-.17-.258-.317-.507-.518-.923-.278-.594-.703-1.091-1.358-1.446m0 0C9.806 2.94 10.923 2.5 12 2.5c1.077 0 2.194.44 3.15 1.336m-1.8 0c.068.087.137.176.207.266.343.417.682.83 1.013 1.296.31.426.629.846 1.013 1.296a.75.75 0 0 0-.584 1.28 60.461 60.461 0 0 1-2.694-.449.75.75 0 0 0-.606.073c-.223.145-.456.366-.656.732a2.75 2.75 0 0 0-.426-1.26c0-.45.09-.88.258-1.28H9m0 0c.068.087.137.176.207.266.343.417.682.83 1.013 1.296.31.426.629.846 1.013 1.296M6.75 12a3 3 0 1 1 6 0 3 3 0 0 1-6 0zm12 0a3 3 0 1 1 6 0 3 3 0 0 1-6 0z"})}),Mx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25-4.5h17.25m-17.25-4.5h17.25m-17.25-4.5h17.25"})}),Dx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5.432 15.3a9.01 9.01 0 0 0-2.02 3.991v2.084a2.25 2.25 0 0 0 2.25 2.25h13.636a2.25 2.25 0 0 0 2.25-2.25v-2.084a9.01 9.01 0 0 0-2.02-3.991l-3.659-4.591A2.25 2.25 0 0 1 14.25 8.818v-5.714m0 0L9.75 3.104M14.25 3.104l4.5 0v5.714a2.25 2.25 0 0 1-.659 1.591L18.568 15.3"})}),Fx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6.75v10.5a.75.75 0 0 1-1.5 0V6.75m0 0a.75.75 0 0 1 1.5 0zm12 0v10.5a.75.75 0 0 1-1.5 0V6.75m0 0a.75.75 0 0 1 1.5 0z"})}),dc=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9z"})}),Ux=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5zm-6-3.75h.008v.008H12v-.008zm0 2.25h.008v.008H12v-.008zm0-8.25h.008v.008H12V8.25z"})}),Bx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5zm-3-7.5h-3m0 0H9m0 0v3m0-3v-3"})}),zx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}),Hx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})}),$x=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})}),Vx=({className:r=fe,width:s=24,height:a=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:a,children:t.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v 3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})}),mc={LOGIN_SUCCESS:"Login successful! Redirecting...",LOGIN_FAILED:"Login failed",LOGOUT_SUCCESS:"You have been logged out",SESSION_EXPIRED:"Your session has expired. Please login again.",AUTH_FAILED:"Authentication failed"},be={UNKNOWN_ERROR:"Unknown error occurred",NETWORK_ERROR:"Network error. Please check your connection.",FAILED_TO_FETCH_PACKAGES:"Failed to fetch workspace packages",FAILED_TO_FETCH_WORKFLOWS:"Failed to fetch workflows",FAILED_TO_TRIGGER_WORKFLOW:"Failed to trigger workflow",FAILED_TO_CANCEL_RUN:"Failed to cancel workflow run",FAILED_TO_RERUN_WORKFLOW:"Failed to rerun workflow",FAILED_TO_FETCH_LOGS:"Failed to fetch job logs",PERMISSION_ERROR:"Permission denied",AUTHENTICATION_ERROR:"Authentication error",FAILED_TO_FETCH_USER_INFO:"Failed to fetch user info",FAILED_TO_REFRESH_SESSION:"Failed to refresh session",FAILED_TO_CHECK_PERMISSION:"Failed to check permission",FAILED_TO_CHECK_ACTION_PERMISSION:"Failed to check action permission",VALIDATION_FAILED:"Validation failed",FAILED_TO_CREATE_CHANGESET:"Failed to create changeset",FAILED_TO_TRIGGER_PUBLISH:"Failed to trigger publish",FAILED_TO_SAVE_CONFIG:"Failed to save configuration"},Wx="Describe the changes in this release (e.g., 'Add new API endpoints for user management')",Gx="Summary must be at least 10 characters";var Lm={};const Kx="localhost",Yx=8999,qx=3e4,Qx=6e4,Mf=Lm.REACT_APP_API_URL||Lm.VITE_API_URL||`http://${Kx}:${Yx}`,Re={AUTH:{LOGIN:"/auth/login",CALLBACK:"/auth/callback",ME:"/auth/me",VALIDATE:"/auth/validate",LOGOUT:"/auth/logout",REFRESH:"/auth/refresh"},PACKAGES:{REFRESH:"/packages/refresh",UPDATE_CONFIG:"/packages/update-config",LIST:"/packages",DETAILS:r=>`/packages/${encodeURIComponent(r)}`},PIPELINES:{LIST:"/pipelines",STATUS:r=>`/pipelines/${r}/status`},PUBLISH:{PREVIEW:"/publish/preview",STATUS:"/publish/status",PACKAGES:"/publish/packages",CHANGESETS:"/publish/changesets",CREATE_CHANGESET:"/publish/changesets/create",TRIGGER:"/publish/trigger"},CONFIG:{FILES:"/config/files",FILE:r=>`/config/files/${encodeURIComponent(r)}`},HEALTH:{PACKAGES:"/health/packages",REFRESH:"/health/refresh"},WORKFLOWS:{LIST:(r,s)=>`/workflows/${r}/${s}`,AVAILABLE:(r,s)=>`/workflows/${r}/${s}/available`,BY_PACKAGE:(r,s,a)=>`/workflows/package/${r}/${s}/${encodeURIComponent(a)}`,RUNS:(r,s,a)=>`/workflows/${r}/${s}/runs/${a}`,LOGS:(r,s,a)=>`/workflows/${r}/${s}/jobs/${a}/logs`,TRIGGER:(r,s)=>`/workflows/${r}/${s}/trigger`,CANCEL:(r,s,a)=>`/workflows/${r}/${s}/runs/${a}/cancel`,RERUN:(r,s,a)=>`/workflows/${r}/${s}/runs/${a}/rerun`}};function Df(r,s){return function(){return r.apply(s,arguments)}}const{toString:Jx}=Object.prototype,{getPrototypeOf:Oc}=Object,{iterator:ai,toStringTag:Ff}=Symbol,ii=(r=>s=>{const a=Jx.call(s);return r[a]||(r[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),on=r=>(r=r.toLowerCase(),s=>ii(s)===r),oi=r=>s=>typeof s===r,{isArray:Ns}=Array,gs=oi("undefined");function Cl(r){return r!==null&&!gs(r)&&r.constructor!==null&&!gs(r.constructor)&&kt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Uf=on("ArrayBuffer");function Xx(r){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(r):s=r&&r.buffer&&Uf(r.buffer),s}const Zx=oi("string"),kt=oi("function"),Bf=oi("number"),El=r=>r!==null&&typeof r=="object",eg=r=>r===!0||r===!1,Va=r=>{if(ii(r)!=="object")return!1;const s=Oc(r);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Ff in r)&&!(ai in r)},tg=r=>{if(!El(r)||Cl(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},ng=on("Date"),rg=on("File"),sg=on("Blob"),lg=on("FileList"),ag=r=>El(r)&&kt(r.pipe),ig=r=>{let s;return r&&(typeof FormData=="function"&&r instanceof FormData||kt(r.append)&&((s=ii(r))==="formdata"||s==="object"&&kt(r.toString)&&r.toString()==="[object FormData]"))},og=on("URLSearchParams"),[cg,ug,dg,mg]=["ReadableStream","Request","Response","Headers"].map(on),fg=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function kl(r,s,{allOwnKeys:a=!1}={}){if(r===null||typeof r>"u")return;let i,c;if(typeof r!="object"&&(r=[r]),Ns(r))for(i=0,c=r.length;i<c;i++)s.call(null,r[i],i,r);else{if(Cl(r))return;const d=a?Object.getOwnPropertyNames(r):Object.keys(r),m=d.length;let p;for(i=0;i<m;i++)p=d[i],s.call(null,r[p],p,r)}}function zf(r,s){if(Cl(r))return null;s=s.toLowerCase();const a=Object.keys(r);let i=a.length,c;for(;i-- >0;)if(c=a[i],s===c.toLowerCase())return c;return null}const Or=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hf=r=>!gs(r)&&r!==Or;function fc(){const{caseless:r,skipUndefined:s}=Hf(this)&&this||{},a={},i=(c,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const m=r&&zf(a,d)||d;Va(a[m])&&Va(c)?a[m]=fc(a[m],c):Va(c)?a[m]=fc({},c):Ns(c)?a[m]=c.slice():(!s||!gs(c))&&(a[m]=c)};for(let c=0,d=arguments.length;c<d;c++)arguments[c]&&kl(arguments[c],i);return a}const hg=(r,s,a,{allOwnKeys:i}={})=>(kl(s,(c,d)=>{a&&kt(c)?Object.defineProperty(r,d,{value:Df(c,a),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,d,{value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),r),pg=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),xg=(r,s,a,i)=>{r.prototype=Object.create(s.prototype,i),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:s.prototype}),a&&Object.assign(r.prototype,a)},gg=(r,s,a,i)=>{let c,d,m;const p={};if(s=s||{},r==null)return s;do{for(c=Object.getOwnPropertyNames(r),d=c.length;d-- >0;)m=c[d],(!i||i(m,r,s))&&!p[m]&&(s[m]=r[m],p[m]=!0);r=a!==!1&&Oc(r)}while(r&&(!a||a(r,s))&&r!==Object.prototype);return s},yg=(r,s,a)=>{r=String(r),(a===void 0||a>r.length)&&(a=r.length),a-=s.length;const i=r.indexOf(s,a);return i!==-1&&i===a},vg=r=>{if(!r)return null;if(Ns(r))return r;let s=r.length;if(!Bf(s))return null;const a=new Array(s);for(;s-- >0;)a[s]=r[s];return a},jg=(r=>s=>r&&s instanceof r)(typeof Uint8Array<"u"&&Oc(Uint8Array)),wg=(r,s)=>{const i=(r&&r[ai]).call(r);let c;for(;(c=i.next())&&!c.done;){const d=c.value;s.call(r,d[0],d[1])}},Ng=(r,s)=>{let a;const i=[];for(;(a=r.exec(s))!==null;)i.push(a);return i},bg=on("HTMLFormElement"),Sg=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,i,c){return i.toUpperCase()+c}),Om=(({hasOwnProperty:r})=>(s,a)=>r.call(s,a))(Object.prototype),Cg=on("RegExp"),$f=(r,s)=>{const a=Object.getOwnPropertyDescriptors(r),i={};kl(a,(c,d)=>{let m;(m=s(c,d,r))!==!1&&(i[d]=m||c)}),Object.defineProperties(r,i)},Eg=r=>{$f(r,(s,a)=>{if(kt(r)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const i=r[a];if(kt(i)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},kg=(r,s)=>{const a={},i=c=>{c.forEach(d=>{a[d]=!0})};return Ns(r)?i(r):i(String(r).split(s)),a},Tg=()=>{},Rg=(r,s)=>r!=null&&Number.isFinite(r=+r)?r:s;function _g(r){return!!(r&&kt(r.append)&&r[Ff]==="FormData"&&r[ai])}const Ag=r=>{const s=new Array(10),a=(i,c)=>{if(El(i)){if(s.indexOf(i)>=0)return;if(Cl(i))return i;if(!("toJSON"in i)){s[c]=i;const d=Ns(i)?[]:{};return kl(i,(m,p)=>{const h=a(m,c+1);!gs(h)&&(d[p]=h)}),s[c]=void 0,d}}return i};return a(r,0)},Pg=on("AsyncFunction"),Lg=r=>r&&(El(r)||kt(r))&&kt(r.then)&&kt(r.catch),Vf=((r,s)=>r?setImmediate:s?((a,i)=>(Or.addEventListener("message",({source:c,data:d})=>{c===Or&&d===a&&i.length&&i.shift()()},!1),c=>{i.push(c),Or.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",kt(Or.postMessage)),Og=typeof queueMicrotask<"u"?queueMicrotask.bind(Or):typeof process<"u"&&process.nextTick||Vf,Ig=r=>r!=null&&kt(r[ai]),O={isArray:Ns,isArrayBuffer:Uf,isBuffer:Cl,isFormData:ig,isArrayBufferView:Xx,isString:Zx,isNumber:Bf,isBoolean:eg,isObject:El,isPlainObject:Va,isEmptyObject:tg,isReadableStream:cg,isRequest:ug,isResponse:dg,isHeaders:mg,isUndefined:gs,isDate:ng,isFile:rg,isBlob:sg,isRegExp:Cg,isFunction:kt,isStream:ag,isURLSearchParams:og,isTypedArray:jg,isFileList:lg,forEach:kl,merge:fc,extend:hg,trim:fg,stripBOM:pg,inherits:xg,toFlatObject:gg,kindOf:ii,kindOfTest:on,endsWith:yg,toArray:vg,forEachEntry:wg,matchAll:Ng,isHTMLForm:bg,hasOwnProperty:Om,hasOwnProp:Om,reduceDescriptors:$f,freezeMethods:Eg,toObjectSet:kg,toCamelCase:Sg,noop:Tg,toFiniteNumber:Rg,findKey:zf,global:Or,isContextDefined:Hf,isSpecCompliantForm:_g,toJSONObject:Ag,isAsyncFn:Pg,isThenable:Lg,setImmediate:Vf,asap:Og,isIterable:Ig};let xe=class Wf extends Error{static from(s,a,i,c,d,m){const p=new Wf(s.message,a||s.code,i,c,d);return p.cause=s,p.name=s.name,m&&Object.assign(p,m),p}constructor(s,a,i,c,d){super(s),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),i&&(this.config=i),c&&(this.request=c),d&&(this.response=d,this.status=d.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}};xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";xe.ERR_BAD_OPTION="ERR_BAD_OPTION";xe.ECONNABORTED="ECONNABORTED";xe.ETIMEDOUT="ETIMEDOUT";xe.ERR_NETWORK="ERR_NETWORK";xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";xe.ERR_DEPRECATED="ERR_DEPRECATED";xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";xe.ERR_CANCELED="ERR_CANCELED";xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";xe.ERR_INVALID_URL="ERR_INVALID_URL";const Mg=null;function hc(r){return O.isPlainObject(r)||O.isArray(r)}function Gf(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function Im(r,s,a){return r?r.concat(s).map(function(c,d){return c=Gf(c),!a&&d?"["+c+"]":c}).join(a?".":""):s}function Dg(r){return O.isArray(r)&&!r.some(hc)}const Fg=O.toFlatObject(O,{},null,function(s){return/^is[A-Z]/.test(s)});function ci(r,s,a){if(!O.isObject(r))throw new TypeError("target must be an object");s=s||new FormData,a=O.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,b){return!O.isUndefined(b[R])});const i=a.metaTokens,c=a.visitor||v,d=a.dots,m=a.indexes,h=(a.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(s);if(!O.isFunction(c))throw new TypeError("visitor must be a function");function g(N){if(N===null)return"";if(O.isDate(N))return N.toISOString();if(O.isBoolean(N))return N.toString();if(!h&&O.isBlob(N))throw new xe("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(N)||O.isTypedArray(N)?h&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function v(N,R,b){let D=N;if(N&&!b&&typeof N=="object"){if(O.endsWith(R,"{}"))R=i?R:R.slice(0,-2),N=JSON.stringify(N);else if(O.isArray(N)&&Dg(N)||(O.isFileList(N)||O.endsWith(R,"[]"))&&(D=O.toArray(N)))return R=Gf(R),D.forEach(function(I,U){!(O.isUndefined(I)||I===null)&&s.append(m===!0?Im([R],U,d):m===null?R:R+"[]",g(I))}),!1}return hc(N)?!0:(s.append(Im(b,R,d),g(N)),!1)}const y=[],k=Object.assign(Fg,{defaultVisitor:v,convertValue:g,isVisitable:hc});function M(N,R){if(!O.isUndefined(N)){if(y.indexOf(N)!==-1)throw Error("Circular reference detected in "+R.join("."));y.push(N),O.forEach(N,function(D,_){(!(O.isUndefined(D)||D===null)&&c.call(s,D,O.isString(_)?_.trim():_,R,k))===!0&&M(D,R?R.concat(_):[_])}),y.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return M(r),s}function Mm(r){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return s[i]})}function Ic(r,s){this._pairs=[],r&&ci(r,this,s)}const Kf=Ic.prototype;Kf.append=function(s,a){this._pairs.push([s,a])};Kf.toString=function(s){const a=s?function(i){return s.call(this,i,Mm)}:Mm;return this._pairs.map(function(c){return a(c[0])+"="+a(c[1])},"").join("&")};function Ug(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yf(r,s,a){if(!s)return r;const i=a&&a.encode||Ug,c=O.isFunction(a)?{serialize:a}:a,d=c&&c.serialize;let m;if(d?m=d(s,c):m=O.isURLSearchParams(s)?s.toString():new Ic(s,c).toString(i),m){const p=r.indexOf("#");p!==-1&&(r=r.slice(0,p)),r+=(r.indexOf("?")===-1?"?":"&")+m}return r}class Dm{constructor(){this.handlers=[]}use(s,a,i){return this.handlers.push({fulfilled:s,rejected:a,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){O.forEach(this.handlers,function(i){i!==null&&s(i)})}}const Mc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Bg=typeof URLSearchParams<"u"?URLSearchParams:Ic,zg=typeof FormData<"u"?FormData:null,Hg=typeof Blob<"u"?Blob:null,$g={isBrowser:!0,classes:{URLSearchParams:Bg,FormData:zg,Blob:Hg},protocols:["http","https","file","blob","url","data"]},Dc=typeof window<"u"&&typeof document<"u",pc=typeof navigator=="object"&&navigator||void 0,Vg=Dc&&(!pc||["ReactNative","NativeScript","NS"].indexOf(pc.product)<0),Wg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Gg=Dc&&window.location.href||"http://localhost",Kg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Dc,hasStandardBrowserEnv:Vg,hasStandardBrowserWebWorkerEnv:Wg,navigator:pc,origin:Gg},Symbol.toStringTag,{value:"Module"})),ft={...Kg,...$g};function Yg(r,s){return ci(r,new ft.classes.URLSearchParams,{visitor:function(a,i,c,d){return ft.isNode&&O.isBuffer(a)?(this.append(i,a.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...s})}function qg(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(s=>s[0]==="[]"?"":s[1]||s[0])}function Qg(r){const s={},a=Object.keys(r);let i;const c=a.length;let d;for(i=0;i<c;i++)d=a[i],s[d]=r[d];return s}function qf(r){function s(a,i,c,d){let m=a[d++];if(m==="__proto__")return!0;const p=Number.isFinite(+m),h=d>=a.length;return m=!m&&O.isArray(c)?c.length:m,h?(O.hasOwnProp(c,m)?c[m]=[c[m],i]:c[m]=i,!p):((!c[m]||!O.isObject(c[m]))&&(c[m]=[]),s(a,i,c[m],d)&&O.isArray(c[m])&&(c[m]=Qg(c[m])),!p)}if(O.isFormData(r)&&O.isFunction(r.entries)){const a={};return O.forEachEntry(r,(i,c)=>{s(qg(i),c,a,0)}),a}return null}function Jg(r,s,a){if(O.isString(r))try{return(s||JSON.parse)(r),O.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(a||JSON.stringify)(r)}const Tl={transitional:Mc,adapter:["xhr","http","fetch"],transformRequest:[function(s,a){const i=a.getContentType()||"",c=i.indexOf("application/json")>-1,d=O.isObject(s);if(d&&O.isHTMLForm(s)&&(s=new FormData(s)),O.isFormData(s))return c?JSON.stringify(qf(s)):s;if(O.isArrayBuffer(s)||O.isBuffer(s)||O.isStream(s)||O.isFile(s)||O.isBlob(s)||O.isReadableStream(s))return s;if(O.isArrayBufferView(s))return s.buffer;if(O.isURLSearchParams(s))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(d){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Yg(s,this.formSerializer).toString();if((p=O.isFileList(s))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ci(p?{"files[]":s}:s,h&&new h,this.formSerializer)}}return d||c?(a.setContentType("application/json",!1),Jg(s)):s}],transformResponse:[function(s){const a=this.transitional||Tl.transitional,i=a&&a.forcedJSONParsing,c=this.responseType==="json";if(O.isResponse(s)||O.isReadableStream(s))return s;if(s&&O.isString(s)&&(i&&!this.responseType||c)){const m=!(a&&a.silentJSONParsing)&&c;try{return JSON.parse(s,this.parseReviver)}catch(p){if(m)throw p.name==="SyntaxError"?xe.from(p,xe.ERR_BAD_RESPONSE,this,null,this.response):p}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],r=>{Tl.headers[r]={}});const Xg=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Zg=r=>{const s={};let a,i,c;return r&&r.split(`
9
+ `).forEach(function(m){c=m.indexOf(":"),a=m.substring(0,c).trim().toLowerCase(),i=m.substring(c+1).trim(),!(!a||s[a]&&Xg[a])&&(a==="set-cookie"?s[a]?s[a].push(i):s[a]=[i]:s[a]=s[a]?s[a]+", "+i:i)}),s},Fm=Symbol("internals");function ml(r){return r&&String(r).trim().toLowerCase()}function Wa(r){return r===!1||r==null?r:O.isArray(r)?r.map(Wa):String(r)}function ey(r){const s=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=a.exec(r);)s[i[1]]=i[2];return s}const ty=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Xo(r,s,a,i,c){if(O.isFunction(i))return i.call(this,s,a);if(c&&(s=a),!!O.isString(s)){if(O.isString(i))return s.indexOf(i)!==-1;if(O.isRegExp(i))return i.test(s)}}function ny(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,a,i)=>a.toUpperCase()+i)}function ry(r,s){const a=O.toCamelCase(" "+s);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+a,{value:function(c,d,m){return this[i].call(this,s,c,d,m)},configurable:!0})})}let Tt=class{constructor(s){s&&this.set(s)}set(s,a,i){const c=this;function d(p,h,g){const v=ml(h);if(!v)throw new Error("header name must be a non-empty string");const y=O.findKey(c,v);(!y||c[y]===void 0||g===!0||g===void 0&&c[y]!==!1)&&(c[y||h]=Wa(p))}const m=(p,h)=>O.forEach(p,(g,v)=>d(g,v,h));if(O.isPlainObject(s)||s instanceof this.constructor)m(s,a);else if(O.isString(s)&&(s=s.trim())&&!ty(s))m(Zg(s),a);else if(O.isObject(s)&&O.isIterable(s)){let p={},h,g;for(const v of s){if(!O.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[g=v[0]]=(h=p[g])?O.isArray(h)?[...h,v[1]]:[h,v[1]]:v[1]}m(p,a)}else s!=null&&d(a,s,i);return this}get(s,a){if(s=ml(s),s){const i=O.findKey(this,s);if(i){const c=this[i];if(!a)return c;if(a===!0)return ey(c);if(O.isFunction(a))return a.call(this,c,i);if(O.isRegExp(a))return a.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,a){if(s=ml(s),s){const i=O.findKey(this,s);return!!(i&&this[i]!==void 0&&(!a||Xo(this,this[i],i,a)))}return!1}delete(s,a){const i=this;let c=!1;function d(m){if(m=ml(m),m){const p=O.findKey(i,m);p&&(!a||Xo(i,i[p],p,a))&&(delete i[p],c=!0)}}return O.isArray(s)?s.forEach(d):d(s),c}clear(s){const a=Object.keys(this);let i=a.length,c=!1;for(;i--;){const d=a[i];(!s||Xo(this,this[d],d,s,!0))&&(delete this[d],c=!0)}return c}normalize(s){const a=this,i={};return O.forEach(this,(c,d)=>{const m=O.findKey(i,d);if(m){a[m]=Wa(c),delete a[d];return}const p=s?ny(d):String(d).trim();p!==d&&delete a[d],a[p]=Wa(c),i[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const a=Object.create(null);return O.forEach(this,(i,c)=>{i!=null&&i!==!1&&(a[c]=s&&O.isArray(i)?i.join(", "):i)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,a])=>s+": "+a).join(`
10
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...a){const i=new this(s);return a.forEach(c=>i.set(c)),i}static accessor(s){const i=(this[Fm]=this[Fm]={accessors:{}}).accessors,c=this.prototype;function d(m){const p=ml(m);i[p]||(ry(c,m),i[p]=!0)}return O.isArray(s)?s.forEach(d):d(s),this}};Tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(Tt.prototype,({value:r},s)=>{let a=s[0].toUpperCase()+s.slice(1);return{get:()=>r,set(i){this[a]=i}}});O.freezeMethods(Tt);function Zo(r,s){const a=this||Tl,i=s||a,c=Tt.from(i.headers);let d=i.data;return O.forEach(r,function(p){d=p.call(a,d,c.normalize(),s?s.status:void 0)}),c.normalize(),d}function Qf(r){return!!(r&&r.__CANCEL__)}let Rl=class extends xe{constructor(s,a,i){super(s??"canceled",xe.ERR_CANCELED,a,i),this.name="CanceledError",this.__CANCEL__=!0}};function Jf(r,s,a){const i=a.config.validateStatus;!a.status||!i||i(a.status)?r(a):s(new xe("Request failed with status code "+a.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function sy(r){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return s&&s[1]||""}function ly(r,s){r=r||10;const a=new Array(r),i=new Array(r);let c=0,d=0,m;return s=s!==void 0?s:1e3,function(h){const g=Date.now(),v=i[d];m||(m=g),a[c]=h,i[c]=g;let y=d,k=0;for(;y!==c;)k+=a[y++],y=y%r;if(c=(c+1)%r,c===d&&(d=(d+1)%r),g-m<s)return;const M=v&&g-v;return M?Math.round(k*1e3/M):void 0}}function ay(r,s){let a=0,i=1e3/s,c,d;const m=(g,v=Date.now())=>{a=v,c=null,d&&(clearTimeout(d),d=null),r(...g)};return[(...g)=>{const v=Date.now(),y=v-a;y>=i?m(g,v):(c=g,d||(d=setTimeout(()=>{d=null,m(c)},i-y)))},()=>c&&m(c)]}const Qa=(r,s,a=3)=>{let i=0;const c=ly(50,250);return ay(d=>{const m=d.loaded,p=d.lengthComputable?d.total:void 0,h=m-i,g=c(h),v=m<=p;i=m;const y={loaded:m,total:p,progress:p?m/p:void 0,bytes:h,rate:g||void 0,estimated:g&&p&&v?(p-m)/g:void 0,event:d,lengthComputable:p!=null,[s?"download":"upload"]:!0};r(y)},a)},Um=(r,s)=>{const a=r!=null;return[i=>s[0]({lengthComputable:a,total:r,loaded:i}),s[1]]},Bm=r=>(...s)=>O.asap(()=>r(...s)),iy=ft.hasStandardBrowserEnv?((r,s)=>a=>(a=new URL(a,ft.origin),r.protocol===a.protocol&&r.host===a.host&&(s||r.port===a.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,oy=ft.hasStandardBrowserEnv?{write(r,s,a,i,c,d,m){if(typeof document>"u")return;const p=[`${r}=${encodeURIComponent(s)}`];O.isNumber(a)&&p.push(`expires=${new Date(a).toUTCString()}`),O.isString(i)&&p.push(`path=${i}`),O.isString(c)&&p.push(`domain=${c}`),d===!0&&p.push("secure"),O.isString(m)&&p.push(`SameSite=${m}`),document.cookie=p.join("; ")},read(r){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function cy(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function uy(r,s){return s?r.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):r}function Xf(r,s,a){let i=!cy(s);return r&&(i||a==!1)?uy(r,s):s}const zm=r=>r instanceof Tt?{...r}:r;function Dr(r,s){s=s||{};const a={};function i(g,v,y,k){return O.isPlainObject(g)&&O.isPlainObject(v)?O.merge.call({caseless:k},g,v):O.isPlainObject(v)?O.merge({},v):O.isArray(v)?v.slice():v}function c(g,v,y,k){if(O.isUndefined(v)){if(!O.isUndefined(g))return i(void 0,g,y,k)}else return i(g,v,y,k)}function d(g,v){if(!O.isUndefined(v))return i(void 0,v)}function m(g,v){if(O.isUndefined(v)){if(!O.isUndefined(g))return i(void 0,g)}else return i(void 0,v)}function p(g,v,y){if(y in s)return i(g,v);if(y in r)return i(void 0,g)}const h={url:d,method:d,data:d,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:p,headers:(g,v,y)=>c(zm(g),zm(v),y,!0)};return O.forEach(Object.keys({...r,...s}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const y=O.hasOwnProp(h,v)?h[v]:c,k=y(r[v],s[v],v);O.isUndefined(k)&&y!==p||(a[v]=k)}),a}const Zf=r=>{const s=Dr({},r);let{data:a,withXSRFToken:i,xsrfHeaderName:c,xsrfCookieName:d,headers:m,auth:p}=s;if(s.headers=m=Tt.from(m),s.url=Yf(Xf(s.baseURL,s.url,s.allowAbsoluteUrls),r.params,r.paramsSerializer),p&&m.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),O.isFormData(a)){if(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(O.isFunction(a.getHeaders)){const h=a.getHeaders(),g=["content-type","content-length"];Object.entries(h).forEach(([v,y])=>{g.includes(v.toLowerCase())&&m.set(v,y)})}}if(ft.hasStandardBrowserEnv&&(i&&O.isFunction(i)&&(i=i(s)),i||i!==!1&&iy(s.url))){const h=c&&d&&oy.read(d);h&&m.set(c,h)}return s},dy=typeof XMLHttpRequest<"u",my=dy&&function(r){return new Promise(function(a,i){const c=Zf(r);let d=c.data;const m=Tt.from(c.headers).normalize();let{responseType:p,onUploadProgress:h,onDownloadProgress:g}=c,v,y,k,M,N;function R(){M&&M(),N&&N(),c.cancelToken&&c.cancelToken.unsubscribe(v),c.signal&&c.signal.removeEventListener("abort",v)}let b=new XMLHttpRequest;b.open(c.method.toUpperCase(),c.url,!0),b.timeout=c.timeout;function D(){if(!b)return;const I=Tt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),q={data:!p||p==="text"||p==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:I,config:r,request:b};Jf(function($){a($),R()},function($){i($),R()},q),b=null}"onloadend"in b?b.onloadend=D:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(D)},b.onabort=function(){b&&(i(new xe("Request aborted",xe.ECONNABORTED,r,b)),b=null)},b.onerror=function(U){const q=U&&U.message?U.message:"Network Error",he=new xe(q,xe.ERR_NETWORK,r,b);he.event=U||null,i(he),b=null},b.ontimeout=function(){let U=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded";const q=c.transitional||Mc;c.timeoutErrorMessage&&(U=c.timeoutErrorMessage),i(new xe(U,q.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,r,b)),b=null},d===void 0&&m.setContentType(null),"setRequestHeader"in b&&O.forEach(m.toJSON(),function(U,q){b.setRequestHeader(q,U)}),O.isUndefined(c.withCredentials)||(b.withCredentials=!!c.withCredentials),p&&p!=="json"&&(b.responseType=c.responseType),g&&([k,N]=Qa(g,!0),b.addEventListener("progress",k)),h&&b.upload&&([y,M]=Qa(h),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",M)),(c.cancelToken||c.signal)&&(v=I=>{b&&(i(!I||I.type?new Rl(null,r,b):I),b.abort(),b=null)},c.cancelToken&&c.cancelToken.subscribe(v),c.signal&&(c.signal.aborted?v():c.signal.addEventListener("abort",v)));const _=sy(c.url);if(_&&ft.protocols.indexOf(_)===-1){i(new xe("Unsupported protocol "+_+":",xe.ERR_BAD_REQUEST,r));return}b.send(d||null)})},fy=(r,s)=>{const{length:a}=r=r?r.filter(Boolean):[];if(s||a){let i=new AbortController,c;const d=function(g){if(!c){c=!0,p();const v=g instanceof Error?g:this.reason;i.abort(v instanceof xe?v:new Rl(v instanceof Error?v.message:v))}};let m=s&&setTimeout(()=>{m=null,d(new xe(`timeout of ${s}ms exceeded`,xe.ETIMEDOUT))},s);const p=()=>{r&&(m&&clearTimeout(m),m=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),r=null)};r.forEach(g=>g.addEventListener("abort",d));const{signal:h}=i;return h.unsubscribe=()=>O.asap(p),h}},hy=function*(r,s){let a=r.byteLength;if(a<s){yield r;return}let i=0,c;for(;i<a;)c=i+s,yield r.slice(i,c),i=c},py=async function*(r,s){for await(const a of xy(r))yield*hy(a,s)},xy=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const s=r.getReader();try{for(;;){const{done:a,value:i}=await s.read();if(a)break;yield i}}finally{await s.cancel()}},Hm=(r,s,a,i)=>{const c=py(r,s);let d=0,m,p=h=>{m||(m=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:g,value:v}=await c.next();if(g){p(),h.close();return}let y=v.byteLength;if(a){let k=d+=y;a(k)}h.enqueue(new Uint8Array(v))}catch(g){throw p(g),g}},cancel(h){return p(h),c.return()}},{highWaterMark:2})},$m=64*1024,{isFunction:za}=O,gy=(({Request:r,Response:s})=>({Request:r,Response:s}))(O.global),{ReadableStream:Vm,TextEncoder:Wm}=O.global,Gm=(r,...s)=>{try{return!!r(...s)}catch{return!1}},yy=r=>{r=O.merge.call({skipUndefined:!0},gy,r);const{fetch:s,Request:a,Response:i}=r,c=s?za(s):typeof fetch=="function",d=za(a),m=za(i);if(!c)return!1;const p=c&&za(Vm),h=c&&(typeof Wm=="function"?(N=>R=>N.encode(R))(new Wm):async N=>new Uint8Array(await new a(N).arrayBuffer())),g=d&&p&&Gm(()=>{let N=!1;const R=new a(ft.origin,{body:new Vm,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!R}),v=m&&p&&Gm(()=>O.isReadableStream(new i("").body)),y={stream:v&&(N=>N.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!y[N]&&(y[N]=(R,b)=>{let D=R&&R[N];if(D)return D.call(R);throw new xe(`Response type '${N}' is not supported`,xe.ERR_NOT_SUPPORT,b)})});const k=async N=>{if(N==null)return 0;if(O.isBlob(N))return N.size;if(O.isSpecCompliantForm(N))return(await new a(ft.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(O.isArrayBufferView(N)||O.isArrayBuffer(N))return N.byteLength;if(O.isURLSearchParams(N)&&(N=N+""),O.isString(N))return(await h(N)).byteLength},M=async(N,R)=>{const b=O.toFiniteNumber(N.getContentLength());return b??k(R)};return async N=>{let{url:R,method:b,data:D,signal:_,cancelToken:I,timeout:U,onDownloadProgress:q,onUploadProgress:he,responseType:$,headers:pe,withCredentials:we="same-origin",fetchOptions:je}=Zf(N),te=s||fetch;$=$?($+"").toLowerCase():"text";let ve=fy([_,I&&I.toAbortSignal()],U),ce=null;const ge=ve&&ve.unsubscribe&&(()=>{ve.unsubscribe()});let oe;try{if(he&&g&&b!=="get"&&b!=="head"&&(oe=await M(pe,D))!==0){let S=new a(R,{method:"POST",body:D,duplex:"half"}),F;if(O.isFormData(D)&&(F=S.headers.get("content-type"))&&pe.setContentType(F),S.body){const[ee,ue]=Um(oe,Qa(Bm(he)));D=Hm(S.body,$m,ee,ue)}}O.isString(we)||(we=we?"include":"omit");const Q=d&&"credentials"in a.prototype,J={...je,signal:ve,method:b.toUpperCase(),headers:pe.normalize().toJSON(),body:D,duplex:"half",credentials:Q?we:void 0};ce=d&&new a(R,J);let B=await(d?te(ce,je):te(R,J));const Y=v&&($==="stream"||$==="response");if(v&&(q||Y&&ge)){const S={};["status","statusText","headers"].forEach(ne=>{S[ne]=B[ne]});const F=O.toFiniteNumber(B.headers.get("content-length")),[ee,ue]=q&&Um(F,Qa(Bm(q),!0))||[];B=new i(Hm(B.body,$m,ee,()=>{ue&&ue(),ge&&ge()}),S)}$=$||"text";let K=await y[O.findKey(y,$)||"text"](B,N);return!Y&&ge&&ge(),await new Promise((S,F)=>{Jf(S,F,{data:K,headers:Tt.from(B.headers),status:B.status,statusText:B.statusText,config:N,request:ce})})}catch(Q){throw ge&&ge(),Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)?Object.assign(new xe("Network Error",xe.ERR_NETWORK,N,ce,Q&&Q.response),{cause:Q.cause||Q}):xe.from(Q,Q&&Q.code,N,ce,Q&&Q.response)}}},vy=new Map,eh=r=>{let s=r&&r.env||{};const{fetch:a,Request:i,Response:c}=s,d=[i,c,a];let m=d.length,p=m,h,g,v=vy;for(;p--;)h=d[p],g=v.get(h),g===void 0&&v.set(h,g=p?new Map:yy(s)),v=g;return g};eh();const Fc={http:Mg,xhr:my,fetch:{get:eh}};O.forEach(Fc,(r,s)=>{if(r){try{Object.defineProperty(r,"name",{value:s})}catch{}Object.defineProperty(r,"adapterName",{value:s})}});const Km=r=>`- ${r}`,jy=r=>O.isFunction(r)||r===null||r===!1;function wy(r,s){r=O.isArray(r)?r:[r];const{length:a}=r;let i,c;const d={};for(let m=0;m<a;m++){i=r[m];let p;if(c=i,!jy(i)&&(c=Fc[(p=String(i)).toLowerCase()],c===void 0))throw new xe(`Unknown adapter '${p}'`);if(c&&(O.isFunction(c)||(c=c.get(s))))break;d[p||"#"+m]=c}if(!c){const m=Object.entries(d).map(([h,g])=>`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=a?m.length>1?`since :
11
+ `+m.map(Km).join(`
12
+ `):" "+Km(m[0]):"as no adapter specified";throw new xe("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return c}const th={getAdapter:wy,adapters:Fc};function ec(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Rl(null,r)}function Ym(r){return ec(r),r.headers=Tt.from(r.headers),r.data=Zo.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),th.getAdapter(r.adapter||Tl.adapter,r)(r).then(function(i){return ec(r),i.data=Zo.call(r,r.transformResponse,i),i.headers=Tt.from(i.headers),i},function(i){return Qf(i)||(ec(r),i&&i.response&&(i.response.data=Zo.call(r,r.transformResponse,i.response),i.response.headers=Tt.from(i.response.headers))),Promise.reject(i)})}const nh="1.13.5",ui={};["object","boolean","number","function","string","symbol"].forEach((r,s)=>{ui[r]=function(i){return typeof i===r||"a"+(s<1?"n ":" ")+r}});const qm={};ui.transitional=function(s,a,i){function c(d,m){return"[Axios v"+nh+"] Transitional option '"+d+"'"+m+(i?". "+i:"")}return(d,m,p)=>{if(s===!1)throw new xe(c(m," has been removed"+(a?" in "+a:"")),xe.ERR_DEPRECATED);return a&&!qm[m]&&(qm[m]=!0,console.warn(c(m," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(d,m,p):!0}};ui.spelling=function(s){return(a,i)=>(console.warn(`${i} is likely a misspelling of ${s}`),!0)};function Ny(r,s,a){if(typeof r!="object")throw new xe("options must be an object",xe.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let c=i.length;for(;c-- >0;){const d=i[c],m=s[d];if(m){const p=r[d],h=p===void 0||m(p,d,r);if(h!==!0)throw new xe("option "+d+" must be "+h,xe.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new xe("Unknown option "+d,xe.ERR_BAD_OPTION)}}const Ga={assertOptions:Ny,validators:ui},Gt=Ga.validators;let Ir=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Dm,response:new Dm}}async request(s,a){try{return await this._request(s,a)}catch(i){if(i instanceof Error){let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const d=c.stack?c.stack.replace(/^.+\n/,""):"";try{i.stack?d&&!String(i.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(i.stack+=`
13
+ `+d):i.stack=d}catch{}}throw i}}_request(s,a){typeof s=="string"?(a=a||{},a.url=s):a=s||{},a=Dr(this.defaults,a);const{transitional:i,paramsSerializer:c,headers:d}=a;i!==void 0&&Ga.assertOptions(i,{silentJSONParsing:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean),legacyInterceptorReqResOrdering:Gt.transitional(Gt.boolean)},!1),c!=null&&(O.isFunction(c)?a.paramsSerializer={serialize:c}:Ga.assertOptions(c,{encode:Gt.function,serialize:Gt.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),Ga.assertOptions(a,{baseUrl:Gt.spelling("baseURL"),withXsrfToken:Gt.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let m=d&&O.merge(d.common,d[a.method]);d&&O.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),a.headers=Tt.concat(m,d);const p=[];let h=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(a)===!1)return;h=h&&R.synchronous;const b=a.transitional||Mc;b&&b.legacyInterceptorReqResOrdering?p.unshift(R.fulfilled,R.rejected):p.push(R.fulfilled,R.rejected)});const g=[];this.interceptors.response.forEach(function(R){g.push(R.fulfilled,R.rejected)});let v,y=0,k;if(!h){const N=[Ym.bind(this),void 0];for(N.unshift(...p),N.push(...g),k=N.length,v=Promise.resolve(a);y<k;)v=v.then(N[y++],N[y++]);return v}k=p.length;let M=a;for(;y<k;){const N=p[y++],R=p[y++];try{M=N(M)}catch(b){R.call(this,b);break}}try{v=Ym.call(this,M)}catch(N){return Promise.reject(N)}for(y=0,k=g.length;y<k;)v=v.then(g[y++],g[y++]);return v}getUri(s){s=Dr(this.defaults,s);const a=Xf(s.baseURL,s.url,s.allowAbsoluteUrls);return Yf(a,s.params,s.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(s){Ir.prototype[s]=function(a,i){return this.request(Dr(i||{},{method:s,url:a,data:(i||{}).data}))}});O.forEach(["post","put","patch"],function(s){function a(i){return function(d,m,p){return this.request(Dr(p||{},{method:s,headers:i?{"Content-Type":"multipart/form-data"}:{},url:d,data:m}))}}Ir.prototype[s]=a(),Ir.prototype[s+"Form"]=a(!0)});let by=class rh{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(d){a=d});const i=this;this.promise.then(c=>{if(!i._listeners)return;let d=i._listeners.length;for(;d-- >0;)i._listeners[d](c);i._listeners=null}),this.promise.then=c=>{let d;const m=new Promise(p=>{i.subscribe(p),d=p}).then(c);return m.cancel=function(){i.unsubscribe(d)},m},s(function(d,m,p){i.reason||(i.reason=new Rl(d,m,p),a(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const a=this._listeners.indexOf(s);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const s=new AbortController,a=i=>{s.abort(i)};return this.subscribe(a),s.signal.unsubscribe=()=>this.unsubscribe(a),s.signal}static source(){let s;return{token:new rh(function(c){s=c}),cancel:s}}};function Sy(r){return function(a){return r.apply(null,a)}}function Cy(r){return O.isObject(r)&&r.isAxiosError===!0}const xc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xc).forEach(([r,s])=>{xc[s]=r});function sh(r){const s=new Ir(r),a=Df(Ir.prototype.request,s);return O.extend(a,Ir.prototype,s,{allOwnKeys:!0}),O.extend(a,s,null,{allOwnKeys:!0}),a.create=function(c){return sh(Dr(r,c))},a}const Ge=sh(Tl);Ge.Axios=Ir;Ge.CanceledError=Rl;Ge.CancelToken=by;Ge.isCancel=Qf;Ge.VERSION=nh;Ge.toFormData=ci;Ge.AxiosError=xe;Ge.Cancel=Ge.CanceledError;Ge.all=function(s){return Promise.all(s)};Ge.spread=Sy;Ge.isAxiosError=Cy;Ge.mergeConfig=Dr;Ge.AxiosHeaders=Tt;Ge.formToJSON=r=>qf(O.isHTMLForm(r)?new FormData(r):r);Ge.getAdapter=th.getAdapter;Ge.HttpStatusCode=xc;Ge.default=Ge;const{Axios:ow,AxiosError:cw,CanceledError:uw,isCancel:dw,CancelToken:mw,VERSION:fw,all:hw,Cancel:pw,isAxiosError:xw,spread:gw,toFormData:yw,AxiosHeaders:vw,HttpStatusCode:jw,formToJSON:ww,getAdapter:Nw,mergeConfig:bw}=Ge,rt={set:(r,s,a=7)=>{const i=new Date;i.setTime(i.getTime()+a*24*60*60*1e3);const c=[`${r}=${encodeURIComponent(s)}`,`expires=${i.toUTCString()}`,"path=/","SameSite=Lax",window.location.protocol==="https:"?"Secure":""].filter(Boolean).join("; ");document.cookie=c},get:r=>{const s=`${r}=`,a=document.cookie.split(";");for(let i=0;i<a.length;i++){const c=a[i].trim();if(c.indexOf(s)===0)return decodeURIComponent(c.substring(s.length))}return null},remove:r=>{document.cookie=`${r}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax`}};class Ey{constructor(s={}){const a=s.baseUrl||Mf;this.axiosInstance=Ge.create({baseURL:a,timeout:s.timeout||qx,headers:{"Content-Type":"application/json",...s.headers},withCredentials:!0}),this.attachAuthHandling()}attachAuthHandling(){this.axiosInstance.interceptors.request.use(s=>{const a=rt.get("monodog_session_token");return a&&(s.headers=s.headers||{},s.headers.Authorization=`Bearer ${a}`),s}),this.axiosInstance.interceptors.response.use(s=>s,s=>(s.response?.status===401&&(rt.remove("monodog_session_token"),rt.remove("monodog_session_data")),Promise.reject(s)))}mapAxiosError(s){const a=s.response?.status||0,i=s.response?.statusText||s.message,c=s.response&&typeof s.response.data=="object"?s.response.data:void 0;let d;switch(a){case 400:d="VALIDATION";break;case 401:d="UNAUTHORIZED";break;case 403:d="FORBIDDEN";break;case 404:d="NOT_FOUND";break;case 408:d="TIMEOUT";break;case 429:d="RATE_LIMIT";break;case 500:case 502:case 503:case 504:d="SERVER_ERROR";break;default:d=a?`HTTP_${a}`:"UNKNOWN"}return console.error(`API error [${a}] ${i}`,{code:d,details:c}),{success:!1,error:{code:d,message:i,status:a,details:c?.details},meta:{status:a,statusText:i,headers:s.response?.headers||{},timestamp:Date.now(),duration:0}}}async request(s,a,i={}){const c=`/api${a}`,d=Date.now();try{const m=await this.axiosInstance.request({method:s.toLowerCase(),url:c,data:i.body,headers:i.headers,timeout:i.timeout}),p=Date.now()-d;return{success:!0,data:m.data,meta:{status:m.status,statusText:m.statusText,headers:m.headers,timestamp:Date.now(),duration:p}}}catch(m){const p=Date.now()-d;if(Ge.isAxiosError(m))return this.mapAxiosError(m);const h=m instanceof Error?m.message:"Unknown error";return console.error("Unexpected error in API client",h),{success:!1,error:{code:"UNKNOWN",message:h,status:0},meta:{timestamp:Date.now(),duration:p}}}}get(s,a){return this.request("GET",s,a||{})}post(s,a,i){return this.request("POST",s,{...i,body:a})}put(s,a,i){return this.request("PUT",s,{...i,body:a})}delete(s,a){return this.request("DELETE",s,a||{})}patch(s,a,i){return this.request("PATCH",s,{...i,body:a})}}var Qm={};function ky(){const r=Qm.REACT_APP_API_URL||Qm.VITE_API_URL;if(r)return r;const s=window.ENV?.API_URL;return s||Mf}const Te=new Ey({baseUrl:ky(),timeout:Qx,headers:{"Content-Type":"application/json"}}),lh=w.createContext(void 0),ms="monodog_session_token",fs="monodog_session_data";function Ty({children:r}){const[s,a]=w.useState(null),[i,c]=w.useState(!0),[d,m]=w.useState(null);w.useEffect(()=>{const N=rt.get(ms),R=rt.get(fs);if(N&&R)try{const b=JSON.parse(R);a({sessionToken:N,...b})}catch{rt.remove(ms),rt.remove(fs)}c(!1)},[]);const p=w.useCallback(async()=>{try{c(!0),m(null);const N=await Te.get(Re.AUTH.LOGIN);if(!N.success)throw new Error(N.error.message||mc.LOGIN_FAILED);N.data.authUrl&&(window.location.href=N.data.authUrl)}catch(N){const R=N instanceof Error?N.message:mc.LOGIN_FAILED;m(R),c(!1)}},[]),h=w.useCallback(async(N,R)=>{try{c(!0),m(null);const b=await Te.get(Re.AUTH.ME,{headers:{Authorization:`Bearer ${N}`}});if(!b.success)throw new Error(be.FAILED_TO_FETCH_USER_INFO);const D=b.data,_={sessionToken:N,user:D.user,scopes:D.scopes||[],expiresAt:D.expiresAt},I={user:D.user,scopes:D.scopes||[],permission:R||D.permission,expiresAt:D.expiresAt};rt.set(ms,N),rt.set(fs,JSON.stringify(I));const U={..._,permission:R||D.permission};return a(U),!0}catch(b){const D=b instanceof Error?b.message:"Auth failed";return m(D),!1}finally{c(!1)}},[]),g=w.useCallback(async()=>{try{c(!0),s?.sessionToken&&await Te.post(Re.AUTH.LOGOUT,void 0),rt.remove(ms),rt.remove(fs),a(null)}catch(N){console.error("Logout error:",N)}finally{c(!1)}},[s]),v=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{const N=await Te.post(Re.AUTH.VALIDATE,void 0);return N.success?N.data.valid===!0:(rt.remove(ms),rt.remove(fs),a(null),!1)}catch(N){return console.error("Session check error:",N),!1}},[s]),y=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{c(!0);const N=await Te.post(Re.AUTH.REFRESH,void 0);if(!N.success)throw new Error(be.FAILED_TO_REFRESH_SESSION);const R=N.data;if(R.success&&R.sessionToken){const b={sessionToken:R.sessionToken,user:s.user,scopes:s.scopes,expiresAt:R.expiresAt};return rt.set(ms,R.sessionToken),rt.set(fs,JSON.stringify({user:s.user,scopes:s.scopes,expiresAt:R.expiresAt})),a(b),!0}return!1}catch(N){return console.error("Session refresh error:",N),!1}finally{c(!1)}},[s]);w.useEffect(()=>{if(!s)return;const N=setInterval(()=>{v()},300*1e3);return()=>clearInterval(N)},[s,v]);const k=w.useCallback(N=>{if(!s)return console.warn("[Auth] No session available for permission check"),!1;const R={admin:4,maintain:3,write:2,read:1,none:0};let b="read";const D=s.permission;typeof D=="string"?b=D:D&&typeof D=="object"&&(D.level?b=D.level:D.permission&&(b=D.permission));const _=R[b]||0,I=R[N]||0;return console.debug(`[Auth] Permission check: user=${b}(${_}) required=${N}(${I}) result=${_>=I}`),_>=I},[s]),M={session:s,isAuthenticated:!!s,isLoading:i,error:d,login:p,logout:g,checkSession:v,refreshSession:y,hasPermission:k,permission:(()=>{const N=s?.permission;return N&&N.level||null})()};return window.__authContext={handleOAuthCallback:h},t.jsx(lh.Provider,{value:M,children:r})}function Fr(){const r=jf.useContext(lh);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r}const Jm=[{name:"Dashboard",href:"/",icon:Ex},{name:"Packages",href:"/packages",icon:Dt},{name:"Dependencies",href:"/dependencies",icon:Sl},{name:"Health Status",href:"/health",icon:Rc},{name:"Release",href:"/release",icon:Lf},{name:"Pipeline",href:"/pipeline",icon:On},{name:"Configuration",href:"/config",icon:Mr}];function Ry({children:r}){const s=js(),{session:a,logout:i}=Fr();return t.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[t.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-medium",children:[t.jsx("div",{className:"flex h-16 items-center justify-center border-b border-neutral-200",children:t.jsx("h1",{className:"text-heading text-xl text-primary-700",children:"MonoDog"})}),t.jsx("nav",{className:"mt-8 px-4",children:t.jsx("ul",{className:"space-y-2",children:Jm.map(c=>{const d=s.pathname===c.href;return t.jsx("li",{children:t.jsxs(Pn,{to:c.href,className:`nav-link ${d?"nav-link-active":"nav-link-inactive"}`,children:[t.jsx(c.icon,{className:"mr-3 h-5 w-5"}),c.name]})},c.name)})})})]}),t.jsxs("div",{className:"pl-64",children:[t.jsxs("header",{className:"bg-white shadow-soft border-b border-neutral-200 flex items-center justify-between px-6 py-4",children:[t.jsx("div",{className:"flex items-center gap-4",children:t.jsx("h2",{className:"text-heading text-lg font-semibold",children:Jm.find(c=>c.href===s.pathname)?.name||"Dashboard"})}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex flex-col items-end text-sm",children:t.jsx("button",{className:"font-medium",onClick:i,title:"Logout",children:t.jsx($x,{})})}),t.jsxs("div",{className:"flex flex-col items-end text-sm",children:[a&&t.jsx("span",{className:"font-medium text-primary-700",children:a.user?.login??"anonymous"}),a&&t.jsx("span",{className:"text-neutral-500",children:a.permission?.role??"Denied"})]}),t.jsx("img",{src:a.user?.avatar_url??"",alt:"User Avatar",className:"h-8 w-8 rounded-full border border-neutral-200"})]})]}),t.jsx("main",{className:"p-6",children:r})]})]})}function _y({isOpen:r,onClose:s,children:a}){return r?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsx("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden",onClick:i=>i.stopPropagation(),children:a})}):null}function Ay({onSave:r,onClose:s}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(If,{className:"w-6 h-6 text-gray-600"}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Dashboard Configuration"})]}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsxs("button",{onClick:r,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[t.jsx(ti,{className:"w-5 h-5"}),t.jsx("span",{children:"Save"})]}),t.jsxs("button",{onClick:s,className:"bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 flex items-center space-x-2",children:[t.jsx(ws,{className:"w-5 h-5"}),t.jsx("span",{children:"Cancel"})]})]})]})}const Py=()=>[{id:"general",label:"General",icon:t.jsx(Mr,{className:"w-6 h-6 text-primary-600"})},{id:"features",label:"Features",icon:t.jsx(On,{className:"w-6 h-6 text-primary-600"})},{id:"branding",label:"Branding",icon:"🎨"},{id:"monorepo",label:"Monorepo",icon:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}],Ly=()=>({title:"monodog Dashboard",description:"Visual management of our monorepo packages",packageTypes:["app","lib","tool","service"],customFields:["team","priority","environment"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{logo:"",primaryColor:"#3B82F6",secondaryColor:"#1E40AF"},monorepo:{structure:"standard",packageManager:"pnpm",directories:["apps","packages","libs"],ignorePatterns:["node_modules","dist",".git"]}}),Xm=r=>{const s=Ly();return{...s,...r,features:{...s.features,...r.features},branding:{...s.branding,...r.branding},monorepo:{...s.monorepo,...r.monorepo}}},Oy=r=>{const s=[];return(!r.title||r.title.trim()==="")&&s.push("Dashboard title is required"),r.monorepo?.directories&&r.monorepo.directories.length===0&&s.push("At least one package directory is required"),r.branding?.primaryColor&&!Zm(r.branding.primaryColor)&&s.push("Primary color must be a valid hex color"),r.branding?.secondaryColor&&!Zm(r.branding.secondaryColor)&&s.push("Secondary color must be a valid hex color"),{isValid:s.length===0,errors:s}},Zm=r=>/^#[0-9A-F]{6}$/i.test(r),Ja=r=>r.split(",").map(s=>s.trim()).filter(s=>s.length>0),Xa=r=>r?r.join(", "):"",Iy=r=>r.replace(/([A-Z])/g," $1").trim();function My({activeTab:r,onTabChange:s}){const a=Py();return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8 px-6",children:a.map(i=>t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[t.jsx("span",{children:i.icon}),t.jsx("span",{children:i.label})]},i.id))})})}function ef({config:r,onConfigChange:s}){return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"General Settings"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Dashboard Title"}),t.jsx("input",{type:"text",value:r.title||"",onChange:a=>s({title:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"My Monorepo Dashboard"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",value:r.description||"",onChange:a=>s({description:a.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Visual management of our monorepo packages"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Types"}),t.jsx("input",{type:"text",value:Xa(r.packageTypes),onChange:a=>s({packageTypes:Ja(a.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"app, lib, tool, service"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated list of package types"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Custom Fields"}),t.jsx("input",{type:"text",value:Xa(r.customFields),onChange:a=>s({customFields:Ja(a.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"team, priority, environment"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Additional fields to display for packages"})]})]})]})})}function Dy({config:r,onConfigChange:s}){const a=(i,c)=>{s({features:{...r.features,[i]:c}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Feature Toggles"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(r.features||{}).map(([i,c])=>t.jsxs("label",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:c,onChange:d=>a(i,d.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),t.jsx("span",{className:"text-sm font-medium text-gray-700 capitalize",children:Iy(i)})]},i))}),t.jsxs("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Feature Descriptions"}),t.jsxs("div",{className:"text-xs text-blue-800 space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Health Checks:"})," Monitor package health and status"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"CI Integration:"})," Connect with CI/CD providers"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Dependency Graph:"})," Visualize package dependencies"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Publish Control:"})," Manage package publishing and versioning"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Search And Filter:"})," Advanced search and filtering capabilities"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Configuration Inspector:"})," View and edit configuration files"]})]})]})]})})}function Fy({config:r,onConfigChange:s}){const a=(i,c)=>{s({branding:{...r.branding,[i]:c}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Branding & Appearance"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Logo URL"}),t.jsx("input",{type:"text",value:r.branding?.logo||"",onChange:i=>a("logo",i.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"https://example.com/logo.png"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"URL to your company logo"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Color"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"color",value:r.branding?.primaryColor||"#3B82F6",onChange:i=>a("primaryColor",i.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),t.jsx("input",{type:"text",value:r.branding?.primaryColor||"#3B82F6",onChange:i=>a("primaryColor",i.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#3B82F6"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Primary brand color for buttons and accents"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Color"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"color",value:r.branding?.secondaryColor||"#1E40AF",onChange:i=>a("secondaryColor",i.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),t.jsx("input",{type:"text",value:r.branding?.secondaryColor||"#1E40AF",onChange:i=>a("secondaryColor",i.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#1E40AF"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Secondary color for hover states and highlights"})]})]}),t.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Color Preview"}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:r.branding?.primaryColor||"#3B82F6"}}),t.jsx("span",{className:"text-sm text-gray-600",children:"Primary"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:r.branding?.secondaryColor||"#1E40AF"}}),t.jsx("span",{className:"text-sm text-gray-600",children:"Secondary"})]}),t.jsx("button",{className:"px-4 py-2 rounded-lg text-white text-sm font-medium",style:{backgroundColor:r.branding?.primaryColor||"#3B82F6"},children:"Sample Button"})]})]})]})})}function Uy({config:r,onConfigChange:s}){const a=(i,c)=>{s({monorepo:{...r.monorepo,[i]:c}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Monorepo Configuration"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Structure Type"}),t.jsxs("select",{value:r.monorepo?.structure||"standard",onChange:i=>a("structure",i.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"standard",children:"Standard (apps/packages/libs)"}),t.jsx("option",{value:"custom",children:"Custom Structure"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Choose your monorepo directory structure"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Manager"}),t.jsxs("select",{value:r.monorepo?.packageManager||"pnpm",onChange:i=>a("packageManager",i.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"pnpm",children:"pnpm"}),t.jsx("option",{value:"npm",children:"npm"}),t.jsx("option",{value:"yarn",children:"Yarn"}),t.jsx("option",{value:"lerna",children:"Lerna"}),t.jsx("option",{value:"nx",children:"Nx"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Package manager used in your monorepo"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Directories"}),t.jsx("input",{type:"text",value:Xa(r.monorepo?.directories),onChange:i=>a("directories",Ja(i.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"apps, packages, libs, services"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Directories containing packages"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ignore Patterns"}),t.jsx("input",{type:"text",value:Xa(r.monorepo?.ignorePatterns),onChange:i=>a("ignorePatterns",Ja(i.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"node_modules, dist, .git"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Patterns to ignore when scanning"})]})]}),t.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Configuration Preview"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Structure:"}),t.jsx("span",{className:"ml-2 text-gray-600 capitalize",children:r.monorepo?.structure||"standard"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.monorepo?.packageManager||"pnpm"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Directories:"}),t.jsxs("span",{className:"ml-2 text-gray-600",children:[r.monorepo?.directories?.length||0," configured"]})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Ignore Patterns:"}),t.jsxs("span",{className:"ml-2 text-gray-600",children:[r.monorepo?.ignorePatterns?.length||0," patterns"]})]})]})]}),r.monorepo?.packageManager&&t.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsxs("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:[r.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),t.jsxs("div",{className:"text-xs text-blue-800",children:[r.monorepo.packageManager==="pnpm"&&t.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),r.monorepo.packageManager==="npm"&&t.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),r.monorepo.packageManager==="yarn"&&t.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),r.monorepo.packageManager==="lerna"&&t.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),r.monorepo.packageManager==="nx"&&t.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function By({isOpen:r,onClose:s,onSave:a,currentConfig:i}){const[c,d]=w.useState(Xm(i)),[m,p]=w.useState("general");w.useEffect(()=>{d(Xm(i))},[i]);const h=()=>{const y=Oy(c);y.isValid||console.warn("Configuration validation errors:",y.errors),a(c),s()},g=y=>{d(k=>({...k,...y}))},v=()=>{const y={config:c,onConfigChange:g};switch(m){case"general":return t.jsx(ef,{...y});case"features":return t.jsx(Dy,{...y});case"branding":return t.jsx(Fy,{...y});case"monorepo":return t.jsx(Uy,{...y});default:return t.jsx(ef,{...y})}};return t.jsxs(_y,{isOpen:r,onClose:s,children:[t.jsx(Ay,{onSave:h,onClose:s}),t.jsx(My,{activeTab:m,onTabChange:p}),t.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:v()})]})}function zy({isOpen:r,onClose:s,children:a}){return r?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:t.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden",onClick:i=>i.stopPropagation(),children:a})}):null}function Hy({onClose:r}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Setup Guide"}),t.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Configure your monorepo dashboard for optimal performance"})]}),t.jsx("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(ws,{className:"w-6 h-6"})})]})}function $y({progress:r}){const{currentStep:s,totalSteps:a,completedSteps:i}=r,c=(s+1)/a*100;return t.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsxs("span",{className:"text-sm font-medium text-gray-700",children:["Step ",s+1," of ",a]}),t.jsxs("span",{className:"text-sm text-gray-500",children:[i," completed"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${c}%`}})})]})}function Vy({step:r,onStepComplete:s}){const a=()=>{switch(r.id){case"monorepo-structure":return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Quick Setup"}),t.jsx("p",{className:"text-blue-800 text-sm mb-3",children:"Choose your monorepo structure to get started quickly:"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[t.jsx("div",{className:"font-medium text-blue-900",children:"Standard Structure"}),t.jsx("div",{className:"text-sm text-blue-700",children:"apps/, packages/, libs/"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[t.jsx("div",{className:"font-medium text-blue-900",children:"Custom Structure"}),t.jsx("div",{className:"text-sm text-blue-700",children:"Define your own directories"})]})]})]}),t.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Manual Configuration"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Root Directory"}),t.jsx("input",{type:"text",defaultValue:"/path/to/monorepo",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Package Manager"}),t.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm",children:[t.jsx("option",{value:"pnpm",children:"pnpm"}),t.jsx("option",{value:"npm",children:"npm"}),t.jsx("option",{value:"yarn",children:"yarn"})]})]})]})]})]});case"package-scanning":return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-green-900 mb-2",children:"Automatic Discovery"}),t.jsx("p",{className:"text-green-800 text-sm mb-3",children:"We'll scan your monorepo for packages automatically:"}),t.jsx("button",{onClick:()=>s(r.id),className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 text-sm",children:"Start Package Scan"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(xs,{className:"w-4 h-4 mr-2"}),"Scans for package.json files"]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(xs,{className:"w-4 h-4 mr-2"}),"Analyzes dependencies and relationships"]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(xs,{className:"w-4 h-4 mr-2"}),"Detects build configurations"]})]})]});case"ci-integration":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-purple-900 mb-2",children:"Connect CI/CD"}),t.jsx("p",{className:"text-purple-800 text-sm mb-3",children:"Choose your CI/CD provider to monitor builds and deployments:"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"GitHub Actions"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitHub"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"GitLab CI"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitLab"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"Jenkins"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with Jenkins"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"Skip for now"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Configure later"})]})]})]})});case"health-checks":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-orange-900 mb-2",children:"Health Monitoring"}),t.jsx("p",{className:"text-orange-800 text-sm mb-3",children:"Configure how we monitor your package health:"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-orange-900",children:"Monitor build status"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-orange-900",children:"Track test coverage"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-orange-900",children:"Dependency vulnerability scanning"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-orange-900",children:"Performance monitoring"})]})]}),t.jsx("button",{onClick:()=>s(r.id),className:"mt-3 bg-orange-600 text-white px-4 py-2 rounded-lg hover:bg-orange-700 text-sm",children:"Save Settings"})]})});case"notifications":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-indigo-50 border border-indigo-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-indigo-900 mb-2",children:"Notification Preferences"}),t.jsx("p",{className:"text-indigo-800 text-sm mb-3",children:"Choose how you want to be notified about important events:"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Build failures"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Security vulnerabilities"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Dependency updates"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Performance degradation"})]})]}),t.jsx("button",{onClick:()=>s(r.id),className:"mt-3 bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 text-sm",children:"Save Preferences"})]})});default:return t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:"Step content not found"})})}};return t.jsxs("div",{className:"p-6 overflow-y-auto max-h-[50vh]",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:r.title}),t.jsx("p",{className:"text-gray-600 mb-4",children:r.description})]}),a()]})}function Wy({currentStep:r,totalSteps:s,canGoNext:a,canGoPrevious:i,onNext:c,onPrevious:d,onComplete:m,isLastStep:p}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[t.jsx("button",{onClick:d,disabled:!i,className:`px-4 py-2 text-sm rounded-lg border transition-colors ${i?"border-gray-300 text-gray-700 hover:bg-gray-50":"border-gray-200 text-gray-400 cursor-not-allowed"}`,children:"Previous"}),t.jsx("div",{className:"flex space-x-2",children:Array.from({length:s},(h,g)=>t.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${g<=r?"bg-blue-600":"bg-gray-300"}`},g))}),p?t.jsxs("button",{onClick:m,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 flex items-center space-x-2 text-sm",children:[t.jsx(ti,{className:"w-4 h-4"}),t.jsx("span",{children:"Complete Setup"})]}):t.jsx("button",{onClick:c,disabled:!a,className:`px-4 py-2 text-sm rounded-lg transition-colors ${a?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Next"})]})}const Gy=()=>[{id:"monorepo-structure",title:"Monorepo Structure",description:"Configure your monorepo directory structure and package manager",completed:!1,required:!0},{id:"package-scanning",title:"Package Scanning",description:"Set up automatic package discovery and dependency analysis",completed:!1,required:!0},{id:"ci-integration",title:"CI/CD Integration",description:"Connect with your CI/CD providers (GitHub Actions, GitLab CI, etc.)",completed:!1,required:!1},{id:"health-checks",title:"Health Monitoring",description:"Configure package health checks and status monitoring",completed:!1,required:!1},{id:"notifications",title:"Notifications",description:"Set up alerts and notifications for important events",completed:!1,required:!1}],Ky=(r,s)=>({currentStep:s,totalSteps:r.length,completedSteps:r.filter(a=>a.completed).length}),Yy=(r,s)=>{const a=r[s];return!a.required||a.completed},qy=r=>r.filter(a=>a.required).every(a=>a.completed),Qy=(r,s)=>r.map(a=>a.id===s?{...a,completed:!0}:a);function Jy({isOpen:r,onClose:s,onComplete:a}){const[i,c]=w.useState(0),[d,m]=w.useState(Gy()),p=b=>{const D=Qy(d,b);m(D),D[i].completed&&i<d.length-1&&c(I=>I+1)},h=()=>{i<d.length-1&&c(b=>b+1)},g=()=>{i>0&&c(b=>b-1)},v=()=>{qy(d)&&(a(),s())},y=Ky(d,i),k=Yy(d,i),M=i>0,N=i===d.length-1,R=d[i];return t.jsxs(zy,{isOpen:r,onClose:s,children:[t.jsx(Hy,{onClose:s}),t.jsx($y,{progress:y}),t.jsx(Vy,{step:R,onStepComplete:p}),t.jsx(Wy,{currentStep:i,totalSteps:d.length,canGoNext:k,canGoPrevious:M,onNext:h,onPrevious:g,onComplete:v,isLastStep:N})]})}function Xy({config:r,onShowSetupGuide:s,onShowConfig:a,onRefresh:i}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-3xl",children:r.title}),t.jsx("p",{className:"text-body mt-2",children:r.description}),t.jsx("button",{onClick:s,className:"hidden text-primary-600 hover:text-primary-700 text-sm font-medium mt-2",children:"First time? Run the setup guide"})]}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsxs("button",{onClick:i,className:"btn-primary flex items-center space-x-2",children:[t.jsx(dr,{className:"w-5 h-5"}),t.jsx("span",{children:"Refresh"})]}),t.jsxs("button",{onClick:a,className:"hidden btn-ghost flex items-center space-x-2",children:[t.jsx(If,{className:"w-5 h-5"}),t.jsx("span",{children:"Configure"})]})]})]})}function Zy({stats:r}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:"card p-6 bg-gray-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Total Packages"}),t.jsx("p",{className:"text-heading text-2xl",children:r.total})]})]})}),t.jsx("div",{className:"card p-6 bg-green-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-secondary-100 rounded-lg",children:t.jsx(On,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Applications"}),t.jsx("p",{className:"text-heading text-2xl",children:r.apps})]})]})}),t.jsx("div",{className:"card p-6 bg-yellow-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-accent-100 rounded-lg",children:t.jsx(ri,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Libraries"}),t.jsx("p",{className:"text-heading text-2xl",children:r.libs})]})]})}),t.jsx("div",{className:"card p-6 bg-blue-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(si,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Dependencies"}),t.jsx("p",{className:"text-heading text-2xl",children:r.totalDependencies})]})]})})]})}function ev(){return t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Pn,{to:"/dependencies",className:"p-4 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:t.jsx(Sl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"Dependency Graph"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Visualize package relationships"})]})]})}),t.jsx(Pn,{to:"/health",className:"p-4 border border-gray-200 rounded-lg hover:border-green-300 hover:bg-green-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Rc,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"Health Check"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Monitor package health"})]})]})}),t.jsx(Pn,{to:"/ci",className:"hidden p-4 border border-gray-200 rounded-lg hover:border-purple-300 hover:bg-purple-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx("span",{className:"text-2xl",children:"🧪"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"CI/CD Status"}),t.jsx("p",{className:"text-sm text-gray-600",children:"View build status"})]})]})})]})]})}function tv({searchTerm:r,selectedType:s,packageTypes:a,onSearchChange:i,onTypeChange:c}){return t.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Lc,{className:"w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search packages...",value:r,onChange:d=>i(d.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"w-5 h-5 text-gray-400"}),t.jsxs("select",{value:s,onChange:d=>c(d.target.value),className:"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Types"}),a.map(d=>t.jsx("option",{value:d,className:"capitalize",children:d},d))]})]})]})}function nv({packages:r,getTypeIcon:s,getStatusColor:a}){return t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(i=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:s(i.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:i.name}),t.jsx("div",{className:"text-sm text-gray-500",children:i.path})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${a(i.type)}`,children:i.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.version}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(i.dependencies).length+Object.keys(i.devDependencies).length+Object.keys(i.peerDependencies).length}),t.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:i.description||"No description"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx(Pn,{to:`/packages/${encodeURIComponent(i.name)}`,className:"text-blue-600 hover:text-blue-500",children:"View Details"})})]},i.name))})]})})}class rv{constructor(){this.mockPackages=[]}async getPackages(){try{const s=await Te.get(Re.PACKAGES.LIST);if(s.success)return s.data;console.error(`getPackages: initial fetch failed with status ${s.error.status}. Attempting refresh...`);try{return await this.refreshPackages()}catch(a){return console.error("getPackages: refresh failed",a),[]}}catch(s){return console.error("getPackages: unexpected error",s),[]}}async getPackage(s){const a=await Te.get(Re.PACKAGES.DETAILS(s));if(!a.success)throw new Error(`Failed to fetch package details for "${s}" (Status: ${a.error.status})`);return a.data}async getDependencies(){await new Promise(a=>setTimeout(a,200));const s=new Set;try{return(await this.getPackages()).forEach(c=>{c.dependencies?.forEach(d=>s.add(d))}),Array.from(s).map(c=>({name:c,version:"unknown",type:"dependency",status:"active"}))}catch(a){return console.error("Error fetching dependencies:",a),[]}}async refreshPackages(){try{const s=await Te.post(Re.PACKAGES.REFRESH);return s.success?s.data:(console.error(`refreshPackages: fetch failed with status ${s.error.status}`),[])}catch(s){return console.error("refreshPackages: unexpected error",s),[]}}async getHealthStatus(){try{let s=await Te.get(Re.HEALTH.PACKAGES);if(!s.success){if(!(await Te.post(Re.HEALTH.REFRESH)).success)throw new Error("Failed to refresh health data");if(await new Promise(i=>setTimeout(i,1e3)),s=await Te.get(Re.HEALTH.PACKAGES),!s.success)throw new Error("Failed to fetch health data after refresh")}return s.data}catch(s){throw console.error("Error fetching health data:",s),s}}async refreshHealthStatus(){try{const s=await Te.post(Re.HEALTH.REFRESH);if(!s.success)throw new Error("Failed to fetch health data");return s.data}catch(s){console.error("Error fetching health data:",s)}}async getFallbackHealthStatus(){await new Promise(c=>setTimeout(c,400));const s=[{name:"Package Count",value:this.mockPackages.length,status:"healthy",description:`${this.mockPackages.length} packages in monorepo`},{name:"Dependency Health",value:85,status:"healthy",description:"Dependencies are up to date"},{name:"Build Status",value:95,status:"healthy",description:"Most builds are successful"}],a=this.mockPackages.map(c=>({package:c.name,score:c.status==="healthy"?90:c.status==="warning"?70:50,issues:c.status==="healthy"?[]:["Needs attention"]}));return{overallScore:85,metrics:s,packageHealth:a}}async updatePackageConfiguration(s,a,i){try{const c=await Te.put(Re.PACKAGES.UPDATE_CONFIG,JSON.stringify({packageName:s,config:a,packagePath:i}));if(!c.success)throw new Error(`HTTP error: ${c.error?.message}`);return c.data}catch(c){throw console.error("Error updating package configuration:",c),c}}async getBuildStatus(){await new Promise(a=>setTimeout(a,500));const s=[];for(const a of this.mockPackages){const i=a.scripts&&a.scripts.build,c=a.scripts&&a.scripts.test;if(i||c){const d=new Date(Date.now()-Math.random()*864e5).toISOString(),m=Math.random()>.8?"failed":Math.random()>.6?"building":Math.random()>.4?"queued":"success";s.push({id:`build-${a.name}-${Date.now()}`,package:a.name,status:m,startTime:d,endTime:m!=="building"?new Date(Date.now()-Math.random()*36e5).toISOString():void 0,duration:m!=="building"?Math.floor(Math.random()*300)+60:void 0,stages:this.generateBuildStages(a,m)})}}return s}async getConfigurationFiles(){try{const s=await Te.get(Re.CONFIG.FILES);if(!s.success)throw new Error(`Failed to fetch config files: ${s.error?.message}`);const a=s.data;if(a.success&&a.files)return a.files;throw new Error("Invalid response format from config files API")}catch(s){return console.error("Error fetching configuration files from backend:",s),[]}}async saveConfigurationFile(s,a){try{const i=await Te.put(Re.CONFIG.FILE(s),JSON.stringify({content:a}));if(!i.success)throw new Error(i.error?.message||"Failed to save file");const c=i.data;if(c.success&&c.file)return c.file;throw new Error("Invalid response format from save file API")}catch(i){throw console.error("Error saving configuration file:",i),i}}generateBuildStages(s,a){const i=[{name:"Install",status:"success",duration:Math.floor(Math.random()*30)+10,logs:["Installing dependencies...","Dependencies installed successfully"]},{name:"Lint",status:a==="failed"&&Math.random()>.7?"failed":"success",duration:Math.floor(Math.random()*20)+5,logs:["Running ESLint...","Linting completed"]},{name:"Test",status:a==="failed"&&Math.random()>.5?"failed":"success",duration:Math.floor(Math.random()*60)+30,logs:["Running tests...","Test suite completed"]},{name:"Build",status:a==="failed"?"failed":"success",duration:Math.floor(Math.random()*120)+60,logs:["Building package...","Build completed successfully"]}];if(a==="building"){const c=Math.floor(Math.random()*i.length);i[c].status="running",i.slice(c+1).forEach(d=>d.status="pending")}return i}}const Mt=new rv,sv=r=>({total:r.length,apps:r.filter(s=>s.type==="app").length,libs:r.filter(s=>s.type==="lib").length,tools:r.filter(s=>s.type==="tool").length,custom:r.filter(s=>!["app","Plib","tool"].includes(s.type)).length,totalDependencies:r.reduce((s,a)=>s+Object.keys(a.dependencies).length+Object.keys(a.peerDependencies).length+Object.keys(a.devDependencies).length,0)}),lv=r=>[...new Set(r.map(s=>s.type))],av=(r,s,a)=>r.filter(i=>{const c=i.name.toLowerCase().includes(s.toLowerCase())||i.description?.toLowerCase().includes(s.toLowerCase()),d=a==="all"||i.type===a;return c&&d}),iv=r=>{switch(r){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-green-100 text-green-800";case"tool":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},ov=r=>{switch(r){case"app":return t.jsx(On,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ri,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}};function Uc({message:r="Loading packages..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function ah({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(st,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function cv({stats:r}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[t.jsx("div",{className:"bg-gray-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.total})]})]})}),t.jsx("div",{className:"bg-green-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Rt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Healthy"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.healthy})]})]})}),t.jsx("div",{className:"bg-yellow-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-yellow-100 rounded-lg",children:t.jsx(st,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Warnings"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.warnings})]})]})}),t.jsx("div",{className:"bg-red-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:t.jsx(It,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Errors"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.errors})]})]})})]})}function uv({filters:r,onFiltersChange:s,availableTypes:a,availableStatuses:i}){return t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between space-y-4 md:space-y-0 md:space-x-4",children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Lc,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),t.jsx("input",{type:"text",placeholder:"Search packages by name, description, or tags...",value:r.search,onChange:c=>s({...r,search:c.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"h-5 w-5 text-gray-400"}),t.jsxs("select",{value:r.type,onChange:c=>s({...r,type:c.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Types"}),a.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]}),t.jsxs("select",{value:r.status,onChange:c=>s({...r,status:c.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Status"}),i.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]})]})})}const dv=r=>({total:r.length,healthy:r.filter(s=>s.status==="healthy").length,warnings:r.filter(s=>s.status==="warning").length,errors:r.filter(s=>s.status==="error").length}),mv=r=>[...new Set(r.map(s=>s.type))],fv=r=>[...new Set(r.map(s=>s.status))],hv=(r,s)=>r.filter(a=>{const i=a.name.toLowerCase().includes(s.search.toLowerCase())||a.description.toLowerCase().includes(s.search.toLowerCase()),c=s.type==="all"||a.type===s.type,d=s.status==="all"||a.status===s.status;return i&&c&&d}),pv=(r,s)=>[...r].sort((a,i)=>{let c,d;switch(s.field){case"name":c=a.name.toLowerCase(),d=i.name.toLowerCase();break;case"version":c=a.version,d=i.version;break;case"lastUpdated":c=new Date(a.lastUpdated),d=new Date(i.lastUpdated);break;case"dependencies":c=Object.keys(a.dependencies).length,d=Object.keys(i.dependencies).length;break;default:return 0}return c<d?s.order==="asc"?-1:1:c>d?s.order==="asc"?1:-1:0}),ih=r=>{switch(r){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";case"building":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},oh=r=>{switch(r){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";case"service":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}},xv=r=>{switch(r){case"up-to-date":return"bg-green-100 text-green-800";case"outdated":return"bg-yellow-100 text-yellow-800";case"major-update":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},gv=r=>{switch(r){case"feature":return"bg-blue-100 text-blue-800";case"fix":return"bg-green-100 text-green-800";case"chore":return"bg-gray-100 text-gray-800";case"breaking":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},Bc=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),ch=r=>r.startsWith("v")?r:`v${r}`,uh=r=>{switch(r){case"app":return t.jsx(On,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ri,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";case"service":return"🌐";default:return t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}};function yv({packages:r,sorting:s,onSortChange:a}){const i=d=>{const m=s.field===d&&s.order==="asc"?"desc":"asc";a({field:d,order:m})},c=d=>s.field!==d?null:s.order==="asc"?t.jsx(Tc,{className:"w-4 h-4"}):t.jsx(Pf,{className:"w-4 h-4"});return t.jsx("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("name"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),c("name")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("version"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Version"}),c("version")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("dependencies"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),c("dependencies")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("lastUpdated"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Last Updated"}),c("lastUpdated")]})}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Maintainers"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(d=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:uh(d.type)}),t.jsxs("div",{children:[t.jsx(Pn,{to:`/packages/${encodeURIComponent(d.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:d.name}),t.jsx("div",{className:"text-sm text-gray-500",children:d.description})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-900",children:ch(d.version)})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${oh(d.type)}`,children:d.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ih(d.status)}`,children:d.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(d.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(d.dependencies).slice(0,3).join(", "),Object.keys(d.dependencies).length>3&&` +${Object.keys(d.dependencies).length-3} more`]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:Bc(d.lastUpdated)}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex -space-x-1",children:[d.maintainers.slice(0,3).map((m,p)=>t.jsx("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-500 text-xs font-medium text-white",title:m,children:m.charAt(0).toUpperCase()},m)),d.maintainers.length>3&&t.jsxs("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-300 text-xs font-medium text-gray-600",children:["+",d.maintainers.length-3]})]})})]},d.name))})]})})})}function vv({packageData:r}){const s=a=>{switch(a){case"healthy":return t.jsx(Rt,{className:"h-5 w-5 text-green-500"});case"warning":return t.jsx(st,{className:"h-5 w-5 text-yellow-500"});case"error":return t.jsx(st,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Be,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-6",children:t.jsxs(Pn,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[t.jsx(_x,{className:"mr-2 h-4 w-4"}),"Back to Packages"]})}),t.jsxs("div",{className:"bg-white rounded-lg shadow border p-6 mb-6",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex items-start space-x-4",children:[t.jsx("div",{className:"text-4xl",children:uh(r.type)}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:r.name}),t.jsx("p",{className:"text-gray-600 mt-1",children:r.description}),t.jsxs("div",{className:"flex items-center space-x-4 mt-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Version:"}),t.jsx("span",{className:"text-sm font-mono bg-gray-100 px-2 py-1 rounded",children:ch(r.version)})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${oh(r.type)}`,children:r.type}),t.jsxs("div",{className:"flex items-center space-x-1",children:[s(r.status),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ih(r.status)}`,children:r.status})]})]})]})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"Health Score"}),t.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:[r.packageHealth?.packageOverallScore??"","%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mt-6 pt-6 border-t border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Of,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Last Updated"}),t.jsx("div",{className:"text-sm font-medium",children:Bc(r.lastUpdated)})]})]}),t.jsxs("div",{className:"hidden flex items-center space-x-2",children:[t.jsx(Ax,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Maintainers"}),t.jsx("div",{className:"text-sm font-medium",children:r.maintainers.length})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Pc,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"License"}),t.jsx("div",{className:"text-sm font-medium",children:r.license})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"h-4 w-4 text-gray-400",children:t.jsx(si,{className:"h-4 w-4 text-gray-400"})}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Repository"}),t.jsx("div",{className:"text-sm font-medium truncate",children:t.jsx("a",{href:r.repository.url||"",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-500",children:r.repository?.url?.split("/").pop()})})]})]})]}),r.tags?.length>0&&t.jsxs("div",{className:"mt-4",children:[t.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:r.tags.map(a=>t.jsx("span",{className:"inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-700 rounded-full",children:a},a))})]})]})]})}function jv({activeTab:r,onTabChange:s}){const a=[{id:"overview",label:"Overview",icon:Dt},{id:"dependencies",label:"Dependencies",icon:Ac},{id:"commits",label:"Recent Commits",icon:Be},{id:"health",label:"Health Metrics",icon:Rc},{id:"config",label:"Configuration",icon:Mr}];return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8",children:a.map(i=>{const c=i.icon;return t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[t.jsx(c,{className:"w-4 h-4"}),t.jsx("span",{children:i.label})]},i.id)})})})}function wv({packageData:r}){if(!r.dependenciesInfo.length)return t.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const s=(a,i)=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:i}),t.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Latest"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:a.map(c=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("div",{className:"text-sm font-medium text-gray-900",children:c.name})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:c.version})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:c.latest})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${xv(c.status)}`,children:c.status.replace("-"," ")})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:c.status!=="up-to-date"&&t.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[t.jsx(Tc,{className:"w-4 h-4"}),t.jsx("span",{children:"Update"})]})})]},c.name))})]})})]});return t.jsxs("div",{className:"py-6",children:[s(r.dependenciesInfo.filter(a=>a.type=="dependency"),"Dependencies"),s(r.dependenciesInfo.filter(a=>a.type=="devDependency"),"Dev Dependencies"),s(r.dependenciesInfo.filter(a=>a.type=="peerDependency"),"Peer Dependencies"),t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Dependency Summary"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Total Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(a=>a.type=="dependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Dev Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(a=>a.type=="devDependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Peer Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(a=>a.type=="peerDependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Outdated:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(a=>a.status==="outdated").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Major Updates:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(a=>a.status==="major-update").length})]})]})]})]})}function Nv({packageData:r}){return t.jsxs("div",{className:"py-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Recent Commits"}),t.jsx("div",{className:"space-y-4",children:r.commits.map(s=>t.jsx("div",{className:"bg-white border rounded-lg p-4 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${gv(s.type)}`,children:s.type}),t.jsx("span",{className:"text-sm font-mono text-gray-500",children:s.hash})]}),t.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:s.message}),t.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[t.jsxs("span",{children:["by ",s.author]}),t.jsx("span",{children:Bc(s.date)})]})]}),t.jsx("div",{className:"hidden ml-4",children:t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm",children:"View Diff"})})]})},s.hash))}),r.commits.length===0&&t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),t.jsx("p",{className:"text-gray-500",children:"No recent commits found"})]}),t.jsxs("div",{className:"mt-6 bg-gray-50 border border-gray-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Commit Summary"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Features:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="feat").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Fixes:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="fix").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Chores:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="chore").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Breaking:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="breaking").length})]})]})]})]})}function bv({packageData:r}){const s=d=>d>=80?"text-green-600":d>=60?"text-yellow-600":"text-red-600",a=d=>{switch(d){case"success":return t.jsx(Rt,{className:"w-5 h-5 text-green-500"});case"failed":return t.jsx(It,{className:"w-5 h-5 text-red-500"});case"running":return t.jsx("div",{className:"w-5 h-5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"});default:return t.jsx(st,{className:"w-5 h-5 text-gray-500"})}},i=d=>{switch(d){case"success":return"bg-green-100 text-green-800";case"failed":return"bg-red-100 text-red-800";case"running":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},c=d=>{switch(d){case"pass":return"bg-green-100 text-green-800";case"fail":return"bg-red-100 text-red-800";case"warning":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}};return r.packageHealth?.packageOverallScore?t.jsxs("div",{className:"py-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Health Score"}),t.jsxs("div",{className:`text-3xl font-bold ${s(r.packageHealth.packageOverallScore)}`,children:[r.packageHealth.packageOverallScore,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3 mb-4",children:t.jsx("div",{className:`h-3 rounded-full transition-all duration-300 ${r.packageHealth.packageOverallScore>=80?"bg-green-500":r.packageHealth.packageOverallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.packageHealth.packageOverallScore}%`}})}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.packageHealth.packageOverallScore>=80&&"Excellent health - package is in great condition",r.packageHealth.packageOverallScore>=60&&r.packageHealth.packageOverallScore<80&&"Good health - minor issues detected",r.packageHealth.packageOverallScore<60&&"Needs attention - several issues require fixing"]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Build Status"}),a(r.packageHealth.packageBuildStatus)]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${i(r.packageHealth.packageBuildStatus)}`,children:r.packageHealth.packageBuildStatus}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Logs"})]})]}),t.jsxs("div",{className:"hidden bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Test Coverage"}),t.jsxs("div",{className:`text-lg font-semibold ${r.packageHealth.packageTestCoverage>=80?"text-green-600":r.packageHealth.packageTestCoverage>=60?"text-yellow-600":"text-red-600"}`,children:[r.packageHealth.packageTestCoverage,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full ${r.packageHealth.packageTestCoverage>=80?"bg-green-500":r.packageHealth.packageTestCoverage>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.packageHealth.packageTestCoverage}%`}})})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Lint Status"}),r.packageHealth.packageLintStatus==="pass"&&t.jsx(Rt,{className:"w-5 h-5 text-green-500"}),r.packageHealth.packageLintStatus==="fail"&&t.jsx(It,{className:"w-5 h-5 text-red-500"}),r.packageHealth.packageLintStatus==="warning"&&t.jsx(st,{className:"w-5 h-5 text-yellow-500"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(r.packageHealth.packageLintStatus)}`,children:r.packageHealth.packageLintStatus}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Issues"})]})]})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsx("h4",{className:"text-lg font-medium text-gray-900 mb-4",children:"Detailed Metrics"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Dependencies"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Total Dependencies:"}),t.jsx("span",{className:"font-medium",children:Object.keys(r.dependenciesInfo).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Outdated:"}),t.jsx("span",{className:"font-medium text-yellow-600",children:r.dependenciesInfo.filter(d=>d.status==="outdated").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Major Updates Available:"}),t.jsx("span",{className:"font-medium text-red-600",children:r.dependenciesInfo.filter(d=>d.status==="major-update").length})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Code Quality"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Build Status:"}),t.jsx("span",{className:`font-medium ${r.packageHealth.packageBuildStatus==="success"?"text-green-600":r.packageHealth.packageBuildStatus==="failed"?"text-red-600":"text-yellow-600"}`,children:r.packageHealth.packageBuildStatus})]}),t.jsxs("div",{className:"hidden flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Test Coverage:"}),t.jsxs("span",{className:"font-medium",children:[r.packageHealth.packageTestCoverage,"%"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Lint Status:"}),t.jsx("span",{className:`font-medium ${r.packageHealth.packageLintStatus==="pass"?"text-green-600":r.packageHealth.packageLintStatus==="fail"?"text-red-600":"text-yellow-600"}`,children:r.packageHealth.packageLintStatus})]})]})]})]})]})]}):t.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function Sv({packageData:r}){const[s,a]=w.useState(!1),[i,c]=w.useState(""),[d,m]=w.useState(!1),[p,h]=w.useState(""),[g,v]=w.useState(null),[y,k]=w.useState(!1),M=()=>{const I={name:r.name,version:r.version,description:r.description||"",license:r.license||"",repository:r.repository||{},scripts:r.scripts||{},dependencies:r.dependencies||{},devDependencies:r.devDependencies||{},peerDependencies:r.peerDependencies||{}};return JSON.stringify(I,null,2)};w.useState(()=>{c(M())});const N=()=>{a(!0),c(M()),h("")},R=()=>{a(!1),c(M()),h("")},b=async()=>{if(!i.trim()){h("Configuration cannot be empty");return}m(!0),h("");try{const I=await Mt.updatePackageConfiguration(r.name,i,r.path);if(I.success)h("Configuration updated successfully!"),a(!1);else throw new Error(I.message||"Update failed")}catch(I){console.error("Error saving configuration:",I),h(I instanceof Error?I.message:"Failed to save configuration. Please try again.")}finally{m(!1)}},D=I=>{c(I.target.value),p&&h("")},_=async(I,U,q)=>{try{await navigator.clipboard.writeText(I),U==="config"?(k(!0),setTimeout(()=>k(!1),4e3)):U==="script"&&q&&(v(q),setTimeout(()=>v(null),4e3))}catch(he){console.error("Failed to copy to clipboard:",he);const $=document.createElement("textarea");$.value=I,document.body.appendChild($),$.select();try{document.execCommand("copy"),U==="config"?(k(!0),setTimeout(()=>k(!1),2e3)):U==="script"&&q&&(v(q),setTimeout(()=>v(null),2e3))}catch(pe){console.error("Fallback copy failed:",pe),U==="config"&&h("Failed to copy to clipboard")}document.body.removeChild($)}};return t.jsxs("div",{className:"py-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[t.jsx(Ac,{className:"w-5 h-5 text-gray-600"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Scripts"})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(r.scripts).map(([I,U])=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:I}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>_(U,"script",I),className:`text-sm flex items-center space-x-1 ${g===I?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:g===I?t.jsxs(t.Fragment,{children:[t.jsx(Pm,{className:"w-4 h-4"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Am,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"Run"})]})]}),t.jsx("code",{className:"text-xs text-gray-600 bg-gray-100 p-2 rounded block overflow-x-auto",children:U})]},I))}),Object.keys(r.scripts).length===0&&t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),t.jsx("p",{className:"text-gray-500",children:"No scripts configured"})]})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Configuration"}),!s&&t.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),s?t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg",children:t.jsx("textarea",{value:i,onChange:D,className:"w-full h-96 bg-gray-900 text-gray-100 text-sm font-mono resize-none focus:outline-none focus:ring-2 focus:ring-blue-500 rounded",spellCheck:"false"})}),p&&t.jsx("div",{className:`p-3 rounded-lg text-sm ${p.includes("successfully")?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:p}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsx("button",{onClick:b,disabled:d,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed text-sm flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Saving..."})]}):t.jsx("span",{children:"Save Changes"})}),t.jsx("button",{onClick:R,disabled:d,className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed text-sm",children:"Cancel"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:t.jsx("pre",{className:"text-sm",children:i})}),t.jsxs("div",{className:"mt-4 flex space-x-3",children:[t.jsx("button",{onClick:N,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 text-sm",children:"Edit Configuration"}),t.jsx("button",{onClick:()=>_(s?i:M(),"config"),className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 text-sm flex items-center space-x-2",children:y?t.jsxs(t.Fragment,{children:[t.jsx(Pm,{className:"w-4 h-4 text-green-600"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Am,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})})]})]})]})]})}const tf={title:"Monorepo Dashboard",description:"Visual management and monitoring of your monorepo packages",packageTypes:["app","lib","tool"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{primaryColor:"#3B82F6",secondaryColor:"#1E40AF"}};function Cv(){const[r,s]=w.useState(),[a,i]=w.useState(""),[c,d]=w.useState("all"),[m,p]=w.useState(tf),[h,g]=w.useState(!1),[v,y]=w.useState(!1),[k,M]=w.useState(!0),[N,R]=w.useState(null),[b,D]=w.useState(!1);w.useEffect(()=>{(async()=>{try{M(!0);const pe=await Mt.getPackages();s(pe),R(null)}catch(pe){R(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",pe)}finally{M(!1)}})()},[]),w.useEffect(()=>{const $=rt.get("monodog-config");$&&p({...tf,...JSON.parse($)})},[]);const _=$=>{p($),rt.set("monodog-config",JSON.stringify($))},I=async()=>{try{D(!0),R(null),M(!0);try{const $=await Mt.refreshPackages();s($),R(null)}catch($){R(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching package data:",$)}finally{M(!1)}}catch($){R(be.FAILED_TO_FETCH_PACKAGES),console.error("Error refreshing package data:",$)}finally{D(!1)}};if(k&&!r)return t.jsx(Uc,{});if(N)return t.jsx(ah,{error:N,onRetry:I});const U=av(r??[],a,c),q=lv(r??[]),he=sv(r??[]);return t.jsxs("div",{className:"p-6 space-y-6",children:[b&&r&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing packages..."})]})}),t.jsx(Xy,{config:m,onShowSetupGuide:()=>y(!0),onShowConfig:()=>g(!0),onRefresh:I}),t.jsx(Zy,{stats:he}),t.jsx(ev,{}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx(tv,{searchTerm:a,selectedType:c,packageTypes:q,onSearchChange:i,onTypeChange:d}),t.jsx(nv,{packages:U,getTypeIcon:ov,getStatusColor:iv})]}),t.jsx(By,{isOpen:h,onClose:()=>g(!1),onSave:_,currentConfig:m}),t.jsx(Jy,{isOpen:v,onClose:()=>y(!1),onComplete:()=>y(!1)})]})}function Ev(){const[r,s]=w.useState([]),[a,i]=w.useState(!0),[c,d]=w.useState(null),[m,p]=w.useState({search:"",type:"all",status:"all"}),[h,g]=w.useState({field:"name",order:"asc"});w.useEffect(()=>{(async()=>{try{i(!0);const D=await Mt.getPackages();s(D),d(null)}catch(D){d(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",D)}finally{i(!1)}})()},[]);const v=()=>{window.location.reload()},y=hv(r,m),k=pv(y,h),M=dv(r),N=mv(r),R=fv(r);return a?t.jsx(Uc,{}):c?t.jsx(ah,{error:c,onRetry:v}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-2xl",children:"Packages Overview"}),t.jsx("p",{className:"text-body mt-1",children:"Manage and monitor all packages in your monorepo"})]})}),t.jsx(cv,{stats:M}),t.jsx(uv,{filters:m,onFiltersChange:p,availableTypes:N,availableStatuses:R}),t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[t.jsxs("span",{children:["Showing ",k.length," of ",r.length," packages",m.search&&` matching "${m.search}"`]}),t.jsxs("span",{children:[m.type!=="all"&&`Filtered by type: ${m.type}`,m.status!=="all"&&` • status: ${m.status}`]})]}),t.jsx(yv,{packages:k,sorting:h,onSortChange:g}),k.length===0&&!a&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-neutral-400 text-6xl mb-4 flex justify-center",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-heading text-lg mb-2",children:"No packages found"}),t.jsx("p",{className:"text-body mb-4",children:m.search||m.type!=="all"||m.status!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first package to the monorepo."}),(m.search||m.type!=="all"||m.status!=="all")&&t.jsx("button",{onClick:()=>p({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function kv(){const{name:r}=Zp(),[s,a]=w.useState(null),[i,c]=w.useState("overview");if(w.useEffect(()=>{(async()=>{try{const p=await Mt.getPackage(r??"");a(p)}catch(p){console.error("Error fetching packages:",p)}})()},[r]),!s)return t.jsx(Uc,{message:"Loading package details..."});const d=()=>{switch(i){case"overview":return t.jsx("div",{className:"py-6",children:t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Package Overview"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("p",{className:"text-gray-600 mb-4",children:s.description}),t.jsx("h4",{className:"hidden text-sm font-medium text-gray-700 mb-2",children:"Maintainers"}),t.jsx("div",{className:"space-y-1",children:Object.keys(s.maintainers).map(m=>t.jsx("div",{className:"text-sm text-gray-600",children:m},m))})]}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Quick Stats"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Dependencies:"}),t.jsx("span",{className:"font-medium",children:s.dependenciesInfo.filter(m=>m.type=="dependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Dev Dependencies:"}),t.jsx("span",{className:"font-medium",children:s.dependenciesInfo.filter(m=>m.type=="devDependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Peer Dependencies:"}),t.jsx("span",{className:"font-medium",children:s.dependenciesInfo.filter(m=>m.type=="peerDependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Scripts:"}),t.jsx("span",{className:"font-medium",children:Object.keys(s.scripts).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Recent Commits:"}),t.jsx("span",{className:"font-medium",children:s.commits?.length})]})]})]})]})]})});case"dependencies":return t.jsx(wv,{packageData:s});case"commits":return t.jsx(Nv,{packageData:s});case"health":return t.jsx(bv,{packageData:s});case"config":return t.jsx(Sv,{packageData:s});default:return null}};return t.jsxs("div",{className:"space-y-6",children:[t.jsx(vv,{packageData:s}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsx(jv,{activeTab:i,onTabChange:c}),t.jsx("div",{className:"px-6",children:d()})]})]})}function Tv({message:r="Loading dependency graph..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function Rv({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(st,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function _v({onRefresh:r,loading:s=!1}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dependency Graph"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Visualize package dependencies and relationships"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,className:"hidden bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[t.jsx(dr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Av({viewMode:r,onViewModeChange:s,layout:a,onLayoutChange:i,showLegend:c,onToggleLegend:d,zoomLevel:m,onZoomChange:p}){return t.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"View:"}),t.jsxs("div",{className:"flex rounded-lg border border-gray-300 overflow-hidden",children:[t.jsxs("button",{onClick:()=>s("graph"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="graph"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(Mx,{className:"w-4 h-4"}),t.jsx("span",{children:"Graph"})]}),t.jsxs("button",{onClick:()=>s("list"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="list"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(Ix,{className:"w-4 h-4"}),t.jsx("span",{children:"List"})]})]})]}),r==="graph"&&t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Layout:"}),t.jsxs("select",{value:a,onChange:h=>i(h.target.value),className:"border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"hierarchical",children:"Hierarchical"}),t.jsx("option",{value:"circular",children:"Circular"}),t.jsx("option",{value:"force",children:"Force-Directed"})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Zoom:"}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("button",{onClick:()=>p(Math.max(.5,m-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m<=.5,children:t.jsx(Bx,{className:"w-4 h-4"})}),t.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(m*100),"%"]}),t.jsx("button",{onClick:()=>p(Math.min(2,m+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m>=2,children:t.jsx(Ux,{className:"w-4 h-4"})})]})]})]}),t.jsxs("button",{onClick:d,className:`px-3 py-2 text-sm font-medium rounded-lg flex items-center space-x-1 transition-colors ${c?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[t.jsx(xs,{className:"w-4 h-4"}),t.jsx("span",{children:"Legend"})]})]})}const dh=r=>{switch(r){case"healthy":return"text-green-600 bg-green-100";case"warning":return"text-yellow-600 bg-yellow-100";case"error":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},mh=r=>{switch(r){case"app":return"text-blue-600 bg-blue-100";case"lib":return"text-purple-600 bg-purple-100";case"tool":return"text-orange-600 bg-orange-100";default:return"text-gray-600 bg-gray-100"}},nf=(r,s)=>{const a=s.find(i=>i.name===r);if(!a)return"text-gray-400";switch(a.status){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-gray-400"}},Pv=r=>{const s=r.length,a=r.reduce((h,g)=>h+Object.keys(g.dependencies).length,0),i=r.filter(h=>Object.keys(h.dependencies).length===0).length,c=r.filter(h=>h.dependents.length===0).length,d=Lv(r),m=s>0?a/s:0,p=fh(r);return{totalPackages:s,totalDependencies:a,circularDependencies:p.length,leafPackages:i,rootPackages:c,maxDepth:d,avgDependencies:Math.round(m*10)/10}},Lv=r=>{const s=new Set;let a=0;const i=(c,d)=>{if(s.has(c))return d;s.add(c);const m=r.find(h=>h.name===c);if(!m)return d;let p=d;for(const h of Object.keys(m.dependencies)){const g=i(h,d+1);p=Math.max(p,g)}return p};for(const c of r)if(!s.has(c.name)){const d=i(c.name,0);a=Math.max(a,d)}return a},fh=r=>{const s=[],a=new Set,i=new Set,c=[],d=m=>{if(i.has(m)){const h=c.indexOf(m),g=c.slice(h).concat(m);return s.push({cycle:g,severity:g.length>5?"high":g.length>3?"medium":"low",impact:`Circular dependency involving ${g.length} packages`}),!0}if(a.has(m))return!1;a.add(m),i.add(m),c.push(m);const p=r.find(h=>h.name===m);if(p){for(const h of Object.keys(p.dependencies))if(d(h))return!0}return i.delete(m),c.pop(),!1};for(const m of r)a.has(m.name)||d(m.name);return s},Ov=(r,s,a)=>[...r].sort((i,c)=>{let d,m;switch(s){case"name":d=i.name.toLowerCase(),m=c.name.toLowerCase();break;case"dependencies":d=Object.keys(i.dependencies).length,m=Object.keys(c.dependencies).length;break;case"dependents":d=i.dependents.length,m=c.dependents.length;break;case"status":{const p={error:0,warning:1,healthy:2};d=p[i.status]||3,m=p[c.status]||3;break}default:return 0}return d<m?a==="asc"?-1:1:d>m?a==="asc"?1:-1:0}),Iv=(r,s,a=800,i=600)=>{switch(s){case"hierarchical":return Mv(r,a,i);case"circular":return Dv(r,a,i);case"force":return Fv(r,a,i);default:return r}},Mv=(r,s,a)=>{const i=[],c=new Set,d=(m,p)=>{if(c.has(m))return;c.add(m),i[p]||(i[p]=[]),i[p].push(m);const h=r.find(g=>g.name===m);h&&h.dependents.forEach(g=>d(g,p+1))};return r.filter(m=>Object.keys(m.dependencies).length===0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),i.length===0&&r.filter(m=>Object.keys(m.dependencies).length>0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),r.map(m=>{const p=i.findIndex(v=>v.includes(m.name)),h=i[p]?.indexOf(m.name)||0,g=i[p]?.length||1;return{...m,x:s/(i.length+1)*(p+1)-50,y:a/(g+1)*(h+1)-25}})},Dv=(r,s,a)=>{const i=s/2,c=a/2,d=Math.min(s,a)/3;return r.map((m,p)=>{const h=2*Math.PI*p/r.length;return{...m,x:i+d*Math.cos(h)-50,y:c+d*Math.sin(h)-25}})},Fv=(r,s,a)=>{const i=r.map((c,d)=>({...c,x:Math.random()*(s-100),y:Math.random()*(a-50)}));for(let c=0;c<50;c++)i.forEach(d=>{let m=0,p=0;i.forEach(h=>{if(h.name!==d.name){const g=d.x-h.x,v=d.y-h.y,y=Math.sqrt(g*g+v*v)||1,k=1e3/(y*y);m+=g/y*k,p+=v/y*k}}),Object.keys(d.dependencies).forEach(h=>{const g=i.find(v=>v.name===h);if(g){const v=g.x-d.x,y=g.y-d.y,k=Math.sqrt(v*v+y*y)||1,M=k*.01;m+=v/k*M,p+=y/k*M}}),d.x+=m*.1,d.y+=p*.1,d.x=Math.max(50,Math.min(s-100,d.x)),d.y=Math.max(25,Math.min(a-50,d.y))});return i},Uv=r=>{switch(r){case"app":return t.jsx(On,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(ri,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}},Bv=r=>r.length>12?`${r.substring(0,12)}...`:r,zv=r=>{const s={};return r.forEach(a=>{s[a.name]=[]}),r.forEach(a=>{const i=a.name;[...Object.keys(a.dependencies??{}),...Object.keys(a.devDependencies??{}),...Object.keys(a.peerDependencies??{})].forEach(d=>{s[d]||(s[d]=[]),s[d].includes(i)||s[d].push(i)})}),s};function Hv({packages:r,selectedPackage:s,hoveredPackage:a,onPackageSelect:i,onPackageHover:c,layout:d}){return t.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm border border-gray-200 p-6 min-h-[600px]",children:[t.jsxs("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 800 600",children:[r.map(m=>Object.keys(m.dependencies).map(p=>{const h=r.find(v=>v.name===p);if(!h)return null;const g=a===m.name||a===p||s===m.name||s===p;return t.jsxs("g",{children:[t.jsx("defs",{children:t.jsx("marker",{id:`arrow-${m.name}-${p}`,markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:t.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:g?"#3B82F6":"#6B7280"})})}),t.jsx("line",{x1:h.x+50,y1:h.y+25,x2:m.x,y2:m.y+25,stroke:g?"#3B82F6":"#6B7280",strokeWidth:g?"3":"2",markerEnd:`url(#arrow-${m.name}-${p})`,className:"transition-all duration-200",style:{opacity:g?1:.6}})]},`${m.name}-${p}`)})),r.map(m=>{const p=s===m.name,h=a===m.name,g=s&&(Object.keys(m.dependencies).includes(s)||Object.keys(m.dependents).includes(s));return t.jsxs("g",{children:[t.jsx("rect",{x:m.x,y:m.y,width:"100",height:"50",rx:"8",fill:"white",stroke:p?"#3B82F6":g?"#10B981":h?"#6B7280":"#E5E7EB",strokeWidth:p?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:h||p||g?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>c(m.name),onMouseLeave:()=>c(null),onClick:()=>i(p?null:m.name)}),t.jsx("text",{x:m.x+50,y:m.y+20,textAnchor:"middle",className:"text-xs font-medium fill-gray-900 pointer-events-none",children:Bv(m.name)}),t.jsxs("text",{x:m.x+50,y:m.y+35,textAnchor:"middle",className:"text-xs fill-gray-500 pointer-events-none",children:["v",m.version]}),t.jsx("circle",{cx:m.x+85,cy:m.y+15,r:"6",fill:m.status==="healthy"?"#10B981":m.status==="warning"?"#F59E0B":"#EF4444",className:"pointer-events-none"}),t.jsx("rect",{x:m.x+5,y:m.y+5,width:"12",height:"8",rx:"2",fill:m.type==="app"?"#3B82F6":m.type==="lib"?"#8B5CF6":"#F97316",className:"pointer-events-none"})]},m.name)})]}),r.length===0&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:t.jsx(si,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No dependencies found"}),t.jsx("p",{className:"text-gray-600",children:"No package dependencies to display."})]})})]})}function $v({packages:r,selectedPackage:s,onPackageSelect:a,sortBy:i,sortOrder:c,onSortChange:d}){const m=h=>{d(h,i===h&&c==="asc"?"desc":"asc")},p=h=>i!==h?null:c==="asc"?t.jsx(Tc,{className:"w-4 h-4"}):t.jsx(Pf,{className:"w-4 h-4"});return t.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[t.jsxs("div",{className:"p-6 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Dependencies"}),t.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Click on a view details to explore its dependencies, commits, configuration and health"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>m("name"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),p("name")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>m("dependencies"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),p("dependencies")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>m("dependents"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependents"}),p("dependents")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(h=>t.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${s===h.name?"bg-blue-50":""}`,onClick:()=>a(h.name),children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:Uv(h.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:h.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:["v",h.version]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mh(h.type)}`,children:h.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${dh(h.status)}`,children:h.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(h.dependencies).length,Object.keys(h.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(h.dependencies).slice(0,3).join(", "),Object.keys(h.dependencies).length>3&&` +${Object.keys(h.dependencies).length-3} more`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[h.dependents.length,h.dependents.length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[h.dependents.slice(0,3).join(", "),h.dependents.length>3&&` +${h.dependents.length-3} more`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:t.jsx(Pn,{to:`/packages/${encodeURIComponent(h.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:g=>g.stopPropagation(),children:"View Details"})})]},h.name))})]})}),r.length===0&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2 flex justify-center",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function Vv({package:r,packages:s,onClose:a}){return r?t.jsxs("div",{className:"absolute top-4 right-4 bg-white p-4 rounded-lg shadow-lg border border-gray-200 w-80 max-h-[80vh] overflow-y-auto",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:r.name}),t.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(ws,{className:"w-5 h-5"})})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mh(r.type)}`,children:r.type}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${dh(r.status)}`,children:r.status})]}),t.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",t.jsx("span",{className:"font-mono",children:r.version})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependencies"}),t.jsxs("span",{className:"text-xs text-gray-500",children:["(",Object.keys(r.dependencies).length,")"]})]}),Object.keys(r.dependencies).length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.keys(r.dependencies).map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${nf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):t.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependencies"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependents"}),t.jsxs("span",{className:"text-xs text-gray-500",children:["(",r.dependents.length,")"]})]}),r.dependents.length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:r.dependents.map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${nf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):t.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependents"})]}),t.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Impact Analysis"}),t.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependencies:"}),t.jsx("span",{className:"font-medium",children:Object.keys(r.dependencies).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependents:"}),t.jsx("span",{className:"font-medium",children:r.dependents.length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Risk level:"}),t.jsx("span",{className:`font-medium ${r.dependents.length>5?"text-red-600":r.dependents.length>2?"text-yellow-600":"text-green-600"}`,children:r.dependents.length>5?"High":r.dependents.length>2?"Medium":"Low"})]})]})]}),t.jsx("div",{className:"pt-2 border-t border-gray-200",children:t.jsx(Pn,{to:`/packages/${encodeURIComponent(r.name)}`,className:"block w-full text-center bg-blue-600 text-white px-3 py-2 rounded-lg hover:bg-blue-700 text-sm font-medium transition-colors",children:"View Package Details →"})})]})]}):null}function Wv({stats:r,packages:s}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsx("div",{className:"bg-gray-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.totalPackages})]})]})}),t.jsx("div",{className:"bg-blue-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(si,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Dependencies"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.totalDependencies})]})]})}),t.jsx("div",{className:`${r.circularDependencies>0?"bg-red-100":"bg-green-100"} p-4 rounded-lg shadow border`,children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`p-2 rounded-lg ${r.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:t.jsx(st,{className:`w-6 h-6 ${r.circularDependencies>0?"text-red-600":"text-primary-600"}`})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Circular Deps"}),t.jsx("p",{className:`text-2xl font-semibold ${r.circularDependencies>0?"text-red-600":"text-gray-600"}`,children:r.circularDependencies})]})]})}),t.jsx("div",{className:"bg-purple-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx(Sl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Max Depth"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.maxDepth})]})]})}),t.jsxs("div",{className:"md:col-span-4 bg-white p-4 rounded-lg shadow border",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Dependency Analysis"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-blue-600",children:r.leafPackages}),t.jsx("div",{className:"text-sm text-gray-600",children:"Leaf Packages"}),t.jsx("div",{className:"text-xs text-gray-500",children:"No dependencies"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-green-600",children:r.rootPackages}),t.jsx("div",{className:"text-sm text-gray-600",children:"Root Packages"}),t.jsx("div",{className:"text-xs text-gray-500",children:"No dependents"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-purple-600",children:r.avgDependencies}),t.jsx("div",{className:"text-sm text-gray-600",children:"Avg Dependencies"}),t.jsx("div",{className:"text-xs text-gray-500",children:"Per package"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-orange-600",children:s.filter(a=>a.status==="healthy").length}),t.jsx("div",{className:"text-sm text-gray-600",children:"Healthy Packages"}),t.jsxs("div",{className:"text-xs text-gray-500",children:[Math.round(s.filter(a=>a.status==="healthy").length/s.length*100),"% of total"]})]})]})]})]})}function Gv({cycles:r,packages:s,onPackageSelect:a}){const i=d=>{switch(d){case"high":return"bg-red-100 text-red-800 border-red-200";case"medium":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"low":return"bg-blue-100 text-blue-800 border-blue-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},c=d=>{switch(d){case"high":return"🔴";case"medium":return"🟡";case"low":return"🔵";default:return"⚪"}};return r.length===0?t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(st,{className:"w-6 h-6 text-green-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Dependency cycle analysis"})]})]}),t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-green-400 text-4xl mb-2"}),t.jsx("h4",{className:"text-green-800 font-medium mb-1",children:"No Circular Dependencies!"}),t.jsx("p",{className:"text-green-700 text-sm",children:"Your dependency graph is clean and free of circular references."})]})]}):t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[t.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:t.jsx(st,{className:"w-6 h-6 text-red-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),t.jsxs("p",{className:"text-sm text-gray-600",children:["Found ",r.length," circular dependency cycle",r.length>1?"s":""]})]})]}),t.jsx("div",{className:"space-y-4",children:r.map((d,m)=>t.jsxs("div",{className:`border rounded-lg p-4 ${i(d.severity)}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg",children:c(d.severity)}),t.jsxs("span",{className:"text-sm font-medium capitalize",children:[d.severity," Severity"]})]}),t.jsxs("span",{className:"text-xs opacity-75",children:[d.cycle.length," packages affected"]})]}),t.jsx("div",{className:"mb-3",children:t.jsx("p",{className:"text-sm mb-2",children:d.impact})}),t.jsx("div",{className:"bg-white bg-opacity-50 rounded-lg p-3",children:t.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[d.cycle.map((p,h)=>t.jsxs(w.Fragment,{children:[t.jsx("button",{onClick:()=>a(p),className:"px-3 py-1 bg-white rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors border shadow-sm",children:p}),h<d.cycle.length-1&&t.jsx(_m,{className:"w-4 h-4 text-gray-400"})]},`${p}-${h}`)),d.cycle.length>1&&t.jsxs(t.Fragment,{children:[t.jsx(_m,{className:"w-4 h-4 text-gray-400"}),t.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",d.cycle[0],")"]})]})]})}),t.jsxs("div",{className:"mt-3 pt-3 border-t border-current border-opacity-20",children:[t.jsx("h5",{className:"text-xs font-medium mb-1",children:"Recommendation:"}),t.jsxs("p",{className:"text-xs opacity-90",children:[d.severity==="high"&&"Critical: Refactor immediately to break this cycle. Consider dependency inversion or splitting packages.",d.severity==="medium"&&"Important: Plan to refactor this cycle. Review package boundaries and extract common dependencies.",d.severity==="low"&&"Minor: Monitor this cycle. Consider if these packages could be merged or dependencies restructured."]})]})]},m))}),t.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-red-600",children:r.filter(d=>d.severity==="high").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"High Severity"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-yellow-600",children:r.filter(d=>d.severity==="medium").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Medium Severity"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-blue-600",children:r.filter(d=>d.severity==="low").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Kv({show:r}){return r?t.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Legend"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Package Types"}),t.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-blue-500 rounded"}),t.jsx("span",{children:"App"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-purple-500 rounded"}),t.jsx("span",{children:"Library"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-orange-500 rounded"}),t.jsx("span",{children:"Tool"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Health Status"}),t.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),t.jsx("span",{children:"Healthy"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-yellow-500 rounded-full"}),t.jsx("span",{children:"Warning"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full"}),t.jsx("span",{children:"Error"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Visual Elements"}),t.jsxs("div",{className:"space-y-1 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(yl,{}),t.jsx("span",{children:"Dependency"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-6 h-4 border-2 border-blue-500 rounded bg-white"}),t.jsx("span",{children:"Selected"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-6 h-4 border-2 border-green-500 rounded bg-white"}),t.jsx("span",{children:"Connected"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Interactions"}),t.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[t.jsx("div",{children:"• Click a package to select and view details"}),t.jsx("div",{children:"• Hover to highlight connections"}),t.jsx("div",{children:"• Use toolbar to change layout and zoom"})]})]})]})]}):null}function Yv(){w.useEffect(()=>{(async()=>{try{s(!0);const Q=await Mt.getPackages(),J=zv(Q),B=Q.map(Y=>({...Y,dependencies:{...Y.dependencies,...Y.devDependencies,...Y.peerDependencies},dependents:J[Y.name]}));d(B),i(null)}catch(Q){i(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",Q)}finally{s(!1)}})()},[]);const[r,s]=w.useState(!1),[a,i]=w.useState(null),[c,d]=w.useState([]),[m,p]=w.useState("graph"),[h,g]=w.useState("hierarchical"),[v,y]=w.useState(null),[k,M]=w.useState(null),[N,R]=w.useState(!0),[b,D]=w.useState(1),[_,I]=w.useState("name"),[U,q]=w.useState("asc"),he=w.useMemo(()=>Iv(c??[],h,800,600),[c,h]),$=w.useMemo(()=>Ov(c,_,U),[c,_,U]),pe=w.useMemo(()=>Pv(c),[c]),we=w.useMemo(()=>fh(c),[c]),je=v&&c.find(oe=>oe.name===v)||null,te=()=>{},ve=oe=>{y(oe)},ce=(oe,Q)=>{I(oe),q(Q)},ge=()=>{window.location.reload()};return r?t.jsx(Tv,{}):a?t.jsx(Rv,{error:a,onRetry:ge}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(_v,{onRefresh:te,loading:r}),t.jsx(Wv,{stats:pe,packages:c??[]}),we.length>0&&t.jsx(Gv,{cycles:we,packages:c,onPackageSelect:ve}),t.jsx(Av,{viewMode:m,onViewModeChange:p,layout:h,onLayoutChange:g,showLegend:N,onToggleLegend:()=>R(!N),zoomLevel:b,onZoomChange:D}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:`${N?"lg:col-span-3":"lg:col-span-4"}`,children:m==="graph"?t.jsxs("div",{className:"relative",children:[t.jsx("div",{style:{transform:`scale(${b})`,transformOrigin:"top left"},children:t.jsx(Hv,{packages:he,selectedPackage:v,hoveredPackage:k,onPackageSelect:ve,onPackageHover:M,layout:h})}),t.jsx(Vv,{package:je,packages:c,onClose:()=>y(null)})]}):t.jsx($v,{packages:$,selectedPackage:v,onPackageSelect:ve,sortBy:_,sortOrder:U,onSortChange:ce})}),N&&t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Kv,{show:N})})]})]})}function qv(){const[r,s]=w.useState(0),[a,i]=w.useState(null),[c,d]=w.useState(!0),[m,p]=w.useState(null),[h,g]=w.useState(!1);w.useEffect(()=>{(async()=>{try{d(!0);const I=await Mt.getHealthStatus();i(I),p(null)}catch(I){p(be.UNKNOWN_ERROR),console.error("Error fetching health data:",I)}finally{d(!1)}})()},[r]);const v=async()=>{try{g(!0),p(null),d(!0);try{const _=await Mt.refreshHealthStatus();i(_),p(null)}catch(_){p(be.UNKNOWN_ERROR),console.error("Error fetching health data:",_)}finally{d(!1)}}catch(_){p(be.UNKNOWN_ERROR),console.error("Error refreshing health data:",_)}finally{g(!1)}},y=()=>{s(_=>_+1)},k=_=>{switch(_){case"healthy":case"success":case"pass":case"up-to-date":return"bg-green-100 text-green-800";case"warning":case"warn":case"outdated":return"bg-yellow-100 text-yellow-800";case"error":case"failed":case"fail":case"vulnerable":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};if(c&&!a)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading health data..."})]})});if(m)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(st,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:m}),t.jsx("button",{onClick:y,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const M=a?a.summary?.averageScore:0,N=a?a?.packages?.filter(_=>_.health.overallScore>=80).length:0,R=a?a?.packages?.filter(_=>_.health.overallScore>=60&&_.health.overallScore<80).length:0,b=a?a?.packages?.filter(_=>_.health.overallScore<60).length:0,D=[{name:"Package Health",value:N||0,status:(()=>{const _=N||0,I=a?.packages.length||0;if(I===0)return"healthy";const U=_/I;return U>=.8?"healthy":U>=.6?"warning":"error"})(),description:`${N||0} healthy packages out of ${a?.packages.length||0}`},{name:"Overall Score",value:Math.round(M),status:Math.round(M)>=80?"healthy":Math.round(M)>=60?"warning":"error",description:`Average health score: ${Math.round(M)}/100`},{name:"Unhealthy Packages",value:R+b||0,status:(R+b||0)===0?"healthy":(R+b||0)<=2?"warning":"error",description:`${R+b||0} packages need attention`}];return t.jsxs("div",{className:"",children:[t.jsxs("div",{className:"flex items-center justify-between my-3",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Health Status"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Monitor the health and performance of your monorepo packages"})]}),t.jsxs("button",{onClick:v,disabled:h,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[h?t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):t.jsx(dr,{className:"w-5 h-5"}),t.jsx("span",{children:h?"Refreshing...":"Refresh"})]})]}),h&&a&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing health data..."})]})}),t.jsxs("div",{className:"my-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg p-6 text-white",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Overall Monorepo Health"}),t.jsx("p",{className:"text-blue-100 mt-1",children:"Based on all package metrics and recent activity"})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"text-4xl font-bold",children:M?.toFixed(2)}),t.jsx("div",{className:"text-blue-100",children:"out of 100"})]})]}),t.jsxs("div",{className:"mt-4 flex space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Rt,{className:"w-5 h-5 text-green-300"}),t.jsxs("span",{children:[N," Healthy"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(st,{className:"w-5 h-5 text-yellow-300"}),t.jsxs("span",{children:[R," Warnings"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(It,{className:"w-5 h-5 text-red-300"}),t.jsxs("span",{children:[b," Errors"]})]})]})]}),t.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:D.map(_=>t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:_.name}),t.jsx("div",{className:`w-3 h-3 rounded-full ${_.status==="healthy"?"bg-green-500":_.status==="warning"?"bg-yellow-500":"bg-red-500"}`})]}),t.jsx("div",{className:"flex items-end space-x-2",children:t.jsx("span",{className:"text-3xl font-bold text-gray-900",children:_.value})}),t.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(_.status)}`,children:_.status}),t.jsx("span",{className:"text-sm text-gray-500",children:_.description})]})]},_.name))}),t.jsxs("div",{className:"my-3 bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Health Details"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Overall Score"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Build Status"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Test Coverage"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Lint Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Security"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:a?.packages?.map(_=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:t.jsx("div",{className:"text-sm",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})})}),t.jsxs("div",{className:"ml-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:_.packageName}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",_.health.overallScore,"/100"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-16 bg-gray-200 rounded-full h-2 mr-2",children:t.jsx("div",{className:`h-2 rounded-full ${_.health.overallScore>=80?"bg-green-500":_.health.overallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${_.health.overallScore}%`}})}),t.jsx("span",{className:"text-sm font-medium text-gray-900",children:_.health.overallScore})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`w-3 h-3 rounded-full ${_.health.buildStatus==="success"?"bg-green-500":_.health.buildStatus==="unknown"?"bg-yellow-500":"bg-red-500"}`}),t.jsx("span",{className:`ml-2 inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(_.health.buildStatus==="success"?"healthy":_.health.buildStatus==="unknown"?"warning":"error")}`,children:_.health.buildStatus==="success"?"healthy":_.health.buildStatus==="unknown"?"warning":"error"})]})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(Dx,{className:"w-4 h-4 text-gray-400 mr-1"}),t.jsx("span",{className:"text-sm text-gray-900",children:"-"})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(_.health.lintStatus==="pass"?"pass":_.health.lintStatus==="unknown"?"warn":"fail")}`,children:_.health.lintStatus==="pass"?"pass":_.health.lintStatus==="unknown"?"warn":"fail"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("div",{className:"flex items-center",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(_.health.securityAudit==="pass"?"pass":_.health.securityAudit==="unknown"?"warn":"fail")}`,children:_.health.securityAudit==="pass"?"pass":_.health.securityAudit==="unknown"?"warn":"fail"})})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(_.health.overallScore>=80?"up-to-date":_.health.overallScore>=60?"outdated":"vulnerable")}`,children:_.health.overallScore>=80?"up-to-date":_.health.overallScore>=60?"outdated":"vulnerable"})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx("div",{className:"flex space-x-2",children:t.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"})})})]},_.packageName))})]})})]}),t.jsxs("div",{className:"hidden bg-white rounded-lg shadow border p-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Health Recommendations"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:[t.jsx(st,{className:"w-5 h-5 text-yellow-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-yellow-800",children:"Test Coverage Below Target"}),t.jsx("p",{className:"text-sm text-yellow-700",children:"Consider adding more tests to improve coverage above 90%"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-red-50 rounded-lg border border-red-200",children:[t.jsx(It,{className:"w-5 h-5 text-red-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-red-800",children:"Build Failures Detected"}),t.jsx("p",{className:"text-sm text-red-700",children:"monorepo-scanner package has build failures that need immediate attention"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg border border-blue-200",children:[t.jsx(Sl,{className:"w-5 h-5 text-blue-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-blue-800",children:"Performance Improvements Available"}),t.jsx("p",{className:"text-sm text-blue-700",children:"Consider optimizing build times and dependency resolution"})]})]})]})]})]})}function Qv({packageCount:r,onNewRelease:s}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Publish Control"}),t.jsxs("p",{className:"text-gray-600 mt-1",children:["Manage package releases and versioning across your monorepo (",r," packages)"]})]}),t.jsxs("button",{onClick:s,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[t.jsx(Lf,{className:"w-5 h-5"}),t.jsx("span",{children:"New Release"})]})]})}function Jv({stats:r}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(ni,{className:"w-6 h-6 text-green-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Ready to Publish"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.readyToPublish})]})]})}),t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"In Progress"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.inProgress})]})]})}),t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx("span",{className:"text-2xl",children:t.jsx(On,{className:"w-6 h-6 text-primary-600"})})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Published Today"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.published})]})]})})]})}const Xv=r=>({readyToPublish:r.filter(s=>s.status==="ready").length,inProgress:r.filter(s=>s.status==="building"||s.status==="testing").length,published:r.filter(s=>s.status==="published").length}),hh=r=>{switch(r){case"ready":case"completed":return"bg-green-100 text-green-800";case"building":case"testing":case"in-progress":return"bg-blue-100 text-blue-800";case"published":return"bg-purple-100 text-purple-800";case"failed":return"bg-red-100 text-red-800";case"scheduled":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},Zv=r=>{switch(r){case"patch":return"bg-green-100 text-green-800";case"minor":return"bg-blue-100 text-blue-800";case"major":return"bg-red-100 text-red-800";case"prerelease":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},e1=(r,s)=>s==="all"?r:r.filter(a=>a.name===s);function t1({packages:r,selectedPackage:s,onPackageChange:a}){return t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Release Status"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm text-gray-500",children:"Filter by package:"}),t.jsxs("select",{value:s,onChange:i=>a(i.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Packages"}),[...new Set(r.map(i=>i.name))].map(i=>t.jsx("option",{value:i,children:i},i))]})]})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Next Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Commits"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Published"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(i=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:t.jsx(Pc,{className:"w-4 h-4 text-gray-600"})}),t.jsxs("div",{className:"ml-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:i.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(i.dependencies).length," dependencies"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.currentVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.nextVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Zv(i.publishType)}`,children:i.publishType})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${hh(i.status)}`,children:i.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.commits}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[t.jsx(Be,{className:"w-4 h-4 mr-1 text-gray-400"}),i.lastPublished]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex space-x-2",children:[i.status==="ready"&&t.jsx("button",{className:"text-green-600 hover:text-green-900",children:"Publish"}),t.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"}),t.jsx("button",{className:"text-purple-600 hover:text-purple-900",children:"Changelog"})]})})]},i.name))})]})})]})}function n1({releases:r,selectedStatus:s,onStatusChange:a}){const i=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 11:00 AM",startedAt:"2024-01-16 11:05 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"}];return t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Release Schedule"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm text-gray-500",children:"Filter by status:"}),t.jsxs("select",{value:s,onChange:c=>a(c.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Status"}),t.jsx("option",{value:"scheduled",children:"Scheduled"}),t.jsx("option",{value:"in-progress",children:"In Progress"}),t.jsx("option",{value:"completed",children:"Completed"}),t.jsx("option",{value:"failed",children:"Failed"})]})]})]})}),t.jsx("div",{className:"p-6",children:t.jsx("div",{className:"space-y-4",children:i.map(c=>t.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-purple-100 flex items-center justify-center",children:t.jsx(Of,{className:"w-4 h-4 text-purple-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[c.packageName," v",c.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["by ",c.author]})]})]}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${hh(c.status)}`,children:c.status}),t.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[t.jsx(Be,{className:"w-4 h-4 mr-1"}),c.scheduledFor]})]})]}),t.jsx("div",{className:"mt-3 text-sm text-gray-700",children:c.changelog})]},c.id))})})]})}function r1(){const r=[{id:"1",packageName:"dashboard",version:"1.0.0",date:"2024-01-15",changes:["Added new dashboard layout","Improved search functionality","Fixed responsive design issues"],author:"team-frontend",type:"feature"},{id:"2",packageName:"backend",version:"1.2.0",date:"2024-01-14",changes:["Added authentication middleware","Implemented rate limiting","Fixed database connection pool"],author:"team-backend",type:"feature"}],s=a=>{switch(a){case"feature":return"bg-green-100 text-green-800";case"bugfix":return"bg-blue-100 text-blue-800";case"breaking":return"bg-red-100 text-red-800";case"docs":return"bg-gray-100 text-gray-800";default:return"bg-gray-100 text-gray-800"}};return t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Changelogs"})}),t.jsx("div",{className:"p-6",children:t.jsx("div",{className:"space-y-6",children:r.map(a=>t.jsxs("div",{className:"border-l-4 border-blue-500 pl-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center",children:t.jsx(Pc,{className:"w-4 h-4 text-blue-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[a.packageName," v",a.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:[a.date," • by ",a.author]})]})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${s(a.type)}`,children:a.type})]}),t.jsx("div",{className:"space-y-1",children:a.changes.map((i,c)=>t.jsxs("div",{className:"flex items-start space-x-2",children:[t.jsx(Ac,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-gray-700",children:i})]},c))})]},a.id))})})]})}function s1(){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading package data..."})]})})}function l1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(st,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}const rf=[{name:"dashboard",currentVersion:"1.0.0",nextVersion:"1.0.1",status:"ready",lastPublished:"2024-01-10",changelog:"Bug fixes and performance improvements",commits:15,dependencies:["react","tailwindcss"],publishType:"patch"},{name:"backend",currentVersion:"1.2.0",nextVersion:"1.3.0",status:"building",lastPublished:"2024-01-08",changelog:"New API endpoints and enhanced security",commits:28,dependencies:["express","prisma"],publishType:"minor"},{name:"utils",currentVersion:"0.5.2",nextVersion:"1.0.0",status:"ready",lastPublished:"2024-01-05",changelog:"Major refactor with breaking changes",commits:42,dependencies:["lodash"],publishType:"major"},{name:"ci-status",currentVersion:"0.3.1",nextVersion:"0.4.0",status:"testing",lastPublished:"2024-01-12",changelog:"Enhanced CI monitoring and reporting",commits:18,dependencies:["axios","ws"],publishType:"minor"}],a1=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 09:00 AM",startedAt:"2024-01-16 09:00 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"},{id:"3",packageName:"utils",version:"1.0.0",status:"completed",scheduledFor:"2024-01-15 02:00 PM",startedAt:"2024-01-15 02:00 PM",completedAt:"2024-01-15 02:15 PM",changelog:"Major refactor with breaking changes",author:"team-shared"}];function i1(){const[r,s]=w.useState("all"),[a,i]=w.useState("all"),[c,d]=w.useState(rf),[m,p]=w.useState(!1),[h,g]=w.useState(null);w.useEffect(()=>{(async()=>{try{p(!0);const I=(await Mt.getPackages()).map(U=>({name:U.name,currentVersion:U.version,nextVersion:v(U.version),status:y(U.status),lastPublished:U.lastUpdated,changelog:U.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:U.dependencies||[],publishType:k()}));d(I),g(null)}catch(_){g(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",_),d(rf)}finally{p(!1)}})()},[]);const v=D=>{const _=D.split(".").map(Number);return _[2]+=1,_.join(".")},y=D=>{switch(D){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},k=()=>{const D=["patch","minor","major","prerelease"];return D[Math.floor(Math.random()*D.length)]},M=()=>{},N=()=>{window.location.reload()},R=e1(c,r),b=Xv(c);return m?t.jsx(s1,{}):h?t.jsx(l1,{error:h,onRetry:N}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Qv,{packageCount:c.length,onNewRelease:M}),t.jsx(Jv,{stats:b}),t.jsx(t1,{packages:R,selectedPackage:r,onPackageChange:s}),t.jsx(n1,{releases:a1,selectedStatus:a,onStatusChange:i}),t.jsx(r1,{})]})}function o1({message:r="Loading CI/CD data..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function c1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(st,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function u1({onTriggerBuild:r,onCreatePipeline:s}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-2xl",children:"CI/CD Integration"}),t.jsx("p",{className:"text-body mt-1",children:"Monitor and manage continuous integration and deployment pipelines"})]}),t.jsxs("div",{className:"flex space-x-2",children:[t.jsxs("button",{onClick:r,className:"btn-secondary flex items-center space-x-2",children:[t.jsx(ni,{className:"w-5 h-5"}),t.jsx("span",{children:"Trigger Build"})]}),t.jsxs("button",{onClick:s,className:"btn-primary flex items-center space-x-2",children:[t.jsx(Px,{className:"w-5 h-5"}),t.jsx("span",{children:"New Pipeline"})]})]})]})}const Za=r=>{switch(r){case"success":case"active":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-yellow-100 text-yellow-800";case"failed":case"cancelled":return"bg-red-100 text-red-800";case"paused":return"bg-gray-100 text-gray-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},d1=r=>{switch(r){case"success":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-gray-100 text-gray-800";case"failed":return"bg-red-100 text-red-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},m1=r=>{const s=r.length,a=r.filter(h=>h.status==="success").length,i=r.filter(h=>h.status==="failed").length,c=r.filter(h=>h.status==="running").length,d=s>0?Math.round(a/s*100):0,m=r.filter(h=>h.duration),p=m.length>0?Math.round(m.reduce((h,g)=>h+(g.duration||0),0)/m.length):0;return{total:s,successful:a,failed:i,running:c,successRate:d,avgDuration:p}},f1=(r,s)=>r.filter(a=>{const i=s.package==="all"||a.packageName===s.package,c=s.status==="all"||a.status===s.status;return i&&c&&!0}),h1=r=>[...new Set(r.map(s=>s.packageName))],p1=r=>[...new Set(r.map(s=>s.status))],wl=r=>{if(r<60)return`${r}s`;if(r<3600){const s=Math.floor(r/60),a=r%60;return a>0?`${s}m ${a}s`:`${s}m`}else{const s=Math.floor(r/3600),a=Math.floor(r%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}},sf=r=>new Date(r).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),ph=r=>{const s=new Date(r),i=new Date().getTime()-s.getTime(),c=Math.floor(i/(1e3*60)),d=Math.floor(c/60),m=Math.floor(d/24);return c<1?"Just now":c<60?`${c} min ago`:d<24?`${d} hour${d>1?"s":""} ago`:`${m} day${m>1?"s":""} ago`},x1=r=>{if(r.status==="success"||r.status==="failed"||r.status==="cancelled")return 100;if(r.status==="pending")return 0;const s=r.stages.length;if(s===0)return 0;const a=r.stages.filter(d=>d.status==="success"||d.status==="failed"||d.status==="skipped").length,i=r.stages.filter(d=>d.status==="running").length,c=(a+i*.5)/s;return Math.round(c*100)},g1=r=>{const s=r.toLowerCase();return s.includes("build")||s.includes("compile")?"🔨":s.includes("test")?"🧪":s.includes("lint")||s.includes("format")?"✨":s.includes("deploy")||s.includes("publish")?t.jsx(On,{className:"w-6 h-6 text-primary-600"}):s.includes("security")||s.includes("audit")?"🔒":s.includes("install")||s.includes("dependencies")?t.jsx(Dt,{className:"w-6 h-6 text-primary-600"}):t.jsx(Mr,{className:"w-6 h-6 text-primary-600"})},y1=r=>r.status==="failed"?"critical":r.status==="paused"?"warning":r.successRate<70?"critical":r.successRate<85?"warning":"healthy",xh=r=>r.substring(0,8);function v1({stats:r,onRefresh:s,loading:a=!1}){return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-heading text-lg",children:"Build Statistics"}),t.jsxs("button",{onClick:s,disabled:a,className:"btn-ghost",children:[t.jsx(dr,{className:`w-4 h-4 mr-2 ${a?"animate-spin":""}`}),"Refresh"]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-primary-100 rounded-lg",children:t.jsx(Sl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Total Builds"}),t.jsx("p",{className:"text-heading text-2xl",children:r.total})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-success-100 rounded-lg",children:t.jsx(Rt,{className:"w-6 h-6 text-success-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Successful"}),t.jsx("p",{className:"text-heading text-2xl text-success-600",children:r.successful})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-error-100 rounded-lg",children:t.jsx(It,{className:"w-6 h-6 text-error-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Failed"}),t.jsx("p",{className:"text-heading text-2xl text-error-600",children:r.failed})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-info-100 rounded-lg",children:t.jsx(Be,{className:"w-6 h-6 text-info-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Running"}),t.jsx("p",{className:"text-heading text-2xl text-info-600",children:r.running})]})]})}),t.jsxs("div",{className:"card p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("p",{className:"text-caption font-medium",children:"Success Rate"}),t.jsxs("span",{className:`text-lg font-bold ${r.successRate>=90?"text-success-600":r.successRate>=70?"text-warning-600":"text-error-600"}`,children:[r.successRate,"%"]})]}),t.jsx("div",{className:"w-full bg-neutral-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${r.successRate>=90?"bg-success-500":r.successRate>=70?"bg-warning-500":"bg-error-500"}`,style:{width:`${r.successRate}%`}})})]})]}),t.jsxs("div",{className:"card p-6",children:[t.jsx("h3",{className:"text-heading text-lg mb-4",children:"Performance Metrics"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-heading text-2xl text-primary-600",children:wl(r.avgDuration)}),t.jsx("div",{className:"text-caption",children:"Avg Duration"})]}),t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"text-heading text-2xl text-success-600",children:[r.total>0?Math.round(r.successful/r.total*100):0,"%"]}),t.jsx("div",{className:"text-caption",children:"Success Rate"})]}),t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"text-heading text-2xl text-error-600",children:[r.total>0?Math.round(r.failed/r.total*100):0,"%"]}),t.jsx("div",{className:"text-caption",children:"Failure Rate"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-heading text-2xl text-accent-600",children:r.running}),t.jsx("div",{className:"text-caption",children:"Active Builds"})]})]})]})]})}function j1({builds:r,selectedBuild:s,onBuildSelect:a,filters:i,onFiltersChange:c}){const d=h1(r),m=p1(r),p=h=>{switch(h){case"success":return t.jsx(Rt,{className:"h-5 w-5 text-green-500"});case"running":return t.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return t.jsx(Be,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(It,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(dc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Be,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.package,onChange:h=>c({...i,package:h.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Packages"}),d.map(h=>t.jsx("option",{value:h,children:h},h))]})]}),t.jsxs("select",{value:i.status,onChange:h=>c({...i,status:h.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Statuses"}),m.map(h=>t.jsx("option",{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]}),t.jsxs("select",{value:i.dateRange,onChange:h=>c({...i,dateRange:h.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Time"}),t.jsx("option",{value:"today",children:"Today"}),t.jsx("option",{value:"week",children:"This Week"}),t.jsx("option",{value:"month",children:"This Month"})]})]})}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Builds"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[r.length," build",r.length!==1?"s":""," found"]})]}),r.length===0?t.jsxs("div",{className:"p-8 text-center",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"🔨"}),t.jsx("p",{className:"text-gray-500",children:"No builds found matching your filters"})]}):t.jsx("div",{className:"divide-y divide-gray-200",children:r.map(h=>{const g=x1(h),v=s===h.id;return t.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${v?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>a(v?null:h.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[p(h.status),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:h.packageName}),t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:h.branch}),t.jsx("span",{className:"text-xs text-gray-500 font-mono",children:xh(h.commit)})]}),t.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Za(h.status)}`,children:h.status}),t.jsxs("span",{className:"text-xs text-gray-500",children:["by ",h.triggeredBy]}),t.jsx("span",{className:"text-xs text-gray-500",children:ph(h.startTime)})]})]})]}),t.jsxs("div",{className:"text-right",children:[h.duration&&t.jsx("div",{className:"text-sm font-medium text-gray-900",children:wl(h.duration)}),h.status==="running"&&t.jsx("div",{className:"mt-1",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:`${g}%`}})}),t.jsxs("span",{className:"text-xs text-gray-500",children:[g,"%"]})]})})]})]}),v&&h.stages.length>0&&t.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:t.jsx("div",{className:"flex items-center space-x-2",children:h.stages.map((y,k)=>t.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${Za(y.status)}`,title:`${y.name}: ${y.status}`,children:y.name},y.name))})})]},h.id)})})]})]})}function w1({pipelines:r,onPipelineSelect:s,onPipelineToggle:a}){const i=d=>{switch(d){case"healthy":return t.jsx(Rt,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(st,{className:"w-5 h-5 text-yellow-500"});case"critical":return t.jsx(It,{className:"w-5 h-5 text-red-500"});default:return t.jsx(Mr,{className:"w-5 h-5 text-gray-500"})}},c=d=>{switch(d){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"critical":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Mr,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Pipelines Configured"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by creating your first CI/CD pipeline to automate builds and deployments."}),t.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})}):t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Pipeline Status"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[r.length," pipeline",r.length!==1?"s":""," ","configured"]})]}),t.jsx("div",{className:"divide-y divide-gray-200",children:r.map(d=>{const m=y1(d);return t.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>s(d.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[i(m),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:d.name}),t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:d.packageName})]}),t.jsxs("div",{className:"flex items-center space-x-4 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Za(d.status)}`,children:d.status}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(m)}`,children:m})]})]})]}),t.jsx("div",{className:"flex items-center space-x-4",children:t.jsx("button",{onClick:p=>{p.stopPropagation(),a(d.id,d.status!=="active")},className:`p-2 rounded-lg transition-colors ${d.status==="active"?"text-green-600 hover:bg-green-100":"text-gray-400 hover:bg-gray-100"}`,title:d.status==="active"?"Pause Pipeline":"Activate Pipeline",children:d.status==="active"?t.jsx(Fx,{className:"w-5 h-5"}):t.jsx(ni,{className:"w-5 h-5"})})})]}),t.jsxs("div",{className:"mt-3 grid grid-cols-4 gap-4 text-xs",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Success Rate:"}),t.jsxs("div",{className:`font-medium ${d.successRate>=90?"text-green-600":d.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[d.successRate,"%"]})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Avg Duration:"}),t.jsx("div",{className:"font-medium text-gray-900",children:wl(d.avgDuration)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Last Run:"}),t.jsx("div",{className:"font-medium text-gray-900",children:ph(d.lastRun)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Triggers:"}),t.jsx("div",{className:"font-medium text-gray-900",children:d.triggers.length})]})]}),t.jsxs("div",{className:"mt-3",children:[t.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[t.jsx("span",{className:"text-gray-500",children:"Pipeline Health"}),t.jsxs("span",{className:"font-medium text-gray-900",children:[d.successRate,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${d.successRate>=90?"bg-green-500":d.successRate>=70?"bg-yellow-500":"bg-red-500"}`,style:{width:`${d.successRate}%`}})})]}),t.jsx("div",{className:"mt-3",children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-500",children:"Triggers:"}),d.triggers.map(p=>t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:p},p))]})})]},d.id)})})]})}function N1({build:r,onClose:s,onCancel:a,onRetry:i}){if(!r)return null;const c=d=>{switch(d){case"success":return t.jsx(Rt,{className:"h-5 w-5 text-green-500"});case"running":return t.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return t.jsx(Be,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(It,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(dc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Be,{className:"h-5 w-5 text-gray-500"})}};return t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[c(r.status),t.jsxs("div",{children:[t.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[r.packageName," Build"]}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.branch," • ",xh(r.commit)]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[r.status==="running"&&a&&t.jsxs("button",{onClick:()=>a(r.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-red-700 bg-red-100 rounded-lg hover:bg-red-200 transition-colors",children:[t.jsx(dc,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(r.status==="failed"||r.status==="cancelled")&&i&&t.jsxs("button",{onClick:()=>i(r.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-green-700 bg-green-100 rounded-lg hover:bg-green-200 transition-colors",children:[t.jsx(dr,{className:"w-4 h-4 mr-1"}),"Retry"]}),t.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(ws,{className:"w-6 h-6"})})]})]}),t.jsxs("div",{className:"p-6 overflow-y-auto max-h-[70vh]",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Build Information"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Status:"}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Za(r.status)}`,children:r.status})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Started:"}),t.jsx("span",{className:"font-medium",children:sf(r.startTime)})]}),r.endTime&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Ended:"}),t.jsx("span",{className:"font-medium",children:sf(r.endTime)})]}),r.duration&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Duration:"}),t.jsx("span",{className:"font-medium",children:wl(r.duration)})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Triggered by:"}),t.jsx("span",{className:"font-medium",children:r.triggeredBy})]})]})]})}),t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Artifacts"}),r.artifacts.length>0?t.jsx("div",{className:"space-y-1",children:r.artifacts.map((d,m)=>t.jsx("div",{className:"text-sm",children:t.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:d})},m))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No artifacts generated"})]})})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Build Stages"}),t.jsx("div",{className:"space-y-4",children:r.stages.map((d,m)=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("span",{className:"text-2xl",children:g1(d.name)}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:d.name}),t.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${d1(d.status)}`,children:d.status}),d.duration&&t.jsx("span",{className:"text-xs text-gray-500",children:wl(d.duration)})]})]})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",m+1," of ",r.stages.length]})]}),d.logs&&d.logs.length>0&&t.jsxs("div",{className:"mt-3",children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Logs"}),t.jsx("div",{className:"bg-gray-900 text-gray-100 p-3 rounded-lg text-xs font-mono max-h-32 overflow-y-auto",children:d.logs.map((p,h)=>t.jsx("div",{className:"mb-1",children:p},h))})]})]},d.name))})]})]})]})})}const b1=[{id:"1",name:"Dashboard CI",packageName:"dashboard",status:"active",lastRun:"2024-01-16T09:00:00Z",nextRun:"2024-01-16T10:00:00Z",successRate:95,avgDuration:420,triggers:["push","pull_request"]},{id:"2",name:"Backend CI",packageName:"backend",status:"active",lastRun:"2024-01-16T08:30:00Z",nextRun:"2024-01-16T09:30:00Z",successRate:88,avgDuration:900,triggers:["push","pull_request","tag"]},{id:"3",name:"Utils CI",packageName:"utils",status:"paused",lastRun:"2024-01-16T08:00:00Z",successRate:75,avgDuration:600,triggers:["push","pull_request"]}];function S1(){const[r,s]=w.useState(!0),[a,i]=w.useState(null),[c,d]=w.useState([]),[m]=w.useState(b1),[p,h]=w.useState(null),[g,v]=w.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});w.useEffect(()=>{(async()=>{try{s(!0);const we=(await Mt.getBuildStatus()).map(je=>({id:je.id||Math.random().toString(36).substr(2,9),packageName:je.package||je.packageName||"unknown",branch:je.branch||"main",commit:je.commit||"unknown",status:je.status||"pending",startTime:je.startTime||new Date().toISOString(),endTime:je.endTime,duration:je.duration,stages:je.stages||[],triggeredBy:je.triggeredBy||"system",artifacts:je.artifacts||[]}));d(we),i(null)}catch(pe){i(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching build data:",pe)}finally{s(!1)}})()},[]);const y=f1(c,g),k=m1(c),M=p&&c.find($=>$.id===p)||null,N=()=>{window.location.reload()},R=()=>{console.log("Triggering new build...")},b=()=>{console.log("Creating new pipeline...")},D=$=>{h($)},_=$=>{console.log("Selected pipeline:",$)},I=($,pe)=>{console.log("Toggle pipeline:",$,"active:",pe)},U=$=>{console.log("Cancelling build:",$),h(null)},q=$=>{console.log("Retrying build:",$),h(null)},he=()=>{window.location.reload()};return r?t.jsx(o1,{}):a?t.jsx(c1,{error:a,onRetry:he}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(u1,{onTriggerBuild:R,onCreatePipeline:b}),t.jsx(v1,{stats:k,onRefresh:N,loading:r}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(j1,{builds:y,selectedBuild:p,onBuildSelect:D,filters:g,onFiltersChange:v})}),t.jsx("div",{className:"lg:col-span-1",children:t.jsx(w1,{pipelines:m,onPipelineSelect:_,onPipelineToggle:I})})]}),t.jsx(N1,{build:M,onClose:()=>h(null),onCancel:U,onRetry:q}),y.length===0&&c.length>0&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔨"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No builds found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"No builds match your current filters. Try adjusting your search criteria."}),t.jsx("button",{onClick:()=>v({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),c.length===0&&!r&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:t.jsx(On,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No CI/CD data available"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by triggering your first build or setting up a pipeline."}),t.jsxs("div",{className:"flex justify-center space-x-4",children:[t.jsx("button",{onClick:R,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors",children:"Trigger Build"}),t.jsx("button",{onClick:b,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})]})]})}function C1({message:r="Loading configuration files..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function E1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(st,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function k1({onRefresh:r,loading:s=!1}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Configuration Inspector"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"View and manage configuration files across your monorepo"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[t.jsx(dr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function gh(r){return typeof r>"u"||r===null}function T1(r){return typeof r=="object"&&r!==null}function R1(r){return Array.isArray(r)?r:gh(r)?[]:[r]}function _1(r,s){var a,i,c,d;if(s)for(d=Object.keys(s),a=0,i=d.length;a<i;a+=1)c=d[a],r[c]=s[c];return r}function A1(r,s){var a="",i;for(i=0;i<s;i+=1)a+=r;return a}function P1(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var L1=gh,O1=T1,I1=R1,M1=A1,D1=P1,F1=_1,zc={isNothing:L1,isObject:O1,toArray:I1,repeat:M1,isNegativeZero:D1,extend:F1};function yh(r,s){var a="",i=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(a+='in "'+r.mark.name+'" '),a+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!s&&r.mark.snippet&&(a+=`
14
+
15
+ `+r.mark.snippet),i+" "+a):i}function Nl(r,s){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=s,this.message=yh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Nl.prototype=Object.create(Error.prototype);Nl.prototype.constructor=Nl;Nl.prototype.toString=function(s){return this.name+": "+yh(this,s)};var Lr=Nl,U1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],B1=["scalar","sequence","mapping"];function z1(r){var s={};return r!==null&&Object.keys(r).forEach(function(a){r[a].forEach(function(i){s[String(i)]=a})}),s}function H1(r,s){if(s=s||{},Object.keys(s).forEach(function(a){if(U1.indexOf(a)===-1)throw new Lr('Unknown option "'+a+'" is met in definition of "'+r+'" YAML type.')}),this.options=s,this.tag=r,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=z1(s.styleAliases||null),B1.indexOf(this.kind)===-1)throw new Lr('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}var ht=H1;function lf(r,s){var a=[];return r[s].forEach(function(i){var c=a.length;a.forEach(function(d,m){d.tag===i.tag&&d.kind===i.kind&&d.multi===i.multi&&(c=m)}),a[c]=i}),a}function $1(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},s,a;function i(c){c.multi?(r.multi[c.kind].push(c),r.multi.fallback.push(c)):r[c.kind][c.tag]=r.fallback[c.tag]=c}for(s=0,a=arguments.length;s<a;s+=1)arguments[s].forEach(i);return r}function gc(r){return this.extend(r)}gc.prototype.extend=function(s){var a=[],i=[];if(s instanceof ht)i.push(s);else if(Array.isArray(s))i=i.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(i=i.concat(s.explicit));else throw new Lr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(d){if(!(d instanceof ht))throw new Lr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new Lr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new Lr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(d){if(!(d instanceof ht))throw new Lr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var c=Object.create(gc.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(i),c.compiledImplicit=lf(c,"implicit"),c.compiledExplicit=lf(c,"explicit"),c.compiledTypeMap=$1(c.compiledImplicit,c.compiledExplicit),c};var V1=gc,W1=new ht("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}}),G1=new ht("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}}),K1=new ht("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}}),Y1=new V1({explicit:[W1,G1,K1]});function q1(r){if(r===null)return!0;var s=r.length;return s===1&&r==="~"||s===4&&(r==="null"||r==="Null"||r==="NULL")}function Q1(){return null}function J1(r){return r===null}var X1=new ht("tag:yaml.org,2002:null",{kind:"scalar",resolve:q1,construct:Q1,predicate:J1,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Z1(r){if(r===null)return!1;var s=r.length;return s===4&&(r==="true"||r==="True"||r==="TRUE")||s===5&&(r==="false"||r==="False"||r==="FALSE")}function ej(r){return r==="true"||r==="True"||r==="TRUE"}function tj(r){return Object.prototype.toString.call(r)==="[object Boolean]"}var nj=new ht("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Z1,construct:ej,predicate:tj,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"});function rj(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function sj(r){return 48<=r&&r<=55}function lj(r){return 48<=r&&r<=57}function aj(r){if(r===null)return!1;var s=r.length,a=0,i=!1,c;if(!s)return!1;if(c=r[a],(c==="-"||c==="+")&&(c=r[++a]),c==="0"){if(a+1===s)return!0;if(c=r[++a],c==="b"){for(a++;a<s;a++)if(c=r[a],c!=="_"){if(c!=="0"&&c!=="1")return!1;i=!0}return i&&c!=="_"}if(c==="x"){for(a++;a<s;a++)if(c=r[a],c!=="_"){if(!rj(r.charCodeAt(a)))return!1;i=!0}return i&&c!=="_"}if(c==="o"){for(a++;a<s;a++)if(c=r[a],c!=="_"){if(!sj(r.charCodeAt(a)))return!1;i=!0}return i&&c!=="_"}}if(c==="_")return!1;for(;a<s;a++)if(c=r[a],c!=="_"){if(!lj(r.charCodeAt(a)))return!1;i=!0}return!(!i||c==="_")}function ij(r){var s=r,a=1,i;if(s.indexOf("_")!==-1&&(s=s.replace(/_/g,"")),i=s[0],(i==="-"||i==="+")&&(i==="-"&&(a=-1),s=s.slice(1),i=s[0]),s==="0")return 0;if(i==="0"){if(s[1]==="b")return a*parseInt(s.slice(2),2);if(s[1]==="x")return a*parseInt(s.slice(2),16);if(s[1]==="o")return a*parseInt(s.slice(2),8)}return a*parseInt(s,10)}function oj(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!zc.isNegativeZero(r)}var cj=new ht("tag:yaml.org,2002:int",{kind:"scalar",resolve:aj,construct:ij,predicate:oj,represent:{binary:function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),uj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function dj(r){return!(r===null||!uj.test(r)||r[r.length-1]==="_")}function mj(r){var s,a;return s=r.replace(/_/g,"").toLowerCase(),a=s[0]==="-"?-1:1,"+-".indexOf(s[0])>=0&&(s=s.slice(1)),s===".inf"?a===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:s===".nan"?NaN:a*parseFloat(s,10)}var fj=/^[-+]?[0-9]+e/;function hj(r,s){var a;if(isNaN(r))switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(zc.isNegativeZero(r))return"-0.0";return a=r.toString(10),fj.test(a)?a.replace("e",".e"):a}function pj(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||zc.isNegativeZero(r))}var xj=new ht("tag:yaml.org,2002:float",{kind:"scalar",resolve:dj,construct:mj,predicate:pj,represent:hj,defaultStyle:"lowercase"}),gj=Y1.extend({implicit:[X1,nj,cj,xj]}),yj=gj,vh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),jh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vj(r){return r===null?!1:vh.exec(r)!==null||jh.exec(r)!==null}function jj(r){var s,a,i,c,d,m,p,h=0,g=null,v,y,k;if(s=vh.exec(r),s===null&&(s=jh.exec(r)),s===null)throw new Error("Date resolve error");if(a=+s[1],i=+s[2]-1,c=+s[3],!s[4])return new Date(Date.UTC(a,i,c));if(d=+s[4],m=+s[5],p=+s[6],s[7]){for(h=s[7].slice(0,3);h.length<3;)h+="0";h=+h}return s[9]&&(v=+s[10],y=+(s[11]||0),g=(v*60+y)*6e4,s[9]==="-"&&(g=-g)),k=new Date(Date.UTC(a,i,c,d,m,p,h)),g&&k.setTime(k.getTime()-g),k}function wj(r){return r.toISOString()}var Nj=new ht("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vj,construct:jj,instanceOf:Date,represent:wj});function bj(r){return r==="<<"||r===null}var Sj=new ht("tag:yaml.org,2002:merge",{kind:"scalar",resolve:bj}),Hc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
+ \r`;function Cj(r){if(r===null)return!1;var s,a,i=0,c=r.length,d=Hc;for(a=0;a<c;a++)if(s=d.indexOf(r.charAt(a)),!(s>64)){if(s<0)return!1;i+=6}return i%8===0}function Ej(r){var s,a,i=r.replace(/[\r\n=]/g,""),c=i.length,d=Hc,m=0,p=[];for(s=0;s<c;s++)s%4===0&&s&&(p.push(m>>16&255),p.push(m>>8&255),p.push(m&255)),m=m<<6|d.indexOf(i.charAt(s));return a=c%4*6,a===0?(p.push(m>>16&255),p.push(m>>8&255),p.push(m&255)):a===18?(p.push(m>>10&255),p.push(m>>2&255)):a===12&&p.push(m>>4&255),new Uint8Array(p)}function kj(r){var s="",a=0,i,c,d=r.length,m=Hc;for(i=0;i<d;i++)i%3===0&&i&&(s+=m[a>>18&63],s+=m[a>>12&63],s+=m[a>>6&63],s+=m[a&63]),a=(a<<8)+r[i];return c=d%3,c===0?(s+=m[a>>18&63],s+=m[a>>12&63],s+=m[a>>6&63],s+=m[a&63]):c===2?(s+=m[a>>10&63],s+=m[a>>4&63],s+=m[a<<2&63],s+=m[64]):c===1&&(s+=m[a>>2&63],s+=m[a<<4&63],s+=m[64],s+=m[64]),s}function Tj(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}var Rj=new ht("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Cj,construct:Ej,predicate:Tj,represent:kj}),_j=Object.prototype.hasOwnProperty,Aj=Object.prototype.toString;function Pj(r){if(r===null)return!0;var s=[],a,i,c,d,m,p=r;for(a=0,i=p.length;a<i;a+=1){if(c=p[a],m=!1,Aj.call(c)!=="[object Object]")return!1;for(d in c)if(_j.call(c,d))if(!m)m=!0;else return!1;if(!m)return!1;if(s.indexOf(d)===-1)s.push(d);else return!1}return!0}function Lj(r){return r!==null?r:[]}var Oj=new ht("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Pj,construct:Lj}),Ij=Object.prototype.toString;function Mj(r){if(r===null)return!0;var s,a,i,c,d,m=r;for(d=new Array(m.length),s=0,a=m.length;s<a;s+=1){if(i=m[s],Ij.call(i)!=="[object Object]"||(c=Object.keys(i),c.length!==1))return!1;d[s]=[c[0],i[c[0]]]}return!0}function Dj(r){if(r===null)return[];var s,a,i,c,d,m=r;for(d=new Array(m.length),s=0,a=m.length;s<a;s+=1)i=m[s],c=Object.keys(i),d[s]=[c[0],i[c[0]]];return d}var Fj=new ht("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mj,construct:Dj}),Uj=Object.prototype.hasOwnProperty;function Bj(r){if(r===null)return!0;var s,a=r;for(s in a)if(Uj.call(a,s)&&a[s]!==null)return!1;return!0}function zj(r){return r!==null?r:{}}var Hj=new ht("tag:yaml.org,2002:set",{kind:"mapping",resolve:Bj,construct:zj});yj.extend({implicit:[Nj,Sj],explicit:[Rj,Oj,Fj,Hj]});function af(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
17
+ `:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}var $j=new Array(256),Vj=new Array(256);for(var hs=0;hs<256;hs++)$j[hs]=af(hs)?1:0,Vj[hs]=af(hs);const Wj=r=>{switch(r){case"workspace":return"bg-blue-100 text-blue-800";case"package":return"bg-green-100 text-green-800";case"environment":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";default:return"bg-gray-100 text-gray-800"}},of=r=>{switch(r){case"valid":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},Gj=(r,s)=>r.filter(a=>{const i=s.section==="all"||a.id===s.section,c=s.type==="all"||a.type===s.type,d=s.status==="all"||s.status==="secrets"&&a.hasSecrets||s.status==="standard"&&!a.hasSecrets,m=!s.search||a.name.toLowerCase().includes(s.search.toLowerCase())||a.path.toLowerCase().includes(s.search.toLowerCase());return i&&c&&d&&m}),Kj=r=>[...new Set(r.map(s=>s.type))],Yj=r=>{if(r===0)return"0 Bytes";const s=1024,a=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,i)).toFixed(2))+" "+a[i]},qj=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),wh=r=>{const s=r.split(".").pop()?.toLowerCase(),a={json:"json",yaml:"yaml",yml:"yaml",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",env:"env",config:"text",rc:"text",lock:"text",md:"markdown",txt:"text"};return r==="package.json"?"json":r==="docker-compose.yml"||r==="docker-compose.yaml"?"yaml":r===".eslintrc.js"||r===".prettierrc.js"?"javascript":r==="tsconfig.json"?"json":a[s||""]||"text"},Qj=r=>{const s=[/^([A-Z_]+(?:PASSWORD|SECRET|KEY|TOKEN|AUTH)[A-Z_]*)\s*=\s*(.+)$/gim,/"([^"]*(?:password|secret|key|token|auth)[^"]*)"\s*:\s*"([^"]+)"/gi,/^(\s*[^:\s]*(?:password|secret|key|token|auth)[^:\s]*)\s*:\s*(.+)$/gim];let a=r;return s.forEach(i=>{a=a.replace(i,(c,d,m)=>{const p="*".repeat(Math.min(m.length,8));return c.replace(m,p)})}),a},Jj=r=>{switch(wh(r)){case"json":return t.jsx(qa,{className:"w-6 h-6 text-primary-600"});case"yaml":return t.jsx(qa,{className:"w-6 h-6 text-primary-600"});case"javascript":case"typescript":return t.jsx(Mr,{className:"w-6 h-6 text-primary-600"});case"env":return"🔐";case"markdown":return"📝";default:return t.jsx(_c,{className:"w-6 h-6 text-primary-600"})}};function Xj({configs:r,selectedConfig:s,onConfigSelect:a,filters:i,onFiltersChange:c}){const d=Kj(r);return t.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col max-h-[calc(100vh-180px)]",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Configuration Files"}),t.jsxs("div",{className:"relative mb-4",children:[t.jsx(Lc,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),t.jsx("input",{type:"text",placeholder:"Search config files...",value:i.search,onChange:m=>c({...i,search:m.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.type,onChange:m=>c({...i,type:m.target.value}),className:"flex-1 border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Types"}),d.map(m=>t.jsx("option",{value:m,children:m.charAt(0).toUpperCase()+m.slice(1)},m))]})]}),t.jsxs("select",{value:i.status,onChange:m=>c({...i,status:m.target.value}),className:"w-full border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Files"}),t.jsx("option",{value:"standard",children:"Standard Files"}),t.jsx("option",{value:"secrets",children:"Files with Secrets"})]})]})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?t.jsxs("div",{className:"p-4 text-center text-gray-500",children:[t.jsx("div",{className:"text-4xl mb-2",children:t.jsx(_c,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-sm",children:"No configuration files found"})]}):t.jsx("div",{className:"p-2",children:r.map(m=>t.jsx("button",{onClick:()=>a(m.id),className:`w-full text-left p-3 rounded-lg mb-2 transition-colors ${s===m.id?"bg-blue-50 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:t.jsxs("div",{className:"flex items-start space-x-3",children:[t.jsx("div",{className:"text-2xl",children:Jj(m.name)}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:m.name}),m.hasSecrets&&t.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒"})]}),t.jsx("p",{className:"text-xs text-gray-500 truncate mb-1",children:m.path}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${Wj(m.type)}`,children:m.type}),t.jsx("span",{className:"text-xs text-gray-400",children:Yj(m.size)})]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:qj(m.lastModified)})]})]})},m.id))})}),t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsxs("div",{className:"text-xs text-gray-500",children:[r.length," file",r.length!==1?"s":""," found"]})})]})}function Zj({isEditing:r,canEdit:s,hasSecrets:a,showSecrets:i,saving:c,onStartEdit:d,onSaveEdit:m,onCancelEdit:p,onToggleSecrets:h,onRefresh:g,content:v}){const[y,k]=w.useState(!1),M=async()=>{try{const N=v||"No content available";await navigator.clipboard.writeText(N),k(!0),setTimeout(()=>{k(!1)},4e3)}catch(N){console.error("Failed to copy to clipboard:",N),k(!0),setTimeout(()=>k(!1),2e3)}};return c?t.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[t.jsx("div",{className:"flex items-center space-x-2",children:t.jsxs("div",{className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-orange-600 bg-white border border-gray-300 rounded-lg",children:[t.jsx(dr,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]})}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsxs("button",{onClick:g,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(dr,{className:"w-4 h-4 mr-1"}),"Refresh"]})})]}):t.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[r?t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:m,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors",children:[t.jsx(ti,{className:"w-4 h-4 mr-1"}),"Save"]}),t.jsxs("button",{onClick:p,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(ws,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):s&&t.jsxs("button",{onClick:d,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(Rx,{className:"w-4 h-4 mr-1"}),"Edit"]}),a&&t.jsx("button",{onClick:h,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${i?"text-red-700 bg-red-100 hover:bg-red-200":"text-yellow-700 bg-yellow-100 hover:bg-yellow-200"}`,children:i?t.jsxs(t.Fragment,{children:[t.jsx(Tx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):t.jsxs(t.Fragment,{children:[t.jsx(kx,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsx("button",{onClick:M,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${y?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:y?t.jsxs(t.Fragment,{children:[t.jsx(Lx,{className:"w-4 h-4 mr-1"}),"Copied!"]}):t.jsxs(t.Fragment,{children:[t.jsx(Ox,{className:"w-4 h-4 mr-1"}),"Copy"]})})})]})}function e2({config:r,isEditing:s,editValue:a,onStartEdit:i,onSaveEdit:c,onCancelEdit:d,onValueChange:m,showSecrets:p,onToggleSecrets:h}){if(!r)return t.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 rounded-lg",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:t.jsx(qa,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"Select a configuration file to view or edit"})]})});const g=wh(r.name),v=p?r.content:Qj(r.content);return t.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col",children:[t.jsx("div",{className:"p-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"text-2xl",children:t.jsx(qa,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:r.name}),t.jsx("p",{className:"text-sm text-gray-500",children:r.path})]})]})}),t.jsx("div",{className:"flex-1 p-4",children:s?t.jsx("div",{className:"h-full",children:t.jsx("textarea",{value:a,onChange:y=>m(y.target.value),className:"w-full h-full font-mono text-sm border border-gray-300 rounded-lg p-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Enter configuration content...",spellCheck:!1})}):t.jsx("div",{className:"h-full",children:t.jsx("pre",{className:"w-full h-full font-mono text-sm bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto whitespace-pre-wrap",children:t.jsx("code",{className:`language-${g}`,children:v})})})}),t.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("span",{children:["Language: ",g.toUpperCase()]}),t.jsxs("span",{children:["Size: ",r.content.length," characters"]}),r.hasSecrets&&t.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒 Contains secrets"})]}),t.jsx("div",{children:s?t.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):r.isEditable?t.jsx("span",{className:"text-green-600",children:"Editable"}):t.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function t2({validation:r,configName:s}){const a=h=>{switch(h){case"valid":return t.jsx(Rt,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(st,{className:"w-5 h-5 text-yellow-500"});case"error":return t.jsx(It,{className:"w-5 h-5 text-red-500"});default:return t.jsx(xs,{className:"w-5 h-5 text-gray-500"})}},c=r.some(h=>h.status==="error")?"error":r.some(h=>h.status==="warning")?"warning":"valid",d=r.filter(h=>h.status==="error").length,m=r.filter(h=>h.status==="warning").length,p=r.filter(h=>h.status==="valid").length;return r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(xs,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),t.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Validation Results"}),t.jsx("p",{className:"text-sm text-gray-500",children:"Select a configuration file to see validation results."})]})}):t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Validation Results"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[a(c),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${of(c)}`,children:c.toUpperCase()})]})]}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",s]})]}),t.jsx("div",{className:"p-4 border-b border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-green-600",children:p}),t.jsx("div",{className:"text-xs text-gray-600",children:"Valid"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-yellow-600",children:m}),t.jsx("div",{className:"text-xs text-gray-600",children:"Warnings"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-red-600",children:d}),t.jsx("div",{className:"text-xs text-gray-600",children:"Errors"})]})]})}),t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"space-y-3",children:r.map((h,g)=>t.jsx("div",{className:`p-3 rounded-lg border ${h.status==="error"?"border-red-200 bg-red-50":h.status==="warning"?"border-yellow-200 bg-yellow-50":"border-green-200 bg-green-50"}`,children:t.jsxs("div",{className:"flex items-start space-x-3",children:[a(h.status),t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:h.field}),t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${of(h.status)}`,children:h.status})]}),t.jsx("p",{className:"text-sm text-gray-600",children:h.message})]})]})},g))})}),(d>0||m>0)&&t.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[d>0&&t.jsxs("span",{className:"text-red-600 font-medium",children:[d," error",d>1?"s":""," need attention"]}),m>0&&d===0&&t.jsxs("span",{className:"text-yellow-600 font-medium",children:[m," warning",m>1?"s":""," to review"]})]}),t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function n2(){const[r,s]=w.useState(!0),[a,i]=w.useState(!1),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(!1),[k,M]=w.useState(""),[N,R]=w.useState(!1),[b,D]=w.useState({section:"all",type:"all",status:"all",search:""});w.useEffect(()=>{(async()=>{try{s(!0);const ce=(await Mt.getConfigurationFiles()).map(ge=>({id:ge.id||ge.name,name:ge.name,path:ge.path||ge.name,type:ge.type||"text",content:ge.content||"",size:ge.content?.length||0,lastModified:ge.lastModified||new Date().toISOString(),hasSecrets:ge.hasSecrets||!1,isEditable:ge.isEditable!==!1,validation:ge.validation||[]}));p(ce),d(null)}catch(ve){d(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching config files:",ve)}finally{s(!1)}})()},[]);const _=Gj(m,b),I=h&&m.find(te=>te.id===h)||null,U=()=>{window.location.reload()},q=te=>{g(te),y(!1),M("")},he=()=>{I&&(y(!0),M(I.content))},$=async()=>{if(I&&!a)try{i(!0),d(null);const te=await Mt.saveConfigurationFile(I.id,k);p(ve=>ve.map(ce=>ce.id===h?{...te,isEditable:ce.isEditable}:ce)),h===I.id&&g(I.id),y(!1),M("")}catch(te){console.error("Error saving config file:",te),d(`${be.FAILED_TO_SAVE_CONFIG}: ${te.message}`)}finally{i(!1)}},pe=()=>{y(!1),M("")},we=()=>{R(!N)},je=()=>{window.location.reload()};return r?t.jsx(C1,{}):c?t.jsx(E1,{error:c,onRetry:je}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(k1,{onRefresh:U,loading:r}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-[800px]",children:[t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Xj,{configs:_,selectedConfig:h,onConfigSelect:q,filters:b,onFiltersChange:D})}),t.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[I&&t.jsx("div",{className:"mb-4",children:t.jsx(Zj,{isEditing:v,canEdit:I.isEditable,hasSecrets:I.hasSecrets,showSecrets:N,saving:a,onStartEdit:he,onSaveEdit:$,onCancelEdit:pe,onToggleSecrets:we,onRefresh:U,content:v?k:I?.content})}),t.jsx("div",{className:"flex-1",children:t.jsx(e2,{config:I,isEditing:v,editValue:k,saving:a,onStartEdit:he,onSaveEdit:$,onCancelEdit:pe,onValueChange:M,showSecrets:N,onToggleSecrets:we})})]}),t.jsx("div",{className:"lg:col-span-1 space-y-6",children:t.jsx(t2,{validation:I?.validation||[],configName:I?.name||"No file selected"})})]}),_.length===0&&!r&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:t.jsx(_c,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No configuration files found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:b.search||b.type!=="all"||b.status!=="all"?"Try adjusting your filters to see more results.":"No configuration files are available to inspect."}),(b.search||b.type!=="all"||b.status!=="all")&&t.jsx("button",{onClick:()=>D({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}function r2({packages:r,onConfirm:s,loading:a}){const[i,c]=w.useState(new Set),[d,m]=w.useState(""),p=w.useMemo(()=>r.filter(y=>!y.private&&y.name.toLowerCase().includes(d.toLowerCase())),[r,d]),h=y=>{const k=new Set(i);k.has(y)?k.delete(y):k.add(y),c(k)},g=()=>{i.size===p.length?c(new Set):c(new Set(p.map(y=>y.name)))},v=()=>{const y=r.filter(k=>i.has(k.name));s(y)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 1: Select Packages"}),t.jsx("p",{className:"text-gray-600",children:"Choose which packages you want to release. You can select multiple packages."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Search Packages"}),t.jsx("input",{type:"text",value:d,onChange:y=>m(y.target.value),placeholder:"Search by package name...",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("label",{className:"text-sm font-medium text-gray-700",children:["Available Packages (",p.length,")"]}),p.length>0&&t.jsx("button",{onClick:g,className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:i.size===p.length?"Deselect All":"Select All"})]}),t.jsx("div",{className:"border border-gray-200 rounded-lg divide-y max-h-96 overflow-y-auto",children:p.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No packages found"}):p.map(y=>t.jsx("div",{className:"p-4 hover:bg-gray-50 cursor-pointer transition",onClick:()=>h(y.name),children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:i.has(y.name),onChange:()=>h(y.name),className:"w-4 h-4 text-primary-600 rounded focus:ring-2 focus:ring-primary-500"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"font-medium text-gray-900",children:y.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",y.version]})]}),y.dependencies&&y.dependencies.length>0&&t.jsxs("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:[y.dependencies.length," deps"]})]})},y.name))})]}),t.jsx("div",{className:"flex gap-3 justify-end",children:t.jsxs("button",{onClick:v,disabled:i.size===0||a,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:["Continue (",i.size," selected)"]})})]})}const s2={major:"Breaking changes, incompatible API changes",minor:"New features, backward compatible",patch:"Bug fixes, patches, backward compatible"};function l2({packages:r,onConfirm:s,onBack:a}){const[i,c]=w.useState(r.reduce((h,g)=>({...h,[g.name]:g.bumpType}),{})),d=(h,g)=>{const v=h.split(".").map(Number);return g==="major"?`${v[0]+1}.0.0`:g==="minor"?`${v[0]}.${v[1]+1}.0`:`${v[0]}.${v[1]}.${v[2]+1}`},m=(h,g)=>{c(v=>({...v,[h]:g}))},p=()=>{const h=r.map(g=>({...g,bumpType:i[g.name],newVersion:d(g.currentVersion,i[g.name])}));s(h)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 2: Select Version Bumps"}),t.jsx("p",{className:"text-gray-600",children:"Choose the version bump type for each package. This determines the new version number."})]}),t.jsx("div",{className:"grid grid-cols-3 gap-4",children:Object.entries(s2).map(([h,g])=>t.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[t.jsx("p",{className:"font-medium text-gray-900 capitalize mb-1",children:h}),t.jsx("p",{className:"text-sm text-gray-600",children:g})]},h))}),t.jsx("div",{className:"space-y-4",children:r.map(h=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:h.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",h.currentVersion]})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("p",{className:"text-sm text-gray-500",children:"New Version:"}),t.jsxs("p",{className:"text-lg font-bold text-primary-600",children:["v",d(h.currentVersion,i[h.name])]})]})]}),t.jsx("div",{className:"grid grid-cols-3 gap-3",children:["major","minor","patch"].map(g=>t.jsx("button",{onClick:()=>m(h.name,g),className:`p-3 rounded-lg border-2 transition font-medium text-sm ${i[h.name]===g?"border-primary-600 bg-primary-50 text-primary-700":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"}`,children:t.jsx("span",{className:"capitalize",children:g})},g))}),h.affectedDependencies.length>0&&t.jsxs("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg",children:[t.jsxs("p",{className:"text-sm font-medium text-blue-900",children:["ℹ️ ",h.affectedDependencies.length," dependent package(s)"]}),t.jsx("p",{className:"text-xs text-blue-700 mt-1",children:"Will be auto-bumped when this package is released"})]})]},h.name))}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:a,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",children:"Back"}),t.jsx("button",{onClick:p,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 transition",children:"Continue"})]})]})}function a2({packages:r,existingChangesets:s,onConfirm:a,onBack:i,loading:c}){const[d,m]=w.useState(""),[p,h]=w.useState([]),g=()=>{const y=[];return d.trim()||y.push("Please enter a changelog summary"),d.trim().length<10&&y.push(Gx),h(y),y.length===0},v=()=>{g()&&a(d)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 3: Preview Changeset"}),t.jsx("p",{className:"text-gray-600",children:"Review the changeset that will be created. Enter a summary of the changes."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Changelog Summary"}),t.jsx("textarea",{value:d,onChange:y=>{m(y.target.value),g()},placeholder:Wx,rows:4,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent font-mono text-sm"}),p.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:p.map((y,k)=>t.jsx("p",{className:"text-sm text-red-600",children:y},k))})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Packages to Release"}),t.jsx("div",{className:"space-y-3",children:r.map(y=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:y.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:[y.currentVersion," ",t.jsx(yl,{})," ",y.newVersion]})]}),t.jsx("div",{className:"text-right",children:t.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-800",children:y.bumpType.charAt(0).toUpperCase()+y.bumpType.slice(1)})})]},y.name))})]}),s.length>0&&t.jsxs("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[t.jsx("p",{className:"text-yellow-800 font-medium",children:"Unpublished Changesets"}),t.jsxs("p",{className:"text-yellow-700 text-sm mt-1",children:["There are ",s.length," existing unpublished changeset(s). Creating new ones will accumulate until published."]})]}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:c,children:"Back"}),t.jsx("button",{onClick:v,disabled:c||p.length>0,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:c?"Processing...":"Continue to Validation"})]})]})}function i2({validation:r,packages:s,onConfirm:a,onBack:i,loading:c}){const d=[{name:"User Permissions",passed:r.checks.permissions},{name:"Working Tree Clean",passed:r.checks.workingTreeClean},{name:"CI Tests Passing",passed:r.checks.ciPassing},{name:"Version Available on npm",passed:r.checks.versionAvailable}];return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 4: Validate Release"}),t.jsx("p",{className:"text-gray-600",children:"Checking if the release is safe to proceed. All checks must pass."})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{className:`p-4 rounded-lg ${r.isValid?"bg-green-50":"bg-red-50"}`,children:[t.jsx("p",{className:`font-medium ${r.isValid?"text-green-900":"text-red-900"}`,children:r.isValid?"Ready to Release":"Not Ready"}),t.jsx("p",{className:`text-sm mt-1 ${r.isValid?"text-green-700":"text-red-700"}`,children:r.isValid?"All checks passed. Safe to proceed.":`${r.errors.length} error(s) need resolution`})]}),t.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg",children:[t.jsx("p",{className:"font-medium text-blue-900",children:"Release Summary"}),t.jsxs("p",{className:"text-sm text-blue-700 mt-1",children:[s.length," package(s) will be released"]})]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Pre-release Checks"}),t.jsx("div",{className:"space-y-3",children:d.map((m,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg ${m.passed?"bg-green-50":"bg-red-50"}`,children:[t.jsx("div",{className:`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center font-bold text-white p-1 ${m.passed?"bg-green-500":"bg-red-500"}`,children:m.passed?t.jsx(ti,{}):t.jsx(ws,{})}),t.jsx("span",{className:`font-medium ${m.passed?"text-green-900":"text-red-900"}`,children:m.name})]},p))})]}),r.errors.length>0&&t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-red-900 mb-4",children:"Errors"}),t.jsx("div",{className:"space-y-2",children:r.errors.map((m,p)=>t.jsxs("p",{className:"text-red-700 text-sm",children:["• ",m]},p))})]}),r.warnings.length>0&&t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-yellow-900 mb-4",children:"Warnings"}),t.jsx("div",{className:"space-y-2",children:r.warnings.map((m,p)=>t.jsx("p",{className:"text-yellow-700 text-sm",children:m},p))})]}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:c,children:"Back"}),t.jsx("button",{onClick:a,disabled:!r.isValid||c,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:c?"Publishing...":"Confirm & Publish"})]})]})}function o2({packages:r,summary:s,onReset:a}){const i=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:t.jsx("svg",{className:"w-10 h-10 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Release Initiated!"}),t.jsxs("p",{className:"text-gray-600 text-lg mb-4",children:["Changeset created and publishing workflow started for ",r.length," package(s)"]}),t.jsxs("p",{className:"text-gray-500 text-sm",children:["Initiated on ",i]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"What Happens Next"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"1. Changeset Created"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"A changeset has been created with your release information"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"2. Publishing Workflow Started"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"GitHub Actions workflow has been triggered to publish your packages"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsxs("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:[t.jsx("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),t.jsx("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"3. Monitor Progress"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"Check GitHub Actions for the workflow status and npm registry for package updates"})]})]})]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Packages Released"}),t.jsx("div",{className:"space-y-2",children:r.map(c=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:c.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:["v",c.currentVersion," ",t.jsx(yl,{})," v",c.newVersion]})]}),t.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-800",children:c.bumpType.charAt(0).toUpperCase()+c.bumpType.slice(1)})]},c.name))})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Changelog Summary"}),t.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:t.jsx("p",{className:"text-gray-700 whitespace-pre-wrap",children:s})})]}),t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Next Steps"}),t.jsxs("ul",{className:"text-sm text-blue-700 space-y-2",children:[t.jsx("li",{children:"Changeset created and committed"}),t.jsx("li",{children:"Package versions updated"}),t.jsx("li",{children:"Release pipeline triggered"}),t.jsx("li",{children:"GitHub release created (in progress)"}),t.jsx("li",{children:"npm registry will be updated shortly"})]})]}),t.jsx("div",{className:"flex gap-3 justify-center",children:t.jsx("button",{onClick:a,className:"px-8 py-3 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 transition",children:"Release Another Package"})}),t.jsxs("div",{className:"border-t pt-6 flex gap-4 justify-center",children:[t.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View Release on GitHub ",t.jsx(yl,{})]}),t.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View on npm ",t.jsx(yl,{})]})]})]})}function c2({message:r="Loading..."}){return t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-gray-200 border-t-primary-500 animate-spin mb-4"}),t.jsx("p",{className:"text-gray-600",children:r})]})}function u2({error:r,onRetry:s}){return t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:t.jsxs("div",{className:"flex items-start",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.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"})})}),t.jsxs("div",{className:"ml-3 flex-1",children:[t.jsx("h3",{className:"text-lg font-medium text-red-800",children:"Error"}),t.jsx("p",{className:"mt-2 text-sm text-red-700",children:r}),t.jsx("button",{onClick:s,className:"mt-4 px-4 py-2 bg-red-600 text-white rounded-lg font-medium hover:bg-red-700 transition",children:"Try Again"})]})]})})}function d2(){const{isAuthenticated:r,hasPermission:s}=Fr(),[a,i]=w.useState("select"),[c,d]=w.useState([]),[m,p]=w.useState(""),[h,g]=w.useState(!1),[v,y]=w.useState(null),[k,M]=w.useState(null),[N,R]=w.useState([]),[b,D]=w.useState([]);w.useEffect(()=>{_()},[]);const _=async()=>{try{g(!0);const te=await Te.get(Re.PUBLISH.PACKAGES);if(te.success)R(te.data.packages||[]);else{console.warn("Failed to fetch packages:",te.error?.message);const ce=await Te.get(Re.PACKAGES.LIST);ce.success&&R(ce.data||[])}const ve=await Te.get(Re.PUBLISH.CHANGESETS);ve.success?D(ve.data.changesets||[]):(ve.error?.status===401||ve.error?.status===403)&&(window.location.href="/login"),y(null)}catch(te){const ve=te instanceof Error?te.message:be.FAILED_TO_FETCH_PACKAGES;y(ve),console.error("Error fetching workspace data:",te)}finally{g(!1)}},I=te=>{const ve=te.map(ce=>({name:ce.name,currentVersion:ce.version,newVersion:ce.version,bumpType:"patch",affectedDependencies:ce.dependents||[]}));d(ve),i("bump")},U=te=>{d(te),i("preview")},q=te=>{p(te),he(c,te)},he=async(te,ve)=>{try{g(!0);const ce=await Te.post(Re.PUBLISH.PREVIEW,{packages:te.map(Q=>Q.name),bumps:te.map(Q=>({package:Q.name,bumpType:Q.bumpType})),summary:ve});if(!ce.success)throw new Error(be.VALIDATION_FAILED);const ge=ce.data,oe={isValid:ge.isValid??!0,errors:ge.errors??[],warnings:ge.warnings??[],checks:ge.checks??{permissions:!0,workingTreeClean:!0,ciPassing:!0,versionAvailable:!0}};M(oe),i("validate"),y(null)}catch(ce){const ge=ce instanceof Error?ce.message:"Validation error";y(ge),console.error("Validation error:",ce)}finally{g(!1)}},$=async()=>{try{if(!s("maintain")){y(be.PERMISSION_ERROR);return}if(g(!0),!(await Te.post(Re.PUBLISH.CHANGESETS,{packages:c.map(ce=>ce.name),bumps:c.map(ce=>({package:ce.name,bumpType:ce.bumpType})),summary:m})).success)throw new Error(be.FAILED_TO_CREATE_CHANGESET);if(!(await Te.post(Re.PUBLISH.TRIGGER,{packages:c})).success)throw new Error(be.FAILED_TO_TRIGGER_PUBLISH);i("confirm"),y(null)}catch(te){const ve=te instanceof Error?te.message:"Publishing error";y(ve)}finally{g(!1)}},pe=()=>{i("select"),d([]),p(""),M(null),y(null),_()};if(!r)return t.jsx("div",{className:"p-6 bg-yellow-50 border border-yellow-200 rounded-lg",children:t.jsx("p",{className:"text-yellow-800",children:"Please log in to access release management."})});if(h&&a==="select"&&N.length===0)return t.jsx(c2,{message:"Loading workspace packages..."});if(v&&a==="select")return t.jsx(u2,{error:v,onRetry:_});const we=s("write"),je=s("maintain");return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Release Manager"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Manage package versions and publish releases with Changesets"})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",["select","bump","preview","validate","confirm"].indexOf(a)+1," of 5"]})]}),!we&&t.jsxs("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[t.jsx("p",{className:"text-yellow-700 font-medium",children:" Limited Access"}),t.jsx("p",{className:"text-yellow-600 text-sm mt-1",children:"You do not have write permission to create and publish changesets. Contact your repository administrator to request access."})]}),v&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Error"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:v})]}),b.length>0&&a==="select"&&t.jsxs("div",{className:"p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsxs("p",{className:"text-blue-700 font-medium",children:[b.length," unpublished changeset(s) detected"]}),t.jsx("p",{className:"text-blue-600 text-sm mt-1",children:"Review existing changesets or pull the latest changes and refresh the dashboard before creating a new one."})]}),a==="select"&&!we&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Access Denied"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:"You do not have write permission to create changesets. Contact your repository administrator."})]}),a==="select"&&we&&t.jsx(r2,{packages:N,onConfirm:I,loading:h}),a==="bump"&&we&&t.jsx(l2,{packages:c,onConfirm:U,onBack:()=>i("select")}),a==="preview"&&we&&t.jsx(a2,{packages:c,existingChangesets:b,onConfirm:q,onBack:()=>i("bump"),loading:h}),a==="validate"&&!je&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Access Denied"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:"You do not have maintain permission to publish changesets. Contact your repository administrator."})]}),a==="validate"&&je&&k&&t.jsx(i2,{validation:k,packages:c,onConfirm:$,onBack:()=>i("preview"),loading:h}),a==="confirm"&&t.jsx(o2,{packages:c,summary:m,onReset:pe}),t.jsx("div",{className:"flex gap-2 justify-center",children:["select","bump","preview","validate","confirm"].map((te,ve)=>t.jsx("div",{className:`h-2 flex-1 rounded-full transition-colors ${["select","bump","preview","validate","confirm"].indexOf(a)>=ve?"bg-primary-500":"bg-gray-300"}`},te))})]})}const{entries:Nh,setPrototypeOf:cf,isFrozen:m2,getPrototypeOf:f2,getOwnPropertyDescriptor:h2}=Object;let{freeze:yt,seal:Kt,create:yc}=Object,{apply:vc,construct:jc}=typeof Reflect<"u"&&Reflect;yt||(yt=function(s){return s});Kt||(Kt=function(s){return s});vc||(vc=function(s,a){for(var i=arguments.length,c=new Array(i>2?i-2:0),d=2;d<i;d++)c[d-2]=arguments[d];return s.apply(a,c)});jc||(jc=function(s){for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return new s(...i)});const Ha=vt(Array.prototype.forEach),p2=vt(Array.prototype.lastIndexOf),uf=vt(Array.prototype.pop),fl=vt(Array.prototype.push),x2=vt(Array.prototype.splice),Ka=vt(String.prototype.toLowerCase),tc=vt(String.prototype.toString),nc=vt(String.prototype.match),hl=vt(String.prototype.replace),g2=vt(String.prototype.indexOf),y2=vt(String.prototype.trim),an=vt(Object.prototype.hasOwnProperty),gt=vt(RegExp.prototype.test),pl=v2(TypeError);function vt(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];return vc(r,s,i)}}function v2(r){return function(){for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return jc(r,a)}}function Ee(r,s){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ka;cf&&cf(r,null);let i=s.length;for(;i--;){let c=s[i];if(typeof c=="string"){const d=a(c);d!==c&&(m2(s)||(s[i]=d),c=d)}r[c]=!0}return r}function j2(r){for(let s=0;s<r.length;s++)an(r,s)||(r[s]=null);return r}function gn(r){const s=yc(null);for(const[a,i]of Nh(r))an(r,a)&&(Array.isArray(i)?s[a]=j2(i):i&&typeof i=="object"&&i.constructor===Object?s[a]=gn(i):s[a]=i);return s}function xl(r,s){for(;r!==null;){const i=h2(r,s);if(i){if(i.get)return vt(i.get);if(typeof i.value=="function")return vt(i.value)}r=f2(r)}function a(){return null}return a}const df=yt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),rc=yt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),sc=yt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),w2=yt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lc=yt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N2=yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mf=yt(["#text"]),ff=yt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ac=yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hf=yt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$a=yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),b2=Kt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),S2=Kt(/<%[\w\W]*|[\w\W]*%>/gm),C2=Kt(/\$\{[\w\W]*/gm),E2=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),k2=Kt(/^aria-[\-\w]+$/),bh=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),T2=Kt(/^(?:\w+script|data):/i),R2=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Sh=Kt(/^html$/i),_2=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i);var pf=Object.freeze({__proto__:null,ARIA_ATTR:k2,ATTR_WHITESPACE:R2,CUSTOM_ELEMENT:_2,DATA_ATTR:E2,DOCTYPE_NAME:Sh,ERB_EXPR:S2,IS_ALLOWED_URI:bh,IS_SCRIPT_OR_DATA:T2,MUSTACHE_EXPR:b2,TMPLIT_EXPR:C2});const gl={element:1,text:3,progressingInstruction:7,comment:8,document:9},A2=function(){return typeof window>"u"?null:window},P2=function(s,a){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let i=null;const c="data-tt-policy-suffix";a&&a.hasAttribute(c)&&(i=a.getAttribute(c));const d="dompurify"+(i?"#"+i:"");try{return s.createPolicy(d,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},xf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ch(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A2();const s=ie=>Ch(ie);if(s.version="3.3.1",s.removed=[],!r||!r.document||r.document.nodeType!==gl.document||!r.Element)return s.isSupported=!1,s;let{document:a}=r;const i=a,c=i.currentScript,{DocumentFragment:d,HTMLTemplateElement:m,Node:p,Element:h,NodeFilter:g,NamedNodeMap:v=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:k,trustedTypes:M}=r,N=h.prototype,R=xl(N,"cloneNode"),b=xl(N,"remove"),D=xl(N,"nextSibling"),_=xl(N,"childNodes"),I=xl(N,"parentNode");if(typeof m=="function"){const ie=a.createElement("template");ie.content&&ie.content.ownerDocument&&(a=ie.content.ownerDocument)}let U,q="";const{implementation:he,createNodeIterator:$,createDocumentFragment:pe,getElementsByTagName:we}=a,{importNode:je}=i;let te=xf();s.isSupported=typeof Nh=="function"&&typeof I=="function"&&he&&he.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ve,ERB_EXPR:ce,TMPLIT_EXPR:ge,DATA_ATTR:oe,ARIA_ATTR:Q,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:Y}=pf;let{IS_ALLOWED_URI:K}=pf,S=null;const F=Ee({},[...df,...rc,...sc,...lc,...mf]);let ee=null;const ue=Ee({},[...ff,...ac,...hf,...$a]);let ne=Object.seal(yc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,_e=null;const ke=Object.seal(yc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,lt=!0,fr=!1,bs=!0,Yt=!1,In=!0,cn=!1,Ur=!1,hr=!1,yn=!1,Mn=!1,un=!1,vn=!0,Br=!1;const _l="user-content-";let zr=!0,Dn=!1,jn={},jt=null;const Fn=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ss=null;const Un=Ee({},["audio","video","img","source","image","track"]);let wn=null;const Al=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pr="http://www.w3.org/1998/Math/MathML",xr="http://www.w3.org/2000/svg",qt="http://www.w3.org/1999/xhtml";let dn=qt,gr=!1,yr=null;const Cs=Ee({},[pr,xr,qt],tc);let Bn=Ee({},["mi","mo","mn","ms","mtext"]),Qt=Ee({},["annotation-xml"]);const zn=Ee({},["title","style","font","a","script"]);let Hn=null;const Pl=["application/xhtml+xml","text/html"],Ll="text/html";let $e=null,Nn=null;const Es=a.createElement("form"),ks=function(E){return E instanceof RegExp||E instanceof Function},bn=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Nn&&Nn===E)){if((!E||typeof E!="object")&&(E={}),E=gn(E),Hn=Pl.indexOf(E.PARSER_MEDIA_TYPE)===-1?Ll:E.PARSER_MEDIA_TYPE,$e=Hn==="application/xhtml+xml"?tc:Ka,S=an(E,"ALLOWED_TAGS")?Ee({},E.ALLOWED_TAGS,$e):F,ee=an(E,"ALLOWED_ATTR")?Ee({},E.ALLOWED_ATTR,$e):ue,yr=an(E,"ALLOWED_NAMESPACES")?Ee({},E.ALLOWED_NAMESPACES,tc):Cs,wn=an(E,"ADD_URI_SAFE_ATTR")?Ee(gn(Al),E.ADD_URI_SAFE_ATTR,$e):Al,Ss=an(E,"ADD_DATA_URI_TAGS")?Ee(gn(Un),E.ADD_DATA_URI_TAGS,$e):Un,jt=an(E,"FORBID_CONTENTS")?Ee({},E.FORBID_CONTENTS,$e):Fn,Ne=an(E,"FORBID_TAGS")?Ee({},E.FORBID_TAGS,$e):gn({}),_e=an(E,"FORBID_ATTR")?Ee({},E.FORBID_ATTR,$e):gn({}),jn=an(E,"USE_PROFILES")?E.USE_PROFILES:!1,Oe=E.ALLOW_ARIA_ATTR!==!1,lt=E.ALLOW_DATA_ATTR!==!1,fr=E.ALLOW_UNKNOWN_PROTOCOLS||!1,bs=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Yt=E.SAFE_FOR_TEMPLATES||!1,In=E.SAFE_FOR_XML!==!1,cn=E.WHOLE_DOCUMENT||!1,yn=E.RETURN_DOM||!1,Mn=E.RETURN_DOM_FRAGMENT||!1,un=E.RETURN_TRUSTED_TYPE||!1,hr=E.FORCE_BODY||!1,vn=E.SANITIZE_DOM!==!1,Br=E.SANITIZE_NAMED_PROPS||!1,zr=E.KEEP_CONTENT!==!1,Dn=E.IN_PLACE||!1,K=E.ALLOWED_URI_REGEXP||bh,dn=E.NAMESPACE||qt,Bn=E.MATHML_TEXT_INTEGRATION_POINTS||Bn,Qt=E.HTML_INTEGRATION_POINTS||Qt,ne=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&ks(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ne.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&ks(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ne.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ne.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Yt&&(lt=!1),Mn&&(yn=!0),jn&&(S=Ee({},mf),ee=[],jn.html===!0&&(Ee(S,df),Ee(ee,ff)),jn.svg===!0&&(Ee(S,rc),Ee(ee,ac),Ee(ee,$a)),jn.svgFilters===!0&&(Ee(S,sc),Ee(ee,ac),Ee(ee,$a)),jn.mathMl===!0&&(Ee(S,lc),Ee(ee,hf),Ee(ee,$a))),E.ADD_TAGS&&(typeof E.ADD_TAGS=="function"?ke.tagCheck=E.ADD_TAGS:(S===F&&(S=gn(S)),Ee(S,E.ADD_TAGS,$e))),E.ADD_ATTR&&(typeof E.ADD_ATTR=="function"?ke.attributeCheck=E.ADD_ATTR:(ee===ue&&(ee=gn(ee)),Ee(ee,E.ADD_ATTR,$e))),E.ADD_URI_SAFE_ATTR&&Ee(wn,E.ADD_URI_SAFE_ATTR,$e),E.FORBID_CONTENTS&&(jt===Fn&&(jt=gn(jt)),Ee(jt,E.FORBID_CONTENTS,$e)),E.ADD_FORBID_CONTENTS&&(jt===Fn&&(jt=gn(jt)),Ee(jt,E.ADD_FORBID_CONTENTS,$e)),zr&&(S["#text"]=!0),cn&&Ee(S,["html","head","body"]),S.table&&(Ee(S,["tbody"]),delete Ne.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw pl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');U=E.TRUSTED_TYPES_POLICY,q=U.createHTML("")}else U===void 0&&(U=P2(M,c)),U!==null&&typeof q=="string"&&(q=U.createHTML(""));yt&&yt(E),Nn=E}},Hr=Ee({},[...rc,...sc,...w2]),$n=Ee({},[...lc,...N2]),di=function(E){let W=I(E);(!W||!W.tagName)&&(W={namespaceURI:dn,tagName:"template"});const se=Ka(E.tagName),Ie=Ka(W.tagName);return yr[E.namespaceURI]?E.namespaceURI===xr?W.namespaceURI===qt?se==="svg":W.namespaceURI===pr?se==="svg"&&(Ie==="annotation-xml"||Bn[Ie]):!!Hr[se]:E.namespaceURI===pr?W.namespaceURI===qt?se==="math":W.namespaceURI===xr?se==="math"&&Qt[Ie]:!!$n[se]:E.namespaceURI===qt?W.namespaceURI===xr&&!Qt[Ie]||W.namespaceURI===pr&&!Bn[Ie]?!1:!$n[se]&&(zn[se]||!Hr[se]):!!(Hn==="application/xhtml+xml"&&yr[E.namespaceURI]):!1},ot=function(E){fl(s.removed,{element:E});try{I(E).removeChild(E)}catch{b(E)}},Ft=function(E,W){try{fl(s.removed,{attribute:W.getAttributeNode(E),from:W})}catch{fl(s.removed,{attribute:null,from:W})}if(W.removeAttribute(E),E==="is")if(yn||Mn)try{ot(W)}catch{}else try{W.setAttribute(E,"")}catch{}},vr=function(E){let W=null,se=null;if(hr)E="<remove></remove>"+E;else{const Ve=nc(E,/^[\r\n\t ]+/);se=Ve&&Ve[0]}Hn==="application/xhtml+xml"&&dn===qt&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");const Ie=U?U.createHTML(E):E;if(dn===qt)try{W=new k().parseFromString(Ie,Hn)}catch{}if(!W||!W.documentElement){W=he.createDocument(dn,"template",null);try{W.documentElement.innerHTML=gr?q:Ie}catch{}}const Se=W.body||W.documentElement;return E&&se&&Se.insertBefore(a.createTextNode(se),Se.childNodes[0]||null),dn===qt?we.call(W,cn?"html":"body")[0]:cn?W.documentElement:Se},$r=function(E){return $.call(E.ownerDocument||E,E,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},Ts=function(E){return E instanceof y&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof v)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Ol=function(E){return typeof p=="function"&&E instanceof p};function Jt(ie,E,W){Ha(ie,se=>{se.call(s,E,W,Nn)})}const mn=function(E){let W=null;if(Jt(te.beforeSanitizeElements,E,null),Ts(E))return ot(E),!0;const se=$e(E.nodeName);if(Jt(te.uponSanitizeElement,E,{tagName:se,allowedTags:S}),In&&E.hasChildNodes()&&!Ol(E.firstElementChild)&&gt(/<[/\w!]/g,E.innerHTML)&&gt(/<[/\w!]/g,E.textContent)||E.nodeType===gl.progressingInstruction||In&&E.nodeType===gl.comment&&gt(/<[/\w]/g,E.data))return ot(E),!0;if(!(ke.tagCheck instanceof Function&&ke.tagCheck(se))&&(!S[se]||Ne[se])){if(!Ne[se]&&_s(se)&&(ne.tagNameCheck instanceof RegExp&&gt(ne.tagNameCheck,se)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(se)))return!1;if(zr&&!jt[se]){const Ie=I(E)||E.parentNode,Se=_(E)||E.childNodes;if(Se&&Ie){const Ve=Se.length;for(let Ze=Ve-1;Ze>=0;--Ze){const Ut=R(Se[Ze],!0);Ut.__removalCount=(E.__removalCount||0)+1,Ie.insertBefore(Ut,D(E))}}}return ot(E),!0}return E instanceof h&&!di(E)||(se==="noscript"||se==="noembed"||se==="noframes")&&gt(/<\/no(script|embed|frames)/i,E.innerHTML)?(ot(E),!0):(Yt&&E.nodeType===gl.text&&(W=E.textContent,Ha([ve,ce,ge],Ie=>{W=hl(W,Ie," ")}),E.textContent!==W&&(fl(s.removed,{element:E.cloneNode()}),E.textContent=W)),Jt(te.afterSanitizeElements,E,null),!1)},Rs=function(E,W,se){if(vn&&(W==="id"||W==="name")&&(se in a||se in Es))return!1;if(!(lt&&!_e[W]&&gt(oe,W))){if(!(Oe&&gt(Q,W))){if(!(ke.attributeCheck instanceof Function&&ke.attributeCheck(W,E))){if(!ee[W]||_e[W]){if(!(_s(E)&&(ne.tagNameCheck instanceof RegExp&&gt(ne.tagNameCheck,E)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(E))&&(ne.attributeNameCheck instanceof RegExp&&gt(ne.attributeNameCheck,W)||ne.attributeNameCheck instanceof Function&&ne.attributeNameCheck(W,E))||W==="is"&&ne.allowCustomizedBuiltInElements&&(ne.tagNameCheck instanceof RegExp&&gt(ne.tagNameCheck,se)||ne.tagNameCheck instanceof Function&&ne.tagNameCheck(se))))return!1}else if(!wn[W]){if(!gt(K,hl(se,B,""))){if(!((W==="src"||W==="xlink:href"||W==="href")&&E!=="script"&&g2(se,"data:")===0&&Ss[E])){if(!(fr&&!gt(J,hl(se,B,"")))){if(se)return!1}}}}}}}return!0},_s=function(E){return E!=="annotation-xml"&&nc(E,Y)},Il=function(E){Jt(te.beforeSanitizeAttributes,E,null);const{attributes:W}=E;if(!W||Ts(E))return;const se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let Ie=W.length;for(;Ie--;){const Se=W[Ie],{name:Ve,namespaceURI:Ze,value:Ut}=Se,Xt=$e(Ve),As=Ut;let qe=Ve==="value"?As:y2(As);if(se.attrName=Xt,se.attrValue=qe,se.keepAttr=!0,se.forceKeepAttr=void 0,Jt(te.uponSanitizeAttribute,E,se),qe=se.attrValue,Br&&(Xt==="id"||Xt==="name")&&(Ft(Ve,E),qe=_l+qe),In&&gt(/((--!?|])>)|<\/(style|title|textarea)/i,qe)){Ft(Ve,E);continue}if(Xt==="attributename"&&nc(qe,"href")){Ft(Ve,E);continue}if(se.forceKeepAttr)continue;if(!se.keepAttr){Ft(Ve,E);continue}if(!bs&&gt(/\/>/i,qe)){Ft(Ve,E);continue}Yt&&Ha([ve,ce,ge],_t=>{qe=hl(qe,_t," ")});const jr=$e(E.nodeName);if(!Rs(jr,Xt,qe)){Ft(Ve,E);continue}if(U&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!Ze)switch(M.getAttributeType(jr,Xt)){case"TrustedHTML":{qe=U.createHTML(qe);break}case"TrustedScriptURL":{qe=U.createScriptURL(qe);break}}if(qe!==As)try{Ze?E.setAttributeNS(Ze,Ve,qe):E.setAttribute(Ve,qe),Ts(E)?ot(E):uf(s.removed)}catch{Ft(Ve,E)}}Jt(te.afterSanitizeAttributes,E,null)},Ml=function ie(E){let W=null;const se=$r(E);for(Jt(te.beforeSanitizeShadowDOM,E,null);W=se.nextNode();)Jt(te.uponSanitizeShadowNode,W,null),mn(W),Il(W),W.content instanceof d&&ie(W.content);Jt(te.afterSanitizeShadowDOM,E,null)};return s.sanitize=function(ie){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,se=null,Ie=null,Se=null;if(gr=!ie,gr&&(ie="<!-->"),typeof ie!="string"&&!Ol(ie))if(typeof ie.toString=="function"){if(ie=ie.toString(),typeof ie!="string")throw pl("dirty is not a string, aborting")}else throw pl("toString is not a function");if(!s.isSupported)return ie;if(Ur||bn(E),s.removed=[],typeof ie=="string"&&(Dn=!1),Dn){if(ie.nodeName){const Ut=$e(ie.nodeName);if(!S[Ut]||Ne[Ut])throw pl("root node is forbidden and cannot be sanitized in-place")}}else if(ie instanceof p)W=vr("<!---->"),se=W.ownerDocument.importNode(ie,!0),se.nodeType===gl.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?W=se:W.appendChild(se);else{if(!yn&&!Yt&&!cn&&ie.indexOf("<")===-1)return U&&un?U.createHTML(ie):ie;if(W=vr(ie),!W)return yn?null:un?q:""}W&&hr&&ot(W.firstChild);const Ve=$r(Dn?ie:W);for(;Ie=Ve.nextNode();)mn(Ie),Il(Ie),Ie.content instanceof d&&Ml(Ie.content);if(Dn)return ie;if(yn){if(Mn)for(Se=pe.call(W.ownerDocument);W.firstChild;)Se.appendChild(W.firstChild);else Se=W;return(ee.shadowroot||ee.shadowrootmode)&&(Se=je.call(i,Se,!0)),Se}let Ze=cn?W.outerHTML:W.innerHTML;return cn&&S["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&gt(Sh,W.ownerDocument.doctype.name)&&(Ze="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
18
+ `+Ze),Yt&&Ha([ve,ce,ge],Ut=>{Ze=hl(Ze,Ut," ")}),U&&un?U.createHTML(Ze):Ze},s.setConfig=function(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};bn(ie),Ur=!0},s.clearConfig=function(){Nn=null,Ur=!1},s.isValidAttribute=function(ie,E,W){Nn||bn({});const se=$e(ie),Ie=$e(E);return Rs(se,Ie,W)},s.addHook=function(ie,E){typeof E=="function"&&fl(te[ie],E)},s.removeHook=function(ie,E){if(E!==void 0){const W=p2(te[ie],E);return W===-1?void 0:x2(te[ie],W,1)[0]}return uf(te[ie])},s.removeHooks=function(ie){te[ie]=[]},s.removeAllHooks=function(){te=xf()},s}var L2=Ch();function O2(r){const s=/\u001b\[([0-9;]*m|K)|(\u001b\(B|\u001b\[m)/g;let a="",i={};const c=Array.from(r.matchAll(s)),d={30:"#000000",31:"#e06c75",32:"#98c379",33:"#e5c07b",34:"#61afef",35:"#c678dd",36:"#56b6c2",37:"#abb2bf"},m={90:"#5c6370",91:"#ff7b86",92:"#98c379",93:"#e5c07b",94:"#61afef",95:"#c678dd",96:"#56b6c2",97:"#ffffff"};let p=0,h="";for(const v of c){const y=r.substring(p,v.index);h+=gf(y);const k=v[1];if(p=v.index+v[0].length,k==="m"||k==="0m")h&&(a+=ic(h,i),h=""),i={};else if(k==="1m")i.fontWeight="bold";else if(k==="2m")i.opacity="0.5";else if(k==="3m")i.fontStyle="italic";else if(k==="4m")i.textDecoration="underline";else if(k.includes(";")){const M=k.split(";").filter(N=>N);for(const N of M){const R=parseInt(N);if(R===0)h&&(a+=ic(h,i),h=""),i={};else if(R===1)i.fontWeight="bold";else if(R===2)i.opacity="0.5";else if(R===3)i.fontStyle="italic";else if(R===4)i.textDecoration="underline";else if(d[R])i.color=d[R];else if(m[R])i.color=m[R];else if(R>=40&&R<=47){const b=d[R-10];b&&(i.backgroundColor=b)}else if(R>=100&&R<=107){const b=m[R-60];b&&(i.backgroundColor=b)}}}else{const M=parseInt(k);d[M]?i.color=d[M]:m[M]&&(i.color=m[M])}}const g=r.substring(p);return h+=gf(g),h&&(a+=ic(h,i)),a}function gf(r){const s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return r.replace(/[&<>"']/g,a=>s[a])}function ic(r,s){return!r||Object.keys(s).length===0?r:`<span style="${Object.entries(s).map(([i,c])=>`${i.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${c}`).join("; ")}">${r}</span>`}function I2(r,s){if(r==="completed"){if(s==="success")return t.jsx(Rt,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(bl,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(It,{className:"h-6 w-6 text-gray-600"})}return t.jsx(Be,{className:"h-6 w-6 text-blue-600"})}function Eh({step:r,onToggle:s,expandedSteps:a,stepIndex:i}){const c=w.useRef(null),[d,m]=w.useState(!1),p=a.has(r.stepNumber),h=r.children&&r.children.length>0||r.logs.length>0,g=w.useMemo(()=>d?r.logs:r.logs.slice(0,1e3),[r.logs,d]);w.useEffect(()=>{if(r.status==="in_progress"&&p&&c.current){const k=c.current;k.scrollTop=k.scrollHeight}},[r.logs.length,p,r.status]);const v=w.useMemo(()=>!r.startedAt||!r.completedAt?0:Math.round((new Date(r.completedAt).getTime()-new Date(r.startedAt).getTime())/100)/10,[r.startedAt,r.completedAt]),y={marginLeft:`${r.level*20}px`};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"border-b border-gray-200 bg-white",style:y,children:[t.jsxs("button",{onClick:()=>s(r.stepNumber),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-gray-50 transition-colors group",children:[t.jsx("span",{className:"text-gray-400 group-hover:text-gray-600 flex-shrink-0",children:h?p?t.jsx(zx,{className:"h-5 w-5"}):t.jsx(Hx,{className:"h-5 w-5"}):t.jsx("span",{className:"h-5 w-5"})}),t.jsx("span",{className:"text-xs font-bold text-gray-500 bg-gray-100 rounded px-2 py-1 min-w-fit",children:i+1}),t.jsx("span",{className:"flex-1 text-left",children:t.jsx("span",{className:"text-sm font-semibold text-gray-900",children:r.stepName})}),t.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[r.status==="in_progress"&&t.jsx("span",{className:"flex h-2 w-2 rounded-full bg-blue-500 animate-pulse"}),t.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:[v,"s"]})]})]}),p&&r.logs.length>0&&t.jsx("div",{className:"border-t border-gray-200 bg-[#0d1117]",children:t.jsxs("div",{ref:c,className:"text-gray-300 font-mono text-xs max-h-[600px] overflow-y-auto",children:[g.length===0?t.jsx("div",{className:"px-10 py-6 italic text-gray-500 text-center",children:"No logs available yet"}):t.jsx("div",{className:"py-2 px-0",children:g.map((k,M)=>t.jsxs("div",{className:"flex hover:bg-gray-800/40 transition-colors leading-6 group",children:[t.jsx("span",{className:"w-12 text-right pr-4 text-gray-600 select-none border-r border-gray-800 flex-shrink-0 group-hover:bg-gray-800/20",children:k.lineNumber}),t.jsx("span",{className:"pl-4 pr-3 text-gray-500 select-none opacity-50 text-xs flex-shrink-0",children:k.timestamp.split("T")[1]?.slice(0,8)}),t.jsx("span",{className:"flex-1 whitespace-pre break-all pr-4 text-gray-300",dangerouslySetInnerHTML:{__html:L2.sanitize(O2(k.ansiContent))}})]},`${r.stepNumber}-${k.lineNumber}`))}),!d&&r.logs.length>1e3&&t.jsx("div",{className:"px-4 py-2 border-t border-gray-800 text-center",children:t.jsxs("button",{onClick:()=>m(!0),className:"text-blue-400 hover:text-blue-300 text-xs font-medium transition-colors",children:["Show all ",r.logs.length," lines"]})})]})})]}),p&&r.children&&r.children.length>0&&t.jsx(t.Fragment,{children:r.children.map((k,M)=>t.jsx(Eh,{step:k,onToggle:s,expandedSteps:a,stepIndex:M},k.stepNumber))})]})}function M2({steps:r,jobName:s,jobStatus:a,jobConclusion:i,gitHubLogsUrl:c}){const[d,m]=w.useState(new Set([r[0]?.stepNumber])),p=g=>{m(v=>{const y=new Set(v);return y.has(g)?y.delete(g):y.add(g),y})},h=g=>g.reduce((v,y)=>{let k=1;return y.children&&y.children.length>0&&(k+=h(y.children)),v+k},0);return t.jsxs("div",{className:"flex flex-col h-full bg-white border border-gray-200 rounded-lg overflow-hidden",children:[t.jsxs("div",{className:"px-4 py-3 bg-gray-50 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-lg font-semibold ",children:I2(a,i)}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:s}),t.jsxs("p",{className:"text-xs text-gray-500",children:[h(r)," step",h(r)!==1?"s":""]})]})]}),t.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-3 py-2 bg-blue-50 text-blue-600 hover:bg-blue-100 rounded border border-blue-200 transition-colors",children:"View on GitHub"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No steps available"}):r.map((g,v)=>t.jsx(Eh,{step:g,onToggle:p,expandedSteps:d,stepIndex:v},g.stepNumber))})]})}function D2(r,s){if(r==="completed"){if(s==="success")return t.jsx(Rt,{className:"h-5 w-5 text-green-600"});if(s==="failure")return t.jsx(bl,{className:"h-5 w-5 text-red-600"})}return t.jsx(Be,{className:"h-5 w-5 text-yellow-600"})}function F2(r,s){if(r==="completed"){if(s==="success")return"bg-green-100 text-green-800";if(s==="failure")return"bg-red-100 text-red-800"}return"bg-yellow-100 text-yellow-800"}function U2(r){const s=new Date(r),i=Math.floor((new Date().getTime()-s.getTime())/1e3);if(i<60)return"just now";const c=Math.floor(i/60);if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const m=Math.floor(d/24);return m<7?`${m}d ago`:s.toLocaleDateString()}function B2({owner:r,repo:s,packageName:a,onSelectRun:i,runId:c,limit:d=10}){const[m,p]=w.useState([]),[h,g]=w.useState(!0),[v,y]=w.useState(null),[k,M]=w.useState(null),{isAuthenticated:N,hasPermission:R}=Fr();w.useEffect(()=>{const _=async()=>{try{g(!0),y(null);let U=Re.WORKFLOWS.LIST(r,s)+`?per_page=${d}`;a&&(U=Re.WORKFLOWS.BY_PACKAGE(r,s,a));const q=await Te.get(U);if(!q.success)throw new Error(be.FAILED_TO_FETCH_WORKFLOWS);const he=q.data;let $=[];if(a)if(Array.isArray(he))$=he.flatMap(pe=>pe.runs||[]).slice(0,d);else{const pe=he;$=(Array.isArray(pe.runs)?pe.runs:[]).slice(0,d)}else $=Array.isArray(he.runs)?he.runs:[];p($)}catch(U){y(U instanceof Error?U.message:be.UNKNOWN_ERROR)}finally{g(!1)}},I=setInterval(_,5e3);return _(),()=>clearInterval(I)},[r,s,a,d]);const b=async(_,I)=>{_.stopPropagation(),M(I.id);try{if((await Te.post(Re.WORKFLOWS.CANCEL(r,s,I.id))).success)p(m.map(q=>q.id===I.id?{...q,status:"completed",conclusion:"cancelled"}:q));else throw new Error(be.FAILED_TO_CANCEL_RUN)}catch(U){console.error("Failed to cancel run:",U),y(U instanceof Error?U.message:be.FAILED_TO_CANCEL_RUN)}finally{M(null)}},D=async(_,I)=>{_.stopPropagation(),M(I.id);try{if((await Te.post(Re.WORKFLOWS.RERUN(r,s,I.id),{failedOnly:!1})).success)p(m.map(q=>q.id===I.id?{...q,status:"in_progress",conclusion:null}:q));else throw new Error(be.FAILED_TO_RERUN_WORKFLOW)}catch(U){console.error("Failed to rerun workflow:",U),y(U instanceof Error?U.message:be.FAILED_TO_RERUN_WORKFLOW)}finally{M(null)}};return h&&m.length===0?t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Be,{className:"h-8 w-8 text-blue-600"})})}):v?t.jsx("div",{className:"rounded-lg bg-red-50 p-4 border border-red-200",children:t.jsxs("p",{className:"text-sm text-red-800",children:["Error: ",v]})}):t.jsx("div",{className:"space-y-2",children:!m||m.length===0?t.jsx("p",{className:"text-sm text-gray-500 py-4",children:"No workflow runs found"}):m.map(_=>t.jsxs("div",{className:`text-left p-3 rounded-lg border transition-colors ${c===_.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:[t.jsx("button",{onClick:()=>i?.(_.id),className:"w-full text-left",children:t.jsxs("div",{className:"flex items-start gap-2",children:[D2(_.status,_.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900",children:_.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${F2(_.status,_.conclusion)}`,children:_.conclusion??_.status}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["Branch: ",_.head_branch]}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["by ",_.actor.login]}),t.jsx("span",{children:" • "}),t.jsx("span",{children:U2(_.created_at)})]})]})]})}),R("maintain")&&t.jsxs("div",{className:"flex gap-2 mt-3",children:[_.status==="in_progress"&&t.jsx("button",{onClick:I=>b(I,_),disabled:k===_.id,className:"flex-1 px-3 py-2 text-sm font-medium text-red-700 bg-red-50 border border-red-200 rounded hover:bg-red-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Cancel this workflow run",children:k===_.id?"Cancelling...":"Cancel Run"}),(_.conclusion==="cancelled"||_.conclusion==="failure")&&t.jsx("button",{onClick:I=>D(I,_),disabled:k===_.id,className:"flex-1 px-3 py-2 text-sm font-medium text-blue-700 bg-blue-50 border border-blue-200 rounded hover:bg-blue-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Rerun this workflow",children:k===_.id?"Rerunning...":"Rerun"})]})]},_.id))})}function z2({owner:r,repo:s,defaultBranch:a="main",onSuccess:i,onError:c}){const[d,m]=w.useState(!1),[p,h]=w.useState(a),[g,v]=w.useState({}),[y,k]=w.useState(!1),[M,N]=w.useState(null),[R,b]=w.useState([]),[D,_]=w.useState(),[I,U]=w.useState(!1);w.useEffect(()=>{d&&R.length===0&&q()},[d]);const q=async()=>{try{U(!0);const $=await Te.get(Re.WORKFLOWS.AVAILABLE(r,s));$.success&&(b($.data.workflows||[]),$.data.workflows?.length>0&&!D&&_($.data.workflows[0].path))}catch($){console.error("Failed to fetch workflows:",$)}finally{U(!1)}},he=async()=>{try{k(!0),N(null);const $=await Te.post(Re.WORKFLOWS.TRIGGER(r,s),{workflow:D,ref:p,inputs:g,workflowId:R.find(we=>we.path==D)?.id??""});if(!$.success)throw new Error(be.FAILED_TO_TRIGGER_WORKFLOW);const pe=$.data;if(pe.success)i?.(pe.runUrl||`https://github.com/${r}/${s}/actions`),m(!1),h(a),v({});else throw new Error(pe.message||be.FAILED_TO_TRIGGER_WORKFLOW)}catch($){const pe=$ instanceof Error?$.message:be.UNKNOWN_ERROR;N(pe),c?.(pe)}finally{k(!1)}};return t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>m(!d),disabled:y,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[t.jsx(ni,{className:"h-4 w-4"}),"Trigger Workflow"]}),d&&t.jsxs("div",{className:"absolute right-0 mt-2 w-96 bg-white border border-gray-200 rounded-lg shadow-lg z-10 p-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Trigger Workflow"}),M&&t.jsxs("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[t.jsx(bl,{className:"h-5 w-5 text-red-600 flex-shrink-0 mt-0.5"}),t.jsx("p",{className:"text-sm text-red-700",children:M})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Workflow"}),I?t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-500",children:"Loading workflows..."}):R.length>0?t.jsx("select",{value:D,onChange:$=>_($.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:R.map($=>t.jsxs("option",{value:$.path,children:[$.name," (",$.path,")"]},$.id))}):t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-yellow-50 text-yellow-700 text-sm",children:"No workflows available"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Branch"}),t.jsx("input",{type:"text",value:p,onChange:$=>h($.target.value),placeholder:"main",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"flex gap-2 pt-4",children:[t.jsx("button",{onClick:he,disabled:y||!p,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:y?"Triggering...":"Trigger"}),t.jsx("button",{onClick:()=>m(!1),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors font-medium",children:"Cancel"})]})]})]})]})}function H2(r,s,a=!1){if(a)return t.jsx(Be,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(Rt,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(bl,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(It,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(Be,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(Be,{className:"h-6 w-6 text-blue-600"}):t.jsx(Be,{className:"h-6 w-6 text-gray-600"})}function $2({jobs:r,selectedJob:s,onSelectJob:a}){return t.jsx(t.Fragment,{children:r.map(i=>{const c=i.startedAt&&i.completedAt?Math.round((new Date(i.completedAt).getTime()-new Date(i.startedAt).getTime())/1e3):0;return t.jsx("div",{className:`rounded-lg border transition-colors ${s?.id===i.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:t.jsx("button",{onClick:()=>a(i),className:"w-full text-left p-3",children:t.jsxs("div",{className:"flex items-start gap-2",children:[H2(i.status,i.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:i.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[i.status," • ",c,"s"]})]})]})})},i.id)})})}const V2=()=>{try{const r=rt.get("monodog_session_data");return r?JSON.parse(r).permission:null}catch(r){return console.error("Failed to parse session data",r),null}};function W2(r){const s=r.split(`
19
+ `),a=[];let i=null;const c=[];for(let d=0;d<s.length;d++){const m=s[d],p=m.trim(),h=m.match(/^(\s*)/)?.[1].length||0,g=Math.floor(h/2);if(m.includes("##[group]")){const v=m.match(/##\[group\](.*?)(?:##\[endgroup\]|$)/),k={name:v?v[1].trim():`Step ${a.length+1}`,logs:[],level:g,children:[],startIndex:d};for(;c.length>0&&c[c.length-1].level>=k.level;)c.pop();if(c.length>0){const M=c[c.length-1];M.children||(M.children=[]),M.children.push(k)}else a.push(k);c.push(k),i=k}else{if(m.includes("##[endgroup]"))continue;p&&i&&i.logs.push(m)}}return a}function G2(r,s,a=!1){if(a)return t.jsx(Be,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(Rt,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(bl,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(It,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(Be,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(Be,{className:"h-6 w-6 text-blue-600"}):t.jsx(Be,{className:"h-6 w-6 text-gray-600"})}function K2({packageName:r,onNavigate:s}){const[a,i]=w.useState([]),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(null),[k,M]=w.useState(!0),[N,R]=w.useState(null),[b,D]=w.useState(new Set),{hasPermission:_}=Fr(),[I,U]=w.useState(0),[q,he]=w.useState(!1),$=10,pe=20,{owner:we,repo:je}=w.useMemo(()=>V2()||{},[]);w.useEffect(()=>{const oe=async()=>{try{const J=Re.PIPELINES.LIST,B=await Te.get(J);if(!B.success){if(B.error?.status===401||B.error?.status===403){window.location.href="/login";return}if(B.error?.status===404){console.warn("Pipelines endpoint not available"),i([]),M(!1);return}throw new Error(`Failed to fetch pipelines: ${B.error?.message}`)}const Y=Array.isArray(B.data)?B.data:[];i(Y),M(!1)}catch(J){R(J instanceof Error?J.message:"Unknown error"),M(!1)}};oe();const Q=setInterval(oe,5e3);return()=>clearInterval(Q)},[we,je,r]),w.useEffect(()=>{const oe=async()=>{try{a.forEach(async J=>{if(J.workflowId&&J.currentStatus!=="completed"&&!b.has(J.workflowId)){const B=Re.WORKFLOWS.LIST(we,je)+`?workflow_id=${J.workflowId}&per_page=${pe}&page=1`,Y=await Te.get(B);if(Y.success){const K=Y.data,S=K.workflow_runs?.[0]||K.runs?.[0];if(S){const F=S.status!==J.currentStatus,ee=S.conclusion!==J.currentConclusion;if(F||ee){D(ue=>new Set(ue).add(J.workflowId));try{const ue=await Te.put(Re.PIPELINES.STATUS(J.id),{currentStatus:S.status,currentConclusion:S.conclusion||null,lastRunId:S.id}),ne={...J,currentStatus:S.status,currentConclusion:S.conclusion||null,lastRunId:S.id};if(console.log(ne),ne.currentStatus=="completed"){const Ne=await Mt.refreshPackages()}i(Ne=>Ne.map(_e=>_e.id===J.id?ne:_e))}catch(ue){console.warn("Failed to update pipeline status:",ue)}finally{D(ue=>{const ne=new Set(ue);return ne.delete(J.workflowId),ne})}}}}}})}catch(J){console.warn("Failed to poll pipeline status:",J)}};oe();const Q=setInterval(oe,1e4);return()=>clearInterval(Q)},[a,we,je]),w.useEffect(()=>{if(!c)return;const oe=async()=>{try{const J=await Te.get(Re.WORKFLOWS.RUNS(we,je,c));if(!J.success){if(J.error?.status===401||J.error?.status===403){window.location.href="/login";return}throw new Error(`Failed to fetch jobs: ${J.error?.message}`)}p(J.data.jobs||[])}catch(J){R(J instanceof Error?J.message:"Unknown error")}},Q=setInterval(oe,5e3);return oe(),()=>clearInterval(Q)},[c,we,je]),w.useEffect(()=>{if(!h)return;const oe=async()=>{try{const Q=await Te.get(Re.WORKFLOWS.LOGS(we,je,h.gitHubJobId));if(!Q.success){if(Q.error?.status===403)R(be.PERMISSION_ERROR);else if(Q.error?.status===401)R(mc.SESSION_EXPIRED),window.location.href="/login";else{console.log(Q);const B=Q.error?.details||"Unknown error";R(`${be.FAILED_TO_FETCH_LOGS}: ${B}`)}return}const J=Q.data;J.meta&&J.meta.isEmpty?(y(""),R(be.FAILED_TO_FETCH_LOGS)):(y(J.logs||J),R(null))}catch(Q){const J=Q instanceof Error?Q.message:be.FAILED_TO_FETCH_LOGS;R(`${be.FAILED_TO_FETCH_LOGS}: ${J}`)}};if(oe(),h.status!=="completed"){const Q=setInterval(oe,5e3);return()=>clearInterval(Q)}},[h,we,je]);const te=oe=>{g(oe),y(null)},ve=oe=>{const Q=oe.currentTarget;Q.scrollHeight-Q.scrollTop-Q.clientHeight<100&&!q&&a.length>=$&&ce()},ce=async()=>{if(!q){he(!0);try{const oe=Re.PIPELINES.LIST+`?offset=${I+$}&limit=${$}`,Q=await Te.get(oe);if(!Q.success)throw new Error("Failed to fetch more pipelines");const J=Q.data;i(B=>[...B,...J]),U(B=>B+$)}catch(oe){console.error("Error loading more pipelines:",oe)}finally{he(!1)}}},ge=oe=>{d(oe),g(null),p([])};return k&&a.length===0?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Be,{className:"h-8 w-8 text-blue-600"})})}):t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 h-[50vh] overflow-hidden",children:[t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",onScroll:ve,children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Pipelines"}),_("maintain")&&t.jsx(z2,{owner:we,repo:je})]}),N&&t.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:t.jsx("p",{className:"text-xs text-red-700",children:N})}),t.jsx("div",{className:"space-y-2",children:a.length===0?t.jsx("p",{className:"text-sm text-gray-500",children:"No pipelines found"}):t.jsxs(t.Fragment,{children:[a.map(oe=>t.jsx("div",{className:"w-full text-left p-3 rounded-lg border transition-colors border-gray-200 hover:bg-gray-50",children:t.jsxs("div",{className:"flex items-start gap-2",children:[G2(oe.currentStatus,oe.currentConclusion||null,b.has(oe.id)),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:oe.packageName}),t.jsxs("p",{className:"text-xs text-gray-500",children:["v",oe.releaseVersion]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:oe.workflowName})]})]})},oe.id)),q&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Be,{className:"h-5 w-5 text-blue-600"})})})]})})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Runs"}),t.jsx(B2,{owner:we,repo:je,packageName:r,onSelectRun:ge,runId:c,limit:pe})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Jobs"}),t.jsx("div",{className:"space-y-2",children:m.length?t.jsx($2,{jobs:m,selectedJob:h,onSelectJob:te}):c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Be,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a run to view jobs"})})})]})})]}),t.jsx("div",{className:"lg:col-span-1 overflow-hidden border-t pt-2 h-[50vh]",children:t.jsxs("div",{className:"p-4 h-full overflow-hidden flex flex-col",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Logs"}),h&&v?t.jsx(M2,{steps:(()=>{const oe=W2(v);let Q=0;const J=B=>B.map(Y=>{Q++;const K=Y.logs.at(0)?.split(" ")[0],S=Y.logs.at(-1)?.split(" ")[0];return{stepNumber:Q,stepName:Y.name,level:Y.level,status:"",conclusion:"",startedAt:K,completedAt:S,logs:Y.logs.map((F,ee)=>({lineNumber:ee+1,timestamp:new Date().toISOString(),content:F,ansiContent:F})),children:Y.children?J(Y.children):void 0}});return J(oe)})(),jobName:h.name,jobStatus:h.status,jobConclusion:h.conclusion,gitHubLogsUrl:h.htmlUrl}):h?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Be,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a job to view logs"})})]})})]})}function Y2(){const{session:r}=Fr();return r?t.jsx("div",{className:"h-screen overflow-hidden",children:t.jsx(K2,{})}):t.jsx("div",{className:"flex items-center justify-center h-screen",children:t.jsx("p",{className:"text-gray-600",children:"Please sign in to view pipelines"})})}const q2={Dashboard:Cv,PackagesOverview:Ev,PackageDetail:kv,DependencyGraph:Yv,HealthStatus:qv,PublishControl:i1,CIIntegration:S1,ConfigInspector:n2,ReleaseManager:d2,Pipeline:Y2},Q2=({componentName:r})=>{const s=q2[r];return s?t.jsx(s,{}):t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Page Not Found"}),t.jsx("p",{className:"text-gray-600",children:"The requested page could not be found."})]})})};function J2(){return t.jsxs(_f,{children:[Af.map(r=>t.jsx(ps,{path:r.path,element:t.jsx(Q2,{componentName:r.component})},r.path)),t.jsx(ps,{path:"*",element:t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔍"}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"404 - Page Not Found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"The page you're looking for doesn't exist or has been moved."}),t.jsx("a",{href:"/",className:"text-blue-600 hover:text-blue-500 font-medium",children:"Go back to Dashboard"})]})})})]})}const X2=w.createContext(void 0);function Z2({children:r}){const[s,a]=w.useState(new Map),[i,c]=w.useState(!1),[d,m]=w.useState(null),p=(M,N)=>`${M}/${N}`,h=w.useCallback(async(M,N,R)=>{try{c(!0),m(null);const b=p(N,R);if(s.has(b))return s.get(b)||null;const D=await Te.get(`/permissions/${N}/${R}`);if(!D.success)throw D.error.status===401?new Error(be.AUTHENTICATION_ERROR):new Error(be.FAILED_TO_CHECK_PERMISSION);const _=D.data,I={permission:_.permission,role:_.role,canAdmin:_.canAdmin,canMaintain:_.canMaintain,canWrite:_.canWrite,canRead:_.canRead,denied:_.denied};return a(U=>{const q=new Map(U);return q.set(b,I),q}),I}catch(b){const D=b instanceof Error?b.message:"Permission check failed";return m(D),null}finally{c(!1)}},[s]),g=w.useCallback(async(M,N,R,b)=>{try{c(!0),m(null);const D=await Te.post(`/permissions/${N}/${R}/can-action`,{action:b});if(!D.success)throw new Error(be.FAILED_TO_CHECK_ACTION_PERMISSION);return D.data.can===!0}catch(D){return console.error("Action permission check error:",D),!1}finally{c(!1)}},[]),v=w.useCallback((M,N)=>{const R=p(M,N);a(b=>{const D=new Map(b);return D.delete(R),D})},[]),y=w.useCallback(()=>{a(new Map)},[]),k={permissions:s,isLoading:i,error:d,checkPermission:h,canPerformAction:g,invalidatePermission:v,invalidateAll:y};return t.jsx(X2.Provider,{value:k,children:r})}function ew(){const{login:r,isLoading:s,error:a}=Fr(),[i,c]=w.useState(!1),d=async()=>{c(!0),await r()};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br p-5",children:t.jsxs("div",{className:"bg-white rounded-xl shadow-2xl max-w-md w-full overflow-hidden",children:[t.jsxs("div",{className:"bg-gradient-to-br from-primary-500 to-primary-700 text-white p-8 text-center",children:[t.jsx("h1",{className:"text-4xl font-bold m-0",children:"MonoDog"}),t.jsx("p",{className:"text-sm opacity-90 font-medium mt-2 m-0",children:"Monorepo Analytics & Management"})]}),t.jsxs("div",{className:"p-10",children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 text-center mb-8",children:"Sign in to your account"}),a&&t.jsx("div",{className:"bg-red-100 text-red-700 px-4 py-3 rounded-lg mb-5 text-sm border-l-4 border-red-700",children:a}),t.jsxs("button",{onClick:d,disabled:s||i,className:"w-full flex items-center justify-center gap-3 px-5 py-3 bg-primary-600 text-white rounded-lg font-semibold text-base cursor-pointer transition-all duration-300 disabled:opacity-60 disabled:cursor-not-allowed hover:enabled:bg-primary-700 hover:enabled:-translate-y-0.5 hover:enabled:shadow-lg mb-8",children:[t.jsx(Vx,{}),"Continue with GitHub"]}),t.jsxs("div",{className:"flex items-center gap-3 my-8 text-gray-400 text-xs font-semibold uppercase tracking-widest",children:[t.jsx("div",{className:"flex-1 h-px bg-gray-200"}),t.jsx("span",{children:"GitHub OAuth Authentication"}),t.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),t.jsxs("div",{className:"bg-primary-50 rounded-lg p-5 border-l-4 border-primary-500",children:[t.jsx("h4",{className:"text-xs font-semibold text-gray-900 mb-3 uppercase tracking-wide",children:"Requested Permissions"}),t.jsxs("ul",{className:"m-0 p-0 list-none space-y-2",children:[t.jsxs("li",{className:"text-sm text-gray-700",children:[t.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"read:user"})," - Read your profile information"]}),t.jsxs("li",{className:"text-sm text-gray-700",children:[t.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"user:email"})," - Access your email address"]}),t.jsxs("li",{className:"text-sm text-gray-700",children:[t.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"repo"})," - Access your repositories (required for private repos)"]})]})]})]}),t.jsx("div",{className:"bg-gray-50 px-10 py-5 border-t border-gray-200 text-center",children:t.jsx("p",{className:"text-xs text-gray-500 leading-relaxed m-0",children:"By signing in, you agree to our Terms of Service and Privacy Policy"})})]})})}function tw(){const r=kc(),[s,a]=w.useState(!0),[i,c]=w.useState(null);return w.useEffect(()=>{(async()=>{try{const m=new URLSearchParams(window.location.search),p=m.get("code"),h=m.get("state"),g=m.get("error"),v=m.get("error_description");if(g){c(`${g}: ${v}`),a(!1);return}if(!p||!h){c("Missing authorization code or state"),a(!1);return}const y=await Te.get(Re.AUTH.CALLBACK+`?code=${p}&state=${h}`);if(!y.success){c(y.error?.message||"Authentication failed"),a(!1);return}const k=y.data;if(!k.success||!k.sessionToken){c(be.AUTHENTICATION_ERROR),a(!1);return}const M=window.__authContext;if(M&&M.handleOAuthCallback)if(await M.handleOAuthCallback(k.sessionToken,k.permission)){const R=k.redirectUrl||"/";r(R)}else c(be.AUTHENTICATION_ERROR);else c(be.AUTHENTICATION_ERROR)}catch(m){const p=m instanceof Error?m.message:be.UNKNOWN_ERROR;c(p)}finally{a(!1)}})()},[r]),t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary-500 to-primary-700 p-5",children:t.jsx("div",{className:"bg-white rounded-xl shadow-2xl max-w-sm text-center p-10",children:s?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-10 h-10 border-4 border-gray-200 border-t-indigo-500 rounded-full animate-spin mx-auto my-5"}),t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-5 mb-2",children:"Completing Authentication..."}),t.jsx("p",{className:"text-gray-700 text-sm leading-relaxed",children:"Please wait while we verify your GitHub account."})]}):i?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-5xl mb-5",children:"Warning!"}),t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Authentication Failed"}),t.jsx("p",{className:"text-gray-700 text-sm leading-relaxed mb-5",children:i}),t.jsx("button",{onClick:()=>r("/login"),className:"inline-block px-6 py-3 bg-primary-500 text-white rounded-lg font-semibold text-sm cursor-pointer transition-all duration-300 hover:bg-primary-600 hover:-translate-y-0.5 hover:shadow-lg",children:"Return to Login"})]}):null})})}function nw({message:r="Loading..."}){return t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-gray-200 border-t-primary-500 animate-spin mb-4"}),t.jsx("p",{className:"text-gray-600",children:r})]})}function rw({children:r}){const{isAuthenticated:s,isLoading:a}=Fr();return a?t.jsx(nw,{}):s?t.jsx(t.Fragment,{children:r}):t.jsx(hx,{to:"/login",replace:!0})}function sw(){return t.jsx(Nx,{children:t.jsx(Ty,{children:t.jsx(Z2,{children:t.jsxs(_f,{children:[t.jsx(ps,{path:"/login",element:t.jsx(ew,{})}),t.jsx(ps,{path:"/auth/callback",element:t.jsx(tw,{})}),t.jsx(ps,{path:"/*",element:t.jsx(rw,{children:t.jsx(Ry,{children:t.jsx(J2,{})})})})]})})})})}const yf=document.getElementById("root");yf&&wp.createRoot(yf).render(t.jsx(sw,{}));
20
+ //# sourceMappingURL=index-C08ciT3A.js.map