@hotmeshio/long-tail 0.1.13 → 0.1.14
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.
- package/build/api/files.d.ts +13 -0
- package/build/api/files.js +44 -0
- package/build/api/mcp-runs.d.ts +2 -0
- package/build/api/mcp-runs.js +2 -0
- package/build/api/workflow-sets.d.ts +11 -0
- package/build/api/workflow-sets.js +62 -0
- package/build/api/yaml-workflows.d.ts +9 -0
- package/build/api/yaml-workflows.js +40 -11
- package/build/lib/storage/local.d.ts +15 -0
- package/build/lib/storage/local.js +63 -0
- package/build/lib/storage/mime.d.ts +4 -0
- package/build/lib/storage/mime.js +31 -0
- package/build/lib/storage/s3.d.ts +16 -0
- package/build/lib/storage/s3.js +70 -0
- package/build/lib/storage/types.d.ts +18 -0
- package/build/modules/utils.d.ts +73 -0
- package/build/modules/utils.js +84 -0
- package/build/routes/file-browser.d.ts +2 -0
- package/build/routes/file-browser.js +112 -0
- package/build/routes/files.js +25 -17
- package/build/routes/index.js +2 -0
- package/build/routes/mcp-runs.js +2 -0
- package/build/routes/workflow-sets.js +9 -0
- package/build/routes/yaml-workflows/deployment.js +8 -0
- package/build/services/insight/index.d.ts +13 -0
- package/build/services/insight/index.js +4 -7
- package/build/services/insight/prompts.d.ts +1 -1
- package/build/services/insight/prompts.js +1 -1
- package/build/services/mcp-runs/queries.d.ts +2 -0
- package/build/services/mcp-runs/queries.js +11 -1
- package/build/services/mcp-runs/sql.d.ts +1 -1
- package/build/services/mcp-runs/sql.js +2 -2
- package/build/services/workflow-sets/db.d.ts +1 -0
- package/build/services/workflow-sets/db.js +6 -0
- package/build/services/workflow-sets/index.d.ts +1 -1
- package/build/services/workflow-sets/index.js +2 -1
- package/build/services/workflow-sets/sql.d.ts +1 -0
- package/build/services/workflow-sets/sql.js +6 -1
- package/build/services/yaml-workflow/db.d.ts +12 -0
- package/build/services/yaml-workflow/db.js +18 -0
- package/build/services/yaml-workflow/generator.js +4 -4
- package/build/services/yaml-workflow/pipeline/build/index.d.ts +2 -1
- package/build/services/yaml-workflow/pipeline/build/index.js +3 -2
- package/build/services/yaml-workflow/pipeline/build/utils.d.ts +0 -2
- package/build/services/yaml-workflow/pipeline/build/utils.js +0 -8
- package/build/services/yaml-workflow/sql.d.ts +2 -1
- package/build/services/yaml-workflow/sql.js +10 -3
- package/build/system/activities/schema-exchange.d.ts +50 -0
- package/build/system/activities/schema-exchange.js +210 -0
- package/build/system/activities/sql.d.ts +1 -1
- package/build/system/activities/sql.js +12 -1
- package/build/system/index.js +1 -0
- package/build/system/mcp-servers/knowledge.js +35 -6
- package/build/system/mcp-servers/schema-exchange.d.ts +4 -0
- package/build/system/mcp-servers/schema-exchange.js +93 -0
- package/build/system/seed/server-definitions.d.ts +112 -1
- package/build/system/seed/server-definitions.js +37 -0
- package/build/system/seed/tool-manifests-data.d.ts +87 -0
- package/build/system/seed/tool-manifests-data.js +37 -1
- package/build/system/seed/tool-manifests-knowledge.d.ts +9 -1
- package/build/system/seed/tool-manifests-knowledge.js +6 -5
- package/build/system/workflows/mcp-workflow-builder/prompts.d.ts +1 -1
- package/build/system/workflows/mcp-workflow-builder/prompts.js +21 -20
- package/build/system/workflows/mcp-workflow-planner/activities/persist.d.ts +1 -1
- package/build/system/workflows/mcp-workflow-planner/activities/persist.js +3 -3
- package/build/system/workflows/mcp-workflow-planner/index.js +39 -5
- package/build/system/workflows/mcp-workflow-planner/prompts.d.ts +1 -1
- package/build/system/workflows/mcp-workflow-planner/prompts.js +3 -3
- package/build/tsconfig.tsbuildinfo +1 -1
- package/dashboard/dist/assets/{AdminDashboard-DUrSBQOl.js → AdminDashboard-Cngijp4Q.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-DUrSBQOl.js.map → AdminDashboard-Cngijp4Q.js.map} +1 -1
- package/dashboard/dist/assets/{AvailableEscalationsPage-Dbd1qUK_.js → AvailableEscalationsPage-CpBfGV1h.js} +2 -2
- package/dashboard/dist/assets/{AvailableEscalationsPage-Dbd1qUK_.js.map → AvailableEscalationsPage-CpBfGV1h.js.map} +1 -1
- package/dashboard/dist/assets/{BotPicker-Cg5iNEkm.js → BotPicker-B8Uvw9Si.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-Cg5iNEkm.js.map → BotPicker-B8Uvw9Si.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-Kd9UIyeU.js → CollapsibleSection-DiFPuWOY.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-Kd9UIyeU.js.map → CollapsibleSection-DiFPuWOY.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-DZMgmlof.js → ConfirmDeleteModal-CpXG9uyu.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-DZMgmlof.js.map → ConfirmDeleteModal-CpXG9uyu.js.map} +1 -1
- package/dashboard/dist/assets/{CopyableId-cPFTRm8q.js → CopyableId-DKsTR9lK.js} +2 -2
- package/dashboard/dist/assets/{CopyableId-cPFTRm8q.js.map → CopyableId-DKsTR9lK.js.map} +1 -1
- package/dashboard/dist/assets/CredentialsPage-DlS7Kf40.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-DJablIbs.js.map → CredentialsPage-DlS7Kf40.js.map} +1 -1
- package/dashboard/dist/assets/{CustomDurationPicker-NgIP6YDW.js → CustomDurationPicker-B-9eW3pm.js} +2 -2
- package/dashboard/dist/assets/{CustomDurationPicker-NgIP6YDW.js.map → CustomDurationPicker-B-9eW3pm.js.map} +1 -1
- package/dashboard/dist/assets/{DataTable-CTRhTAfT.js → DataTable-DkOokbtL.js} +2 -2
- package/dashboard/dist/assets/{DataTable-CTRhTAfT.js.map → DataTable-DkOokbtL.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-HcSJ_MMs.js → ElapsedCell-DVtHqM-5.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-HcSJ_MMs.js.map → ElapsedCell-DVtHqM-5.js.map} +1 -1
- package/dashboard/dist/assets/{EmptyState-joNbd4gg.js → EmptyState-C7KIMIbE.js} +2 -2
- package/dashboard/dist/assets/{EmptyState-joNbd4gg.js.map → EmptyState-C7KIMIbE.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-DpXDnQux.js → EscalationsOverview-BMKBlkPx.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-DpXDnQux.js.map → EscalationsOverview-BMKBlkPx.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-CYem3v8n.js → EventTable-BYZ5OVdQ.js} +2 -2
- package/dashboard/dist/assets/{EventTable-CYem3v8n.js.map → EventTable-BYZ5OVdQ.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-BiO8SOzc.js → FilterBar-C5r3n6YO.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-BiO8SOzc.js.map → FilterBar-C5r3n6YO.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-6yRDh2e9.js → ListToolbar-BGUajIsW.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-6yRDh2e9.js.map → ListToolbar-BGUajIsW.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-CUgSxkQe.js → McpOverview-B_kJYHea.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-CUgSxkQe.js.map → McpOverview-B_kJYHea.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-Czsmovqw.js +5 -0
- package/dashboard/dist/assets/McpQueryDetailPage-Czsmovqw.js.map +1 -0
- package/dashboard/dist/assets/McpQueryPage-BgAq_bQg.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-lV6kfDG5.js.map → McpQueryPage-BgAq_bQg.js.map} +1 -1
- package/dashboard/dist/assets/McpRunDetailPage-B8c0OszR.js +2 -0
- package/dashboard/dist/assets/McpRunDetailPage-B8c0OszR.js.map +1 -0
- package/dashboard/dist/assets/McpRunsPage-BY8C6k78.js +2 -0
- package/dashboard/dist/assets/McpRunsPage-BY8C6k78.js.map +1 -0
- package/dashboard/dist/assets/{Modal-BuTvD0pz.js → Modal-E1yRnCeW.js} +2 -2
- package/dashboard/dist/assets/{Modal-BuTvD0pz.js.map → Modal-E1yRnCeW.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-C8MSTzey.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-C9SSV96T.js.map → OperatorDashboard-C8MSTzey.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-BcTVF9ul.js → PageHeader-Cm5HBQF_.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-BcTVF9ul.js.map → PageHeader-Cm5HBQF_.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-BI7JG5x6.js → PageHeaderWithStats-CNmWJFSN.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-BI7JG5x6.js.map → PageHeaderWithStats-CNmWJFSN.js.map} +1 -1
- package/dashboard/dist/assets/{PriorityBadge-DqVaOU65.js → PriorityBadge-HSI4RVhs.js} +2 -2
- package/dashboard/dist/assets/{PriorityBadge-DqVaOU65.js.map → PriorityBadge-HSI4RVhs.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-hFMhf9qa.js → ProcessDetailPage-Dln8622H.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-hFMhf9qa.js.map → ProcessDetailPage-Dln8622H.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-ByVoBCQ3.js → ProcessesListPage-bIsd9N_h.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-ByVoBCQ3.js.map → ProcessesListPage-bIsd9N_h.js.map} +1 -1
- package/dashboard/dist/assets/{RolePill-D9ZIkYiu.js → RolePill-BVUp2bF0.js} +2 -2
- package/dashboard/dist/assets/{RolePill-D9ZIkYiu.js.map → RolePill-BVUp2bF0.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-kH-Njt25.js +2 -0
- package/dashboard/dist/assets/{RolesPage-SMedMuqa.js.map → RolesPage-kH-Njt25.js.map} +1 -1
- package/dashboard/dist/assets/{RowActions-yDhwwDbU.js → RowActions-DbUJPfaW.js} +2 -2
- package/dashboard/dist/assets/{RowActions-yDhwwDbU.js.map → RowActions-DbUJPfaW.js.map} +1 -1
- package/dashboard/dist/assets/{StatCard-BrBnQFxh.js → StatCard-Bs3JbyAz.js} +2 -2
- package/dashboard/dist/assets/{StatCard-BrBnQFxh.js.map → StatCard-Bs3JbyAz.js.map} +1 -1
- package/dashboard/dist/assets/{StatusBadge-xgb-lZku.js → StatusBadge-CakDdsCw.js} +2 -2
- package/dashboard/dist/assets/{StatusBadge-xgb-lZku.js.map → StatusBadge-CakDdsCw.js.map} +1 -1
- package/dashboard/dist/assets/{StepIndicator-B9ps2SvM.js → StepIndicator-Cd_SG_yA.js} +2 -2
- package/dashboard/dist/assets/{StepIndicator-B9ps2SvM.js.map → StepIndicator-Cd_SG_yA.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-DTIjBKN3.js → StickyPagination-Bz0C18nC.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-DTIjBKN3.js.map → StickyPagination-Bz0C18nC.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-RK4Yu66z.js → SwimlaneTimeline-Cfe-xQRX.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-RK4Yu66z.js.map → SwimlaneTimeline-Cfe-xQRX.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-CdNUuqk4.js → TagInput-ClFhXG-U.js} +2 -2
- package/dashboard/dist/assets/{TagInput-CdNUuqk4.js.map → TagInput-ClFhXG-U.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-C-nzaNea.js → TaskDetailPage-SuMBdARt.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-C-nzaNea.js.map → TaskDetailPage-SuMBdARt.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-Lvr2-NzS.js → TaskQueuePill-lJR1JW_W.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-Lvr2-NzS.js.map → TaskQueuePill-lJR1JW_W.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-DSUmD84y.js → TasksListPage-Dkq1Vtbt.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-DSUmD84y.js.map → TasksListPage-Dkq1Vtbt.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-BZdLdrIh.js → TimeAgo-DgfDZ1pl.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-BZdLdrIh.js.map → TimeAgo-DgfDZ1pl.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-QX_0i5FK.js → TimestampCell-MpHZ1hMD.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-QX_0i5FK.js.map → TimestampCell-MpHZ1hMD.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-DyZMXcBm.js → UserName-DqsosA4B.js} +2 -2
- package/dashboard/dist/assets/{UserName-DyZMXcBm.js.map → UserName-DqsosA4B.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-DjVxfZaF.js → WorkflowExecutionPage-CVlg38C3.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-DjVxfZaF.js.map → WorkflowExecutionPage-CVlg38C3.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-CRpZhjGR.js +2 -0
- package/dashboard/dist/assets/WorkflowPill-CRpZhjGR.js.map +1 -0
- package/dashboard/dist/assets/{WorkflowsDashboard-DZjuiFZ0.js → WorkflowsDashboard-Ugzbs8mV.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-DZjuiFZ0.js.map → WorkflowsDashboard-Ugzbs8mV.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-CLnLRpOu.js → WorkflowsOverview-CIp_lTNl.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-CLnLRpOu.js.map → WorkflowsOverview-CIp_lTNl.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-BICF0fRO.js +2 -0
- package/dashboard/dist/assets/YamlWorkflowsPage-BICF0fRO.js.map +1 -0
- package/dashboard/dist/assets/{bots-DIM6lBoY.js → bots-DPfUpVqI.js} +2 -2
- package/dashboard/dist/assets/{bots-DIM6lBoY.js.map → bots-DPfUpVqI.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-JOTuOqjq.js → escalation-RrCDbMC3.js} +2 -2
- package/dashboard/dist/assets/{escalation-JOTuOqjq.js.map → escalation-RrCDbMC3.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-CDGa9wsD.js +2 -0
- package/dashboard/dist/assets/{escalation-columns-Cyg58nkg.js.map → escalation-columns-CDGa9wsD.js.map} +1 -1
- package/dashboard/dist/assets/{helpers-B1BDxBZd.js → helpers-ZSKqdkdS.js} +2 -2
- package/dashboard/dist/assets/{helpers-B1BDxBZd.js.map → helpers-ZSKqdkdS.js.map} +1 -1
- package/dashboard/dist/assets/helpers-rMEcLwKs.js +2 -0
- package/dashboard/dist/assets/helpers-rMEcLwKs.js.map +1 -0
- package/dashboard/dist/assets/{index-DDYFpi4l.js → index-ABcJHHlN.js} +2 -2
- package/dashboard/dist/assets/{index-DDYFpi4l.js.map → index-ABcJHHlN.js.map} +1 -1
- package/dashboard/dist/assets/{index-D1wVX50Z.js → index-B91h_jZ0.js} +2 -2
- package/dashboard/dist/assets/{index-D1wVX50Z.js.map → index-B91h_jZ0.js.map} +1 -1
- package/dashboard/dist/assets/{index-BcR6PfpY.js → index-BbI2dzhJ.js} +2 -2
- package/dashboard/dist/assets/{index-BcR6PfpY.js.map → index-BbI2dzhJ.js.map} +1 -1
- package/dashboard/dist/assets/{index-BizfauqT.js → index-BmVCyB6C.js} +4 -4
- package/dashboard/dist/assets/{index-BizfauqT.js.map → index-BmVCyB6C.js.map} +1 -1
- package/dashboard/dist/assets/index-C1E5GTs9.js +2 -0
- package/dashboard/dist/assets/index-C1E5GTs9.js.map +1 -0
- package/dashboard/dist/assets/{index-Cf60K3x9.js → index-C90ZPzXk.js} +2 -2
- package/dashboard/dist/assets/{index-Cf60K3x9.js.map → index-C90ZPzXk.js.map} +1 -1
- package/dashboard/dist/assets/{index-BYZX9tOb.js → index-Cmgrk7PQ.js} +58 -58
- package/dashboard/dist/assets/index-Cmgrk7PQ.js.map +1 -0
- package/dashboard/dist/assets/{index-Ds0JoXS2.js → index-DNytWfSZ.js} +2 -2
- package/dashboard/dist/assets/{index-Ds0JoXS2.js.map → index-DNytWfSZ.js.map} +1 -1
- package/dashboard/dist/assets/index-DX6zxr6t.js +2 -0
- package/dashboard/dist/assets/{index-Cg5nfiYX.js.map → index-DX6zxr6t.js.map} +1 -1
- package/dashboard/dist/assets/index-DeX-ezqf.css +1 -0
- package/dashboard/dist/assets/index-K40Qw1tk.js +2 -0
- package/dashboard/dist/assets/{index-Di12t56M.js.map → index-K40Qw1tk.js.map} +1 -1
- package/dashboard/dist/assets/{index-BUK3qR-1.js → index-lCyNr5Xk.js} +2 -2
- package/dashboard/dist/assets/{index-BUK3qR-1.js.map → index-lCyNr5Xk.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-B_xbczAt.js → mcp-CNE44TSp.js} +2 -2
- package/dashboard/dist/assets/{mcp-B_xbczAt.js.map → mcp-CNE44TSp.js.map} +1 -1
- package/dashboard/dist/assets/mcp-query-RQX0uN-5.js +2 -0
- package/dashboard/dist/assets/mcp-query-RQX0uN-5.js.map +1 -0
- package/dashboard/dist/assets/mcp-runs-0w40bdz-.js +2 -0
- package/dashboard/dist/assets/mcp-runs-0w40bdz-.js.map +1 -0
- package/dashboard/dist/assets/{namespaces-C3WtdO_9.js → namespaces-BbmdXuPp.js} +2 -2
- package/dashboard/dist/assets/{namespaces-C3WtdO_9.js.map → namespaces-BbmdXuPp.js.map} +1 -1
- package/dashboard/dist/assets/{roles-BDAsPpZG.js → roles-DoHYlhWH.js} +2 -2
- package/dashboard/dist/assets/{roles-BDAsPpZG.js.map → roles-DoHYlhWH.js.map} +1 -1
- package/dashboard/dist/assets/{settings-Ife_UwAp.js → settings-BAiJiCHS.js} +2 -2
- package/dashboard/dist/assets/{settings-Ife_UwAp.js.map → settings-BAiJiCHS.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-BquNDHDI.js → tasks-CvroqHtm.js} +2 -2
- package/dashboard/dist/assets/{tasks-BquNDHDI.js.map → tasks-CvroqHtm.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-anv_B2Yy.js → useEventHooks-BHMbzR_y.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-anv_B2Yy.js.map → useEventHooks-BHMbzR_y.js.map} +1 -1
- package/dashboard/dist/assets/useFilterParams-CGRYFw_A.js +2 -0
- package/dashboard/dist/assets/useFilterParams-CGRYFw_A.js.map +1 -0
- package/dashboard/dist/assets/useYamlActivityEvents-D56KV14X.js +2 -0
- package/dashboard/dist/assets/useYamlActivityEvents-D56KV14X.js.map +1 -0
- package/dashboard/dist/assets/{users-CFcxB4v6.js → users-CxIMy_xw.js} +2 -2
- package/dashboard/dist/assets/{users-CFcxB4v6.js.map → users-CxIMy_xw.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-T4r2DSPD.js → vendor-icons-AFGxSeQS.js} +132 -82
- package/dashboard/dist/assets/vendor-icons-AFGxSeQS.js.map +1 -0
- package/dashboard/dist/assets/{workflows-CeRci9z3.js → workflows-yR9yais7.js} +2 -2
- package/dashboard/dist/assets/{workflows-CeRci9z3.js.map → workflows-yR9yais7.js.map} +1 -1
- package/dashboard/dist/assets/yaml-workflows-QVF2MZ0l.js +2 -0
- package/dashboard/dist/assets/yaml-workflows-QVF2MZ0l.js.map +1 -0
- package/dashboard/dist/index.html +3 -3
- package/docs/schema-exchange.md +173 -0
- package/docs/self-test.md +106 -0
- package/package.json +3 -1
- package/dashboard/dist/assets/CredentialsPage-DJablIbs.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-BWbinTM_.js +0 -5
- package/dashboard/dist/assets/McpQueryDetailPage-BWbinTM_.js.map +0 -1
- package/dashboard/dist/assets/McpQueryPage-lV6kfDG5.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-D6gaxH3_.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-D6gaxH3_.js.map +0 -1
- package/dashboard/dist/assets/McpRunsPage-DKvTklh9.js +0 -2
- package/dashboard/dist/assets/McpRunsPage-DKvTklh9.js.map +0 -1
- package/dashboard/dist/assets/OperatorDashboard-C9SSV96T.js +0 -2
- package/dashboard/dist/assets/RolesPage-SMedMuqa.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-CZqGslD6.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-CZqGslD6.js.map +0 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-VjdhnLmO.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-VjdhnLmO.js.map +0 -1
- package/dashboard/dist/assets/escalation-columns-Cyg58nkg.js +0 -2
- package/dashboard/dist/assets/helpers-BCix9c_m.js +0 -2
- package/dashboard/dist/assets/helpers-BCix9c_m.js.map +0 -1
- package/dashboard/dist/assets/index-BYZX9tOb.js.map +0 -1
- package/dashboard/dist/assets/index-Cg5nfiYX.js +0 -2
- package/dashboard/dist/assets/index-DcIKW-cZ.css +0 -1
- package/dashboard/dist/assets/index-Di12t56M.js +0 -2
- package/dashboard/dist/assets/mcp-query-B8-P_QoG.js +0 -2
- package/dashboard/dist/assets/mcp-query-B8-P_QoG.js.map +0 -1
- package/dashboard/dist/assets/mcp-runs-CWeZinoF.js +0 -2
- package/dashboard/dist/assets/mcp-runs-CWeZinoF.js.map +0 -1
- package/dashboard/dist/assets/useFilterParams-BUyLHcx_.js +0 -2
- package/dashboard/dist/assets/useFilterParams-BUyLHcx_.js.map +0 -1
- package/dashboard/dist/assets/useYamlActivityEvents-DN-PTgVx.js +0 -2
- package/dashboard/dist/assets/useYamlActivityEvents-DN-PTgVx.js.map +0 -1
- package/dashboard/dist/assets/vendor-icons-T4r2DSPD.js.map +0 -1
- package/dashboard/dist/assets/yaml-workflows-DLwd2BOX.js +0 -2
- package/dashboard/dist/assets/yaml-workflows-DLwd2BOX.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProcessesListPage-
|
|
2
|
-
var RC=Object.defineProperty;var jC=(i,s,a)=>s in i?RC(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a;var S=(i,s,a)=>jC(i,typeof s!="symbol"?s+"":s,a);import{r as Jw,a as B,g as MC,u as ii,b as Vs,c as Sa,Q as kC,d as VC}from"./vendor-query-DLp59M9_.js";import{r as UC,L as uu,u as Zi,N as sh,a as Gw,b as Wr,O as Xd,c as Qw,d as zC,R as BC}from"./vendor-react-Co3Y8ikm.js";import{R as qC,B as Xw,I as LC,U as HC,a as PC,T as $C,W as IC,A as
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProcessesListPage-bIsd9N_h.js","assets/tasks-CvroqHtm.js","assets/vendor-query-DLp59M9_.js","assets/workflows-yR9yais7.js","assets/useEventHooks-BHMbzR_y.js","assets/useFilterParams-CGRYFw_A.js","assets/vendor-react-Co3Y8ikm.js","assets/DataTable-DkOokbtL.js","assets/EmptyState-C7KIMIbE.js","assets/TimestampCell-MpHZ1hMD.js","assets/StickyPagination-Bz0C18nC.js","assets/FilterBar-C5r3n6YO.js","assets/PageHeader-Cm5HBQF_.js","assets/ListToolbar-BGUajIsW.js","assets/vendor-icons-AFGxSeQS.js","assets/WorkflowPill-CRpZhjGR.js","assets/ProcessDetailPage-Dln8622H.js","assets/settings-BAiJiCHS.js","assets/PageHeaderWithStats-CNmWJFSN.js","assets/StatusBadge-CakDdsCw.js","assets/RolePill-BVUp2bF0.js","assets/UserName-DqsosA4B.js","assets/users-CxIMy_xw.js","assets/McpOverview-B_kJYHea.js","assets/mcp-CNE44TSp.js","assets/mcp-runs-0w40bdz-.js","assets/yaml-workflows-QVF2MZ0l.js","assets/namespaces-BbmdXuPp.js","assets/StatCard-Bs3JbyAz.js","assets/McpRunsPage-BY8C6k78.js","assets/ElapsedCell-DVtHqM-5.js","assets/RowActions-DbUJPfaW.js","assets/McpRunDetailPage-B8c0OszR.js","assets/CopyableId-DKsTR9lK.js","assets/CollapsibleSection-DiFPuWOY.js","assets/EventTable-BYZ5OVdQ.js","assets/SwimlaneTimeline-Cfe-xQRX.js","assets/McpQueryPage-BgAq_bQg.js","assets/mcp-query-RQX0uN-5.js","assets/McpQueryDetailPage-Czsmovqw.js","assets/useYamlActivityEvents-D56KV14X.js","assets/TagInput-ClFhXG-U.js","assets/helpers-rMEcLwKs.js","assets/BotPicker-B8Uvw9Si.js","assets/bots-DPfUpVqI.js","assets/TimeAgo-DgfDZ1pl.js","assets/EscalationsOverview-BMKBlkPx.js","assets/AvailableEscalationsPage-CpBfGV1h.js","assets/roles-DoHYlhWH.js","assets/Modal-E1yRnCeW.js","assets/constants-BHkpVaqx.js","assets/CustomDurationPicker-B-9eW3pm.js","assets/escalation-columns-CDGa9wsD.js","assets/PriorityBadge-HSI4RVhs.js","assets/escalation-RrCDbMC3.js","assets/OperatorDashboard-C8MSTzey.js","assets/index-ABcJHHlN.js","assets/WorkflowsOverview-CIp_lTNl.js","assets/index-BmVCyB6C.js","assets/helpers-ZSKqdkdS.js","assets/WorkflowsDashboard-Ugzbs8mV.js","assets/YamlWorkflowsPage-BICF0fRO.js","assets/useExpandedRows-Cg9iq6Vy.js","assets/TasksListPage-Dkq1Vtbt.js","assets/TaskDetailPage-SuMBdARt.js","assets/WorkflowExecutionPage-CVlg38C3.js","assets/AdminDashboard-Cngijp4Q.js","assets/index-DX6zxr6t.js","assets/TaskQueuePill-lJR1JW_W.js","assets/index-B91h_jZ0.js","assets/ConfirmDeleteModal-CpXG9uyu.js","assets/StepIndicator-Cd_SG_yA.js","assets/index-C90ZPzXk.js","assets/index-DNytWfSZ.js","assets/index-K40Qw1tk.js","assets/RolesPage-kH-Njt25.js","assets/index-BbI2dzhJ.js","assets/index-lCyNr5Xk.js","assets/CredentialsPage-DlS7Kf40.js","assets/index-C1E5GTs9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var RC=Object.defineProperty;var jC=(i,s,a)=>s in i?RC(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a;var S=(i,s,a)=>jC(i,typeof s!="symbol"?s+"":s,a);import{r as Jw,a as B,g as MC,u as ii,b as Vs,c as Sa,Q as kC,d as VC}from"./vendor-query-DLp59M9_.js";import{r as UC,L as uu,u as Zi,N as sh,a as Gw,b as Wr,O as Xd,c as Qw,d as zC,R as BC}from"./vendor-react-Co3Y8ikm.js";import{R as qC,B as Xw,I as LC,U as HC,a as PC,T as $C,W as IC,A as FC,S as YC,P as JC,b as GC,L as Zw,c as QC,d as XC,e as Y0,F as ZC,M as Kw,f as Ww,C as KC,g as WC,E as eT,h as tT,i as zS,X as J0,j as nT,k as sT,l as aT,G as rT,m as iT,n as oT}from"./vendor-icons-AFGxSeQS.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function a(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(u){if(u.ep)return;u.ep=!0;const d=a(u);fetch(u.href,d)}})();var n0={exports:{}},qd={},BS;function lT(){if(BS)return qd;BS=1;/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-dev-runtime.development.js
|
|
5
5
|
*
|
|
@@ -7,12 +7,12 @@ var RC=Object.defineProperty;var jC=(i,s,a)=>s in i?RC(i,s,{enumerable:!0,config
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/return(function(){function i(J){if(J==null)return null;if(typeof J=="function")return J.$$typeof===le?null:J.displayName||J.name||null;if(typeof J=="string")return J;switch(J){case Z:return"Fragment";case te:return"Profiler";case ee:return"StrictMode";case ne:return"Suspense";case oe:return"SuspenseList";case H:return"Activity"}if(typeof J=="object")switch(typeof J.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),J.$$typeof){case
|
|
10
|
+
*/return(function(){function i(J){if(J==null)return null;if(typeof J=="function")return J.$$typeof===le?null:J.displayName||J.name||null;if(typeof J=="string")return J;switch(J){case Z:return"Fragment";case te:return"Profiler";case ee:return"StrictMode";case ne:return"Suspense";case oe:return"SuspenseList";case H:return"Activity"}if(typeof J=="object")switch(typeof J.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),J.$$typeof){case Y:return"Portal";case De:return J.displayName||"Context";case we:return(J._context.displayName||"Context")+".Consumer";case U:var Ne=J.render;return J=J.displayName,J||(J=Ne.displayName||Ne.name||"",J=J!==""?"ForwardRef("+J+")":"ForwardRef"),J;case W:return Ne=J.displayName||null,Ne!==null?Ne:i(J.type)||"Memo";case Q:Ne=J._payload,J=J._init;try{return i(J(Ne))}catch{}}return null}function s(J){return""+J}function a(J){try{s(J);var Ne=!1}catch{Ne=!0}if(Ne){Ne=console;var Xe=Ne.error,Le=typeof Symbol=="function"&&Symbol.toStringTag&&J[Symbol.toStringTag]||J.constructor.name||"Object";return Xe.call(Ne,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Le),s(J)}}function o(J){if(J===Z)return"<>";if(typeof J=="object"&&J!==null&&J.$$typeof===Q)return"<...>";try{var Ne=i(J);return Ne?"<"+Ne+">":"<...>"}catch{return"<...>"}}function u(){var J=ie.A;return J===null?null:J.getOwner()}function d(){return Error("react-stack-top-frame")}function p(J){if(ve.call(J,"key")){var Ne=Object.getOwnPropertyDescriptor(J,"key").get;if(Ne&&Ne.isReactWarning)return!1}return J.key!==void 0}function m(J,Ne){function Xe(){ae||(ae=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ne))}Xe.isReactWarning=!0,Object.defineProperty(J,"key",{get:Xe,configurable:!0})}function g(){var J=i(this.type);return pe[J]||(pe[J]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),J=this.props.ref,J!==void 0?J:null}function x(J,Ne,Xe,Le,Yt,wa){var We=Xe.ref;return J={$$typeof:q,type:J,key:Ne,props:Xe,_owner:Le},(We!==void 0?We:null)!==null?Object.defineProperty(J,"ref",{enumerable:!1,get:g}):Object.defineProperty(J,"ref",{enumerable:!1,value:null}),J._store={},Object.defineProperty(J._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(J,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(J,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Yt}),Object.defineProperty(J,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:wa}),Object.freeze&&(Object.freeze(J.props),Object.freeze(J)),J}function _(J,Ne,Xe,Le,Yt,wa){var We=Ne.children;if(We!==void 0)if(Le)if(Qe(We)){for(Le=0;Le<We.length;Le++)w(We[Le]);Object.freeze&&Object.freeze(We)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(We);if(ve.call(Ne,"key")){We=i(J);var Rt=Object.keys(Ne).filter(function(un){return un!=="key"});Le=0<Rt.length?"{key: someKey, "+Rt.join(": ..., ")+": ...}":"{key: someKey}",Te[We+Le]||(Rt=0<Rt.length?"{"+Rt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
11
11
|
let props = %s;
|
|
12
12
|
<%s {...props} />
|
|
13
13
|
React keys must be passed directly to JSX without using spread:
|
|
14
14
|
let props = %s;
|
|
15
|
-
<%s key={someKey} {...props} />`,Le,We,Rt,We),Te[We+Le]=!0)}if(We=null,
|
|
15
|
+
<%s key={someKey} {...props} />`,Le,We,Rt,We),Te[We+Le]=!0)}if(We=null,Xe!==void 0&&(a(Xe),We=""+Xe),p(Ne)&&(a(Ne.key),We=""+Ne.key),"key"in Ne){Xe={};for(var Me in Ne)Me!=="key"&&(Xe[Me]=Ne[Me])}else Xe=Ne;return We&&m(Xe,typeof J=="function"?J.displayName||J.name||"Unknown":J),x(J,We,Xe,u(),Yt,wa)}function w(J){D(J)?J._store&&(J._store.validated=1):typeof J=="object"&&J!==null&&J.$$typeof===Q&&(J._payload.status==="fulfilled"?D(J._payload.value)&&J._payload.value._store&&(J._payload.value._store.validated=1):J._store&&(J._store.validated=1))}function D(J){return typeof J=="object"&&J!==null&&J.$$typeof===q}var z=Jw(),q=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),we=Symbol.for("react.consumer"),De=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),ie=z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=Object.prototype.hasOwnProperty,Qe=Array.isArray,nt=console.createTask?console.createTask:function(){return null};z={react_stack_bottom_frame:function(J){return J()}};var ae,pe={},xe=z.react_stack_bottom_frame.bind(z,d)(),je=nt(o(d)),Te={};qd.Fragment=Z,qd.jsxDEV=function(J,Ne,Xe,Le){var Yt=1e4>ie.recentlyCreatedOwnerStacks++;return _(J,Ne,Xe,Le,Yt?Error("react-stack-top-frame"):xe,Yt?nt(o(J)):je)}})(),qd}var qS;function cT(){return qS||(qS=1,n0.exports=lT()),n0.exports}var b=cT(),s0={exports:{}},tu={},a0={exports:{}},r0={},LS;function uT(){return LS||(LS=1,(function(i){/**
|
|
16
16
|
* @license React
|
|
17
17
|
* scheduler.development.js
|
|
18
18
|
*
|
|
@@ -20,7 +20,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/(function(){function s(){if(U=!1,Q){var ae=i.unstable_now();ie=ae;var pe=!0;try{e:{we=!1,De&&(De=!1,oe(H),H=-1),te=!0;var xe=ee;try{t:{for(p(ae),Z=o(z);Z!==null&&!(Z.expirationTime>ae&&g());){var je=Z.callback;if(typeof je=="function"){Z.callback=null,ee=Z.priorityLevel;var Te=je(Z.expirationTime<=ae);if(ae=i.unstable_now(),typeof Te=="function"){Z.callback=Te,p(ae),pe=!0;break t}Z===o(z)&&u(z),p(ae)}else u(z);Z=o(z)}if(Z!==null)pe=!0;else{var J=o(q);J!==null&&x(m,J.startTime-ae),pe=!1}}break e}finally{Z=null,ee=xe,te=!1}pe=void 0}}finally{pe?ve():Q=!1}}}function a(ae,pe){var xe=ae.length;ae.push(pe);e:for(;0<xe;){var je=xe-1>>>1,Te=ae[je];if(0<d(Te,pe))ae[je]=pe,ae[xe]=Te,xe=je;else break e}}function o(ae){return ae.length===0?null:ae[0]}function u(ae){if(ae.length===0)return null;var pe=ae[0],xe=ae.pop();if(xe!==pe){ae[0]=xe;e:for(var je=0,Te=ae.length,J=Te>>>1;je<J;){var Ne=2*(je+1)-1,
|
|
23
|
+
*/(function(){function s(){if(U=!1,Q){var ae=i.unstable_now();ie=ae;var pe=!0;try{e:{we=!1,De&&(De=!1,oe(H),H=-1),te=!0;var xe=ee;try{t:{for(p(ae),Z=o(z);Z!==null&&!(Z.expirationTime>ae&&g());){var je=Z.callback;if(typeof je=="function"){Z.callback=null,ee=Z.priorityLevel;var Te=je(Z.expirationTime<=ae);if(ae=i.unstable_now(),typeof Te=="function"){Z.callback=Te,p(ae),pe=!0;break t}Z===o(z)&&u(z),p(ae)}else u(z);Z=o(z)}if(Z!==null)pe=!0;else{var J=o(q);J!==null&&x(m,J.startTime-ae),pe=!1}}break e}finally{Z=null,ee=xe,te=!1}pe=void 0}}finally{pe?ve():Q=!1}}}function a(ae,pe){var xe=ae.length;ae.push(pe);e:for(;0<xe;){var je=xe-1>>>1,Te=ae[je];if(0<d(Te,pe))ae[je]=pe,ae[xe]=Te,xe=je;else break e}}function o(ae){return ae.length===0?null:ae[0]}function u(ae){if(ae.length===0)return null;var pe=ae[0],xe=ae.pop();if(xe!==pe){ae[0]=xe;e:for(var je=0,Te=ae.length,J=Te>>>1;je<J;){var Ne=2*(je+1)-1,Xe=ae[Ne],Le=Ne+1,Yt=ae[Le];if(0>d(Xe,xe))Le<Te&&0>d(Yt,Xe)?(ae[je]=Yt,ae[Le]=xe,je=Le):(ae[je]=Xe,ae[Ne]=xe,je=Ne);else if(Le<Te&&0>d(Yt,xe))ae[je]=Yt,ae[Le]=xe,je=Le;else break e}}return pe}function d(ae,pe){var xe=ae.sortIndex-pe.sortIndex;return xe!==0?xe:ae.id-pe.id}function p(ae){for(var pe=o(q);pe!==null;){if(pe.callback===null)u(q);else if(pe.startTime<=ae)u(q),pe.sortIndex=pe.expirationTime,a(z,pe);else break;pe=o(q)}}function m(ae){if(De=!1,p(ae),!we)if(o(z)!==null)we=!0,Q||(Q=!0,ve());else{var pe=o(q);pe!==null&&x(m,pe.startTime-ae)}}function g(){return U?!0:!(i.unstable_now()-ie<le)}function x(ae,pe){H=ne(function(){ae(i.unstable_now())},pe)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var _=performance;i.unstable_now=function(){return _.now()}}else{var w=Date,D=w.now();i.unstable_now=function(){return w.now()-D}}var z=[],q=[],Y=1,Z=null,ee=3,te=!1,we=!1,De=!1,U=!1,ne=typeof setTimeout=="function"?setTimeout:null,oe=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null,Q=!1,H=-1,le=5,ie=-1;if(typeof W=="function")var ve=function(){W(s)};else if(typeof MessageChannel<"u"){var Qe=new MessageChannel,nt=Qe.port2;Qe.port1.onmessage=s,ve=function(){nt.postMessage(null)}}else ve=function(){ne(s,0)};i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(ae){ae.callback=null},i.unstable_forceFrameRate=function(ae){0>ae||125<ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<ae?Math.floor(1e3/ae):5},i.unstable_getCurrentPriorityLevel=function(){return ee},i.unstable_next=function(ae){switch(ee){case 1:case 2:case 3:var pe=3;break;default:pe=ee}var xe=ee;ee=pe;try{return ae()}finally{ee=xe}},i.unstable_requestPaint=function(){U=!0},i.unstable_runWithPriority=function(ae,pe){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var xe=ee;ee=ae;try{return pe()}finally{ee=xe}},i.unstable_scheduleCallback=function(ae,pe,xe){var je=i.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?je+xe:je):xe=je,ae){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=xe+Te,ae={id:Y++,callback:pe,priorityLevel:ae,startTime:xe,expirationTime:Te,sortIndex:-1},xe>je?(ae.sortIndex=xe,a(q,ae),o(z)===null&&ae===o(q)&&(De?(oe(H),H=-1):De=!0,x(m,xe-je))):(ae.sortIndex=Te,a(z,ae),we||te||(we=!0,Q||(Q=!0,ve()))),ae},i.unstable_shouldYield=g,i.unstable_wrapCallback=function(ae){var pe=ee;return function(){var xe=ee;ee=pe;try{return ae.apply(this,arguments)}finally{ee=xe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(r0)),r0}var HS;function fT(){return HS||(HS=1,a0.exports=uT()),a0.exports}var PS;function dT(){if(PS)return tu;PS=1;/**
|
|
24
24
|
* @license React
|
|
25
25
|
* react-dom-client.development.js
|
|
26
26
|
*
|
|
@@ -28,23 +28,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the MIT license found in the
|
|
30
30
|
* LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/return(function(){function i(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function s(e,t,n,r){if(n>=t.length)return r;var l=t[n],c=Jt(e)?e.slice():Pe({},e);return c[l]=s(e[l],t,n+1,r),c}function a(e,t,n){if(t.length!==n.length)console.warn("copyWithRename() expects paths of the same length");else{for(var r=0;r<n.length-1;r++)if(t[r]!==n[r]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return o(e,t,n,0)}}function o(e,t,n,r){var l=t[r],c=Jt(e)?e.slice():Pe({},e);return r+1===t.length?(c[n[r]]=c[l],Jt(c)?c.splice(l,1):delete c[l]):c[l]=o(e[l],t,n,r+1),c}function u(e,t,n){var r=t[n],l=Jt(e)?e.slice():Pe({},e);return n+1===t.length?(Jt(l)?l.splice(r,1):delete l[r],l):(l[r]=u(e[r],t,n+1),l)}function d(){return!1}function p(){return null}function m(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function g(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function x(){}function _(){}function w(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")}function D(e,t,n,r){return new g_(e,t,n,r)}function z(e,t){e.context===Or&&(
|
|
31
|
+
*/return(function(){function i(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function s(e,t,n,r){if(n>=t.length)return r;var l=t[n],c=Jt(e)?e.slice():Pe({},e);return c[l]=s(e[l],t,n+1,r),c}function a(e,t,n){if(t.length!==n.length)console.warn("copyWithRename() expects paths of the same length");else{for(var r=0;r<n.length-1;r++)if(t[r]!==n[r]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return o(e,t,n,0)}}function o(e,t,n,r){var l=t[r],c=Jt(e)?e.slice():Pe({},e);return r+1===t.length?(c[n[r]]=c[l],Jt(c)?c.splice(l,1):delete c[l]):c[l]=o(e[l],t,n,r+1),c}function u(e,t,n){var r=t[n],l=Jt(e)?e.slice():Pe({},e);return n+1===t.length?(Jt(l)?l.splice(r,1):delete l[r],l):(l[r]=u(e[r],t,n+1),l)}function d(){return!1}function p(){return null}function m(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function g(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function x(){}function _(){}function w(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")}function D(e,t,n,r){return new g_(e,t,n,r)}function z(e,t){e.context===Or&&(Np(e.current,2,t,e,null,null),go())}function q(e,t){if(is!==null){var n=t.staleFamilies;t=t.updatedFamilies,Xl(),$y(e.current,t,n),go()}}function Y(e){is=e}function Z(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ee(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function te(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function we(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function De(e){if(ee(e)!==e)throw Error("Unable to find node on an unmounted component.")}function U(e){var t=e.alternate;if(!t){if(t=ee(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var c=l.alternate;if(c===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===c.child){for(c=l.child;c;){if(c===n)return De(l),e;if(c===r)return De(l),t;c=c.sibling}throw Error("Unable to find node on an unmounted component.")}if(n.return!==r.return)n=l,r=c;else{for(var f=!1,h=l.child;h;){if(h===n){f=!0,n=l,r=c;break}if(h===r){f=!0,r=l,n=c;break}h=h.sibling}if(!f){for(h=c.child;h;){if(h===n){f=!0,n=c,r=l;break}if(h===r){f=!0,r=c,n=l;break}h=h.sibling}if(!f)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(n.alternate!==r)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(n.tag!==3)throw Error("Unable to find node on an unmounted component.");return n.stateNode.current===n?e:t}function ne(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ne(e),t!==null)return t;e=e.sibling}return null}function oe(e){return e===null||typeof e!="object"?null:(e=X1&&e[X1]||e["@@iterator"],typeof e=="function"?e:null)}function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===LA?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _o:return"Fragment";case Cp:return"Profiler";case Mf:return"StrictMode";case Op:return"Suspense";case Rp:return"SuspenseList";case jp:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Eo:return"Portal";case la:return e.displayName||"Context";case Tp:return(e._context.displayName||"Context")+".Consumer";case ic:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kf:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case $n:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}function Q(e){return typeof e.tag=="number"?H(e):typeof e.name=="string"?e.name:null}function H(e){var t=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(t._context.displayName||"Context")+".Consumer";case 10:return t.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===Mf?"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 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;break;case 29:if(t=e._debugInfo,t!=null){for(var n=t.length-1;0<=n;n--)if(typeof t[n].name=="string")return t[n].name}if(e.return!==null)return H(e.return)}return null}function le(e){return{current:e}}function ie(e,t){0>za?console.error("Unexpected pop."):(t!==kp[za]&&console.error("Unexpected Fiber popped."),e.current=Mp[za],Mp[za]=null,kp[za]=null,za--)}function ve(e,t,n){za++,Mp[za]=e.current,kp[za]=n,e.current=t}function Qe(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function nt(e,t){ve(Er,t,e),ve(oc,e,e),ve(wr,null,e);var n=t.nodeType;switch(n){case 9:case 11:n=n===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?x1(t):Ka;break;default:if(n=t.tagName,t=t.namespaceURI)t=x1(t),t=N1(t,n);else switch(n){case"svg":t=rl;break;case"math":t=jd;break;default:t=Ka}}n=n.toLowerCase(),n=my(null,n),n={context:t,ancestorInfo:n},ie(wr,e),ve(wr,n,e)}function ae(e){ie(wr,e),ie(oc,e),ie(Er,e)}function pe(){return Qe(wr.current)}function xe(e){e.memoizedState!==null&&ve(Vf,e,e);var t=Qe(wr.current),n=e.type,r=N1(t.context,n);n=my(t.ancestorInfo,n),r={context:r,ancestorInfo:n},t!==r&&(ve(oc,e,e),ve(wr,r,e))}function je(e){oc.current===e&&(ie(wr,e),ie(oc,e)),Vf.current===e&&(ie(Vf,e),Kc._currentValue=Gi)}function Te(){}function J(){if(lc===0){Z1=console.log,K1=console.info,W1=console.warn,ex=console.error,tx=console.group,nx=console.groupCollapsed,sx=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}lc++}function Ne(){if(lc--,lc===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Pe({},e,{value:Z1}),info:Pe({},e,{value:K1}),warn:Pe({},e,{value:W1}),error:Pe({},e,{value:ex}),group:Pe({},e,{value:tx}),groupCollapsed:Pe({},e,{value:nx}),groupEnd:Pe({},e,{value:sx})})}0>lc&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Xe(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
|
|
32
32
|
`)&&(e=e.slice(29)),t=e.indexOf(`
|
|
33
33
|
`),t!==-1&&(e=e.slice(t+1)),t=e.indexOf("react_stack_bottom_frame"),t!==-1&&(t=e.lastIndexOf(`
|
|
34
|
-
`,t)),t!==-1)e=e.slice(0,t);else return"";return e}function Le(e){if(
|
|
34
|
+
`,t)),t!==-1)e=e.slice(0,t);else return"";return e}function Le(e){if(Vp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vp=t&&t[1]||"",ax=-1<n.stack.indexOf(`
|
|
35
35
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
36
|
-
`+
|
|
36
|
+
`+Vp+e+ax}function Yt(e,t){if(!e||Up)return"";var n=zp.get(e);if(n!==void 0)return n;Up=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var r=null;r=F.H,F.H=null,J();try{var l={DetermineComponentFrameRoot:function(){try{if(t){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(ce){var P=ce}Reflect.construct(e,[],O)}else{try{O.call()}catch(ce){P=ce}e.call(O.prototype)}}else{try{throw Error()}catch(ce){P=ce}(O=e())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(ce){if(ce&&P&&typeof ce.stack=="string")return[ce.stack,P.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),h=f[0],y=f[1];if(h&&y){var v=h.split(`
|
|
37
37
|
`),k=y.split(`
|
|
38
38
|
`);for(f=c=0;c<v.length&&!v[c].includes("DetermineComponentFrameRoot");)c++;for(;f<k.length&&!k[f].includes("DetermineComponentFrameRoot");)f++;if(c===v.length||f===k.length)for(c=v.length-1,f=k.length-1;1<=c&&0<=f&&v[c]!==k[f];)f--;for(;1<=c&&0<=f;c--,f--)if(v[c]!==k[f]){if(c!==1||f!==1)do if(c--,f--,0>f||v[c]!==k[f]){var V=`
|
|
39
|
-
`+v[c].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),typeof e=="function"&&
|
|
39
|
+
`+v[c].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),typeof e=="function"&&zp.set(e,V),V}while(1<=c&&0<=f);break}}}finally{Up=!1,F.H=r,Ne(),Error.prepareStackTrace=n}return v=(v=e?e.displayName||e.name:"")?Le(v):"",typeof e=="function"&&zp.set(e,v),v}function wa(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Yt(e.type,!1);case 11:return Yt(e.type.render,!1);case 1:return Yt(e.type,!0);case 31:return Le("Activity");default:return""}}function We(e){try{var t="",n=null;do{t+=wa(e,n);var r=e._debugInfo;if(r)for(var l=r.length-1;0<=l;l--){var c=r[l];if(typeof c.name=="string"){var f=t;e:{var h=c.name,y=c.env,v=c.debugLocation;if(v!=null){var k=Xe(v),V=k.lastIndexOf(`
|
|
40
40
|
`),O=V===-1?k:k.slice(V+1);if(O.indexOf(h)!==-1){var P=`
|
|
41
41
|
`+O;break e}}P=Le(h+(y?" ["+y+"]":""))}t=f+P}}n=e,e=e.return}while(e);return t}catch(ce){return`
|
|
42
42
|
Error generating stack: `+ce.message+`
|
|
43
|
-
`+ce.stack}}function Rt(e){return(e=e?e.displayName||e.name:"")?Le(e):""}function Me(){if(In===null)return null;var e=In._debugOwner;return e!=null?Q(e):null}function un(){if(In===null)return"";var e=In;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=Le(e.type);break;case 13:t+=Le("Suspense");break;case 19:t+=Le("SuspenseList");break;case 31:t+=Le("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=Rt(e.type));break;case 11:e._debugOwner||t!==""||(t+=Rt(e.type.render))}for(;e;)if(typeof e.tag=="number"){var n=e;e=n._debugOwner;var r=n._debugStack;if(e&&r){var l=
|
|
43
|
+
`+ce.stack}}function Rt(e){return(e=e?e.displayName||e.name:"")?Le(e):""}function Me(){if(In===null)return null;var e=In._debugOwner;return e!=null?Q(e):null}function un(){if(In===null)return"";var e=In;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=Le(e.type);break;case 13:t+=Le("Suspense");break;case 19:t+=Le("SuspenseList");break;case 31:t+=Le("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=Rt(e.type));break;case 11:e._debugOwner||t!==""||(t+=Rt(e.type.render))}for(;e;)if(typeof e.tag=="number"){var n=e;e=n._debugOwner;var r=n._debugStack;if(e&&r){var l=Xe(r);l!==""&&(t+=`
|
|
44
44
|
`+l)}}else if(e.debugStack!=null){var c=e.debugStack;(e=e.owner)&&c&&(t+=`
|
|
45
|
-
`+
|
|
45
|
+
`+Xe(c))}else break;var f=t}catch(h){f=`
|
|
46
46
|
Error generating stack: `+h.message+`
|
|
47
|
-
`+h.stack}return f}function be(e,t,n,r,l,c,f){var h=In;eo(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,n,r,l,c,f)):t(n,r,l,c,f)}finally{eo(h)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function eo(e){Y.getCurrentStack=e===null?null:un,ca=!1,In=e}function Ea(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function _a(e){try{return rr(e),!1}catch{return!0}}function rr(e){return""+e}function nt(e,t){if(_a(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,Ea(e)),rr(e)}function to(e,t){if(_a(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,Ea(e)),rr(e)}function xl(e){if(_a(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Ea(e)),rr(e)}function Sh(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{Do=t.inject(e),hn=t}catch(n){console.error("React instrumentation encountered an error: %o.",n)}return!!t.checkDCE}function pt(e){if(typeof JA=="function"&&GA(e),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(Do,e)}catch(t){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",t))}}function oi(e){return e>>>=0,e===0?32:31-(QA(e)/XA|0)|0}function Us(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function Aa(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var h=r&134217727;return h!==0?(r=h&~c,r!==0?l=Us(r):(f&=h,f!==0?l=Us(f):n||(n=h&~e,n!==0&&(l=Us(n))))):(h=r&~c,h!==0?l=Us(h):f!==0?l=Us(f):n||(n=r&~e,n!==0&&(l=Us(n)))),l===0?0:t!==0&&t!==l&&(t&c)===0&&(c=l&-l,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:l}function fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Nl(){var e=Bf;return Bf<<=1,(Bf&62914560)===0&&(Bf=4194304),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eh(e,t,n,r,l,c){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,y=e.expirationTimes,v=e.hiddenUpdates;for(n=f&~n;0<n;){var k=31-yn(n),V=1<<k;h[k]=0,y[k]=-1;var O=v[k];if(O!==null)for(v[k]=null,k=0;k<O.length;k++){var P=O[k];P!==null&&(P.lane&=-536870913)}n&=~V}r!==0&&Eu(e,r,0),c!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=c&~(f&~t))}function Eu(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-yn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function _u(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yn(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}function wl(e,t){var n=t&-t;return n=(n&42)!==0?1:El(n),(n&(e.suspendedLanes|t))!==0?0:n}function El(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function zs(e,t,n){if(fa)for(e=e.pendingUpdatersLaneMap;0<n;){var r=31-yn(n),l=1<<r;e[r].add(t),n&=~l}}function ci(e,t){if(fa)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;0<t;){var l=31-yn(t);e=1<<l,l=n[l],0<l.size&&(l.forEach(function(c){var f=c.alternate;f!==null&&r.has(f)||r.add(c)}),l.clear()),t&=~e}}function no(e){return e&=-e,ss<e?da<e?(e&134217727)!==0?Ba:qf:da:ss}function so(){var e=at.p;return e!==0?e:(e=window.event,e===void 0?Ba:$1(e.type))}function ao(e,t){var n=at.p;try{return at.p=e,t()}finally{at.p=n}}function ir(e){delete e[ln],delete e[gn],delete e[Hp],delete e[ZA],delete e[KA]}function Bs(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ar]||n[ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=T1(e);e!==null;){if(n=e[ln])return n;e=T1(e)}return t}e=n,n=e.parentNode}return null}function Un(e){if(e=e[ln]||e[Ar]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Da(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function qs(e){var t=e[rx];return t||(t=e[rx]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[cc]=!0}function Ca(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){_i[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),_i[e]=t;var n=e.toLowerCase();for(Pp[n]=e,e==="onDoubleClick"&&(Pp.ondblclick=e),e=0;e<t.length;e++)ix.add(t[e])}function Hs(e,t){WA[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function or(e){return Es.call(lx,e)?!0:Es.call(ox,e)?!1:eD.test(e)?lx[e]=!0:(ox[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function lr(e,t,n){if(or(t)){if(!e.hasAttribute(t)){switch(typeof n){case"symbol":case"object":return n;case"function":return n;case"boolean":if(n===!1)return n}return n===void 0?void 0:null}return e=e.getAttribute(t),e===""&&n===!0?!0:(nt(n,t),e===""+n?n:e)}}function vs(e,t,n){if(or(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}nt(n,t),e.setAttribute(t,""+n)}}function Ps(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}nt(n,t),e.setAttribute(t,""+n)}}function Cn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}nt(r,n),e.setAttributeNS(t,n,""+r)}}function Xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return xl(e),e;default:return""}}function cr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _l(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(f){xl(f),n=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(f){xl(f),n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ro(e){if(!e._valueTracker){var t=cr(e)?"checked":"value";e._valueTracker=_l(e,t,""+e[t])}}function Au(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cr(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function io(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 Ct(e){return e.replace(tD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function $s(e,t){t.checked===void 0||t.defaultChecked===void 0||ux||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Me()||"A component",t.type),ux=!0),t.value===void 0||t.defaultValue===void 0||cx||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Me()||"A component",t.type),cx=!0)}function Is(e,t,n,r,l,c,f,h){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?(nt(f,"type"),e.type=f):e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Xt(t)):e.value!==""+Xt(t)&&(e.value=""+Xt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?ui(e,f,Xt(t)):n!=null?ui(e,f,Xt(n)):r!=null&&e.removeAttribute("value"),l==null&&c!=null&&(e.defaultChecked=!!c),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?(nt(h,"name"),e.name=""+Xt(h)):e.removeAttribute("name")}function oo(e,t,n,r,l,c,f,h){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(nt(c,"type"),e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ro(e);return}n=n!=null?""+Xt(n):"",t=t!=null?""+Xt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}r=r??l,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=h?e.checked:!!r,e.defaultChecked=!!r,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(nt(f,"name"),e.name=f),ro(e)}function ui(e,t,n){t==="number"&&io(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Al(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?Ap.Children.forEach(t.children,function(n){n==null||typeof n=="string"||typeof n=="number"||typeof n=="bigint"||dx||(dx=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||hx||(hx=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||fx||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),fx=!0)}function Du(){var e=Me();return e?`
|
|
47
|
+
`+h.stack}return f}function be(e,t,n,r,l,c,f){var h=In;eo(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,n,r,l,c,f)):t(n,r,l,c,f)}finally{eo(h)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function eo(e){F.getCurrentStack=e===null?null:un,ca=!1,In=e}function Ea(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function _a(e){try{return rr(e),!1}catch{return!0}}function rr(e){return""+e}function st(e,t){if(_a(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,Ea(e)),rr(e)}function to(e,t){if(_a(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,Ea(e)),rr(e)}function xl(e){if(_a(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",Ea(e)),rr(e)}function wh(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{Do=t.inject(e),hn=t}catch(n){console.error("React instrumentation encountered an error: %o.",n)}return!!t.checkDCE}function pt(e){if(typeof JA=="function"&&GA(e),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(Do,e)}catch(t){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",t))}}function oi(e){return e>>>=0,e===0?32:31-(QA(e)/XA|0)|0}function Us(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function Aa(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var h=r&134217727;return h!==0?(r=h&~c,r!==0?l=Us(r):(f&=h,f!==0?l=Us(f):n||(n=h&~e,n!==0&&(l=Us(n))))):(h=r&~c,h!==0?l=Us(h):f!==0?l=Us(f):n||(n=r&~e,n!==0&&(l=Us(n)))),l===0?0:t!==0&&t!==l&&(t&c)===0&&(c=l&-l,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:l}function fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Eh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function Nl(){var e=Bf;return Bf<<=1,(Bf&62914560)===0&&(Bf=4194304),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _h(e,t,n,r,l,c){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,y=e.expirationTimes,v=e.hiddenUpdates;for(n=f&~n;0<n;){var k=31-yn(n),V=1<<k;h[k]=0,y[k]=-1;var O=v[k];if(O!==null)for(v[k]=null,k=0;k<O.length;k++){var P=O[k];P!==null&&(P.lane&=-536870913)}n&=~V}r!==0&&Eu(e,r,0),c!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=c&~(f&~t))}function Eu(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-yn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function _u(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yn(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}function wl(e,t){var n=t&-t;return n=(n&42)!==0?1:El(n),(n&(e.suspendedLanes|t))!==0?0:n}function El(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function zs(e,t,n){if(fa)for(e=e.pendingUpdatersLaneMap;0<n;){var r=31-yn(n),l=1<<r;e[r].add(t),n&=~l}}function ci(e,t){if(fa)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;0<t;){var l=31-yn(t);e=1<<l,l=n[l],0<l.size&&(l.forEach(function(c){var f=c.alternate;f!==null&&r.has(f)||r.add(c)}),l.clear()),t&=~e}}function no(e){return e&=-e,ss<e?da<e?(e&134217727)!==0?Ba:qf:da:ss}function so(){var e=rt.p;return e!==0?e:(e=window.event,e===void 0?Ba:$1(e.type))}function ao(e,t){var n=rt.p;try{return rt.p=e,t()}finally{rt.p=n}}function ir(e){delete e[ln],delete e[gn],delete e[Pp],delete e[ZA],delete e[KA]}function Bs(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ar]||n[ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=T1(e);e!==null;){if(n=e[ln])return n;e=T1(e)}return t}e=n,n=e.parentNode}return null}function Un(e){if(e=e[ln]||e[Ar]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Da(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function qs(e){var t=e[rx];return t||(t=e[rx]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[cc]=!0}function Ca(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){_i[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),_i[e]=t;var n=e.toLowerCase();for($p[n]=e,e==="onDoubleClick"&&($p.ondblclick=e),e=0;e<t.length;e++)ix.add(t[e])}function Hs(e,t){WA[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function or(e){return Es.call(lx,e)?!0:Es.call(ox,e)?!1:eD.test(e)?lx[e]=!0:(ox[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function lr(e,t,n){if(or(t)){if(!e.hasAttribute(t)){switch(typeof n){case"symbol":case"object":return n;case"function":return n;case"boolean":if(n===!1)return n}return n===void 0?void 0:null}return e=e.getAttribute(t),e===""&&n===!0?!0:(st(n,t),e===""+n?n:e)}}function vs(e,t,n){if(or(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}st(n,t),e.setAttribute(t,""+n)}}function Ps(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}st(n,t),e.setAttribute(t,""+n)}}function Cn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}st(r,n),e.setAttributeNS(t,n,""+r)}}function Xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return xl(e),e;default:return""}}function cr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _l(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(f){xl(f),n=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(f){xl(f),n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ro(e){if(!e._valueTracker){var t=cr(e)?"checked":"value";e._valueTracker=_l(e,t,""+e[t])}}function Au(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cr(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function io(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 Ct(e){return e.replace(tD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function $s(e,t){t.checked===void 0||t.defaultChecked===void 0||ux||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Me()||"A component",t.type),ux=!0),t.value===void 0||t.defaultValue===void 0||cx||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",Me()||"A component",t.type),cx=!0)}function Is(e,t,n,r,l,c,f,h){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?(st(f,"type"),e.type=f):e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Xt(t)):e.value!==""+Xt(t)&&(e.value=""+Xt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?ui(e,f,Xt(t)):n!=null?ui(e,f,Xt(n)):r!=null&&e.removeAttribute("value"),l==null&&c!=null&&(e.defaultChecked=!!c),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?(st(h,"name"),e.name=""+Xt(h)):e.removeAttribute("name")}function oo(e,t,n,r,l,c,f,h){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(st(c,"type"),e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ro(e);return}n=n!=null?""+Xt(n):"",t=t!=null?""+Xt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}r=r??l,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=h?e.checked:!!r,e.defaultChecked=!!r,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(st(f,"name"),e.name=f),ro(e)}function ui(e,t,n){t==="number"&&io(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Al(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?Dp.Children.forEach(t.children,function(n){n==null||typeof n=="string"||typeof n=="number"||typeof n=="bigint"||dx||(dx=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||hx||(hx=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||fx||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),fx=!0)}function Du(){var e=Me();return e?`
|
|
48
48
|
|
|
49
49
|
Check the render method of \``+e+"`.":""}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Xt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Dl(e,t){for(e=0;e<px.length;e++){var n=px[e];if(t[n]!=null){var r=Jt(t[n]);t.multiple&&!r?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Du()):!t.multiple&&r&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Du())}}t.value===void 0||t.defaultValue===void 0||mx||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),mx=!0)}function N(e,t){t.value===void 0||t.defaultValue===void 0||bx||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",Me()||"A component"),bx=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function A(e,t,n){if(t!=null&&(t=""+Xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Xt(n):""}function E(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Jt(r)){if(1<r.length)throw Error("<textarea> can only have at most one child.");r=r[0]}n=r}n==null&&(n=""),t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),ro(e)}function C(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?C(e.children[0],t):e}function M(e){return" "+" ".repeat(e)}function L(e){return"+ "+" ".repeat(e)}function X(e){return"- "+" ".repeat(e)}function se(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function $(e,t){return yx.test(e)?(e=JSON.stringify(e),e.length>t-2?8>t?'{"..."}':"{"+e.slice(0,t-7)+'..."}':"{"+e+"}"):e.length>t?5>t?'{"..."}':e.slice(0,t-3)+"...":e}function K(e,t,n){var r=120-2*n;if(t===null)return L(n)+$(e,r)+`
|
|
50
50
|
`;if(typeof t=="string"){for(var l=0;l<t.length&&l<e.length&&t.charCodeAt(l)===e.charCodeAt(l);l++);return l>r-8&&10<l&&(e="..."+e.slice(l-8),t="..."+t.slice(l-8)),L(n)+$(e,r)+`
|
|
@@ -70,21 +70,21 @@ Check the render method of \``+e+"`.":""}function Ut(e,t,n,r){if(e=e.options,t){
|
|
|
70
70
|
`:M(r)+"<"+e+`
|
|
71
71
|
`+l+M(r)+`>
|
|
72
72
|
`}return e=n.children,t=t.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(c="",(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(c=""+t),l+=K(c,""+e,r+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(l=e==null?l+K(""+t,null,r+1):l+K(""+t,void 0,r+1)),l}function dy(e,t){var n=se(e);if(n===null){for(n="",e=e.child;e;)n+=dy(e,t),e=e.sibling;return n}return M(t)+"<"+n+`>
|
|
73
|
-
`}function
|
|
74
|
-
`+
|
|
73
|
+
`}function Ah(e,t){var n=C(e,t);if(n!==e&&(e.children.length!==1||e.children[0]!==n))return M(t)+`...
|
|
74
|
+
`+Ah(n,t+1);n="";var r=e.fiber._debugInfo;if(r)for(var l=0;l<r.length;l++){var c=r[l].name;typeof c=="string"&&(n+=M(t)+"<"+c+`>
|
|
75
75
|
`,t++)}if(r="",l=e.fiber.pendingProps,e.fiber.tag===6)r=K(l,e.serverProps,t),t++;else if(c=se(e.fiber),c!==null)if(e.serverProps===void 0){r=t;var f=120-2*r-c.length-2,h="";for(v in l)if(l.hasOwnProperty(v)&&v!=="children"){var y=it(l[v],15);if(f-=v.length+y.length+2,0>f){h+=" ...";break}h+=" "+v+"="+y}r=M(r)+"<"+c+h+`>
|
|
76
|
-
`,t++}else e.serverProps===null?(r=pn(c,l,L(t)),t++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(r=ZE(c,l,e.serverProps,t),t++);var v="";for(l=e.fiber.child,c=0;l&&c<e.children.length;)f=e.children[c],f.fiber===l?(v+=
|
|
76
|
+
`,t++}else e.serverProps===null?(r=pn(c,l,L(t)),t++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(r=ZE(c,l,e.serverProps,t),t++);var v="";for(l=e.fiber.child,c=0;l&&c<e.children.length;)f=e.children[c],f.fiber===l?(v+=Ah(f,t),c++):v+=dy(l,t),l=l.sibling;for(l&&0<e.children.length&&(v+=M(t)+`...
|
|
77
77
|
`),l=e.serverTail,e.serverProps===null&&t--,e=0;e<l.length;e++)c=l[e],v=typeof c=="string"?v+(X(t)+$(c,120-2*t)+`
|
|
78
|
-
`):v+pn(c.type,c.props,X(t));return n+r+v}function
|
|
78
|
+
`):v+pn(c.type,c.props,X(t));return n+r+v}function Dh(e){try{return`
|
|
79
79
|
|
|
80
|
-
`+
|
|
80
|
+
`+Ah(e,0)}catch{return""}}function hy(e,t,n){for(var r=t,l=null,c=0;r;)r===e&&(c=0),l={fiber:r,children:l!==null?[l]:[],serverProps:r===t?n:r===e?null:void 0,serverTail:[],distanceFromLeaf:c},c++,r=r.return;return l!==null?Dh(l).replaceAll(/^[+-]/gm,">"):""}function my(e,t){var n=Pe({},e||vx),r={tag:t};return gx.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),sD.indexOf(t)!==-1&&(n.pTagInButtonScope=null),nD.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=r,t==="form"&&(n.formTag=r),t==="a"&&(n.aTagInScope=r),t==="button"&&(n.buttonTagInScope=r),t==="nobr"&&(n.nobrTagInScope=r),t==="p"&&(n.pTagInButtonScope=r),t==="li"&&(n.listItemTagAutoclosing=r),(t==="dd"||t==="dt")&&(n.dlItemTagAutoclosing=r),t==="#document"||t==="html"?n.containerTagInScope=null:n.containerTagInScope||(n.containerTagInScope=r),e!==null||t!=="#document"&&t!=="html"&&t!=="body"?n.implicitRootScope===!0&&(n.implicitRootScope=!1):n.implicitRootScope=!0,n}function py(e,t,n){switch(t){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(n)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!n)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return aD.indexOf(t)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null;case"head":return n||t===null;case"html":return n&&t==="#document"||t===null;case"body":return n&&(t==="#document"||t==="html")||t===null}return!0}function KE(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}function by(e,t){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===t)return e}e=e.return}return null}function Ch(e,t){t=t||vx;var n=t.current;if(t=(n=py(e,n&&n.tag,t.implicitRootScope)?null:n)?null:KE(e,t),t=n||t,!t)return!0;var r=t.tag;if(t=String(!!n)+"|"+e+"|"+r,Lf[t])return!1;Lf[t]=!0;var l=(t=In)?by(t.return,r):null,c=t!==null&&l!==null?hy(l,t,null):"",f="<"+e+">";return n?(n="",r==="table"&&e==="tr"&&(n+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
81
81
|
This will cause a hydration error.%s`,f,r,n,c)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
82
82
|
This will cause a hydration error.%s`,f,r,c),t&&(e=t.return,l===null||e===null||l===e&&e._debugOwner===t._debugOwner||be(l,function(){console.error(`<%s> cannot contain a nested %s.
|
|
83
83
|
See this log for the ancestor stack trace.`,r,f)})),!1}function Cu(e,t,n){if(n||py("#text",t,!1))return!0;if(n="#text|"+t,Lf[n])return!1;Lf[n]=!0;var r=(n=In)?by(n,t):null;return n=n!==null&&r!==null?hy(r,n,n.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
84
84
|
This will cause a hydration error.%s`,t,n):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
85
|
-
This will cause a hydration error.%s`,t,n),!1}function Cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}function WE(e){return e.replace(oD,function(t,n){return n.toUpperCase()})}function yy(e,t,n){var r=t.indexOf("--")===0;r||(-1<t.indexOf("-")?Co.hasOwnProperty(t)&&Co[t]||(Co[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,WE(t.replace(iD,"ms-")))):rD.test(t)?Co.hasOwnProperty(t)&&Co[t]||(Co[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!Sx.test(n)||Ip.hasOwnProperty(n)&&Ip[n]||(Ip[n]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,n.replace(Sx,""))),typeof n=="number"&&(isNaN(n)?wx||(wx=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(n)||Ex||(Ex=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||_x.has(t)?t==="float"?e.cssFloat=n:(to(n,t),e[t]=(""+n).trim()):e[t]=n+"px"}function gy(e,t,n){if(t!=null&&typeof t!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,n!=null){if(t){var r={};if(n){for(var l in n)if(n.hasOwnProperty(l)&&!t.hasOwnProperty(l))for(var c=$p[l]||[l],f=0;f<c.length;f++)r[c[f]]=l}for(var h in t)if(t.hasOwnProperty(h)&&(!n||n[h]!==t[h]))for(l=$p[h]||[h],c=0;c<l.length;c++)r[l[c]]=h;h={};for(var y in t)for(l=$p[y]||[y],c=0;c<l.length;c++)h[l[c]]=y;y={};for(var v in r)if(l=r[v],(c=h[v])&&l!==c&&(f=l+","+c,!y[f])){y[f]=!0,f=console;var k=t[l];f.error.call(f,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",k==null||typeof k=="boolean"||k===""?"Removing":"Updating",l,c)}}for(var V in n)!n.hasOwnProperty(V)||t!=null&&t.hasOwnProperty(V)||(V.indexOf("--")===0?e.setProperty(V,""):V==="float"?e.cssFloat="":e[V]="");for(var O in t)v=t[O],t.hasOwnProperty(O)&&n[O]!==v&&yy(e,O,v)}else for(r in t)t.hasOwnProperty(r)&&yy(e,r,t[r])}function Tl(e){if(e.indexOf("-")===-1)return!1;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}}function vy(e){return lD.get(e)||e}function e_(e,t){if(Es.call(Oo,t)&&Oo[t])return!0;if(uD.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=Ax.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Oo[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Oo[t]=!0}if(cD.test(t)){if(e=t.toLowerCase(),e=Ax.hasOwnProperty(e)?e:null,e==null)return Oo[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Oo[t]=!0)}return!0}function t_(e,t){var n=[],r;for(r in t)e_(e,r)||n.push(r);t=n.map(function(l){return"`"+l+"`"}).join(", "),n.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<n.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function n_(e,t,n,r){if(Es.call(vn,t)&&vn[t])return!0;var l=t.toLowerCase();if(l==="onfocusin"||l==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),vn[t]=!0;if(typeof n=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(r!=null){if(e=r.possibleRegistrationNames,r.registrationNameDependencies.hasOwnProperty(t))return!0;if(r=e.hasOwnProperty(l)?e[l]:null,r!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,r),vn[t]=!0;if(Cx.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),vn[t]=!0}else if(Cx.test(t))return fD.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),vn[t]=!0;if(dD.test(t)||hD.test(t))return!0;if(l==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),vn[t]=!0;if(l==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),vn[t]=!0;if(l==="is"&&n!==null&&n!==void 0&&typeof n!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),vn[t]=!0;if(typeof n=="number"&&isNaN(n))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),vn[t]=!0;if(Pf.hasOwnProperty(l)){if(l=Pf[l],l!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,l),vn[t]=!0}else if(t!==l)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,l),vn[t]=!0;switch(t){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof n){case"boolean":switch(t){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return l=t.toLowerCase().slice(0,5),l==="data-"||l==="aria-"?!0:(n?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),vn[t]=!0)}case"function":case"symbol":return vn[t]=!0,!1;case"string":if(n==="false"||n==="true"){switch(t){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),vn[t]=!0}}return!0}function s_(e,t,n){var r=[],l;for(l in t)n_(e,l,t[l],n)||r.push(l);t=r.map(function(c){return"`"+c+"`"}).join(", "),r.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e):1<r.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e)}function Ol(e){return mD.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ta(){}function Ch(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function xy(e){var t=Un(e);if(t&&(e=t.stateNode)){var n=e[gn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Is(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(nt(t,"name"),n=n.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=r[gn]||null;if(!l)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Is(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Au(r)}break e;case"textarea":A(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}function Ny(e,t,n){if(Yp)return e(t,n);Yp=!0;try{var r=e(t);return r}finally{if(Yp=!1,(Ro!==null||jo!==null)&&(go(),Ro&&(t=Ro,e=jo,jo=Ro=null,xy(t),e)))for(t=0;t<e.length;t++)xy(e[t])}}function Rl(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof n+"` type.");return n}function Sy(){if($f)return $f;var e,t=Jp,n=t.length,r,l="value"in Dr?Dr.value:Dr.textContent,c=l.length;for(e=0;e<n&&t[e]===l[e];e++);var f=n-e;for(r=1;r<=f&&t[n-r]===l[c-r];r++);return $f=l.slice(e,1<r?1-r:void 0)}function Tu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ou(){return!0}function wy(){return!1}function Tn(e){function t(n,r,l,c,f){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=c,this.target=f,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(c):c[h]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ou:wy,this.isPropagationStopped=wy,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ou)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ou)},persist:function(){},isPersistent:Ou}),t}function a_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=DD[e])?!!t[e]:!1}function Th(){return a_}function Ey(e,t){switch(e){case"keyup":return qD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==jx;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _y(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function r_(e,t){switch(e){case"compositionend":return _y(t);case"keypress":return t.which!==kx?null:(Ux=!0,Vx);case"textInput":return e=t.data,e===Vx&&Ux?null:e;default:return null}}function i_(e,t){if(Mo)return e==="compositionend"||!Zp&&Ey(e,t)?(e=Sy(),$f=Jp=Dr=null,Mo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mx&&t.locale!=="ko"?null:t.data;default:return null}}function Ay(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!HD[e.type]:t==="textarea"}function o_(e){if(!ha)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Dy(e,t,n,r){Ro?jo?jo.push(r):jo=[r]:Ro=r,t=wf(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}function l_(e){c1(e,0)}function Ru(e){var t=Da(e);if(Au(t))return e}function Cy(e,t){if(e==="change")return t}function Ty(){pc&&(pc.detachEvent("onpropertychange",Oy),bc=pc=null)}function Oy(e){if(e.propertyName==="value"&&Ru(bc)){var t=[];Dy(t,bc,e,Ch(e)),Ny(l_,t)}}function c_(e,t,n){e==="focusin"?(Ty(),pc=t,bc=n,pc.attachEvent("onpropertychange",Oy)):e==="focusout"&&Ty()}function u_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(bc)}function f_(e,t){if(e==="click")return Ru(t)}function d_(e,t){if(e==="input"||e==="change")return Ru(t)}function h_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function jl(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!Es.call(t,l)||!xn(e[l],t[l]))return!1}return!0}function Ry(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jy(e,t){var n=Ry(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ry(n)}}function My(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?My(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ky(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=io(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=io(e.document)}return t}function Oh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Vy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wp||ko==null||ko!==io(r)||(r=ko,"selectionStart"in r&&Oh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yc&&jl(yc,r)||(yc=r,r=wf(Kp,"onSelect"),0<r.length&&(t=new If("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ko)))}function fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}function di(e){if(eb[e])return eb[e];if(!Vo[e])return e;var t=Vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bx)return eb[e]=t[n];return e}function xs(e,t){$x.set(e,t),Ca(t,[e])}function m_(e){for(var t=Ff,n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"&&r!==null)if(Jt(r)&&r.length===2&&typeof r[0]=="string"){if(t!==Ff&&t!==rb)return sb;t=rb}else return sb;else{if(typeof r=="function"||typeof r=="string"&&50<r.length||t!==Ff&&t!==ab)return sb;t=ab}}return t}function Rh(e,t,n,r){for(var l in e)Es.call(e,l)&&l[0]!=="_"&&Ys(l,e[l],t,n,r)}function Ys(e,t,n,r,l){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===oa){var c=W(t.type)||"…",f=t.key;t=t.props;var h=Object.keys(t),y=h.length;if(f==null&&y===0){t="<"+c+" />";break}if(3>r||y===1&&h[0]==="children"&&f==null){t="<"+c+" … />";break}n.push([l+" ".repeat(r)+e,"<"+c]),f!==null&&Ys("key",f,n,r+1,l),e=!1;for(var v in t)v==="children"?t.children!=null&&(!Jt(t.children)||0<t.children.length)&&(e=!0):Es.call(t,v)&&v[0]!=="_"&&Ys(v,t[v],n,r+1,l);n.push(["",e?">…</"+c+">":"/>"]);return}if(c=Object.prototype.toString.call(t),c=c.slice(8,c.length-1),c==="Array"){if(v=m_(t),v===ab||v===Ff){t=JSON.stringify(t);break}else if(v===rb){for(n.push([l+" ".repeat(r)+e,""]),e=0;e<t.length;e++)c=t[e],Ys(c[0],c[1],n,r+1,l);return}}if(c==="Promise"){if(t.status==="fulfilled"){if(c=n.length,Ys(e,t.value,n,r,l),n.length>c){n=n[c],n[1]="Promise<"+(n[1]||"Object")+">";return}}else if(t.status==="rejected"&&(c=n.length,Ys(e,t.reason,n,r,l),n.length>c)){n=n[c],n[1]="Rejected Promise<"+n[1]+">";return}n.push([" ".repeat(r)+e,"Promise"]);return}c==="Object"&&(v=Object.getPrototypeOf(t))&&typeof v.constructor=="function"&&(c=v.constructor.name),n.push([l+" ".repeat(r)+e,c==="Object"?3>r?"":"…":c]),3>r&&Rh(t,n,r+1,l);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===GD?"…":JSON.stringify(t);break;case"undefined":t="undefined";break;case"boolean":t=t?"true":"false";break;default:t=String(t)}n.push([l+" ".repeat(r)+e,t])}function Uy(e,t,n,r){var l=!0;for(f in e)f in t||(n.push([Jf+" ".repeat(r)+f,"…"]),l=!1);for(var c in t)if(c in e){var f=e[c],h=t[c];if(f!==h){if(r===0&&c==="children")l=" ".repeat(r)+c,n.push([Jf+l,"…"],[Gf+l,"…"]);else{if(!(3<=r)){if(typeof f=="object"&&typeof h=="object"&&f!==null&&h!==null&&f.$$typeof===h.$$typeof)if(h.$$typeof===oa){if(f.type===h.type&&f.key===h.key){f=W(h.type)||"…",l=" ".repeat(r)+c,f="<"+f+" … />",n.push([Jf+l,f],[Gf+l,f]),l=!1;continue}}else{var y=Object.prototype.toString.call(f),v=Object.prototype.toString.call(h);if(y===v&&(v==="[object Object]"||v==="[object Array]")){y=[Fx+" ".repeat(r)+c,v==="[object Array]"?"Array":""],n.push(y),v=n.length,Uy(f,h,n,r+1)?v===n.length&&(y[1]="Referentially unequal but deeply equal objects. Consider memoization."):l=!1;continue}}else if(typeof f=="function"&&typeof h=="function"&&f.name===h.name&&f.length===h.length&&(y=Function.prototype.toString.call(f),v=Function.prototype.toString.call(h),y===v)){f=h.name===""?"() => {}":h.name+"() {}",n.push([Fx+" ".repeat(r)+c,f+" Referentially unequal function closure. Consider memoization."]);continue}}Ys(c,f,n,r,Jf),Ys(c,h,n,r,Gf)}l=!1}}else n.push([Gf+" ".repeat(r)+c,"…"]),l=!1;return l}function Ns(e){Je=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function Fs(e,t,n,r){bt&&(Tr.start=t,Tr.end=n,qa.color="warning",qa.tooltipText=r,qa.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,r,Tr)):performance.measure(r,Tr))}function ju(e,t,n){Fs(e,t,n,"Reconnect")}function Mu(e,t,n,r,l){var c=H(e);if(c!==null&&bt){var f=e.alternate,h=e.actualDuration;if(f===null||f.child!==e.child)for(var y=e.child;y!==null;y=y.sibling)h-=y.actualDuration;r=.5>h?r?"tertiary-light":"primary-light":10>h?r?"tertiary":"primary":100>h?r?"tertiary-dark":"primary-dark":"error";var v=e.memoizedProps;h=e._debugTask,v!==null&&f!==null&&f.memoizedProps!==v?(y=[QD],v=Uy(f.memoizedProps,v,y,0),1<y.length&&(v&&!Cr&&(f.lanes&l)===0&&100<e.actualDuration?(Cr=!0,y[0]=XD,qa.color="warning",qa.tooltipText=Jx):(qa.color=r,qa.tooltipText=c),qa.properties=y,Tr.start=t,Tr.end=n,h!=null?h.run(performance.measure.bind(performance,""+c,Tr)):performance.measure(""+c,Tr))):h!=null?h.run(console.timeStamp.bind(console,c,t,n,as,void 0,r)):console.timeStamp(c,t,n,as,void 0,r)}}function jh(e,t,n,r){if(bt){var l=H(e);if(l!==null){for(var c=null,f=[],h=0;h<r.length;h++){var y=r[h];c==null&&y.source!==null&&(c=y.source._debugTask),y=y.value,f.push(["Error",typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y)])}e.key!==null&&Ys("key",e.key,f,0,""),e.memoizedProps!==null&&Rh(e.memoizedProps,f,0,""),c==null&&(c=e._debugTask),e={start:t,end:n,detail:{devtools:{color:"error",track:as,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:f}}},c?c.run(performance.measure.bind(performance,""+l,e)):performance.measure(""+l,e)}}}function Js(e,t,n,r,l){if(l!==null){if(bt){var c=H(e);if(c!==null){r=[];for(var f=0;f<l.length;f++){var h=l[f].value;r.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e.key!==null&&Ys("key",e.key,r,0,""),e.memoizedProps!==null&&Rh(e.memoizedProps,r,0,""),t={start:t,end:n,detail:{devtools:{color:"error",track:as,tooltipText:"A lifecycle or effect errored",properties:r}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+c,t)):performance.measure(""+c,t)}}}else c=H(e),c!==null&&bt&&(l=1>r?"secondary-light":100>r?"secondary":500>r?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,c,t,n,as,void 0,l)):console.timeStamp(c,t,n,as,void 0,l))}function p_(e,t,n,r){if(bt&&!(t<=e)){var l=(n&738197653)===n?"tertiary-dark":"primary-dark";n=(n&536870912)===n?"Prepared":(n&201326741)===n?"Hydrated":"Render",r?r.run(console.timeStamp.bind(console,n,e,t,Je,Ye,l)):console.timeStamp(n,e,t,Je,Ye,l)}}function zy(e,t,n,r){!bt||t<=e||(n=(n&738197653)===n?"tertiary-dark":"primary-dark",r?r.run(console.timeStamp.bind(console,"Prewarm",e,t,Je,Ye,n)):console.timeStamp("Prewarm",e,t,Je,Ye,n))}function By(e,t,n,r){!bt||t<=e||(n=(n&738197653)===n?"tertiary-dark":"primary-dark",r?r.run(console.timeStamp.bind(console,"Suspended",e,t,Je,Ye,n)):console.timeStamp("Suspended",e,t,Je,Ye,n))}function b_(e,t,n,r,l,c){if(bt&&!(t<=e)){n=[];for(var f=0;f<r.length;f++){var h=r[f].value;n.push(["Recoverable Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"primary-dark",track:Je,trackGroup:Ye,tooltipText:l?"Hydration Failed":"Recovered after Error",properties:n}}},c?c.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function Mh(e,t,n,r){!bt||t<=e||(r?r.run(console.timeStamp.bind(console,"Errored",e,t,Je,Ye,"error")):console.timeStamp("Errored",e,t,Je,Ye,"error"))}function y_(e,t,n,r){!bt||t<=e||(r?r.run(console.timeStamp.bind(console,n,e,t,Je,Ye,"secondary-light")):console.timeStamp(n,e,t,Je,Ye,"secondary-light"))}function qy(e,t,n,r,l){if(bt&&!(t<=e)){for(var c=[],f=0;f<n.length;f++){var h=n[f].value;c.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"error",track:Je,trackGroup:Ye,tooltipText:r?"Remaining Effects Errored":"Commit Errored",properties:c}}},l?l.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function kh(e,t,n){!bt||t<=e||console.timeStamp("Animating",e,t,Je,Ye,"secondary-dark")}function ku(){for(var e=Uo,t=ib=Uo=0;t<e;){var n=rs[t];rs[t++]=null;var r=rs[t];rs[t++]=null;var l=rs[t];rs[t++]=null;var c=rs[t];if(rs[t++]=null,r!==null&&l!==null){var f=r.pending;f===null?l.next=l:(l.next=f.next,f.next=l),r.pending=l}c!==0&&Ly(n,l,c)}}function Vu(e,t,n,r){rs[Uo++]=e,rs[Uo++]=t,rs[Uo++]=n,rs[Uo++]=r,ib|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Vh(e,t,n,r){return Vu(e,t,n,r),Uu(e)}function dn(e,t){return Vu(e,null,null,t),Uu(e)}function Ly(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var l=!1,c=e.return;c!==null;)c.childLanes|=n,r=c.alternate,r!==null&&(r.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&gc||(l=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,l&&t!==null&&(l=31-yn(n),e=c.hiddenUpdates,r=e[l],r===null?e[l]=[t]:r.push(t),t.lane=n|536870912),c):null}function Uu(e){if(Yc>dC)throw Pi=Yc=0,Fc=qb=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Pi>hC&&(Pi=0,Fc=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&n1(e);for(var t=e,n=t.return;n!==null;)t.alternate===null&&(t.flags&4098)!==0&&n1(e),t=n,n=t.return;return t.tag===3?t.stateNode:null}function hi(e){if(is===null)return e;var t=is(e);return t===void 0?e:t.current}function Uh(e){if(is===null)return e;var t=is(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=hi(e.render),e.render!==t)?(t={$$typeof:ic,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function Hy(e,t){if(is===null)return!1;var n=e.elementType;t=t.type;var r=!1,l=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(r=!0);break;case 0:(typeof t=="function"||l===$n)&&(r=!0);break;case 11:(l===ic||l===$n)&&(r=!0);break;case 14:case 15:(l===kf||l===$n)&&(r=!0);break;default:return!1}return!!(r&&(e=is(n),e!==void 0&&e===is(t)))}function Py(e){is!==null&&typeof WeakSet=="function"&&(zo===null&&(zo=new WeakSet),zo.add(e))}function $y(e,t,n){do{var r=e,l=r.alternate,c=r.child,f=r.sibling,h=r.tag;r=r.type;var y=null;switch(h){case 0:case 15:case 1:y=r;break;case 11:y=r.render}if(is===null)throw Error("Expected resolveFamily to be set during hot reload.");var v=!1;if(r=!1,y!==null&&(y=is(y),y!==void 0&&(n.has(y)?r=!0:t.has(y)&&(h===1?r=!0:v=!0))),zo!==null&&(zo.has(e)||l!==null&&zo.has(l))&&(r=!0),r&&(e._debugNeedsRemount=!0),(r||v)&&(l=dn(e,2),l!==null&&At(l,e,2)),c===null||r||$y(c,t,n),f===null)break;e=f}while(!0)}function g_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Gx||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function zh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oa(e,t){var n=e.alternate;switch(n===null?(n=D(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugOwner=e._debugOwner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null,n.actualDuration=-0,n.actualStartTime=-1.1),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugInfo=e._debugInfo,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case 0:case 15:n.type=hi(e.type);break;case 1:n.type=hi(e.type);break;case 11:n.type=Uh(e.type)}return n}function Iy(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration),e}function Bh(e,t,n,r,l,c){var f=0,h=e;if(typeof e=="function")zh(e)&&(f=1),h=hi(h);else if(typeof e=="string")f=pe(),f=DA(e,n,f)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Rp:return t=D(31,n,t,l),t.elementType=Rp,t.lanes=c,t;case _o:return mi(n.children,l,c,t);case Mf:f=8,l|=mn,l|=_s;break;case Dp:return e=n,r=l,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=D(12,e,t,r|Ve),t.elementType=Dp,t.lanes=c,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case Tp:return t=D(13,n,t,l),t.elementType=Tp,t.lanes=c,t;case Op:return t=D(19,n,t,l),t.elementType=Op,t.lanes=c,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case la:f=10;break e;case Cp:f=9;break e;case ic:f=11,h=Uh(h);break e;case kf:f=14;break e;case $n:f=16,h=null;break e}h="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?n="null":Jt(e)?n="array":e!==void 0&&e.$$typeof===oa?(n="<"+(W(e.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):n=typeof e,(f=r?Q(r):null)&&(h+=`
|
|
85
|
+
This will cause a hydration error.%s`,t,n),!1}function Cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}function WE(e){return e.replace(oD,function(t,n){return n.toUpperCase()})}function yy(e,t,n){var r=t.indexOf("--")===0;r||(-1<t.indexOf("-")?Co.hasOwnProperty(t)&&Co[t]||(Co[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,WE(t.replace(iD,"ms-")))):rD.test(t)?Co.hasOwnProperty(t)&&Co[t]||(Co[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!Sx.test(n)||Fp.hasOwnProperty(n)&&Fp[n]||(Fp[n]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,n.replace(Sx,""))),typeof n=="number"&&(isNaN(n)?wx||(wx=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(n)||Ex||(Ex=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||_x.has(t)?t==="float"?e.cssFloat=n:(to(n,t),e[t]=(""+n).trim()):e[t]=n+"px"}function gy(e,t,n){if(t!=null&&typeof t!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,n!=null){if(t){var r={};if(n){for(var l in n)if(n.hasOwnProperty(l)&&!t.hasOwnProperty(l))for(var c=Ip[l]||[l],f=0;f<c.length;f++)r[c[f]]=l}for(var h in t)if(t.hasOwnProperty(h)&&(!n||n[h]!==t[h]))for(l=Ip[h]||[h],c=0;c<l.length;c++)r[l[c]]=h;h={};for(var y in t)for(l=Ip[y]||[y],c=0;c<l.length;c++)h[l[c]]=y;y={};for(var v in r)if(l=r[v],(c=h[v])&&l!==c&&(f=l+","+c,!y[f])){y[f]=!0,f=console;var k=t[l];f.error.call(f,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",k==null||typeof k=="boolean"||k===""?"Removing":"Updating",l,c)}}for(var V in n)!n.hasOwnProperty(V)||t!=null&&t.hasOwnProperty(V)||(V.indexOf("--")===0?e.setProperty(V,""):V==="float"?e.cssFloat="":e[V]="");for(var O in t)v=t[O],t.hasOwnProperty(O)&&n[O]!==v&&yy(e,O,v)}else for(r in t)t.hasOwnProperty(r)&&yy(e,r,t[r])}function Tl(e){if(e.indexOf("-")===-1)return!1;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}}function vy(e){return lD.get(e)||e}function e_(e,t){if(Es.call(Oo,t)&&Oo[t])return!0;if(uD.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=Ax.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Oo[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Oo[t]=!0}if(cD.test(t)){if(e=t.toLowerCase(),e=Ax.hasOwnProperty(e)?e:null,e==null)return Oo[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Oo[t]=!0)}return!0}function t_(e,t){var n=[],r;for(r in t)e_(e,r)||n.push(r);t=n.map(function(l){return"`"+l+"`"}).join(", "),n.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<n.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function n_(e,t,n,r){if(Es.call(vn,t)&&vn[t])return!0;var l=t.toLowerCase();if(l==="onfocusin"||l==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),vn[t]=!0;if(typeof n=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(r!=null){if(e=r.possibleRegistrationNames,r.registrationNameDependencies.hasOwnProperty(t))return!0;if(r=e.hasOwnProperty(l)?e[l]:null,r!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,r),vn[t]=!0;if(Cx.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),vn[t]=!0}else if(Cx.test(t))return fD.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),vn[t]=!0;if(dD.test(t)||hD.test(t))return!0;if(l==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),vn[t]=!0;if(l==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),vn[t]=!0;if(l==="is"&&n!==null&&n!==void 0&&typeof n!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),vn[t]=!0;if(typeof n=="number"&&isNaN(n))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),vn[t]=!0;if(Pf.hasOwnProperty(l)){if(l=Pf[l],l!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,l),vn[t]=!0}else if(t!==l)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,l),vn[t]=!0;switch(t){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof n){case"boolean":switch(t){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return l=t.toLowerCase().slice(0,5),l==="data-"||l==="aria-"?!0:(n?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),vn[t]=!0)}case"function":case"symbol":return vn[t]=!0,!1;case"string":if(n==="false"||n==="true"){switch(t){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),vn[t]=!0}}return!0}function s_(e,t,n){var r=[],l;for(l in t)n_(e,l,t[l],n)||r.push(l);t=r.map(function(c){return"`"+c+"`"}).join(", "),r.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e):1<r.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e)}function Ol(e){return mD.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ta(){}function Th(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function xy(e){var t=Un(e);if(t&&(e=t.stateNode)){var n=e[gn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Is(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(st(t,"name"),n=n.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=r[gn]||null;if(!l)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Is(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Au(r)}break e;case"textarea":A(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}function Ny(e,t,n){if(Yp)return e(t,n);Yp=!0;try{var r=e(t);return r}finally{if(Yp=!1,(Ro!==null||jo!==null)&&(go(),Ro&&(t=Ro,e=jo,jo=Ro=null,xy(t),e)))for(t=0;t<e.length;t++)xy(e[t])}}function Rl(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof n+"` type.");return n}function Sy(){if($f)return $f;var e,t=Gp,n=t.length,r,l="value"in Dr?Dr.value:Dr.textContent,c=l.length;for(e=0;e<n&&t[e]===l[e];e++);var f=n-e;for(r=1;r<=f&&t[n-r]===l[c-r];r++);return $f=l.slice(e,1<r?1-r:void 0)}function Tu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ou(){return!0}function wy(){return!1}function Tn(e){function t(n,r,l,c,f){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=c,this.target=f,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(c):c[h]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ou:wy,this.isPropagationStopped=wy,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ou)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ou)},persist:function(){},isPersistent:Ou}),t}function a_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=DD[e])?!!t[e]:!1}function Oh(){return a_}function Ey(e,t){switch(e){case"keyup":return qD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==jx;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _y(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function r_(e,t){switch(e){case"compositionend":return _y(t);case"keypress":return t.which!==kx?null:(Ux=!0,Vx);case"textInput":return e=t.data,e===Vx&&Ux?null:e;default:return null}}function i_(e,t){if(Mo)return e==="compositionend"||!Kp&&Ey(e,t)?(e=Sy(),$f=Gp=Dr=null,Mo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mx&&t.locale!=="ko"?null:t.data;default:return null}}function Ay(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!HD[e.type]:t==="textarea"}function o_(e){if(!ha)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Dy(e,t,n,r){Ro?jo?jo.push(r):jo=[r]:Ro=r,t=wf(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}function l_(e){c1(e,0)}function Ru(e){var t=Da(e);if(Au(t))return e}function Cy(e,t){if(e==="change")return t}function Ty(){pc&&(pc.detachEvent("onpropertychange",Oy),bc=pc=null)}function Oy(e){if(e.propertyName==="value"&&Ru(bc)){var t=[];Dy(t,bc,e,Th(e)),Ny(l_,t)}}function c_(e,t,n){e==="focusin"?(Ty(),pc=t,bc=n,pc.attachEvent("onpropertychange",Oy)):e==="focusout"&&Ty()}function u_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(bc)}function f_(e,t){if(e==="click")return Ru(t)}function d_(e,t){if(e==="input"||e==="change")return Ru(t)}function h_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function jl(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!Es.call(t,l)||!xn(e[l],t[l]))return!1}return!0}function Ry(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jy(e,t){var n=Ry(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ry(n)}}function My(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?My(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ky(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=io(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=io(e.document)}return t}function Rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Vy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eb||ko==null||ko!==io(r)||(r=ko,"selectionStart"in r&&Rh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yc&&jl(yc,r)||(yc=r,r=wf(Wp,"onSelect"),0<r.length&&(t=new If("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ko)))}function fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}function di(e){if(tb[e])return tb[e];if(!Vo[e])return e;var t=Vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bx)return tb[e]=t[n];return e}function xs(e,t){$x.set(e,t),Ca(t,[e])}function m_(e){for(var t=Yf,n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"&&r!==null)if(Jt(r)&&r.length===2&&typeof r[0]=="string"){if(t!==Yf&&t!==ib)return ab;t=ib}else return ab;else{if(typeof r=="function"||typeof r=="string"&&50<r.length||t!==Yf&&t!==rb)return ab;t=rb}}return t}function jh(e,t,n,r){for(var l in e)Es.call(e,l)&&l[0]!=="_"&&Fs(l,e[l],t,n,r)}function Fs(e,t,n,r,l){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===oa){var c=W(t.type)||"…",f=t.key;t=t.props;var h=Object.keys(t),y=h.length;if(f==null&&y===0){t="<"+c+" />";break}if(3>r||y===1&&h[0]==="children"&&f==null){t="<"+c+" … />";break}n.push([l+" ".repeat(r)+e,"<"+c]),f!==null&&Fs("key",f,n,r+1,l),e=!1;for(var v in t)v==="children"?t.children!=null&&(!Jt(t.children)||0<t.children.length)&&(e=!0):Es.call(t,v)&&v[0]!=="_"&&Fs(v,t[v],n,r+1,l);n.push(["",e?">…</"+c+">":"/>"]);return}if(c=Object.prototype.toString.call(t),c=c.slice(8,c.length-1),c==="Array"){if(v=m_(t),v===rb||v===Yf){t=JSON.stringify(t);break}else if(v===ib){for(n.push([l+" ".repeat(r)+e,""]),e=0;e<t.length;e++)c=t[e],Fs(c[0],c[1],n,r+1,l);return}}if(c==="Promise"){if(t.status==="fulfilled"){if(c=n.length,Fs(e,t.value,n,r,l),n.length>c){n=n[c],n[1]="Promise<"+(n[1]||"Object")+">";return}}else if(t.status==="rejected"&&(c=n.length,Fs(e,t.reason,n,r,l),n.length>c)){n=n[c],n[1]="Rejected Promise<"+n[1]+">";return}n.push([" ".repeat(r)+e,"Promise"]);return}c==="Object"&&(v=Object.getPrototypeOf(t))&&typeof v.constructor=="function"&&(c=v.constructor.name),n.push([l+" ".repeat(r)+e,c==="Object"?3>r?"":"…":c]),3>r&&jh(t,n,r+1,l);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===GD?"…":JSON.stringify(t);break;case"undefined":t="undefined";break;case"boolean":t=t?"true":"false";break;default:t=String(t)}n.push([l+" ".repeat(r)+e,t])}function Uy(e,t,n,r){var l=!0;for(f in e)f in t||(n.push([Jf+" ".repeat(r)+f,"…"]),l=!1);for(var c in t)if(c in e){var f=e[c],h=t[c];if(f!==h){if(r===0&&c==="children")l=" ".repeat(r)+c,n.push([Jf+l,"…"],[Gf+l,"…"]);else{if(!(3<=r)){if(typeof f=="object"&&typeof h=="object"&&f!==null&&h!==null&&f.$$typeof===h.$$typeof)if(h.$$typeof===oa){if(f.type===h.type&&f.key===h.key){f=W(h.type)||"…",l=" ".repeat(r)+c,f="<"+f+" … />",n.push([Jf+l,f],[Gf+l,f]),l=!1;continue}}else{var y=Object.prototype.toString.call(f),v=Object.prototype.toString.call(h);if(y===v&&(v==="[object Object]"||v==="[object Array]")){y=[Yx+" ".repeat(r)+c,v==="[object Array]"?"Array":""],n.push(y),v=n.length,Uy(f,h,n,r+1)?v===n.length&&(y[1]="Referentially unequal but deeply equal objects. Consider memoization."):l=!1;continue}}else if(typeof f=="function"&&typeof h=="function"&&f.name===h.name&&f.length===h.length&&(y=Function.prototype.toString.call(f),v=Function.prototype.toString.call(h),y===v)){f=h.name===""?"() => {}":h.name+"() {}",n.push([Yx+" ".repeat(r)+c,f+" Referentially unequal function closure. Consider memoization."]);continue}}Fs(c,f,n,r,Jf),Fs(c,h,n,r,Gf)}l=!1}}else n.push([Gf+" ".repeat(r)+c,"…"]),l=!1;return l}function Ns(e){Je=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function Ys(e,t,n,r){bt&&(Tr.start=t,Tr.end=n,qa.color="warning",qa.tooltipText=r,qa.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,r,Tr)):performance.measure(r,Tr))}function ju(e,t,n){Ys(e,t,n,"Reconnect")}function Mu(e,t,n,r,l){var c=H(e);if(c!==null&&bt){var f=e.alternate,h=e.actualDuration;if(f===null||f.child!==e.child)for(var y=e.child;y!==null;y=y.sibling)h-=y.actualDuration;r=.5>h?r?"tertiary-light":"primary-light":10>h?r?"tertiary":"primary":100>h?r?"tertiary-dark":"primary-dark":"error";var v=e.memoizedProps;h=e._debugTask,v!==null&&f!==null&&f.memoizedProps!==v?(y=[QD],v=Uy(f.memoizedProps,v,y,0),1<y.length&&(v&&!Cr&&(f.lanes&l)===0&&100<e.actualDuration?(Cr=!0,y[0]=XD,qa.color="warning",qa.tooltipText=Jx):(qa.color=r,qa.tooltipText=c),qa.properties=y,Tr.start=t,Tr.end=n,h!=null?h.run(performance.measure.bind(performance,""+c,Tr)):performance.measure(""+c,Tr))):h!=null?h.run(console.timeStamp.bind(console,c,t,n,as,void 0,r)):console.timeStamp(c,t,n,as,void 0,r)}}function Mh(e,t,n,r){if(bt){var l=H(e);if(l!==null){for(var c=null,f=[],h=0;h<r.length;h++){var y=r[h];c==null&&y.source!==null&&(c=y.source._debugTask),y=y.value,f.push(["Error",typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y)])}e.key!==null&&Fs("key",e.key,f,0,""),e.memoizedProps!==null&&jh(e.memoizedProps,f,0,""),c==null&&(c=e._debugTask),e={start:t,end:n,detail:{devtools:{color:"error",track:as,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:f}}},c?c.run(performance.measure.bind(performance,""+l,e)):performance.measure(""+l,e)}}}function Js(e,t,n,r,l){if(l!==null){if(bt){var c=H(e);if(c!==null){r=[];for(var f=0;f<l.length;f++){var h=l[f].value;r.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e.key!==null&&Fs("key",e.key,r,0,""),e.memoizedProps!==null&&jh(e.memoizedProps,r,0,""),t={start:t,end:n,detail:{devtools:{color:"error",track:as,tooltipText:"A lifecycle or effect errored",properties:r}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+c,t)):performance.measure(""+c,t)}}}else c=H(e),c!==null&&bt&&(l=1>r?"secondary-light":100>r?"secondary":500>r?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,c,t,n,as,void 0,l)):console.timeStamp(c,t,n,as,void 0,l))}function p_(e,t,n,r){if(bt&&!(t<=e)){var l=(n&738197653)===n?"tertiary-dark":"primary-dark";n=(n&536870912)===n?"Prepared":(n&201326741)===n?"Hydrated":"Render",r?r.run(console.timeStamp.bind(console,n,e,t,Je,Fe,l)):console.timeStamp(n,e,t,Je,Fe,l)}}function zy(e,t,n,r){!bt||t<=e||(n=(n&738197653)===n?"tertiary-dark":"primary-dark",r?r.run(console.timeStamp.bind(console,"Prewarm",e,t,Je,Fe,n)):console.timeStamp("Prewarm",e,t,Je,Fe,n))}function By(e,t,n,r){!bt||t<=e||(n=(n&738197653)===n?"tertiary-dark":"primary-dark",r?r.run(console.timeStamp.bind(console,"Suspended",e,t,Je,Fe,n)):console.timeStamp("Suspended",e,t,Je,Fe,n))}function b_(e,t,n,r,l,c){if(bt&&!(t<=e)){n=[];for(var f=0;f<r.length;f++){var h=r[f].value;n.push(["Recoverable Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"primary-dark",track:Je,trackGroup:Fe,tooltipText:l?"Hydration Failed":"Recovered after Error",properties:n}}},c?c.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function kh(e,t,n,r){!bt||t<=e||(r?r.run(console.timeStamp.bind(console,"Errored",e,t,Je,Fe,"error")):console.timeStamp("Errored",e,t,Je,Fe,"error"))}function y_(e,t,n,r){!bt||t<=e||(r?r.run(console.timeStamp.bind(console,n,e,t,Je,Fe,"secondary-light")):console.timeStamp(n,e,t,Je,Fe,"secondary-light"))}function qy(e,t,n,r,l){if(bt&&!(t<=e)){for(var c=[],f=0;f<n.length;f++){var h=n[f].value;c.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"error",track:Je,trackGroup:Fe,tooltipText:r?"Remaining Effects Errored":"Commit Errored",properties:c}}},l?l.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function Vh(e,t,n){!bt||t<=e||console.timeStamp("Animating",e,t,Je,Fe,"secondary-dark")}function ku(){for(var e=Uo,t=ob=Uo=0;t<e;){var n=rs[t];rs[t++]=null;var r=rs[t];rs[t++]=null;var l=rs[t];rs[t++]=null;var c=rs[t];if(rs[t++]=null,r!==null&&l!==null){var f=r.pending;f===null?l.next=l:(l.next=f.next,f.next=l),r.pending=l}c!==0&&Ly(n,l,c)}}function Vu(e,t,n,r){rs[Uo++]=e,rs[Uo++]=t,rs[Uo++]=n,rs[Uo++]=r,ob|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Uh(e,t,n,r){return Vu(e,t,n,r),Uu(e)}function dn(e,t){return Vu(e,null,null,t),Uu(e)}function Ly(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var l=!1,c=e.return;c!==null;)c.childLanes|=n,r=c.alternate,r!==null&&(r.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&gc||(l=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,l&&t!==null&&(l=31-yn(n),e=c.hiddenUpdates,r=e[l],r===null?e[l]=[t]:r.push(t),t.lane=n|536870912),c):null}function Uu(e){if(Fc>dC)throw Pi=Fc=0,Yc=Lb=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Pi>hC&&(Pi=0,Yc=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&n1(e);for(var t=e,n=t.return;n!==null;)t.alternate===null&&(t.flags&4098)!==0&&n1(e),t=n,n=t.return;return t.tag===3?t.stateNode:null}function hi(e){if(is===null)return e;var t=is(e);return t===void 0?e:t.current}function zh(e){if(is===null)return e;var t=is(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=hi(e.render),e.render!==t)?(t={$$typeof:ic,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function Hy(e,t){if(is===null)return!1;var n=e.elementType;t=t.type;var r=!1,l=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(r=!0);break;case 0:(typeof t=="function"||l===$n)&&(r=!0);break;case 11:(l===ic||l===$n)&&(r=!0);break;case 14:case 15:(l===kf||l===$n)&&(r=!0);break;default:return!1}return!!(r&&(e=is(n),e!==void 0&&e===is(t)))}function Py(e){is!==null&&typeof WeakSet=="function"&&(zo===null&&(zo=new WeakSet),zo.add(e))}function $y(e,t,n){do{var r=e,l=r.alternate,c=r.child,f=r.sibling,h=r.tag;r=r.type;var y=null;switch(h){case 0:case 15:case 1:y=r;break;case 11:y=r.render}if(is===null)throw Error("Expected resolveFamily to be set during hot reload.");var v=!1;if(r=!1,y!==null&&(y=is(y),y!==void 0&&(n.has(y)?r=!0:t.has(y)&&(h===1?r=!0:v=!0))),zo!==null&&(zo.has(e)||l!==null&&zo.has(l))&&(r=!0),r&&(e._debugNeedsRemount=!0),(r||v)&&(l=dn(e,2),l!==null&&At(l,e,2)),c===null||r||$y(c,t,n),f===null)break;e=f}while(!0)}function g_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Gx||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function Bh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oa(e,t){var n=e.alternate;switch(n===null?(n=D(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugOwner=e._debugOwner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null,n.actualDuration=-0,n.actualStartTime=-1.1),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugInfo=e._debugInfo,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case 0:case 15:n.type=hi(e.type);break;case 1:n.type=hi(e.type);break;case 11:n.type=zh(e.type)}return n}function Iy(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration),e}function qh(e,t,n,r,l,c){var f=0,h=e;if(typeof e=="function")Bh(e)&&(f=1),h=hi(h);else if(typeof e=="string")f=pe(),f=DA(e,n,f)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case jp:return t=D(31,n,t,l),t.elementType=jp,t.lanes=c,t;case _o:return mi(n.children,l,c,t);case Mf:f=8,l|=mn,l|=_s;break;case Cp:return e=n,r=l,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=D(12,e,t,r|Ve),t.elementType=Cp,t.lanes=c,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case Op:return t=D(13,n,t,l),t.elementType=Op,t.lanes=c,t;case Rp:return t=D(19,n,t,l),t.elementType=Rp,t.lanes=c,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case la:f=10;break e;case Tp:f=9;break e;case ic:f=11,h=zh(h);break e;case kf:f=14;break e;case $n:f=16,h=null;break e}h="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?n="null":Jt(e)?n="array":e!==void 0&&e.$$typeof===oa?(n="<"+(W(e.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):n=typeof e,(f=r?Q(r):null)&&(h+=`
|
|
86
86
|
|
|
87
|
-
Check the render method of \``+f+"`."),f=29,n=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(n+"."+h)),h=null}return t=D(f,n,t,l),t.elementType=e,t.type=h,t.lanes=c,t._debugOwner=r,t}function zu(e,t,n){return t=
|
|
87
|
+
Check the render method of \``+f+"`."),f=29,n=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(n+"."+h)),h=null}return t=D(f,n,t,l),t.elementType=e,t.type=h,t.lanes=c,t._debugOwner=r,t}function zu(e,t,n){return t=qh(e.type,e.key,e.props,e._owner,t,n),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function mi(e,t,n,r){return e=D(7,e,r,t),e.lanes=n,e}function Lh(e,t,n){return e=D(6,e,null,t),e.lanes=n,e}function Fy(e){var t=D(18,null,null,Ce);return t.stateNode=e,t}function Hh(e,t,n){return t=D(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zn(e,t){if(typeof e=="object"&&e!==null){var n=lb.get(e);return n!==void 0?n:(t={value:e,source:t,stack:We(t)},lb.set(e,t),t)}return{value:e,source:t,stack:We(t)}}function Ra(e,t){fr(),Bo[qo++]=vc,Bo[qo++]=Qf,Qf=e,vc=t}function Yy(e,t,n){fr(),os[ls++]=Ha,os[ls++]=Pa,os[ls++]=Di,Di=e;var r=Ha;e=Pa;var l=32-yn(r)-1;r&=~(1<<l),n+=1;var c=32-yn(t)+l;if(30<c){var f=l-l%5;c=(r&(1<<f)-1).toString(32),r>>=f,l-=f,Ha=1<<32-yn(t)+l|n<<l|r,Pa=c+e}else Ha=1<<c|n<<l|r,Pa=e}function Ph(e){fr(),e.return!==null&&(Ra(e,1),Yy(e,1,0))}function $h(e){for(;e===Qf;)Qf=Bo[--qo],Bo[qo]=null,vc=Bo[--qo],Bo[qo]=null;for(;e===Di;)Di=os[--ls],os[ls]=null,Pa=os[--ls],os[ls]=null,Ha=os[--ls],os[ls]=null}function Jy(){return fr(),Di!==null?{id:Ha,overflow:Pa}:null}function Gy(e,t){fr(),os[ls++]=Ha,os[ls++]=Pa,os[ls++]=Di,Ha=t.id,Pa=t.overflow,Di=e}function fr(){$e||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function pi(e,t){if(e.return===null){if(Fn===null)Fn={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(Fn.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Fn.distanceFromLeaf>t&&(Fn.distanceFromLeaf=t)}return Fn}var n=pi(e.return,t+1).children;return 0<n.length&&n[n.length-1].fiber===e?(n=n[n.length-1],n.distanceFromLeaf>t&&(n.distanceFromLeaf=t),n):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},n.push(t),t)}function Qy(){$e&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Bu(e,t){ma||(e=pi(e,0),e.serverProps=null,t!==null&&(t=D1(t),e.serverTail.push(t)))}function dr(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,n="",r=Fn;throw r!==null&&(Fn=null,n=Dh(r)),Ml(zn(Error("Hydration failed because the server rendered "+(t?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
88
88
|
|
|
89
89
|
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
90
90
|
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
@@ -94,7 +94,7 @@ Check the render method of \``+f+"`."),f=29,n=Error("Element type is invalid: ex
|
|
|
94
94
|
|
|
95
95
|
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
96
96
|
|
|
97
|
-
https://react.dev/link/hydration-mismatch`+n),e)),
|
|
97
|
+
https://react.dev/link/hydration-mismatch`+n),e)),cb}function Xy(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ln]=e,t[gn]=r,cp(n,r),n){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(n=0;n<Jc.length;n++)Ie(Jc[n],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Hs("input",r),Ie("invalid",t),$s(t,r),oo(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"option":Al(t,r);break;case"select":Hs("select",r),Ie("invalid",t),Dl(t,r);break;case"textarea":Hs("textarea",r),Ie("invalid",t),N(t,r),E(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||h1(t.textContent,n)?(r.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),r.onScroll!=null&&Ie("scroll",t),r.onScrollEnd!=null&&Ie("scrollend",t),r.onClick!=null&&(t.onclick=Ta),t=!0):t=!1,t||dr(e,!0)}function Zy(e){for(cn=e.return;cn;)switch(cn.tag){case 5:case 31:case 13:cs=!1;return;case 27:case 3:cs=!0;return;default:cn=cn.return}}function lo(e){if(e!==cn)return!1;if(!$e)return Zy(e),$e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||mp(e.type,e.memoizedProps)),n=!n),n&&yt){for(n=yt;n;){var r=pi(e,0),l=D1(n);r.serverTail.push(l),n=l.type==="Suspense"?gp(n):Pn(n.nextSibling)}dr(e)}if(Zy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");yt=gp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");yt=gp(e)}else t===27?(t=yt,Sr(e.type)?(e=Kb,Kb=null,yt=e):yt=t):yt=cn?Pn(e.stateNode.nextSibling):null;return!0}function bi(){yt=cn=null,ma=$e=!1}function Ih(){var e=Rr;return e!==null&&(En===null?En=e:En.push.apply(En,e),Rr=null),e}function Ml(e){Rr===null?Rr=[e]:Rr.push(e)}function Fh(){var e=Fn;if(e!==null){Fn=null;for(var t=Dh(e);0<e.children.length;)e=e.children[0];be(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
98
98
|
|
|
99
99
|
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
100
100
|
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
@@ -104,16 +104,16 @@ https://react.dev/link/hydration-mismatch`+n),e)),lb}function Xy(e){var t=e.stat
|
|
|
104
104
|
|
|
105
105
|
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
106
106
|
|
|
107
|
-
%s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function qu(){Lo=Xf=null,Ho=!1}function hr(e,t,n){ve(
|
|
107
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function qu(){Lo=Xf=null,Ho=!1}function hr(e,t,n){ve(ub,t._currentValue,e),t._currentValue=n,ve(fb,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==Xx&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=Xx}function ja(e,t){e._currentValue=ub.current;var n=fb.current;ie(fb,t),e._currentRenderer=n,ie(ub,t)}function Yh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}e!==n&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Jh(e,t,n,r){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var c=l.dependencies;if(c!==null){var f=l.child;c=c.firstContext;e:for(;c!==null;){var h=c;c=l;for(var y=0;y<t.length;y++)if(h.context===t[y]){c.lanes|=n,h=c.alternate,h!==null&&(h.lanes|=n),Yh(c.return,n,e),r||(f=null);break e}c=h.next}}else if(l.tag===18){if(f=l.return,f===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");f.lanes|=n,c=f.alternate,c!==null&&(c.lanes|=n),Yh(f,n,e),f=null}else f=l.child;if(f!==null)f.return=l;else for(f=l;f!==null;){if(f===e){f=null;break}if(l=f.sibling,l!==null){l.return=f.return,f=l;break}f=f.return}l=f}}function co(e,t,n,r){e=null;for(var l=t,c=!1;l!==null;){if(!c){if((l.flags&524288)!==0)c=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var f=l.alternate;if(f===null)throw Error("Should have a current fiber. This is a bug in React.");if(f=f.memoizedProps,f!==null){var h=l.type;xn(l.pendingProps.value,f.value)||(e!==null?e.push(h):e=[h])}}else if(l===Vf.current){if(f=l.alternate,f===null)throw Error("Should have a current fiber. This is a bug in React.");f.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Kc):e=[Kc])}l=l.return}e!==null&&Jh(t,e,n,r),t.flags|=262144}function Lu(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yi(e){Xf=e,Lo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return Ho&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),Ky(Xf,e)}function Hu(e,t){return Xf===null&&yi(e),Ky(e,t)}function Ky(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Lo===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Lo=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else Lo=Lo.next=t;return n}function Gh(){return{controller:new WD,data:new Map,refCount:0}}function gi(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function kl(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&eC(tC,function(){e.controller.abort()})}function Gs(e,t,n){(e&127)!==0?0>pa&&(pa=qt(),Nc=Zf(t),db=t,n!=null&&(hb=H(n)),(Ze&(Qt|Gn))!==tn&&(Dt=!0,Mr=xc),e=tc(),t=ec(),e!==Po||t!==Sc?Po=-1.1:t!==null&&(Mr=xc),Oi=e,Sc=t):(e&4194048)!==0&&0>us&&(us=qt(),wc=Zf(t),Zx=t,n!=null&&(Kx=H(n)),0>Ya)&&(e=tc(),t=ec(),(e!==Vr||t!==Ri)&&(Vr=-1.1),kr=e,Ri=t)}function v_(e){if(0>pa){pa=qt(),Nc=e._debugTask!=null?e._debugTask:null,(Ze&(Qt|Gn))!==tn&&(Mr=xc);var t=tc(),n=ec();t!==Po||n!==Sc?Po=-1.1:n!==null&&(Mr=xc),Oi=t,Sc=n}0>us&&(us=qt(),wc=e._debugTask!=null?e._debugTask:null,0>Ya)&&(e=tc(),t=ec(),(e!==Vr||t!==Ri)&&(Vr=-1.1),kr=e,Ri=t)}function Ma(){var e=Ci;return Ci=0,e}function Pu(e){var t=Ci;return Ci=e,t}function Vl(e){var t=Ci;return Ci+=e,t}function $u(){Ae=_e=-1.1}function Bn(){var e=_e;return _e=-1.1,e}function qn(e){0<=e&&(_e=e)}function Qs(){var e=St;return St=-0,e}function Xs(e){0<=e&&(St=e)}function Zs(){var e=xt;return xt=null,e}function Ks(){var e=Dt;return Dt=!1,e}function Qh(e){Nn=qt(),0>e.actualStartTime&&(e.actualStartTime=Nn)}function Xh(e){if(0<=Nn){var t=qt()-Nn;e.actualDuration+=t,e.selfBaseDuration=t,Nn=-1}}function Wy(e){if(0<=Nn){var t=qt()-Nn;e.actualDuration+=t,Nn=-1}}function Ws(){if(0<=Nn){var e=qt(),t=e-Nn;Nn=-1,Ci+=t,St+=t,Ae=e}}function eg(e){xt===null&&(xt=[]),xt.push(e),Ia===null&&(Ia=[]),Ia.push(e)}function ea(){Nn=qt(),0>_e&&(_e=Nn)}function Ul(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function x_(e,t){if(_c===null){var n=_c=[];pb=0,ji=rp(),$o={status:"pending",value:void 0,then:function(r){n.push(r)}}}return pb++,t.then(tg,tg),t}function tg(){if(--pb===0&&(-1<us||(Ya=-1.1),_c!==null)){$o!==null&&($o.status="fulfilled");var e=_c;_c=null,ji=0,$o=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function N_(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(r.status="rejected",r.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),r}function Zh(){var e=Mi.current;return e!==null?e:dt.pooledCache}function Iu(e,t){t===null?ve(Mi,Mi.current,e):ve(Mi,t.pool,e)}function ng(){var e=Zh();return e===null?null:{parent:Bt._currentValue,pool:e}}function sg(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function ag(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rg(e,t,n){F.actQueue!==null&&(F.didUsePromise=!0);var r=e.thenables;if(n=r[n],n===void 0?r.push(t):n!==t&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),t.then(Ta,Ta),t=n),t._debugInfo===void 0){e=performance.now(),r=t.displayName;var l={name:typeof r=="string"?r:"Promise",start:e,end:e,value:t};t._debugInfo=[{awaited:l}],t.status!=="fulfilled"&&t.status!=="rejected"&&(e=function(){l.end=performance.now()},t.then(e,e))}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,og(e),e;default:if(typeof t.status=="string")t.then(Ta,Ta);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=t,e.status="pending",e.then(function(c){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=c}},function(c){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=c}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,og(e),e}throw Vi=t,jc=!0,Io}}function mr(e){try{return iC(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Vi=t,jc=!0,Io):t}}function ig(){if(Vi===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Vi;return Vi=null,jc=!1,e}function og(e){if(e===Io||e===rd)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function an(e){var t=Ue;return e!=null&&(Ue=t===null?e:t.concat(e)),t}function Kh(){var e=Ue;if(e!=null){for(var t=e.length-1;0<=t;t--)if(e[t].name!=null){var n=e[t].debugTask;if(n!=null)return n}}return null}function Fu(e,t,n){for(var r=Object.keys(e.props),l=0;l<r.length;l++){var c=r[l];if(c!=="children"&&c!=="key"){t===null&&(t=zu(e,n.mode,0),t._debugInfo=Ue,t.return=n),be(t,function(f){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f)},c);break}}}function Yu(e){var t=Mc;return Mc+=1,Fo===null&&(Fo=sg()),rg(Fo,e,t)}function zl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function lg(e,t){throw t.$$typeof===BA?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
108
108
|
- Multiple copies of the "react" package is used.
|
|
109
109
|
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
110
|
-
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function Ju(e,t){var n=
|
|
110
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function Ju(e,t){var n=Kh();n!==null?n.run(lg.bind(null,e,t)):lg(e,t)}function cg(e,t){var n=H(e)||"Component";gN[n]||(gN[n]=!0,t=t.displayName||t.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
111
111
|
root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
112
|
-
<%s>{%s}</%s>`,t,t,n,t,n))}function Gu(e,t){var n=
|
|
112
|
+
<%s>{%s}</%s>`,t,t,n,t,n))}function Gu(e,t){var n=Kh();n!==null?n.run(cg.bind(null,e,t)):cg(e,t)}function ug(e,t){var n=H(e)||"Component";vN[n]||(vN[n]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
113
113
|
root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
|
|
114
|
-
<%s>%s</%s>`,n,t,n))}function Qu(e,t){var n=Zh();n!==null?n.run(ug.bind(null,e,t)):ug(e,t)}function fg(e){function t(T,R){if(e){var j=T.deletions;j===null?(T.deletions=[R],T.flags|=16):j.push(R)}}function n(T,R){if(!e)return null;for(;R!==null;)t(T,R),R=R.sibling;return null}function r(T){for(var R=new Map;T!==null;)T.key!==null?R.set(T.key,T):R.set(T.index,T),T=T.sibling;return R}function l(T,R){return T=Oa(T,R),T.index=0,T.sibling=null,T}function c(T,R,j){return T.index=j,e?(j=T.alternate,j!==null?(j=j.index,j<R?(T.flags|=67108866,R):j):(T.flags|=67108866,R)):(T.flags|=1048576,R)}function f(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,R,j,G){return R===null||R.tag!==6?(R=qh(j,T.mode,G),R.return=T,R._debugOwner=T,R._debugTask=T._debugTask,R._debugInfo=Ue,R):(R=l(R,j),R.return=T,R._debugInfo=Ue,R)}function y(T,R,j,G){var fe=j.type;return fe===_o?(R=k(T,R,j.props.children,G,j.key),Yu(j,R,T),R):R!==null&&(R.elementType===fe||Hy(R,j)||typeof fe=="object"&&fe!==null&&fe.$$typeof===$n&&mr(fe)===R.type)?(R=l(R,j.props),zl(R,j),R.return=T,R._debugOwner=j._owner,R._debugInfo=Ue,R):(R=zu(j,T.mode,G),zl(R,j),R.return=T,R._debugInfo=Ue,R)}function v(T,R,j,G){return R===null||R.tag!==4||R.stateNode.containerInfo!==j.containerInfo||R.stateNode.implementation!==j.implementation?(R=Lh(j,T.mode,G),R.return=T,R._debugInfo=Ue,R):(R=l(R,j.children||[]),R.return=T,R._debugInfo=Ue,R)}function k(T,R,j,G,fe){return R===null||R.tag!==7?(R=mi(j,T.mode,G,fe),R.return=T,R._debugOwner=T,R._debugTask=T._debugTask,R._debugInfo=Ue,R):(R=l(R,j),R.return=T,R._debugInfo=Ue,R)}function V(T,R,j){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=qh(""+R,T.mode,j),R.return=T,R._debugOwner=T,R._debugTask=T._debugTask,R._debugInfo=Ue,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case oa:return j=zu(R,T.mode,j),zl(j,R),j.return=T,T=an(R._debugInfo),j._debugInfo=Ue,Ue=T,j;case Eo:return R=Lh(R,T.mode,j),R.return=T,R._debugInfo=Ue,R;case $n:var G=an(R._debugInfo);return R=mr(R),T=V(T,R,j),Ue=G,T}if(Jt(R)||oe(R))return j=mi(R,T.mode,j,null),j.return=T,j._debugOwner=T,j._debugTask=T._debugTask,T=an(R._debugInfo),j._debugInfo=Ue,Ue=T,j;if(typeof R.then=="function")return G=an(R._debugInfo),T=V(T,Fu(R),j),Ue=G,T;if(R.$$typeof===la)return V(T,Hu(T,R),j);Ju(T,R)}return typeof R=="function"&&Gu(T,R),typeof R=="symbol"&&Qu(T,R),null}function O(T,R,j,G){var fe=R!==null?R.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return fe!==null?null:h(T,R,""+j,G);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case oa:return j.key===fe?(fe=an(j._debugInfo),T=y(T,R,j,G),Ue=fe,T):null;case Eo:return j.key===fe?v(T,R,j,G):null;case $n:return fe=an(j._debugInfo),j=mr(j),T=O(T,R,j,G),Ue=fe,T}if(Jt(j)||oe(j))return fe!==null?null:(fe=an(j._debugInfo),T=k(T,R,j,G,null),Ue=fe,T);if(typeof j.then=="function")return fe=an(j._debugInfo),T=O(T,R,Fu(j),G),Ue=fe,T;if(j.$$typeof===la)return O(T,R,Hu(T,j),G);Ju(T,j)}return typeof j=="function"&&Gu(T,j),typeof j=="symbol"&&Qu(T,j),null}function P(T,R,j,G,fe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return T=T.get(j)||null,h(R,T,""+G,fe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case oa:return j=T.get(G.key===null?j:G.key)||null,T=an(G._debugInfo),R=y(R,j,G,fe),Ue=T,R;case Eo:return T=T.get(G.key===null?j:G.key)||null,v(R,T,G,fe);case $n:var Re=an(G._debugInfo);return G=mr(G),R=P(T,R,j,G,fe),Ue=Re,R}if(Jt(G)||oe(G))return j=T.get(j)||null,T=an(G._debugInfo),R=k(R,j,G,fe,null),Ue=T,R;if(typeof G.then=="function")return Re=an(G._debugInfo),R=P(T,R,j,Fu(G),fe),Ue=Re,R;if(G.$$typeof===la)return P(T,R,j,Hu(R,G),fe);Ju(R,G)}return typeof G=="function"&&Gu(R,G),typeof G=="symbol"&&Qu(R,G),null}function ce(T,R,j,G){if(typeof j!="object"||j===null)return G;switch(j.$$typeof){case oa:case Eo:_(T,R,j);var fe=j.key;if(typeof fe!="string")break;if(G===null){G=new Set,G.add(fe);break}if(!G.has(fe)){G.add(fe);break}be(R,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",fe)});break;case $n:j=mr(j),ce(T,R,j,G)}return G}function me(T,R,j,G){for(var fe=null,Re=null,Ee=null,Se=R,ke=R=0,gt=null;Se!==null&&ke<j.length;ke++){Se.index>ke?(gt=Se,Se=null):gt=Se.sibling;var kt=O(T,Se,j[ke],G);if(kt===null){Se===null&&(Se=gt);break}fe=ce(T,kt,j[ke],fe),e&&Se&&kt.alternate===null&&t(T,Se),R=c(kt,R,ke),Ee===null?Re=kt:Ee.sibling=kt,Ee=kt,Se=gt}if(ke===j.length)return n(T,Se),$e&&Ra(T,ke),Re;if(Se===null){for(;ke<j.length;ke++)Se=V(T,j[ke],G),Se!==null&&(fe=ce(T,Se,j[ke],fe),R=c(Se,R,ke),Ee===null?Re=Se:Ee.sibling=Se,Ee=Se);return $e&&Ra(T,ke),Re}for(Se=r(Se);ke<j.length;ke++)gt=P(Se,T,ke,j[ke],G),gt!==null&&(fe=ce(T,gt,j[ke],fe),e&>.alternate!==null&&Se.delete(gt.key===null?ke:gt.key),R=c(gt,R,ke),Ee===null?Re=gt:Ee.sibling=gt,Ee=gt);return e&&Se.forEach(function(er){return t(T,er)}),$e&&Ra(T,ke),Re}function mt(T,R,j,G){if(j==null)throw Error("An iterable object provided no iterator.");for(var fe=null,Re=null,Ee=R,Se=R=0,ke=null,gt=null,kt=j.next();Ee!==null&&!kt.done;Se++,kt=j.next()){Ee.index>Se?(ke=Ee,Ee=null):ke=Ee.sibling;var er=O(T,Ee,kt.value,G);if(er===null){Ee===null&&(Ee=ke);break}gt=ce(T,er,kt.value,gt),e&&Ee&&er.alternate===null&&t(T,Ee),R=c(er,R,Se),Re===null?fe=er:Re.sibling=er,Re=er,Ee=ke}if(kt.done)return n(T,Ee),$e&&Ra(T,Se),fe;if(Ee===null){for(;!kt.done;Se++,kt=j.next())Ee=V(T,kt.value,G),Ee!==null&&(gt=ce(T,Ee,kt.value,gt),R=c(Ee,R,Se),Re===null?fe=Ee:Re.sibling=Ee,Re=Ee);return $e&&Ra(T,Se),fe}for(Ee=r(Ee);!kt.done;Se++,kt=j.next())ke=P(Ee,T,Se,kt.value,G),ke!==null&&(gt=ce(T,ke,kt.value,gt),e&&ke.alternate!==null&&Ee.delete(ke.key===null?Se:ke.key),R=c(ke,R,Se),Re===null?fe=ke:Re.sibling=ke,Re=ke);return e&&Ee.forEach(function(OC){return t(T,OC)}),$e&&Ra(T,Se),fe}function Fe(T,R,j,G){if(typeof j=="object"&&j!==null&&j.type===_o&&j.key===null&&(Yu(j,null,T),j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case oa:var fe=an(j._debugInfo);e:{for(var Re=j.key;R!==null;){if(R.key===Re){if(Re=j.type,Re===_o){if(R.tag===7){n(T,R.sibling),G=l(R,j.props.children),G.return=T,G._debugOwner=j._owner,G._debugInfo=Ue,Yu(j,G,T),T=G;break e}}else if(R.elementType===Re||Hy(R,j)||typeof Re=="object"&&Re!==null&&Re.$$typeof===$n&&mr(Re)===R.type){n(T,R.sibling),G=l(R,j.props),zl(G,j),G.return=T,G._debugOwner=j._owner,G._debugInfo=Ue,T=G;break e}n(T,R);break}else t(T,R);R=R.sibling}j.type===_o?(G=mi(j.props.children,T.mode,G,j.key),G.return=T,G._debugOwner=T,G._debugTask=T._debugTask,G._debugInfo=Ue,Yu(j,G,T),T=G):(G=zu(j,T.mode,G),zl(G,j),G.return=T,G._debugInfo=Ue,T=G)}return T=f(T),Ue=fe,T;case Eo:e:{for(fe=j,j=fe.key;R!==null;){if(R.key===j)if(R.tag===4&&R.stateNode.containerInfo===fe.containerInfo&&R.stateNode.implementation===fe.implementation){n(T,R.sibling),G=l(R,fe.children||[]),G.return=T,T=G;break e}else{n(T,R);break}else t(T,R);R=R.sibling}G=Lh(fe,T.mode,G),G.return=T,T=G}return f(T);case $n:return fe=an(j._debugInfo),j=mr(j),T=Fe(T,R,j,G),Ue=fe,T}if(Jt(j))return fe=an(j._debugInfo),T=me(T,R,j,G),Ue=fe,T;if(oe(j)){if(fe=an(j._debugInfo),Re=oe(j),typeof Re!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ee=Re.call(j);return Ee===j?(T.tag!==0||Object.prototype.toString.call(T.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ee)!=="[object Generator]")&&(bN||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),bN=!0):j.entries!==Re||gb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),gb=!0),T=mt(T,R,Ee,G),Ue=fe,T}if(typeof j.then=="function")return fe=an(j._debugInfo),T=Fe(T,R,Fu(j),G),Ue=fe,T;if(j.$$typeof===la)return Fe(T,R,Hu(T,j),G);Ju(T,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(fe=""+j,R!==null&&R.tag===6?(n(T,R.sibling),G=l(R,fe),G.return=T,T=G):(n(T,R),G=qh(fe,T.mode,G),G.return=T,G._debugOwner=T,G._debugTask=T._debugTask,G._debugInfo=Ue,T=G),f(T)):(typeof j=="function"&&Gu(T,j),typeof j=="symbol"&&Qu(T,j),n(T,R))}return function(T,R,j,G){var fe=Ue;Ue=null;try{Mc=0;var Re=Fe(T,R,j,G);return Yo=null,Re}catch(gt){if(gt===Io||gt===rd)throw gt;var Ee=D(29,gt,null,T.mode);Ee.lanes=G,Ee.return=T;var Se=Ee._debugInfo=Ue;if(Ee._debugOwner=T._debugOwner,Ee._debugTask=T._debugTask,Se!=null){for(var ke=Se.length-1;0<=ke;ke--)if(typeof Se[ke].stack=="string"){Ee._debugOwner=Se[ke],Ee._debugTask=Se[ke].debugTask;break}}return Ee}finally{Ue=fe}}}function dg(e,t){var n=Jt(e);return e=!n&&typeof oe(e)=="function",n||e?(n=n?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",n,t,n),!1):!0}function Kh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pr(e){return{lane:e,tag:NN,payload:null,callback:null,next:null}}function br(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,xb===r&&!EN){var l=H(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
114
|
+
<%s>%s</%s>`,n,t,n))}function Qu(e,t){var n=Kh();n!==null?n.run(ug.bind(null,e,t)):ug(e,t)}function fg(e){function t(T,R){if(e){var j=T.deletions;j===null?(T.deletions=[R],T.flags|=16):j.push(R)}}function n(T,R){if(!e)return null;for(;R!==null;)t(T,R),R=R.sibling;return null}function r(T){for(var R=new Map;T!==null;)T.key!==null?R.set(T.key,T):R.set(T.index,T),T=T.sibling;return R}function l(T,R){return T=Oa(T,R),T.index=0,T.sibling=null,T}function c(T,R,j){return T.index=j,e?(j=T.alternate,j!==null?(j=j.index,j<R?(T.flags|=67108866,R):j):(T.flags|=67108866,R)):(T.flags|=1048576,R)}function f(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,R,j,G){return R===null||R.tag!==6?(R=Lh(j,T.mode,G),R.return=T,R._debugOwner=T,R._debugTask=T._debugTask,R._debugInfo=Ue,R):(R=l(R,j),R.return=T,R._debugInfo=Ue,R)}function y(T,R,j,G){var fe=j.type;return fe===_o?(R=k(T,R,j.props.children,G,j.key),Fu(j,R,T),R):R!==null&&(R.elementType===fe||Hy(R,j)||typeof fe=="object"&&fe!==null&&fe.$$typeof===$n&&mr(fe)===R.type)?(R=l(R,j.props),zl(R,j),R.return=T,R._debugOwner=j._owner,R._debugInfo=Ue,R):(R=zu(j,T.mode,G),zl(R,j),R.return=T,R._debugInfo=Ue,R)}function v(T,R,j,G){return R===null||R.tag!==4||R.stateNode.containerInfo!==j.containerInfo||R.stateNode.implementation!==j.implementation?(R=Hh(j,T.mode,G),R.return=T,R._debugInfo=Ue,R):(R=l(R,j.children||[]),R.return=T,R._debugInfo=Ue,R)}function k(T,R,j,G,fe){return R===null||R.tag!==7?(R=mi(j,T.mode,G,fe),R.return=T,R._debugOwner=T,R._debugTask=T._debugTask,R._debugInfo=Ue,R):(R=l(R,j),R.return=T,R._debugInfo=Ue,R)}function V(T,R,j){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Lh(""+R,T.mode,j),R.return=T,R._debugOwner=T,R._debugTask=T._debugTask,R._debugInfo=Ue,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case oa:return j=zu(R,T.mode,j),zl(j,R),j.return=T,T=an(R._debugInfo),j._debugInfo=Ue,Ue=T,j;case Eo:return R=Hh(R,T.mode,j),R.return=T,R._debugInfo=Ue,R;case $n:var G=an(R._debugInfo);return R=mr(R),T=V(T,R,j),Ue=G,T}if(Jt(R)||oe(R))return j=mi(R,T.mode,j,null),j.return=T,j._debugOwner=T,j._debugTask=T._debugTask,T=an(R._debugInfo),j._debugInfo=Ue,Ue=T,j;if(typeof R.then=="function")return G=an(R._debugInfo),T=V(T,Yu(R),j),Ue=G,T;if(R.$$typeof===la)return V(T,Hu(T,R),j);Ju(T,R)}return typeof R=="function"&&Gu(T,R),typeof R=="symbol"&&Qu(T,R),null}function O(T,R,j,G){var fe=R!==null?R.key:null;if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return fe!==null?null:h(T,R,""+j,G);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case oa:return j.key===fe?(fe=an(j._debugInfo),T=y(T,R,j,G),Ue=fe,T):null;case Eo:return j.key===fe?v(T,R,j,G):null;case $n:return fe=an(j._debugInfo),j=mr(j),T=O(T,R,j,G),Ue=fe,T}if(Jt(j)||oe(j))return fe!==null?null:(fe=an(j._debugInfo),T=k(T,R,j,G,null),Ue=fe,T);if(typeof j.then=="function")return fe=an(j._debugInfo),T=O(T,R,Yu(j),G),Ue=fe,T;if(j.$$typeof===la)return O(T,R,Hu(T,j),G);Ju(T,j)}return typeof j=="function"&&Gu(T,j),typeof j=="symbol"&&Qu(T,j),null}function P(T,R,j,G,fe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return T=T.get(j)||null,h(R,T,""+G,fe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case oa:return j=T.get(G.key===null?j:G.key)||null,T=an(G._debugInfo),R=y(R,j,G,fe),Ue=T,R;case Eo:return T=T.get(G.key===null?j:G.key)||null,v(R,T,G,fe);case $n:var Re=an(G._debugInfo);return G=mr(G),R=P(T,R,j,G,fe),Ue=Re,R}if(Jt(G)||oe(G))return j=T.get(j)||null,T=an(G._debugInfo),R=k(R,j,G,fe,null),Ue=T,R;if(typeof G.then=="function")return Re=an(G._debugInfo),R=P(T,R,j,Yu(G),fe),Ue=Re,R;if(G.$$typeof===la)return P(T,R,j,Hu(R,G),fe);Ju(R,G)}return typeof G=="function"&&Gu(R,G),typeof G=="symbol"&&Qu(R,G),null}function ce(T,R,j,G){if(typeof j!="object"||j===null)return G;switch(j.$$typeof){case oa:case Eo:_(T,R,j);var fe=j.key;if(typeof fe!="string")break;if(G===null){G=new Set,G.add(fe);break}if(!G.has(fe)){G.add(fe);break}be(R,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",fe)});break;case $n:j=mr(j),ce(T,R,j,G)}return G}function me(T,R,j,G){for(var fe=null,Re=null,Ee=null,Se=R,ke=R=0,gt=null;Se!==null&&ke<j.length;ke++){Se.index>ke?(gt=Se,Se=null):gt=Se.sibling;var kt=O(T,Se,j[ke],G);if(kt===null){Se===null&&(Se=gt);break}fe=ce(T,kt,j[ke],fe),e&&Se&&kt.alternate===null&&t(T,Se),R=c(kt,R,ke),Ee===null?Re=kt:Ee.sibling=kt,Ee=kt,Se=gt}if(ke===j.length)return n(T,Se),$e&&Ra(T,ke),Re;if(Se===null){for(;ke<j.length;ke++)Se=V(T,j[ke],G),Se!==null&&(fe=ce(T,Se,j[ke],fe),R=c(Se,R,ke),Ee===null?Re=Se:Ee.sibling=Se,Ee=Se);return $e&&Ra(T,ke),Re}for(Se=r(Se);ke<j.length;ke++)gt=P(Se,T,ke,j[ke],G),gt!==null&&(fe=ce(T,gt,j[ke],fe),e&>.alternate!==null&&Se.delete(gt.key===null?ke:gt.key),R=c(gt,R,ke),Ee===null?Re=gt:Ee.sibling=gt,Ee=gt);return e&&Se.forEach(function(er){return t(T,er)}),$e&&Ra(T,ke),Re}function mt(T,R,j,G){if(j==null)throw Error("An iterable object provided no iterator.");for(var fe=null,Re=null,Ee=R,Se=R=0,ke=null,gt=null,kt=j.next();Ee!==null&&!kt.done;Se++,kt=j.next()){Ee.index>Se?(ke=Ee,Ee=null):ke=Ee.sibling;var er=O(T,Ee,kt.value,G);if(er===null){Ee===null&&(Ee=ke);break}gt=ce(T,er,kt.value,gt),e&&Ee&&er.alternate===null&&t(T,Ee),R=c(er,R,Se),Re===null?fe=er:Re.sibling=er,Re=er,Ee=ke}if(kt.done)return n(T,Ee),$e&&Ra(T,Se),fe;if(Ee===null){for(;!kt.done;Se++,kt=j.next())Ee=V(T,kt.value,G),Ee!==null&&(gt=ce(T,Ee,kt.value,gt),R=c(Ee,R,Se),Re===null?fe=Ee:Re.sibling=Ee,Re=Ee);return $e&&Ra(T,Se),fe}for(Ee=r(Ee);!kt.done;Se++,kt=j.next())ke=P(Ee,T,Se,kt.value,G),ke!==null&&(gt=ce(T,ke,kt.value,gt),e&&ke.alternate!==null&&Ee.delete(ke.key===null?Se:ke.key),R=c(ke,R,Se),Re===null?fe=ke:Re.sibling=ke,Re=ke);return e&&Ee.forEach(function(OC){return t(T,OC)}),$e&&Ra(T,Se),fe}function Ye(T,R,j,G){if(typeof j=="object"&&j!==null&&j.type===_o&&j.key===null&&(Fu(j,null,T),j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case oa:var fe=an(j._debugInfo);e:{for(var Re=j.key;R!==null;){if(R.key===Re){if(Re=j.type,Re===_o){if(R.tag===7){n(T,R.sibling),G=l(R,j.props.children),G.return=T,G._debugOwner=j._owner,G._debugInfo=Ue,Fu(j,G,T),T=G;break e}}else if(R.elementType===Re||Hy(R,j)||typeof Re=="object"&&Re!==null&&Re.$$typeof===$n&&mr(Re)===R.type){n(T,R.sibling),G=l(R,j.props),zl(G,j),G.return=T,G._debugOwner=j._owner,G._debugInfo=Ue,T=G;break e}n(T,R);break}else t(T,R);R=R.sibling}j.type===_o?(G=mi(j.props.children,T.mode,G,j.key),G.return=T,G._debugOwner=T,G._debugTask=T._debugTask,G._debugInfo=Ue,Fu(j,G,T),T=G):(G=zu(j,T.mode,G),zl(G,j),G.return=T,G._debugInfo=Ue,T=G)}return T=f(T),Ue=fe,T;case Eo:e:{for(fe=j,j=fe.key;R!==null;){if(R.key===j)if(R.tag===4&&R.stateNode.containerInfo===fe.containerInfo&&R.stateNode.implementation===fe.implementation){n(T,R.sibling),G=l(R,fe.children||[]),G.return=T,T=G;break e}else{n(T,R);break}else t(T,R);R=R.sibling}G=Hh(fe,T.mode,G),G.return=T,T=G}return f(T);case $n:return fe=an(j._debugInfo),j=mr(j),T=Ye(T,R,j,G),Ue=fe,T}if(Jt(j))return fe=an(j._debugInfo),T=me(T,R,j,G),Ue=fe,T;if(oe(j)){if(fe=an(j._debugInfo),Re=oe(j),typeof Re!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ee=Re.call(j);return Ee===j?(T.tag!==0||Object.prototype.toString.call(T.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ee)!=="[object Generator]")&&(bN||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),bN=!0):j.entries!==Re||vb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),vb=!0),T=mt(T,R,Ee,G),Ue=fe,T}if(typeof j.then=="function")return fe=an(j._debugInfo),T=Ye(T,R,Yu(j),G),Ue=fe,T;if(j.$$typeof===la)return Ye(T,R,Hu(T,j),G);Ju(T,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(fe=""+j,R!==null&&R.tag===6?(n(T,R.sibling),G=l(R,fe),G.return=T,T=G):(n(T,R),G=Lh(fe,T.mode,G),G.return=T,G._debugOwner=T,G._debugTask=T._debugTask,G._debugInfo=Ue,T=G),f(T)):(typeof j=="function"&&Gu(T,j),typeof j=="symbol"&&Qu(T,j),n(T,R))}return function(T,R,j,G){var fe=Ue;Ue=null;try{Mc=0;var Re=Ye(T,R,j,G);return Fo=null,Re}catch(gt){if(gt===Io||gt===rd)throw gt;var Ee=D(29,gt,null,T.mode);Ee.lanes=G,Ee.return=T;var Se=Ee._debugInfo=Ue;if(Ee._debugOwner=T._debugOwner,Ee._debugTask=T._debugTask,Se!=null){for(var ke=Se.length-1;0<=ke;ke--)if(typeof Se[ke].stack=="string"){Ee._debugOwner=Se[ke],Ee._debugTask=Se[ke].debugTask;break}}return Ee}finally{Ue=fe}}}function dg(e,t){var n=Jt(e);return e=!n&&typeof oe(e)=="function",n||e?(n=n?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",n,t,n),!1):!0}function Wh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function em(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pr(e){return{lane:e,tag:NN,payload:null,callback:null,next:null}}function br(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nb===r&&!EN){var l=H(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
115
115
|
|
|
116
|
-
Please update the following component: %s`,l),EN=!0}return(
|
|
116
|
+
Please update the following component: %s`,l),EN=!0}return(Ze&Qt)!==tn?(l=r.pending,l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,t=Uu(e),Ly(e,null,n),t):(Vu(e,r,t,n),Uu(e))}function Bl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_u(e,n)}}function Xu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?l=c=f:c=c.next=f,n=n.next}while(n!==null);c===null?l=c=t:c=c.next=t}else l=c=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:c,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ql(){if(Sb){var e=$o;if(e!==null)throw e}}function Ll(e,t,n,r){Sb=!1;var l=e.updateQueue;Ur=!1,Nb=l.shared;var c=l.firstBaseUpdate,f=l.lastBaseUpdate,h=l.shared.pending;if(h!==null){l.shared.pending=null;var y=h,v=y.next;y.next=null,f===null?c=v:f.next=v,f=y;var k=e.alternate;k!==null&&(k=k.updateQueue,h=k.lastBaseUpdate,h!==f&&(h===null?k.firstBaseUpdate=v:h.next=v,k.lastBaseUpdate=y))}if(c!==null){var V=l.baseState;f=0,k=v=y=null,h=c;do{var O=h.lane&-536870913,P=O!==h.lane;if(P?(ze&O)===O:(r&O)===O){O!==0&&O===ji&&(Sb=!0),k!==null&&(k=k.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{O=e;var ce=h,me=t,mt=n;switch(ce.tag){case SN:if(ce=ce.payload,typeof ce=="function"){Ho=!0;var Ye=ce.call(mt,V,me);if(O.mode&mn){pt(!0);try{ce.call(mt,V,me)}finally{pt(!1)}}Ho=!1,V=Ye;break e}V=ce;break e;case xb:O.flags=O.flags&-65537|128;case NN:if(Ye=ce.payload,typeof Ye=="function"){if(Ho=!0,ce=Ye.call(mt,V,me),O.mode&mn){pt(!0);try{Ye.call(mt,V,me)}finally{pt(!1)}}Ho=!1}else ce=Ye;if(ce==null)break e;V=Pe({},V,ce);break e;case wN:Ur=!0}}O=h.callback,O!==null&&(e.flags|=64,P&&(e.flags|=8192),P=l.callbacks,P===null?l.callbacks=[O]:P.push(O))}else P={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},k===null?(v=k=P,y=V):k=k.next=P,f|=O;if(h=h.next,h===null){if(h=l.shared.pending,h===null)break;P=h,h=P.next,P.next=null,l.lastBaseUpdate=P,l.shared.pending=null}}while(!0);k===null&&(y=V),l.baseState=y,l.firstBaseUpdate=v,l.lastBaseUpdate=k,c===null&&(l.shared.lanes=0),qr|=f,e.lanes=f,e.memoizedState=V}Nb=null}function hg(e,t){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function S_(e,t){var n=e.shared.hiddenCallbacks;if(n!==null)for(e.shared.hiddenCallbacks=null,e=0;e<n.length;e++)hg(n[e],t)}function mg(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)hg(n[e],t)}function pg(e,t){var n=ya;ve(od,n,e),ve(Yo,t,e),ya=n|t.baseLanes}function tm(e){ve(od,ya,e),ve(Yo,Yo.current,e)}function nm(e){ya=od.current,ie(Yo,e),ie(od,e)}function yr(e){var t=e.alternate;ve(Mt,Mt.current&Jo,e),ve(Yn,e,e),fs===null&&(t===null||Yo.current!==null||t.memoizedState!==null)&&(fs=e)}function sm(e){ve(Mt,Mt.current,e),ve(Yn,e,e),fs===null&&(fs=e)}function bg(e){e.tag===22?(ve(Mt,Mt.current,e),ve(Yn,e,e),fs===null&&(fs=e)):gr(e)}function gr(e){ve(Mt,Mt.current,e),ve(Yn,Yn.current,e)}function Ln(e){ie(Yn,e),fs===e&&(fs=null),ie(Mt,e)}function Zu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||bp(n)||yp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function He(){var e=I;hs===null?hs=[e]:hs.push(e)}function re(){var e=I;if(hs!==null&&(Qa++,hs[Qa]!==e)){var t=H(Oe);if(!_N.has(t)&&(_N.add(t),hs!==null)){for(var n="",r=0;r<=Qa;r++){var l=hs[r],c=r===Qa?e:l;for(l=r+1+". "+l;30>l.length;)l+=" ";l+=c+`
|
|
117
117
|
`,n+=l}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
118
118
|
|
|
119
119
|
Previous render Next render
|
|
@@ -123,14 +123,14 @@ Please update the following component: %s`,l),EN=!0}return(Xe&Qt)!==tn?(l=r.pend
|
|
|
123
123
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
124
124
|
2. You might be breaking the Rules of Hooks
|
|
125
125
|
3. You might have more than one copy of React in the same app
|
|
126
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function
|
|
126
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function am(e,t){if(Uc)return!1;if(t===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",I),!1;e.length!==t.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
127
127
|
|
|
128
128
|
Previous: %s
|
|
129
|
-
Incoming: %s`,I,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function am(e,t,n,r,l,c){Ja=c,Oe=t,hs=e!==null?e._debugHookTypes:null,Qa=-1,Uc=e!==null&&e.type!==t.type,(Object.prototype.toString.call(n)==="[object AsyncFunction]"||Object.prototype.toString.call(n)==="[object AsyncGeneratorFunction]")&&(c=H(Oe),Sb.has(c)||(Sb.add(c),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",c===null?"An unknown Component":"<"+c+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e!==null&&e.memoizedState!==null?Eb:hs!==null?CN:wb,zi=c=(t.mode&mn)!==Ce;var f=pb(n,r,l);if(zi=!1,Qo&&(f=rm(t,n,r,l)),c){pt(!0);try{f=rm(t,n,r,l)}finally{pt(!1)}}return yg(e,t),f}function yg(e,t){t._debugHookTypes=hs,t.dependencies===null?Ga!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:Ga}):t.dependencies._debugThenableState=Ga,Y.H=zc;var n=ft!==null&&ft.next!==null;if(Ja=0,hs=I=Lt=ft=Oe=null,Qa=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),cd=!1,Vc=0,Ga=null,n)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||Ht||(e=e.dependencies,e!==null&&Lu(e)&&(Ht=!0)),jc?(jc=!1,e=!0):e=!1,e&&(t=H(t)||"Unknown",AN.has(t)||Sb.has(t)||(AN.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function rm(e,t,n,r){Oe=e;var l=0;do{if(Qo&&(Ga=null),Vc=0,Qo=!1,l>=lC)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(l+=1,Uc=!1,Lt=ft=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}Qa=-1,Y.H=TN,c=pb(t,n,r)}while(Qo);return c}function w_(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?Hl(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Oe.flags|=1024),t}function im(){var e=ud!==0;return ud=0,e}function om(e,t,n){t.updateQueue=e.updateQueue,t.flags=(t.mode&_s)!==Ce?t.flags&-402655237:t.flags&-2053,e.lanes&=~n}function lm(e){if(cd){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}cd=!1}Ja=0,hs=Lt=ft=Oe=null,Qa=-1,I=null,Qo=!1,Vc=ud=0,Ga=null}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Oe.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function ot(){if(ft===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Lt===null?Oe.memoizedState:Lt.next;if(t!==null)Lt=t,ft=e;else{if(e===null)throw Oe.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Lt===null?Oe.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Wu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hl(e){var t=Vc;return Vc+=1,Ga===null&&(Ga=sg()),e=rg(Ga,e,t),t=Oe,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,Y.H=t!==null&&t.memoizedState!==null?Eb:wb),e}function vr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hl(e);if(e.$$typeof===la)return vt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function vi(e){var t=null,n=Oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Oe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Wu(),Oe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0||Uc)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=qA;else n.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",n.length,e);return t.index++,n}function Ss(e,t){return typeof t=="function"?t(e):t}function cm(e,t,n){var r=bn();if(n!==void 0){var l=n(t);if(zi){pt(!0);try{n(t)}finally{pt(!1)}}}else l=t;return r.memoizedState=r.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},r.queue=e,e=e.dispatch=C_.bind(null,Oe,e),[r.memoizedState,e]}function fo(e){var t=ot();return um(t,ft,e)}function um(e,t,n){var r=e.queue;if(r===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");r.lastRenderedReducer=n;var l=e.baseQueue,c=r.pending;if(c!==null){if(l!==null){var f=l.next;l.next=c.next,c.next=f}t.baseQueue!==l&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=l=c,r.pending=null}if(c=e.baseState,l===null)e.memoizedState=c;else{t=l.next;var h=f=null,y=null,v=t,k=!1;do{var V=v.lane&-536870913;if(V!==v.lane?(ze&V)===V:(Ja&V)===V){var O=v.revertLane;if(O===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null}),V===ji&&(k=!0);else if((Ja&O)===O){v=v.next,O===ji&&(k=!0);continue}else V={lane:0,revertLane:v.revertLane,gesture:null,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null},y===null?(h=y=V,f=c):y=y.next=V,Oe.lanes|=O,qr|=O;V=v.action,zi&&n(c,V),c=v.hasEagerState?v.eagerState:n(c,V)}else O={lane:V,revertLane:v.revertLane,gesture:v.gesture,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null},y===null?(h=y=O,f=c):y=y.next=O,Oe.lanes|=V,qr|=V;v=v.next}while(v!==null&&v!==t);if(y===null?f=c:y.next=h,!xn(c,e.memoizedState)&&(Ht=!0,k&&(n=$o,n!==null)))throw n;e.memoizedState=c,e.baseState=f,e.baseQueue=y,r.lastRenderedState=c}return l===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Pl(e){var t=ot(),n=t.queue;if(n===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,c=t.memoizedState;if(l!==null){n.pending=null;var f=l=l.next;do c=e(c,f.action),f=f.next;while(f!==l);xn(c,t.memoizedState)||(Ht=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,r]}function fm(e,t,n){var r=Oe,l=bn();if($e){if(n===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var c=n();Go||c===n()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Go=!0)}else{if(c=t(),Go||(n=t(),xn(c,n)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Go=!0)),dt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ze&127)!==0||gg(r,t,c)}return l.memoizedState=c,n={value:c,getSnapshot:t},l.queue=n,sf(xg.bind(null,r,n,e),[e]),r.flags|=2048,mo(ds|wn,{destroy:void 0},vg.bind(null,r,n,c,t),null),c}function ef(e,t,n){var r=Oe,l=ot(),c=$e;if(c){if(n===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");n=n()}else if(n=t(),!Go){var f=t();xn(n,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Go=!0)}(f=!xn((ft||l).memoizedState,n))&&(l.memoizedState=n,Ht=!0),l=l.queue;var h=xg.bind(null,r,l,e);if(On(2048,wn,h,[e]),l.getSnapshot!==t||f||Lt!==null&&Lt.memoizedState.tag&ds){if(r.flags|=2048,mo(ds|wn,{destroy:void 0},vg.bind(null,r,l,n,t),null),dt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");c||(Ja&127)!==0||gg(r,t,n)}return n}function gg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t=Wu(),Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vg(e,t,n,r){t.value=n,t.getSnapshot=r,Ng(t)&&Sg(e)}function xg(e,t,n){return n(function(){Ng(t)&&(Gs(2,"updateSyncExternalStore()",e),Sg(e))})}function Ng(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function Sg(e){var t=dn(e,2);t!==null&&At(t,e,2)}function dm(e){var t=bn();if(typeof e=="function"){var n=e;if(e=n(),zi){pt(!0);try{n()}finally{pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:e},t}function hm(e){e=dm(e);var t=e.queue,n=Hg.bind(null,Oe,t);return t.dispatch=n,[e.memoizedState,n]}function mm(e){var t=bn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Cm.bind(null,Oe,!0,n),n.dispatch=t,[e,t]}function wg(e,t){var n=ot();return Eg(n,ft,e,t)}function Eg(e,t,n,r){return e.baseState=n,um(e,ft,typeof r=="function"?r:Ss)}function _g(e,t){var n=ot();return ft!==null?Eg(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])}function E_(e,t,n,r,l){if(uf(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var c={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){c.listeners.push(f)}};Y.T!==null?n(!0):c.isTransition=!1,r(c),n=t.pending,n===null?(c.next=t.pending=c,Ag(t,c)):(c.next=n.next,t.pending=n.next=c)}}function Ag(e,t){var n=t.action,r=t.payload,l=e.state;if(t.isTransition){var c=Y.T,f={};f._updatedFibers=new Set,Y.T=f;try{var h=n(l,r),y=Y.S;y!==null&&y(f,h),Dg(e,t,h)}catch(v){pm(e,t,v)}finally{c!==null&&f.types!==null&&(c.types!==null&&c.types!==f.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),c.types=f.types),Y.T=c,c===null&&f._updatedFibers&&(e=f._updatedFibers.size,f._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{f=n(l,r),Dg(e,t,f)}catch(v){pm(e,t,v)}}function Dg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?(Y.asyncTransitions++,n.then(cf,cf),n.then(function(r){Cg(e,t,r)},function(r){return pm(e,t,r)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):Cg(e,t,n)}function Cg(e,t,n){t.status="fulfilled",t.value=n,Tg(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ag(e,n)))}function pm(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Tg(t),t=t.next;while(t!==r)}e.action=null}function Tg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Og(e,t){return t}function ho(e,t){if($e){var n=dt.formState;if(n!==null){e:{var r=Oe;if($e){if(yt){t:{for(var l=yt,c=cs;l.nodeType!==8;){if(!c){l=null;break t}if(l=Pn(l.nextSibling),l===null){l=null;break t}}c=l.data,l=c===Jb||c===mS?l:null}if(l){yt=Pn(l.nextSibling),r=l.data===Jb;break e}}dr(r)}r=!1}r&&(t=n[0])}}return n=bn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Og,lastRenderedState:t},n.queue=r,n=Hg.bind(null,Oe,r),r.dispatch=n,r=dm(!1),c=Cm.bind(null,Oe,!1,r.queue),r=bn(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=E_.bind(null,Oe,l,c,n),l.dispatch=n,r.memoizedState=e,[t,n,!1]}function tf(e){var t=ot();return Rg(t,ft,e)}function Rg(e,t,n){if(t=um(e,t,Og)[0],e=fo(Ss)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Hl(t)}catch(f){throw f===Io?rd:f}else r=t;t=ot();var l=t.queue,c=l.dispatch;return n!==t.memoizedState&&(Oe.flags|=2048,mo(ds|wn,{destroy:void 0},__.bind(null,l,n),null)),[r,c,e]}function __(e,t){e.action=t}function nf(e){var t=ot(),n=ft;if(n!==null)return Rg(t,n,e);ot(),t=t.memoizedState,n=ot();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function mo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=Wu(),Oe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function bm(e){var t=bn();return e={current:e},t.memoizedState=e}function xi(e,t,n,r){var l=bn();Oe.flags|=e,l.memoizedState=mo(ds|t,{destroy:void 0},n,r===void 0?null:r)}function On(e,t,n,r){var l=ot();r=r===void 0?null:r;var c=l.memoizedState.inst;ft!==null&&r!==null&&sm(r,ft.memoizedState.deps)?l.memoizedState=mo(t,c,n,r):(Oe.flags|=e,l.memoizedState=mo(ds|t,c,n,r))}function sf(e,t){(Oe.mode&_s)!==Ce?xi(276826112,wn,e,t):xi(8390656,wn,e,t)}function A_(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=Wu(),Oe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ym(e){var t=bn(),n={impl:e};return t.memoizedState=n,function(){if((Xe&Qt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function af(e){var t=ot().memoizedState;return A_({ref:t,nextImpl:e}),function(){if((Xe&Qt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function gm(e,t){var n=4194308;return(Oe.mode&_s)!==Ce&&(n|=134217728),xi(n,Jn,e,t)}function jg(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return t.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(t).join(", ")+"}"),e=e(),t.current=e,function(){t.current=null}}function vm(e,t,n){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),n=n!=null?n.concat([e]):null;var r=4194308;(Oe.mode&_s)!==Ce&&(r|=134217728),xi(r,Jn,jg.bind(null,t,e),n)}function rf(e,t,n){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),n=n!=null?n.concat([e]):null,On(4,Jn,jg.bind(null,t,e),n)}function xm(e,t){return bn().memoizedState=[e,t===void 0?null:t],e}function of(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&sm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Nm(e,t){var n=bn();t=t===void 0?null:t;var r=e();if(zi){pt(!0);try{e()}finally{pt(!1)}}return n.memoizedState=[r,t],r}function lf(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&sm(t,r[1]))return r[0];if(r=e(),zi){pt(!0);try{e()}finally{pt(!1)}}return n.memoizedState=[r,t],r}function Sm(e,t){var n=bn();return wm(n,e,t)}function Mg(e,t){var n=ot();return Vg(n,ft.memoizedState,e,t)}function kg(e,t){var n=ot();return ft===null?wm(n,e,t):Vg(n,ft.memoizedState,e,t)}function wm(e,t,n){return n===void 0||(Ja&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Uv(),Oe.lanes|=e,qr|=e,n)}function Vg(e,t,n,r){return xn(n,t)?n:Fo.current!==null?(e=wm(e,n,r),xn(e,t)||(Ht=!0),e):(Ja&42)===0||(Ja&1073741824)!==0&&(ze&261930)===0?(Ht=!0,e.memoizedState=n):(e=Uv(),Oe.lanes|=e,qr|=e,t)}function cf(){Y.asyncTransitions--}function Ug(e,t,n,r,l){var c=at.p;at.p=c!==0&&c<da?c:da;var f=Y.T,h={};h._updatedFibers=new Set,Y.T=h,Cm(e,!1,t,n);try{var y=l(),v=Y.S;if(v!==null&&v(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){Y.asyncTransitions++,y.then(cf,cf);var k=N_(y,r);$l(e,t,k,Hn(e))}else $l(e,t,r,Hn(e))}catch(V){$l(e,t,{then:function(){},status:"rejected",reason:V},Hn(e))}finally{at.p=c,f!==null&&h.types!==null&&(f.types!==null&&f.types!==h.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),f.types=h.types),Y.T=f,f===null&&h._updatedFibers&&(e=h._updatedFibers.size,h._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function Em(e,t,n,r){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var l=zg(e).queue;v_(e),Ug(e,l,t,Gi,n===null?x:function(){return Bg(e),n(r)})}function zg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gi,baseState:Gi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:Gi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bg(e){Y.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=zg(e);t.next===null&&(t=e.alternate.memoizedState),$l(e,t.next.queue,{},Hn(e))}function _m(){var e=dm(!1);return e=Ug.bind(null,Oe,e.queue,!0,!1),bn().memoizedState=e,[!1,e]}function qg(){var e=fo(Ss)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Hl(e),t]}function Lg(){var e=Pl(Ss)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Hl(e),t]}function Ni(){return vt(Kc)}function Am(){var e=bn(),t=dt.identifierPrefix;if($e){var n=Pa,r=Ha;n=(r&~(1<<32-yn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ud++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=oC++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t}function Dm(){return bn().memoizedState=D_.bind(null,Oe)}function D_(e,t){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Hn(n),l=pr(r),c=br(n,l,r);c!==null&&(Gs(r,"refresh()",e),At(c,n,r),Bl(c,n,r)),e=Jh(),t!=null&&c!==null&&console.error("The seed argument is not enabled outside experimental channels."),l.payload={cache:e};return}n=n.return}}function C_(e,t,n){var r=arguments;typeof r[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),r=Hn(e);var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};uf(e)?Pg(t,l):(l=Vh(e,t,l,r),l!==null&&(Gs(r,"dispatch()",e),At(l,e,r),$g(l,t,r)))}function Hg(e,t,n){var r=arguments;typeof r[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),r=Hn(e),$l(e,t,n,r)&&Gs(r,"setState()",e)}function $l(e,t,n,r){var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(uf(e))Pg(t,l);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null)){var f=Y.H;Y.H=Ds;try{var h=t.lastRenderedState,y=c(h,n);if(l.hasEagerState=!0,l.eagerState=y,xn(y,h))return Vu(e,t,l,0),dt===null&&ku(),!1}catch{}finally{Y.H=f}}if(n=Vh(e,t,l,r),n!==null)return At(n,e,r),$g(n,t,r),!0}return!1}function Cm(e,t,n,r){if(Y.T===null&&ji===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),r={lane:2,revertLane:ap(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},uf(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=Vh(e,n,r,2),t!==null&&(Gs(2,"setOptimistic()",e),At(t,e,2))}function uf(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Pg(e,t){Qo=cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $g(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_u(e,n)}}function Tm(e){if(e!==null&&typeof e!="function"){var t=String(e);LN.has(t)||(LN.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Om(e,t,n,r){var l=e.memoizedState,c=n(r,l);if(e.mode&mn){pt(!0);try{c=n(r,l)}finally{pt(!1)}}c===void 0&&(t=W(t)||"Component",UN.has(t)||(UN.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),l=c==null?l:Pe({},l,c),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}function Ig(e,t,n,r,l,c,f){var h=e.stateNode;if(typeof h.shouldComponentUpdate=="function"){if(n=h.shouldComponentUpdate(r,c,f),e.mode&mn){pt(!0);try{n=h.shouldComponentUpdate(r,c,f)}finally{pt(!1)}}return n===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",W(t)||"Component"),n}return t.prototype&&t.prototype.isPureReactComponent?!jl(n,r)||!jl(l,c):!0}function Yg(e,t,n,r){var l=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==l&&(e=H(e)||"Component",RN.has(e)||(RN.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),_b.enqueueReplaceState(t,t.state,null))}function Si(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Pe({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function Fg(e){nb(e),console.warn(`%s
|
|
129
|
+
Incoming: %s`,I,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function rm(e,t,n,r,l,c){Ja=c,Oe=t,hs=e!==null?e._debugHookTypes:null,Qa=-1,Uc=e!==null&&e.type!==t.type,(Object.prototype.toString.call(n)==="[object AsyncFunction]"||Object.prototype.toString.call(n)==="[object AsyncGeneratorFunction]")&&(c=H(Oe),wb.has(c)||(wb.add(c),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",c===null?"An unknown Component":"<"+c+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e!==null&&e.memoizedState!==null?_b:hs!==null?CN:Eb,zi=c=(t.mode&mn)!==Ce;var f=bb(n,r,l);if(zi=!1,Qo&&(f=im(t,n,r,l)),c){pt(!0);try{f=im(t,n,r,l)}finally{pt(!1)}}return yg(e,t),f}function yg(e,t){t._debugHookTypes=hs,t.dependencies===null?Ga!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:Ga}):t.dependencies._debugThenableState=Ga,F.H=zc;var n=ft!==null&&ft.next!==null;if(Ja=0,hs=I=Lt=ft=Oe=null,Qa=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),cd=!1,Vc=0,Ga=null,n)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||Ht||(e=e.dependencies,e!==null&&Lu(e)&&(Ht=!0)),jc?(jc=!1,e=!0):e=!1,e&&(t=H(t)||"Unknown",AN.has(t)||wb.has(t)||(AN.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function im(e,t,n,r){Oe=e;var l=0;do{if(Qo&&(Ga=null),Vc=0,Qo=!1,l>=lC)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(l+=1,Uc=!1,Lt=ft=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}Qa=-1,F.H=TN,c=bb(t,n,r)}while(Qo);return c}function w_(){var e=F.H,t=e.useState()[0];return t=typeof t.then=="function"?Hl(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Oe.flags|=1024),t}function om(){var e=ud!==0;return ud=0,e}function lm(e,t,n){t.updateQueue=e.updateQueue,t.flags=(t.mode&_s)!==Ce?t.flags&-402655237:t.flags&-2053,e.lanes&=~n}function cm(e){if(cd){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}cd=!1}Ja=0,hs=Lt=ft=Oe=null,Qa=-1,I=null,Qo=!1,Vc=ud=0,Ga=null}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Oe.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function ot(){if(ft===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Lt===null?Oe.memoizedState:Lt.next;if(t!==null)Lt=t,ft=e;else{if(e===null)throw Oe.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Lt===null?Oe.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Wu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hl(e){var t=Vc;return Vc+=1,Ga===null&&(Ga=sg()),e=rg(Ga,e,t),t=Oe,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,F.H=t!==null&&t.memoizedState!==null?_b:Eb),e}function vr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hl(e);if(e.$$typeof===la)return vt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function vi(e){var t=null,n=Oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Oe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Wu(),Oe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0||Uc)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=qA;else n.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",n.length,e);return t.index++,n}function Ss(e,t){return typeof t=="function"?t(e):t}function um(e,t,n){var r=bn();if(n!==void 0){var l=n(t);if(zi){pt(!0);try{n(t)}finally{pt(!1)}}}else l=t;return r.memoizedState=r.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},r.queue=e,e=e.dispatch=C_.bind(null,Oe,e),[r.memoizedState,e]}function fo(e){var t=ot();return fm(t,ft,e)}function fm(e,t,n){var r=e.queue;if(r===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");r.lastRenderedReducer=n;var l=e.baseQueue,c=r.pending;if(c!==null){if(l!==null){var f=l.next;l.next=c.next,c.next=f}t.baseQueue!==l&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=l=c,r.pending=null}if(c=e.baseState,l===null)e.memoizedState=c;else{t=l.next;var h=f=null,y=null,v=t,k=!1;do{var V=v.lane&-536870913;if(V!==v.lane?(ze&V)===V:(Ja&V)===V){var O=v.revertLane;if(O===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null}),V===ji&&(k=!0);else if((Ja&O)===O){v=v.next,O===ji&&(k=!0);continue}else V={lane:0,revertLane:v.revertLane,gesture:null,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null},y===null?(h=y=V,f=c):y=y.next=V,Oe.lanes|=O,qr|=O;V=v.action,zi&&n(c,V),c=v.hasEagerState?v.eagerState:n(c,V)}else O={lane:V,revertLane:v.revertLane,gesture:v.gesture,action:v.action,hasEagerState:v.hasEagerState,eagerState:v.eagerState,next:null},y===null?(h=y=O,f=c):y=y.next=O,Oe.lanes|=V,qr|=V;v=v.next}while(v!==null&&v!==t);if(y===null?f=c:y.next=h,!xn(c,e.memoizedState)&&(Ht=!0,k&&(n=$o,n!==null)))throw n;e.memoizedState=c,e.baseState=f,e.baseQueue=y,r.lastRenderedState=c}return l===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Pl(e){var t=ot(),n=t.queue;if(n===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,c=t.memoizedState;if(l!==null){n.pending=null;var f=l=l.next;do c=e(c,f.action),f=f.next;while(f!==l);xn(c,t.memoizedState)||(Ht=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,r]}function dm(e,t,n){var r=Oe,l=bn();if($e){if(n===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var c=n();Go||c===n()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Go=!0)}else{if(c=t(),Go||(n=t(),xn(c,n)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Go=!0)),dt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(ze&127)!==0||gg(r,t,c)}return l.memoizedState=c,n={value:c,getSnapshot:t},l.queue=n,sf(xg.bind(null,r,n,e),[e]),r.flags|=2048,mo(ds|wn,{destroy:void 0},vg.bind(null,r,n,c,t),null),c}function ef(e,t,n){var r=Oe,l=ot(),c=$e;if(c){if(n===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");n=n()}else if(n=t(),!Go){var f=t();xn(n,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Go=!0)}(f=!xn((ft||l).memoizedState,n))&&(l.memoizedState=n,Ht=!0),l=l.queue;var h=xg.bind(null,r,l,e);if(On(2048,wn,h,[e]),l.getSnapshot!==t||f||Lt!==null&&Lt.memoizedState.tag&ds){if(r.flags|=2048,mo(ds|wn,{destroy:void 0},vg.bind(null,r,l,n,t),null),dt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");c||(Ja&127)!==0||gg(r,t,n)}return n}function gg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t=Wu(),Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vg(e,t,n,r){t.value=n,t.getSnapshot=r,Ng(t)&&Sg(e)}function xg(e,t,n){return n(function(){Ng(t)&&(Gs(2,"updateSyncExternalStore()",e),Sg(e))})}function Ng(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function Sg(e){var t=dn(e,2);t!==null&&At(t,e,2)}function hm(e){var t=bn();if(typeof e=="function"){var n=e;if(e=n(),zi){pt(!0);try{n()}finally{pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:e},t}function mm(e){e=hm(e);var t=e.queue,n=Hg.bind(null,Oe,t);return t.dispatch=n,[e.memoizedState,n]}function pm(e){var t=bn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Tm.bind(null,Oe,!0,n),n.dispatch=t,[e,t]}function wg(e,t){var n=ot();return Eg(n,ft,e,t)}function Eg(e,t,n,r){return e.baseState=n,fm(e,ft,typeof r=="function"?r:Ss)}function _g(e,t){var n=ot();return ft!==null?Eg(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])}function E_(e,t,n,r,l){if(uf(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var c={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){c.listeners.push(f)}};F.T!==null?n(!0):c.isTransition=!1,r(c),n=t.pending,n===null?(c.next=t.pending=c,Ag(t,c)):(c.next=n.next,t.pending=n.next=c)}}function Ag(e,t){var n=t.action,r=t.payload,l=e.state;if(t.isTransition){var c=F.T,f={};f._updatedFibers=new Set,F.T=f;try{var h=n(l,r),y=F.S;y!==null&&y(f,h),Dg(e,t,h)}catch(v){bm(e,t,v)}finally{c!==null&&f.types!==null&&(c.types!==null&&c.types!==f.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),c.types=f.types),F.T=c,c===null&&f._updatedFibers&&(e=f._updatedFibers.size,f._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{f=n(l,r),Dg(e,t,f)}catch(v){bm(e,t,v)}}function Dg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?(F.asyncTransitions++,n.then(cf,cf),n.then(function(r){Cg(e,t,r)},function(r){return bm(e,t,r)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):Cg(e,t,n)}function Cg(e,t,n){t.status="fulfilled",t.value=n,Tg(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ag(e,n)))}function bm(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Tg(t),t=t.next;while(t!==r)}e.action=null}function Tg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Og(e,t){return t}function ho(e,t){if($e){var n=dt.formState;if(n!==null){e:{var r=Oe;if($e){if(yt){t:{for(var l=yt,c=cs;l.nodeType!==8;){if(!c){l=null;break t}if(l=Pn(l.nextSibling),l===null){l=null;break t}}c=l.data,l=c===Gb||c===mS?l:null}if(l){yt=Pn(l.nextSibling),r=l.data===Gb;break e}}dr(r)}r=!1}r&&(t=n[0])}}return n=bn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Og,lastRenderedState:t},n.queue=r,n=Hg.bind(null,Oe,r),r.dispatch=n,r=hm(!1),c=Tm.bind(null,Oe,!1,r.queue),r=bn(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=E_.bind(null,Oe,l,c,n),l.dispatch=n,r.memoizedState=e,[t,n,!1]}function tf(e){var t=ot();return Rg(t,ft,e)}function Rg(e,t,n){if(t=fm(e,t,Og)[0],e=fo(Ss)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Hl(t)}catch(f){throw f===Io?rd:f}else r=t;t=ot();var l=t.queue,c=l.dispatch;return n!==t.memoizedState&&(Oe.flags|=2048,mo(ds|wn,{destroy:void 0},__.bind(null,l,n),null)),[r,c,e]}function __(e,t){e.action=t}function nf(e){var t=ot(),n=ft;if(n!==null)return Rg(t,n,e);ot(),t=t.memoizedState,n=ot();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function mo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=Wu(),Oe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ym(e){var t=bn();return e={current:e},t.memoizedState=e}function xi(e,t,n,r){var l=bn();Oe.flags|=e,l.memoizedState=mo(ds|t,{destroy:void 0},n,r===void 0?null:r)}function On(e,t,n,r){var l=ot();r=r===void 0?null:r;var c=l.memoizedState.inst;ft!==null&&r!==null&&am(r,ft.memoizedState.deps)?l.memoizedState=mo(t,c,n,r):(Oe.flags|=e,l.memoizedState=mo(ds|t,c,n,r))}function sf(e,t){(Oe.mode&_s)!==Ce?xi(276826112,wn,e,t):xi(8390656,wn,e,t)}function A_(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=Wu(),Oe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gm(e){var t=bn(),n={impl:e};return t.memoizedState=n,function(){if((Ze&Qt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function af(e){var t=ot().memoizedState;return A_({ref:t,nextImpl:e}),function(){if((Ze&Qt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function vm(e,t){var n=4194308;return(Oe.mode&_s)!==Ce&&(n|=134217728),xi(n,Jn,e,t)}function jg(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return t.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(t).join(", ")+"}"),e=e(),t.current=e,function(){t.current=null}}function xm(e,t,n){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),n=n!=null?n.concat([e]):null;var r=4194308;(Oe.mode&_s)!==Ce&&(r|=134217728),xi(r,Jn,jg.bind(null,t,e),n)}function rf(e,t,n){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),n=n!=null?n.concat([e]):null,On(4,Jn,jg.bind(null,t,e),n)}function Nm(e,t){return bn().memoizedState=[e,t===void 0?null:t],e}function of(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&am(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sm(e,t){var n=bn();t=t===void 0?null:t;var r=e();if(zi){pt(!0);try{e()}finally{pt(!1)}}return n.memoizedState=[r,t],r}function lf(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&am(t,r[1]))return r[0];if(r=e(),zi){pt(!0);try{e()}finally{pt(!1)}}return n.memoizedState=[r,t],r}function wm(e,t){var n=bn();return Em(n,e,t)}function Mg(e,t){var n=ot();return Vg(n,ft.memoizedState,e,t)}function kg(e,t){var n=ot();return ft===null?Em(n,e,t):Vg(n,ft.memoizedState,e,t)}function Em(e,t,n){return n===void 0||(Ja&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Uv(),Oe.lanes|=e,qr|=e,n)}function Vg(e,t,n,r){return xn(n,t)?n:Yo.current!==null?(e=Em(e,n,r),xn(e,t)||(Ht=!0),e):(Ja&42)===0||(Ja&1073741824)!==0&&(ze&261930)===0?(Ht=!0,e.memoizedState=n):(e=Uv(),Oe.lanes|=e,qr|=e,t)}function cf(){F.asyncTransitions--}function Ug(e,t,n,r,l){var c=rt.p;rt.p=c!==0&&c<da?c:da;var f=F.T,h={};h._updatedFibers=new Set,F.T=h,Tm(e,!1,t,n);try{var y=l(),v=F.S;if(v!==null&&v(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){F.asyncTransitions++,y.then(cf,cf);var k=N_(y,r);$l(e,t,k,Hn(e))}else $l(e,t,r,Hn(e))}catch(V){$l(e,t,{then:function(){},status:"rejected",reason:V},Hn(e))}finally{rt.p=c,f!==null&&h.types!==null&&(f.types!==null&&f.types!==h.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),f.types=h.types),F.T=f,f===null&&h._updatedFibers&&(e=h._updatedFibers.size,h._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function _m(e,t,n,r){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var l=zg(e).queue;v_(e),Ug(e,l,t,Gi,n===null?x:function(){return Bg(e),n(r)})}function zg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gi,baseState:Gi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:Gi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bg(e){F.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=zg(e);t.next===null&&(t=e.alternate.memoizedState),$l(e,t.next.queue,{},Hn(e))}function Am(){var e=hm(!1);return e=Ug.bind(null,Oe,e.queue,!0,!1),bn().memoizedState=e,[!1,e]}function qg(){var e=fo(Ss)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Hl(e),t]}function Lg(){var e=Pl(Ss)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Hl(e),t]}function Ni(){return vt(Kc)}function Dm(){var e=bn(),t=dt.identifierPrefix;if($e){var n=Pa,r=Ha;n=(r&~(1<<32-yn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ud++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=oC++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t}function Cm(){return bn().memoizedState=D_.bind(null,Oe)}function D_(e,t){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Hn(n),l=pr(r),c=br(n,l,r);c!==null&&(Gs(r,"refresh()",e),At(c,n,r),Bl(c,n,r)),e=Gh(),t!=null&&c!==null&&console.error("The seed argument is not enabled outside experimental channels."),l.payload={cache:e};return}n=n.return}}function C_(e,t,n){var r=arguments;typeof r[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),r=Hn(e);var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};uf(e)?Pg(t,l):(l=Uh(e,t,l,r),l!==null&&(Gs(r,"dispatch()",e),At(l,e,r),$g(l,t,r)))}function Hg(e,t,n){var r=arguments;typeof r[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),r=Hn(e),$l(e,t,n,r)&&Gs(r,"setState()",e)}function $l(e,t,n,r){var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(uf(e))Pg(t,l);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null)){var f=F.H;F.H=Ds;try{var h=t.lastRenderedState,y=c(h,n);if(l.hasEagerState=!0,l.eagerState=y,xn(y,h))return Vu(e,t,l,0),dt===null&&ku(),!1}catch{}finally{F.H=f}}if(n=Uh(e,t,l,r),n!==null)return At(n,e,r),$g(n,t,r),!0}return!1}function Tm(e,t,n,r){if(F.T===null&&ji===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),r={lane:2,revertLane:rp(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},uf(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=Uh(e,n,r,2),t!==null&&(Gs(2,"setOptimistic()",e),At(t,e,2))}function uf(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Pg(e,t){Qo=cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $g(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_u(e,n)}}function Om(e){if(e!==null&&typeof e!="function"){var t=String(e);LN.has(t)||(LN.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Rm(e,t,n,r){var l=e.memoizedState,c=n(r,l);if(e.mode&mn){pt(!0);try{c=n(r,l)}finally{pt(!1)}}c===void 0&&(t=W(t)||"Component",UN.has(t)||(UN.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),l=c==null?l:Pe({},l,c),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}function Ig(e,t,n,r,l,c,f){var h=e.stateNode;if(typeof h.shouldComponentUpdate=="function"){if(n=h.shouldComponentUpdate(r,c,f),e.mode&mn){pt(!0);try{n=h.shouldComponentUpdate(r,c,f)}finally{pt(!1)}}return n===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",W(t)||"Component"),n}return t.prototype&&t.prototype.isPureReactComponent?!jl(n,r)||!jl(l,c):!0}function Fg(e,t,n,r){var l=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==l&&(e=H(e)||"Component",RN.has(e)||(RN.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Ab.enqueueReplaceState(t,t.state,null))}function Si(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Pe({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function Yg(e){sb(e),console.warn(`%s
|
|
130
130
|
|
|
131
131
|
%s
|
|
132
132
|
`,Xo?"An error occurred in the <"+Xo+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
133
|
-
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function Jg(e){var t=Xo?"The above error occurred in the <"+Xo+"> component.":"The above error occurred in one of your React components.",n="React will try to recreate this component tree from scratch using the error boundary you provided, "+((
|
|
133
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function Jg(e){var t=Xo?"The above error occurred in the <"+Xo+"> component.":"The above error occurred in one of your React components.",n="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Db||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var r=e.environmentName;e=[`%o
|
|
134
134
|
|
|
135
135
|
%s
|
|
136
136
|
|
|
@@ -140,9 +140,9 @@ Visit https://react.dev/link/error-boundaries to learn more about error boundari
|
|
|
140
140
|
%s
|
|
141
141
|
|
|
142
142
|
%s
|
|
143
|
-
`,e,t,n)}function Gg(e){
|
|
143
|
+
`,e,t,n)}function Gg(e){sb(e)}function ff(e,t){try{Xo=t.source?H(t.source):null,Db=null;var n=t.value;if(F.actQueue!==null)F.thrownErrors.push(n);else{var r=e.onUncaughtError;r(n,{componentStack:t.stack})}}catch(l){setTimeout(function(){throw l})}}function Qg(e,t,n){try{Xo=n.source?H(n.source):null,Db=H(t);var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function jm(e,t,n){return n=pr(n),n.tag=xb,n.payload={element:null},n.callback=function(){be(t.source,ff,e,t)},n}function Mm(e){return e=pr(e),e.tag=xb,e}function km(e,t,n,r){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var c=r.value;e.payload=function(){return l(c)},e.callback=function(){Py(n),be(r.source,Qg,t,n,r)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Py(n),be(r.source,Qg,t,n,r),typeof l!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this)),sC(this,r),typeof l=="function"||(n.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",H(n)||"Unknown")})}function T_(e,t,n,r,l){if(n.flags|=32768,fa&&Zl(e,l),r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&co(t,n,l,!0),$e&&(ma=!0),n=Yn.current,n!==null){switch(n.tag){case 31:case 13:return fs===null?xf():n.alternate===null&&wt===Za&&(wt=hd),n.flags&=-257,n.flags|=65536,n.lanes=l,r===id?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),tp(e,r,l)),!1;case 22:return n.flags|=65536,r===id?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),tp(e,r,l)),!1}throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}return tp(e,r,l),xf(),!1}if($e)return ma=!0,t=Yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,r!==cb&&Ml(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:r}),n))):(r!==cb&&Ml(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:r}),n)),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,r=zn(r,n),l=jm(e.stateNode,r,l),Xu(e,l),wt!==zr&&(wt=Bi)),!1;var c=zn(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:r}),n);if($c===null?$c=[c]:$c.push(c),wt!==zr&&(wt=Bi),t===null)return!0;r=zn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=jm(n.stateNode,r,e),Xu(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Hr===null||!Hr.has(c))))return n.flags|=65536,l&=-l,n.lanes|=l,l=Mm(l),km(l,e,n,r),Xu(n,l),!1}n=n.return}while(n!==null);return!1}function rn(e,t,n,r){t.child=e===null?xN(t,null,n,r):Ui(t,e.child,n,r)}function Xg(e,t,n,r,l){n=n.render;var c=t.ref;if("ref"in r){var f={};for(var h in r)h!=="ref"&&(f[h]=r[h])}else f=r;return yi(t),r=rm(e,t,n,f,c,l),h=om(),e!==null&&!Ht?(lm(e,t,l),ka(e,t,l)):($e&&h&&Ph(t),t.flags|=1,rn(e,t,r,l),t.child)}function Zg(e,t,n,r,l){if(e===null){var c=n.type;return typeof c=="function"&&!Bh(c)&&c.defaultProps===void 0&&n.compare===null?(n=hi(c),t.tag=15,t.type=n,Um(t,c),Kg(e,t,n,r,l)):(e=qh(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Pm(e,l)){var f=c.memoizedProps;if(n=n.compare,n=n!==null?n:jl,n(f,r)&&e.ref===t.ref)return ka(e,t,l)}return t.flags|=1,e=Oa(c,r),e.ref=t.ref,e.return=t,t.child=e}function Kg(e,t,n,r,l){if(e!==null){var c=e.memoizedProps;if(jl(c,r)&&e.ref===t.ref&&t.type===e.type)if(Ht=!1,t.pendingProps=r=c,Pm(e,l))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,ka(e,t,l)}return Vm(e,t,n,r,l)}function Wg(e,t,n,r){var l=r.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:gc,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(r=t.child=e.child,l=0;r!==null;)l=l|r.lanes|r.childLanes,r=r.sibling;r=l&~c}else r=0,t.child=null;return ev(e,t,c,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Iu(t,c!==null?c.cachePool:null),c!==null?pg(t,c):tm(t),bg(t);else return r=t.lanes=536870912,ev(e,t,c!==null?c.baseLanes|n:n,n,r)}else c!==null?(Iu(t,c.cachePool),pg(t,c),gr(t),t.memoizedState=null):(e!==null&&Iu(t,null),tm(t),gr(t));return rn(e,t,l,n),t.child}function Il(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:gc,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ev(e,t,n,r,l){var c=Zh();return c=c===null?null:{parent:Bt._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Iu(t,null),tm(t),bg(t),e!==null&&co(e,t,r,!0),t.childLanes=l,null}function df(e,t){var n=t.hidden;return n!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
144
144
|
- <Activity %s>
|
|
145
|
-
+ <Activity %s>`,n===!0?"hidden":n===!1?"hidden={false}":"hidden={...}",n?'mode="hidden"':'mode="visible"'),t=mf({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tv(e,t,n){return Ui(t,e.child,null,n),e=df(t,t.pendingProps),e.flags|=2,Ln(t),t.memoizedState=null,e}function O_(e,t,n){var r=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(r.mode==="hidden")return e=df(t,r),t.lanes=536870912,Il(null,e);if(
|
|
145
|
+
+ <Activity %s>`,n===!0?"hidden":n===!1?"hidden={false}":"hidden={...}",n?'mode="hidden"':'mode="visible"'),t=mf({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tv(e,t,n){return Ui(t,e.child,null,n),e=df(t,t.pendingProps),e.flags|=2,Ln(t),t.memoizedState=null,e}function O_(e,t,n){var r=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if($e){if(r.mode==="hidden")return e=df(t,r),t.lanes=536870912,Il(null,e);if(sm(t),(e=yt)?(n=A1(e,cs),n=n!==null&&n.data===Ii?n:null,n!==null&&(r={dehydrated:n,treeContext:Jy(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Fy(n),r.return=t,t.child=r,cn=t,yt=null)):n=null,n===null)throw Bu(t,e),dr(t);return t.lanes=536870912,null}return df(t,r)}var c=e.memoizedState;if(c!==null){var f=c.dehydrated;if(sm(t),l)if(t.flags&256)t.flags&=-257,t=tv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(Qy(),(n&536870912)!==0&&vf(t),Ht||co(e,t,n,!1),l=(n&e.childLanes)!==0,Ht||l){if(r=dt,r!==null&&(f=wl(r,n),f!==0&&f!==c.retryLane))throw c.retryLane=f,dn(e,f),At(r,e,f),Cb;xf(),t=tv(e,t,n)}else e=c.treeContext,yt=Pn(f.nextSibling),cn=t,$e=!0,Rr=null,ma=!1,Fn=null,cs=!1,e!==null&&Gy(t,e),t=df(t,r),t.flags|=4096;return t}return c=e.child,r={mode:r.mode,children:r.children},(n&536870912)!==0&&(n&e.lanes)!==0&&vf(t),e=Oa(c,r),e.ref=t.ref,t.child=e,e.return=t,e}function hf(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Vm(e,t,n,r,l){if(n.prototype&&typeof n.prototype.render=="function"){var c=W(n)||"Unknown";HN[c]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",c,c),HN[c]=!0)}return t.mode&mn&&As.recordLegacyContextWarning(t,null),e===null&&(Um(t,t.type),n.contextTypes&&(c=W(n)||"Unknown",$N[c]||($N[c]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",c)))),yi(t),n=rm(e,t,n,r,void 0,l),r=om(),e!==null&&!Ht?(lm(e,t,l),ka(e,t,l)):($e&&r&&Ph(t),t.flags|=1,rn(e,t,n,l),t.child)}function nv(e,t,n,r,l,c){return yi(t),Qa=-1,Uc=e!==null&&e.type!==t.type,t.updateQueue=null,n=im(t,r,n,l),yg(e,t),r=om(),e!==null&&!Ht?(lm(e,t,c),ka(e,t,c)):($e&&r&&Ph(t),t.flags|=1,rn(e,t,n,c),t.child)}function sv(e,t,n,r,l){switch(p(t)){case!1:var c=t.stateNode,f=new t.type(t.memoizedProps,c.context).state;c.updater.enqueueSetState(c,f,null);break;case!0:t.flags|=128,t.flags|=65536,c=Error("Simulated error coming from DevTools");var h=l&-l;if(t.lanes|=h,f=dt,f===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");h=Mm(h),km(h,f,t,zn(c,t)),Xu(t,h)}if(yi(t),t.stateNode===null){if(f=Or,c=n.contextType,"contextType"in n&&c!==null&&(c===void 0||c.$$typeof!==la)&&!qN.has(n)&&(qN.add(n),h=c===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof c!="object"?" However, it is set to a "+typeof c+".":c.$$typeof===Tp?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(c).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",W(n)||"Component",h)),typeof c=="object"&&c!==null&&(f=vt(c)),c=new n(r,f),t.mode&mn){pt(!0);try{c=new n(r,f)}finally{pt(!1)}}if(f=t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ab,t.stateNode=c,c._reactInternals=t,c._reactInternalInstance=ON,typeof n.getDerivedStateFromProps=="function"&&f===null&&(f=W(n)||"Component",jN.has(f)||(jN.add(f),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",f,c.state===null?"null":"undefined",f))),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"){var y=h=f=null;if(typeof c.componentWillMount=="function"&&c.componentWillMount.__suppressDeprecationWarning!==!0?f="componentWillMount":typeof c.UNSAFE_componentWillMount=="function"&&(f="UNSAFE_componentWillMount"),typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps.__suppressDeprecationWarning!==!0?h="componentWillReceiveProps":typeof c.UNSAFE_componentWillReceiveProps=="function"&&(h="UNSAFE_componentWillReceiveProps"),typeof c.componentWillUpdate=="function"&&c.componentWillUpdate.__suppressDeprecationWarning!==!0?y="componentWillUpdate":typeof c.UNSAFE_componentWillUpdate=="function"&&(y="UNSAFE_componentWillUpdate"),f!==null||h!==null||y!==null){c=W(n)||"Component";var v=typeof n.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";kN.has(c)||(kN.add(c),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
146
146
|
|
|
147
147
|
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
148
148
|
|
|
@@ -150,8 +150,8 @@ The above lifecycles should be removed. Learn more about this warning here:
|
|
|
150
150
|
https://react.dev/link/unsafe-component-lifecycles`,c,v,f!==null?`
|
|
151
151
|
`+f:"",h!==null?`
|
|
152
152
|
`+h:"",y!==null?`
|
|
153
|
-
`+y:""))}}c=t.stateNode,f=W(n)||"Component",c.render||(n.prototype&&typeof n.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",f):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",f)),!c.getInitialState||c.getInitialState.isReactClassApproved||c.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",f),c.getDefaultProps&&!c.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",f),c.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",f),n.childContextTypes&&!BN.has(n)&&(BN.add(n),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",f)),n.contextTypes&&!zN.has(n)&&(zN.add(n),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",f)),typeof c.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",f),n.prototype&&n.prototype.isPureReactComponent&&typeof c.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",W(n)||"A pure component"),typeof c.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",f),typeof c.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",f),typeof c.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",f),typeof c.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",f),h=c.props!==r,c.props!==void 0&&h&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",f),c.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",f,f),typeof c.getSnapshotBeforeUpdate!="function"||typeof c.componentDidUpdate=="function"||MN.has(n)||(MN.add(n),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",W(n))),typeof c.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",f),typeof c.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",f),typeof n.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",f),(h=c.state)&&(typeof h!="object"||Jt(h))&&console.error("%s.state: must be set to an object or null",f),typeof c.getChildContext=="function"&&typeof n.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",f),c=t.stateNode,c.props=r,c.state=t.memoizedState,c.refs={},
|
|
154
|
-
%s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=W(t)||"Unknown",IN[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),IN[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=W(t)||"Unknown",PN[t]||(console.error("%s: Function components do not support contextType.",t),PN[t]=!0))}function Um(e){return{baseLanes:e,cachePool:ng()}}function zm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vn),e}function rv(e,t,n){var r,l=t.pendingProps;d(t)&&(t.flags|=128);var c=!1,f=(t.flags&128)!==0;if((r=f)||(r=e!==null&&e.memoizedState===null?!1:(Mt.current&kc)!==0),r&&(c=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(c?yr(t):gr(t),(e=yt)?(n=A1(e,cs),n=n!==null&&n.data!==Ii?n:null,n!==null&&(r={dehydrated:n,treeContext:Jy(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Yy(n),r.return=t,t.child=r,cn=t,yt=null)):n=null,n===null)throw Bu(t,e),dr(t);return bp(n)?t.lanes=32:t.lanes=536870912,null}var h=l.children;if(l=l.fallback,c){gr(t);var y=t.mode;return h=mf({mode:"hidden",children:h},y),l=mi(l,y,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=Um(n),l.childLanes=zm(e,r,n),t.memoizedState=Cb,Il(null,l)}return yr(t),Bm(t,h)}var v=e.memoizedState;if(v!==null){var k=v.dehydrated;if(k!==null){if(f)t.flags&256?(yr(t),t.flags&=-257,t=qm(e,t,n)):t.memoizedState!==null?(gr(t),t.child=e.child,t.flags|=128,t=null):(gr(t),h=l.fallback,y=t.mode,l=mf({mode:"visible",children:l.children},y),h=mi(h,y,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Ui(t,e.child,null,n),l=t.child,l.memoizedState=Um(n),l.childLanes=zm(e,r,n),t.memoizedState=Cb,t=Il(null,l));else if(yr(t),Qy(),(n&536870912)!==0&&vf(t),bp(k)){if(r=k.nextSibling&&k.nextSibling.dataset,r){h=r.dgst;var V=r.msg;y=r.stck;var O=r.cstck}c=V,r=h,l=y,k=O,h=c,y=k,h=Error(h||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),h.stack=l||"",h.digest=r,r=y===void 0?null:y,l={value:h,source:null,stack:r},typeof r=="string"&&ob.set(h,l),Ml(l),t=qm(e,t,n)}else if(Ht||co(e,t,n,!1),r=(n&e.childLanes)!==0,Ht||r){if(r=dt,r!==null&&(l=wl(r,n),l!==0&&l!==v.retryLane))throw v.retryLane=l,dn(e,l),At(r,e,l),Db;pp(k)||xf(),t=qm(e,t,n)}else pp(k)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,yt=Pn(k.nextSibling),cn=t,$e=!0,Rr=null,ma=!1,Yn=null,cs=!1,e!==null&&Gy(t,e),t=Bm(t,l.children),t.flags|=4096);return t}}return c?(gr(t),h=l.fallback,y=t.mode,O=e.child,k=O.sibling,l=Oa(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,k!==null?h=Oa(k,h):(h=mi(h,y,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Il(null,l),l=t.child,h=e.child.memoizedState,h===null?h=Um(n):(y=h.cachePool,y!==null?(O=Bt._currentValue,y=y.parent!==O?{parent:O,pool:O}:y):y=ng(),h={baseLanes:h.baseLanes|n,cachePool:y}),l.memoizedState=h,l.childLanes=zm(e,r,n),t.memoizedState=Cb,Il(e.child,l)):(v!==null&&(n&62914560)===n&&(n&e.lanes)!==0&&vf(t),yr(t),n=e.child,e=n.sibling,n=Oa(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Bm(e,t){return t=mf({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function mf(e,t){return e=D(22,e,null,t),e.lanes=0,e}function qm(e,t,n){return Ui(t,e.child,null,n),e=Bm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yh(e.return,t,n)}function Lm(e,t,n,r,l,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l,treeForkCount:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=r,f.tail=n,f.tailMode=l,f.treeForkCount=c)}function ov(e,t,n){var r=t.pendingProps,l=r.revealOrder,c=r.tail,f=r.children,h=Mt.current;if((r=(h&kc)!==0)?(h=h&Jo|kc,t.flags|=128):h&=Jo,ve(Mt,h,t),h=l??"null",l!=="forwards"&&l!=="unstable_legacy-backwards"&&l!=="together"&&l!=="independent"&&!YN[h])if(YN[h]=!0,l==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(l==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof l=="string")switch(l.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',l,l.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',l,l.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',l)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',l);h=c??"null",dd[h]||(c==null?(l==="forwards"||l==="backwards"||l==="unstable_legacy-backwards")&&(dd[h]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):c!=="visible"&&c!=="collapsed"&&c!=="hidden"?(dd[h]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',c)):l!=="forwards"&&l!=="backwards"&&l!=="unstable_legacy-backwards"&&(dd[h]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',c)));e:if((l==="forwards"||l==="backwards"||l==="unstable_legacy-backwards")&&f!==void 0&&f!==null&&f!==!1)if(Jt(f)){for(h=0;h<f.length;h++)if(!dg(f[h],h))break e}else if(h=oe(f),typeof h=="function"){if(h=h.call(f))for(var y=h.next(),v=0;!y.done;y=h.next()){if(!dg(y.value,v))break e;v++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',l);if(rn(e,t,f,n),$e?(fr(),f=vc):f=0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&iv(e,n,t);else if(e.tag===19)iv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Zu(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Lm(t,!1,l,n,c,f);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Zu(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Lm(t,!0,n,null,c,f);break;case"together":Lm(t,!1,null,null,void 0,f);break;default:t.memoizedState=null}return t.child}function ka(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nn=-1,qr|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(co(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,n=Oa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Hm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Lu(e)))}function R_(e,t,n){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),hr(t,Bt,e.memoizedState.cache),bi();break;case 27:case 5:xe(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:hr(t,t.type,t.memoizedProps.value);break;case 12:(n&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var r=t.stateNode;r.effectDuration=-0,r.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,nm(t),null;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(yr(t),t.flags|=128,null):(n&t.child.childLanes)!==0?rv(e,t,n):(yr(t),e=ka(e,t,n),e!==null?e.sibling:null);yr(t);break;case 19:var l=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(co(e,t,n,!1),r=(n&t.childLanes)!==0),l){if(r)return ov(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ve(Mt,Mt.current,t),r)break;return null;case 22:return t.lanes=0,Wg(e,t,n,t.pendingProps);case 24:hr(t,Bt,e.memoizedState.cache)}return ka(e,t,n)}function Pm(e,t,n){if(t._debugNeedsRemount&&e!==null){n=Bh(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),n._debugStack=t._debugStack,n._debugTask=t._debugTask;var r=t.return;if(r===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,n._debugInfo=t._debugInfo,t===r.child)r.child=n;else{var l=r.child;if(l===null)throw Error("Expected parent to have a child.");for(;l.sibling!==t;)if(l=l.sibling,l===null)throw Error("Expected to find the previous sibling.");l.sibling=n}return t=r.deletions,t===null?(r.deletions=[e],r.flags|=16):t.push(e),n.flags|=2,n}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)Ht=!0;else{if(!Hm(e,n)&&(t.flags&128)===0)return Ht=!1,R_(e,t,n);Ht=(e.flags&131072)!==0}else Ht=!1,(r=$e)&&(fr(),r=(t.flags&1048576)!==0),r&&(r=t.index,fr(),Fy(t,vc,r));switch(t.lanes=0,t.tag){case 16:e:if(r=t.pendingProps,e=mr(t.elementType),t.type=e,typeof e=="function")zh(e)?(r=Si(e,r),t.tag=1,t.type=e=hi(e),t=sv(null,t,e,r,n)):(t.tag=0,Vm(t,e),t.type=e=hi(e),t=km(null,t,e,r,n));else{if(e!=null){if(l=e.$$typeof,l===ic){t.tag=11,t.type=e=Uh(e),t=Xg(null,t,e,r,n);break e}else if(l===kf){t.tag=14,t=Zg(null,t,e,r,n);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===$n&&(t=" Did you wrap a component in React.lazy() more than once?"),n=W(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return km(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,l=Si(r,t.pendingProps),sv(e,t,r,l,n);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");r=t.pendingProps;var c=t.memoizedState;l=c.element,Wh(e,t),Ll(t,r,null,n);var f=t.memoizedState;if(r=f.cache,hr(t,Bt,r),r!==c.cache&&Fh(t,[Bt],n,!0),ql(),r=f.element,c.isDehydrated)if(c={element:r,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=av(e,t,r,n);break e}else if(r!==l){l=zn(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),Ml(l),t=av(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(yt=Pn(e.firstChild),cn=t,$e=!0,Rr=null,ma=!1,Yn=null,cs=!0,n=xN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(bi(),r===l){t=ka(e,t,n);break e}rn(e,t,r,n)}t=t.child}return t;case 26:return hf(e,t),e===null?(n=j1(t.type,null,t.pendingProps,null))?t.memoizedState=n:$e||(n=t.type,e=t.pendingProps,r=Ge(Er.current),r=Ef(r).createElement(n),r[ln]=t,r[gn]=e,on(r,n,e),jt(r),t.stateNode=r):t.memoizedState=j1(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&$e&&(r=Ge(Er.current),l=pe(),r=t.stateNode=O1(t.type,t.pendingProps,r,l,!1),ma||(l=g1(r,t.type,t.pendingProps,l),l!==null&&(pi(t,0).serverProps=l)),cn=t,cs=!0,l=yt,Sr(t.type)?(Zb=l,yt=Pn(r.firstChild)):yt=l),rn(e,t,t.pendingProps.children,n),hf(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&(c=pe(),r=Dh(t.type,c.ancestorInfo),l=yt,(f=!l)||(f=vA(l,t.type,t.pendingProps,cs),f!==null?(t.stateNode=f,ma||(c=g1(f,t.type,t.pendingProps,c),c!==null&&(pi(t,0).serverProps=c)),cn=t,yt=Pn(f.firstChild),cs=!1,c=!0):c=!1,f=!c),f&&(r&&Bu(t,l),dr(t))),xe(t),l=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,r=c.children,hp(l,c)?r=null:f!==null&&hp(l,f)&&(t.flags|=32),t.memoizedState!==null&&(l=am(e,t,w_,null,null,n),Kc._currentValue=l),hf(e,t),rn(e,t,r,n),t.child;case 6:return e===null&&$e&&(n=t.pendingProps,e=pe(),r=e.ancestorInfo.current,n=r!=null?Cu(n,r.tag,e.ancestorInfo.implicitRootScope):!0,e=yt,(r=!e)||(r=xA(e,t.pendingProps,cs),r!==null?(t.stateNode=r,cn=t,yt=null,r=!0):r=!1,r=!r),r&&(n&&Bu(t,e),dr(t))),null;case 13:return rv(e,t,n);case 4:return tt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ui(t,null,r,n):rn(e,t,r,n),t.child;case 11:return Xg(e,t,t.type,t.pendingProps,n);case 7:return rn(e,t,t.pendingProps,n),t.child;case 8:return rn(e,t,t.pendingProps.children,n),t.child;case 12:return t.flags|=4,t.flags|=2048,r=t.stateNode,r.effectDuration=-0,r.passiveEffectDuration=-0,rn(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.type,l=t.pendingProps,c=l.value,"value"in l||FN||(FN=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),hr(t,r,c),rn(e,t,l.children,n),t.child;case 9:return l=t.type._context,r=t.pendingProps.children,typeof r!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),yi(t),l=vt(l),r=pb(r,l,void 0),t.flags|=1,rn(e,t,r,n),t.child;case 14:return Zg(e,t,t.type,t.pendingProps,n);case 15:return Kg(e,t,t.type,t.pendingProps,n);case 19:return ov(e,t,n);case 31:return O_(e,t,n);case 22:return Wg(e,t,n,t.pendingProps);case 24:return yi(t),r=vt(Bt),e===null?(l=Xh(),l===null&&(l=dt,c=Jh(),l.pooledCache=c,gi(c),c!==null&&(l.pooledCacheLanes|=n),l=c),t.memoizedState={parent:r,cache:l},Kh(t),hr(t,Bt,l)):((e.lanes&n)!==0&&(Wh(e,t),Ll(t,null,null,n),ql()),l=e.memoizedState,c=t.memoizedState,l.parent!==r?(l={parent:r,cache:r},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),hr(t,Bt,r)):(r=c.cache,hr(t,Bt,r),r!==l.cache&&Fh(t,[Bt],n,!0))),rn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Va(e){e.flags|=4}function $m(e,t,n,r,l){if((t=(e.mode&KD)!==Ce)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Lv())e.flags|=8192;else throw Vi=id,yb}else e.flags&=-16777217}function lv(e,t){if(t.type!=="stylesheet"||(t.state.loading&ms)!==Ji)e.flags&=-16777217;else if(e.flags|=16777216,!z1(t))if(Lv())e.flags|=8192;else throw Vi=id,yb}function pf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Nl():536870912,e.lanes|=t,Hi|=t)}function Yl(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)if((e.mode&Ve)!==Ce){for(var l=e.selfBaseDuration,c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,l+=c.treeBaseDuration,c=c.sibling;e.treeBaseDuration=l}else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&65011712,r|=l.flags&65011712,l.return=e,l=l.sibling;else if((e.mode&Ve)!==Ce){l=e.actualDuration,c=e.selfBaseDuration;for(var f=e.child;f!==null;)n|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,l+=f.actualDuration,c+=f.treeBaseDuration,f=f.sibling;e.actualDuration=l,e.treeBaseDuration=c}else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function j_(e,t,n){var r=t.pendingProps;switch(Ph(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ja(Bt,t),ae(t),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(lo(t)?(Ih(),Va(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$h())),ht(t),null;case 26:var l=t.type,c=t.memoizedState;return e===null?(Va(t),c!==null?(ht(t),lv(t,c)):(ht(t),$m(t,l,null,r,n))):c?c!==e.memoizedState?(Va(t),ht(t),lv(t,c)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Va(t),ht(t),$m(t,l,e,r,n)),null;case 27:if(je(t),n=Ge(Er.current),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Va(t);else{if(!r){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ht(t),null}e=pe(),lo(t)?Xy(t):(e=O1(l,r,n,e,!0),t.stateNode=e,Va(t))}return ht(t),null;case 5:if(je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Va(t);else{if(!r){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ht(t),null}var f=pe();if(lo(t))Xy(t);else{switch(c=Ge(Er.current),Dh(l,f.ancestorInfo),f=f.context,c=Ef(c),f){case rl:c=c.createElementNS(To,l);break;case jd:c=c.createElementNS(Hf,l);break;default:switch(l){case"svg":c=c.createElementNS(To,l);break;case"math":c=c.createElementNS(Hf,l);break;case"script":c=c.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof r.is=="string"?c.createElement("select",{is:r.is}):c.createElement("select"),r.multiple?c.multiple=!0:r.size&&(c.size=r.size);break;default:c=typeof r.is=="string"?c.createElement(l,{is:r.is}):c.createElement(l),l.indexOf("-")===-1&&(l!==l.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",l),Object.prototype.toString.call(c)!=="[object HTMLUnknownElement]"||Es.call(bS,l)||(bS[l]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",l)))}}c[ln]=t,c[gn]=r;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)c.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=c;e:switch(on(c,l,r),l){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Va(t)}}return ht(t),$m(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Va(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Ge(Er.current),n=pe(),lo(t)){if(e=t.stateNode,n=t.memoizedProps,l=!ma,r=null,c=cn,c!==null)switch(c.tag){case 3:l&&(l=C1(e,n,r),l!==null&&(pi(t,0).serverProps=l));break;case 27:case 5:r=c.memoizedProps,l&&(l=C1(e,n,r),l!==null&&(pi(t,0).serverProps=l))}e[ln]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||h1(e.nodeValue,n)),e||dr(t,!0)}else l=n.ancestorInfo.current,l!=null&&Cu(r,l.tag,n.ancestorInfo.implicitRootScope),e=Ef(e).createTextNode(r),e[ln]=t,t.stateNode=e}return ht(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=lo(t),n!==null){if(e===null){if(!r)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[ln]=t,ht(t),(t.mode&Ve)!==Ce&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Ih(),bi(),(t.flags&128)===0&&(n=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ve)!==Ce&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else n=$h(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ln(t),t):(Ln(t),null);if((t.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ht(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=r,c=lo(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");c[ln]=t,ht(t),(t.mode&Ve)!==Ce&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration))}else Ih(),bi(),(t.flags&128)===0&&(l=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ve)!==Ce&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration));l=!1}else l=$h(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Ln(t),t):(Ln(t),null)}return Ln(t),(t.flags&128)!==0?(t.lanes=n,(t.mode&Ve)!==Ce&&Ul(t),t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,l=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(l=r.alternate.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pf(t,t.updateQueue),ht(t),(t.mode&Ve)!==Ce&&n&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return ae(t),e===null&&ip(t.stateNode.containerInfo),ht(t),null;case 10:return ja(t.type,t),ht(t),null;case 19:if(ie(Mt,t),r=t.memoizedState,r===null)return ht(t),null;if(l=(t.flags&128)!==0,c=r.rendering,c===null)if(l)Yl(r,!1);else{if(wt!==Za||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Zu(e),c!==null){for(t.flags|=128,Yl(r,!1),e=c.updateQueue,t.updateQueue=e,pf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Iy(n,e),n=n.sibling;return ve(Mt,Mt.current&Jo|kc,t),$e&&Ra(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Kt()>vd&&(t.flags|=128,l=!0,Yl(r,!1),t.lanes=4194304)}else{if(!l)if(e=Zu(c),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,pf(t,e),Yl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!c.alternate&&!$e)return ht(t),null}else 2*Kt()-r.renderingStartTime>vd&&n!==536870912&&(t.flags|=128,l=!0,Yl(r,!1),t.lanes=4194304);r.isBackwards?(c.sibling=t.child,t.child=c):(e=r.last,e!==null?e.sibling=c:t.child=c,r.last=c)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Kt(),e.sibling=null,n=Mt.current,n=l?n&Jo|kc:n&Jo,ve(Mt,n,t),$e&&Ra(t,r.treeForkCount),e):(ht(t),null);case 22:case 23:return Ln(t),tm(t),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),n=t.updateQueue,n!==null&&pf(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ie(Mi,t),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ja(Bt,t),ht(t),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function M_(e,t){switch(Ph(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 3:return ja(Bt,t),ae(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Ln(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 13:if(Ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 19:return ie(Mt,t),null;case 4:return ae(t),null;case 10:return ja(t.type,t),null;case 22:case 23:return Ln(t),tm(t),e!==null&&ie(Mi,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 24:return ja(Bt,t),null;case 25:return null;default:return null}}function cv(e,t){switch(Ph(t),t.tag){case 3:ja(Bt,t),ae(t);break;case 26:case 27:case 5:je(t);break;case 4:ae(t);break;case 31:t.memoizedState!==null&&Ln(t);break;case 13:Ln(t);break;case 19:ie(Mt,t);break;case 10:ja(t.type,t);break;case 22:case 23:Ln(t),tm(t),e!==null&&ie(Mi,t);break;case 24:ja(Bt,t)}}function ta(e){return(e.mode&Ve)!==Ce}function uv(e,t){ta(e)?(ea(),Fl(t,e),Ws()):Fl(t,e)}function Im(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function Fl(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var l=r.next;n=l;do{if((n.tag&e)===e&&(r=void 0,(e&Sn)!==ld&&(nl=!0),r=be(t,aC,n),(e&Sn)!==ld&&(nl=!1),r!==void 0&&typeof r!="function")){var c=void 0;c=(n.tag&Jn)!==0?"useLayoutEffect":(n.tag&Sn)!==0?"useInsertionEffect":"useEffect";var f=void 0;f=r===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof r.then=="function"?`
|
|
153
|
+
`+y:""))}}c=t.stateNode,f=W(n)||"Component",c.render||(n.prototype&&typeof n.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",f):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",f)),!c.getInitialState||c.getInitialState.isReactClassApproved||c.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",f),c.getDefaultProps&&!c.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",f),c.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",f),n.childContextTypes&&!BN.has(n)&&(BN.add(n),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",f)),n.contextTypes&&!zN.has(n)&&(zN.add(n),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",f)),typeof c.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",f),n.prototype&&n.prototype.isPureReactComponent&&typeof c.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",W(n)||"A pure component"),typeof c.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",f),typeof c.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",f),typeof c.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",f),typeof c.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",f),h=c.props!==r,c.props!==void 0&&h&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",f),c.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",f,f),typeof c.getSnapshotBeforeUpdate!="function"||typeof c.componentDidUpdate=="function"||MN.has(n)||(MN.add(n),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",W(n))),typeof c.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",f),typeof c.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",f),typeof n.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",f),(h=c.state)&&(typeof h!="object"||Jt(h))&&console.error("%s.state: must be set to an object or null",f),typeof c.getChildContext=="function"&&typeof n.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",f),c=t.stateNode,c.props=r,c.state=t.memoizedState,c.refs={},Wh(t),f=n.contextType,c.context=typeof f=="object"&&f!==null?vt(f):Or,c.state===r&&(f=W(n)||"Component",VN.has(f)||(VN.add(f),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",f))),t.mode&mn&&As.recordLegacyContextWarning(t,c),As.recordUnsafeLifecycleWarnings(t,c),c.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(Rm(t,n,f,r),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(f=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),f!==c.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",H(t)||"Component"),Ab.enqueueReplaceState(c,c.state,null)),Ll(t,r,c,l),ql(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Ce&&(t.flags|=134217728),c=!0}else if(e===null){c=t.stateNode;var k=t.memoizedProps;h=Si(n,k),c.props=h;var V=c.context;y=n.contextType,f=Or,typeof y=="object"&&y!==null&&(f=vt(y)),v=n.getDerivedStateFromProps,y=typeof v=="function"||typeof c.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,y||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(k||V!==f)&&Fg(t,c,r,f),Ur=!1;var O=t.memoizedState;c.state=O,Ll(t,r,c,l),ql(),V=t.memoizedState,k||O!==V||Ur?(typeof v=="function"&&(Rm(t,n,v,r),V=t.memoizedState),(h=Ur||Ig(t,n,h,r,O,V,f))?(y||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Ce&&(t.flags|=134217728)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Ce&&(t.flags|=134217728),t.memoizedProps=r,t.memoizedState=V),c.props=r,c.state=V,c.context=f,c=h):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Ce&&(t.flags|=134217728),c=!1)}else{c=t.stateNode,em(e,t),f=t.memoizedProps,y=Si(n,f),c.props=y,v=t.pendingProps,O=c.context,V=n.contextType,h=Or,typeof V=="object"&&V!==null&&(h=vt(V)),k=n.getDerivedStateFromProps,(V=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==v||O!==h)&&Fg(t,c,r,h),Ur=!1,O=t.memoizedState,c.state=O,Ll(t,r,c,l),ql();var P=t.memoizedState;f!==v||O!==P||Ur||e!==null&&e.dependencies!==null&&Lu(e.dependencies)?(typeof k=="function"&&(Rm(t,n,k,r),P=t.memoizedState),(y=Ur||Ig(t,n,y,r,O,P,h)||e!==null&&e.dependencies!==null&&Lu(e.dependencies))?(V||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(r,P,h),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(r,P,h)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=P),c.props=r,c.state=P,c.context=h,c=y):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),c=!1)}if(h=c,hf(e,t),f=(t.flags&128)!==0,h||f){if(h=t.stateNode,eo(t),f&&typeof n.getDerivedStateFromError!="function")n=null,Nn=-1;else if(n=iN(h),t.mode&mn){pt(!0);try{iN(h)}finally{pt(!1)}}t.flags|=1,e!==null&&f?(t.child=Ui(t,e.child,null,l),t.child=Ui(t,null,n,l)):rn(e,t,n,l),t.memoizedState=h.state,e=t.child}else e=ka(e,t,l);return l=t.stateNode,c&&l.props!==r&&(Zo||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",H(t)||"a component"),Zo=!0),e}function av(e,t,n,r){return bi(),t.flags|=256,rn(e,t,n,r),t.child}function Um(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
154
|
+
%s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=W(t)||"Unknown",IN[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),IN[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=W(t)||"Unknown",PN[t]||(console.error("%s: Function components do not support contextType.",t),PN[t]=!0))}function zm(e){return{baseLanes:e,cachePool:ng()}}function Bm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vn),e}function rv(e,t,n){var r,l=t.pendingProps;d(t)&&(t.flags|=128);var c=!1,f=(t.flags&128)!==0;if((r=f)||(r=e!==null&&e.memoizedState===null?!1:(Mt.current&kc)!==0),r&&(c=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if($e){if(c?yr(t):gr(t),(e=yt)?(n=A1(e,cs),n=n!==null&&n.data!==Ii?n:null,n!==null&&(r={dehydrated:n,treeContext:Jy(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Fy(n),r.return=t,t.child=r,cn=t,yt=null)):n=null,n===null)throw Bu(t,e),dr(t);return yp(n)?t.lanes=32:t.lanes=536870912,null}var h=l.children;if(l=l.fallback,c){gr(t);var y=t.mode;return h=mf({mode:"hidden",children:h},y),l=mi(l,y,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=zm(n),l.childLanes=Bm(e,r,n),t.memoizedState=Tb,Il(null,l)}return yr(t),qm(t,h)}var v=e.memoizedState;if(v!==null){var k=v.dehydrated;if(k!==null){if(f)t.flags&256?(yr(t),t.flags&=-257,t=Lm(e,t,n)):t.memoizedState!==null?(gr(t),t.child=e.child,t.flags|=128,t=null):(gr(t),h=l.fallback,y=t.mode,l=mf({mode:"visible",children:l.children},y),h=mi(h,y,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Ui(t,e.child,null,n),l=t.child,l.memoizedState=zm(n),l.childLanes=Bm(e,r,n),t.memoizedState=Tb,t=Il(null,l));else if(yr(t),Qy(),(n&536870912)!==0&&vf(t),yp(k)){if(r=k.nextSibling&&k.nextSibling.dataset,r){h=r.dgst;var V=r.msg;y=r.stck;var O=r.cstck}c=V,r=h,l=y,k=O,h=c,y=k,h=Error(h||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),h.stack=l||"",h.digest=r,r=y===void 0?null:y,l={value:h,source:null,stack:r},typeof r=="string"&&lb.set(h,l),Ml(l),t=Lm(e,t,n)}else if(Ht||co(e,t,n,!1),r=(n&e.childLanes)!==0,Ht||r){if(r=dt,r!==null&&(l=wl(r,n),l!==0&&l!==v.retryLane))throw v.retryLane=l,dn(e,l),At(r,e,l),Cb;bp(k)||xf(),t=Lm(e,t,n)}else bp(k)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,yt=Pn(k.nextSibling),cn=t,$e=!0,Rr=null,ma=!1,Fn=null,cs=!1,e!==null&&Gy(t,e),t=qm(t,l.children),t.flags|=4096);return t}}return c?(gr(t),h=l.fallback,y=t.mode,O=e.child,k=O.sibling,l=Oa(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,k!==null?h=Oa(k,h):(h=mi(h,y,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Il(null,l),l=t.child,h=e.child.memoizedState,h===null?h=zm(n):(y=h.cachePool,y!==null?(O=Bt._currentValue,y=y.parent!==O?{parent:O,pool:O}:y):y=ng(),h={baseLanes:h.baseLanes|n,cachePool:y}),l.memoizedState=h,l.childLanes=Bm(e,r,n),t.memoizedState=Tb,Il(e.child,l)):(v!==null&&(n&62914560)===n&&(n&e.lanes)!==0&&vf(t),yr(t),n=e.child,e=n.sibling,n=Oa(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function qm(e,t){return t=mf({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function mf(e,t){return e=D(22,e,null,t),e.lanes=0,e}function Lm(e,t,n){return Ui(t,e.child,null,n),e=qm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function iv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yh(e.return,t,n)}function Hm(e,t,n,r,l,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l,treeForkCount:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=r,f.tail=n,f.tailMode=l,f.treeForkCount=c)}function ov(e,t,n){var r=t.pendingProps,l=r.revealOrder,c=r.tail,f=r.children,h=Mt.current;if((r=(h&kc)!==0)?(h=h&Jo|kc,t.flags|=128):h&=Jo,ve(Mt,h,t),h=l??"null",l!=="forwards"&&l!=="unstable_legacy-backwards"&&l!=="together"&&l!=="independent"&&!FN[h])if(FN[h]=!0,l==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(l==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof l=="string")switch(l.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',l,l.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',l,l.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',l)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',l);h=c??"null",dd[h]||(c==null?(l==="forwards"||l==="backwards"||l==="unstable_legacy-backwards")&&(dd[h]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):c!=="visible"&&c!=="collapsed"&&c!=="hidden"?(dd[h]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',c)):l!=="forwards"&&l!=="backwards"&&l!=="unstable_legacy-backwards"&&(dd[h]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',c)));e:if((l==="forwards"||l==="backwards"||l==="unstable_legacy-backwards")&&f!==void 0&&f!==null&&f!==!1)if(Jt(f)){for(h=0;h<f.length;h++)if(!dg(f[h],h))break e}else if(h=oe(f),typeof h=="function"){if(h=h.call(f))for(var y=h.next(),v=0;!y.done;y=h.next()){if(!dg(y.value,v))break e;v++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',l);if(rn(e,t,f,n),$e?(fr(),f=vc):f=0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&iv(e,n,t);else if(e.tag===19)iv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Zu(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Hm(t,!1,l,n,c,f);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Zu(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Hm(t,!0,n,null,c,f);break;case"together":Hm(t,!1,null,null,void 0,f);break;default:t.memoizedState=null}return t.child}function ka(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nn=-1,qr|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(co(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,n=Oa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Lu(e)))}function R_(e,t,n){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),hr(t,Bt,e.memoizedState.cache),bi();break;case 27:case 5:xe(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:hr(t,t.type,t.memoizedProps.value);break;case 12:(n&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var r=t.stateNode;r.effectDuration=-0,r.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,sm(t),null;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(yr(t),t.flags|=128,null):(n&t.child.childLanes)!==0?rv(e,t,n):(yr(t),e=ka(e,t,n),e!==null?e.sibling:null);yr(t);break;case 19:var l=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(co(e,t,n,!1),r=(n&t.childLanes)!==0),l){if(r)return ov(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ve(Mt,Mt.current,t),r)break;return null;case 22:return t.lanes=0,Wg(e,t,n,t.pendingProps);case 24:hr(t,Bt,e.memoizedState.cache)}return ka(e,t,n)}function $m(e,t,n){if(t._debugNeedsRemount&&e!==null){n=qh(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),n._debugStack=t._debugStack,n._debugTask=t._debugTask;var r=t.return;if(r===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,n._debugInfo=t._debugInfo,t===r.child)r.child=n;else{var l=r.child;if(l===null)throw Error("Expected parent to have a child.");for(;l.sibling!==t;)if(l=l.sibling,l===null)throw Error("Expected to find the previous sibling.");l.sibling=n}return t=r.deletions,t===null?(r.deletions=[e],r.flags|=16):t.push(e),n.flags|=2,n}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)Ht=!0;else{if(!Pm(e,n)&&(t.flags&128)===0)return Ht=!1,R_(e,t,n);Ht=(e.flags&131072)!==0}else Ht=!1,(r=$e)&&(fr(),r=(t.flags&1048576)!==0),r&&(r=t.index,fr(),Yy(t,vc,r));switch(t.lanes=0,t.tag){case 16:e:if(r=t.pendingProps,e=mr(t.elementType),t.type=e,typeof e=="function")Bh(e)?(r=Si(e,r),t.tag=1,t.type=e=hi(e),t=sv(null,t,e,r,n)):(t.tag=0,Um(t,e),t.type=e=hi(e),t=Vm(null,t,e,r,n));else{if(e!=null){if(l=e.$$typeof,l===ic){t.tag=11,t.type=e=zh(e),t=Xg(null,t,e,r,n);break e}else if(l===kf){t.tag=14,t=Zg(null,t,e,r,n);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===$n&&(t=" Did you wrap a component in React.lazy() more than once?"),n=W(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return Vm(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,l=Si(r,t.pendingProps),sv(e,t,r,l,n);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");r=t.pendingProps;var c=t.memoizedState;l=c.element,em(e,t),Ll(t,r,null,n);var f=t.memoizedState;if(r=f.cache,hr(t,Bt,r),r!==c.cache&&Jh(t,[Bt],n,!0),ql(),r=f.element,c.isDehydrated)if(c={element:r,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=av(e,t,r,n);break e}else if(r!==l){l=zn(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),Ml(l),t=av(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(yt=Pn(e.firstChild),cn=t,$e=!0,Rr=null,ma=!1,Fn=null,cs=!0,n=xN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(bi(),r===l){t=ka(e,t,n);break e}rn(e,t,r,n)}t=t.child}return t;case 26:return hf(e,t),e===null?(n=j1(t.type,null,t.pendingProps,null))?t.memoizedState=n:$e||(n=t.type,e=t.pendingProps,r=Qe(Er.current),r=Ef(r).createElement(n),r[ln]=t,r[gn]=e,on(r,n,e),jt(r),t.stateNode=r):t.memoizedState=j1(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&$e&&(r=Qe(Er.current),l=pe(),r=t.stateNode=O1(t.type,t.pendingProps,r,l,!1),ma||(l=g1(r,t.type,t.pendingProps,l),l!==null&&(pi(t,0).serverProps=l)),cn=t,cs=!0,l=yt,Sr(t.type)?(Kb=l,yt=Pn(r.firstChild)):yt=l),rn(e,t,t.pendingProps.children,n),hf(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$e&&(c=pe(),r=Ch(t.type,c.ancestorInfo),l=yt,(f=!l)||(f=vA(l,t.type,t.pendingProps,cs),f!==null?(t.stateNode=f,ma||(c=g1(f,t.type,t.pendingProps,c),c!==null&&(pi(t,0).serverProps=c)),cn=t,yt=Pn(f.firstChild),cs=!1,c=!0):c=!1,f=!c),f&&(r&&Bu(t,l),dr(t))),xe(t),l=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,r=c.children,mp(l,c)?r=null:f!==null&&mp(l,f)&&(t.flags|=32),t.memoizedState!==null&&(l=rm(e,t,w_,null,null,n),Kc._currentValue=l),hf(e,t),rn(e,t,r,n),t.child;case 6:return e===null&&$e&&(n=t.pendingProps,e=pe(),r=e.ancestorInfo.current,n=r!=null?Cu(n,r.tag,e.ancestorInfo.implicitRootScope):!0,e=yt,(r=!e)||(r=xA(e,t.pendingProps,cs),r!==null?(t.stateNode=r,cn=t,yt=null,r=!0):r=!1,r=!r),r&&(n&&Bu(t,e),dr(t))),null;case 13:return rv(e,t,n);case 4:return nt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ui(t,null,r,n):rn(e,t,r,n),t.child;case 11:return Xg(e,t,t.type,t.pendingProps,n);case 7:return rn(e,t,t.pendingProps,n),t.child;case 8:return rn(e,t,t.pendingProps.children,n),t.child;case 12:return t.flags|=4,t.flags|=2048,r=t.stateNode,r.effectDuration=-0,r.passiveEffectDuration=-0,rn(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.type,l=t.pendingProps,c=l.value,"value"in l||YN||(YN=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),hr(t,r,c),rn(e,t,l.children,n),t.child;case 9:return l=t.type._context,r=t.pendingProps.children,typeof r!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),yi(t),l=vt(l),r=bb(r,l,void 0),t.flags|=1,rn(e,t,r,n),t.child;case 14:return Zg(e,t,t.type,t.pendingProps,n);case 15:return Kg(e,t,t.type,t.pendingProps,n);case 19:return ov(e,t,n);case 31:return O_(e,t,n);case 22:return Wg(e,t,n,t.pendingProps);case 24:return yi(t),r=vt(Bt),e===null?(l=Zh(),l===null&&(l=dt,c=Gh(),l.pooledCache=c,gi(c),c!==null&&(l.pooledCacheLanes|=n),l=c),t.memoizedState={parent:r,cache:l},Wh(t),hr(t,Bt,l)):((e.lanes&n)!==0&&(em(e,t),Ll(t,null,null,n),ql()),l=e.memoizedState,c=t.memoizedState,l.parent!==r?(l={parent:r,cache:r},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),hr(t,Bt,r)):(r=c.cache,hr(t,Bt,r),r!==l.cache&&Jh(t,[Bt],n,!0))),rn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Va(e){e.flags|=4}function Im(e,t,n,r,l){if((t=(e.mode&KD)!==Ce)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Lv())e.flags|=8192;else throw Vi=id,gb}else e.flags&=-16777217}function lv(e,t){if(t.type!=="stylesheet"||(t.state.loading&ms)!==Ji)e.flags&=-16777217;else if(e.flags|=16777216,!z1(t))if(Lv())e.flags|=8192;else throw Vi=id,gb}function pf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Nl():536870912,e.lanes|=t,Hi|=t)}function Fl(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)if((e.mode&Ve)!==Ce){for(var l=e.selfBaseDuration,c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,l+=c.treeBaseDuration,c=c.sibling;e.treeBaseDuration=l}else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&65011712,r|=l.flags&65011712,l.return=e,l=l.sibling;else if((e.mode&Ve)!==Ce){l=e.actualDuration,c=e.selfBaseDuration;for(var f=e.child;f!==null;)n|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,l+=f.actualDuration,c+=f.treeBaseDuration,f=f.sibling;e.actualDuration=l,e.treeBaseDuration=c}else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function j_(e,t,n){var r=t.pendingProps;switch($h(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ja(Bt,t),ae(t),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(lo(t)?(Fh(),Va(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ih())),ht(t),null;case 26:var l=t.type,c=t.memoizedState;return e===null?(Va(t),c!==null?(ht(t),lv(t,c)):(ht(t),Im(t,l,null,r,n))):c?c!==e.memoizedState?(Va(t),ht(t),lv(t,c)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Va(t),ht(t),Im(t,l,e,r,n)),null;case 27:if(je(t),n=Qe(Er.current),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Va(t);else{if(!r){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ht(t),null}e=pe(),lo(t)?Xy(t):(e=O1(l,r,n,e,!0),t.stateNode=e,Va(t))}return ht(t),null;case 5:if(je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Va(t);else{if(!r){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ht(t),null}var f=pe();if(lo(t))Xy(t);else{switch(c=Qe(Er.current),Ch(l,f.ancestorInfo),f=f.context,c=Ef(c),f){case rl:c=c.createElementNS(To,l);break;case jd:c=c.createElementNS(Hf,l);break;default:switch(l){case"svg":c=c.createElementNS(To,l);break;case"math":c=c.createElementNS(Hf,l);break;case"script":c=c.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof r.is=="string"?c.createElement("select",{is:r.is}):c.createElement("select"),r.multiple?c.multiple=!0:r.size&&(c.size=r.size);break;default:c=typeof r.is=="string"?c.createElement(l,{is:r.is}):c.createElement(l),l.indexOf("-")===-1&&(l!==l.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",l),Object.prototype.toString.call(c)!=="[object HTMLUnknownElement]"||Es.call(bS,l)||(bS[l]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",l)))}}c[ln]=t,c[gn]=r;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)c.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=c;e:switch(on(c,l,r),l){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Va(t)}}return ht(t),Im(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Va(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Qe(Er.current),n=pe(),lo(t)){if(e=t.stateNode,n=t.memoizedProps,l=!ma,r=null,c=cn,c!==null)switch(c.tag){case 3:l&&(l=C1(e,n,r),l!==null&&(pi(t,0).serverProps=l));break;case 27:case 5:r=c.memoizedProps,l&&(l=C1(e,n,r),l!==null&&(pi(t,0).serverProps=l))}e[ln]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||h1(e.nodeValue,n)),e||dr(t,!0)}else l=n.ancestorInfo.current,l!=null&&Cu(r,l.tag,n.ancestorInfo.implicitRootScope),e=Ef(e).createTextNode(r),e[ln]=t,t.stateNode=e}return ht(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=lo(t),n!==null){if(e===null){if(!r)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[ln]=t,ht(t),(t.mode&Ve)!==Ce&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Fh(),bi(),(t.flags&128)===0&&(n=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ve)!==Ce&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else n=Ih(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ln(t),t):(Ln(t),null);if((t.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ht(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=r,c=lo(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");c[ln]=t,ht(t),(t.mode&Ve)!==Ce&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration))}else Fh(),bi(),(t.flags&128)===0&&(l=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ve)!==Ce&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration));l=!1}else l=Ih(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Ln(t),t):(Ln(t),null)}return Ln(t),(t.flags&128)!==0?(t.lanes=n,(t.mode&Ve)!==Ce&&Ul(t),t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,l=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(l=r.alternate.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pf(t,t.updateQueue),ht(t),(t.mode&Ve)!==Ce&&n&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return ae(t),e===null&&op(t.stateNode.containerInfo),ht(t),null;case 10:return ja(t.type,t),ht(t),null;case 19:if(ie(Mt,t),r=t.memoizedState,r===null)return ht(t),null;if(l=(t.flags&128)!==0,c=r.rendering,c===null)if(l)Fl(r,!1);else{if(wt!==Za||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Zu(e),c!==null){for(t.flags|=128,Fl(r,!1),e=c.updateQueue,t.updateQueue=e,pf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Iy(n,e),n=n.sibling;return ve(Mt,Mt.current&Jo|kc,t),$e&&Ra(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Kt()>vd&&(t.flags|=128,l=!0,Fl(r,!1),t.lanes=4194304)}else{if(!l)if(e=Zu(c),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,pf(t,e),Fl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!c.alternate&&!$e)return ht(t),null}else 2*Kt()-r.renderingStartTime>vd&&n!==536870912&&(t.flags|=128,l=!0,Fl(r,!1),t.lanes=4194304);r.isBackwards?(c.sibling=t.child,t.child=c):(e=r.last,e!==null?e.sibling=c:t.child=c,r.last=c)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Kt(),e.sibling=null,n=Mt.current,n=l?n&Jo|kc:n&Jo,ve(Mt,n,t),$e&&Ra(t,r.treeForkCount),e):(ht(t),null);case 22:case 23:return Ln(t),nm(t),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),n=t.updateQueue,n!==null&&pf(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ie(Mi,t),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ja(Bt,t),ht(t),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function M_(e,t){switch($h(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 3:return ja(Bt,t),ae(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Ln(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 13:if(Ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 19:return ie(Mt,t),null;case 4:return ae(t),null;case 10:return ja(t.type,t),null;case 22:case 23:return Ln(t),nm(t),e!==null&&ie(Mi,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ve)!==Ce&&Ul(t),t):null;case 24:return ja(Bt,t),null;case 25:return null;default:return null}}function cv(e,t){switch($h(t),t.tag){case 3:ja(Bt,t),ae(t);break;case 26:case 27:case 5:je(t);break;case 4:ae(t);break;case 31:t.memoizedState!==null&&Ln(t);break;case 13:Ln(t);break;case 19:ie(Mt,t);break;case 10:ja(t.type,t);break;case 22:case 23:Ln(t),nm(t),e!==null&&ie(Mi,t);break;case 24:ja(Bt,t)}}function ta(e){return(e.mode&Ve)!==Ce}function uv(e,t){ta(e)?(ea(),Yl(t,e),Ws()):Yl(t,e)}function Fm(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function Yl(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var l=r.next;n=l;do{if((n.tag&e)===e&&(r=void 0,(e&Sn)!==ld&&(nl=!0),r=be(t,aC,n),(e&Sn)!==ld&&(nl=!1),r!==void 0&&typeof r!="function")){var c=void 0;c=(n.tag&Jn)!==0?"useLayoutEffect":(n.tag&Sn)!==0?"useInsertionEffect":"useEffect";var f=void 0;f=r===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof r.then=="function"?`
|
|
155
155
|
|
|
156
156
|
It looks like you wrote `+c+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
157
157
|
|
|
@@ -164,11 +164,11 @@ It looks like you wrote `+c+`(async () => ...) or returned a Promise. Instead, w
|
|
|
164
164
|
fetchData();
|
|
165
165
|
}, [someId]); // Or [] if effect doesn't need props or state
|
|
166
166
|
|
|
167
|
-
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+r,be(t,function(h,y){console.error("%s must not return anything besides a function, which is used for clean-up.%s",h,y)},c,f)}n=n.next}while(n!==l)}}catch(h){st(t,t.return,h)}}function po(e,t,n){try{var r=t.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var c=l.next;r=c;do{if((r.tag&e)===e){var f=r.inst,h=f.destroy;h!==void 0&&(f.destroy=void 0,(e&Sn)!==ld&&(nl=!0),l=t,be(l,rC,l,n,h),(e&Sn)!==ld&&(nl=!1))}r=r.next}while(r!==c)}}catch(y){st(t,t.return,y)}}function fv(e,t){ta(e)?(ea(),Fl(t,e),Ws()):Fl(t,e)}function Ym(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function dv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Zo||(n.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(e)||"instance"),n.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(e)||"instance"));try{be(e,mg,t,n)}catch(r){st(e,e.return,r)}}}function k_(e,t,n){return e.getSnapshotBeforeUpdate(t,n)}function V_(e,t){var n=t.memoizedProps,r=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Zo||(t.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(e)||"instance"),t.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(e)||"instance"));try{var l=Si(e.type,n),c=be(e,k_,t,l,r);n=JN,c!==void 0||n.has(e.type)||(n.add(e.type),be(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",H(e))})),t.__reactInternalSnapshotBeforeUpdate=c}catch(f){st(e,e.return,f)}}function hv(e,t,n){n.props=Si(e.type,e.memoizedProps),n.state=e.memoizedState,ta(e)?(ea(),be(e,dN,e,t,n),Ws()):be(e,dN,e,t,n)}function U_(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}if(typeof t=="function")if(ta(e))try{ea(),e.refCleanup=t(n)}finally{Ws()}else e.refCleanup=t(n);else typeof t=="string"?console.error("String refs are no longer supported."):t.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",H(e)),t.current=n}}function Jl(e,t){try{be(e,U_,e)}catch(n){st(e,t,n)}}function na(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{if(ta(e))try{ea(),be(e,r)}finally{Ws(e)}else be(e,r)}catch(l){st(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{if(ta(e))try{ea(),be(e,n,null)}finally{Ws(e)}else be(e,n,null)}catch(l){st(e,t,l)}else n.current=null}function mv(e,t,n,r){var l=e.memoizedProps,c=l.id,f=l.onCommit;l=l.onRender,t=t===null?"mount":"update",nd&&(t="nested-update"),typeof l=="function"&&l(c,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,n),typeof f=="function"&&f(c,t,r,n)}function z_(e,t,n,r){var l=e.memoizedProps;e=l.id,l=l.onPostCommit,t=t===null?"mount":"update",nd&&(t="nested-update"),typeof l=="function"&&l(e,t,r,n)}function pv(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{be(e,oA,r,t,n,e)}catch(l){st(e,e.return,l)}}function Fm(e,t,n){try{be(e,cA,e.stateNode,e.type,n,t,e)}catch(r){st(e,e.return,r)}}function bv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sr(e.type)||e.tag===4}function Jm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(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.tag===27&&Sr(e.type)||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 Gm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(w1(n),(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t)):(w1(n),t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ta));else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gm(e,t,n),e=e.sibling;e!==null;)Gm(e,t,n),e=e.sibling}function bf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(bf(e,t,n),e=e.sibling;e!==null;)bf(e,t,n),e=e.sibling}function B_(e){for(var t,n=e.return;n!==null;){if(bv(n)){t=n;break}n=n.return}if(t==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(t.tag){case 27:t=t.stateNode,n=Jm(e),bf(e,n,t);break;case 5:n=t.stateNode,t.flags&32&&(S1(n),t.flags&=-33),t=Jm(e),bf(e,t,n);break;case 3:case 4:t=t.stateNode.containerInfo,n=Jm(e),Gm(e,n,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function yv(e){var t=e.stateNode,n=e.memoizedProps;try{be(e,_A,e.type,n,t,e)}catch(r){st(e,e.return,r)}}function gv(e,t){return t.tag===31?(t=t.memoizedState,e.memoizedState!==null&&t===null):t.tag===13?(e=e.memoizedState,t=t.memoizedState,e!==null&&e.dehydrated!==null&&(t===null||t.dehydrated===null)):t.tag===3?e.memoizedState.isDehydrated&&(t.flags&256)===0:!1}function q_(e,t){if(e=e.containerInfo,Gb=Ud,e=ky(e),Oh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,c=r.focusNode;r=r.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var f=0,h=-1,y=-1,v=0,k=0,V=e,O=null;t:for(;;){for(var P;V!==n||l!==0&&V.nodeType!==3||(h=f+l),V!==c||r!==0&&V.nodeType!==3||(y=f+r),V.nodeType===3&&(f+=V.nodeValue.length),(P=V.firstChild)!==null;)O=V,V=P;for(;;){if(V===e)break t;if(O===n&&++v===l&&(h=f),O===c&&++k===r&&(y=f),(P=V.nextSibling)!==null)break;V=O,O=V.parentNode}V=P}n=h===-1||y===-1?null:{start:h,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qb={focusedElem:e,selectionRange:n},Ud=!1,en=t;en!==null;)if(t=en,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,en=e;else for(;en!==null;){switch(e=t=en,n=e.alternate,l=e.flags,e.tag){case 0:if((l&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:(l&1024)!==0&&n!==null&&V_(e,n);break;case 3:if((l&1024)!==0){if(e=e.stateNode.containerInfo,n=e.nodeType,n===9)mp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":mp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(e=t.sibling,e!==null){e.return=t.return,en=e;break}en=t.return}}function vv(e,t,n){var r=Bn(),l=Qs(),c=Zs(),f=Ks(),h=n.flags;switch(n.tag){case 0:case 11:case 15:sa(e,n),h&4&&uv(n,Jn|ds);break;case 1:if(sa(e,n),h&4)if(e=n.stateNode,t===null)n.type.defaultProps||"ref"in n.memoizedProps||Zo||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(n)||"instance"),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(n)||"instance")),ta(n)?(ea(),be(n,bb,n,e),Ws()):be(n,bb,n,e);else{var y=Si(n.type,t.memoizedProps);t=t.memoizedState,n.type.defaultProps||"ref"in n.memoizedProps||Zo||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(n)||"instance"),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(n)||"instance")),ta(n)?(ea(),be(n,cN,n,e,y,t,e.__reactInternalSnapshotBeforeUpdate),Ws()):be(n,cN,n,e,y,t,e.__reactInternalSnapshotBeforeUpdate)}h&64&&dv(n),h&512&&Jl(n,n.return);break;case 3:if(t=Ma(),sa(e,n),h&64&&(h=n.updateQueue,h!==null)){if(y=null,n.child!==null)switch(n.child.tag){case 27:case 5:y=n.child.stateNode;break;case 1:y=n.child.stateNode}try{be(n,mg,h,y)}catch(k){st(n,n.return,k)}}e.effectDuration+=Pu(t);break;case 27:t===null&&h&4&&yv(n);case 26:case 5:if(sa(e,n),t===null){if(h&4)pv(n);else if(h&64){e=n.type,t=n.memoizedProps,y=n.stateNode;try{be(n,lA,y,e,t,n)}catch(k){st(n,n.return,k)}}}h&512&&Jl(n,n.return);break;case 12:if(h&4){h=Ma(),sa(e,n),e=n.stateNode,e.effectDuration+=Vl(h);try{be(n,mv,n,t,jr,e.effectDuration)}catch(k){st(n,n.return,k)}}else sa(e,n);break;case 31:sa(e,n),h&4&&Sv(e,n);break;case 13:sa(e,n),h&4&&wv(e,n),h&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(h=G_.bind(null,n),NA(e,h))));break;case 22:if(h=n.memoizedState!==null||Xa,!h){t=t!==null&&t.memoizedState!==null||Pt,y=Xa;var v=Pt;Xa=h,(Pt=t)&&!v?(aa(e,n,(n.subtreeFlags&8772)!==0),(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&ju(n,_e,Ae)):sa(e,n),Xa=y,Pt=v}break;case 30:break;default:sa(e,n)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&((Dt||.05<St)&&Js(n,_e,Ae,St,xt),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&.05<Ae-_e&&(gv(n.return.alternate,n.return)||Fs(n,_e,Ae,"Mount"))),qn(r),Xs(l),xt=c,Dt=f}function xv(e){var t=e.alternate;t!==null&&(e.alternate=null,xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ir(t)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ua(e,t,n){for(n=n.child;n!==null;)Nv(e,t,n),n=n.sibling}function Nv(e,t,n){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Do,n)}catch(v){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",v))}var r=Bn(),l=Qs(),c=Zs(),f=Ks();switch(n.tag){case 26:Pt||na(n,t),Ua(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(e=n.stateNode,e.parentNode.removeChild(e));break;case 27:Pt||na(n,t);var h=$t,y=Mn;Sr(n.type)&&($t=n.stateNode,Mn=!1),Ua(e,t,n),be(n,nc,n.stateNode),$t=h,Mn=y;break;case 5:Pt||na(n,t);case 6:if(h=$t,y=Mn,$t=null,Ua(e,t,n),$t=h,Mn=y,$t!==null)if(Mn)try{be(n,dA,$t,n.stateNode)}catch(v){st(n,t,v)}else try{be(n,fA,$t,n.stateNode)}catch(v){st(n,t,v)}break;case 18:$t!==null&&(Mn?(e=$t,E1(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wo(e)):E1($t,n.stateNode));break;case 4:h=$t,y=Mn,$t=n.stateNode.containerInfo,Mn=!0,Ua(e,t,n),$t=h,Mn=y;break;case 0:case 11:case 14:case 15:po(Sn,n,t),Pt||Im(n,t,Jn),Ua(e,t,n);break;case 1:Pt||(na(n,t),h=n.stateNode,typeof h.componentWillUnmount=="function"&&hv(n,t,h)),Ua(e,t,n);break;case 21:Ua(e,t,n);break;case 22:Pt=(h=Pt)||n.memoizedState!==null,Ua(e,t,n),Pt=h;break;default:Ua(e,t,n)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(n,_e,Ae,St,xt),qn(r),Xs(l),xt=c,Dt=f}function Sv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{be(t,wA,e)}catch(n){st(t,t.return,n)}}}function wv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{be(t,EA,e)}catch(n){st(t,t.return,n)}}function L_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new GN),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new GN),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function yf(e,t){var n=L_(e);t.forEach(function(r){if(!n.has(r)){if(n.add(r),fa)if(Ko!==null&&Wo!==null)Zl(Wo,Ko);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var l=Q_.bind(null,e,r);r.then(l,l)}})}function Rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=e,c=t,f=n[r],h=Bn(),y=c;e:for(;y!==null;){switch(y.tag){case 27:if(Sr(y.type)){$t=y.stateNode,Mn=!1;break e}break;case 5:$t=y.stateNode,Mn=!1;break e;case 3:case 4:$t=y.stateNode.containerInfo,Mn=!0;break e}y=y.return}if($t===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Nv(l,c,f),$t=null,Mn=!1,(f.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Fs(f,_e,Ae,"Unmount"),qn(h),l=f,c=l.alternate,c!==null&&(c.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ev(t,e),t=t.sibling}function Ev(e,t){var n=Bn(),r=Qs(),l=Zs(),c=Ks(),f=e.alternate,h=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rn(t,e),jn(e),h&4&&(po(Sn|ds,e,e.return),Fl(Sn|ds,e),Im(e,e.return,Jn|ds));break;case 1:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),h&64&&Xa&&(h=e.updateQueue,h!==null&&(f=h.callbacks,f!==null))){var y=h.shared.hiddenCallbacks;h.shared.hiddenCallbacks=y===null?f:y.concat(f)}break;case 26:if(y=Cs,Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),h&4){var v=f!==null?f.memoizedState:null;if(h=e.memoizedState,f===null)if(h===null)if(e.stateNode===null){e:{h=e.type,f=e.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":v=y.getElementsByTagName("title")[0],(!v||v[cc]||v[ln]||v.namespaceURI===To||v.hasAttribute("itemprop"))&&(v=y.createElement(h),y.head.insertBefore(v,y.querySelector("head > title"))),on(v,h,f),v[ln]=e,jt(v),h=v;break e;case"link":var k=V1("link","href",y).get(h+(f.href||""));if(k){for(var V=0;V<k.length;V++)if(v=k[V],v.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&v.getAttribute("rel")===(f.rel==null?null:f.rel)&&v.getAttribute("title")===(f.title==null?null:f.title)&&v.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){k.splice(V,1);break t}}v=y.createElement(h),on(v,h,f),y.head.appendChild(v);break;case"meta":if(k=V1("meta","content",y).get(h+(f.content||""))){for(V=0;V<k.length;V++)if(v=k[V],nt(f.content,"content"),v.getAttribute("content")===(f.content==null?null:""+f.content)&&v.getAttribute("name")===(f.name==null?null:f.name)&&v.getAttribute("property")===(f.property==null?null:f.property)&&v.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&v.getAttribute("charset")===(f.charSet==null?null:f.charSet)){k.splice(V,1);break t}}v=y.createElement(h),on(v,h,f),y.head.appendChild(v);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+h+'". This is a bug in React.')}v[ln]=e,jt(v),h=v}e.stateNode=h}else U1(y,e.type,e.stateNode);else e.stateNode=k1(y,h,e.memoizedProps);else v!==h?(v===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):v.count--,h===null?U1(y,e.type,e.stateNode):k1(y,h,e.memoizedProps)):h===null&&e.stateNode!==null&&Fm(e,e.memoizedProps,f.memoizedProps)}break;case 27:Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),f!==null&&h&4&&Fm(e,e.memoizedProps,f.memoizedProps);break;case 5:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),e.flags&32){y=e.stateNode;try{be(e,S1,y)}catch(me){st(e,e.return,me)}}h&4&&e.stateNode!=null&&(y=e.memoizedProps,Fm(e,y,f!==null?f.memoizedProps:y)),h&1024&&(Tb=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Rn(t,e),jn(e),h&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");h=e.memoizedProps,f=f!==null?f.memoizedProps:h,y=e.stateNode;try{be(e,uA,y,f,h)}catch(me){st(e,e.return,me)}}break;case 3:if(y=Ma(),Md=null,v=Cs,Cs=_f(t.containerInfo),Rn(t,e),Cs=v,jn(e),h&4&&f!==null&&f.memoizedState.isDehydrated)try{be(e,SA,t.containerInfo)}catch(me){st(e,e.return,me)}Tb&&(Tb=!1,_v(e)),t.effectDuration+=Pu(y);break;case 4:h=Cs,Cs=_f(e.stateNode.containerInfo),Rn(t,e),jn(e),Cs=h;break;case 12:h=Ma(),Rn(t,e),jn(e),e.stateNode.effectDuration+=Vl(h);break;case 31:Rn(t,e),jn(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,yf(e,h)));break;case 13:Rn(t,e),jn(e),e.child.flags&8192&&e.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(gd=Kt()),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,yf(e,h)));break;case 22:y=e.memoizedState!==null;var O=f!==null&&f.memoizedState!==null,P=Xa,ce=Pt;if(Xa=P||y,Pt=ce||O,Rn(t,e),Pt=ce,Xa=P,O&&!y&&!P&&!ce&&(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&ju(e,_e,Ae),jn(e),h&8192)e:for(t=e.stateNode,t._visibility=y?t._visibility&~gc:t._visibility|gc,!y||f===null||O||Xa||Pt||(wi(e),(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Fs(e,_e,Ae,"Disconnect")),f=null,t=e;;){if(t.tag===5||t.tag===26){if(f===null){O=f=t;try{v=O.stateNode,y?be(O,mA,v):be(O,yA,O.stateNode,O.memoizedProps)}catch(me){st(O,O.return,me)}}}else if(t.tag===6){if(f===null){O=t;try{k=O.stateNode,y?be(O,pA,k):be(O,gA,k,O.memoizedProps)}catch(me){st(O,O.return,me)}}}else if(t.tag===18){if(f===null){O=t;try{V=O.stateNode,y?be(O,hA,V):be(O,bA,O.stateNode)}catch(me){st(O,O.return,me)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;f===t&&(f=null),t=t.return}f===t&&(f=null),t.sibling.return=t.return,t=t.sibling}h&4&&(h=e.updateQueue,h!==null&&(f=h.retryQueue,f!==null&&(h.retryQueue=null,yf(e,f))));break;case 19:Rn(t,e),jn(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,yf(e,h)));break;case 30:break;case 21:break;default:Rn(t,e),jn(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&((Dt||.05<St)&&Js(e,_e,Ae,St,xt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Ae-_e&&(gv(e.return.alternate,e.return)||Fs(e,_e,Ae,"Mount"))),qn(n),Xs(r),xt=l,Dt=c}function jn(e){var t=e.flags;if(t&2){try{be(e,B_,e)}catch(n){st(e,e.return,n)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _v(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_v(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vv(e,t.alternate,t),t=t.sibling}function Av(e){var t=Bn(),n=Qs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 14:case 15:Im(e,e.return,Jn),wi(e);break;case 1:na(e,e.return);var c=e.stateNode;typeof c.componentWillUnmount=="function"&&hv(e,e.return,c),wi(e);break;case 27:be(e,nc,e.stateNode);case 26:case 5:na(e,e.return),wi(e);break;case 22:e.memoizedState===null&&wi(e);break;case 30:wi(e);break;default:wi(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(e,_e,Ae,St,xt),qn(t),Xs(n),xt=r,Dt=l}function wi(e){for(e=e.child;e!==null;)Av(e),e=e.sibling}function Dv(e,t,n,r){var l=Bn(),c=Qs(),f=Zs(),h=Ks(),y=n.flags;switch(n.tag){case 0:case 11:case 15:aa(e,n,r),uv(n,Jn);break;case 1:if(aa(e,n,r),t=n.stateNode,typeof t.componentDidMount=="function"&&be(n,bb,n,t),t=n.updateQueue,t!==null){e=n.stateNode;try{be(n,S_,t,e)}catch(v){st(n,n.return,v)}}r&&y&64&&dv(n),Jl(n,n.return);break;case 27:yv(n);case 26:case 5:aa(e,n,r),r&&t===null&&y&4&&pv(n),Jl(n,n.return);break;case 12:if(r&&y&4){y=Ma(),aa(e,n,r),r=n.stateNode,r.effectDuration+=Vl(y);try{be(n,mv,n,t,jr,r.effectDuration)}catch(v){st(n,n.return,v)}}else aa(e,n,r);break;case 31:aa(e,n,r),r&&y&4&&Sv(e,n);break;case 13:aa(e,n,r),r&&y&4&&wv(e,n);break;case 22:n.memoizedState===null&&aa(e,n,r),Jl(n,n.return);break;case 30:break;default:aa(e,n,r)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(n,_e,Ae,St,xt),qn(l),Xs(c),xt=f,Dt=h}function aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Dv(e,t.alternate,t,n),t=t.sibling}function Qm(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&gi(e),n!=null&&kl(n))}function Xm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(gi(t),e!=null&&kl(e))}function ws(e,t,n,r,l){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var c=t.sibling;Cv(e,t,n,r,c!==null?c.actualStartTime:l),t=c}}function Cv(e,t,n,r,l){var c=Bn(),f=Qs(),h=Zs(),y=Ks(),v=Cr,k=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Ve)!==Ce&&0<t.actualStartTime&&(t.flags&1)!==0&&Mu(t,t.actualStartTime,l,Gt,n),ws(e,t,n,r,l),k&2048&&fv(t,wn|ds);break;case 1:(t.mode&Ve)!==Ce&&0<t.actualStartTime&&((t.flags&128)!==0?jh(t,t.actualStartTime,l,[]):(t.flags&1)!==0&&Mu(t,t.actualStartTime,l,Gt,n)),ws(e,t,n,r,l);break;case 3:var V=Ma(),O=Gt;Gt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,ws(e,t,n,r,l),Gt=O,k&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),r=t.memoizedState.cache,r!==n&&(gi(r),n!=null&&kl(n))),e.passiveEffectDuration+=Pu(V);break;case 12:if(k&2048){k=Ma(),ws(e,t,n,r,l),e=t.stateNode,e.passiveEffectDuration+=Vl(k);try{be(t,z_,t,t.alternate,jr,e.passiveEffectDuration)}catch(P){st(t,t.return,P)}}else ws(e,t,n,r,l);break;case 31:k=Gt,V=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,V!==null&&O===null?(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Gt=!1,V=V.hydrationErrors,V!==null&&jh(t,t.actualStartTime,l,V)):Gt=!0):Gt=!1,ws(e,t,n,r,l),Gt=k;break;case 13:k=Gt,V=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,V===null||V.dehydrated===null||O!==null&&O.dehydrated!==null?Gt=!1:(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Gt=!1,V=V.hydrationErrors,V!==null&&jh(t,t.actualStartTime,l,V)):Gt=!0),ws(e,t,n,r,l),Gt=k;break;case 23:break;case 22:O=t.stateNode,V=t.alternate,t.memoizedState!==null?O._visibility&La?ws(e,t,n,r,l):Gl(e,t,n,r,l):O._visibility&La?ws(e,t,n,r,l):(O._visibility|=La,bo(e,t,n,r,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),l),(t.mode&Ve)===Ce||Gt||(e=t.actualStartTime,0<=e&&.05<l-e&&ju(t,e,l),0<=_e&&0<=Ae&&.05<Ae-_e&&ju(t,_e,Ae))),k&2048&&Qm(V,t);break;case 24:ws(e,t,n,r,l),k&2048&&Xm(t.alternate,t);break;default:ws(e,t,n,r,l)}(t.mode&Ve)!==Ce&&((e=!Gt&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(n=t.actualStartTime,0<=n&&.05<l-n&&Fs(t,n,l,"Mount")),0<=_e&&0<=Ae&&((Dt||.05<St)&&Js(t,_e,Ae,St,xt),e&&.05<Ae-_e&&Fs(t,_e,Ae,"Mount"))),qn(c),Xs(f),xt=h,Dt=y,Cr=v}function bo(e,t,n,r,l,c){for(l=l&&((t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child)),t=t.child;t!==null;){var f=t.sibling;Tv(e,t,n,r,l,f!==null?f.actualStartTime:c),t=f}}function Tv(e,t,n,r,l,c){var f=Bn(),h=Qs(),y=Zs(),v=Ks(),k=Cr;l&&(t.mode&Ve)!==Ce&&0<t.actualStartTime&&(t.flags&1)!==0&&Mu(t,t.actualStartTime,c,Gt,n);var V=t.flags;switch(t.tag){case 0:case 11:case 15:bo(e,t,n,r,l,c),fv(t,wn);break;case 23:break;case 22:var O=t.stateNode;t.memoizedState!==null?O._visibility&La?bo(e,t,n,r,l,c):Gl(e,t,n,r,c):(O._visibility|=La,bo(e,t,n,r,l,c)),l&&V&2048&&Qm(t.alternate,t);break;case 24:bo(e,t,n,r,l,c),l&&V&2048&&Xm(t.alternate,t);break;default:bo(e,t,n,r,l,c)}(t.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(t,_e,Ae,St,xt),qn(f),Xs(h),xt=y,Dt=v,Cr=k}function Gl(e,t,n,r,l){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var c=t.child;c!==null;){t=c.sibling;var f=e,h=n,y=r,v=t!==null?t.actualStartTime:l,k=Cr;(c.mode&Ve)!==Ce&&0<c.actualStartTime&&(c.flags&1)!==0&&Mu(c,c.actualStartTime,v,Gt,h);var V=c.flags;switch(c.tag){case 22:Gl(f,c,h,y,v),V&2048&&Qm(c.alternate,c);break;case 24:Gl(f,c,h,y,v),V&2048&&Xm(c.alternate,c);break;default:Gl(f,c,h,y,v)}Cr=k,c=t}}function yo(e,t,n){if(e.subtreeFlags&Bc)for(e=e.child;e!==null;)Ov(e,t,n),e=e.sibling}function Ov(e,t,n){switch(e.tag){case 26:yo(e,t,n),e.flags&Bc&&e.memoizedState!==null&&CA(n,Cs,e.memoizedState,e.memoizedProps);break;case 5:yo(e,t,n);break;case 3:case 4:var r=Cs;Cs=_f(e.stateNode.containerInfo),yo(e,t,n),Cs=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bc,Bc=16777216,yo(e,t,n),Bc=r):yo(e,t,n));break;default:yo(e,t,n)}}function Rv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],l=Bn();en=r,kv(r,e),(r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Fs(r,_e,Ae,"Unmount"),qn(l)}Rv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jv(e),e=e.sibling}function jv(e){var t=Bn(),n=Qs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 15:Ql(e),e.flags&2048&&Ym(e,e.return,wn|ds);break;case 3:var c=Ma();Ql(e),e.stateNode.passiveEffectDuration+=Pu(c);break;case 12:c=Ma(),Ql(e),e.stateNode.passiveEffectDuration+=Vl(c);break;case 22:c=e.stateNode,e.memoizedState!==null&&c._visibility&La&&(e.return===null||e.return.tag!==13)?(c._visibility&=~La,gf(e),(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Fs(e,_e,Ae,"Disconnect")):Ql(e);break;default:Ql(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(e,_e,Ae,St,xt),qn(t),Xs(n),Dt=l,xt=r}function gf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],l=Bn();en=r,kv(r,e),(r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Fs(r,_e,Ae,"Unmount"),qn(l)}Rv(e)}for(e=e.child;e!==null;)Mv(e),e=e.sibling}function Mv(e){var t=Bn(),n=Qs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 15:Ym(e,e.return,wn),gf(e);break;case 22:var c=e.stateNode;c._visibility&La&&(c._visibility&=~La,gf(e));break;default:gf(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(e,_e,Ae,St,xt),qn(t),Xs(n),Dt=l,xt=r}function kv(e,t){for(;en!==null;){var n=en,r=n,l=t,c=Bn(),f=Qs(),h=Zs(),y=Ks();switch(r.tag){case 0:case 11:case 15:Ym(r,l,wn);break;case 23:case 22:r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool,l!=null&&gi(l));break;case 24:kl(r.memoizedState.cache)}if((r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(r,_e,Ae,St,xt),qn(c),Xs(f),Dt=y,xt=h,r=n.child,r!==null)r.return=n,en=r;else e:for(n=e;en!==null;){if(r=en,c=r.sibling,f=r.return,xv(r),r===n){en=null;break e}if(c!==null){c.return=f,en=c;break e}en=f}}}function H_(){uC.forEach(function(e){return e()})}function Vv(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||Y.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Hn(e){if((Xe&Qt)!==tn&&ze!==0)return ze&-ze;var t=Y.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),ap()):so()}function Uv(){if(Vn===0)if((ze&536870912)===0||$e){var e=zf;zf<<=1,(zf&3932160)===0&&(zf=262144),Vn=e}else Vn=536870912;return e=Fn.current,e!==null&&(e.flags|=32),Vn}function At(e,t,n){if(nl&&console.error("useInsertionEffect must not schedule updates."),Lb&&(Sd=!0),(e===dt&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)&&(vo(e,0),xr(e,ze,Vn,!1)),li(e,n),(Xe&Qt)!==tn&&e===dt){if(ca)switch(t.tag){case 0:case 11:case 15:e=qe&&H(qe)||"Unknown",cS.has(e)||(cS.add(e),t=H(t)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",t,e,e));break;case 1:lS||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),lS=!0)}}else fa&&zs(e,t,n),Z_(t),e===dt&&((Xe&Qt)===tn&&(Lr|=n),wt===zr&&xr(e,ze,Vn,!1)),ra(e)}function zv(e,t,n){if((Xe&(Qt|Gn))!==tn)throw Error("Should not already be working.");if(ze!==0&&qe!==null){var r=qe,l=Kt();switch(tN){case Hc:case qi:var c=Ec;bt&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,"Suspended",c,l,as,void 0,"primary-light")):console.timeStamp("Suspended",c,l,as,void 0,"primary-light"));break;case Li:c=Ec,bt&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,"Action",c,l,as,void 0,"primary-light")):console.timeStamp("Action",c,l,as,void 0,"primary-light"));break;default:bt&&(r=l-Ec,3>r||console.timeStamp("Blocked",Ec,l,as,void 0,5>r?"primary-light":10>r?"primary":100>r?"primary-dark":"error"))}}c=(n=!n&&(t&127)===0&&(t&e.expiredLanes)===0||fn(e,t))?$_(e,t):Km(e,t,!0);var f=n;do{if(c===Za){el&&!n&&xr(e,t,0,!1),t=lt,Ec=qt(),tN=t;break}else{if(r=Kt(),l=e.current.alternate,f&&!P_(l)){Ns(t),l=Wt,c=r,!bt||c<=l||(Ot?Ot.run(console.timeStamp.bind(console,"Teared Render",l,c,Je,Ye,"error")):console.timeStamp("Teared Render",l,c,Je,Ye,"error")),Ei(t,r),c=Km(e,t,!1),f=!1;continue}if(c===Bi){if(f=t,e.errorRecoveryDisabledLanes&f)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){Ns(t),Mh(Wt,r,t,Ot),Ei(t,r),t=h;e:{r=e,c=f,f=$c;var y=r.current.memoizedState.isDehydrated;if(y&&(vo(r,h).flags|=256),h=Km(r,h,!1),h!==Bi){if(jb&&!y){r.errorRecoveryDisabledLanes|=c,Lr|=c,c=zr;break e}r=En,En=f,r!==null&&(En===null?En=r:En.push.apply(En,r))}c=h}if(f=!1,c!==Bi)continue;r=Kt()}}if(c===Lc){Ns(t),Mh(Wt,r,t,Ot),Ei(t,r),vo(e,0),xr(e,t,0,!0);break}e:{switch(n=e,c){case Za:case Lc:throw Error("Root did not complete. This is a bug in React.");case zr:if((t&4194048)!==t)break;case md:Ns(t),zy(Wt,r,t,Ot),Ei(t,r),l=t,(l&127)!==0?Wf=r:(l&4194048)!==0&&(ed=r),xr(n,t,Vn,!Br);break e;case Bi:En=null;break;case hd:case QN:break;default:throw Error("Unknown root exit status.")}if(Y.actQueue!==null)Wm(n,l,t,En,Ic,yd,Vn,Lr,Hi,c,null,null,Wt,r);else{if((t&62914560)===t&&(f=gd+KN-Kt(),10<f)){if(xr(n,t,Vn,!Br),Aa(n,0,!0)!==0)break e;Ts=t,n.timeoutHandle=yS(Bv.bind(null,n,l,En,Ic,yd,t,Vn,Lr,Hi,Br,c,"Throttled",Wt,r),f);break e}Bv(n,l,En,Ic,yd,t,Vn,Lr,Hi,Br,c,null,Wt,r)}}}break}while(!0);ra(e)}function Bv(e,t,n,r,l,c,f,h,y,v,k,V,O,P){e.timeoutHandle=Fi;var ce=t.subtreeFlags,me=null;if((ce&8192||(ce&16785408)===16785408)&&(me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},Ov(t,c,me),ce=(c&62914560)===c?gd-Kt():(c&4194048)===c?ZN-Kt():0,ce=TA(me,ce),ce!==null)){Ts=c,e.cancelPendingCommit=ce(Wm.bind(null,e,t,c,n,r,l,f,h,y,k,me,me.waitingForViewTransition?"Waiting for the previous Animation":0<me.count?0<me.imgCount?"Suspended on CSS and Images":"Suspended on CSS":me.imgCount===1?"Suspended on an Image":0<me.imgCount?"Suspended on Images":null,O,P)),xr(e,c,f,!v);return}Wm(e,t,c,n,r,l,f,h,y,k,me,V,O,P)}function P_(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var l=n[r],c=l.getSnapshot;l=l.value;try{if(!xn(c(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xr(e,t,n,r){t&=~Mb,t&=~Lr,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var l=t;0<l;){var c=31-yn(l),f=1<<c;r[c]=-1,l&=~f}n!==0&&Eu(e,n,t)}function go(){return(Xe&(Qt|Gn))===tn?(Kl(0),!1):!0}function Zm(){if(qe!==null){if(lt===kn)var e=qe.return;else e=qe,qu(),lm(e),Yo=null,Mc=0,e=qe;for(;e!==null;)cv(e.alternate,e),e=e.return;qe=null}}function Ei(e,t){(e&127)!==0&&(Ti=t),(e&4194048)!==0&&(Ya=t),(e&62914560)!==0&&(Wx=t),(e&2080374784)!==0&&(eN=t)}function vo(e,t){bt&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",Ye,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",Ye,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",Ye,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",Ye,"primary-light"));var n=Wt;if(Wt=qt(),ze!==0&&0<n){if(Ns(ze),wt===hd||wt===zr)zy(n,Wt,t,Ot);else{var r=Wt,l=Ot;if(bt&&!(r<=n)){var c=(t&738197653)===t?"tertiary-dark":"primary-dark",f=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";l?l.run(console.timeStamp.bind(console,f,n,r,Je,Ye,c)):console.timeStamp(f,n,r,Je,Ye,c)}}Ei(ze,Wt)}if(n=Ot,Ot=null,(t&127)!==0){Ot=Nc,l=0<=pa&&pa<Ti?Ti:pa,r=0<=Oi&&Oi<Ti?Ti:Oi,c=0<=r?r:0<=l?l:Wt,0<=Wf?(Ns(2),By(Wf,c,t,n)):td&127,n=l;var h=r,y=Sc,v=0<Po,k=Mr===xc,V=Mr===Kf;if(l=Wt,r=Nc,c=fb,f=db,bt){if(Je="Blocking",0<n?n>l&&(n=l):n=l,0<h?h>n&&(h=n):h=n,y!==null&&n>h){var O=v?"secondary-light":"warning";r?r.run(console.timeStamp.bind(console,v?"Consecutive":"Event: "+y,h,n,Je,Ye,O)):console.timeStamp(v?"Consecutive":"Event: "+y,h,n,Je,Ye,O)}l>n&&(h=k?"error":(t&738197653)===t?"tertiary-light":"primary-light",k=V?"Promise Resolved":k?"Cascading Update":5<l-n?"Update Blocked":"Update",V=[],f!=null&&V.push(["Component name",f]),c!=null&&V.push(["Method name",c]),n={start:n,end:l,detail:{devtools:{properties:V,track:Je,trackGroup:Ye,color:h}}},r?r.run(performance.measure.bind(performance,k,n)):performance.measure(k,n))}pa=-1.1,Mr=0,db=fb=null,Wf=-1.1,Po=Oi,Oi=-1.1,Ti=qt()}if((t&4194048)!==0&&(Ot=wc,l=0<=Fa&&Fa<Ya?Ya:Fa,n=0<=us&&us<Ya?Ya:us,r=0<=kr&&kr<Ya?Ya:kr,c=0<=r?r:0<=n?n:Wt,0<=ed?(Ns(256),By(ed,c,t,Ot)):td&4194048,V=r,h=Ri,y=0<Vr,v=hb===Kf,c=Wt,r=wc,f=Zx,k=Kx,bt&&(Je="Transition",0<n?n>c&&(n=c):n=c,0<l?l>n&&(l=n):l=n,0<V?V>l&&(V=l):V=l,l>V&&h!==null&&(O=y?"secondary-light":"warning",r?r.run(console.timeStamp.bind(console,y?"Consecutive":"Event: "+h,V,l,Je,Ye,O)):console.timeStamp(y?"Consecutive":"Event: "+h,V,l,Je,Ye,O)),n>l&&(r?r.run(console.timeStamp.bind(console,"Action",l,n,Je,Ye,"primary-dark")):console.timeStamp("Action",l,n,Je,Ye,"primary-dark")),c>n&&(l=v?"Promise Resolved":5<c-n?"Update Blocked":"Update",V=[],k!=null&&V.push(["Component name",k]),f!=null&&V.push(["Method name",f]),n={start:n,end:c,detail:{devtools:{properties:V,track:Je,trackGroup:Ye,color:"primary-light"}}},r?r.run(performance.measure.bind(performance,l,n)):performance.measure(l,n))),us=Fa=-1.1,hb=0,ed=-1.1,Vr=kr,kr=-1.1,Ya=qt()),(t&62914560)!==0&&(td&62914560)!==0&&(Ns(4194304),kh(Wx,Wt)),(t&2080374784)!==0&&(td&2080374784)!==0&&(Ns(268435456),kh(eN,Wt)),n=e.timeoutHandle,n!==Fi&&(e.timeoutHandle=Fi,wC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ts=0,Zm(),dt=e,qe=n=Oa(e.current,null),ze=t,lt=kn,Qn=null,Br=!1,el=fn(e,t),jb=!1,wt=Za,Hi=Vn=Mb=Lr=qr=0,En=$c=null,yd=!1,(t&8)!==0&&(t|=t&32),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=t;0<r;)l=31-yn(r),c=1<<l,t|=e[l],r&=~c;return ya=t,ku(),e=Yx(),1e3<e-Ix&&(Y.recentlyCreatedOwnerStacks=0,Ix=e),As.discardPendingWarnings(),n}function qv(e,t){Oe=null,Y.H=zc,Y.getCurrentStack=null,ca=!1,In=null,t===Io||t===rd?(t=ig(),lt=Hc):t===yb?(t=ig(),lt=XN):lt=t===Db?Rb:t!==null&&typeof t=="object"&&typeof t.then=="function"?Pc:pd,Qn=t;var n=qe;n===null?(wt=Lc,ff(e,zn(t,e.current))):n.mode&Ve&&Qh(n)}function Lv(){var e=Fn.current;return e===null?!0:(ze&4194048)===ze?fs===null:(ze&62914560)===ze||(ze&536870912)!==0?e===fs:!1}function Hv(){var e=Y.H;return Y.H=zc,e===null?zc:e}function Pv(){var e=Y.A;return Y.A=cC,e}function vf(e){Ot===null&&(Ot=e._debugTask==null?null:e._debugTask)}function xf(){wt=zr,Br||(ze&4194048)!==ze&&Fn.current!==null||(el=!0),(qr&134217727)===0&&(Lr&134217727)===0||dt===null||xr(dt,ze,Vn,!1)}function Km(e,t,n){var r=Xe;Xe|=Qt;var l=Hv(),c=Pv();if(dt!==e||ze!==t){if(fa){var f=e.memoizedUpdaters;0<f.size&&(Zl(e,ze),f.clear()),ci(e,t)}Ic=null,vo(e,t)}t=!1,f=wt;e:do try{if(lt!==kn&&qe!==null){var h=qe,y=Qn;switch(lt){case Rb:Zm(),f=md;break e;case Hc:case qi:case Li:case Pc:Fn.current===null&&(t=!0);var v=lt;if(lt=kn,Qn=null,xo(e,h,y,v),n&&el){f=Za;break e}break;default:v=lt,lt=kn,Qn=null,xo(e,h,y,v)}}$v(),f=wt;break}catch(k){qv(e,k)}while(!0);return t&&e.shellSuspendCounter++,qu(),Xe=r,Y.H=l,Y.A=c,qe===null&&(dt=null,ze=0,ku()),f}function $v(){for(;qe!==null;)Iv(qe)}function $_(e,t){var n=Xe;Xe|=Qt;var r=Hv(),l=Pv();if(dt!==e||ze!==t){if(fa){var c=e.memoizedUpdaters;0<c.size&&(Zl(e,ze),c.clear()),ci(e,t)}Ic=null,vd=Kt()+WN,vo(e,t)}else el=fn(e,t);e:do try{if(lt!==kn&&qe!==null)t:switch(t=qe,c=Qn,lt){case pd:lt=kn,Qn=null,xo(e,t,c,pd);break;case qi:case Li:if(ag(c)){lt=kn,Qn=null,Yv(t);break}t=function(){lt!==qi&<!==Li||dt!==e||(lt=bd),ra(e)},c.then(t,t);break e;case Hc:lt=bd;break e;case XN:lt=Ob;break e;case bd:ag(c)?(lt=kn,Qn=null,Yv(t)):(lt=kn,Qn=null,xo(e,t,c,bd));break;case Ob:var f=null;switch(qe.tag){case 26:f=qe.memoizedState;case 5:case 27:var h=qe;if(f?z1(f):h.stateNode.complete){lt=kn,Qn=null;var y=h.sibling;if(y!==null)qe=y;else{var v=h.return;v!==null?(qe=v,Nf(v)):qe=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}lt=kn,Qn=null,xo(e,t,c,Ob);break;case Pc:lt=kn,Qn=null,xo(e,t,c,Pc);break;case Rb:Zm(),wt=md;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Y.actQueue!==null?$v():I_();break}catch(k){qv(e,k)}while(!0);return qu(),Y.H=r,Y.A=l,Xe=n,qe!==null?Za:(dt=null,ze=0,ku(),wt)}function I_(){for(;qe!==null&&!$A();)Iv(qe)}function Iv(e){var t=e.alternate;(e.mode&Ve)!==Ce?(Gh(e),t=be(e,Pm,t,e,ya),Qh(e)):t=be(e,Pm,t,e,ya),e.memoizedProps=e.pendingProps,t===null?Nf(e):qe=t}function Yv(e){var t=be(e,Y_,e);e.memoizedProps=e.pendingProps,t===null?Nf(e):qe=t}function Y_(e){var t=e.alternate,n=(e.mode&Ve)!==Ce;switch(n&&Gh(e),e.tag){case 15:case 0:t=nv(t,e,e.pendingProps,e.type,void 0,ze);break;case 11:t=nv(t,e,e.pendingProps,e.type.render,e.ref,ze);break;case 5:lm(e);default:cv(t,e),e=qe=Iy(e,ya),t=Pm(t,e,ya)}return n&&Qh(e),t}function xo(e,t,n,r){qu(),lm(t),Yo=null,Mc=0;var l=t.return;try{if(T_(e,l,t,n,ze)){wt=Lc,ff(e,zn(n,e.current)),qe=null;return}}catch(c){if(l!==null)throw qe=l,c;wt=Lc,ff(e,zn(n,e.current)),qe=null;return}t.flags&32768?($e||r===pd?e=!0:el||(ze&536870912)!==0?e=!1:(Br=e=!0,(r===qi||r===Li||r===Hc||r===Pc)&&(r=Fn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fv(t,e)):Nf(t)}function Nf(e){var t=e;do{if((t.flags&32768)!==0){Fv(t,Br);return}var n=t.alternate;if(e=t.return,Gh(t),n=be(t,j_,n,t,ya),(t.mode&Ve)!==Ce&&Wy(t),n!==null){qe=n;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);wt===Za&&(wt=QN)}function Fv(e,t){do{var n=M_(e.alternate,e);if(n!==null){n.flags&=32767,qe=n;return}if((e.mode&Ve)!==Ce){Wy(e),n=e.actualDuration;for(var r=e.child;r!==null;)n+=r.actualDuration,r=r.sibling;e.actualDuration=n}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){qe=e;return}qe=e=n}while(e!==null);wt=md,qe=null}function Wm(e,t,n,r,l,c,f,h,y,v,k,V,O,P){e.cancelPendingCommit=null;do Xl();while(It!==Pr);if(As.flushLegacyContextWarning(),As.flushPendingUnsafeLifecycleWarnings(),(Xe&(Qt|Gn))!==tn)throw Error("Should not already be working.");if(Ns(n),v===Bi?Mh(O,P,n,Ot):r!==null?b_(O,P,n,r,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Ot):p_(O,P,n,Ot),t!==null){if(n===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(c=t.lanes|t.childLanes,c|=ib,Eh(e,n,c,f,h,y),e===dt&&(qe=dt=null,ze=0),tl=t,$r=e,Ts=n,Ub=c,Bb=l,rS=r,zb=P,iS=V,Os=xd,oS=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,X_(Ao,function(){return Xc=window.event,Os===xd&&(Os=Vb),Zv(),null})):(e.callbackNode=null,e.callbackPriority=0),Ia=null,jr=qt(),V!==null&&y_(P,jr,V,Ot),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null,l=at.p,at.p=ss,f=Xe,Xe|=Gn;try{q_(e,t,n)}finally{Xe=f,at.p=l,Y.T=r}}It=tS,Jv(),Gv(),Qv()}}function Jv(){if(It===tS){It=Pr;var e=$r,t=tl,n=Ts,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null;var l=at.p;at.p=ss;var c=Xe;Xe|=Gn;try{Ko=n,Wo=e,$u(),Ev(t,e),Wo=Ko=null,n=Qb;var f=ky(e.containerInfo),h=n.focusedElem,y=n.selectionRange;if(f!==h&&h&&h.ownerDocument&&My(h.ownerDocument.documentElement,h)){if(y!==null&&Oh(h)){var v=y.start,k=y.end;if(k===void 0&&(k=v),"selectionStart"in h)h.selectionStart=v,h.selectionEnd=Math.min(k,h.value.length);else{var V=h.ownerDocument||document,O=V&&V.defaultView||window;if(O.getSelection){var P=O.getSelection(),ce=h.textContent.length,me=Math.min(y.start,ce),mt=y.end===void 0?me:Math.min(y.end,ce);!P.extend&&me>mt&&(f=mt,mt=me,me=f);var Fe=jy(h,me),T=jy(h,mt);if(Fe&&T&&(P.rangeCount!==1||P.anchorNode!==Fe.node||P.anchorOffset!==Fe.offset||P.focusNode!==T.node||P.focusOffset!==T.offset)){var R=V.createRange();R.setStart(Fe.node,Fe.offset),P.removeAllRanges(),me>mt?(P.addRange(R),P.extend(T.node,T.offset)):(R.setEnd(T.node,T.offset),P.addRange(R))}}}}for(V=[],P=h;P=P.parentNode;)P.nodeType===1&&V.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<V.length;h++){var j=V[h];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}Ud=!!Gb,Qb=Gb=null}finally{Xe=c,at.p=l,Y.T=r}}e.current=t,It=nS}}function Gv(){if(It===nS){It=Pr;var e=oS;if(e!==null){jr=qt();var t=$a,n=jr;!bt||n<=t||console.timeStamp(e,t,n,Je,Ye,"secondary-light")}e=$r,t=tl,n=Ts;var r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Y.T,Y.T=null;var l=at.p;at.p=ss;var c=Xe;Xe|=Gn;try{Ko=n,Wo=e,$u(),vv(e,t.alternate,t),Wo=Ko=null}finally{Xe=c,at.p=l,Y.T=r}}e=zb,t=iS,$a=qt(),e=t===null?e:jr,t=$a,n=Os===kb,r=Ot,Ia!==null?qy(e,t,Ia,!1,r):!bt||t<=e||(r?r.run(console.timeStamp.bind(console,n?"Commit Interrupted View Transition":"Commit",e,t,Je,Ye,n?"error":"secondary-dark")):console.timeStamp(n?"Commit Interrupted View Transition":"Commit",e,t,Je,Ye,n?"error":"secondary-dark")),It=sS}}function Qv(){if(It===aS||It===sS){if(It===aS){var e=$a;$a=qt();var t=$a,n=Os===kb;!bt||t<=e||console.timeStamp(n?"Interrupted View Transition":"Starting Animation",e,t,Je,Ye,n?" error":"secondary-light"),Os!==kb&&(Os=eS)}It=Pr,IA(),e=$r;var r=tl;t=Ts,n=rS;var l=r.actualDuration!==0||(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0;l?It=Nd:(It=Pr,tl=$r=null,Xv(e,e.pendingLanes),Pi=0,Fc=null);var c=e.pendingLanes;if(c===0&&(Hr=null),l||t1(e),c=no(t),r=r.stateNode,hn&&typeof hn.onCommitFiberRoot=="function")try{var f=(r.current.flags&128)===128;switch(c){case ss:var h=Bp;break;case da:h=qp;break;case Ba:h=Ao;break;case qf:h=Lp;break;default:h=Ao}hn.onCommitFiberRoot(Do,r,h,f)}catch(V){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",V))}if(fa&&e.memoizedUpdaters.clear(),H_(),n!==null){f=Y.T,h=at.p,at.p=ss,Y.T=null;try{var y=e.onRecoverableError;for(r=0;r<n.length;r++){var v=n[r],k=F_(v.stack);be(v.source,y,v.value,k)}}finally{Y.T=f,at.p=h}}(Ts&3)!==0&&Xl(),ra(e),c=e.pendingLanes,(t&261930)!==0&&(c&42)!==0?(sd=!0,e===qb?Yc++:(Yc=0,qb=e)):Yc=0,l||Ei(t,$a),Kl(0)}}function F_(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Xv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,kl(t)))}function Xl(){return Jv(),Gv(),Qv(),Zv()}function Zv(){if(It!==Nd)return!1;var e=$r,t=Ub;Ub=0;var n=no(Ts),r=Ba>n?Ba:n;n=Y.T;var l=at.p;try{at.p=r,Y.T=null;var c=Bb;Bb=null,r=$r;var f=Ts;if(It=Pr,tl=$r=null,Ts=0,(Xe&(Qt|Gn))!==tn)throw Error("Cannot flush passive effects while already rendering.");Ns(f),Lb=!0,Sd=!1;var h=0;if(Ia=null,h=Kt(),Os===eS)kh($a,h,nC);else{var y=$a,v=h,k=Os===Vb;!bt||v<=y||(Ot?Ot.run(console.timeStamp.bind(console,k?"Waiting for Paint":"Waiting",y,v,Je,Ye,"secondary-light")):console.timeStamp(k?"Waiting for Paint":"Waiting",y,v,Je,Ye,"secondary-light"))}y=Xe,Xe|=Gn;var V=r.current;$u(),jv(V);var O=r.current;V=zb,$u(),Cv(r,O,f,c,V),t1(r),Xe=y;var P=Kt();if(O=h,V=Ot,Ia!==null?qy(O,P,Ia,!0,V):!bt||P<=O||(V?V.run(console.timeStamp.bind(console,"Remaining Effects",O,P,Je,Ye,"secondary-dark")):console.timeStamp("Remaining Effects",O,P,Je,Ye,"secondary-dark")),Ei(f,P),Kl(0,!1),Sd?r===Fc?Pi++:(Pi=0,Fc=r):Pi=0,Sd=Lb=!1,hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(Do,r)}catch(me){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",me))}var ce=r.current.stateNode;return ce.effectDuration=0,ce.passiveEffectDuration=0,!0}finally{at.p=l,Y.T=n,Xv(e,t)}}function Kv(e,t,n){t=zn(n,t),eg(t),t=Rm(e.stateNode,t,2),e=br(e,t,2),e!==null&&(li(e,2),ra(e))}function st(e,t,n){if(nl=!1,e.tag===3)Kv(e,e,n);else{for(;t!==null;){if(t.tag===3){Kv(t,e,n);return}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){e=zn(n,e),eg(e),n=jm(2),r=br(t,n,2),r!==null&&(Mm(n,r,t,e),li(r,2),ra(r));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
167
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+r,be(t,function(h,y){console.error("%s must not return anything besides a function, which is used for clean-up.%s",h,y)},c,f)}n=n.next}while(n!==l)}}catch(h){at(t,t.return,h)}}function po(e,t,n){try{var r=t.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var c=l.next;r=c;do{if((r.tag&e)===e){var f=r.inst,h=f.destroy;h!==void 0&&(f.destroy=void 0,(e&Sn)!==ld&&(nl=!0),l=t,be(l,rC,l,n,h),(e&Sn)!==ld&&(nl=!1))}r=r.next}while(r!==c)}}catch(y){at(t,t.return,y)}}function fv(e,t){ta(e)?(ea(),Yl(t,e),Ws()):Yl(t,e)}function Ym(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function dv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Zo||(n.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(e)||"instance"),n.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(e)||"instance"));try{be(e,mg,t,n)}catch(r){at(e,e.return,r)}}}function k_(e,t,n){return e.getSnapshotBeforeUpdate(t,n)}function V_(e,t){var n=t.memoizedProps,r=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Zo||(t.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(e)||"instance"),t.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(e)||"instance"));try{var l=Si(e.type,n),c=be(e,k_,t,l,r);n=JN,c!==void 0||n.has(e.type)||(n.add(e.type),be(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",H(e))})),t.__reactInternalSnapshotBeforeUpdate=c}catch(f){at(e,e.return,f)}}function hv(e,t,n){n.props=Si(e.type,e.memoizedProps),n.state=e.memoizedState,ta(e)?(ea(),be(e,dN,e,t,n),Ws()):be(e,dN,e,t,n)}function U_(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}if(typeof t=="function")if(ta(e))try{ea(),e.refCleanup=t(n)}finally{Ws()}else e.refCleanup=t(n);else typeof t=="string"?console.error("String refs are no longer supported."):t.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",H(e)),t.current=n}}function Jl(e,t){try{be(e,U_,e)}catch(n){at(e,t,n)}}function na(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{if(ta(e))try{ea(),be(e,r)}finally{Ws(e)}else be(e,r)}catch(l){at(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{if(ta(e))try{ea(),be(e,n,null)}finally{Ws(e)}else be(e,n,null)}catch(l){at(e,t,l)}else n.current=null}function mv(e,t,n,r){var l=e.memoizedProps,c=l.id,f=l.onCommit;l=l.onRender,t=t===null?"mount":"update",nd&&(t="nested-update"),typeof l=="function"&&l(c,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,n),typeof f=="function"&&f(c,t,r,n)}function z_(e,t,n,r){var l=e.memoizedProps;e=l.id,l=l.onPostCommit,t=t===null?"mount":"update",nd&&(t="nested-update"),typeof l=="function"&&l(e,t,r,n)}function pv(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{be(e,oA,r,t,n,e)}catch(l){at(e,e.return,l)}}function Jm(e,t,n){try{be(e,cA,e.stateNode,e.type,n,t,e)}catch(r){at(e,e.return,r)}}function bv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sr(e.type)||e.tag===4}function Gm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(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.tag===27&&Sr(e.type)||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 Qm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(w1(n),(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t)):(w1(n),t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ta));else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qm(e,t,n),e=e.sibling;e!==null;)Qm(e,t,n),e=e.sibling}function bf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(bf(e,t,n),e=e.sibling;e!==null;)bf(e,t,n),e=e.sibling}function B_(e){for(var t,n=e.return;n!==null;){if(bv(n)){t=n;break}n=n.return}if(t==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(t.tag){case 27:t=t.stateNode,n=Gm(e),bf(e,n,t);break;case 5:n=t.stateNode,t.flags&32&&(S1(n),t.flags&=-33),t=Gm(e),bf(e,t,n);break;case 3:case 4:t=t.stateNode.containerInfo,n=Gm(e),Qm(e,n,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function yv(e){var t=e.stateNode,n=e.memoizedProps;try{be(e,_A,e.type,n,t,e)}catch(r){at(e,e.return,r)}}function gv(e,t){return t.tag===31?(t=t.memoizedState,e.memoizedState!==null&&t===null):t.tag===13?(e=e.memoizedState,t=t.memoizedState,e!==null&&e.dehydrated!==null&&(t===null||t.dehydrated===null)):t.tag===3?e.memoizedState.isDehydrated&&(t.flags&256)===0:!1}function q_(e,t){if(e=e.containerInfo,Qb=Ud,e=ky(e),Rh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,c=r.focusNode;r=r.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var f=0,h=-1,y=-1,v=0,k=0,V=e,O=null;t:for(;;){for(var P;V!==n||l!==0&&V.nodeType!==3||(h=f+l),V!==c||r!==0&&V.nodeType!==3||(y=f+r),V.nodeType===3&&(f+=V.nodeValue.length),(P=V.firstChild)!==null;)O=V,V=P;for(;;){if(V===e)break t;if(O===n&&++v===l&&(h=f),O===c&&++k===r&&(y=f),(P=V.nextSibling)!==null)break;V=O,O=V.parentNode}V=P}n=h===-1||y===-1?null:{start:h,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xb={focusedElem:e,selectionRange:n},Ud=!1,en=t;en!==null;)if(t=en,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,en=e;else for(;en!==null;){switch(e=t=en,n=e.alternate,l=e.flags,e.tag){case 0:if((l&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:(l&1024)!==0&&n!==null&&V_(e,n);break;case 3:if((l&1024)!==0){if(e=e.stateNode.containerInfo,n=e.nodeType,n===9)pp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(e=t.sibling,e!==null){e.return=t.return,en=e;break}en=t.return}}function vv(e,t,n){var r=Bn(),l=Qs(),c=Zs(),f=Ks(),h=n.flags;switch(n.tag){case 0:case 11:case 15:sa(e,n),h&4&&uv(n,Jn|ds);break;case 1:if(sa(e,n),h&4)if(e=n.stateNode,t===null)n.type.defaultProps||"ref"in n.memoizedProps||Zo||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(n)||"instance"),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(n)||"instance")),ta(n)?(ea(),be(n,yb,n,e),Ws()):be(n,yb,n,e);else{var y=Si(n.type,t.memoizedProps);t=t.memoizedState,n.type.defaultProps||"ref"in n.memoizedProps||Zo||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(n)||"instance"),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(n)||"instance")),ta(n)?(ea(),be(n,cN,n,e,y,t,e.__reactInternalSnapshotBeforeUpdate),Ws()):be(n,cN,n,e,y,t,e.__reactInternalSnapshotBeforeUpdate)}h&64&&dv(n),h&512&&Jl(n,n.return);break;case 3:if(t=Ma(),sa(e,n),h&64&&(h=n.updateQueue,h!==null)){if(y=null,n.child!==null)switch(n.child.tag){case 27:case 5:y=n.child.stateNode;break;case 1:y=n.child.stateNode}try{be(n,mg,h,y)}catch(k){at(n,n.return,k)}}e.effectDuration+=Pu(t);break;case 27:t===null&&h&4&&yv(n);case 26:case 5:if(sa(e,n),t===null){if(h&4)pv(n);else if(h&64){e=n.type,t=n.memoizedProps,y=n.stateNode;try{be(n,lA,y,e,t,n)}catch(k){at(n,n.return,k)}}}h&512&&Jl(n,n.return);break;case 12:if(h&4){h=Ma(),sa(e,n),e=n.stateNode,e.effectDuration+=Vl(h);try{be(n,mv,n,t,jr,e.effectDuration)}catch(k){at(n,n.return,k)}}else sa(e,n);break;case 31:sa(e,n),h&4&&Sv(e,n);break;case 13:sa(e,n),h&4&&wv(e,n),h&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(h=G_.bind(null,n),NA(e,h))));break;case 22:if(h=n.memoizedState!==null||Xa,!h){t=t!==null&&t.memoizedState!==null||Pt,y=Xa;var v=Pt;Xa=h,(Pt=t)&&!v?(aa(e,n,(n.subtreeFlags&8772)!==0),(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&ju(n,_e,Ae)):sa(e,n),Xa=y,Pt=v}break;case 30:break;default:sa(e,n)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&((Dt||.05<St)&&Js(n,_e,Ae,St,xt),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&.05<Ae-_e&&(gv(n.return.alternate,n.return)||Ys(n,_e,Ae,"Mount"))),qn(r),Xs(l),xt=c,Dt=f}function xv(e){var t=e.alternate;t!==null&&(e.alternate=null,xv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ir(t)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ua(e,t,n){for(n=n.child;n!==null;)Nv(e,t,n),n=n.sibling}function Nv(e,t,n){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Do,n)}catch(v){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",v))}var r=Bn(),l=Qs(),c=Zs(),f=Ks();switch(n.tag){case 26:Pt||na(n,t),Ua(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(e=n.stateNode,e.parentNode.removeChild(e));break;case 27:Pt||na(n,t);var h=$t,y=Mn;Sr(n.type)&&($t=n.stateNode,Mn=!1),Ua(e,t,n),be(n,nc,n.stateNode),$t=h,Mn=y;break;case 5:Pt||na(n,t);case 6:if(h=$t,y=Mn,$t=null,Ua(e,t,n),$t=h,Mn=y,$t!==null)if(Mn)try{be(n,dA,$t,n.stateNode)}catch(v){at(n,t,v)}else try{be(n,fA,$t,n.stateNode)}catch(v){at(n,t,v)}break;case 18:$t!==null&&(Mn?(e=$t,E1(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wo(e)):E1($t,n.stateNode));break;case 4:h=$t,y=Mn,$t=n.stateNode.containerInfo,Mn=!0,Ua(e,t,n),$t=h,Mn=y;break;case 0:case 11:case 14:case 15:po(Sn,n,t),Pt||Fm(n,t,Jn),Ua(e,t,n);break;case 1:Pt||(na(n,t),h=n.stateNode,typeof h.componentWillUnmount=="function"&&hv(n,t,h)),Ua(e,t,n);break;case 21:Ua(e,t,n);break;case 22:Pt=(h=Pt)||n.memoizedState!==null,Ua(e,t,n),Pt=h;break;default:Ua(e,t,n)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(n,_e,Ae,St,xt),qn(r),Xs(l),xt=c,Dt=f}function Sv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{be(t,wA,e)}catch(n){at(t,t.return,n)}}}function wv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{be(t,EA,e)}catch(n){at(t,t.return,n)}}function L_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new GN),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new GN),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function yf(e,t){var n=L_(e);t.forEach(function(r){if(!n.has(r)){if(n.add(r),fa)if(Ko!==null&&Wo!==null)Zl(Wo,Ko);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var l=Q_.bind(null,e,r);r.then(l,l)}})}function Rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=e,c=t,f=n[r],h=Bn(),y=c;e:for(;y!==null;){switch(y.tag){case 27:if(Sr(y.type)){$t=y.stateNode,Mn=!1;break e}break;case 5:$t=y.stateNode,Mn=!1;break e;case 3:case 4:$t=y.stateNode.containerInfo,Mn=!0;break e}y=y.return}if($t===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Nv(l,c,f),$t=null,Mn=!1,(f.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(f,_e,Ae,"Unmount"),qn(h),l=f,c=l.alternate,c!==null&&(c.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ev(t,e),t=t.sibling}function Ev(e,t){var n=Bn(),r=Qs(),l=Zs(),c=Ks(),f=e.alternate,h=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rn(t,e),jn(e),h&4&&(po(Sn|ds,e,e.return),Yl(Sn|ds,e),Fm(e,e.return,Jn|ds));break;case 1:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),h&64&&Xa&&(h=e.updateQueue,h!==null&&(f=h.callbacks,f!==null))){var y=h.shared.hiddenCallbacks;h.shared.hiddenCallbacks=y===null?f:y.concat(f)}break;case 26:if(y=Cs,Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),h&4){var v=f!==null?f.memoizedState:null;if(h=e.memoizedState,f===null)if(h===null)if(e.stateNode===null){e:{h=e.type,f=e.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":v=y.getElementsByTagName("title")[0],(!v||v[cc]||v[ln]||v.namespaceURI===To||v.hasAttribute("itemprop"))&&(v=y.createElement(h),y.head.insertBefore(v,y.querySelector("head > title"))),on(v,h,f),v[ln]=e,jt(v),h=v;break e;case"link":var k=V1("link","href",y).get(h+(f.href||""));if(k){for(var V=0;V<k.length;V++)if(v=k[V],v.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&v.getAttribute("rel")===(f.rel==null?null:f.rel)&&v.getAttribute("title")===(f.title==null?null:f.title)&&v.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){k.splice(V,1);break t}}v=y.createElement(h),on(v,h,f),y.head.appendChild(v);break;case"meta":if(k=V1("meta","content",y).get(h+(f.content||""))){for(V=0;V<k.length;V++)if(v=k[V],st(f.content,"content"),v.getAttribute("content")===(f.content==null?null:""+f.content)&&v.getAttribute("name")===(f.name==null?null:f.name)&&v.getAttribute("property")===(f.property==null?null:f.property)&&v.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&v.getAttribute("charset")===(f.charSet==null?null:f.charSet)){k.splice(V,1);break t}}v=y.createElement(h),on(v,h,f),y.head.appendChild(v);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+h+'". This is a bug in React.')}v[ln]=e,jt(v),h=v}e.stateNode=h}else U1(y,e.type,e.stateNode);else e.stateNode=k1(y,h,e.memoizedProps);else v!==h?(v===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):v.count--,h===null?U1(y,e.type,e.stateNode):k1(y,h,e.memoizedProps)):h===null&&e.stateNode!==null&&Jm(e,e.memoizedProps,f.memoizedProps)}break;case 27:Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),f!==null&&h&4&&Jm(e,e.memoizedProps,f.memoizedProps);break;case 5:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),e.flags&32){y=e.stateNode;try{be(e,S1,y)}catch(me){at(e,e.return,me)}}h&4&&e.stateNode!=null&&(y=e.memoizedProps,Jm(e,y,f!==null?f.memoizedProps:y)),h&1024&&(Ob=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Rn(t,e),jn(e),h&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");h=e.memoizedProps,f=f!==null?f.memoizedProps:h,y=e.stateNode;try{be(e,uA,y,f,h)}catch(me){at(e,e.return,me)}}break;case 3:if(y=Ma(),Md=null,v=Cs,Cs=_f(t.containerInfo),Rn(t,e),Cs=v,jn(e),h&4&&f!==null&&f.memoizedState.isDehydrated)try{be(e,SA,t.containerInfo)}catch(me){at(e,e.return,me)}Ob&&(Ob=!1,_v(e)),t.effectDuration+=Pu(y);break;case 4:h=Cs,Cs=_f(e.stateNode.containerInfo),Rn(t,e),jn(e),Cs=h;break;case 12:h=Ma(),Rn(t,e),jn(e),e.stateNode.effectDuration+=Vl(h);break;case 31:Rn(t,e),jn(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,yf(e,h)));break;case 13:Rn(t,e),jn(e),e.child.flags&8192&&e.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(gd=Kt()),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,yf(e,h)));break;case 22:y=e.memoizedState!==null;var O=f!==null&&f.memoizedState!==null,P=Xa,ce=Pt;if(Xa=P||y,Pt=ce||O,Rn(t,e),Pt=ce,Xa=P,O&&!y&&!P&&!ce&&(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&ju(e,_e,Ae),jn(e),h&8192)e:for(t=e.stateNode,t._visibility=y?t._visibility&~gc:t._visibility|gc,!y||f===null||O||Xa||Pt||(wi(e),(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(e,_e,Ae,"Disconnect")),f=null,t=e;;){if(t.tag===5||t.tag===26){if(f===null){O=f=t;try{v=O.stateNode,y?be(O,mA,v):be(O,yA,O.stateNode,O.memoizedProps)}catch(me){at(O,O.return,me)}}}else if(t.tag===6){if(f===null){O=t;try{k=O.stateNode,y?be(O,pA,k):be(O,gA,k,O.memoizedProps)}catch(me){at(O,O.return,me)}}}else if(t.tag===18){if(f===null){O=t;try{V=O.stateNode,y?be(O,hA,V):be(O,bA,O.stateNode)}catch(me){at(O,O.return,me)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;f===t&&(f=null),t=t.return}f===t&&(f=null),t.sibling.return=t.return,t=t.sibling}h&4&&(h=e.updateQueue,h!==null&&(f=h.retryQueue,f!==null&&(h.retryQueue=null,yf(e,f))));break;case 19:Rn(t,e),jn(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,yf(e,h)));break;case 30:break;case 21:break;default:Rn(t,e),jn(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&((Dt||.05<St)&&Js(e,_e,Ae,St,xt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Ae-_e&&(gv(e.return.alternate,e.return)||Ys(e,_e,Ae,"Mount"))),qn(n),Xs(r),xt=l,Dt=c}function jn(e){var t=e.flags;if(t&2){try{be(e,B_,e)}catch(n){at(e,e.return,n)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _v(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_v(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vv(e,t.alternate,t),t=t.sibling}function Av(e){var t=Bn(),n=Qs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 14:case 15:Fm(e,e.return,Jn),wi(e);break;case 1:na(e,e.return);var c=e.stateNode;typeof c.componentWillUnmount=="function"&&hv(e,e.return,c),wi(e);break;case 27:be(e,nc,e.stateNode);case 26:case 5:na(e,e.return),wi(e);break;case 22:e.memoizedState===null&&wi(e);break;case 30:wi(e);break;default:wi(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(e,_e,Ae,St,xt),qn(t),Xs(n),xt=r,Dt=l}function wi(e){for(e=e.child;e!==null;)Av(e),e=e.sibling}function Dv(e,t,n,r){var l=Bn(),c=Qs(),f=Zs(),h=Ks(),y=n.flags;switch(n.tag){case 0:case 11:case 15:aa(e,n,r),uv(n,Jn);break;case 1:if(aa(e,n,r),t=n.stateNode,typeof t.componentDidMount=="function"&&be(n,yb,n,t),t=n.updateQueue,t!==null){e=n.stateNode;try{be(n,S_,t,e)}catch(v){at(n,n.return,v)}}r&&y&64&&dv(n),Jl(n,n.return);break;case 27:yv(n);case 26:case 5:aa(e,n,r),r&&t===null&&y&4&&pv(n),Jl(n,n.return);break;case 12:if(r&&y&4){y=Ma(),aa(e,n,r),r=n.stateNode,r.effectDuration+=Vl(y);try{be(n,mv,n,t,jr,r.effectDuration)}catch(v){at(n,n.return,v)}}else aa(e,n,r);break;case 31:aa(e,n,r),r&&y&4&&Sv(e,n);break;case 13:aa(e,n,r),r&&y&4&&wv(e,n);break;case 22:n.memoizedState===null&&aa(e,n,r),Jl(n,n.return);break;case 30:break;default:aa(e,n,r)}(n.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(n,_e,Ae,St,xt),qn(l),Xs(c),xt=f,Dt=h}function aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Dv(e,t.alternate,t,n),t=t.sibling}function Xm(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&gi(e),n!=null&&kl(n))}function Zm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(gi(t),e!=null&&kl(e))}function ws(e,t,n,r,l){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var c=t.sibling;Cv(e,t,n,r,c!==null?c.actualStartTime:l),t=c}}function Cv(e,t,n,r,l){var c=Bn(),f=Qs(),h=Zs(),y=Ks(),v=Cr,k=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Ve)!==Ce&&0<t.actualStartTime&&(t.flags&1)!==0&&Mu(t,t.actualStartTime,l,Gt,n),ws(e,t,n,r,l),k&2048&&fv(t,wn|ds);break;case 1:(t.mode&Ve)!==Ce&&0<t.actualStartTime&&((t.flags&128)!==0?Mh(t,t.actualStartTime,l,[]):(t.flags&1)!==0&&Mu(t,t.actualStartTime,l,Gt,n)),ws(e,t,n,r,l);break;case 3:var V=Ma(),O=Gt;Gt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,ws(e,t,n,r,l),Gt=O,k&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),r=t.memoizedState.cache,r!==n&&(gi(r),n!=null&&kl(n))),e.passiveEffectDuration+=Pu(V);break;case 12:if(k&2048){k=Ma(),ws(e,t,n,r,l),e=t.stateNode,e.passiveEffectDuration+=Vl(k);try{be(t,z_,t,t.alternate,jr,e.passiveEffectDuration)}catch(P){at(t,t.return,P)}}else ws(e,t,n,r,l);break;case 31:k=Gt,V=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,V!==null&&O===null?(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Gt=!1,V=V.hydrationErrors,V!==null&&Mh(t,t.actualStartTime,l,V)):Gt=!0):Gt=!1,ws(e,t,n,r,l),Gt=k;break;case 13:k=Gt,V=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,V===null||V.dehydrated===null||O!==null&&O.dehydrated!==null?Gt=!1:(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Gt=!1,V=V.hydrationErrors,V!==null&&Mh(t,t.actualStartTime,l,V)):Gt=!0),ws(e,t,n,r,l),Gt=k;break;case 23:break;case 22:O=t.stateNode,V=t.alternate,t.memoizedState!==null?O._visibility&La?ws(e,t,n,r,l):Gl(e,t,n,r,l):O._visibility&La?ws(e,t,n,r,l):(O._visibility|=La,bo(e,t,n,r,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),l),(t.mode&Ve)===Ce||Gt||(e=t.actualStartTime,0<=e&&.05<l-e&&ju(t,e,l),0<=_e&&0<=Ae&&.05<Ae-_e&&ju(t,_e,Ae))),k&2048&&Xm(V,t);break;case 24:ws(e,t,n,r,l),k&2048&&Zm(t.alternate,t);break;default:ws(e,t,n,r,l)}(t.mode&Ve)!==Ce&&((e=!Gt&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(n=t.actualStartTime,0<=n&&.05<l-n&&Ys(t,n,l,"Mount")),0<=_e&&0<=Ae&&((Dt||.05<St)&&Js(t,_e,Ae,St,xt),e&&.05<Ae-_e&&Ys(t,_e,Ae,"Mount"))),qn(c),Xs(f),xt=h,Dt=y,Cr=v}function bo(e,t,n,r,l,c){for(l=l&&((t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child)),t=t.child;t!==null;){var f=t.sibling;Tv(e,t,n,r,l,f!==null?f.actualStartTime:c),t=f}}function Tv(e,t,n,r,l,c){var f=Bn(),h=Qs(),y=Zs(),v=Ks(),k=Cr;l&&(t.mode&Ve)!==Ce&&0<t.actualStartTime&&(t.flags&1)!==0&&Mu(t,t.actualStartTime,c,Gt,n);var V=t.flags;switch(t.tag){case 0:case 11:case 15:bo(e,t,n,r,l,c),fv(t,wn);break;case 23:break;case 22:var O=t.stateNode;t.memoizedState!==null?O._visibility&La?bo(e,t,n,r,l,c):Gl(e,t,n,r,c):(O._visibility|=La,bo(e,t,n,r,l,c)),l&&V&2048&&Xm(t.alternate,t);break;case 24:bo(e,t,n,r,l,c),l&&V&2048&&Zm(t.alternate,t);break;default:bo(e,t,n,r,l,c)}(t.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(t,_e,Ae,St,xt),qn(f),Xs(h),xt=y,Dt=v,Cr=k}function Gl(e,t,n,r,l){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var c=t.child;c!==null;){t=c.sibling;var f=e,h=n,y=r,v=t!==null?t.actualStartTime:l,k=Cr;(c.mode&Ve)!==Ce&&0<c.actualStartTime&&(c.flags&1)!==0&&Mu(c,c.actualStartTime,v,Gt,h);var V=c.flags;switch(c.tag){case 22:Gl(f,c,h,y,v),V&2048&&Xm(c.alternate,c);break;case 24:Gl(f,c,h,y,v),V&2048&&Zm(c.alternate,c);break;default:Gl(f,c,h,y,v)}Cr=k,c=t}}function yo(e,t,n){if(e.subtreeFlags&Bc)for(e=e.child;e!==null;)Ov(e,t,n),e=e.sibling}function Ov(e,t,n){switch(e.tag){case 26:yo(e,t,n),e.flags&Bc&&e.memoizedState!==null&&CA(n,Cs,e.memoizedState,e.memoizedProps);break;case 5:yo(e,t,n);break;case 3:case 4:var r=Cs;Cs=_f(e.stateNode.containerInfo),yo(e,t,n),Cs=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bc,Bc=16777216,yo(e,t,n),Bc=r):yo(e,t,n));break;default:yo(e,t,n)}}function Rv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],l=Bn();en=r,kv(r,e),(r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(r,_e,Ae,"Unmount"),qn(l)}Rv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jv(e),e=e.sibling}function jv(e){var t=Bn(),n=Qs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 15:Ql(e),e.flags&2048&&Ym(e,e.return,wn|ds);break;case 3:var c=Ma();Ql(e),e.stateNode.passiveEffectDuration+=Pu(c);break;case 12:c=Ma(),Ql(e),e.stateNode.passiveEffectDuration+=Vl(c);break;case 22:c=e.stateNode,e.memoizedState!==null&&c._visibility&La&&(e.return===null||e.return.tag!==13)?(c._visibility&=~La,gf(e),(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(e,_e,Ae,"Disconnect")):Ql(e);break;default:Ql(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(e,_e,Ae,St,xt),qn(t),Xs(n),Dt=l,xt=r}function gf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],l=Bn();en=r,kv(r,e),(r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(r,_e,Ae,"Unmount"),qn(l)}Rv(e)}for(e=e.child;e!==null;)Mv(e),e=e.sibling}function Mv(e){var t=Bn(),n=Qs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 15:Ym(e,e.return,wn),gf(e);break;case 22:var c=e.stateNode;c._visibility&La&&(c._visibility&=~La,gf(e));break;default:gf(e)}(e.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(e,_e,Ae,St,xt),qn(t),Xs(n),Dt=l,xt=r}function kv(e,t){for(;en!==null;){var n=en,r=n,l=t,c=Bn(),f=Qs(),h=Zs(),y=Ks();switch(r.tag){case 0:case 11:case 15:Ym(r,l,wn);break;case 23:case 22:r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool,l!=null&&gi(l));break;case 24:kl(r.memoizedState.cache)}if((r.mode&Ve)!==Ce&&0<=_e&&0<=Ae&&(Dt||.05<St)&&Js(r,_e,Ae,St,xt),qn(c),Xs(f),Dt=y,xt=h,r=n.child,r!==null)r.return=n,en=r;else e:for(n=e;en!==null;){if(r=en,c=r.sibling,f=r.return,xv(r),r===n){en=null;break e}if(c!==null){c.return=f,en=c;break e}en=f}}}function H_(){uC.forEach(function(e){return e()})}function Vv(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||F.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Hn(e){if((Ze&Qt)!==tn&&ze!==0)return ze&-ze;var t=F.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),rp()):so()}function Uv(){if(Vn===0)if((ze&536870912)===0||$e){var e=zf;zf<<=1,(zf&3932160)===0&&(zf=262144),Vn=e}else Vn=536870912;return e=Yn.current,e!==null&&(e.flags|=32),Vn}function At(e,t,n){if(nl&&console.error("useInsertionEffect must not schedule updates."),Hb&&(Sd=!0),(e===dt&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)&&(vo(e,0),xr(e,ze,Vn,!1)),li(e,n),(Ze&Qt)!==tn&&e===dt){if(ca)switch(t.tag){case 0:case 11:case 15:e=qe&&H(qe)||"Unknown",cS.has(e)||(cS.add(e),t=H(t)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",t,e,e));break;case 1:lS||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),lS=!0)}}else fa&&zs(e,t,n),Z_(t),e===dt&&((Ze&Qt)===tn&&(Lr|=n),wt===zr&&xr(e,ze,Vn,!1)),ra(e)}function zv(e,t,n){if((Ze&(Qt|Gn))!==tn)throw Error("Should not already be working.");if(ze!==0&&qe!==null){var r=qe,l=Kt();switch(tN){case Hc:case qi:var c=Ec;bt&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,"Suspended",c,l,as,void 0,"primary-light")):console.timeStamp("Suspended",c,l,as,void 0,"primary-light"));break;case Li:c=Ec,bt&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,"Action",c,l,as,void 0,"primary-light")):console.timeStamp("Action",c,l,as,void 0,"primary-light"));break;default:bt&&(r=l-Ec,3>r||console.timeStamp("Blocked",Ec,l,as,void 0,5>r?"primary-light":10>r?"primary":100>r?"primary-dark":"error"))}}c=(n=!n&&(t&127)===0&&(t&e.expiredLanes)===0||fn(e,t))?$_(e,t):Wm(e,t,!0);var f=n;do{if(c===Za){el&&!n&&xr(e,t,0,!1),t=lt,Ec=qt(),tN=t;break}else{if(r=Kt(),l=e.current.alternate,f&&!P_(l)){Ns(t),l=Wt,c=r,!bt||c<=l||(Ot?Ot.run(console.timeStamp.bind(console,"Teared Render",l,c,Je,Fe,"error")):console.timeStamp("Teared Render",l,c,Je,Fe,"error")),Ei(t,r),c=Wm(e,t,!1),f=!1;continue}if(c===Bi){if(f=t,e.errorRecoveryDisabledLanes&f)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){Ns(t),kh(Wt,r,t,Ot),Ei(t,r),t=h;e:{r=e,c=f,f=$c;var y=r.current.memoizedState.isDehydrated;if(y&&(vo(r,h).flags|=256),h=Wm(r,h,!1),h!==Bi){if(Mb&&!y){r.errorRecoveryDisabledLanes|=c,Lr|=c,c=zr;break e}r=En,En=f,r!==null&&(En===null?En=r:En.push.apply(En,r))}c=h}if(f=!1,c!==Bi)continue;r=Kt()}}if(c===Lc){Ns(t),kh(Wt,r,t,Ot),Ei(t,r),vo(e,0),xr(e,t,0,!0);break}e:{switch(n=e,c){case Za:case Lc:throw Error("Root did not complete. This is a bug in React.");case zr:if((t&4194048)!==t)break;case md:Ns(t),zy(Wt,r,t,Ot),Ei(t,r),l=t,(l&127)!==0?Wf=r:(l&4194048)!==0&&(ed=r),xr(n,t,Vn,!Br);break e;case Bi:En=null;break;case hd:case QN:break;default:throw Error("Unknown root exit status.")}if(F.actQueue!==null)ep(n,l,t,En,Ic,yd,Vn,Lr,Hi,c,null,null,Wt,r);else{if((t&62914560)===t&&(f=gd+KN-Kt(),10<f)){if(xr(n,t,Vn,!Br),Aa(n,0,!0)!==0)break e;Ts=t,n.timeoutHandle=yS(Bv.bind(null,n,l,En,Ic,yd,t,Vn,Lr,Hi,Br,c,"Throttled",Wt,r),f);break e}Bv(n,l,En,Ic,yd,t,Vn,Lr,Hi,Br,c,null,Wt,r)}}}break}while(!0);ra(e)}function Bv(e,t,n,r,l,c,f,h,y,v,k,V,O,P){e.timeoutHandle=Yi;var ce=t.subtreeFlags,me=null;if((ce&8192||(ce&16785408)===16785408)&&(me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},Ov(t,c,me),ce=(c&62914560)===c?gd-Kt():(c&4194048)===c?ZN-Kt():0,ce=TA(me,ce),ce!==null)){Ts=c,e.cancelPendingCommit=ce(ep.bind(null,e,t,c,n,r,l,f,h,y,k,me,me.waitingForViewTransition?"Waiting for the previous Animation":0<me.count?0<me.imgCount?"Suspended on CSS and Images":"Suspended on CSS":me.imgCount===1?"Suspended on an Image":0<me.imgCount?"Suspended on Images":null,O,P)),xr(e,c,f,!v);return}ep(e,t,c,n,r,l,f,h,y,k,me,V,O,P)}function P_(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var l=n[r],c=l.getSnapshot;l=l.value;try{if(!xn(c(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xr(e,t,n,r){t&=~kb,t&=~Lr,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var l=t;0<l;){var c=31-yn(l),f=1<<c;r[c]=-1,l&=~f}n!==0&&Eu(e,n,t)}function go(){return(Ze&(Qt|Gn))===tn?(Kl(0),!1):!0}function Km(){if(qe!==null){if(lt===kn)var e=qe.return;else e=qe,qu(),cm(e),Fo=null,Mc=0,e=qe;for(;e!==null;)cv(e.alternate,e),e=e.return;qe=null}}function Ei(e,t){(e&127)!==0&&(Ti=t),(e&4194048)!==0&&(Fa=t),(e&62914560)!==0&&(Wx=t),(e&2080374784)!==0&&(eN=t)}function vo(e,t){bt&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",Fe,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",Fe,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",Fe,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",Fe,"primary-light"));var n=Wt;if(Wt=qt(),ze!==0&&0<n){if(Ns(ze),wt===hd||wt===zr)zy(n,Wt,t,Ot);else{var r=Wt,l=Ot;if(bt&&!(r<=n)){var c=(t&738197653)===t?"tertiary-dark":"primary-dark",f=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";l?l.run(console.timeStamp.bind(console,f,n,r,Je,Fe,c)):console.timeStamp(f,n,r,Je,Fe,c)}}Ei(ze,Wt)}if(n=Ot,Ot=null,(t&127)!==0){Ot=Nc,l=0<=pa&&pa<Ti?Ti:pa,r=0<=Oi&&Oi<Ti?Ti:Oi,c=0<=r?r:0<=l?l:Wt,0<=Wf?(Ns(2),By(Wf,c,t,n)):td&127,n=l;var h=r,y=Sc,v=0<Po,k=Mr===xc,V=Mr===Kf;if(l=Wt,r=Nc,c=db,f=hb,bt){if(Je="Blocking",0<n?n>l&&(n=l):n=l,0<h?h>n&&(h=n):h=n,y!==null&&n>h){var O=v?"secondary-light":"warning";r?r.run(console.timeStamp.bind(console,v?"Consecutive":"Event: "+y,h,n,Je,Fe,O)):console.timeStamp(v?"Consecutive":"Event: "+y,h,n,Je,Fe,O)}l>n&&(h=k?"error":(t&738197653)===t?"tertiary-light":"primary-light",k=V?"Promise Resolved":k?"Cascading Update":5<l-n?"Update Blocked":"Update",V=[],f!=null&&V.push(["Component name",f]),c!=null&&V.push(["Method name",c]),n={start:n,end:l,detail:{devtools:{properties:V,track:Je,trackGroup:Fe,color:h}}},r?r.run(performance.measure.bind(performance,k,n)):performance.measure(k,n))}pa=-1.1,Mr=0,hb=db=null,Wf=-1.1,Po=Oi,Oi=-1.1,Ti=qt()}if((t&4194048)!==0&&(Ot=wc,l=0<=Ya&&Ya<Fa?Fa:Ya,n=0<=us&&us<Fa?Fa:us,r=0<=kr&&kr<Fa?Fa:kr,c=0<=r?r:0<=n?n:Wt,0<=ed?(Ns(256),By(ed,c,t,Ot)):td&4194048,V=r,h=Ri,y=0<Vr,v=mb===Kf,c=Wt,r=wc,f=Zx,k=Kx,bt&&(Je="Transition",0<n?n>c&&(n=c):n=c,0<l?l>n&&(l=n):l=n,0<V?V>l&&(V=l):V=l,l>V&&h!==null&&(O=y?"secondary-light":"warning",r?r.run(console.timeStamp.bind(console,y?"Consecutive":"Event: "+h,V,l,Je,Fe,O)):console.timeStamp(y?"Consecutive":"Event: "+h,V,l,Je,Fe,O)),n>l&&(r?r.run(console.timeStamp.bind(console,"Action",l,n,Je,Fe,"primary-dark")):console.timeStamp("Action",l,n,Je,Fe,"primary-dark")),c>n&&(l=v?"Promise Resolved":5<c-n?"Update Blocked":"Update",V=[],k!=null&&V.push(["Component name",k]),f!=null&&V.push(["Method name",f]),n={start:n,end:c,detail:{devtools:{properties:V,track:Je,trackGroup:Fe,color:"primary-light"}}},r?r.run(performance.measure.bind(performance,l,n)):performance.measure(l,n))),us=Ya=-1.1,mb=0,ed=-1.1,Vr=kr,kr=-1.1,Fa=qt()),(t&62914560)!==0&&(td&62914560)!==0&&(Ns(4194304),Vh(Wx,Wt)),(t&2080374784)!==0&&(td&2080374784)!==0&&(Ns(268435456),Vh(eN,Wt)),n=e.timeoutHandle,n!==Yi&&(e.timeoutHandle=Yi,wC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ts=0,Km(),dt=e,qe=n=Oa(e.current,null),ze=t,lt=kn,Qn=null,Br=!1,el=fn(e,t),Mb=!1,wt=Za,Hi=Vn=kb=Lr=qr=0,En=$c=null,yd=!1,(t&8)!==0&&(t|=t&32),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=t;0<r;)l=31-yn(r),c=1<<l,t|=e[l],r&=~c;return ya=t,ku(),e=Fx(),1e3<e-Ix&&(F.recentlyCreatedOwnerStacks=0,Ix=e),As.discardPendingWarnings(),n}function qv(e,t){Oe=null,F.H=zc,F.getCurrentStack=null,ca=!1,In=null,t===Io||t===rd?(t=ig(),lt=Hc):t===gb?(t=ig(),lt=XN):lt=t===Cb?jb:t!==null&&typeof t=="object"&&typeof t.then=="function"?Pc:pd,Qn=t;var n=qe;n===null?(wt=Lc,ff(e,zn(t,e.current))):n.mode&Ve&&Xh(n)}function Lv(){var e=Yn.current;return e===null?!0:(ze&4194048)===ze?fs===null:(ze&62914560)===ze||(ze&536870912)!==0?e===fs:!1}function Hv(){var e=F.H;return F.H=zc,e===null?zc:e}function Pv(){var e=F.A;return F.A=cC,e}function vf(e){Ot===null&&(Ot=e._debugTask==null?null:e._debugTask)}function xf(){wt=zr,Br||(ze&4194048)!==ze&&Yn.current!==null||(el=!0),(qr&134217727)===0&&(Lr&134217727)===0||dt===null||xr(dt,ze,Vn,!1)}function Wm(e,t,n){var r=Ze;Ze|=Qt;var l=Hv(),c=Pv();if(dt!==e||ze!==t){if(fa){var f=e.memoizedUpdaters;0<f.size&&(Zl(e,ze),f.clear()),ci(e,t)}Ic=null,vo(e,t)}t=!1,f=wt;e:do try{if(lt!==kn&&qe!==null){var h=qe,y=Qn;switch(lt){case jb:Km(),f=md;break e;case Hc:case qi:case Li:case Pc:Yn.current===null&&(t=!0);var v=lt;if(lt=kn,Qn=null,xo(e,h,y,v),n&&el){f=Za;break e}break;default:v=lt,lt=kn,Qn=null,xo(e,h,y,v)}}$v(),f=wt;break}catch(k){qv(e,k)}while(!0);return t&&e.shellSuspendCounter++,qu(),Ze=r,F.H=l,F.A=c,qe===null&&(dt=null,ze=0,ku()),f}function $v(){for(;qe!==null;)Iv(qe)}function $_(e,t){var n=Ze;Ze|=Qt;var r=Hv(),l=Pv();if(dt!==e||ze!==t){if(fa){var c=e.memoizedUpdaters;0<c.size&&(Zl(e,ze),c.clear()),ci(e,t)}Ic=null,vd=Kt()+WN,vo(e,t)}else el=fn(e,t);e:do try{if(lt!==kn&&qe!==null)t:switch(t=qe,c=Qn,lt){case pd:lt=kn,Qn=null,xo(e,t,c,pd);break;case qi:case Li:if(ag(c)){lt=kn,Qn=null,Fv(t);break}t=function(){lt!==qi&<!==Li||dt!==e||(lt=bd),ra(e)},c.then(t,t);break e;case Hc:lt=bd;break e;case XN:lt=Rb;break e;case bd:ag(c)?(lt=kn,Qn=null,Fv(t)):(lt=kn,Qn=null,xo(e,t,c,bd));break;case Rb:var f=null;switch(qe.tag){case 26:f=qe.memoizedState;case 5:case 27:var h=qe;if(f?z1(f):h.stateNode.complete){lt=kn,Qn=null;var y=h.sibling;if(y!==null)qe=y;else{var v=h.return;v!==null?(qe=v,Nf(v)):qe=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}lt=kn,Qn=null,xo(e,t,c,Rb);break;case Pc:lt=kn,Qn=null,xo(e,t,c,Pc);break;case jb:Km(),wt=md;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}F.actQueue!==null?$v():I_();break}catch(k){qv(e,k)}while(!0);return qu(),F.H=r,F.A=l,Ze=n,qe!==null?Za:(dt=null,ze=0,ku(),wt)}function I_(){for(;qe!==null&&!$A();)Iv(qe)}function Iv(e){var t=e.alternate;(e.mode&Ve)!==Ce?(Qh(e),t=be(e,$m,t,e,ya),Xh(e)):t=be(e,$m,t,e,ya),e.memoizedProps=e.pendingProps,t===null?Nf(e):qe=t}function Fv(e){var t=be(e,F_,e);e.memoizedProps=e.pendingProps,t===null?Nf(e):qe=t}function F_(e){var t=e.alternate,n=(e.mode&Ve)!==Ce;switch(n&&Qh(e),e.tag){case 15:case 0:t=nv(t,e,e.pendingProps,e.type,void 0,ze);break;case 11:t=nv(t,e,e.pendingProps,e.type.render,e.ref,ze);break;case 5:cm(e);default:cv(t,e),e=qe=Iy(e,ya),t=$m(t,e,ya)}return n&&Xh(e),t}function xo(e,t,n,r){qu(),cm(t),Fo=null,Mc=0;var l=t.return;try{if(T_(e,l,t,n,ze)){wt=Lc,ff(e,zn(n,e.current)),qe=null;return}}catch(c){if(l!==null)throw qe=l,c;wt=Lc,ff(e,zn(n,e.current)),qe=null;return}t.flags&32768?($e||r===pd?e=!0:el||(ze&536870912)!==0?e=!1:(Br=e=!0,(r===qi||r===Li||r===Hc||r===Pc)&&(r=Yn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Yv(t,e)):Nf(t)}function Nf(e){var t=e;do{if((t.flags&32768)!==0){Yv(t,Br);return}var n=t.alternate;if(e=t.return,Qh(t),n=be(t,j_,n,t,ya),(t.mode&Ve)!==Ce&&Wy(t),n!==null){qe=n;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);wt===Za&&(wt=QN)}function Yv(e,t){do{var n=M_(e.alternate,e);if(n!==null){n.flags&=32767,qe=n;return}if((e.mode&Ve)!==Ce){Wy(e),n=e.actualDuration;for(var r=e.child;r!==null;)n+=r.actualDuration,r=r.sibling;e.actualDuration=n}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){qe=e;return}qe=e=n}while(e!==null);wt=md,qe=null}function ep(e,t,n,r,l,c,f,h,y,v,k,V,O,P){e.cancelPendingCommit=null;do Xl();while(It!==Pr);if(As.flushLegacyContextWarning(),As.flushPendingUnsafeLifecycleWarnings(),(Ze&(Qt|Gn))!==tn)throw Error("Should not already be working.");if(Ns(n),v===Bi?kh(O,P,n,Ot):r!==null?b_(O,P,n,r,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Ot):p_(O,P,n,Ot),t!==null){if(n===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(c=t.lanes|t.childLanes,c|=ob,_h(e,n,c,f,h,y),e===dt&&(qe=dt=null,ze=0),tl=t,$r=e,Ts=n,zb=c,qb=l,rS=r,Bb=P,iS=V,Os=xd,oS=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,X_(Ao,function(){return Xc=window.event,Os===xd&&(Os=Ub),Zv(),null})):(e.callbackNode=null,e.callbackPriority=0),Ia=null,jr=qt(),V!==null&&y_(P,jr,V,Ot),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=F.T,F.T=null,l=rt.p,rt.p=ss,f=Ze,Ze|=Gn;try{q_(e,t,n)}finally{Ze=f,rt.p=l,F.T=r}}It=tS,Jv(),Gv(),Qv()}}function Jv(){if(It===tS){It=Pr;var e=$r,t=tl,n=Ts,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=F.T,F.T=null;var l=rt.p;rt.p=ss;var c=Ze;Ze|=Gn;try{Ko=n,Wo=e,$u(),Ev(t,e),Wo=Ko=null,n=Xb;var f=ky(e.containerInfo),h=n.focusedElem,y=n.selectionRange;if(f!==h&&h&&h.ownerDocument&&My(h.ownerDocument.documentElement,h)){if(y!==null&&Rh(h)){var v=y.start,k=y.end;if(k===void 0&&(k=v),"selectionStart"in h)h.selectionStart=v,h.selectionEnd=Math.min(k,h.value.length);else{var V=h.ownerDocument||document,O=V&&V.defaultView||window;if(O.getSelection){var P=O.getSelection(),ce=h.textContent.length,me=Math.min(y.start,ce),mt=y.end===void 0?me:Math.min(y.end,ce);!P.extend&&me>mt&&(f=mt,mt=me,me=f);var Ye=jy(h,me),T=jy(h,mt);if(Ye&&T&&(P.rangeCount!==1||P.anchorNode!==Ye.node||P.anchorOffset!==Ye.offset||P.focusNode!==T.node||P.focusOffset!==T.offset)){var R=V.createRange();R.setStart(Ye.node,Ye.offset),P.removeAllRanges(),me>mt?(P.addRange(R),P.extend(T.node,T.offset)):(R.setEnd(T.node,T.offset),P.addRange(R))}}}}for(V=[],P=h;P=P.parentNode;)P.nodeType===1&&V.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<V.length;h++){var j=V[h];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}Ud=!!Qb,Xb=Qb=null}finally{Ze=c,rt.p=l,F.T=r}}e.current=t,It=nS}}function Gv(){if(It===nS){It=Pr;var e=oS;if(e!==null){jr=qt();var t=$a,n=jr;!bt||n<=t||console.timeStamp(e,t,n,Je,Fe,"secondary-light")}e=$r,t=tl,n=Ts;var r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=F.T,F.T=null;var l=rt.p;rt.p=ss;var c=Ze;Ze|=Gn;try{Ko=n,Wo=e,$u(),vv(e,t.alternate,t),Wo=Ko=null}finally{Ze=c,rt.p=l,F.T=r}}e=Bb,t=iS,$a=qt(),e=t===null?e:jr,t=$a,n=Os===Vb,r=Ot,Ia!==null?qy(e,t,Ia,!1,r):!bt||t<=e||(r?r.run(console.timeStamp.bind(console,n?"Commit Interrupted View Transition":"Commit",e,t,Je,Fe,n?"error":"secondary-dark")):console.timeStamp(n?"Commit Interrupted View Transition":"Commit",e,t,Je,Fe,n?"error":"secondary-dark")),It=sS}}function Qv(){if(It===aS||It===sS){if(It===aS){var e=$a;$a=qt();var t=$a,n=Os===Vb;!bt||t<=e||console.timeStamp(n?"Interrupted View Transition":"Starting Animation",e,t,Je,Fe,n?" error":"secondary-light"),Os!==Vb&&(Os=eS)}It=Pr,IA(),e=$r;var r=tl;t=Ts,n=rS;var l=r.actualDuration!==0||(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0;l?It=Nd:(It=Pr,tl=$r=null,Xv(e,e.pendingLanes),Pi=0,Yc=null);var c=e.pendingLanes;if(c===0&&(Hr=null),l||t1(e),c=no(t),r=r.stateNode,hn&&typeof hn.onCommitFiberRoot=="function")try{var f=(r.current.flags&128)===128;switch(c){case ss:var h=qp;break;case da:h=Lp;break;case Ba:h=Ao;break;case qf:h=Hp;break;default:h=Ao}hn.onCommitFiberRoot(Do,r,h,f)}catch(V){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",V))}if(fa&&e.memoizedUpdaters.clear(),H_(),n!==null){f=F.T,h=rt.p,rt.p=ss,F.T=null;try{var y=e.onRecoverableError;for(r=0;r<n.length;r++){var v=n[r],k=Y_(v.stack);be(v.source,y,v.value,k)}}finally{F.T=f,rt.p=h}}(Ts&3)!==0&&Xl(),ra(e),c=e.pendingLanes,(t&261930)!==0&&(c&42)!==0?(sd=!0,e===Lb?Fc++:(Fc=0,Lb=e)):Fc=0,l||Ei(t,$a),Kl(0)}}function Y_(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function Xv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,kl(t)))}function Xl(){return Jv(),Gv(),Qv(),Zv()}function Zv(){if(It!==Nd)return!1;var e=$r,t=zb;zb=0;var n=no(Ts),r=Ba>n?Ba:n;n=F.T;var l=rt.p;try{rt.p=r,F.T=null;var c=qb;qb=null,r=$r;var f=Ts;if(It=Pr,tl=$r=null,Ts=0,(Ze&(Qt|Gn))!==tn)throw Error("Cannot flush passive effects while already rendering.");Ns(f),Hb=!0,Sd=!1;var h=0;if(Ia=null,h=Kt(),Os===eS)Vh($a,h,nC);else{var y=$a,v=h,k=Os===Ub;!bt||v<=y||(Ot?Ot.run(console.timeStamp.bind(console,k?"Waiting for Paint":"Waiting",y,v,Je,Fe,"secondary-light")):console.timeStamp(k?"Waiting for Paint":"Waiting",y,v,Je,Fe,"secondary-light"))}y=Ze,Ze|=Gn;var V=r.current;$u(),jv(V);var O=r.current;V=Bb,$u(),Cv(r,O,f,c,V),t1(r),Ze=y;var P=Kt();if(O=h,V=Ot,Ia!==null?qy(O,P,Ia,!0,V):!bt||P<=O||(V?V.run(console.timeStamp.bind(console,"Remaining Effects",O,P,Je,Fe,"secondary-dark")):console.timeStamp("Remaining Effects",O,P,Je,Fe,"secondary-dark")),Ei(f,P),Kl(0,!1),Sd?r===Yc?Pi++:(Pi=0,Yc=r):Pi=0,Sd=Hb=!1,hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(Do,r)}catch(me){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",me))}var ce=r.current.stateNode;return ce.effectDuration=0,ce.passiveEffectDuration=0,!0}finally{rt.p=l,F.T=n,Xv(e,t)}}function Kv(e,t,n){t=zn(n,t),eg(t),t=jm(e.stateNode,t,2),e=br(e,t,2),e!==null&&(li(e,2),ra(e))}function at(e,t,n){if(nl=!1,e.tag===3)Kv(e,e,n);else{for(;t!==null;){if(t.tag===3){Kv(t,e,n);return}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){e=zn(n,e),eg(e),n=Mm(2),r=br(t,n,2),r!==null&&(km(n,r,t,e),li(r,2),ra(r));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
168
168
|
|
|
169
169
|
Error message:
|
|
170
170
|
|
|
171
|
-
%s`,n)}}function
|
|
171
|
+
%s`,n)}}function tp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fC;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(Mb=!0,l.add(n),r=J_.bind(null,e,t,n),fa&&Zl(e,n),t.then(r,r))}function J_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,(n&127)!==0?0>pa&&(Ti=pa=qt(),Nc=Zf("Promise Resolved"),Mr=Kf):(n&4194048)!==0&&0>us&&(Fa=us=qt(),wc=Zf("Promise Resolved"),mb=Kf),Vv()&&F.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
172
172
|
|
|
173
173
|
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
174
174
|
|
|
@@ -177,7 +177,7 @@ act(() => {
|
|
|
177
177
|
});
|
|
178
178
|
/* assert on the output */
|
|
179
179
|
|
|
180
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),dt===e&&(ze&n)===n&&(wt===zr||wt===hd&&(ze&62914560)===ze&&Kt()-gd<KN?(
|
|
180
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),dt===e&&(ze&n)===n&&(wt===zr||wt===hd&&(ze&62914560)===ze&&Kt()-gd<KN?(Ze&Qt)===tn&&vo(e,0):kb|=n,Hi===ze&&(Hi=0)),ra(e)}function Wv(e,t){t===0&&(t=Nl()),e=dn(e,t),e!==null&&(li(e,t),ra(e))}function G_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wv(e,n)}function Q_(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}r!==null&&r.delete(t),Wv(e,n)}function np(e,t,n){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var r=e,l=t,c=l.type===Mf;c=n||c,l.tag!==22?l.flags&67108864?c&&be(l,e1,r,l):np(r,l,c):l.memoizedState===null&&(c&&l.flags&8192?be(l,e1,r,l):l.subtreeFlags&67108864&&be(l,np,r,l,c)),t=t.sibling}}function e1(e,t){pt(!0);try{Av(t),Mv(t),Dv(e,t.alternate,t,!1),Tv(e,t,0,null,!1,0)}finally{pt(!1)}}function t1(e){var t=!0;e.current.mode&(mn|_s)||(t=!1),np(e,e.current,t)}function n1(e){if((Ze&Qt)===tn){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=H(e)||"ReactComponent",wd!==null){if(wd.has(t))return;wd.add(t)}else wd=new Set([t]);be(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function Zl(e,t){fa&&e.memoizedUpdaters.forEach(function(n){zs(e,n,t)})}function X_(e,t){var n=F.actQueue;return n!==null?(n.push(t),mC):Bp(e,t)}function Z_(e){Vv()&&F.actQueue===null&&be(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
181
181
|
|
|
182
182
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
183
183
|
|
|
@@ -186,16 +186,16 @@ act(() => {
|
|
|
186
186
|
});
|
|
187
187
|
/* assert on the output */
|
|
188
188
|
|
|
189
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,H(e))})}function ra(e){e!==sl&&e.next===null&&(sl===null?Ed=sl=e:sl=sl.next=e),_d=!0,Y.actQueue!==null?Pb||(Pb=!0,i1()):Hb||(Hb=!0,i1())}function Kl(e,t){if(!$b&&_d){$b=!0;do for(var n=!1,r=Ed;r!==null;){if(e!==0){var l=r.pendingLanes;if(l===0)var c=0;else{var f=r.suspendedLanes,h=r.pingedLanes;c=(1<<31-yn(42|e)+1)-1,c&=l&~(f&~h),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,r1(r,c))}else c=ze,c=Aa(r,r===dt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==Fi),(c&3)===0||fn(r,c)||(n=!0,r1(r,c));r=r.next}while(n);$b=!1}}function K_(){Xc=window.event,np()}function np(){_d=Pb=Hb=!1;var e=0;Ir!==0&&rA()&&(e=Ir);for(var t=Kt(),n=null,r=Ed;r!==null;){var l=r.next,c=s1(r,t);c===0?(r.next=null,n===null?Ed=l:n.next=l,l===null&&(sl=n)):(n=r,(e!==0||(c&3)!==0)&&(_d=!0)),r=l}It!==Pr&&It!==Nd||Kl(e),Ir!==0&&(Ir=0)}function s1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var f=31-yn(c),h=1<<f,y=l[f];y===-1?((h&n)===0||(h&r)!==0)&&(l[f]=wh(h,t)):y<=t&&(e.expiredLanes|=h),c&=~h}if(t=dt,n=ze,n=Aa(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Fi),r=e.callbackNode,n===0||e===t&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)return r!==null&&sp(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||fn(e,n)){if(t=n&-n,t!==e.callbackPriority||Y.actQueue!==null&&r!==Ib)sp(r);else return t;switch(no(n)){case ss:case da:n=qp;break;case Ba:n=Ao;break;case qf:n=Lp;break;default:n=Ao}return r=a1.bind(null,e),Y.actQueue!==null?(Y.actQueue.push(r),n=Ib):n=zp(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&sp(r),e.callbackPriority=2,e.callbackNode=null,2}function a1(e,t){if(sd=nd=!1,Xc=window.event,It!==Pr&&It!==Nd)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Os===xd&&(Os=Vb),Xl()&&e.callbackNode!==n)return null;var r=ze;return r=Aa(e,e===dt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Fi),r===0?null:(zv(e,r,t),s1(e,Kt()),e.callbackNode!=null&&e.callbackNode===n?a1.bind(null,e):null)}function r1(e,t){if(Xl())return null;nd=sd,sd=!1,zv(e,t,!0)}function sp(e){e!==Ib&&e!==null&&PA(e)}function i1(){Y.actQueue!==null&&Y.actQueue.push(function(){return np(),null}),EC(function(){(Xe&(Qt|Gn))!==tn?zp(Bp,K_):np()})}function ap(){if(Ir===0){var e=ji;e===0&&(e=Uf,Uf<<=1,(Uf&261888)===0&&(Uf=256)),Ir=e}return Ir}function o1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(nt(e,"action"),Ol(""+e))}function l1(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function W_(e,t,n,r,l){if(t==="submit"&&n&&n.stateNode===l){var c=o1((l[gn]||null).action),f=r.submitter;f&&(t=(t=f[gn]||null)?o1(t.formAction):f.getAttribute("formAction"),t!==null&&(c=t,f=null));var h=new If("action","action",null,r,l);e.push({event:h,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ir!==0){var y=f?l1(l,f):new FormData(l),v={pending:!0,data:y,method:l.method,action:c};Object.freeze(v),Em(n,v,null,y)}}else typeof c=="function"&&(h.preventDefault(),y=f?l1(l,f):new FormData(l),v={pending:!0,data:y,method:l.method,action:c},Object.freeze(v),Em(n,v,c,y))},currentTarget:l}]})}}function Sf(e,t,n){e.currentTarget=n;try{t(e)}catch(r){nb(r)}e.currentTarget=null}function c1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n];e:{var l=void 0,c=r.event;if(r=r.listeners,t)for(var f=r.length-1;0<=f;f--){var h=r[f],y=h.instance,v=h.currentTarget;if(h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,v):Sf(c,h,v),l=y}else for(f=0;f<r.length;f++){if(h=r[f],y=h.instance,v=h.currentTarget,h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,v):Sf(c,h,v),l=y}}}}function Ie(e,t){Yb.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=t[Hp];n===void 0&&(n=t[Hp]=new Set);var r=e+"__bubble";n.has(r)||(u1(t,e,2,!1),n.add(r))}function rp(e,t,n){Yb.has(e)&&!t&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var r=0;t&&(r|=4),u1(n,e,r,t)}function ip(e){if(!e[Ad]){e[Ad]=!0,ix.forEach(function(n){n!=="selectionchange"&&(Yb.has(n)||rp(n,!1,e),rp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,rp("selectionchange",!1,t))}}function u1(e,t,n,r){switch($1(t)){case ss:var l=MA;break;case da:l=kA;break;default:l=Sp}n=l.bind(null,t,n,e),l=void 0,!Fp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function op(e,t,n,r,l){var c=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var f=r.tag;if(f===3||f===4){var h=r.stateNode.containerInfo;if(h===l)break;if(f===4)for(f=r.return;f!==null;){var y=f.tag;if((y===3||y===4)&&f.stateNode.containerInfo===l)return;f=f.return}for(;h!==null;){if(f=Bs(h),f===null)return;if(y=f.tag,y===5||y===6||y===26||y===27){r=c=f;continue e}h=h.parentNode}}r=r.return}Ny(function(){var v=c,k=Ch(n),V=[];e:{var O=$x.get(e);if(O!==void 0){var P=If,ce=e;switch(e){case"keypress":if(Tu(n)===0)break e;case"keydown":case"keyup":P=TD;break;case"focusin":ce="focus",P=Xp;break;case"focusout":ce="blur",P=Xp;break;case"beforeblur":case"afterblur":P=Xp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Tx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=yD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=jD;break;case qx:case Lx:case Hx:P=xD;break;case Px:P=kD;break;case"scroll":case"scrollend":P=pD;break;case"wheel":P=UD;break;case"copy":case"cut":case"paste":P=SD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Rx;break;case"toggle":case"beforetoggle":P=BD}var me=(t&4)!==0,mt=!me&&(e==="scroll"||e==="scrollend"),Fe=me?O!==null?O+"Capture":null:O;me=[];for(var T=v,R;T!==null;){var j=T;if(R=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||R===null||Fe===null||(j=Rl(T,Fe),j!=null&&me.push(Wl(T,j,R))),mt)break;T=T.return}0<me.length&&(O=new P(O,ce,null,n,k),V.push({event:O,listeners:me}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",O&&n!==uc&&(ce=n.relatedTarget||n.fromElement)&&(Bs(ce)||ce[Ar]))break e;if((P||O)&&(O=k.window===k?k:(O=k.ownerDocument)?O.defaultView||O.parentWindow:window,P?(ce=n.relatedTarget||n.toElement,P=v,ce=ce?Bs(ce):null,ce!==null&&(mt=ee(ce),me=ce.tag,ce!==mt||me!==5&&me!==27&&me!==6)&&(ce=null)):(P=null,ce=v),P!==ce)){if(me=Tx,j="onMouseLeave",Fe="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(me=Rx,j="onPointerLeave",Fe="onPointerEnter",T="pointer"),mt=P==null?O:Da(P),R=ce==null?O:Da(ce),O=new me(j,T+"leave",P,n,k),O.target=mt,O.relatedTarget=R,j=null,Bs(k)===v&&(me=new me(Fe,T+"enter",ce,n,k),me.target=R,me.relatedTarget=mt,j=me),mt=j,P&&ce)t:{for(me=eA,Fe=P,T=ce,R=0,j=Fe;j;j=me(j))R++;j=0;for(var G=T;G;G=me(G))j++;for(;0<R-j;)Fe=me(Fe),R--;for(;0<j-R;)T=me(T),j--;for(;R--;){if(Fe===T||T!==null&&Fe===T.alternate){me=Fe;break t}Fe=me(Fe),T=me(T)}me=null}else me=null;P!==null&&f1(V,O,P,me,!1),ce!==null&&mt!==null&&f1(V,mt,ce,me,!0)}}e:{if(O=v?Da(v):window,P=O.nodeName&&O.nodeName.toLowerCase(),P==="select"||P==="input"&&O.type==="file")var fe=Cy;else if(Ay(O))if(zx)fe=d_;else{fe=u_;var Re=c_}else P=O.nodeName,!P||P.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?v&&Tl(v.elementType)&&(fe=Cy):fe=f_;if(fe&&(fe=fe(e,v))){Dy(V,fe,n,k);break e}Re&&Re(e,O,v),e==="focusout"&&v&&O.type==="number"&&v.memoizedProps.value!=null&&ui(O,"number",O.value)}switch(Re=v?Da(v):window,e){case"focusin":(Ay(Re)||Re.contentEditable==="true")&&(ko=Re,Kp=v,yc=null);break;case"focusout":yc=Kp=ko=null;break;case"mousedown":Wp=!0;break;case"contextmenu":case"mouseup":case"dragend":Wp=!1,Vy(V,n,k);break;case"selectionchange":if(PD)break;case"keydown":case"keyup":Vy(V,n,k)}var Ee;if(Zp)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Mo?Ey(e,n)&&(Se="onCompositionEnd"):e==="keydown"&&n.keyCode===jx&&(Se="onCompositionStart");Se&&(Mx&&n.locale!=="ko"&&(Mo||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Mo&&(Ee=Sy()):(Dr=k,Jp="value"in Dr?Dr.value:Dr.textContent,Mo=!0)),Re=wf(v,Se),0<Re.length&&(Se=new Ox(Se,e,null,n,k),V.push({event:Se,listeners:Re}),Ee?Se.data=Ee:(Ee=_y(n),Ee!==null&&(Se.data=Ee)))),(Ee=LD?r_(e,n):i_(e,n))&&(Se=wf(v,"onBeforeInput"),0<Se.length&&(Re=new ED("onBeforeInput","beforeinput",null,n,k),V.push({event:Re,listeners:Se}),Re.data=Ee)),W_(V,e,v,n,k)}c1(V,t)})}function Wl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wf(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,c=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||c===null||(l=Rl(e,n),l!=null&&r.unshift(Wl(e,l,c)),l=Rl(e,t),l!=null&&r.push(Wl(e,l,c))),e.tag===3)return r;e=e.return}return[]}function eA(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function f1(e,t,n,r,l){for(var c=t._reactName,f=[];n!==null&&n!==r;){var h=n,y=h.alternate,v=h.stateNode;if(h=h.tag,y!==null&&y===r)break;h!==5&&h!==26&&h!==27||v===null||(y=v,l?(v=Rl(n,c),v!=null&&f.unshift(Wl(n,v,y))):l||(v=Rl(n,c),v!=null&&f.push(Wl(n,v,y)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}function lp(e,t){t_(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||Dx||(Dx=!0,e==="select"&&t.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var n={registrationNameDependencies:_i,possibleRegistrationNames:Pp};Tl(e)||typeof t.is=="string"||s_(e,t,n),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function Zt(e,t,n,r){t!==n&&(n=Nr(n),Nr(t)!==n&&(r[e]=t))}function tA(e,t,n){t.forEach(function(r){n[m1(r)]=r==="style"?up(e):e.getAttribute(r)})}function ia(e,t){t===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function d1(e,t){return e=e.namespaceURI===Hf||e.namespaceURI===To?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function Nr(e){return _a(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Ea(e)),rr(e)),(typeof e=="string"?e:""+e).replace(pC,`
|
|
190
|
-
`).replace(bC,"")}function h1(e,t){return t=Nr(t),Nr(e)===t}function ut(e,t,n,r,l,c){switch(n){case"children":typeof r=="string"?(Cu(r,t,!1),t==="body"||t==="textarea"&&r===""||Cl(e,r)):(typeof r=="number"||typeof r=="bigint")&&(Cu(""+r,t,!1),t!=="body"&&Cl(e,""+r));break;case"className":Ps(e,"class",r);break;case"tabIndex":Ps(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ps(e,n,r);break;case"style":gy(e,r,c);break;case"data":if(t!=="object"){Ps(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){console.error(n==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',n,n),e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}nt(r,n),r=Ol(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(r!=null&&(t==="form"?n==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof r=="function"&&(l.encType==null&&l.method==null||Td||(Td=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),l.target==null||Cd||(Cd=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):t==="input"||t==="button"?n==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||l.type==="submit"||l.type==="image"||Dd?t!=="button"||l.type==null||l.type==="submit"||Dd?typeof r=="function"&&(l.name==null||dS||(dS=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),l.formEncType==null&&l.formMethod==null||Td||(Td=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),l.formTarget==null||Cd||(Cd=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Dd=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Dd=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(n==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&ut(e,t,"name",l.name,l,null),ut(e,t,"formEncType",l.formEncType,l,null),ut(e,t,"formMethod",l.formMethod,l,null),ut(e,t,"formTarget",l.formTarget,l,null)):(ut(e,t,"encType",l.encType,l,null),ut(e,t,"method",l.method,l,null),ut(e,t,"target",l.target,l,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}nt(r,n),r=Ol(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Ta);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scrollend",e));break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}nt(r,n),n=Ol(""+r),e.setAttributeNS($i,"xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?(nt(r,n),e.setAttribute(n,""+r)):e.removeAttribute(n);break;case"inert":r!==""||Od[n]||(Od[n]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",n));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?(nt(r,n),e.setAttribute(n,r)):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?(nt(r,n),e.setAttribute(n,r)):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):(nt(r,n),e.setAttribute(n,r));break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),vs(e,"popover",r);break;case"xlinkActuate":Cn(e,$i,"xlink:actuate",r);break;case"xlinkArcrole":Cn(e,$i,"xlink:arcrole",r);break;case"xlinkRole":Cn(e,$i,"xlink:role",r);break;case"xlinkShow":Cn(e,$i,"xlink:show",r);break;case"xlinkTitle":Cn(e,$i,"xlink:title",r);break;case"xlinkType":Cn(e,$i,"xlink:type",r);break;case"xmlBase":Cn(e,Fb,"xml:base",r);break;case"xmlLang":Cn(e,Fb,"xml:lang",r);break;case"xmlSpace":Cn(e,Fb,"xml:space",r);break;case"is":c!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),vs(e,"is",r);break;case"innerText":case"textContent":break;case"popoverTarget":hS||r==null||typeof r!="object"||(hS=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",r));default:!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N"?(n=vy(n),vs(e,n,r)):_i.hasOwnProperty(n)&&r!=null&&typeof r!="function"&&ia(n,r)}}function cp(e,t,n,r,l,c){switch(n){case"style":gy(e,r,c);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"children":typeof r=="string"?Cl(e,r):(typeof r=="number"||typeof r=="bigint")&&Cl(e,""+r);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scrollend",e));break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(_i.hasOwnProperty(n))r!=null&&typeof r!="function"&&ia(n,r);else e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),c=e[gn]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,l),typeof r=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,l);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):vs(e,n,r)}}}function on(e,t,n){switch(lp(t,n),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var r=!1,l=!1,c;for(c in n)if(n.hasOwnProperty(c)){var f=n[c];if(f!=null)switch(c){case"src":r=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,c,f,n,null)}}l&&ut(e,t,"srcSet",n.srcSet,n,null),r&&ut(e,t,"src",n.src,n,null);return;case"input":Hs("input",n),Ie("invalid",e);var h=c=f=l=null,y=null,v=null;for(r in n)if(n.hasOwnProperty(r)){var k=n[r];if(k!=null)switch(r){case"name":l=k;break;case"type":f=k;break;case"checked":y=k;break;case"defaultChecked":v=k;break;case"value":c=k;break;case"defaultValue":h=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ut(e,t,r,k,n,null)}}$s(e,n),oo(e,c,h,y,v,f,l,!1);return;case"select":Hs("select",n),Ie("invalid",e),r=f=c=null;for(l in n)if(n.hasOwnProperty(l)&&(h=n[l],h!=null))switch(l){case"value":c=h;break;case"defaultValue":f=h;break;case"multiple":r=h;default:ut(e,t,l,h,n,null)}Dl(e,n),t=c,n=f,e.multiple=!!r,t!=null?Ut(e,!!r,t,!1):n!=null&&Ut(e,!!r,n,!0);return;case"textarea":Hs("textarea",n),Ie("invalid",e),c=l=r=null;for(f in n)if(n.hasOwnProperty(f)&&(h=n[f],h!=null))switch(f){case"value":r=h;break;case"defaultValue":l=h;break;case"children":c=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:ut(e,t,f,h,n,null)}N(e,n),E(e,r,l,c);return;case"option":Al(e,n);for(y in n)if(n.hasOwnProperty(y)&&(r=n[y],r!=null))switch(y){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ut(e,t,y,r,n,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(r=0;r<Jc.length;r++)Ie(Jc[r],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(v in n)if(n.hasOwnProperty(v)&&(r=n[v],r!=null))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,v,r,n,null)}return;default:if(Tl(t)){for(k in n)n.hasOwnProperty(k)&&(r=n[k],r!==void 0&&cp(e,t,k,r,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(r=n[h],r!=null&&ut(e,t,h,r,n,null))}function nA(e,t,n,r){switch(lp(t,r),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,c=null,f=null,h=null,y=null,v=null,k=null;for(P in n){var V=n[P];if(n.hasOwnProperty(P)&&V!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":y=V;default:r.hasOwnProperty(P)||ut(e,t,P,null,r,V)}}for(var O in r){var P=r[O];if(V=n[O],r.hasOwnProperty(O)&&(P!=null||V!=null))switch(O){case"type":c=P;break;case"name":l=P;break;case"checked":v=P;break;case"defaultChecked":k=P;break;case"value":f=P;break;case"defaultValue":h=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:P!==V&&ut(e,t,O,P,r,V)}}t=n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null,r=r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null,t||!r||fS||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),fS=!0),!t||r||uS||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),uS=!0),Is(e,f,h,y,v,k,c,l);return;case"select":P=f=h=O=null;for(c in n)if(y=n[c],n.hasOwnProperty(c)&&y!=null)switch(c){case"value":break;case"multiple":P=y;default:r.hasOwnProperty(c)||ut(e,t,c,null,r,y)}for(l in r)if(c=r[l],y=n[l],r.hasOwnProperty(l)&&(c!=null||y!=null))switch(l){case"value":O=c;break;case"defaultValue":h=c;break;case"multiple":f=c;default:c!==y&&ut(e,t,l,c,r,y)}r=h,t=f,n=P,O!=null?Ut(e,!!t,O,!1):!!n!=!!t&&(r!=null?Ut(e,!!t,r,!0):Ut(e,!!t,t?[]:"",!1));return;case"textarea":P=O=null;for(h in n)if(l=n[h],n.hasOwnProperty(h)&&l!=null&&!r.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:ut(e,t,h,null,r,l)}for(f in r)if(l=r[f],c=n[f],r.hasOwnProperty(f)&&(l!=null||c!=null))switch(f){case"value":O=l;break;case"defaultValue":P=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:l!==c&&ut(e,t,f,l,r,c)}A(e,O,P);return;case"option":for(var ce in n)if(O=n[ce],n.hasOwnProperty(ce)&&O!=null&&!r.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:ut(e,t,ce,null,r,O)}for(y in r)if(O=r[y],P=n[y],r.hasOwnProperty(y)&&O!==P&&(O!=null||P!=null))switch(y){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:ut(e,t,y,O,r,P)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in n)O=n[me],n.hasOwnProperty(me)&&O!=null&&!r.hasOwnProperty(me)&&ut(e,t,me,null,r,O);for(v in r)if(O=r[v],P=n[v],r.hasOwnProperty(v)&&O!==P&&(O!=null||P!=null))switch(v){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ut(e,t,v,O,r,P)}return;default:if(Tl(t)){for(var mt in n)O=n[mt],n.hasOwnProperty(mt)&&O!==void 0&&!r.hasOwnProperty(mt)&&cp(e,t,mt,void 0,r,O);for(k in r)O=r[k],P=n[k],!r.hasOwnProperty(k)||O===P||O===void 0&&P===void 0||cp(e,t,k,O,r,P);return}}for(var Fe in n)O=n[Fe],n.hasOwnProperty(Fe)&&O!=null&&!r.hasOwnProperty(Fe)&&ut(e,t,Fe,null,r,O);for(V in r)O=r[V],P=n[V],!r.hasOwnProperty(V)||O===P||O==null&&P==null||ut(e,t,V,O,r,P)}function m1(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function up(e){var t={};e=e.style;for(var n=0;n<e.length;n++){var r=e[n];t[r]=e.getPropertyValue(r)}return t}function p1(e,t,n){if(t!=null&&typeof t!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var r,l=r="",c;for(c in t)if(t.hasOwnProperty(c)){var f=t[c];f!=null&&typeof f!="boolean"&&f!==""&&(c.indexOf("--")===0?(to(f,c),r+=l+c+":"+(""+f).trim()):typeof f!="number"||f===0||_x.has(c)?(to(f,c),r+=l+c.replace(xx,"-$1").toLowerCase().replace(Nx,"-ms-")+":"+(""+f).trim()):r+=l+c.replace(xx,"-$1").toLowerCase().replace(Nx,"-ms-")+":"+f+"px",l=";")}r=r||null,t=e.getAttribute("style"),t!==r&&(r=Nr(r),Nr(t)!==r&&(n.style=up(e)))}}function ns(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(nt(r,t),e===""+r)return}Zt(t,e,r,c)}function b1(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null){switch(typeof r){case"function":case"symbol":return}if(!r)return}else switch(typeof r){case"function":case"symbol":break;default:if(r)return}Zt(t,e,r,c)}function fp(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":return}else if(r!=null)switch(typeof r){case"function":case"symbol":break;default:if(nt(r,n),e===""+r)return}Zt(t,e,r,c)}function y1(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(r))return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(!isNaN(r)&&(nt(r,t),e===""+r))return}Zt(t,e,r,c)}function dp(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(nt(r,t),n=Ol(""+r),e===n)return}Zt(t,e,r,c)}function g1(e,t,n,r){for(var l={},c=new Set,f=e.attributes,h=0;h<f.length;h++)switch(f[h].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:c.add(f[h].name)}if(Tl(t)){for(var y in n)if(n.hasOwnProperty(y)){var v=n[y];if(v!=null){if(_i.hasOwnProperty(y))typeof v!="function"&&ia(y,v);else if(n.suppressHydrationWarning!==!0)switch(y){case"children":typeof v!="string"&&typeof v!="number"||Zt("children",e.textContent,v,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,v=v?v.__html:void 0,v!=null&&(v=d1(e,v),Zt(y,f,v,l));continue;case"style":c.delete(y),p1(e,v,l);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":c.delete(y.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",y);continue;case"className":c.delete("class"),f=lr(e,"class",v),Zt("className",f,v,l);continue;default:r.context===Ka&&t!=="svg"&&t!=="math"?c.delete(y.toLowerCase()):c.delete(y),f=lr(e,y,v),Zt(y,f,v,l)}}}}else for(v in n)if(n.hasOwnProperty(v)&&(y=n[v],y!=null)){if(_i.hasOwnProperty(v))typeof y!="function"&&ia(v,y);else if(n.suppressHydrationWarning!==!0)switch(v){case"children":typeof y!="string"&&typeof y!="number"||Zt("children",e.textContent,y,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,y=y?y.__html:void 0,y!=null&&(y=d1(e,y),f!==y&&(l[v]={__html:f}));continue;case"className":ns(e,v,"class",y,c,l);continue;case"tabIndex":ns(e,v,"tabindex",y,c,l);continue;case"style":c.delete(v),p1(e,y,l);continue;case"multiple":c.delete(v),Zt(v,e.multiple,y,l);continue;case"muted":c.delete(v),Zt(v,e.muted,y,l);continue;case"autoFocus":c.delete("autofocus"),Zt(v,e.autofocus,y,l);continue;case"data":if(t!=="object"){c.delete(v),f=e.getAttribute("data"),Zt(v,f,y,l);continue}case"src":case"href":if(!(y!==""||t==="a"&&v==="href"||t==="object"&&v==="data")){console.error(v==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',v,v);continue}dp(e,v,v,y,c,l);continue;case"action":case"formAction":if(f=e.getAttribute(v),typeof y=="function"){c.delete(v.toLowerCase()),v==="formAction"?(c.delete("name"),c.delete("formenctype"),c.delete("formmethod"),c.delete("formtarget")):(c.delete("enctype"),c.delete("method"),c.delete("target"));continue}else if(f===yC){c.delete(v.toLowerCase()),Zt(v,"function",y,l);continue}dp(e,v,v.toLowerCase(),y,c,l);continue;case"xlinkHref":dp(e,v,"xlink:href",y,c,l);continue;case"contentEditable":fp(e,v,"contenteditable",y,c,l);continue;case"spellCheck":fp(e,v,"spellcheck",y,c,l);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":fp(e,v,v,y,c,l);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":b1(e,v,v.toLowerCase(),y,c,l);continue;case"capture":case"download":e:{h=e;var k=f=v,V=l;if(c.delete(k),h=h.getAttribute(k),h===null)switch(typeof y){case"undefined":case"function":case"symbol":break e;default:if(y===!1)break e}else if(y!=null)switch(typeof y){case"function":case"symbol":break;case"boolean":if(y===!0&&h==="")break e;break;default:if(nt(y,f),h===""+y)break e}Zt(f,h,y,V)}continue;case"cols":case"rows":case"size":case"span":e:{if(h=e,k=f=v,V=l,c.delete(k),h=h.getAttribute(k),h===null)switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(y)||1>y)break e}else if(y!=null)switch(typeof y){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(y)||1>y)&&(nt(y,f),h===""+y))break e}Zt(f,h,y,V)}continue;case"rowSpan":y1(e,v,"rowspan",y,c,l);continue;case"start":y1(e,v,v,y,c,l);continue;case"xHeight":ns(e,v,"x-height",y,c,l);continue;case"xlinkActuate":ns(e,v,"xlink:actuate",y,c,l);continue;case"xlinkArcrole":ns(e,v,"xlink:arcrole",y,c,l);continue;case"xlinkRole":ns(e,v,"xlink:role",y,c,l);continue;case"xlinkShow":ns(e,v,"xlink:show",y,c,l);continue;case"xlinkTitle":ns(e,v,"xlink:title",y,c,l);continue;case"xlinkType":ns(e,v,"xlink:type",y,c,l);continue;case"xmlBase":ns(e,v,"xml:base",y,c,l);continue;case"xmlLang":ns(e,v,"xml:lang",y,c,l);continue;case"xmlSpace":ns(e,v,"xml:space",y,c,l);continue;case"inert":y!==""||Od[v]||(Od[v]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",v)),b1(e,v,v,y,c,l);continue;default:if(!(2<v.length)||v[0]!=="o"&&v[0]!=="O"||v[1]!=="n"&&v[1]!=="N"){h=vy(v),f=!1,r.context===Ka&&t!=="svg"&&t!=="math"?c.delete(h.toLowerCase()):(k=v.toLowerCase(),k=Pf.hasOwnProperty(k)&&Pf[k]||null,k!==null&&k!==v&&(f=!0,c.delete(k)),c.delete(h));e:if(k=e,V=h,h=y,or(V))if(k.hasAttribute(V))k=k.getAttribute(V),nt(h,V),h=k===""+h?h:k;else{switch(typeof h){case"function":case"symbol":break e;case"boolean":if(k=V.toLowerCase().slice(0,5),k!=="data-"&&k!=="aria-")break e}h=h===void 0?void 0:null}else h=void 0;f||Zt(v,h,y,l)}}}return 0<c.size&&n.suppressHydrationWarning!==!0&&tA(e,c,l),Object.keys(l).length===0?null:l}function sA(e,t){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+t+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+t+" "+e[e.length-1]}}function v1(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aA(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var l=n[r],c=l.transferSize,f=l.initiatorType,h=l.duration;if(c&&h&&v1(f)){for(f=0,h=l.responseEnd,r+=1;r<n.length;r++){var y=n[r],v=y.startTime;if(v>h)break;var k=y.transferSize,V=y.initiatorType;k&&v1(V)&&(y=y.responseEnd,f+=k*(y<h?1:(h-v)/(y-v)))}if(--r,t+=8*(c+f)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}function Ef(e){return e.nodeType===9?e:e.ownerDocument}function x1(e){switch(e){case To:return rl;case Hf:return jd;default:return Ka}}function N1(e,t){if(e===Ka)switch(t){case"svg":return rl;case"math":return jd;default:return Ka}return e===rl&&t==="foreignObject"?Ka:e}function hp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function rA(){var e=window.event;return e&&e.type==="popstate"?e===Xb?!1:(Xb=e,!0):(Xb=null,!1)}function ec(){var e=window.event;return e&&e!==Xc?e.type:null}function tc(){var e=window.event;return e&&e!==Xc?e.timeStamp:-1.1}function iA(e){setTimeout(function(){throw e})}function oA(e,t,n){switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&e.focus();break;case"img":n.src?e.src=n.src:n.srcSet&&(e.srcset=n.srcSet)}}function lA(){}function cA(e,t,n,r){nA(e,t,n,r),e[gn]=r}function S1(e){Cl(e,"")}function uA(e,t,n){e.nodeValue=n}function w1(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[gn]||null;if(t!==null){var n=Un(e);n!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Sr(e){return e==="head"}function fA(e,t){e.removeChild(t)}function dA(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function E1(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n===Qc||n===Rd){if(r===0){e.removeChild(l),wo(t);return}r--}else if(n===Gc||n===Yr||n===Yi||n===al||n===Ii)r++;else if(n===vC)nc(e.ownerDocument.documentElement);else if(n===NC){n=e.ownerDocument.head,nc(n);for(var c=n.firstChild;c;){var f=c.nextSibling,h=c.nodeName;c[cc]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=f}}else n===xC&&nc(e.ownerDocument.body);n=l}while(n);wo(t)}function _1(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n===Qc){if(e===0)break;e--}else n!==Gc&&n!==Yr&&n!==Yi&&n!==al||e++;n=r}while(n)}function hA(e){_1(e,!0)}function mA(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function pA(e){e.nodeValue=""}function bA(e){_1(e,!1)}function yA(e,t){t=t[SC],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function gA(e,t){e.nodeValue=t}function mp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":mp(n),ir(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function vA(e,t,n,r){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[cc])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){nt(l.name,"name");var c=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Pn(e.nextSibling),e===null)break}return null}function xA(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pn(e.nextSibling),e===null))return null;return e}function A1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pn(e.nextSibling),e===null))return null;return e}function pp(e){return e.data===Yr||e.data===Yi}function bp(e){return e.data===al||e.data===Yr&&e.ownerDocument.readyState!==pS}function NA(e,t){var n=e.ownerDocument;if(e.data===Yi)e._reactRetry=t;else if(e.data!==Yr||n.readyState!==pS)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===Gc||t===al||t===Yr||t===Yi||t===Ii||t===Jb||t===mS)break;if(t===Qc||t===Rd)return null}}return e}function D1(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),n={},r=e.attributes,l=0;l<r.length;l++){var c=r[l];n[m1(c.name)]=c.name.toLowerCase()==="style"?up(e):c.value}return{type:t,props:n}}return e.nodeType===8?e.data===Ii?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function C1(e,t,n){return n===null||n[gC]!==!0?(e.nodeValue===t?e=null:(t=Nr(t),e=Nr(e.nodeValue)===t?null:e.nodeValue),e):null}function yp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===Qc||n===Rd){if(t===0)return Pn(e.nextSibling);t--}else n!==Gc&&n!==al&&n!==Yr&&n!==Yi&&n!==Ii||t++}e=e.nextSibling}return null}function T1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===Gc||n===al||n===Yr||n===Yi||n===Ii){if(t===0)return e;t--}else n!==Qc&&n!==Rd||t++}e=e.previousSibling}return null}function SA(e){wo(e)}function wA(e){wo(e)}function EA(e){wo(e)}function O1(e,t,n,r,l){switch(l&&Dh(e,r.ancestorInfo),t=Ef(n),e){case"html":if(e=t.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=t.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=t.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function _A(e,t,n,r){if(!n[Ar]&&Un(n)){var l=n.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",l,l,l)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(l=n.attributes;l.length;)n.removeAttributeNode(l[0]);on(n,e,t),n[ln]=r,n[gn]=t}function nc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ir(e)}function _f(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function R1(e,t,n){var r=il;if(r&&typeof t=="string"&&t){var l=Ct(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),NS.has(l)||(NS.add(l),e={rel:e,crossOrigin:n,href:t},r.querySelector(l)===null&&(t=r.createElement("link"),on(t,"link",e),jt(t),r.head.appendChild(t)))}}function j1(e,t,n,r){var l=(l=Er.current)?_f(l):null;if(!l)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=No(n.href),t=qs(l).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=No(n.href);var c=qs(l).hoistableStyles,f=c.get(e);if(!f&&(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:Ji,preload:null}},c.set(e,f),(c=l.querySelector(sc(e)))&&!c._p&&(f.instance=c,f.state.loading=Zc|ms),!ps.has(e))){var h={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy};ps.set(e,h),c||AA(l,e,h,f.state)}if(t&&r===null)throw n=`
|
|
189
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,H(e))})}function ra(e){e!==sl&&e.next===null&&(sl===null?Ed=sl=e:sl=sl.next=e),_d=!0,F.actQueue!==null?$b||($b=!0,i1()):Pb||(Pb=!0,i1())}function Kl(e,t){if(!Ib&&_d){Ib=!0;do for(var n=!1,r=Ed;r!==null;){if(e!==0){var l=r.pendingLanes;if(l===0)var c=0;else{var f=r.suspendedLanes,h=r.pingedLanes;c=(1<<31-yn(42|e)+1)-1,c&=l&~(f&~h),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,r1(r,c))}else c=ze,c=Aa(r,r===dt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==Yi),(c&3)===0||fn(r,c)||(n=!0,r1(r,c));r=r.next}while(n);Ib=!1}}function K_(){Xc=window.event,sp()}function sp(){_d=$b=Pb=!1;var e=0;Ir!==0&&rA()&&(e=Ir);for(var t=Kt(),n=null,r=Ed;r!==null;){var l=r.next,c=s1(r,t);c===0?(r.next=null,n===null?Ed=l:n.next=l,l===null&&(sl=n)):(n=r,(e!==0||(c&3)!==0)&&(_d=!0)),r=l}It!==Pr&&It!==Nd||Kl(e),Ir!==0&&(Ir=0)}function s1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var f=31-yn(c),h=1<<f,y=l[f];y===-1?((h&n)===0||(h&r)!==0)&&(l[f]=Eh(h,t)):y<=t&&(e.expiredLanes|=h),c&=~h}if(t=dt,n=ze,n=Aa(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Yi),r=e.callbackNode,n===0||e===t&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)return r!==null&&ap(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||fn(e,n)){if(t=n&-n,t!==e.callbackPriority||F.actQueue!==null&&r!==Fb)ap(r);else return t;switch(no(n)){case ss:case da:n=Lp;break;case Ba:n=Ao;break;case qf:n=Hp;break;default:n=Ao}return r=a1.bind(null,e),F.actQueue!==null?(F.actQueue.push(r),n=Fb):n=Bp(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&ap(r),e.callbackPriority=2,e.callbackNode=null,2}function a1(e,t){if(sd=nd=!1,Xc=window.event,It!==Pr&&It!==Nd)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Os===xd&&(Os=Ub),Xl()&&e.callbackNode!==n)return null;var r=ze;return r=Aa(e,e===dt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Yi),r===0?null:(zv(e,r,t),s1(e,Kt()),e.callbackNode!=null&&e.callbackNode===n?a1.bind(null,e):null)}function r1(e,t){if(Xl())return null;nd=sd,sd=!1,zv(e,t,!0)}function ap(e){e!==Fb&&e!==null&&PA(e)}function i1(){F.actQueue!==null&&F.actQueue.push(function(){return sp(),null}),EC(function(){(Ze&(Qt|Gn))!==tn?Bp(qp,K_):sp()})}function rp(){if(Ir===0){var e=ji;e===0&&(e=Uf,Uf<<=1,(Uf&261888)===0&&(Uf=256)),Ir=e}return Ir}function o1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(st(e,"action"),Ol(""+e))}function l1(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function W_(e,t,n,r,l){if(t==="submit"&&n&&n.stateNode===l){var c=o1((l[gn]||null).action),f=r.submitter;f&&(t=(t=f[gn]||null)?o1(t.formAction):f.getAttribute("formAction"),t!==null&&(c=t,f=null));var h=new If("action","action",null,r,l);e.push({event:h,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ir!==0){var y=f?l1(l,f):new FormData(l),v={pending:!0,data:y,method:l.method,action:c};Object.freeze(v),_m(n,v,null,y)}}else typeof c=="function"&&(h.preventDefault(),y=f?l1(l,f):new FormData(l),v={pending:!0,data:y,method:l.method,action:c},Object.freeze(v),_m(n,v,c,y))},currentTarget:l}]})}}function Sf(e,t,n){e.currentTarget=n;try{t(e)}catch(r){sb(r)}e.currentTarget=null}function c1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n];e:{var l=void 0,c=r.event;if(r=r.listeners,t)for(var f=r.length-1;0<=f;f--){var h=r[f],y=h.instance,v=h.currentTarget;if(h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,v):Sf(c,h,v),l=y}else for(f=0;f<r.length;f++){if(h=r[f],y=h.instance,v=h.currentTarget,h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,v):Sf(c,h,v),l=y}}}}function Ie(e,t){Yb.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=t[Pp];n===void 0&&(n=t[Pp]=new Set);var r=e+"__bubble";n.has(r)||(u1(t,e,2,!1),n.add(r))}function ip(e,t,n){Yb.has(e)&&!t&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var r=0;t&&(r|=4),u1(n,e,r,t)}function op(e){if(!e[Ad]){e[Ad]=!0,ix.forEach(function(n){n!=="selectionchange"&&(Yb.has(n)||ip(n,!1,e),ip(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,ip("selectionchange",!1,t))}}function u1(e,t,n,r){switch($1(t)){case ss:var l=MA;break;case da:l=kA;break;default:l=wp}n=l.bind(null,t,n,e),l=void 0,!Jp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function lp(e,t,n,r,l){var c=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var f=r.tag;if(f===3||f===4){var h=r.stateNode.containerInfo;if(h===l)break;if(f===4)for(f=r.return;f!==null;){var y=f.tag;if((y===3||y===4)&&f.stateNode.containerInfo===l)return;f=f.return}for(;h!==null;){if(f=Bs(h),f===null)return;if(y=f.tag,y===5||y===6||y===26||y===27){r=c=f;continue e}h=h.parentNode}}r=r.return}Ny(function(){var v=c,k=Th(n),V=[];e:{var O=$x.get(e);if(O!==void 0){var P=If,ce=e;switch(e){case"keypress":if(Tu(n)===0)break e;case"keydown":case"keyup":P=TD;break;case"focusin":ce="focus",P=Zp;break;case"focusout":ce="blur",P=Zp;break;case"beforeblur":case"afterblur":P=Zp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Tx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=yD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=jD;break;case qx:case Lx:case Hx:P=xD;break;case Px:P=kD;break;case"scroll":case"scrollend":P=pD;break;case"wheel":P=UD;break;case"copy":case"cut":case"paste":P=SD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Rx;break;case"toggle":case"beforetoggle":P=BD}var me=(t&4)!==0,mt=!me&&(e==="scroll"||e==="scrollend"),Ye=me?O!==null?O+"Capture":null:O;me=[];for(var T=v,R;T!==null;){var j=T;if(R=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||R===null||Ye===null||(j=Rl(T,Ye),j!=null&&me.push(Wl(T,j,R))),mt)break;T=T.return}0<me.length&&(O=new P(O,ce,null,n,k),V.push({event:O,listeners:me}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",O&&n!==uc&&(ce=n.relatedTarget||n.fromElement)&&(Bs(ce)||ce[Ar]))break e;if((P||O)&&(O=k.window===k?k:(O=k.ownerDocument)?O.defaultView||O.parentWindow:window,P?(ce=n.relatedTarget||n.toElement,P=v,ce=ce?Bs(ce):null,ce!==null&&(mt=ee(ce),me=ce.tag,ce!==mt||me!==5&&me!==27&&me!==6)&&(ce=null)):(P=null,ce=v),P!==ce)){if(me=Tx,j="onMouseLeave",Ye="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(me=Rx,j="onPointerLeave",Ye="onPointerEnter",T="pointer"),mt=P==null?O:Da(P),R=ce==null?O:Da(ce),O=new me(j,T+"leave",P,n,k),O.target=mt,O.relatedTarget=R,j=null,Bs(k)===v&&(me=new me(Ye,T+"enter",ce,n,k),me.target=R,me.relatedTarget=mt,j=me),mt=j,P&&ce)t:{for(me=eA,Ye=P,T=ce,R=0,j=Ye;j;j=me(j))R++;j=0;for(var G=T;G;G=me(G))j++;for(;0<R-j;)Ye=me(Ye),R--;for(;0<j-R;)T=me(T),j--;for(;R--;){if(Ye===T||T!==null&&Ye===T.alternate){me=Ye;break t}Ye=me(Ye),T=me(T)}me=null}else me=null;P!==null&&f1(V,O,P,me,!1),ce!==null&&mt!==null&&f1(V,mt,ce,me,!0)}}e:{if(O=v?Da(v):window,P=O.nodeName&&O.nodeName.toLowerCase(),P==="select"||P==="input"&&O.type==="file")var fe=Cy;else if(Ay(O))if(zx)fe=d_;else{fe=u_;var Re=c_}else P=O.nodeName,!P||P.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?v&&Tl(v.elementType)&&(fe=Cy):fe=f_;if(fe&&(fe=fe(e,v))){Dy(V,fe,n,k);break e}Re&&Re(e,O,v),e==="focusout"&&v&&O.type==="number"&&v.memoizedProps.value!=null&&ui(O,"number",O.value)}switch(Re=v?Da(v):window,e){case"focusin":(Ay(Re)||Re.contentEditable==="true")&&(ko=Re,Wp=v,yc=null);break;case"focusout":yc=Wp=ko=null;break;case"mousedown":eb=!0;break;case"contextmenu":case"mouseup":case"dragend":eb=!1,Vy(V,n,k);break;case"selectionchange":if(PD)break;case"keydown":case"keyup":Vy(V,n,k)}var Ee;if(Kp)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Mo?Ey(e,n)&&(Se="onCompositionEnd"):e==="keydown"&&n.keyCode===jx&&(Se="onCompositionStart");Se&&(Mx&&n.locale!=="ko"&&(Mo||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Mo&&(Ee=Sy()):(Dr=k,Gp="value"in Dr?Dr.value:Dr.textContent,Mo=!0)),Re=wf(v,Se),0<Re.length&&(Se=new Ox(Se,e,null,n,k),V.push({event:Se,listeners:Re}),Ee?Se.data=Ee:(Ee=_y(n),Ee!==null&&(Se.data=Ee)))),(Ee=LD?r_(e,n):i_(e,n))&&(Se=wf(v,"onBeforeInput"),0<Se.length&&(Re=new ED("onBeforeInput","beforeinput",null,n,k),V.push({event:Re,listeners:Se}),Re.data=Ee)),W_(V,e,v,n,k)}c1(V,t)})}function Wl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wf(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,c=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||c===null||(l=Rl(e,n),l!=null&&r.unshift(Wl(e,l,c)),l=Rl(e,t),l!=null&&r.push(Wl(e,l,c))),e.tag===3)return r;e=e.return}return[]}function eA(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function f1(e,t,n,r,l){for(var c=t._reactName,f=[];n!==null&&n!==r;){var h=n,y=h.alternate,v=h.stateNode;if(h=h.tag,y!==null&&y===r)break;h!==5&&h!==26&&h!==27||v===null||(y=v,l?(v=Rl(n,c),v!=null&&f.unshift(Wl(n,v,y))):l||(v=Rl(n,c),v!=null&&f.push(Wl(n,v,y)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}function cp(e,t){t_(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||Dx||(Dx=!0,e==="select"&&t.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var n={registrationNameDependencies:_i,possibleRegistrationNames:$p};Tl(e)||typeof t.is=="string"||s_(e,t,n),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function Zt(e,t,n,r){t!==n&&(n=Nr(n),Nr(t)!==n&&(r[e]=t))}function tA(e,t,n){t.forEach(function(r){n[m1(r)]=r==="style"?fp(e):e.getAttribute(r)})}function ia(e,t){t===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function d1(e,t){return e=e.namespaceURI===Hf||e.namespaceURI===To?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function Nr(e){return _a(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",Ea(e)),rr(e)),(typeof e=="string"?e:""+e).replace(pC,`
|
|
190
|
+
`).replace(bC,"")}function h1(e,t){return t=Nr(t),Nr(e)===t}function ut(e,t,n,r,l,c){switch(n){case"children":typeof r=="string"?(Cu(r,t,!1),t==="body"||t==="textarea"&&r===""||Cl(e,r)):(typeof r=="number"||typeof r=="bigint")&&(Cu(""+r,t,!1),t!=="body"&&Cl(e,""+r));break;case"className":Ps(e,"class",r);break;case"tabIndex":Ps(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ps(e,n,r);break;case"style":gy(e,r,c);break;case"data":if(t!=="object"){Ps(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){console.error(n==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',n,n),e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}st(r,n),r=Ol(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(r!=null&&(t==="form"?n==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof r=="function"&&(l.encType==null&&l.method==null||Td||(Td=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),l.target==null||Cd||(Cd=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):t==="input"||t==="button"?n==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||l.type==="submit"||l.type==="image"||Dd?t!=="button"||l.type==null||l.type==="submit"||Dd?typeof r=="function"&&(l.name==null||dS||(dS=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),l.formEncType==null&&l.formMethod==null||Td||(Td=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),l.formTarget==null||Cd||(Cd=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Dd=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Dd=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(n==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&ut(e,t,"name",l.name,l,null),ut(e,t,"formEncType",l.formEncType,l,null),ut(e,t,"formMethod",l.formMethod,l,null),ut(e,t,"formTarget",l.formTarget,l,null)):(ut(e,t,"encType",l.encType,l,null),ut(e,t,"method",l.method,l,null),ut(e,t,"target",l.target,l,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}st(r,n),r=Ol(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Ta);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scrollend",e));break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}st(r,n),n=Ol(""+r),e.setAttributeNS($i,"xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?(st(r,n),e.setAttribute(n,""+r)):e.removeAttribute(n);break;case"inert":r!==""||Od[n]||(Od[n]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",n));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?(st(r,n),e.setAttribute(n,r)):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?(st(r,n),e.setAttribute(n,r)):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):(st(r,n),e.setAttribute(n,r));break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),vs(e,"popover",r);break;case"xlinkActuate":Cn(e,$i,"xlink:actuate",r);break;case"xlinkArcrole":Cn(e,$i,"xlink:arcrole",r);break;case"xlinkRole":Cn(e,$i,"xlink:role",r);break;case"xlinkShow":Cn(e,$i,"xlink:show",r);break;case"xlinkTitle":Cn(e,$i,"xlink:title",r);break;case"xlinkType":Cn(e,$i,"xlink:type",r);break;case"xmlBase":Cn(e,Jb,"xml:base",r);break;case"xmlLang":Cn(e,Jb,"xml:lang",r);break;case"xmlSpace":Cn(e,Jb,"xml:space",r);break;case"is":c!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),vs(e,"is",r);break;case"innerText":case"textContent":break;case"popoverTarget":hS||r==null||typeof r!="object"||(hS=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",r));default:!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N"?(n=vy(n),vs(e,n,r)):_i.hasOwnProperty(n)&&r!=null&&typeof r!="function"&&ia(n,r)}}function up(e,t,n,r,l,c){switch(n){case"style":gy(e,r,c);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"children":typeof r=="string"?Cl(e,r):(typeof r=="number"||typeof r=="bigint")&&Cl(e,""+r);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ie("scrollend",e));break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(_i.hasOwnProperty(n))r!=null&&typeof r!="function"&&ia(n,r);else e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),c=e[gn]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,l),typeof r=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,l);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):vs(e,n,r)}}}function on(e,t,n){switch(cp(t,n),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var r=!1,l=!1,c;for(c in n)if(n.hasOwnProperty(c)){var f=n[c];if(f!=null)switch(c){case"src":r=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,c,f,n,null)}}l&&ut(e,t,"srcSet",n.srcSet,n,null),r&&ut(e,t,"src",n.src,n,null);return;case"input":Hs("input",n),Ie("invalid",e);var h=c=f=l=null,y=null,v=null;for(r in n)if(n.hasOwnProperty(r)){var k=n[r];if(k!=null)switch(r){case"name":l=k;break;case"type":f=k;break;case"checked":y=k;break;case"defaultChecked":v=k;break;case"value":c=k;break;case"defaultValue":h=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ut(e,t,r,k,n,null)}}$s(e,n),oo(e,c,h,y,v,f,l,!1);return;case"select":Hs("select",n),Ie("invalid",e),r=f=c=null;for(l in n)if(n.hasOwnProperty(l)&&(h=n[l],h!=null))switch(l){case"value":c=h;break;case"defaultValue":f=h;break;case"multiple":r=h;default:ut(e,t,l,h,n,null)}Dl(e,n),t=c,n=f,e.multiple=!!r,t!=null?Ut(e,!!r,t,!1):n!=null&&Ut(e,!!r,n,!0);return;case"textarea":Hs("textarea",n),Ie("invalid",e),c=l=r=null;for(f in n)if(n.hasOwnProperty(f)&&(h=n[f],h!=null))switch(f){case"value":r=h;break;case"defaultValue":l=h;break;case"children":c=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:ut(e,t,f,h,n,null)}N(e,n),E(e,r,l,c);return;case"option":Al(e,n);for(y in n)if(n.hasOwnProperty(y)&&(r=n[y],r!=null))switch(y){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ut(e,t,y,r,n,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(r=0;r<Jc.length;r++)Ie(Jc[r],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(v in n)if(n.hasOwnProperty(v)&&(r=n[v],r!=null))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,v,r,n,null)}return;default:if(Tl(t)){for(k in n)n.hasOwnProperty(k)&&(r=n[k],r!==void 0&&up(e,t,k,r,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(r=n[h],r!=null&&ut(e,t,h,r,n,null))}function nA(e,t,n,r){switch(cp(t,r),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,c=null,f=null,h=null,y=null,v=null,k=null;for(P in n){var V=n[P];if(n.hasOwnProperty(P)&&V!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":y=V;default:r.hasOwnProperty(P)||ut(e,t,P,null,r,V)}}for(var O in r){var P=r[O];if(V=n[O],r.hasOwnProperty(O)&&(P!=null||V!=null))switch(O){case"type":c=P;break;case"name":l=P;break;case"checked":v=P;break;case"defaultChecked":k=P;break;case"value":f=P;break;case"defaultValue":h=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:P!==V&&ut(e,t,O,P,r,V)}}t=n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null,r=r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null,t||!r||fS||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),fS=!0),!t||r||uS||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),uS=!0),Is(e,f,h,y,v,k,c,l);return;case"select":P=f=h=O=null;for(c in n)if(y=n[c],n.hasOwnProperty(c)&&y!=null)switch(c){case"value":break;case"multiple":P=y;default:r.hasOwnProperty(c)||ut(e,t,c,null,r,y)}for(l in r)if(c=r[l],y=n[l],r.hasOwnProperty(l)&&(c!=null||y!=null))switch(l){case"value":O=c;break;case"defaultValue":h=c;break;case"multiple":f=c;default:c!==y&&ut(e,t,l,c,r,y)}r=h,t=f,n=P,O!=null?Ut(e,!!t,O,!1):!!n!=!!t&&(r!=null?Ut(e,!!t,r,!0):Ut(e,!!t,t?[]:"",!1));return;case"textarea":P=O=null;for(h in n)if(l=n[h],n.hasOwnProperty(h)&&l!=null&&!r.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:ut(e,t,h,null,r,l)}for(f in r)if(l=r[f],c=n[f],r.hasOwnProperty(f)&&(l!=null||c!=null))switch(f){case"value":O=l;break;case"defaultValue":P=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:l!==c&&ut(e,t,f,l,r,c)}A(e,O,P);return;case"option":for(var ce in n)if(O=n[ce],n.hasOwnProperty(ce)&&O!=null&&!r.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:ut(e,t,ce,null,r,O)}for(y in r)if(O=r[y],P=n[y],r.hasOwnProperty(y)&&O!==P&&(O!=null||P!=null))switch(y){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:ut(e,t,y,O,r,P)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in n)O=n[me],n.hasOwnProperty(me)&&O!=null&&!r.hasOwnProperty(me)&&ut(e,t,me,null,r,O);for(v in r)if(O=r[v],P=n[v],r.hasOwnProperty(v)&&O!==P&&(O!=null||P!=null))switch(v){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ut(e,t,v,O,r,P)}return;default:if(Tl(t)){for(var mt in n)O=n[mt],n.hasOwnProperty(mt)&&O!==void 0&&!r.hasOwnProperty(mt)&&up(e,t,mt,void 0,r,O);for(k in r)O=r[k],P=n[k],!r.hasOwnProperty(k)||O===P||O===void 0&&P===void 0||up(e,t,k,O,r,P);return}}for(var Ye in n)O=n[Ye],n.hasOwnProperty(Ye)&&O!=null&&!r.hasOwnProperty(Ye)&&ut(e,t,Ye,null,r,O);for(V in r)O=r[V],P=n[V],!r.hasOwnProperty(V)||O===P||O==null&&P==null||ut(e,t,V,O,r,P)}function m1(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function fp(e){var t={};e=e.style;for(var n=0;n<e.length;n++){var r=e[n];t[r]=e.getPropertyValue(r)}return t}function p1(e,t,n){if(t!=null&&typeof t!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var r,l=r="",c;for(c in t)if(t.hasOwnProperty(c)){var f=t[c];f!=null&&typeof f!="boolean"&&f!==""&&(c.indexOf("--")===0?(to(f,c),r+=l+c+":"+(""+f).trim()):typeof f!="number"||f===0||_x.has(c)?(to(f,c),r+=l+c.replace(xx,"-$1").toLowerCase().replace(Nx,"-ms-")+":"+(""+f).trim()):r+=l+c.replace(xx,"-$1").toLowerCase().replace(Nx,"-ms-")+":"+f+"px",l=";")}r=r||null,t=e.getAttribute("style"),t!==r&&(r=Nr(r),Nr(t)!==r&&(n.style=fp(e)))}}function ns(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(st(r,t),e===""+r)return}Zt(t,e,r,c)}function b1(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null){switch(typeof r){case"function":case"symbol":return}if(!r)return}else switch(typeof r){case"function":case"symbol":break;default:if(r)return}Zt(t,e,r,c)}function dp(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":return}else if(r!=null)switch(typeof r){case"function":case"symbol":break;default:if(st(r,n),e===""+r)return}Zt(t,e,r,c)}function y1(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(r))return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(!isNaN(r)&&(st(r,t),e===""+r))return}Zt(t,e,r,c)}function hp(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(st(r,t),n=Ol(""+r),e===n)return}Zt(t,e,r,c)}function g1(e,t,n,r){for(var l={},c=new Set,f=e.attributes,h=0;h<f.length;h++)switch(f[h].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:c.add(f[h].name)}if(Tl(t)){for(var y in n)if(n.hasOwnProperty(y)){var v=n[y];if(v!=null){if(_i.hasOwnProperty(y))typeof v!="function"&&ia(y,v);else if(n.suppressHydrationWarning!==!0)switch(y){case"children":typeof v!="string"&&typeof v!="number"||Zt("children",e.textContent,v,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,v=v?v.__html:void 0,v!=null&&(v=d1(e,v),Zt(y,f,v,l));continue;case"style":c.delete(y),p1(e,v,l);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":c.delete(y.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",y);continue;case"className":c.delete("class"),f=lr(e,"class",v),Zt("className",f,v,l);continue;default:r.context===Ka&&t!=="svg"&&t!=="math"?c.delete(y.toLowerCase()):c.delete(y),f=lr(e,y,v),Zt(y,f,v,l)}}}}else for(v in n)if(n.hasOwnProperty(v)&&(y=n[v],y!=null)){if(_i.hasOwnProperty(v))typeof y!="function"&&ia(v,y);else if(n.suppressHydrationWarning!==!0)switch(v){case"children":typeof y!="string"&&typeof y!="number"||Zt("children",e.textContent,y,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,y=y?y.__html:void 0,y!=null&&(y=d1(e,y),f!==y&&(l[v]={__html:f}));continue;case"className":ns(e,v,"class",y,c,l);continue;case"tabIndex":ns(e,v,"tabindex",y,c,l);continue;case"style":c.delete(v),p1(e,y,l);continue;case"multiple":c.delete(v),Zt(v,e.multiple,y,l);continue;case"muted":c.delete(v),Zt(v,e.muted,y,l);continue;case"autoFocus":c.delete("autofocus"),Zt(v,e.autofocus,y,l);continue;case"data":if(t!=="object"){c.delete(v),f=e.getAttribute("data"),Zt(v,f,y,l);continue}case"src":case"href":if(!(y!==""||t==="a"&&v==="href"||t==="object"&&v==="data")){console.error(v==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',v,v);continue}hp(e,v,v,y,c,l);continue;case"action":case"formAction":if(f=e.getAttribute(v),typeof y=="function"){c.delete(v.toLowerCase()),v==="formAction"?(c.delete("name"),c.delete("formenctype"),c.delete("formmethod"),c.delete("formtarget")):(c.delete("enctype"),c.delete("method"),c.delete("target"));continue}else if(f===yC){c.delete(v.toLowerCase()),Zt(v,"function",y,l);continue}hp(e,v,v.toLowerCase(),y,c,l);continue;case"xlinkHref":hp(e,v,"xlink:href",y,c,l);continue;case"contentEditable":dp(e,v,"contenteditable",y,c,l);continue;case"spellCheck":dp(e,v,"spellcheck",y,c,l);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":dp(e,v,v,y,c,l);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":b1(e,v,v.toLowerCase(),y,c,l);continue;case"capture":case"download":e:{h=e;var k=f=v,V=l;if(c.delete(k),h=h.getAttribute(k),h===null)switch(typeof y){case"undefined":case"function":case"symbol":break e;default:if(y===!1)break e}else if(y!=null)switch(typeof y){case"function":case"symbol":break;case"boolean":if(y===!0&&h==="")break e;break;default:if(st(y,f),h===""+y)break e}Zt(f,h,y,V)}continue;case"cols":case"rows":case"size":case"span":e:{if(h=e,k=f=v,V=l,c.delete(k),h=h.getAttribute(k),h===null)switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(y)||1>y)break e}else if(y!=null)switch(typeof y){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(y)||1>y)&&(st(y,f),h===""+y))break e}Zt(f,h,y,V)}continue;case"rowSpan":y1(e,v,"rowspan",y,c,l);continue;case"start":y1(e,v,v,y,c,l);continue;case"xHeight":ns(e,v,"x-height",y,c,l);continue;case"xlinkActuate":ns(e,v,"xlink:actuate",y,c,l);continue;case"xlinkArcrole":ns(e,v,"xlink:arcrole",y,c,l);continue;case"xlinkRole":ns(e,v,"xlink:role",y,c,l);continue;case"xlinkShow":ns(e,v,"xlink:show",y,c,l);continue;case"xlinkTitle":ns(e,v,"xlink:title",y,c,l);continue;case"xlinkType":ns(e,v,"xlink:type",y,c,l);continue;case"xmlBase":ns(e,v,"xml:base",y,c,l);continue;case"xmlLang":ns(e,v,"xml:lang",y,c,l);continue;case"xmlSpace":ns(e,v,"xml:space",y,c,l);continue;case"inert":y!==""||Od[v]||(Od[v]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",v)),b1(e,v,v,y,c,l);continue;default:if(!(2<v.length)||v[0]!=="o"&&v[0]!=="O"||v[1]!=="n"&&v[1]!=="N"){h=vy(v),f=!1,r.context===Ka&&t!=="svg"&&t!=="math"?c.delete(h.toLowerCase()):(k=v.toLowerCase(),k=Pf.hasOwnProperty(k)&&Pf[k]||null,k!==null&&k!==v&&(f=!0,c.delete(k)),c.delete(h));e:if(k=e,V=h,h=y,or(V))if(k.hasAttribute(V))k=k.getAttribute(V),st(h,V),h=k===""+h?h:k;else{switch(typeof h){case"function":case"symbol":break e;case"boolean":if(k=V.toLowerCase().slice(0,5),k!=="data-"&&k!=="aria-")break e}h=h===void 0?void 0:null}else h=void 0;f||Zt(v,h,y,l)}}}return 0<c.size&&n.suppressHydrationWarning!==!0&&tA(e,c,l),Object.keys(l).length===0?null:l}function sA(e,t){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+t+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+t+" "+e[e.length-1]}}function v1(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aA(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var l=n[r],c=l.transferSize,f=l.initiatorType,h=l.duration;if(c&&h&&v1(f)){for(f=0,h=l.responseEnd,r+=1;r<n.length;r++){var y=n[r],v=y.startTime;if(v>h)break;var k=y.transferSize,V=y.initiatorType;k&&v1(V)&&(y=y.responseEnd,f+=k*(y<h?1:(h-v)/(y-v)))}if(--r,t+=8*(c+f)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}function Ef(e){return e.nodeType===9?e:e.ownerDocument}function x1(e){switch(e){case To:return rl;case Hf:return jd;default:return Ka}}function N1(e,t){if(e===Ka)switch(t){case"svg":return rl;case"math":return jd;default:return Ka}return e===rl&&t==="foreignObject"?Ka:e}function mp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function rA(){var e=window.event;return e&&e.type==="popstate"?e===Zb?!1:(Zb=e,!0):(Zb=null,!1)}function ec(){var e=window.event;return e&&e!==Xc?e.type:null}function tc(){var e=window.event;return e&&e!==Xc?e.timeStamp:-1.1}function iA(e){setTimeout(function(){throw e})}function oA(e,t,n){switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&e.focus();break;case"img":n.src?e.src=n.src:n.srcSet&&(e.srcset=n.srcSet)}}function lA(){}function cA(e,t,n,r){nA(e,t,n,r),e[gn]=r}function S1(e){Cl(e,"")}function uA(e,t,n){e.nodeValue=n}function w1(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[gn]||null;if(t!==null){var n=Un(e);n!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Sr(e){return e==="head"}function fA(e,t){e.removeChild(t)}function dA(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function E1(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n===Qc||n===Rd){if(r===0){e.removeChild(l),wo(t);return}r--}else if(n===Gc||n===Fr||n===Fi||n===al||n===Ii)r++;else if(n===vC)nc(e.ownerDocument.documentElement);else if(n===NC){n=e.ownerDocument.head,nc(n);for(var c=n.firstChild;c;){var f=c.nextSibling,h=c.nodeName;c[cc]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=f}}else n===xC&&nc(e.ownerDocument.body);n=l}while(n);wo(t)}function _1(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n===Qc){if(e===0)break;e--}else n!==Gc&&n!==Fr&&n!==Fi&&n!==al||e++;n=r}while(n)}function hA(e){_1(e,!0)}function mA(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function pA(e){e.nodeValue=""}function bA(e){_1(e,!1)}function yA(e,t){t=t[SC],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function gA(e,t){e.nodeValue=t}function pp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":pp(n),ir(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function vA(e,t,n,r){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[cc])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){st(l.name,"name");var c=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Pn(e.nextSibling),e===null)break}return null}function xA(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pn(e.nextSibling),e===null))return null;return e}function A1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pn(e.nextSibling),e===null))return null;return e}function bp(e){return e.data===Fr||e.data===Fi}function yp(e){return e.data===al||e.data===Fr&&e.ownerDocument.readyState!==pS}function NA(e,t){var n=e.ownerDocument;if(e.data===Fi)e._reactRetry=t;else if(e.data!==Fr||n.readyState!==pS)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===Gc||t===al||t===Fr||t===Fi||t===Ii||t===Gb||t===mS)break;if(t===Qc||t===Rd)return null}}return e}function D1(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),n={},r=e.attributes,l=0;l<r.length;l++){var c=r[l];n[m1(c.name)]=c.name.toLowerCase()==="style"?fp(e):c.value}return{type:t,props:n}}return e.nodeType===8?e.data===Ii?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function C1(e,t,n){return n===null||n[gC]!==!0?(e.nodeValue===t?e=null:(t=Nr(t),e=Nr(e.nodeValue)===t?null:e.nodeValue),e):null}function gp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===Qc||n===Rd){if(t===0)return Pn(e.nextSibling);t--}else n!==Gc&&n!==al&&n!==Fr&&n!==Fi&&n!==Ii||t++}e=e.nextSibling}return null}function T1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===Gc||n===al||n===Fr||n===Fi||n===Ii){if(t===0)return e;t--}else n!==Qc&&n!==Rd||t++}e=e.previousSibling}return null}function SA(e){wo(e)}function wA(e){wo(e)}function EA(e){wo(e)}function O1(e,t,n,r,l){switch(l&&Ch(e,r.ancestorInfo),t=Ef(n),e){case"html":if(e=t.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=t.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=t.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function _A(e,t,n,r){if(!n[Ar]&&Un(n)){var l=n.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",l,l,l)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(l=n.attributes;l.length;)n.removeAttributeNode(l[0]);on(n,e,t),n[ln]=r,n[gn]=t}function nc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ir(e)}function _f(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function R1(e,t,n){var r=il;if(r&&typeof t=="string"&&t){var l=Ct(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),NS.has(l)||(NS.add(l),e={rel:e,crossOrigin:n,href:t},r.querySelector(l)===null&&(t=r.createElement("link"),on(t,"link",e),jt(t),r.head.appendChild(t)))}}function j1(e,t,n,r){var l=(l=Er.current)?_f(l):null;if(!l)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=No(n.href),t=qs(l).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=No(n.href);var c=qs(l).hoistableStyles,f=c.get(e);if(!f&&(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:Ji,preload:null}},c.set(e,f),(c=l.querySelector(sc(e)))&&!c._p&&(f.instance=c,f.state.loading=Zc|ms),!ps.has(e))){var h={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy};ps.set(e,h),c||AA(l,e,h,f.state)}if(t&&r===null)throw n=`
|
|
191
191
|
|
|
192
192
|
- `+Af(t)+`
|
|
193
193
|
+ `+Af(n),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return f}if(t&&r!==null)throw n=`
|
|
194
194
|
|
|
195
195
|
- `+Af(t)+`
|
|
196
|
-
+ `+Af(n),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=So(n),t=qs(l).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Af(e){var t=0,n="<link";return typeof e.rel=="string"?(t++,n+=' rel="'+e.rel+'"'):Es.call(e,"rel")&&(t++,n+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,n+=' href="'+e.href+'"'):Es.call(e,"href")&&(t++,n+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,n+=' precedence="'+e.precedence+'"'):Es.call(e,"precedence")&&(t++,n+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(n+=" ..."),n+" />"}function No(e){return'href="'+Ct(e)+'"'}function sc(e){return'link[rel="stylesheet"]['+e+"]"}function M1(e){return Pe({},e,{"data-precedence":e.precedence,precedence:null})}function AA(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=Zc:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=Zc}),t.addEventListener("error",function(){return r.loading|=vS}),on(t,"link",n),jt(t),e.head.appendChild(t))}function So(e){return'[src="'+Ct(e)+'"]'}function ac(e){return"script[async]"+e}function k1(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Ct(n.href)+'"]');if(r)return t.instance=r,jt(r),r;var l=Pe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),jt(r),on(r,"style",l),Df(r,n.precedence,e),t.instance=r;case"stylesheet":l=No(n.href);var c=e.querySelector(sc(l));if(c)return t.state.loading|=ms,t.instance=c,jt(c),c;r=M1(n),(l=ps.get(l))&&gp(r,l),c=(e.ownerDocument||e).createElement("link"),jt(c);var f=c;return f._p=new Promise(function(h,y){f.onload=h,f.onerror=y}),on(c,"link",r),t.state.loading|=ms,Df(c,n.precedence,e),t.instance=c;case"script":return c=So(n.src),(l=e.querySelector(ac(c)))?(t.instance=l,jt(l),l):(r=n,(l=ps.get(c))&&(r=Pe({},n),vp(r,l)),e=e.ownerDocument||e,l=e.createElement("script"),jt(l),on(l,"link",r),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+t.type+'". this is a bug in React.')}else t.type==="stylesheet"&&(t.state.loading&ms)===Ji&&(r=t.instance,t.state.loading|=ms,Df(r,n.precedence,e));return t.instance}function Df(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,c=l,f=0;f<r.length;f++){var h=r[f];if(h.dataset.precedence===t)c=h;else if(c!==l)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function gp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function vp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function V1(e,t,n){if(Md===null){var r=new Map,l=Md=new Map;l.set(n,r)}else l=Md,r=l.get(n),r||(r=new Map,l.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var c=n[l];if(!(c[cc]||c[ln]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!==To){var f=c.getAttribute(t)||"";f=e+f;var h=r.get(f);h?h.push(c):r.set(f,[c])}}return r}function U1(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function DA(e,t,n){var r=!n.ancestorInfo.containerTagInScope;if(n.context===rl||t.itemProp!=null)return!r||t.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href===""){r&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError){if(t.rel==="stylesheet"&&typeof t.precedence=="string"){e=t.href;var l=t.onError,c=t.disabled;n=[],t.onLoad&&n.push("`onLoad`"),l&&n.push("`onError`"),c!=null&&n.push("`disabled`"),l=sA(n,"and"),l+=n.length===1?" prop":" props",c=n.length===1?"an "+l:"the "+l,n.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,c,l)}r&&(typeof t.rel!="string"||typeof t.href!="string"||t.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(t.rel){case"stylesheet":return e=t.precedence,t=t.disabled,typeof e!="string"&&r&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&t==null;default:return!0}case"script":if(e=t.async&&typeof t.async!="function"&&typeof t.async!="symbol",!e||t.onLoad||t.onError||!t.src||typeof t.src!="string"){r&&(e?t.onLoad||t.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":r&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function z1(e){return!(e.type==="stylesheet"&&(e.state.loading&xS)===Ji)}function CA(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&ms)===Ji){if(n.instance===null){var l=No(r.href),c=t.querySelector(sc(l));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cf.bind(e),t.then(e,e)),n.state.loading|=ms,n.instance=c,jt(c);return}c=t.ownerDocument||t,r=M1(r),(l=ps.get(l))&&gp(r,l),c=c.createElement("link"),jt(c);var f=c;f._p=new Promise(function(h,y){f.onload=h,f.onerror=y}),on(c,"link",r),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&xS)===Ji&&(e.count++,n=Cf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}function TA(e,t){return e.stylesheets&&e.count===0&&Tf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Tf(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},_C+t);0<e.imgBytes&&Kb===0&&(Kb=125*aA()*DC);var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tf(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Kb?50:AC)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(l)}}:null}function Cf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Tf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kd=new Map,t.forEach(OA,e),kd=null,Cf.call(e))}function OA(e,t){if(!(t.state.loading&ms)){var n=kd.get(e);if(n)var r=n.get(Wb);else{n=new Map,kd.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<l.length;c++){var f=l[c];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),r=f)}r&&n.set(Wb,r)}l=t.instance,f=l.getAttribute("data-precedence"),c=n.get(f)||r,c===r&&n.set(Wb,l),n.set(f,l),this.count++,r=Cf.bind(this),l.addEventListener("load",r),l.addEventListener("error",r),c?c.parentNode.insertBefore(l,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=ms}}function RA(e,t,n,r,l,c,f,h,y){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Fi,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.hiddenUpdates=Sl(null),this.identifierPrefix=r,this.onUncaughtError=l,this.onCaughtError=c,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=n?"hydrateRoot()":"createRoot()"}function B1(e,t,n,r,l,c,f,h,y,v,k,V){return e=new RA(e,t,n,f,y,v,k,V,h),t=ZD,c===!0&&(t|=mn|_s),t|=Ve,c=D(3,null,null,t),e.current=c,c.stateNode=e,t=Jh(),gi(t),e.pooledCache=t,gi(t),c.memoizedState={element:r,isDehydrated:n,cache:t},Kh(c),e}function q1(e){return e?(e=Or,e):Or}function xp(e,t,n,r,l,c){if(hn&&typeof hn.onScheduleFiberRoot=="function")try{hn.onScheduleFiberRoot(Do,r,n)}catch(f){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",f))}l=q1(l),r.context===null?r.context=l:r.pendingContext=l,ca&&In!==null&&!_S&&(_S=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
196
|
+
+ `+Af(n),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=So(n),t=qs(l).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Af(e){var t=0,n="<link";return typeof e.rel=="string"?(t++,n+=' rel="'+e.rel+'"'):Es.call(e,"rel")&&(t++,n+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,n+=' href="'+e.href+'"'):Es.call(e,"href")&&(t++,n+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,n+=' precedence="'+e.precedence+'"'):Es.call(e,"precedence")&&(t++,n+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(n+=" ..."),n+" />"}function No(e){return'href="'+Ct(e)+'"'}function sc(e){return'link[rel="stylesheet"]['+e+"]"}function M1(e){return Pe({},e,{"data-precedence":e.precedence,precedence:null})}function AA(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=Zc:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=Zc}),t.addEventListener("error",function(){return r.loading|=vS}),on(t,"link",n),jt(t),e.head.appendChild(t))}function So(e){return'[src="'+Ct(e)+'"]'}function ac(e){return"script[async]"+e}function k1(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Ct(n.href)+'"]');if(r)return t.instance=r,jt(r),r;var l=Pe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),jt(r),on(r,"style",l),Df(r,n.precedence,e),t.instance=r;case"stylesheet":l=No(n.href);var c=e.querySelector(sc(l));if(c)return t.state.loading|=ms,t.instance=c,jt(c),c;r=M1(n),(l=ps.get(l))&&vp(r,l),c=(e.ownerDocument||e).createElement("link"),jt(c);var f=c;return f._p=new Promise(function(h,y){f.onload=h,f.onerror=y}),on(c,"link",r),t.state.loading|=ms,Df(c,n.precedence,e),t.instance=c;case"script":return c=So(n.src),(l=e.querySelector(ac(c)))?(t.instance=l,jt(l),l):(r=n,(l=ps.get(c))&&(r=Pe({},n),xp(r,l)),e=e.ownerDocument||e,l=e.createElement("script"),jt(l),on(l,"link",r),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+t.type+'". this is a bug in React.')}else t.type==="stylesheet"&&(t.state.loading&ms)===Ji&&(r=t.instance,t.state.loading|=ms,Df(r,n.precedence,e));return t.instance}function Df(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,c=l,f=0;f<r.length;f++){var h=r[f];if(h.dataset.precedence===t)c=h;else if(c!==l)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function vp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function V1(e,t,n){if(Md===null){var r=new Map,l=Md=new Map;l.set(n,r)}else l=Md,r=l.get(n),r||(r=new Map,l.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var c=n[l];if(!(c[cc]||c[ln]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!==To){var f=c.getAttribute(t)||"";f=e+f;var h=r.get(f);h?h.push(c):r.set(f,[c])}}return r}function U1(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function DA(e,t,n){var r=!n.ancestorInfo.containerTagInScope;if(n.context===rl||t.itemProp!=null)return!r||t.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href===""){r&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError){if(t.rel==="stylesheet"&&typeof t.precedence=="string"){e=t.href;var l=t.onError,c=t.disabled;n=[],t.onLoad&&n.push("`onLoad`"),l&&n.push("`onError`"),c!=null&&n.push("`disabled`"),l=sA(n,"and"),l+=n.length===1?" prop":" props",c=n.length===1?"an "+l:"the "+l,n.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,c,l)}r&&(typeof t.rel!="string"||typeof t.href!="string"||t.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(t.rel){case"stylesheet":return e=t.precedence,t=t.disabled,typeof e!="string"&&r&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&t==null;default:return!0}case"script":if(e=t.async&&typeof t.async!="function"&&typeof t.async!="symbol",!e||t.onLoad||t.onError||!t.src||typeof t.src!="string"){r&&(e?t.onLoad||t.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":r&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function z1(e){return!(e.type==="stylesheet"&&(e.state.loading&xS)===Ji)}function CA(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&ms)===Ji){if(n.instance===null){var l=No(r.href),c=t.querySelector(sc(l));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cf.bind(e),t.then(e,e)),n.state.loading|=ms,n.instance=c,jt(c);return}c=t.ownerDocument||t,r=M1(r),(l=ps.get(l))&&vp(r,l),c=c.createElement("link"),jt(c);var f=c;f._p=new Promise(function(h,y){f.onload=h,f.onerror=y}),on(c,"link",r),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&xS)===Ji&&(e.count++,n=Cf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}function TA(e,t){return e.stylesheets&&e.count===0&&Tf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Tf(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},_C+t);0<e.imgBytes&&Wb===0&&(Wb=125*aA()*DC);var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tf(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Wb?50:AC)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(l)}}:null}function Cf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Tf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kd=new Map,t.forEach(OA,e),kd=null,Cf.call(e))}function OA(e,t){if(!(t.state.loading&ms)){var n=kd.get(e);if(n)var r=n.get(e0);else{n=new Map,kd.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<l.length;c++){var f=l[c];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),r=f)}r&&n.set(e0,r)}l=t.instance,f=l.getAttribute("data-precedence"),c=n.get(f)||r,c===r&&n.set(e0,l),n.set(f,l),this.count++,r=Cf.bind(this),l.addEventListener("load",r),l.addEventListener("error",r),c?c.parentNode.insertBefore(l,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=ms}}function RA(e,t,n,r,l,c,f,h,y){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Yi,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.hiddenUpdates=Sl(null),this.identifierPrefix=r,this.onUncaughtError=l,this.onCaughtError=c,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=n?"hydrateRoot()":"createRoot()"}function B1(e,t,n,r,l,c,f,h,y,v,k,V){return e=new RA(e,t,n,f,y,v,k,V,h),t=ZD,c===!0&&(t|=mn|_s),t|=Ve,c=D(3,null,null,t),e.current=c,c.stateNode=e,t=Gh(),gi(t),e.pooledCache=t,gi(t),c.memoizedState={element:r,isDehydrated:n,cache:t},Wh(c),e}function q1(e){return e?(e=Or,e):Or}function Np(e,t,n,r,l,c){if(hn&&typeof hn.onScheduleFiberRoot=="function")try{hn.onScheduleFiberRoot(Do,r,n)}catch(f){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",f))}l=q1(l),r.context===null?r.context=l:r.pendingContext=l,ca&&In!==null&&!_S&&(_S=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
197
197
|
|
|
198
|
-
Check the render method of %s.`,H(In)||"Unknown")),r=pr(t),r.payload={element:n},c=c===void 0?null:c,c!==null&&(typeof c!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",c),r.callback=c),n=br(e,r,t),n!==null&&(Gs(t,"root.render()",null),At(n,e,t),Bl(n,e,t))}function L1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Np(e,t){L1(e,t),(e=e.alternate)&&L1(e,t)}function H1(e){if(e.tag===13||e.tag===31){var t=dn(e,67108864);t!==null&&At(t,e,67108864),Np(e,67108864)}}function P1(e){if(e.tag===13||e.tag===31){var t=Hn(e);t=El(t);var n=dn(e,t);n!==null&&At(n,e,t),Np(e,t)}}function jA(){return In}function MA(e,t,n,r){var l=Y.T;Y.T=null;var c=at.p;try{at.p=ss,Sp(e,t,n,r)}finally{at.p=c,Y.T=l}}function kA(e,t,n,r){var l=Y.T;Y.T=null;var c=at.p;try{at.p=da,Sp(e,t,n,r)}finally{at.p=c,Y.T=l}}function Sp(e,t,n,r){if(Ud){var l=wp(r);if(l===null)op(e,t,r,zd,n),I1(e,r);else if(VA(l,e,t,n,r))r.stopPropagation();else if(I1(e,r),t&4&&-1<TC.indexOf(e)){for(;l!==null;){var c=Un(l);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var f=Us(c.pendingLanes);if(f!==0){var h=c;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var y=1<<31-yn(f);h.entanglements[1]|=y,f&=~y}ra(c),(Xe&(Qt|Gn))===tn&&(vd=Kt()+WN,Kl(0))}}break;case 31:case 13:h=dn(c,2),h!==null&&At(h,c,2),go(),Np(c,2)}if(c=wp(r),c===null&&op(e,t,r,zd,n),c===l)break;l=c}l!==null&&r.stopPropagation()}else op(e,t,r,null,n)}}function wp(e){return e=Ch(e),Ep(e)}function Ep(e){if(zd=null,e=Bs(e),e!==null){var t=ee(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=te(t),e!==null)return e;e=null}else if(n===31){if(e=we(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zd=e,null}function $1(e){switch(e){case"beforetoggle":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"toggle":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 ss;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return da;case"message":switch(YA()){case Bp:return ss;case qp:return da;case Ao:case FA:return Ba;case Lp:return qf;default:return Ba}default:return Ba}}function I1(e,t){switch(e){case"focusin":case"focusout":Fr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Gr=null;break;case"pointerover":case"pointerout":Wc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(t.pointerId)}}function rc(e,t,n,r,l,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:c,targetContainers:[l]},t!==null&&(t=Un(t),t!==null&&H1(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function VA(e,t,n,r,l){switch(t){case"focusin":return Fr=rc(Fr,e,t,n,r,l),!0;case"dragenter":return Jr=rc(Jr,e,t,n,r,l),!0;case"mouseover":return Gr=rc(Gr,e,t,n,r,l),!0;case"pointerover":var c=l.pointerId;return Wc.set(c,rc(Wc.get(c)||null,e,t,n,r,l)),!0;case"gotpointercapture":return c=l.pointerId,eu.set(c,rc(eu.get(c)||null,e,t,n,r,l)),!0}return!1}function Y1(e){var t=Bs(e.target);if(t!==null){var n=ee(t);if(n!==null){if(t=n.tag,t===13){if(t=te(n),t!==null){e.blockedOn=t,ao(e.priority,function(){P1(n)});return}}else if(t===31){if(t=we(n),t!==null){e.blockedOn=t,ao(e.priority,function(){P1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Of(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n),l=r;uc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),uc=l,n.target.dispatchEvent(r),uc===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),uc=null}else return t=Un(n),t!==null&&H1(t),e.blockedOn=n,!1;t.shift()}return!0}function F1(e,t,n){Of(e)&&n.delete(t)}function UA(){e0=!1,Fr!==null&&Of(Fr)&&(Fr=null),Jr!==null&&Of(Jr)&&(Jr=null),Gr!==null&&Of(Gr)&&(Gr=null),Wc.forEach(F1),eu.forEach(F1)}function Rf(e,t){e.blockedOn===t&&(e.blockedOn=null,e0||(e0=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,UA)))}function J1(e){Bd!==e&&(Bd=e,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,function(){Bd===e&&(Bd=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],l=e[t+2];if(typeof r!="function"){if(Ep(r||n)===null)continue;break}var c=Un(n);c!==null&&(e.splice(t,3),t-=3,n={pending:!0,data:l,method:n.method,action:r},Object.freeze(n),Em(c,n,r,l))}}))}function wo(e){function t(y){return Rf(y,e)}Fr!==null&&Rf(Fr,e),Jr!==null&&Rf(Jr,e),Gr!==null&&Rf(Gr,e),Wc.forEach(t),eu.forEach(t);for(var n=0;n<Qr.length;n++){var r=Qr[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)Y1(n),n.blockedOn===null&&Qr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var l=n[r],c=n[r+1],f=l[gn]||null;if(typeof c=="function")f||J1(n);else if(f){var h=null;if(c&&c.hasAttribute("formAction")){if(l=c,f=c[gn]||null)h=f.formAction;else if(Ep(l)!==null)continue}else h=f.action;typeof h=="function"?n[r+1]=h:(n.splice(r,3),r-=3),J1(n)}}}function G1(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(f){return l=f})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function _p(e){this._internalRoot=e}function jf(e){this._internalRoot=e}function Q1(e){e[Ar]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var zt=uT(),Ap=Jw(),zA=UC(),Pe=Object.assign,BA=Symbol.for("react.element"),oa=Symbol.for("react.transitional.element"),Eo=Symbol.for("react.portal"),_o=Symbol.for("react.fragment"),Mf=Symbol.for("react.strict_mode"),Dp=Symbol.for("react.profiler"),Cp=Symbol.for("react.consumer"),la=Symbol.for("react.context"),ic=Symbol.for("react.forward_ref"),Tp=Symbol.for("react.suspense"),Op=Symbol.for("react.suspense_list"),kf=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),Rp=Symbol.for("react.activity"),qA=Symbol.for("react.memo_cache_sentinel"),X1=Symbol.iterator,LA=Symbol.for("react.client.reference"),Jt=Array.isArray,Y=Ap.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at=zA.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,HA=Object.freeze({pending:!1,data:null,method:null,action:null}),jp=[],Mp=[],za=-1,wr=le(null),oc=le(null),Er=le(null),Vf=le(null),lc=0,Z1,K1,W1,ex,tx,nx,sx;Te.__reactDisabledLog=!0;var kp,ax,Vp=!1,Up=new(typeof WeakMap=="function"?WeakMap:Map),In=null,ca=!1,Es=Object.prototype.hasOwnProperty,zp=zt.unstable_scheduleCallback,PA=zt.unstable_cancelCallback,$A=zt.unstable_shouldYield,IA=zt.unstable_requestPaint,Kt=zt.unstable_now,YA=zt.unstable_getCurrentPriorityLevel,Bp=zt.unstable_ImmediatePriority,qp=zt.unstable_UserBlockingPriority,Ao=zt.unstable_NormalPriority,FA=zt.unstable_LowPriority,Lp=zt.unstable_IdlePriority,JA=zt.log,GA=zt.unstable_setDisableYieldValue,Do=null,hn=null,ua=!1,fa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",yn=Math.clz32?Math.clz32:oi,QA=Math.log,XA=Math.LN2,Uf=256,zf=262144,Bf=4194304,ss=2,da=8,Ba=32,qf=268435456,_r=Math.random().toString(36).slice(2),ln="__reactFiber$"+_r,gn="__reactProps$"+_r,Ar="__reactContainer$"+_r,Hp="__reactEvents$"+_r,ZA="__reactListeners$"+_r,KA="__reactHandles$"+_r,rx="__reactResources$"+_r,cc="__reactMarker$"+_r,ix=new Set,_i={},Pp={},WA={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},eD=RegExp("^[: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]*$"),ox={},lx={},tD=/[\n"\\]/g,cx=!1,ux=!1,fx=!1,dx=!1,hx=!1,mx=!1,px=["value","defaultValue"],bx=!1,yx=/["'&<>\n\t]|^\s|\s$/,nD="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),gx="applet caption html table td th marquee object template foreignObject desc title".split(" "),sD=gx.concat(["button"]),aD="dd dt li option optgroup p rp rt".split(" "),vx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Lf={},$p={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},xx=/([A-Z])/g,Nx=/^ms-/,rD=/^(?:webkit|moz|o)[A-Z]/,iD=/^-ms-/,oD=/-(.)/g,Sx=/;\s*$/,Co={},Ip={},wx=!1,Ex=!1,_x=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Hf="http://www.w3.org/1998/Math/MathML",To="http://www.w3.org/2000/svg",lD=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pf={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Ax={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},Oo={},cD=RegExp("^(aria)-[: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]*$"),uD=RegExp("^(aria)[A-Z][: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]*$"),Dx=!1,vn={},Cx=/^on./,fD=/^on[^A-Z]/,dD=RegExp("^(aria)-[: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]*$"),hD=RegExp("^(aria)[A-Z][: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]*$"),mD=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,uc=null,Ro=null,jo=null,Yp=!1,ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fp=!1;if(ha)try{var fc={};Object.defineProperty(fc,"passive",{get:function(){Fp=!0}}),window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch{Fp=!1}var Dr=null,Jp=null,$f=null,Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=Tn(Ai),dc=Pe({},Ai,{view:0,detail:0}),pD=Tn(dc),Gp,Qp,hc,Yf=Pe({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Th,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!==hc&&(hc&&e.type==="mousemove"?(Gp=e.screenX-hc.screenX,Qp=e.screenY-hc.screenY):Qp=Gp=0,hc=e),Gp)},movementY:function(e){return"movementY"in e?e.movementY:Qp}}),Tx=Tn(Yf),bD=Pe({},Yf,{dataTransfer:0}),yD=Tn(bD),gD=Pe({},dc,{relatedTarget:0}),Xp=Tn(gD),vD=Pe({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),xD=Tn(vD),ND=Pe({},Ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),SD=Tn(ND),wD=Pe({},Ai,{data:0}),Ox=Tn(wD),ED=Ox,_D={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AD={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"},DD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},CD=Pe({},dc,{key:function(e){if(e.key){var t=_D[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?AD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Th,charCode:function(e){return e.type==="keypress"?Tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TD=Tn(CD),OD=Pe({},Yf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rx=Tn(OD),RD=Pe({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Th}),jD=Tn(RD),MD=Pe({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),kD=Tn(MD),VD=Pe({},Yf,{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}),UD=Tn(VD),zD=Pe({},Ai,{newState:0,oldState:0}),BD=Tn(zD),qD=[9,13,27,32],jx=229,Zp=ha&&"CompositionEvent"in window,mc=null;ha&&"documentMode"in document&&(mc=document.documentMode);var LD=ha&&"TextEvent"in window&&!mc,Mx=ha&&(!Zp||mc&&8<mc&&11>=mc),kx=32,Vx=String.fromCharCode(kx),Ux=!1,Mo=!1,HD={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},pc=null,bc=null,zx=!1;ha&&(zx=o_("input")&&(!document.documentMode||9<document.documentMode));var xn=typeof Object.is=="function"?Object.is:h_,PD=ha&&"documentMode"in document&&11>=document.documentMode,ko=null,Kp=null,yc=null,Wp=!1,Vo={animationend:fi("Animation","AnimationEnd"),animationiteration:fi("Animation","AnimationIteration"),animationstart:fi("Animation","AnimationStart"),transitionrun:fi("Transition","TransitionRun"),transitionstart:fi("Transition","TransitionStart"),transitioncancel:fi("Transition","TransitionCancel"),transitionend:fi("Transition","TransitionEnd")},eb={},Bx={};ha&&(Bx=document.createElement("div").style,"AnimationEvent"in window||(delete Vo.animationend.animation,delete Vo.animationiteration.animation,delete Vo.animationstart.animation),"TransitionEvent"in window||delete Vo.transitionend.transition);var qx=di("animationend"),Lx=di("animationiteration"),Hx=di("animationstart"),$D=di("transitionrun"),ID=di("transitionstart"),YD=di("transitioncancel"),Px=di("transitionend"),$x=new Map,tb="abort auxClick beforeToggle 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(" ");tb.push("scrollEnd");var Ix=0;if(typeof performance=="object"&&typeof performance.now=="function")var FD=performance,Yx=function(){return FD.now()};else{var JD=Date;Yx=function(){return JD.now()}}var nb=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},GD="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",Ff=0,sb=1,ab=2,rb=3,Jf="– ",Gf="+ ",Fx=" ",bt=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",as="Components ⚛",Ye="Scheduler ⚛",Je="Blocking",Cr=!1,qa={color:"primary",properties:null,tooltipText:"",track:as},Tr={start:-0,end:-0,detail:{devtools:qa}},QD=["Changed Props",""],Jx="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",XD=["Changed Props",Jx],gc=1,La=2,rs=[],Uo=0,ib=0,Or={};Object.freeze(Or);var is=null,zo=null,Ce=0,ZD=1,Ve=2,mn=8,_s=16,KD=32,Gx=!1;try{var Qx=Object.preventExtensions({})}catch{Gx=!0}var ob=new WeakMap,Bo=[],qo=0,Qf=null,vc=0,os=[],ls=0,Di=null,Ha=1,Pa="",cn=null,yt=null,$e=!1,ma=!1,Yn=null,Rr=null,cs=!1,lb=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),cb=le(null),ub=le(null),Xx={},Xf=null,Lo=null,Ho=!1,WD=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},eC=zt.unstable_scheduleCallback,tC=zt.unstable_NormalPriority,Bt={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},qt=zt.unstable_now,Zf=console.createTask?console.createTask:function(){return null},xc=1,Kf=2,Wt=-0,jr=-0,$a=-0,Ia=null,Nn=-1.1,Ci=-0,St=-0,_e=-1.1,Ae=-1.1,xt=null,Dt=!1,Ti=-0,pa=-1.1,Nc=null,Mr=0,fb=null,db=null,Oi=-1.1,Sc=null,Po=-1.1,Wf=-1.1,Ya=-0,Fa=-1.1,us=-1.1,hb=0,wc=null,Zx=null,Kx=null,kr=-1.1,Ri=null,Vr=-1.1,ed=-1.1,Wx=-0,eN=-0,td=0,nC=null,tN=0,Ec=-1.1,nd=!1,sd=!1,_c=null,mb=0,ji=0,$o=null,nN=Y.S;Y.S=function(e,t){if(ZN=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>Fa&&0>us){Fa=qt();var n=tc(),r=ec();(n!==Vr||r!==Ri)&&(Vr=-1.1),kr=n,Ri=r}x_(e,t)}nN!==null&&nN(e,t)};var Mi=le(null),As={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Ac=[],Dc=[],Cc=[],Tc=[],Oc=[],Rc=[],ki=new Set;As.recordUnsafeLifecycleWarnings=function(e,t){ki.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Ac.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillMount=="function"&&Dc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Cc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Tc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Oc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillUpdate=="function"&&Rc.push(e))},As.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<Ac.length&&(Ac.forEach(function(h){e.add(H(h)||"Component"),ki.add(h.type)}),Ac=[]);var t=new Set;0<Dc.length&&(Dc.forEach(function(h){t.add(H(h)||"Component"),ki.add(h.type)}),Dc=[]);var n=new Set;0<Cc.length&&(Cc.forEach(function(h){n.add(H(h)||"Component"),ki.add(h.type)}),Cc=[]);var r=new Set;0<Tc.length&&(Tc.forEach(function(h){r.add(H(h)||"Component"),ki.add(h.type)}),Tc=[]);var l=new Set;0<Oc.length&&(Oc.forEach(function(h){l.add(H(h)||"Component"),ki.add(h.type)}),Oc=[]);var c=new Set;if(0<Rc.length&&(Rc.forEach(function(h){c.add(H(h)||"Component"),ki.add(h.type)}),Rc=[]),0<t.size){var f=w(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
198
|
+
Check the render method of %s.`,H(In)||"Unknown")),r=pr(t),r.payload={element:n},c=c===void 0?null:c,c!==null&&(typeof c!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",c),r.callback=c),n=br(e,r,t),n!==null&&(Gs(t,"root.render()",null),At(n,e,t),Bl(n,e,t))}function L1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sp(e,t){L1(e,t),(e=e.alternate)&&L1(e,t)}function H1(e){if(e.tag===13||e.tag===31){var t=dn(e,67108864);t!==null&&At(t,e,67108864),Sp(e,67108864)}}function P1(e){if(e.tag===13||e.tag===31){var t=Hn(e);t=El(t);var n=dn(e,t);n!==null&&At(n,e,t),Sp(e,t)}}function jA(){return In}function MA(e,t,n,r){var l=F.T;F.T=null;var c=rt.p;try{rt.p=ss,wp(e,t,n,r)}finally{rt.p=c,F.T=l}}function kA(e,t,n,r){var l=F.T;F.T=null;var c=rt.p;try{rt.p=da,wp(e,t,n,r)}finally{rt.p=c,F.T=l}}function wp(e,t,n,r){if(Ud){var l=Ep(r);if(l===null)lp(e,t,r,zd,n),I1(e,r);else if(VA(l,e,t,n,r))r.stopPropagation();else if(I1(e,r),t&4&&-1<TC.indexOf(e)){for(;l!==null;){var c=Un(l);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var f=Us(c.pendingLanes);if(f!==0){var h=c;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var y=1<<31-yn(f);h.entanglements[1]|=y,f&=~y}ra(c),(Ze&(Qt|Gn))===tn&&(vd=Kt()+WN,Kl(0))}}break;case 31:case 13:h=dn(c,2),h!==null&&At(h,c,2),go(),Sp(c,2)}if(c=Ep(r),c===null&&lp(e,t,r,zd,n),c===l)break;l=c}l!==null&&r.stopPropagation()}else lp(e,t,r,null,n)}}function Ep(e){return e=Th(e),_p(e)}function _p(e){if(zd=null,e=Bs(e),e!==null){var t=ee(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=te(t),e!==null)return e;e=null}else if(n===31){if(e=we(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zd=e,null}function $1(e){switch(e){case"beforetoggle":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"toggle":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 ss;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return da;case"message":switch(FA()){case qp:return ss;case Lp:return da;case Ao:case YA:return Ba;case Hp:return qf;default:return Ba}default:return Ba}}function I1(e,t){switch(e){case"focusin":case"focusout":Yr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Gr=null;break;case"pointerover":case"pointerout":Wc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(t.pointerId)}}function rc(e,t,n,r,l,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:c,targetContainers:[l]},t!==null&&(t=Un(t),t!==null&&H1(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function VA(e,t,n,r,l){switch(t){case"focusin":return Yr=rc(Yr,e,t,n,r,l),!0;case"dragenter":return Jr=rc(Jr,e,t,n,r,l),!0;case"mouseover":return Gr=rc(Gr,e,t,n,r,l),!0;case"pointerover":var c=l.pointerId;return Wc.set(c,rc(Wc.get(c)||null,e,t,n,r,l)),!0;case"gotpointercapture":return c=l.pointerId,eu.set(c,rc(eu.get(c)||null,e,t,n,r,l)),!0}return!1}function F1(e){var t=Bs(e.target);if(t!==null){var n=ee(t);if(n!==null){if(t=n.tag,t===13){if(t=te(n),t!==null){e.blockedOn=t,ao(e.priority,function(){P1(n)});return}}else if(t===31){if(t=we(n),t!==null){e.blockedOn=t,ao(e.priority,function(){P1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Of(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ep(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n),l=r;uc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),uc=l,n.target.dispatchEvent(r),uc===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),uc=null}else return t=Un(n),t!==null&&H1(t),e.blockedOn=n,!1;t.shift()}return!0}function Y1(e,t,n){Of(e)&&n.delete(t)}function UA(){t0=!1,Yr!==null&&Of(Yr)&&(Yr=null),Jr!==null&&Of(Jr)&&(Jr=null),Gr!==null&&Of(Gr)&&(Gr=null),Wc.forEach(Y1),eu.forEach(Y1)}function Rf(e,t){e.blockedOn===t&&(e.blockedOn=null,t0||(t0=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,UA)))}function J1(e){Bd!==e&&(Bd=e,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,function(){Bd===e&&(Bd=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],l=e[t+2];if(typeof r!="function"){if(_p(r||n)===null)continue;break}var c=Un(n);c!==null&&(e.splice(t,3),t-=3,n={pending:!0,data:l,method:n.method,action:r},Object.freeze(n),_m(c,n,r,l))}}))}function wo(e){function t(y){return Rf(y,e)}Yr!==null&&Rf(Yr,e),Jr!==null&&Rf(Jr,e),Gr!==null&&Rf(Gr,e),Wc.forEach(t),eu.forEach(t);for(var n=0;n<Qr.length;n++){var r=Qr[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)F1(n),n.blockedOn===null&&Qr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var l=n[r],c=n[r+1],f=l[gn]||null;if(typeof c=="function")f||J1(n);else if(f){var h=null;if(c&&c.hasAttribute("formAction")){if(l=c,f=c[gn]||null)h=f.formAction;else if(_p(l)!==null)continue}else h=f.action;typeof h=="function"?n[r+1]=h:(n.splice(r,3),r-=3),J1(n)}}}function G1(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(f){return l=f})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Ap(e){this._internalRoot=e}function jf(e){this._internalRoot=e}function Q1(e){e[Ar]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var zt=fT(),Dp=Jw(),zA=UC(),Pe=Object.assign,BA=Symbol.for("react.element"),oa=Symbol.for("react.transitional.element"),Eo=Symbol.for("react.portal"),_o=Symbol.for("react.fragment"),Mf=Symbol.for("react.strict_mode"),Cp=Symbol.for("react.profiler"),Tp=Symbol.for("react.consumer"),la=Symbol.for("react.context"),ic=Symbol.for("react.forward_ref"),Op=Symbol.for("react.suspense"),Rp=Symbol.for("react.suspense_list"),kf=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),jp=Symbol.for("react.activity"),qA=Symbol.for("react.memo_cache_sentinel"),X1=Symbol.iterator,LA=Symbol.for("react.client.reference"),Jt=Array.isArray,F=Dp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt=zA.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,HA=Object.freeze({pending:!1,data:null,method:null,action:null}),Mp=[],kp=[],za=-1,wr=le(null),oc=le(null),Er=le(null),Vf=le(null),lc=0,Z1,K1,W1,ex,tx,nx,sx;Te.__reactDisabledLog=!0;var Vp,ax,Up=!1,zp=new(typeof WeakMap=="function"?WeakMap:Map),In=null,ca=!1,Es=Object.prototype.hasOwnProperty,Bp=zt.unstable_scheduleCallback,PA=zt.unstable_cancelCallback,$A=zt.unstable_shouldYield,IA=zt.unstable_requestPaint,Kt=zt.unstable_now,FA=zt.unstable_getCurrentPriorityLevel,qp=zt.unstable_ImmediatePriority,Lp=zt.unstable_UserBlockingPriority,Ao=zt.unstable_NormalPriority,YA=zt.unstable_LowPriority,Hp=zt.unstable_IdlePriority,JA=zt.log,GA=zt.unstable_setDisableYieldValue,Do=null,hn=null,ua=!1,fa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",yn=Math.clz32?Math.clz32:oi,QA=Math.log,XA=Math.LN2,Uf=256,zf=262144,Bf=4194304,ss=2,da=8,Ba=32,qf=268435456,_r=Math.random().toString(36).slice(2),ln="__reactFiber$"+_r,gn="__reactProps$"+_r,Ar="__reactContainer$"+_r,Pp="__reactEvents$"+_r,ZA="__reactListeners$"+_r,KA="__reactHandles$"+_r,rx="__reactResources$"+_r,cc="__reactMarker$"+_r,ix=new Set,_i={},$p={},WA={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},eD=RegExp("^[: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]*$"),ox={},lx={},tD=/[\n"\\]/g,cx=!1,ux=!1,fx=!1,dx=!1,hx=!1,mx=!1,px=["value","defaultValue"],bx=!1,yx=/["'&<>\n\t]|^\s|\s$/,nD="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),gx="applet caption html table td th marquee object template foreignObject desc title".split(" "),sD=gx.concat(["button"]),aD="dd dt li option optgroup p rp rt".split(" "),vx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Lf={},Ip={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},xx=/([A-Z])/g,Nx=/^ms-/,rD=/^(?:webkit|moz|o)[A-Z]/,iD=/^-ms-/,oD=/-(.)/g,Sx=/;\s*$/,Co={},Fp={},wx=!1,Ex=!1,_x=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Hf="http://www.w3.org/1998/Math/MathML",To="http://www.w3.org/2000/svg",lD=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pf={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Ax={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},Oo={},cD=RegExp("^(aria)-[: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]*$"),uD=RegExp("^(aria)[A-Z][: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]*$"),Dx=!1,vn={},Cx=/^on./,fD=/^on[^A-Z]/,dD=RegExp("^(aria)-[: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]*$"),hD=RegExp("^(aria)[A-Z][: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]*$"),mD=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,uc=null,Ro=null,jo=null,Yp=!1,ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jp=!1;if(ha)try{var fc={};Object.defineProperty(fc,"passive",{get:function(){Jp=!0}}),window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch{Jp=!1}var Dr=null,Gp=null,$f=null,Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=Tn(Ai),dc=Pe({},Ai,{view:0,detail:0}),pD=Tn(dc),Qp,Xp,hc,Ff=Pe({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oh,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!==hc&&(hc&&e.type==="mousemove"?(Qp=e.screenX-hc.screenX,Xp=e.screenY-hc.screenY):Xp=Qp=0,hc=e),Qp)},movementY:function(e){return"movementY"in e?e.movementY:Xp}}),Tx=Tn(Ff),bD=Pe({},Ff,{dataTransfer:0}),yD=Tn(bD),gD=Pe({},dc,{relatedTarget:0}),Zp=Tn(gD),vD=Pe({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),xD=Tn(vD),ND=Pe({},Ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),SD=Tn(ND),wD=Pe({},Ai,{data:0}),Ox=Tn(wD),ED=Ox,_D={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AD={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"},DD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},CD=Pe({},dc,{key:function(e){if(e.key){var t=_D[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?AD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oh,charCode:function(e){return e.type==="keypress"?Tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TD=Tn(CD),OD=Pe({},Ff,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rx=Tn(OD),RD=Pe({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oh}),jD=Tn(RD),MD=Pe({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),kD=Tn(MD),VD=Pe({},Ff,{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}),UD=Tn(VD),zD=Pe({},Ai,{newState:0,oldState:0}),BD=Tn(zD),qD=[9,13,27,32],jx=229,Kp=ha&&"CompositionEvent"in window,mc=null;ha&&"documentMode"in document&&(mc=document.documentMode);var LD=ha&&"TextEvent"in window&&!mc,Mx=ha&&(!Kp||mc&&8<mc&&11>=mc),kx=32,Vx=String.fromCharCode(kx),Ux=!1,Mo=!1,HD={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},pc=null,bc=null,zx=!1;ha&&(zx=o_("input")&&(!document.documentMode||9<document.documentMode));var xn=typeof Object.is=="function"?Object.is:h_,PD=ha&&"documentMode"in document&&11>=document.documentMode,ko=null,Wp=null,yc=null,eb=!1,Vo={animationend:fi("Animation","AnimationEnd"),animationiteration:fi("Animation","AnimationIteration"),animationstart:fi("Animation","AnimationStart"),transitionrun:fi("Transition","TransitionRun"),transitionstart:fi("Transition","TransitionStart"),transitioncancel:fi("Transition","TransitionCancel"),transitionend:fi("Transition","TransitionEnd")},tb={},Bx={};ha&&(Bx=document.createElement("div").style,"AnimationEvent"in window||(delete Vo.animationend.animation,delete Vo.animationiteration.animation,delete Vo.animationstart.animation),"TransitionEvent"in window||delete Vo.transitionend.transition);var qx=di("animationend"),Lx=di("animationiteration"),Hx=di("animationstart"),$D=di("transitionrun"),ID=di("transitionstart"),FD=di("transitioncancel"),Px=di("transitionend"),$x=new Map,nb="abort auxClick beforeToggle 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(" ");nb.push("scrollEnd");var Ix=0;if(typeof performance=="object"&&typeof performance.now=="function")var YD=performance,Fx=function(){return YD.now()};else{var JD=Date;Fx=function(){return JD.now()}}var sb=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},GD="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",Yf=0,ab=1,rb=2,ib=3,Jf="– ",Gf="+ ",Yx=" ",bt=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",as="Components ⚛",Fe="Scheduler ⚛",Je="Blocking",Cr=!1,qa={color:"primary",properties:null,tooltipText:"",track:as},Tr={start:-0,end:-0,detail:{devtools:qa}},QD=["Changed Props",""],Jx="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",XD=["Changed Props",Jx],gc=1,La=2,rs=[],Uo=0,ob=0,Or={};Object.freeze(Or);var is=null,zo=null,Ce=0,ZD=1,Ve=2,mn=8,_s=16,KD=32,Gx=!1;try{var Qx=Object.preventExtensions({})}catch{Gx=!0}var lb=new WeakMap,Bo=[],qo=0,Qf=null,vc=0,os=[],ls=0,Di=null,Ha=1,Pa="",cn=null,yt=null,$e=!1,ma=!1,Fn=null,Rr=null,cs=!1,cb=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),ub=le(null),fb=le(null),Xx={},Xf=null,Lo=null,Ho=!1,WD=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},eC=zt.unstable_scheduleCallback,tC=zt.unstable_NormalPriority,Bt={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},qt=zt.unstable_now,Zf=console.createTask?console.createTask:function(){return null},xc=1,Kf=2,Wt=-0,jr=-0,$a=-0,Ia=null,Nn=-1.1,Ci=-0,St=-0,_e=-1.1,Ae=-1.1,xt=null,Dt=!1,Ti=-0,pa=-1.1,Nc=null,Mr=0,db=null,hb=null,Oi=-1.1,Sc=null,Po=-1.1,Wf=-1.1,Fa=-0,Ya=-1.1,us=-1.1,mb=0,wc=null,Zx=null,Kx=null,kr=-1.1,Ri=null,Vr=-1.1,ed=-1.1,Wx=-0,eN=-0,td=0,nC=null,tN=0,Ec=-1.1,nd=!1,sd=!1,_c=null,pb=0,ji=0,$o=null,nN=F.S;F.S=function(e,t){if(ZN=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>Ya&&0>us){Ya=qt();var n=tc(),r=ec();(n!==Vr||r!==Ri)&&(Vr=-1.1),kr=n,Ri=r}x_(e,t)}nN!==null&&nN(e,t)};var Mi=le(null),As={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Ac=[],Dc=[],Cc=[],Tc=[],Oc=[],Rc=[],ki=new Set;As.recordUnsafeLifecycleWarnings=function(e,t){ki.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Ac.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillMount=="function"&&Dc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Cc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Tc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Oc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillUpdate=="function"&&Rc.push(e))},As.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<Ac.length&&(Ac.forEach(function(h){e.add(H(h)||"Component"),ki.add(h.type)}),Ac=[]);var t=new Set;0<Dc.length&&(Dc.forEach(function(h){t.add(H(h)||"Component"),ki.add(h.type)}),Dc=[]);var n=new Set;0<Cc.length&&(Cc.forEach(function(h){n.add(H(h)||"Component"),ki.add(h.type)}),Cc=[]);var r=new Set;0<Tc.length&&(Tc.forEach(function(h){r.add(H(h)||"Component"),ki.add(h.type)}),Tc=[]);var l=new Set;0<Oc.length&&(Oc.forEach(function(h){l.add(H(h)||"Component"),ki.add(h.type)}),Oc=[]);var c=new Set;if(0<Rc.length&&(Rc.forEach(function(h){c.add(H(h)||"Component"),ki.add(h.type)}),Rc=[]),0<t.size){var f=w(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
199
199
|
|
|
200
200
|
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
201
201
|
|
|
@@ -230,31 +230,31 @@ The old API will be supported in all 16.x releases, but applications using it sh
|
|
|
230
230
|
|
|
231
231
|
Please update the following components: %s
|
|
232
232
|
|
|
233
|
-
Learn more about this warning here: https://react.dev/link/legacy-context`,r)})}})},As.discardPendingWarnings=function(){Ac=[],Dc=[],Cc=[],Tc=[],Oc=[],Rc=[],ad=new Map};var aN={react_stack_bottom_frame:function(e,t,n){var r=ca;ca=!0;try{return e(t,n)}finally{ca=r}}},
|
|
233
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,r)})}})},As.discardPendingWarnings=function(){Ac=[],Dc=[],Cc=[],Tc=[],Oc=[],Rc=[],ad=new Map};var aN={react_stack_bottom_frame:function(e,t,n){var r=ca;ca=!0;try{return e(t,n)}finally{ca=r}}},bb=aN.react_stack_bottom_frame.bind(aN),rN={react_stack_bottom_frame:function(e){var t=ca;ca=!0;try{return e.render()}finally{ca=t}}},iN=rN.react_stack_bottom_frame.bind(rN),oN={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(n){at(e,e.return,n)}}},yb=oN.react_stack_bottom_frame.bind(oN),lN={react_stack_bottom_frame:function(e,t,n,r,l){try{t.componentDidUpdate(n,r,l)}catch(c){at(e,e.return,c)}}},cN=lN.react_stack_bottom_frame.bind(lN),uN={react_stack_bottom_frame:function(e,t){var n=t.stack;e.componentDidCatch(t.value,{componentStack:n!==null?n:""})}},sC=uN.react_stack_bottom_frame.bind(uN),fN={react_stack_bottom_frame:function(e,t,n){try{n.componentWillUnmount()}catch(r){at(e,t,r)}}},dN=fN.react_stack_bottom_frame.bind(fN),hN={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},aC=hN.react_stack_bottom_frame.bind(hN),mN={react_stack_bottom_frame:function(e,t,n){try{n()}catch(r){at(e,t,r)}}},rC=mN.react_stack_bottom_frame.bind(mN),pN={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},iC=pN.react_stack_bottom_frame.bind(pN),Io=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),gb=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),rd=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),id={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Vi=null,jc=!1,Fo=null,Mc=0,Ue=null,vb,bN=vb=!1,yN={},gN={},vN={};_=function(e,t,n){if(n!==null&&typeof n=="object"&&n._store&&(!n._store.validated&&n.key==null||n._store.validated===2)){if(typeof n._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");n._store.validated=1;var r=H(e),l=r||"null";if(!yN[l]){yN[l]=!0,n=n._owner,e=e._debugOwner;var c="";e&&typeof e.tag=="number"&&(l=H(e))&&(c=`
|
|
234
234
|
|
|
235
235
|
Check the render method of \``+l+"`."),c||r&&(c=`
|
|
236
236
|
|
|
237
|
-
Check the top-level render call using <`+r+">.");var f="";n!=null&&e!==n&&(r=null,typeof n.tag=="number"?r=H(n):typeof n.name=="string"&&(r=n.name),r&&(f=" It was passed a child from "+r+".")),be(t,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',c,f)})}}};var Ui=fg(!0),xN=fg(!1),NN=0,SN=1,wN=2,vb=3,Ur=!1,EN=!1,xb=null,Nb=!1,Fo=le(null),od=le(0),Fn=le(null),fs=null,Jo=1,kc=2,Mt=le(0),ld=0,ds=1,Sn=2,Jn=4,wn=8,Go,_N=new Set,AN=new Set,Sb=new Set,DN=new Set,Ja=0,Oe=null,ft=null,Lt=null,cd=!1,Qo=!1,zi=!1,ud=0,Vc=0,Ga=null,oC=0,lC=25,I=null,hs=null,Qa=-1,Uc=!1,zc={readContext:vt,use:vr,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};zc.useEffectEvent=Tt;var wb=null,CN=null,Eb=null,TN=null,ba=null,Ds=null,fd=null;wb={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",He(),uo(t),xm(e,t)},useContext:function(e){return I="useContext",He(),vt(e)},useEffect:function(e,t){return I="useEffect",He(),uo(t),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",He(),uo(n),vm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",He(),uo(t),xi(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",He(),uo(t),gm(e,t)},useMemo:function(e,t){I="useMemo",He(),uo(t);var n=Y.H;Y.H=ba;try{return Nm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",He();var r=Y.H;Y.H=ba;try{return cm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",He(),bm(e)},useState:function(e){I="useState",He();var t=Y.H;Y.H=ba;try{return hm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",He()},useDeferredValue:function(e,t){return I="useDeferredValue",He(),Sm(e,t)},useTransition:function(){return I="useTransition",He(),_m()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",He(),fm(e,t,n)},useId:function(){return I="useId",He(),Am()},useFormState:function(e,t){return I="useFormState",He(),Ku(),ho(e,t)},useActionState:function(e,t){return I="useActionState",He(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",He(),mm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",He(),Dm()},useEffectEvent:function(e){return I="useEffectEvent",He(),ym(e)}},CN={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",re(),xm(e,t)},useContext:function(e){return I="useContext",re(),vt(e)},useEffect:function(e,t){return I="useEffect",re(),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),vm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",re(),xi(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),gm(e,t)},useMemo:function(e,t){I="useMemo",re();var n=Y.H;Y.H=ba;try{return Nm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=ba;try{return cm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",re(),bm(e)},useState:function(e){I="useState",re();var t=Y.H;Y.H=ba;try{return hm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),Sm(e,t)},useTransition:function(){return I="useTransition",re(),_m()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),fm(e,t,n)},useId:function(){return I="useId",re(),Am()},useActionState:function(e,t){return I="useActionState",re(),ho(e,t)},useFormState:function(e,t){return I="useFormState",re(),Ku(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",re(),mm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),Dm()},useEffectEvent:function(e){return I="useEffectEvent",re(),ym(e)}},Eb={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",re(),of(e,t)},useContext:function(e){return I="useContext",re(),vt(e)},useEffect:function(e,t){I="useEffect",re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",re();var n=Y.H;Y.H=Ds;try{return lf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=Ds;try{return fo(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",re(),ot().memoizedState},useState:function(){I="useState",re();var e=Y.H;Y.H=Ds;try{return fo(Ss)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),Mg(e,t)},useTransition:function(){return I="useTransition",re(),qg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),ef(e,t,n)},useId:function(){return I="useId",re(),ot().memoizedState},useFormState:function(e){return I="useFormState",re(),Ku(),tf(e)},useActionState:function(e){return I="useActionState",re(),tf(e)},useOptimistic:function(e,t){return I="useOptimistic",re(),wg(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),af(e)}},TN={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",re(),of(e,t)},useContext:function(e){return I="useContext",re(),vt(e)},useEffect:function(e,t){I="useEffect",re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",re();var n=Y.H;Y.H=fd;try{return lf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=fd;try{return Pl(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",re(),ot().memoizedState},useState:function(){I="useState",re();var e=Y.H;Y.H=fd;try{return Pl(Ss)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),kg(e,t)},useTransition:function(){return I="useTransition",re(),Lg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),ef(e,t,n)},useId:function(){return I="useId",re(),ot().memoizedState},useFormState:function(e){return I="useFormState",re(),Ku(),nf(e)},useActionState:function(e){return I="useActionState",re(),nf(e)},useOptimistic:function(e,t){return I="useOptimistic",re(),_g(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),af(e)}},ba={readContext:function(e){return g(),vt(e)},use:function(e){return m(),vr(e)},useCallback:function(e,t){return I="useCallback",m(),He(),xm(e,t)},useContext:function(e){return I="useContext",m(),He(),vt(e)},useEffect:function(e,t){return I="useEffect",m(),He(),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),He(),vm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",m(),He(),xi(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),He(),gm(e,t)},useMemo:function(e,t){I="useMemo",m(),He();var n=Y.H;Y.H=ba;try{return Nm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),He();var r=Y.H;Y.H=ba;try{return cm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",m(),He(),bm(e)},useState:function(e){I="useState",m(),He();var t=Y.H;Y.H=ba;try{return hm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",m(),He()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),He(),Sm(e,t)},useTransition:function(){return I="useTransition",m(),He(),_m()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),He(),fm(e,t,n)},useId:function(){return I="useId",m(),He(),Am()},useFormState:function(e,t){return I="useFormState",m(),He(),ho(e,t)},useActionState:function(e,t){return I="useActionState",m(),He(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",m(),He(),mm(e)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",He(),Dm()},useEffectEvent:function(e){return I="useEffectEvent",m(),He(),ym(e)}},Ds={readContext:function(e){return g(),vt(e)},use:function(e){return m(),vr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),of(e,t)},useContext:function(e){return I="useContext",m(),re(),vt(e)},useEffect:function(e,t){I="useEffect",m(),re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",m(),re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",m(),re();var n=Y.H;Y.H=Ds;try{return lf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),re();var r=Y.H;Y.H=Ds;try{return fo(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",m(),re(),ot().memoizedState},useState:function(){I="useState",m(),re();var e=Y.H;Y.H=Ds;try{return fo(Ss)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",m(),re()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),re(),Mg(e,t)},useTransition:function(){return I="useTransition",m(),re(),qg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),re(),ef(e,t,n)},useId:function(){return I="useId",m(),re(),ot().memoizedState},useFormState:function(e){return I="useFormState",m(),re(),tf(e)},useActionState:function(e){return I="useActionState",m(),re(),tf(e)},useOptimistic:function(e,t){return I="useOptimistic",m(),re(),wg(e,t)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",m(),re(),af(e)}},fd={readContext:function(e){return g(),vt(e)},use:function(e){return m(),vr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),of(e,t)},useContext:function(e){return I="useContext",m(),re(),vt(e)},useEffect:function(e,t){I="useEffect",m(),re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",m(),re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",m(),re();var n=Y.H;Y.H=Ds;try{return lf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),re();var r=Y.H;Y.H=Ds;try{return Pl(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",m(),re(),ot().memoizedState},useState:function(){I="useState",m(),re();var e=Y.H;Y.H=Ds;try{return Pl(Ss)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",m(),re()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),re(),kg(e,t)},useTransition:function(){return I="useTransition",m(),re(),Lg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),re(),ef(e,t,n)},useId:function(){return I="useId",m(),re(),ot().memoizedState},useFormState:function(e){return I="useFormState",m(),re(),nf(e)},useActionState:function(e){return I="useActionState",m(),re(),nf(e)},useOptimistic:function(e,t){return I="useOptimistic",m(),re(),_g(e,t)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",m(),re(),af(e)}};var ON={},RN=new Set,jN=new Set,MN=new Set,kN=new Set,VN=new Set,UN=new Set,zN=new Set,BN=new Set,qN=new Set,LN=new Set;Object.freeze(ON);var _b={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=pr(r);l.payload=t,n!=null&&(Tm(n),l.callback=n),t=br(e,l,r),t!==null&&(Gs(r,"this.setState()",e),At(t,e,r),Bl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=pr(r);l.tag=SN,l.payload=t,n!=null&&(Tm(n),l.callback=n),t=br(e,l,r),t!==null&&(Gs(r,"this.replaceState()",e),At(t,e,r),Bl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Hn(e),r=pr(n);r.tag=wN,t!=null&&(Tm(t),r.callback=t),t=br(e,r,n),t!==null&&(Gs(n,"this.forceUpdate()",e),At(t,e,n),Bl(t,e,n))}},Xo=null,Ab=null,Db=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),Ht=!1,HN={},PN={},$N={},IN={},Zo=!1,YN={},dd={},Cb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},FN=!1,JN=null;JN=new Set;var Xa=!1,Pt=!1,Tb=!1,GN=typeof WeakSet=="function"?WeakSet:Set,en=null,Ko=null,Wo=null,$t=null,Mn=!1,Cs=null,Gt=!1,Bc=8192,cC={getCacheForType:function(e){var t=vt(Bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return vt(Bt).controller.signal},getOwner:function(){return In}};if(typeof Symbol=="function"&&Symbol.for){var qc=Symbol.for;qc("selector.component"),qc("selector.has_pseudo_class"),qc("selector.role"),qc("selector.test_id"),qc("selector.text")}var uC=[],fC=typeof WeakMap=="function"?WeakMap:Map,tn=0,Qt=2,Gn=4,Za=0,Lc=1,Bi=2,hd=3,zr=4,md=6,QN=5,Xe=tn,dt=null,qe=null,ze=0,kn=0,pd=1,qi=2,Hc=3,XN=4,Ob=5,Pc=6,bd=7,Rb=8,Li=9,lt=kn,Qn=null,Br=!1,el=!1,jb=!1,ya=0,wt=Za,qr=0,Lr=0,Mb=0,Vn=0,Hi=0,$c=null,En=null,yd=!1,gd=0,ZN=0,KN=300,vd=1/0,WN=500,Ic=null,Ot=null,Hr=null,xd=0,kb=1,Vb=2,eS=3,Pr=0,tS=1,nS=2,sS=3,aS=4,Nd=5,It=0,$r=null,tl=null,Ts=0,Ub=0,zb=-0,Bb=null,rS=null,iS=null,Os=xd,oS=null,dC=50,Yc=0,qb=null,Lb=!1,Sd=!1,hC=50,Pi=0,Fc=null,nl=!1,wd=null,lS=!1,cS=new Set,mC={},Ed=null,sl=null,Hb=!1,Pb=!1,_d=!1,$b=!1,Ir=0,Ib={};(function(){for(var e=0;e<tb.length;e++){var t=tb[e],n=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),xs(n,"on"+t)}xs(qx,"onAnimationEnd"),xs(Lx,"onAnimationIteration"),xs(Hx,"onAnimationStart"),xs("dblclick","onDoubleClick"),xs("focusin","onFocus"),xs("focusout","onBlur"),xs($D,"onTransitionRun"),xs(ID,"onTransitionStart"),xs(YD,"onTransitionCancel"),xs(Px,"onTransitionEnd")})(),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),Ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jc="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(" "),Yb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jc)),Ad="_reactListening"+Math.random().toString(36).slice(2),uS=!1,fS=!1,Dd=!1,dS=!1,Cd=!1,Td=!1,hS=!1,Od={},pC=/\r\n?/g,bC=/\u0000|\uFFFD/g,$i="http://www.w3.org/1999/xlink",Fb="http://www.w3.org/XML/1998/namespace",yC="javascript:throw new Error('React form unexpectedly submitted.')",gC="suppressHydrationWarning",Ii="&",Rd="/&",Gc="$",Qc="/$",Yr="$?",Yi="$~",al="$!",vC="html",xC="body",NC="head",Jb="F!",mS="F",pS="loading",SC="style",Ka=0,rl=1,jd=2,Gb=null,Qb=null,bS={dialog:!0,webview:!0},Xb=null,Xc=void 0,yS=typeof setTimeout=="function"?setTimeout:void 0,wC=typeof clearTimeout=="function"?clearTimeout:void 0,Fi=-1,gS=typeof Promise=="function"?Promise:void 0,EC=typeof queueMicrotask=="function"?queueMicrotask:typeof gS<"u"?function(e){return gS.resolve(null).then(e).catch(iA)}:yS,Zb=null,Ji=0,Zc=1,vS=2,xS=3,ms=4,ps=new Map,NS=new Set,Wa=at.d;at.d={f:function(){var e=Wa.f(),t=go();return e||t},r:function(e){var t=Un(e);t!==null&&t.tag===5&&t.type==="form"?Bg(t):Wa.r(e)},D:function(e){Wa.D(e),R1("dns-prefetch",e,null)},C:function(e,t){Wa.C(e,t),R1("preconnect",e,t)},L:function(e,t,n){Wa.L(e,t,n);var r=il;if(r&&e&&t){var l='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Ct(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Ct(n.imageSizes)+'"]')):l+='[href="'+Ct(e)+'"]';var c=l;switch(t){case"style":c=No(e);break;case"script":c=So(e)}ps.has(c)||(e=Pe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ps.set(c,e),r.querySelector(l)!==null||t==="style"&&r.querySelector(sc(c))||t==="script"&&r.querySelector(ac(c))||(t=r.createElement("link"),on(t,"link",e),jt(t),r.head.appendChild(t)))}},m:function(e,t){Wa.m(e,t);var n=il;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Ct(r)+'"][href="'+Ct(e)+'"]',c=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=So(e)}if(!ps.has(c)&&(e=Pe({rel:"modulepreload",href:e},t),ps.set(c,e),n.querySelector(l)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ac(c)))return}r=n.createElement("link"),on(r,"link",e),jt(r),n.head.appendChild(r)}}},X:function(e,t){Wa.X(e,t);var n=il;if(n&&e){var r=qs(n).hoistableScripts,l=So(e),c=r.get(l);c||(c=n.querySelector(ac(l)),c||(e=Pe({src:e,async:!0},t),(t=ps.get(l))&&vp(e,t),c=n.createElement("script"),jt(c),on(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},r.set(l,c))}},S:function(e,t,n){Wa.S(e,t,n);var r=il;if(r&&e){var l=qs(r).hoistableStyles,c=No(e);t=t||"default";var f=l.get(c);if(!f){var h={loading:Ji,preload:null};if(f=r.querySelector(sc(c)))h.loading=Zc|ms;else{e=Pe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ps.get(c))&&gp(e,n);var y=f=r.createElement("link");jt(y),on(y,"link",e),y._p=new Promise(function(v,k){y.onload=v,y.onerror=k}),y.addEventListener("load",function(){h.loading|=Zc}),y.addEventListener("error",function(){h.loading|=vS}),h.loading|=ms,Df(f,t,r)}f={type:"stylesheet",instance:f,count:1,state:h},l.set(c,f)}}},M:function(e,t){Wa.M(e,t);var n=il;if(n&&e){var r=qs(n).hoistableScripts,l=So(e),c=r.get(l);c||(c=n.querySelector(ac(l)),c||(e=Pe({src:e,async:!0,type:"module"},t),(t=ps.get(l))&&vp(e,t),c=n.createElement("script"),jt(c),on(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},r.set(l,c))}}};var il=typeof document>"u"?null:document,Md=null,_C=6e4,AC=800,DC=500,Kb=0,Wb=null,kd=null,Gi=HA,Kc={$$typeof:la,Provider:null,Consumer:null,_currentValue:Gi,_currentValue2:Gi,_threadCount:0},SS="%c%s%c",wS="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",ES="",Vd=" ",CC=Function.prototype.bind,_S=!1,AS=null,DS=null,CS=null,TS=null,OS=null,RS=null,jS=null,MS=null,kS=null,VS=null;AS=function(e,t,n,r){t=i(e,t),t!==null&&(n=s(t.memoizedState,n,0,r),t.memoizedState=n,t.baseState=n,e.memoizedProps=Pe({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},DS=function(e,t,n){t=i(e,t),t!==null&&(n=u(t.memoizedState,n,0),t.memoizedState=n,t.baseState=n,e.memoizedProps=Pe({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},CS=function(e,t,n,r){t=i(e,t),t!==null&&(n=a(t.memoizedState,n,r),t.memoizedState=n,t.baseState=n,e.memoizedProps=Pe({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},TS=function(e,t,n){e.pendingProps=s(e.memoizedProps,t,0,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},OS=function(e,t){e.pendingProps=u(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},RS=function(e,t,n){e.pendingProps=a(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},jS=function(e){var t=dn(e,2);t!==null&&At(t,e,2)},MS=function(e){var t=Nl(),n=dn(e,t);n!==null&&At(n,e,t)},kS=function(e){p=e},VS=function(e){d=e};var Ud=!0,zd=null,e0=!1,Fr=null,Jr=null,Gr=null,Wc=new Map,eu=new Map,Qr=[],TC="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".split(" "),Bd=null;if(jf.prototype.render=_p.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var n=arguments;typeof n[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):Z(n[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof n[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),n=e;var r=t.current,l=Hn(r);xp(r,l,n,t,null,null)},jf.prototype.unmount=_p.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(Xe&(Qt|Gn))!==tn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),xp(e.current,2,null,e,null,null),go(),t[Ar]=null}},jf.prototype.unstable_scheduleHydration=function(e){if(e){var t=so();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&Y1(e)}},(function(){var e=Ap.version;if(e!=="19.2.4")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
237
|
+
Check the top-level render call using <`+r+">.");var f="";n!=null&&e!==n&&(r=null,typeof n.tag=="number"?r=H(n):typeof n.name=="string"&&(r=n.name),r&&(f=" It was passed a child from "+r+".")),be(t,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',c,f)})}}};var Ui=fg(!0),xN=fg(!1),NN=0,SN=1,wN=2,xb=3,Ur=!1,EN=!1,Nb=null,Sb=!1,Yo=le(null),od=le(0),Yn=le(null),fs=null,Jo=1,kc=2,Mt=le(0),ld=0,ds=1,Sn=2,Jn=4,wn=8,Go,_N=new Set,AN=new Set,wb=new Set,DN=new Set,Ja=0,Oe=null,ft=null,Lt=null,cd=!1,Qo=!1,zi=!1,ud=0,Vc=0,Ga=null,oC=0,lC=25,I=null,hs=null,Qa=-1,Uc=!1,zc={readContext:vt,use:vr,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};zc.useEffectEvent=Tt;var Eb=null,CN=null,_b=null,TN=null,ba=null,Ds=null,fd=null;Eb={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",He(),uo(t),Nm(e,t)},useContext:function(e){return I="useContext",He(),vt(e)},useEffect:function(e,t){return I="useEffect",He(),uo(t),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",He(),uo(n),xm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",He(),uo(t),xi(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",He(),uo(t),vm(e,t)},useMemo:function(e,t){I="useMemo",He(),uo(t);var n=F.H;F.H=ba;try{return Sm(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",He();var r=F.H;F.H=ba;try{return um(e,t,n)}finally{F.H=r}},useRef:function(e){return I="useRef",He(),ym(e)},useState:function(e){I="useState",He();var t=F.H;F.H=ba;try{return mm(e)}finally{F.H=t}},useDebugValue:function(){I="useDebugValue",He()},useDeferredValue:function(e,t){return I="useDeferredValue",He(),wm(e,t)},useTransition:function(){return I="useTransition",He(),Am()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",He(),dm(e,t,n)},useId:function(){return I="useId",He(),Dm()},useFormState:function(e,t){return I="useFormState",He(),Ku(),ho(e,t)},useActionState:function(e,t){return I="useActionState",He(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",He(),pm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",He(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",He(),gm(e)}},CN={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",re(),Nm(e,t)},useContext:function(e){return I="useContext",re(),vt(e)},useEffect:function(e,t){return I="useEffect",re(),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),xm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",re(),xi(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),vm(e,t)},useMemo:function(e,t){I="useMemo",re();var n=F.H;F.H=ba;try{return Sm(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=F.H;F.H=ba;try{return um(e,t,n)}finally{F.H=r}},useRef:function(e){return I="useRef",re(),ym(e)},useState:function(e){I="useState",re();var t=F.H;F.H=ba;try{return mm(e)}finally{F.H=t}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),wm(e,t)},useTransition:function(){return I="useTransition",re(),Am()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),dm(e,t,n)},useId:function(){return I="useId",re(),Dm()},useActionState:function(e,t){return I="useActionState",re(),ho(e,t)},useFormState:function(e,t){return I="useFormState",re(),Ku(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",re(),pm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",re(),gm(e)}},_b={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",re(),of(e,t)},useContext:function(e){return I="useContext",re(),vt(e)},useEffect:function(e,t){I="useEffect",re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",re();var n=F.H;F.H=Ds;try{return lf(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=F.H;F.H=Ds;try{return fo(e,t,n)}finally{F.H=r}},useRef:function(){return I="useRef",re(),ot().memoizedState},useState:function(){I="useState",re();var e=F.H;F.H=Ds;try{return fo(Ss)}finally{F.H=e}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),Mg(e,t)},useTransition:function(){return I="useTransition",re(),qg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),ef(e,t,n)},useId:function(){return I="useId",re(),ot().memoizedState},useFormState:function(e){return I="useFormState",re(),Ku(),tf(e)},useActionState:function(e){return I="useActionState",re(),tf(e)},useOptimistic:function(e,t){return I="useOptimistic",re(),wg(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),af(e)}},TN={readContext:function(e){return vt(e)},use:vr,useCallback:function(e,t){return I="useCallback",re(),of(e,t)},useContext:function(e){return I="useContext",re(),vt(e)},useEffect:function(e,t){I="useEffect",re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",re();var n=F.H;F.H=fd;try{return lf(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=F.H;F.H=fd;try{return Pl(e,t,n)}finally{F.H=r}},useRef:function(){return I="useRef",re(),ot().memoizedState},useState:function(){I="useState",re();var e=F.H;F.H=fd;try{return Pl(Ss)}finally{F.H=e}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),kg(e,t)},useTransition:function(){return I="useTransition",re(),Lg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),ef(e,t,n)},useId:function(){return I="useId",re(),ot().memoizedState},useFormState:function(e){return I="useFormState",re(),Ku(),nf(e)},useActionState:function(e){return I="useActionState",re(),nf(e)},useOptimistic:function(e,t){return I="useOptimistic",re(),_g(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),af(e)}},ba={readContext:function(e){return g(),vt(e)},use:function(e){return m(),vr(e)},useCallback:function(e,t){return I="useCallback",m(),He(),Nm(e,t)},useContext:function(e){return I="useContext",m(),He(),vt(e)},useEffect:function(e,t){return I="useEffect",m(),He(),sf(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),He(),xm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",m(),He(),xi(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),He(),vm(e,t)},useMemo:function(e,t){I="useMemo",m(),He();var n=F.H;F.H=ba;try{return Sm(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",m(),He();var r=F.H;F.H=ba;try{return um(e,t,n)}finally{F.H=r}},useRef:function(e){return I="useRef",m(),He(),ym(e)},useState:function(e){I="useState",m(),He();var t=F.H;F.H=ba;try{return mm(e)}finally{F.H=t}},useDebugValue:function(){I="useDebugValue",m(),He()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),He(),wm(e,t)},useTransition:function(){return I="useTransition",m(),He(),Am()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),He(),dm(e,t,n)},useId:function(){return I="useId",m(),He(),Dm()},useFormState:function(e,t){return I="useFormState",m(),He(),ho(e,t)},useActionState:function(e,t){return I="useActionState",m(),He(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",m(),He(),pm(e)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",He(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",m(),He(),gm(e)}},Ds={readContext:function(e){return g(),vt(e)},use:function(e){return m(),vr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),of(e,t)},useContext:function(e){return I="useContext",m(),re(),vt(e)},useEffect:function(e,t){I="useEffect",m(),re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",m(),re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",m(),re();var n=F.H;F.H=Ds;try{return lf(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",m(),re();var r=F.H;F.H=Ds;try{return fo(e,t,n)}finally{F.H=r}},useRef:function(){return I="useRef",m(),re(),ot().memoizedState},useState:function(){I="useState",m(),re();var e=F.H;F.H=Ds;try{return fo(Ss)}finally{F.H=e}},useDebugValue:function(){I="useDebugValue",m(),re()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),re(),Mg(e,t)},useTransition:function(){return I="useTransition",m(),re(),qg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),re(),ef(e,t,n)},useId:function(){return I="useId",m(),re(),ot().memoizedState},useFormState:function(e){return I="useFormState",m(),re(),tf(e)},useActionState:function(e){return I="useActionState",m(),re(),tf(e)},useOptimistic:function(e,t){return I="useOptimistic",m(),re(),wg(e,t)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",m(),re(),af(e)}},fd={readContext:function(e){return g(),vt(e)},use:function(e){return m(),vr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),of(e,t)},useContext:function(e){return I="useContext",m(),re(),vt(e)},useEffect:function(e,t){I="useEffect",m(),re(),On(2048,wn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),re(),rf(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",m(),re(),On(4,Sn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),re(),On(4,Jn,e,t)},useMemo:function(e,t){I="useMemo",m(),re();var n=F.H;F.H=Ds;try{return lf(e,t)}finally{F.H=n}},useReducer:function(e,t,n){I="useReducer",m(),re();var r=F.H;F.H=Ds;try{return Pl(e,t,n)}finally{F.H=r}},useRef:function(){return I="useRef",m(),re(),ot().memoizedState},useState:function(){I="useState",m(),re();var e=F.H;F.H=Ds;try{return Pl(Ss)}finally{F.H=e}},useDebugValue:function(){I="useDebugValue",m(),re()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),re(),kg(e,t)},useTransition:function(){return I="useTransition",m(),re(),Lg()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),re(),ef(e,t,n)},useId:function(){return I="useId",m(),re(),ot().memoizedState},useFormState:function(e){return I="useFormState",m(),re(),nf(e)},useActionState:function(e){return I="useActionState",m(),re(),nf(e)},useOptimistic:function(e,t){return I="useOptimistic",m(),re(),_g(e,t)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",m(),re(),af(e)}};var ON={},RN=new Set,jN=new Set,MN=new Set,kN=new Set,VN=new Set,UN=new Set,zN=new Set,BN=new Set,qN=new Set,LN=new Set;Object.freeze(ON);var Ab={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=pr(r);l.payload=t,n!=null&&(Om(n),l.callback=n),t=br(e,l,r),t!==null&&(Gs(r,"this.setState()",e),At(t,e,r),Bl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=pr(r);l.tag=SN,l.payload=t,n!=null&&(Om(n),l.callback=n),t=br(e,l,r),t!==null&&(Gs(r,"this.replaceState()",e),At(t,e,r),Bl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Hn(e),r=pr(n);r.tag=wN,t!=null&&(Om(t),r.callback=t),t=br(e,r,n),t!==null&&(Gs(n,"this.forceUpdate()",e),At(t,e,n),Bl(t,e,n))}},Xo=null,Db=null,Cb=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),Ht=!1,HN={},PN={},$N={},IN={},Zo=!1,FN={},dd={},Tb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},YN=!1,JN=null;JN=new Set;var Xa=!1,Pt=!1,Ob=!1,GN=typeof WeakSet=="function"?WeakSet:Set,en=null,Ko=null,Wo=null,$t=null,Mn=!1,Cs=null,Gt=!1,Bc=8192,cC={getCacheForType:function(e){var t=vt(Bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return vt(Bt).controller.signal},getOwner:function(){return In}};if(typeof Symbol=="function"&&Symbol.for){var qc=Symbol.for;qc("selector.component"),qc("selector.has_pseudo_class"),qc("selector.role"),qc("selector.test_id"),qc("selector.text")}var uC=[],fC=typeof WeakMap=="function"?WeakMap:Map,tn=0,Qt=2,Gn=4,Za=0,Lc=1,Bi=2,hd=3,zr=4,md=6,QN=5,Ze=tn,dt=null,qe=null,ze=0,kn=0,pd=1,qi=2,Hc=3,XN=4,Rb=5,Pc=6,bd=7,jb=8,Li=9,lt=kn,Qn=null,Br=!1,el=!1,Mb=!1,ya=0,wt=Za,qr=0,Lr=0,kb=0,Vn=0,Hi=0,$c=null,En=null,yd=!1,gd=0,ZN=0,KN=300,vd=1/0,WN=500,Ic=null,Ot=null,Hr=null,xd=0,Vb=1,Ub=2,eS=3,Pr=0,tS=1,nS=2,sS=3,aS=4,Nd=5,It=0,$r=null,tl=null,Ts=0,zb=0,Bb=-0,qb=null,rS=null,iS=null,Os=xd,oS=null,dC=50,Fc=0,Lb=null,Hb=!1,Sd=!1,hC=50,Pi=0,Yc=null,nl=!1,wd=null,lS=!1,cS=new Set,mC={},Ed=null,sl=null,Pb=!1,$b=!1,_d=!1,Ib=!1,Ir=0,Fb={};(function(){for(var e=0;e<nb.length;e++){var t=nb[e],n=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),xs(n,"on"+t)}xs(qx,"onAnimationEnd"),xs(Lx,"onAnimationIteration"),xs(Hx,"onAnimationStart"),xs("dblclick","onDoubleClick"),xs("focusin","onFocus"),xs("focusout","onBlur"),xs($D,"onTransitionRun"),xs(ID,"onTransitionStart"),xs(FD,"onTransitionCancel"),xs(Px,"onTransitionEnd")})(),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),Ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jc="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(" "),Yb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jc)),Ad="_reactListening"+Math.random().toString(36).slice(2),uS=!1,fS=!1,Dd=!1,dS=!1,Cd=!1,Td=!1,hS=!1,Od={},pC=/\r\n?/g,bC=/\u0000|\uFFFD/g,$i="http://www.w3.org/1999/xlink",Jb="http://www.w3.org/XML/1998/namespace",yC="javascript:throw new Error('React form unexpectedly submitted.')",gC="suppressHydrationWarning",Ii="&",Rd="/&",Gc="$",Qc="/$",Fr="$?",Fi="$~",al="$!",vC="html",xC="body",NC="head",Gb="F!",mS="F",pS="loading",SC="style",Ka=0,rl=1,jd=2,Qb=null,Xb=null,bS={dialog:!0,webview:!0},Zb=null,Xc=void 0,yS=typeof setTimeout=="function"?setTimeout:void 0,wC=typeof clearTimeout=="function"?clearTimeout:void 0,Yi=-1,gS=typeof Promise=="function"?Promise:void 0,EC=typeof queueMicrotask=="function"?queueMicrotask:typeof gS<"u"?function(e){return gS.resolve(null).then(e).catch(iA)}:yS,Kb=null,Ji=0,Zc=1,vS=2,xS=3,ms=4,ps=new Map,NS=new Set,Wa=rt.d;rt.d={f:function(){var e=Wa.f(),t=go();return e||t},r:function(e){var t=Un(e);t!==null&&t.tag===5&&t.type==="form"?Bg(t):Wa.r(e)},D:function(e){Wa.D(e),R1("dns-prefetch",e,null)},C:function(e,t){Wa.C(e,t),R1("preconnect",e,t)},L:function(e,t,n){Wa.L(e,t,n);var r=il;if(r&&e&&t){var l='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Ct(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Ct(n.imageSizes)+'"]')):l+='[href="'+Ct(e)+'"]';var c=l;switch(t){case"style":c=No(e);break;case"script":c=So(e)}ps.has(c)||(e=Pe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ps.set(c,e),r.querySelector(l)!==null||t==="style"&&r.querySelector(sc(c))||t==="script"&&r.querySelector(ac(c))||(t=r.createElement("link"),on(t,"link",e),jt(t),r.head.appendChild(t)))}},m:function(e,t){Wa.m(e,t);var n=il;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Ct(r)+'"][href="'+Ct(e)+'"]',c=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=So(e)}if(!ps.has(c)&&(e=Pe({rel:"modulepreload",href:e},t),ps.set(c,e),n.querySelector(l)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ac(c)))return}r=n.createElement("link"),on(r,"link",e),jt(r),n.head.appendChild(r)}}},X:function(e,t){Wa.X(e,t);var n=il;if(n&&e){var r=qs(n).hoistableScripts,l=So(e),c=r.get(l);c||(c=n.querySelector(ac(l)),c||(e=Pe({src:e,async:!0},t),(t=ps.get(l))&&xp(e,t),c=n.createElement("script"),jt(c),on(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},r.set(l,c))}},S:function(e,t,n){Wa.S(e,t,n);var r=il;if(r&&e){var l=qs(r).hoistableStyles,c=No(e);t=t||"default";var f=l.get(c);if(!f){var h={loading:Ji,preload:null};if(f=r.querySelector(sc(c)))h.loading=Zc|ms;else{e=Pe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ps.get(c))&&vp(e,n);var y=f=r.createElement("link");jt(y),on(y,"link",e),y._p=new Promise(function(v,k){y.onload=v,y.onerror=k}),y.addEventListener("load",function(){h.loading|=Zc}),y.addEventListener("error",function(){h.loading|=vS}),h.loading|=ms,Df(f,t,r)}f={type:"stylesheet",instance:f,count:1,state:h},l.set(c,f)}}},M:function(e,t){Wa.M(e,t);var n=il;if(n&&e){var r=qs(n).hoistableScripts,l=So(e),c=r.get(l);c||(c=n.querySelector(ac(l)),c||(e=Pe({src:e,async:!0,type:"module"},t),(t=ps.get(l))&&xp(e,t),c=n.createElement("script"),jt(c),on(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},r.set(l,c))}}};var il=typeof document>"u"?null:document,Md=null,_C=6e4,AC=800,DC=500,Wb=0,e0=null,kd=null,Gi=HA,Kc={$$typeof:la,Provider:null,Consumer:null,_currentValue:Gi,_currentValue2:Gi,_threadCount:0},SS="%c%s%c",wS="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",ES="",Vd=" ",CC=Function.prototype.bind,_S=!1,AS=null,DS=null,CS=null,TS=null,OS=null,RS=null,jS=null,MS=null,kS=null,VS=null;AS=function(e,t,n,r){t=i(e,t),t!==null&&(n=s(t.memoizedState,n,0,r),t.memoizedState=n,t.baseState=n,e.memoizedProps=Pe({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},DS=function(e,t,n){t=i(e,t),t!==null&&(n=u(t.memoizedState,n,0),t.memoizedState=n,t.baseState=n,e.memoizedProps=Pe({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},CS=function(e,t,n,r){t=i(e,t),t!==null&&(n=a(t.memoizedState,n,r),t.memoizedState=n,t.baseState=n,e.memoizedProps=Pe({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},TS=function(e,t,n){e.pendingProps=s(e.memoizedProps,t,0,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},OS=function(e,t){e.pendingProps=u(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},RS=function(e,t,n){e.pendingProps=a(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},jS=function(e){var t=dn(e,2);t!==null&&At(t,e,2)},MS=function(e){var t=Nl(),n=dn(e,t);n!==null&&At(n,e,t)},kS=function(e){p=e},VS=function(e){d=e};var Ud=!0,zd=null,t0=!1,Yr=null,Jr=null,Gr=null,Wc=new Map,eu=new Map,Qr=[],TC="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".split(" "),Bd=null;if(jf.prototype.render=Ap.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var n=arguments;typeof n[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):Z(n[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof n[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),n=e;var r=t.current,l=Hn(r);Np(r,l,n,t,null,null)},jf.prototype.unmount=Ap.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(Ze&(Qt|Gn))!==tn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),Np(e.current,2,null,e,null,null),go(),t[Ar]=null}},jf.prototype.unstable_scheduleHydration=function(e){if(e){var t=so();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&F1(e)}},(function(){var e=Dp.version;if(e!=="19.2.4")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
238
238
|
- react: `+(e+`
|
|
239
239
|
- react-dom: 19.2.4
|
|
240
|
-
Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),
|
|
241
|
-
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}tu.createRoot=function(e,t){if(!Z(e))throw Error("Target container is not a DOM element.");Q1(e);var n=!1,r="",l=
|
|
240
|
+
Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),rt.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=U(t),e=e!==null?ne(e):null,e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};return e.overrideHookState=AS,e.overrideHookStateDeletePath=DS,e.overrideHookStateRenamePath=CS,e.overrideProps=TS,e.overridePropsDeletePath=OS,e.overridePropsRenamePath=RS,e.scheduleUpdate=jS,e.scheduleRetry=MS,e.setErrorHandler=kS,e.setSuspenseHandler=VS,e.scheduleRefresh=q,e.scheduleRoot=z,e.setRefreshHandler=Y,e.getCurrentFiber=jA,wh(e)})()&&ha&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var US=window.location.protocol;/^(https?|file):$/.test(US)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(US==="file:"?`
|
|
241
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}tu.createRoot=function(e,t){if(!Z(e))throw Error("Target container is not a DOM element.");Q1(e);var n=!1,r="",l=Yg,c=Jg,f=Gg;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===oa&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
242
242
|
|
|
243
243
|
let root = createRoot(domContainer);
|
|
244
|
-
root.render(<App />);`),t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=B1(e,1,!1,null,null,n,r,null,l,c,f,G1),e[Ar]=t.current,ip(e),new _p(t)},tu.hydrateRoot=function(e,t,n){if(!Z(e))throw Error("Target container is not a DOM element.");Q1(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=!1,l="",c=Fg,f=Jg,h=Gg,y=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=B1(e,1,!0,t,n??null,r,l,y,c,f,h,G1),t.context=q1(null),n=t.current,r=Hn(n),r=El(r),l=pr(r),l.callback=null,br(n,l,r),Gs(r,"hydrateRoot()",null),n=r,t.current.lanes=n,li(t,n),ra(t),e[Ar]=t.current,ip(e),new jf(t)},tu.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),tu}var $S;function dT(){return $S||($S=1,n0.exports=fT()),n0.exports}var hT=dT();const mT="modulepreload",pT=function(i){return"/"+i},IS={},rt=function(s,a,o){let u=Promise.resolve();if(a&&a.length>0){let p=function(x){return Promise.all(x.map(_=>Promise.resolve(_).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));u=p(a.map(x=>{if(x=pT(x),x in IS)return;IS[x]=!0;const _=x.endsWith(".css"),w=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${x}"]${w}`))return;const D=document.createElement("link");if(D.rel=_?"stylesheet":mT,_||(D.as="script"),D.crossOrigin="",D.href=x,g&&D.setAttribute("nonce",g),document.head.appendChild(D),_)return new Promise((z,q)=>{D.addEventListener("load",z),D.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${x}`)))})}))}function d(p){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=p,window.dispatchEvent(m),!m.defaultPrevented)throw p}return u.then(p=>{for(const m of p||[])m.status==="rejected"&&d(m.reason);return s().catch(d)})};function eE(i){try{const s=i.split(".");if(s.length!==3)return null;const a=atob(s[1].replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(a)}catch{return null}}function tE(i){const s=eE(i);return!s||typeof s.exp!="number"?null:s.exp}function J0(i,s=0){const a=tE(i);return a===null?!0:Date.now()/1e3>=a-s}const N0="/api";let Kr=null;function Ld(i){Kr=i}function w6(){return Kr}async function YS(){const i=sessionStorage.getItem("lt_credentials");if(!i)return null;try{const{username:s,password:a}=JSON.parse(i),o=await fetch(`${N0}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:a})});if(!o.ok)return null;const u=await o.json();return u.token&&u.user&&sessionStorage.setItem("lt_user_info",JSON.stringify({displayName:u.user.display_name,username:u.user.external_id})),u.token??null}catch{return null}}let Xr=null;async function Nt(i,s={}){const a={"Content-Type":"application/json",...s.headers};if(Kr){if(J0(Kr)){Xr||(Xr=YS().finally(()=>{Xr=null}));const u=await Xr;if(u)Kr=u,window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:u}}));else throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired")}a.Authorization=`Bearer ${Kr}`}let o=await fetch(`${N0}${i}`,{...s,headers:a});if(o.status===401&&Kr){Xr||(Xr=YS().finally(()=>{Xr=null}));const u=await Xr;if(u&&(Kr=u,window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:u}})),a.Authorization=`Bearer ${u}`,o=await fetch(`${N0}${i}`,{...s,headers:a})),o.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired")}else if(o.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired");if(!o.ok){const u=await o.json().catch(()=>({error:o.statusText}));throw new Error(u.message||u.error||o.statusText)}return o.json()}const nE=B.createContext(null),bT=300;function r0(i,s){if(J0(i))return null;const a=eE(i);if(!a)return null;const o=s??(()=>{try{const u=sessionStorage.getItem("lt_user_info");return u?JSON.parse(u):null}catch{return null}})();return{userId:a.userId,displayName:(o==null?void 0:o.displayName)??null,username:(o==null?void 0:o.username)??null,roles:a.roles??[]}}function yT({children:i}){const[s,a]=B.useState(()=>{const w=sessionStorage.getItem("lt_token");return w?J0(w)?(sessionStorage.removeItem("lt_token"),null):(Ld(w),r0(w)):null}),o=B.useRef(void 0),u=B.useCallback(w=>{clearTimeout(o.current);const D=tE(w);if(!D)return;const z=(D-bT)*1e3-Date.now();z<=0||(o.current=setTimeout(async()=>{const q=sessionStorage.getItem("lt_credentials");if(q)try{const{username:F,password:Z}=JSON.parse(q),ee=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:F,password:Z})});if(!ee.ok)return;const te=await ee.json();te.token&&window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:te.token}}))}catch{}},z))},[]),d=B.useCallback((w,D,z)=>{const q={displayName:(z==null?void 0:z.displayName)??null,username:(z==null?void 0:z.username)??(D==null?void 0:D.username)??null},F=r0(w,q);F&&(Ld(w),sessionStorage.setItem("lt_token",w),sessionStorage.setItem("lt_user_info",JSON.stringify(q)),D&&sessionStorage.setItem("lt_credentials",JSON.stringify(D)),a(F),u(w))},[u]),p=B.useCallback(()=>{clearTimeout(o.current),Ld(null),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),a(null)},[]);B.useEffect(()=>{const w=()=>p(),D=z=>{var Z;const q=(Z=z.detail)==null?void 0:Z.token;if(!q)return;const F=r0(q);F&&(Ld(q),sessionStorage.setItem("lt_token",q),a(F),u(q))};return window.addEventListener("auth:unauthorized",w),window.addEventListener("auth:refreshed",D),()=>{window.removeEventListener("auth:unauthorized",w),window.removeEventListener("auth:refreshed",D)}},[p,u]),B.useEffect(()=>{const w=sessionStorage.getItem("lt_token");return w&&s&&u(w),()=>clearTimeout(o.current)},[]);const m=(s==null?void 0:s.roles.some(w=>w.type==="superadmin"))??!1,g=B.useCallback(w=>(s==null?void 0:s.roles.some(D=>D.role===w))??!1,[s]),x=B.useCallback(w=>(s==null?void 0:s.roles.some(D=>D.type===w))??!1,[s]),_=(s==null?void 0:s.roles.map(w=>w.role))??[];return b.jsxDEV(nE.Provider,{value:{user:s,isAuthenticated:!!s,isSuperAdmin:m,login:d,logout:p,hasRole:g,hasRoleType:x,userRoleNames:_},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useAuth.tsx",lineNumber:178,columnNumber:5},this)}function Ki(){const i=B.useContext(nE);if(!i)throw new Error("useAuth must be used within AuthProvider");return i}const es=new Uint8Array(0),Wi=new TextEncoder,Kn=new TextDecoder;function gT(...i){let s=0;for(let u=0;u<i.length;u++)s+=i[u].length;const a=new Uint8Array(s);let o=0;for(let u=0;u<i.length;u++)a.set(i[u],o),o+=i[u].length;return a}function fu(...i){const s=[];for(let a=0;a<i.length;a++)s.push(Wi.encode(i[a]));return s.length===0?es:s.length===1?s[0]:gT(...s)}function FS(i){return!i||i.length===0?"":Kn.decode(i)}const JS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",GS=36,vT=0xcfd41b9100000,QS=33,xT=333,XS=22;function NT(i){for(let s=0;s<i.length;s++)i[s]=Math.floor(Math.random()*255)}function ST(i){var s;(s=globalThis==null?void 0:globalThis.crypto)!=null&&s.getRandomValues?globalThis.crypto.getRandomValues(i):NT(i)}class wT{constructor(){S(this,"buf");S(this,"seq");S(this,"inc");S(this,"inited");this.buf=new Uint8Array(XS),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){this.seq=Math.floor(Math.random()*vT),this.inc=Math.floor(Math.random()*(xT-QS)+QS)}setPre(){const s=new Uint8Array(12);ST(s);for(let a=0;a<12;a++){const o=s[a]%36;this.buf[a]=JS.charCodeAt(o)}}fillSeq(){let s=this.seq;for(let a=XS-1;a>=12;a--)this.buf[a]=JS.charCodeAt(s%GS),s=Math.floor(s/GS)}next(){return this.inited||this.init(),this.seq+=this.inc,this.seq>0xcfd41b9100000&&(this.setPre(),this.initSeqAndInc()),this.fillSeq(),String.fromCharCode.apply(String,this.buf)}reset(){this.init()}}const ai=new wT;var tr;(function(i){i.Disconnect="disconnect",i.Reconnect="reconnect",i.Update="update",i.LDM="ldm",i.Error="error"})(tr||(tr={}));var ul;(function(i){i.Reconnecting="reconnecting",i.PingTimer="pingTimer",i.StaleConnection="staleConnection",i.ClientInitiatedReconnect="client initiated reconnect"})(ul||(ul={}));var ue;(function(i){i.ApiError="BAD API",i.BadAuthentication="BAD_AUTHENTICATION",i.BadCreds="BAD_CREDS",i.BadHeader="BAD_HEADER",i.BadJson="BAD_JSON",i.BadPayload="BAD_PAYLOAD",i.BadSubject="BAD_SUBJECT",i.Cancelled="CANCELLED",i.ConnectionClosed="CONNECTION_CLOSED",i.ConnectionDraining="CONNECTION_DRAINING",i.ConnectionRefused="CONNECTION_REFUSED",i.ConnectionTimeout="CONNECTION_TIMEOUT",i.Disconnect="DISCONNECT",i.InvalidOption="INVALID_OPTION",i.InvalidPayload="INVALID_PAYLOAD",i.MaxPayloadExceeded="MAX_PAYLOAD_EXCEEDED",i.NoResponders="503",i.NotFunction="NOT_FUNC",i.RequestError="REQUEST_ERROR",i.ServerOptionNotAvailable="SERVER_OPT_NA",i.SubClosed="SUB_CLOSED",i.SubDraining="SUB_DRAINING",i.Timeout="TIMEOUT",i.Tls="TLS",i.Unknown="UNKNOWN_ERROR",i.WssRequired="WSS_REQUIRED",i.JetStreamInvalidAck="JESTREAM_INVALID_ACK",i.JetStream404NoMessages="404",i.JetStream408RequestTimeout="408",i.JetStream409MaxAckPendingExceeded="409",i.JetStream409="409",i.JetStreamNotEnabled="503",i.JetStreamIdleHeartBeat="IDLE_HEARTBEAT",i.AuthorizationViolation="AUTHORIZATION_VIOLATION",i.AuthenticationExpired="AUTHENTICATION_EXPIRED",i.ProtocolError="NATS_PROTOCOL_ERR",i.PermissionsViolation="PERMISSIONS_VIOLATION",i.AuthenticationTimeout="AUTHENTICATION_TIMEOUT",i.AccountExpired="ACCOUNT_EXPIRED"})(ue||(ue={}));function ET(i){return typeof i.code=="string"}class sE{constructor(){S(this,"messages");this.messages=new Map,this.messages.set(ue.InvalidPayload,"Invalid payload type - payloads can be 'binary', 'string', or 'json'"),this.messages.set(ue.BadJson,"Bad JSON"),this.messages.set(ue.WssRequired,"TLS is required, therefore a secure websocket connection is also required")}static getMessage(s){return _T.getMessage(s)}getMessage(s){return this.messages.get(s)||s}}const _T=new sE;class ge extends Error{constructor(a,o,u){super(a);S(this,"name");S(this,"message");S(this,"code");S(this,"permissionContext");S(this,"chainedError");S(this,"api_error");this.name="NatsError",this.message=a,this.code=o,this.chainedError=u}static errorForCode(a,o){const u=sE.getMessage(a);return new ge(u,a,o)}isAuthError(){return this.code===ue.AuthenticationExpired||this.code===ue.AuthorizationViolation||this.code===ue.AccountExpired}isAuthTimeout(){return this.code===ue.AuthenticationTimeout}isPermissionError(){return this.code===ue.PermissionsViolation}isProtocolError(){return this.code===ue.ProtocolError}isJetStreamError(){return this.api_error!==void 0}jsError(){return this.api_error?this.api_error:null}}var Xn;(function(i){i[i.Exact=0]="Exact",i[i.CanonicalMIME=1]="CanonicalMIME",i[i.IgnoreCase=2]="IgnoreCase"})(Xn||(Xn={}));var Ms;(function(i){i.Timer="timer",i.Count="count",i.JitterTimer="jitterTimer",i.SentinelMsg="sentinelMsg"})(Ms||(Ms={}));var du;(function(i){i.STATS="io.nats.micro.v1.stats_response",i.INFO="io.nats.micro.v1.info_response",i.PING="io.nats.micro.v1.ping_response"})(du||(du={}));const ah="Nats-Service-Error",rh="Nats-Service-Error-Code";class ih extends Error{constructor(a,o){super(o);S(this,"code");this.code=a}static isServiceError(a){return ih.toServiceError(a)!==null}static toServiceError(a){var u,d;const o=((u=a==null?void 0:a.headers)==null?void 0:u.get(rh))||"";if(o!==""){const p=parseInt(o)||400,m=((d=a==null?void 0:a.headers)==null?void 0:d.get(ah))||"";return new ih(p,m.length?m:o)}return null}}function nr(i=""){if(i=i||"_INBOX",typeof i!="string")throw new Error("prefix must be a string");return i.split(".").forEach(s=>{if(s==="*"||s===">")throw new Error(`inbox prefixes cannot have wildcards '${i}'`)}),`${i}.${ai.next()}`}const S0="127.0.0.1";var ei;(function(i){i.PING="PING",i.STATS="STATS",i.INFO="INFO"})(ei||(ei={}));function ph(i,...s){for(let a=0;a<s.length;a++){const o=s[a];Object.keys(o).forEach(function(u){i[u]=o[u]})}return i}function Hd(i){return Kn.decode(i).replace(/\n/g,"␊").replace(/\r/g,"␍")}function pl(i,s=!0){const a=s?ge.errorForCode(ue.Timeout):null;let o,u;const d=new Promise((p,m)=>{o={cancel:()=>{u&&clearTimeout(u)}},u=setTimeout(()=>{m(a===null?ge.errorForCode(ue.Timeout):a)},i)});return Object.assign(d,o)}function gl(i=0){let s;const a=new Promise(o=>{const u=setTimeout(()=>{o()},i);s={cancel:()=>{u&&clearTimeout(u)}}});return Object.assign(a,s)}function _t(){let i={};const s=new Promise((a,o)=>{i={resolve:a,reject:o}});return Object.assign(s,i)}function aE(i){for(let s=i.length-1;s>0;s--){const a=Math.floor(Math.random()*(s+1));[i[s],i[a]]=[i[a],i[s]]}return i}function AT(i){return i===0?0:Math.floor(i/2+Math.random()*i)}function G0(i=[0,250,250,500,500,3e3,5e3]){Array.isArray(i)||(i=[0,250,250,500,500,3e3,5e3]);const s=i.length-1;return{backoff(a){return AT(a>s?i[s]:i[a])}}}function Et(i){return i*1e6}function Q0(i){return Math.floor(i/1e6)}function ZS(i){let o=!0;const u=new Array(i.length);for(let d=0;d<i.length;d++){let p=i.charCodeAt(d);if(p===58||p<33||p>126)throw new ge(`'${i[d]}' is not a valid character for a header key`,ue.BadHeader);o&&97<=p&&p<=122?p-=32:!o&&65<=p&&p<=90&&(p+=32),u[d]=p,o=p==45}return String.fromCharCode(...u)}function sr(i=0,s=""){if(i===0&&s!==""||i>0&&s==="")throw new Error("setting status requires both code and description");return new ti(i,s)}const i0="NATS/1.0";class ti{constructor(s=0,a=""){S(this,"_code");S(this,"headers");S(this,"_description");this._code=s,this._description=a,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals(s){if(s&&this.headers.size===s.headers.size&&this._code===s._code){for(const[a,o]of this.headers){const u=s.values(a);if(o.length!==u.length)return!1;const d=[...o].sort(),p=[...u].sort();for(let m=0;m<d.length;m++)if(d[m]!==p[m])return!1}return!0}return!1}static decode(s){const a=new ti,u=Kn.decode(s).split(`\r
|
|
245
|
-
`),d=u[0];if(d!==
|
|
244
|
+
root.render(<App />);`),t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=B1(e,1,!1,null,null,n,r,null,l,c,f,G1),e[Ar]=t.current,op(e),new Ap(t)},tu.hydrateRoot=function(e,t,n){if(!Z(e))throw Error("Target container is not a DOM element.");Q1(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=!1,l="",c=Yg,f=Jg,h=Gg,y=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=B1(e,1,!0,t,n??null,r,l,y,c,f,h,G1),t.context=q1(null),n=t.current,r=Hn(n),r=El(r),l=pr(r),l.callback=null,br(n,l,r),Gs(r,"hydrateRoot()",null),n=r,t.current.lanes=n,li(t,n),ra(t),e[Ar]=t.current,op(e),new jf(t)},tu.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),tu}var $S;function hT(){return $S||($S=1,s0.exports=dT()),s0.exports}var mT=hT();const pT="modulepreload",bT=function(i){return"/"+i},IS={},tt=function(s,a,o){let u=Promise.resolve();if(a&&a.length>0){let p=function(x){return Promise.all(x.map(_=>Promise.resolve(_).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));u=p(a.map(x=>{if(x=bT(x),x in IS)return;IS[x]=!0;const _=x.endsWith(".css"),w=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${x}"]${w}`))return;const D=document.createElement("link");if(D.rel=_?"stylesheet":pT,_||(D.as="script"),D.crossOrigin="",D.href=x,g&&D.setAttribute("nonce",g),document.head.appendChild(D),_)return new Promise((z,q)=>{D.addEventListener("load",z),D.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${x}`)))})}))}function d(p){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=p,window.dispatchEvent(m),!m.defaultPrevented)throw p}return u.then(p=>{for(const m of p||[])m.status==="rejected"&&d(m.reason);return s().catch(d)})};function eE(i){try{const s=i.split(".");if(s.length!==3)return null;const a=atob(s[1].replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(a)}catch{return null}}function tE(i){const s=eE(i);return!s||typeof s.exp!="number"?null:s.exp}function G0(i,s=0){const a=tE(i);return a===null?!0:Date.now()/1e3>=a-s}const S0="/api";let Kr=null;function Ld(i){Kr=i}function D6(){return Kr}async function FS(){const i=sessionStorage.getItem("lt_credentials");if(!i)return null;try{const{username:s,password:a}=JSON.parse(i),o=await fetch(`${S0}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:a})});if(!o.ok)return null;const u=await o.json();return u.token&&u.user&&sessionStorage.setItem("lt_user_info",JSON.stringify({displayName:u.user.display_name,username:u.user.external_id})),u.token??null}catch{return null}}let Xr=null;async function Nt(i,s={}){const a={"Content-Type":"application/json",...s.headers};if(Kr){if(G0(Kr)){Xr||(Xr=FS().finally(()=>{Xr=null}));const u=await Xr;if(u)Kr=u,window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:u}}));else throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired")}a.Authorization=`Bearer ${Kr}`}let o=await fetch(`${S0}${i}`,{...s,headers:a});if(o.status===401&&Kr){Xr||(Xr=FS().finally(()=>{Xr=null}));const u=await Xr;if(u&&(Kr=u,window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:u}})),a.Authorization=`Bearer ${u}`,o=await fetch(`${S0}${i}`,{...s,headers:a})),o.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired")}else if(o.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired");if(!o.ok){const u=await o.json().catch(()=>({error:o.statusText}));throw new Error(u.message||u.error||o.statusText)}return o.json()}const nE=B.createContext(null),yT=300;function i0(i,s){if(G0(i))return null;const a=eE(i);if(!a)return null;const o=s??(()=>{try{const u=sessionStorage.getItem("lt_user_info");return u?JSON.parse(u):null}catch{return null}})();return{userId:a.userId,displayName:(o==null?void 0:o.displayName)??null,username:(o==null?void 0:o.username)??null,roles:a.roles??[]}}function gT({children:i}){const[s,a]=B.useState(()=>{const w=sessionStorage.getItem("lt_token");return w?G0(w)?(sessionStorage.removeItem("lt_token"),null):(Ld(w),i0(w)):null}),o=B.useRef(void 0),u=B.useCallback(w=>{clearTimeout(o.current);const D=tE(w);if(!D)return;const z=(D-yT)*1e3-Date.now();z<=0||(o.current=setTimeout(async()=>{const q=sessionStorage.getItem("lt_credentials");if(q)try{const{username:Y,password:Z}=JSON.parse(q),ee=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Y,password:Z})});if(!ee.ok)return;const te=await ee.json();te.token&&window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:te.token}}))}catch{}},z))},[]),d=B.useCallback((w,D,z)=>{const q={displayName:(z==null?void 0:z.displayName)??null,username:(z==null?void 0:z.username)??(D==null?void 0:D.username)??null},Y=i0(w,q);Y&&(Ld(w),sessionStorage.setItem("lt_token",w),sessionStorage.setItem("lt_user_info",JSON.stringify(q)),D&&sessionStorage.setItem("lt_credentials",JSON.stringify(D)),a(Y),u(w))},[u]),p=B.useCallback(()=>{clearTimeout(o.current),Ld(null),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),a(null)},[]);B.useEffect(()=>{const w=()=>p(),D=z=>{var Z;const q=(Z=z.detail)==null?void 0:Z.token;if(!q)return;const Y=i0(q);Y&&(Ld(q),sessionStorage.setItem("lt_token",q),a(Y),u(q))};return window.addEventListener("auth:unauthorized",w),window.addEventListener("auth:refreshed",D),()=>{window.removeEventListener("auth:unauthorized",w),window.removeEventListener("auth:refreshed",D)}},[p,u]),B.useEffect(()=>{const w=sessionStorage.getItem("lt_token");return w&&s&&u(w),()=>clearTimeout(o.current)},[]);const m=(s==null?void 0:s.roles.some(w=>w.type==="superadmin"))??!1,g=B.useCallback(w=>(s==null?void 0:s.roles.some(D=>D.role===w))??!1,[s]),x=B.useCallback(w=>(s==null?void 0:s.roles.some(D=>D.type===w))??!1,[s]),_=(s==null?void 0:s.roles.map(w=>w.role))??[];return b.jsxDEV(nE.Provider,{value:{user:s,isAuthenticated:!!s,isSuperAdmin:m,login:d,logout:p,hasRole:g,hasRoleType:x,userRoleNames:_},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useAuth.tsx",lineNumber:178,columnNumber:5},this)}function Ki(){const i=B.useContext(nE);if(!i)throw new Error("useAuth must be used within AuthProvider");return i}const es=new Uint8Array(0),Wi=new TextEncoder,Kn=new TextDecoder;function vT(...i){let s=0;for(let u=0;u<i.length;u++)s+=i[u].length;const a=new Uint8Array(s);let o=0;for(let u=0;u<i.length;u++)a.set(i[u],o),o+=i[u].length;return a}function fu(...i){const s=[];for(let a=0;a<i.length;a++)s.push(Wi.encode(i[a]));return s.length===0?es:s.length===1?s[0]:vT(...s)}function YS(i){return!i||i.length===0?"":Kn.decode(i)}const JS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",GS=36,xT=0xcfd41b9100000,QS=33,NT=333,XS=22;function ST(i){for(let s=0;s<i.length;s++)i[s]=Math.floor(Math.random()*255)}function wT(i){var s;(s=globalThis==null?void 0:globalThis.crypto)!=null&&s.getRandomValues?globalThis.crypto.getRandomValues(i):ST(i)}class ET{constructor(){S(this,"buf");S(this,"seq");S(this,"inc");S(this,"inited");this.buf=new Uint8Array(XS),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){this.seq=Math.floor(Math.random()*xT),this.inc=Math.floor(Math.random()*(NT-QS)+QS)}setPre(){const s=new Uint8Array(12);wT(s);for(let a=0;a<12;a++){const o=s[a]%36;this.buf[a]=JS.charCodeAt(o)}}fillSeq(){let s=this.seq;for(let a=XS-1;a>=12;a--)this.buf[a]=JS.charCodeAt(s%GS),s=Math.floor(s/GS)}next(){return this.inited||this.init(),this.seq+=this.inc,this.seq>0xcfd41b9100000&&(this.setPre(),this.initSeqAndInc()),this.fillSeq(),String.fromCharCode.apply(String,this.buf)}reset(){this.init()}}const ai=new ET;var tr;(function(i){i.Disconnect="disconnect",i.Reconnect="reconnect",i.Update="update",i.LDM="ldm",i.Error="error"})(tr||(tr={}));var ul;(function(i){i.Reconnecting="reconnecting",i.PingTimer="pingTimer",i.StaleConnection="staleConnection",i.ClientInitiatedReconnect="client initiated reconnect"})(ul||(ul={}));var ue;(function(i){i.ApiError="BAD API",i.BadAuthentication="BAD_AUTHENTICATION",i.BadCreds="BAD_CREDS",i.BadHeader="BAD_HEADER",i.BadJson="BAD_JSON",i.BadPayload="BAD_PAYLOAD",i.BadSubject="BAD_SUBJECT",i.Cancelled="CANCELLED",i.ConnectionClosed="CONNECTION_CLOSED",i.ConnectionDraining="CONNECTION_DRAINING",i.ConnectionRefused="CONNECTION_REFUSED",i.ConnectionTimeout="CONNECTION_TIMEOUT",i.Disconnect="DISCONNECT",i.InvalidOption="INVALID_OPTION",i.InvalidPayload="INVALID_PAYLOAD",i.MaxPayloadExceeded="MAX_PAYLOAD_EXCEEDED",i.NoResponders="503",i.NotFunction="NOT_FUNC",i.RequestError="REQUEST_ERROR",i.ServerOptionNotAvailable="SERVER_OPT_NA",i.SubClosed="SUB_CLOSED",i.SubDraining="SUB_DRAINING",i.Timeout="TIMEOUT",i.Tls="TLS",i.Unknown="UNKNOWN_ERROR",i.WssRequired="WSS_REQUIRED",i.JetStreamInvalidAck="JESTREAM_INVALID_ACK",i.JetStream404NoMessages="404",i.JetStream408RequestTimeout="408",i.JetStream409MaxAckPendingExceeded="409",i.JetStream409="409",i.JetStreamNotEnabled="503",i.JetStreamIdleHeartBeat="IDLE_HEARTBEAT",i.AuthorizationViolation="AUTHORIZATION_VIOLATION",i.AuthenticationExpired="AUTHENTICATION_EXPIRED",i.ProtocolError="NATS_PROTOCOL_ERR",i.PermissionsViolation="PERMISSIONS_VIOLATION",i.AuthenticationTimeout="AUTHENTICATION_TIMEOUT",i.AccountExpired="ACCOUNT_EXPIRED"})(ue||(ue={}));function _T(i){return typeof i.code=="string"}class sE{constructor(){S(this,"messages");this.messages=new Map,this.messages.set(ue.InvalidPayload,"Invalid payload type - payloads can be 'binary', 'string', or 'json'"),this.messages.set(ue.BadJson,"Bad JSON"),this.messages.set(ue.WssRequired,"TLS is required, therefore a secure websocket connection is also required")}static getMessage(s){return AT.getMessage(s)}getMessage(s){return this.messages.get(s)||s}}const AT=new sE;class ge extends Error{constructor(a,o,u){super(a);S(this,"name");S(this,"message");S(this,"code");S(this,"permissionContext");S(this,"chainedError");S(this,"api_error");this.name="NatsError",this.message=a,this.code=o,this.chainedError=u}static errorForCode(a,o){const u=sE.getMessage(a);return new ge(u,a,o)}isAuthError(){return this.code===ue.AuthenticationExpired||this.code===ue.AuthorizationViolation||this.code===ue.AccountExpired}isAuthTimeout(){return this.code===ue.AuthenticationTimeout}isPermissionError(){return this.code===ue.PermissionsViolation}isProtocolError(){return this.code===ue.ProtocolError}isJetStreamError(){return this.api_error!==void 0}jsError(){return this.api_error?this.api_error:null}}var Xn;(function(i){i[i.Exact=0]="Exact",i[i.CanonicalMIME=1]="CanonicalMIME",i[i.IgnoreCase=2]="IgnoreCase"})(Xn||(Xn={}));var Ms;(function(i){i.Timer="timer",i.Count="count",i.JitterTimer="jitterTimer",i.SentinelMsg="sentinelMsg"})(Ms||(Ms={}));var du;(function(i){i.STATS="io.nats.micro.v1.stats_response",i.INFO="io.nats.micro.v1.info_response",i.PING="io.nats.micro.v1.ping_response"})(du||(du={}));const ah="Nats-Service-Error",rh="Nats-Service-Error-Code";class ih extends Error{constructor(a,o){super(o);S(this,"code");this.code=a}static isServiceError(a){return ih.toServiceError(a)!==null}static toServiceError(a){var u,d;const o=((u=a==null?void 0:a.headers)==null?void 0:u.get(rh))||"";if(o!==""){const p=parseInt(o)||400,m=((d=a==null?void 0:a.headers)==null?void 0:d.get(ah))||"";return new ih(p,m.length?m:o)}return null}}function nr(i=""){if(i=i||"_INBOX",typeof i!="string")throw new Error("prefix must be a string");return i.split(".").forEach(s=>{if(s==="*"||s===">")throw new Error(`inbox prefixes cannot have wildcards '${i}'`)}),`${i}.${ai.next()}`}const w0="127.0.0.1";var ei;(function(i){i.PING="PING",i.STATS="STATS",i.INFO="INFO"})(ei||(ei={}));function ph(i,...s){for(let a=0;a<s.length;a++){const o=s[a];Object.keys(o).forEach(function(u){i[u]=o[u]})}return i}function Hd(i){return Kn.decode(i).replace(/\n/g,"␊").replace(/\r/g,"␍")}function pl(i,s=!0){const a=s?ge.errorForCode(ue.Timeout):null;let o,u;const d=new Promise((p,m)=>{o={cancel:()=>{u&&clearTimeout(u)}},u=setTimeout(()=>{m(a===null?ge.errorForCode(ue.Timeout):a)},i)});return Object.assign(d,o)}function gl(i=0){let s;const a=new Promise(o=>{const u=setTimeout(()=>{o()},i);s={cancel:()=>{u&&clearTimeout(u)}}});return Object.assign(a,s)}function _t(){let i={};const s=new Promise((a,o)=>{i={resolve:a,reject:o}});return Object.assign(s,i)}function aE(i){for(let s=i.length-1;s>0;s--){const a=Math.floor(Math.random()*(s+1));[i[s],i[a]]=[i[a],i[s]]}return i}function DT(i){return i===0?0:Math.floor(i/2+Math.random()*i)}function Q0(i=[0,250,250,500,500,3e3,5e3]){Array.isArray(i)||(i=[0,250,250,500,500,3e3,5e3]);const s=i.length-1;return{backoff(a){return DT(a>s?i[s]:i[a])}}}function Et(i){return i*1e6}function X0(i){return Math.floor(i/1e6)}function ZS(i){let o=!0;const u=new Array(i.length);for(let d=0;d<i.length;d++){let p=i.charCodeAt(d);if(p===58||p<33||p>126)throw new ge(`'${i[d]}' is not a valid character for a header key`,ue.BadHeader);o&&97<=p&&p<=122?p-=32:!o&&65<=p&&p<=90&&(p+=32),u[d]=p,o=p==45}return String.fromCharCode(...u)}function sr(i=0,s=""){if(i===0&&s!==""||i>0&&s==="")throw new Error("setting status requires both code and description");return new ti(i,s)}const o0="NATS/1.0";class ti{constructor(s=0,a=""){S(this,"_code");S(this,"headers");S(this,"_description");this._code=s,this._description=a,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals(s){if(s&&this.headers.size===s.headers.size&&this._code===s._code){for(const[a,o]of this.headers){const u=s.values(a);if(o.length!==u.length)return!1;const d=[...o].sort(),p=[...u].sort();for(let m=0;m<d.length;m++)if(d[m]!==p[m])return!1}return!0}return!1}static decode(s){const a=new ti,u=Kn.decode(s).split(`\r
|
|
245
|
+
`),d=u[0];if(d!==o0){let p=d.replace(o0,"").trim();if(p.length>0){a._code=parseInt(p,10),isNaN(a._code)&&(a._code=0);const m=a._code.toString();p=p.replace(m,""),a._description=p.trim()}}return u.length>=1&&u.slice(1).map(p=>{if(p){const m=p.indexOf(":");if(m>-1){const g=p.slice(0,m),x=p.slice(m+1).trim();a.append(g,x)}}}),a}toString(){if(this.headers.size===0&&this._code===0)return"";let s=o0;this._code>0&&this._description!==""&&(s+=` ${this._code} ${this._description}`);for(const[a,o]of this.headers)for(let u=0;u<o.length;u++)s=`${s}\r
|
|
246
246
|
${a}: ${o[u]}`;return`${s}\r
|
|
247
247
|
\r
|
|
248
|
-
`}encode(){return Wi.encode(this.toString())}static validHeaderValue(s){if(/[\r\n]/.test(s))throw new ge("invalid header value - \\r and \\n are not allowed.",ue.BadHeader);return s.trim()}keys(){const s=[];for(const a of this.headers.keys())s.push(a);return s}findKeys(s,a=Xn.Exact){const o=this.keys();switch(a){case Xn.Exact:return o.filter(u=>u===s);case Xn.CanonicalMIME:return s=ZS(s),o.filter(u=>u===s);default:{const u=s.toLowerCase();return o.filter(d=>u===d.toLowerCase())}}}get(s,a=Xn.Exact){const o=this.findKeys(s,a);if(o.length){const u=this.headers.get(o[0]);if(u)return Array.isArray(u)?u[0]:u}return""}last(s,a=Xn.Exact){const o=this.findKeys(s,a);if(o.length){const u=this.headers.get(o[0]);if(u)return Array.isArray(u)?u[u.length-1]:u}return""}has(s,a=Xn.Exact){return this.findKeys(s,a).length>0}set(s,a,o=Xn.Exact){this.delete(s,o),this.append(s,a,o)}append(s,a,o=Xn.Exact){const u=ZS(s);o===Xn.CanonicalMIME&&(s=u);const d=this.findKeys(s,o);s=d.length>0?d[0]:s;const p=ti.validHeaderValue(a);let m=this.headers.get(s);m||(m=[],this.headers.set(s,m)),m.push(p)}values(s,a=Xn.Exact){const o=[];return this.findKeys(s,a).forEach(d=>{const p=this.headers.get(d);p&&o.push(...p)}),o}delete(s,a=Xn.Exact){this.findKeys(s,a).forEach(u=>{this.headers.delete(u)})}get hasError(){return this._code>=300}get status(){return`${this._code} ${this._description}`.trim()}toRecord(){const s={};return this.keys().forEach(a=>{s[a]=this.values(a)}),s}get code(){return this._code}get description(){return this._description}static fromRecord(s){const a=new ti;for(const o in s)a.headers.set(o,s[o]);return a}}function
|
|
248
|
+
`}encode(){return Wi.encode(this.toString())}static validHeaderValue(s){if(/[\r\n]/.test(s))throw new ge("invalid header value - \\r and \\n are not allowed.",ue.BadHeader);return s.trim()}keys(){const s=[];for(const a of this.headers.keys())s.push(a);return s}findKeys(s,a=Xn.Exact){const o=this.keys();switch(a){case Xn.Exact:return o.filter(u=>u===s);case Xn.CanonicalMIME:return s=ZS(s),o.filter(u=>u===s);default:{const u=s.toLowerCase();return o.filter(d=>u===d.toLowerCase())}}}get(s,a=Xn.Exact){const o=this.findKeys(s,a);if(o.length){const u=this.headers.get(o[0]);if(u)return Array.isArray(u)?u[0]:u}return""}last(s,a=Xn.Exact){const o=this.findKeys(s,a);if(o.length){const u=this.headers.get(o[0]);if(u)return Array.isArray(u)?u[u.length-1]:u}return""}has(s,a=Xn.Exact){return this.findKeys(s,a).length>0}set(s,a,o=Xn.Exact){this.delete(s,o),this.append(s,a,o)}append(s,a,o=Xn.Exact){const u=ZS(s);o===Xn.CanonicalMIME&&(s=u);const d=this.findKeys(s,o);s=d.length>0?d[0]:s;const p=ti.validHeaderValue(a);let m=this.headers.get(s);m||(m=[],this.headers.set(s,m)),m.push(p)}values(s,a=Xn.Exact){const o=[];return this.findKeys(s,a).forEach(d=>{const p=this.headers.get(d);p&&o.push(...p)}),o}delete(s,a=Xn.Exact){this.findKeys(s,a).forEach(u=>{this.headers.delete(u)})}get hasError(){return this._code>=300}get status(){return`${this._code} ${this._description}`.trim()}toRecord(){const s={};return this.keys().forEach(a=>{s[a]=this.values(a)}),s}get code(){return this._code}get description(){return this._description}static fromRecord(s){const a=new ti;for(const o in s)a.headers.set(o,s[o]);return a}}function E0(){return{encode(i){return Wi.encode(i)},decode(i){return Kn.decode(i)}}}function ks(i){return{encode(s){try{return s===void 0&&(s=null),Wi.encode(JSON.stringify(s))}catch(a){throw ge.errorForCode(ue.BadJson,a)}},decode(s){try{return JSON.parse(Kn.decode(s),i)}catch(a){throw ge.errorForCode(ue.BadJson,a)}}}}function rE(i){var s;return i&&i.data.length===0&&((s=i.headers)==null?void 0:s.code)===503?ge.errorForCode(ue.NoResponders):null}class Z0{constructor(s,a,o){S(this,"_headers");S(this,"_msg");S(this,"_rdata");S(this,"_reply");S(this,"_subject");S(this,"publisher");this._msg=s,this._rdata=a,this.publisher=o}get subject(){return this._subject?this._subject:(this._subject=Kn.decode(this._msg.subject),this._subject)}get reply(){return this._reply?this._reply:(this._reply=Kn.decode(this._msg.reply),this._reply)}get sid(){return this._msg.sid}get headers(){if(this._msg.hdr>-1&&!this._headers){const s=this._rdata.subarray(0,this._msg.hdr);this._headers=ti.decode(s)}return this._headers}get data(){return this._rdata?this._msg.hdr>-1?this._rdata.subarray(this._msg.hdr):this._rdata:new Uint8Array(0)}respond(s=es,a){return this.reply?(this.publisher.publish(this.reply,s,a),!0):!1}size(){var u;const s=this._msg.subject.length,a=((u=this._msg.reply)==null?void 0:u.length)||0,o=this._msg.size===-1?0:this._msg.size;return s+a+o}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}requestInfo(){var a;const s=(a=this.headers)==null?void 0:a.get("Nats-Request-Info");return s?JSON.parse(s,function(o,u){return(o==="start"||o==="stop")&&u!==""?new Date(Date.parse(u)):u}):null}}S(Z0,"jc");function fl(i){return bh("durable",i)}function _n(i){return bh("stream",i)}function bh(i,s=""){if(s==="")throw Error(`${i} name required`);return[".","*",">","/","\\"," "," ",`
|
|
249
249
|
`,"\r"].forEach(o=>{if(s.indexOf(o)!==-1){switch(o){case`
|
|
250
|
-
`:o="\\n";break;case"\r":o="\\r";break;case" ":o="\\t";break}throw Error(`invalid ${i} name - ${i} name cannot contain '${o}'`)}}),""}function ou(i,s=""){if(s==="")throw Error(`${i} name required`);const a=DT(s);if(a.length)throw new Error(`invalid ${i} name - ${i} name ${a}`)}function DT(i=""){if(i==="")throw Error("name required");const s=/^[-\w]+$/g;if(i.match(s)===null){for(const o of i.split(""))if(o.match(s)===null)return`cannot contain '${o}'`}return""}function E0(i){if(i.data.length>0)return!1;const s=i.headers;return s?s.code>=100&&s.code<200:!1}function _0(i){var s;return E0(i)&&((s=i.headers)==null?void 0:s.description)==="Idle Heartbeat"}function CT(i,s,a){const o=sr(i,s),u={hdr:1,sid:0,size:0},d=new X0(u,es,{});return d._headers=o,d._subject=a,d}function dl(i){if(i.data.length!==0)return null;const s=i.headers;return s?iE(s.code,s.description):null}var ys;(function(i){i.MaxBatchExceeded="exceeded maxrequestbatch of",i.MaxExpiresExceeded="exceeded maxrequestexpires of",i.MaxBytesExceeded="exceeded maxrequestmaxbytes of",i.MaxMessageSizeExceeded="message size exceeds maxbytes",i.PushConsumer="consumer is push based",i.MaxWaitingExceeded="exceeded maxwaiting",i.IdleHeartbeatMissed="idle heartbeats missed",i.ConsumerDeleted="consumer deleted"})(ys||(ys={}));function TT(i){return i.code!==ue.JetStream409?!1:[ys.MaxBatchExceeded,ys.MaxExpiresExceeded,ys.MaxBytesExceeded,ys.MaxMessageSizeExceeded,ys.PushConsumer,ys.IdleHeartbeatMissed,ys.ConsumerDeleted].find(a=>i.message.indexOf(a)!==-1)!==void 0}function iE(i,s=""){if(i<300)return null;switch(s=s.toLowerCase(),i){case 404:return new ge(s,ue.JetStream404NoMessages);case 408:return new ge(s,ue.JetStream408RequestTimeout);case 409:{const a=s.startsWith(ys.IdleHeartbeatMissed)?ue.JetStreamIdleHeartBeat:ue.JetStream409;return new ge(s,a)}case 503:return ge.errorForCode(ue.JetStreamNotEnabled,new Error(s));default:return s===""&&(s=ue.Unknown),new ge(s,`${i}`)}}class sn{constructor(){S(this,"inflight");S(this,"processed");S(this,"received");S(this,"noIterator");S(this,"iterClosed");S(this,"done");S(this,"signal");S(this,"yields");S(this,"filtered");S(this,"pendingFiltered");S(this,"ingestionFilterFn");S(this,"protocolFilterFn");S(this,"dispatchedFn");S(this,"ctx");S(this,"_data");S(this,"err");S(this,"time");S(this,"yielding");this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=_t(),this.yields=[],this.iterClosed=_t(),this.time=0,this.yielding=!1}[Symbol.asyncIterator](){return this.iterate()}push(s){if(this.done)return;if(typeof s=="function"){this.yields.push(s),this.signal.resolve();return}const{ingest:a,protocol:o}=this.ingestionFilterFn?this.ingestionFilterFn(s,this.ctx||this):{ingest:!0,protocol:!1};a&&(o&&(this.filtered++,this.pendingFiltered++),this.yields.push(s),this.signal.resolve())}async*iterate(){if(this.noIterator)throw new ge("unsupported iterator",ue.ApiError);if(this.yielding)throw new ge("already yielding",ue.ApiError);this.yielding=!0;try{for(;;){if(this.yields.length===0&&await this.signal,this.err)throw this.err;const s=this.yields;this.inflight=s.length,this.yields=[];for(let a=0;a<s.length;a++){if(typeof s[a]=="function"){const u=s[a];try{u()}catch(d){throw d}if(this.err)throw this.err;continue}if(this.protocolFilterFn?this.protocolFilterFn(s[a]):!0){this.processed++;const u=Date.now();yield s[a],this.time=Date.now()-u,this.dispatchedFn&&s[a]&&this.dispatchedFn(s[a])}else this.pendingFiltered--;this.inflight--}if(this.done)break;this.yields.length===0&&(s.length=0,this.yields=s,this.signal=_t())}}finally{this.stop()}}stop(s){this.done||(this.err=s,this.done=!0,this.signal.resolve(),this.iterClosed.resolve(s))}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}class Z0{constructor(s,a,o={maxOut:2}){S(this,"interval");S(this,"maxOut");S(this,"cancelAfter");S(this,"timer");S(this,"autoCancelTimer");S(this,"last");S(this,"missed");S(this,"count");S(this,"callback");this.interval=s,this.maxOut=(o==null?void 0:o.maxOut)||2,this.cancelAfter=(o==null?void 0:o.cancelAfter)||0,this.last=Date.now(),this.missed=0,this.count=0,this.callback=a,this._schedule()}cancel(){this.autoCancelTimer&&clearTimeout(this.autoCancelTimer),this.timer&&clearInterval(this.timer),this.timer=0,this.autoCancelTimer=0,this.missed=0}work(){this.last=Date.now(),this.missed=0}_change(s,a=0,o=2){this.interval=s,this.maxOut=o,this.cancelAfter=a,this.restart()}restart(){this.cancel(),this._schedule()}_schedule(){this.cancelAfter>0&&(this.autoCancelTimer=setTimeout(()=>{this.cancel()},this.cancelAfter)),this.timer=setInterval(()=>{if(this.count++,Date.now()-this.last>this.interval&&this.missed++,this.missed>=this.maxOut)try{this.callback(this.missed)===!0&&this.cancel()}catch(s){console.log(s)}},this.interval)}}var A0;(function(i){i.Limits="limits",i.Interest="interest",i.Workqueue="workqueue"})(A0||(A0={}));var bu;(function(i){i.Old="old",i.New="new"})(bu||(bu={}));var D0;(function(i){i.File="file",i.Memory="memory"})(D0||(D0={}));var Vt;(function(i){i.All="all",i.Last="last",i.New="new",i.StartSequence="by_start_sequence",i.StartTime="by_start_time",i.LastPerSubject="last_per_subject"})(Vt||(Vt={}));var nn;(function(i){i.None="none",i.All="all",i.Explicit="explicit",i.NotSet=""})(nn||(nn={}));var bl;(function(i){i.Instant="instant",i.Original="original"})(bl||(bl={}));var ri;(function(i){i.None="none",i.S2="s2"})(ri||(ri={}));var oh;(function(i){i.CreateOrUpdate="",i.Update="update",i.Create="create"})(oh||(oh={}));function OT(i,s={}){return Object.assign({name:i,deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:bl.Instant},s)}var KS;(function(i){i.API="api_audit",i.StreamAction="stream_action",i.ConsumerAction="consumer_action",i.SnapshotCreate="snapshot_create",i.SnapshotComplete="snapshot_complete",i.RestoreCreate="restore_create",i.RestoreComplete="restore_complete",i.MaxDeliver="max_deliver",i.Terminated="terminated",i.Ack="consumer_ack",i.StreamLeaderElected="stream_leader_elected",i.StreamQuorumLost="stream_quorum_lost",i.ConsumerLeaderElected="consumer_leader_elected",i.ConsumerQuorumLost="consumer_quorum_lost"})(KS||(KS={}));var Dn;(function(i){i.StreamSourceHdr="Nats-Stream-Source",i.LastConsumerSeqHdr="Nats-Last-Consumer",i.LastStreamSeqHdr="Nats-Last-Stream",i.ConsumerStalledHdr="Nats-Consumer-Stalled",i.MessageSizeHdr="Nats-Msg-Size",i.RollupHdr="Nats-Rollup",i.RollupValueSubject="sub",i.RollupValueAll="all",i.PendingMessagesHdr="Nats-Pending-Messages",i.PendingBytesHdr="Nats-Pending-Bytes"})(Dn||(Dn={}));var Rs;(function(i){i.LastValue="",i.AllHistory="history",i.UpdatesOnly="updates"})(Rs||(Rs={}));var cl;(function(i){i.Stream="Nats-Stream",i.Sequence="Nats-Sequence",i.TimeStamp="Nats-Time-Stamp",i.Subject="Nats-Subject"})(cl||(cl={}));var WS;(function(i){i.Stream="Nats-Stream",i.Subject="Nats-Subject",i.Sequence="Nats-Sequence",i.LastSequence="Nats-Last-Sequence",i.Size="Nats-Msg-Size"})(WS||(WS={}));const Zn="KV_";class RT{constructor(s){S(this,"config");S(this,"ordered");S(this,"mack");S(this,"stream");S(this,"callbackFn");S(this,"max");S(this,"qname");S(this,"isBind");S(this,"filters");this.stream="",this.mack=!1,this.ordered=!1,this.config=OT("",s||{})}getOpts(){var a;const s={};if(s.config=Object.assign({},this.config),s.config.filter_subject&&(this.filterSubject(s.config.filter_subject),s.config.filter_subject=void 0),s.config.filter_subjects&&((a=s.config.filter_subjects)==null||a.forEach(o=>{this.filterSubject(o)}),s.config.filter_subjects=void 0),s.mack=this.mack,s.stream=this.stream,s.callbackFn=this.callbackFn,s.max=this.max,s.queue=this.qname,s.ordered=this.ordered,s.config.ack_policy=s.ordered?nn.None:s.config.ack_policy,s.isBind=s.isBind||!1,this.filters)switch(this.filters.length){case 0:break;case 1:s.config.filter_subject=this.filters[0];break;default:s.config.filter_subjects=this.filters}return s}description(s){return this.config.description=s,this}deliverTo(s){return this.config.deliver_subject=s,this}durable(s){return fl(s),this.config.durable_name=s,this}startSequence(s){if(s<=0)throw new Error("sequence must be greater than 0");return this.config.deliver_policy=Vt.StartSequence,this.config.opt_start_seq=s,this}startTime(s){return this.config.deliver_policy=Vt.StartTime,this.config.opt_start_time=s.toISOString(),this}deliverAll(){return this.config.deliver_policy=Vt.All,this}deliverLastPerSubject(){return this.config.deliver_policy=Vt.LastPerSubject,this}deliverLast(){return this.config.deliver_policy=Vt.Last,this}deliverNew(){return this.config.deliver_policy=Vt.New,this}startAtTimeDelta(s){return this.startTime(new Date(Date.now()-s)),this}headersOnly(){return this.config.headers_only=!0,this}ackNone(){return this.config.ack_policy=nn.None,this}ackAll(){return this.config.ack_policy=nn.All,this}ackExplicit(){return this.config.ack_policy=nn.Explicit,this}ackWait(s){return this.config.ack_wait=Et(s),this}maxDeliver(s){return this.config.max_deliver=s,this}filterSubject(s){return this.filters=this.filters||[],this.filters.push(s),this}replayInstantly(){return this.config.replay_policy=bl.Instant,this}replayOriginal(){return this.config.replay_policy=bl.Original,this}sample(s){if(s=Math.trunc(s),s<0||s>100)throw new Error("value must be between 0-100");return this.config.sample_freq=`${s}%`,this}limit(s){return this.config.rate_limit_bps=s,this}maxWaiting(s){return this.config.max_waiting=s,this}maxAckPending(s){return this.config.max_ack_pending=s,this}idleHeartbeat(s){return this.config.idle_heartbeat=Et(s),this}flowControl(){return this.config.flow_control=!0,this}deliverGroup(s){return this.queue(s),this}manualAck(){return this.mack=!0,this}maxMessages(s){return this.max=s,this}callback(s){return this.callbackFn=s,this}queue(s){return this.qname=s,this.config.deliver_group=s,this}orderedConsumer(){return this.ordered=!0,this}bind(s,a){return this.stream=s,this.config.durable_name=a,this.isBind=!0,this}bindStream(s){return this.stream=s,this}inactiveEphemeralThreshold(s){return this.config.inactive_threshold=Et(s),this}maxPullBatch(s){return this.config.max_batch=s,this}maxPullRequestExpires(s){return this.config.max_expires=Et(s),this}memory(){return this.config.mem_storage=!0,this}numReplicas(s){return this.config.num_replicas=s,this}consumerName(s){return this.config.name=s,this}}function ni(i){return new RT(i)}function ew(i){return typeof i.getOpts=="function"}class jT{static encode(s){if(typeof s=="string")return btoa(s);const a=Array.from(s);return btoa(String.fromCharCode(...a))}static decode(s,a=!1){const o=atob(s);return a?Uint8Array.from(o,u=>u.charCodeAt(0)):o}}class hl{static encode(s){return hl.toB64URLEncoding(jT.encode(s))}static decode(s,a=!1){return hl.decode(hl.fromB64URLEncoding(s),a)}static toB64URLEncoding(s){return s.replace(/\+/g,"-").replace(/\//g,"_")}static fromB64URLEncoding(s){return s.replace(/_/g,"/").replace(/-/g,"+")}}class yl{constructor(){S(this,"buffers");S(this,"byteLength");this.buffers=[],this.byteLength=0}static concat(...s){let a=0;for(let d=0;d<s.length;d++)a+=s[d].length;const o=new Uint8Array(a);let u=0;for(let d=0;d<s.length;d++)o.set(s[d],u),u+=s[d].length;return o}static fromAscii(s){return s||(s=""),Wi.encode(s)}static toAscii(s){return Kn.decode(s)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){const s=new Uint8Array(this.byteLength);let a=0;for(let o=0;o<this.buffers.length;o++)s.set(this.buffers[o],a),a+=this.buffers[o].length;this.buffers.length=0,this.buffers.push(s)}}shift(){if(this.buffers.length){const s=this.buffers.shift();if(s)return this.byteLength-=s.length,s}return new Uint8Array(0)}drain(s){if(this.buffers.length){this.pack();const a=this.buffers.pop();if(a){const o=this.byteLength;(s===void 0||s>o)&&(s=o);const u=a.subarray(0,s);return o>s&&this.buffers.push(a.subarray(s)),this.byteLength=o-s,u}}return new Uint8Array(0)}fill(s,...a){s&&(this.buffers.push(s),this.byteLength+=s.length);for(let o=0;o<a.length;o++)a[o]&&a[o].length&&(this.buffers.push(a[o]),this.byteLength+=a[o].length)}peek(){return this.buffers.length?(this.pack(),this.buffers[0]):new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}function MT(i,s){return s.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(o){if(o!=="default"&&!(o in i)){var u=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(i,o,u.get?u:{enumerable:!0,get:function(){return a[o]}})}})}),Object.freeze(i)}var kT=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},nu=kT.performance||{};nu.now||nu.mozNow||nu.msNow||nu.oNow||nu.webkitNow;var tw={versions:{}},VT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function UT(i){if(i.__esModule)return i;var s=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(i).forEach(function(a){var o=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(s,a,o.get?o:{enumerable:!0,get:function(){return i[a]}})}),s}var o0,yh={exports:{}},nw={},sw=UT(MT({__proto__:null,default:nw},[nw]));o0=yh,(function(){var i="input is invalid type",s=typeof window=="object",a=s?window:{};a.JS_SHA256_NO_WINDOW&&(s=!1);var o=!s&&typeof self=="object",u=!a.JS_SHA256_NO_NODE_JS&&tw.versions&&tw.versions.node;u?a=VT:o&&(a=self);var d=!a.JS_SHA256_NO_COMMON_JS&&o0.exports,p=!a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),g=[-2147483648,8388608,32768,128],x=[24,16,8,0],_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],w=["hex","array","digest","arrayBuffer"],D=[];!a.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(U){return Object.prototype.toString.call(U)==="[object Array]"}),!p||!a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(U){return typeof U=="object"&&U.buffer&&U.buffer.constructor===ArrayBuffer});var z=function(U,ne){return function(oe){return new te(ne,!0).update(oe)[U]()}},q=function(U){var ne=z("hex",U);u&&(ne=F(ne,U)),ne.create=function(){return new te(U)},ne.update=function(Q){return ne.create().update(Q)};for(var oe=0;oe<w.length;++oe){var W=w[oe];ne[W]=z(W,U)}return ne},F=function(U,ne){var oe,W=sw,Q=sw.Buffer,H=ne?"sha224":"sha256";return oe=Q.from&&!a.JS_SHA256_NO_BUFFER_FROM?Q.from:function(le){return new Q(le)},function(le){if(typeof le=="string")return W.createHash(H).update(le,"utf8").digest("hex");if(le==null)throw new Error(i);return le.constructor===ArrayBuffer&&(le=new Uint8Array(le)),Array.isArray(le)||ArrayBuffer.isView(le)||le.constructor===Q?W.createHash(H).update(oe(le)).digest("hex"):U(le)}},Z=function(U,ne){return function(oe,W){return new we(oe,ne,!0).update(W)[U]()}},ee=function(U){var ne=Z("hex",U);ne.create=function(Q){return new we(Q,U)},ne.update=function(Q,H){return ne.create(Q).update(H)};for(var oe=0;oe<w.length;++oe){var W=w[oe];ne[W]=Z(W,U)}return ne};function te(U,ne){ne?(D[0]=D[16]=D[1]=D[2]=D[3]=D[4]=D[5]=D[6]=D[7]=D[8]=D[9]=D[10]=D[11]=D[12]=D[13]=D[14]=D[15]=0,this.blocks=D):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],U?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=U}function we(U,ne,oe){var W,Q=typeof U;if(Q==="string"){var H,le=[],ie=U.length,ve=0;for(W=0;W<ie;++W)(H=U.charCodeAt(W))<128?le[ve++]=H:H<2048?(le[ve++]=192|H>>>6,le[ve++]=128|63&H):H<55296||H>=57344?(le[ve++]=224|H>>>12,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H):(H=65536+((1023&H)<<10|1023&U.charCodeAt(++W)),le[ve++]=240|H>>>18,le[ve++]=128|H>>>12&63,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H);U=le}else{if(Q!=="object")throw new Error(i);if(U===null)throw new Error(i);if(p&&U.constructor===ArrayBuffer)U=new Uint8Array(U);else if(!(Array.isArray(U)||p&&ArrayBuffer.isView(U)))throw new Error(i)}U.length>64&&(U=new te(ne,!0).update(U).array());var Ge=[],tt=[];for(W=0;W<64;++W){var ae=U[W]||0;Ge[W]=92^ae,tt[W]=54^ae}te.call(this,ne,oe),this.update(tt),this.oKeyPad=Ge,this.inner=!0,this.sharedMemory=oe}te.prototype.update=function(U){if(!this.finalized){var ne,oe=typeof U;if(oe!=="string"){if(oe!=="object")throw new Error(i);if(U===null)throw new Error(i);if(p&&U.constructor===ArrayBuffer)U=new Uint8Array(U);else if(!(Array.isArray(U)||p&&ArrayBuffer.isView(U)))throw new Error(i);ne=!0}for(var W,Q,H=0,le=U.length,ie=this.blocks;H<le;){if(this.hashed&&(this.hashed=!1,ie[0]=this.block,this.block=ie[16]=ie[1]=ie[2]=ie[3]=ie[4]=ie[5]=ie[6]=ie[7]=ie[8]=ie[9]=ie[10]=ie[11]=ie[12]=ie[13]=ie[14]=ie[15]=0),ne)for(Q=this.start;H<le&&Q<64;++H)ie[Q>>>2]|=U[H]<<x[3&Q++];else for(Q=this.start;H<le&&Q<64;++H)(W=U.charCodeAt(H))<128?ie[Q>>>2]|=W<<x[3&Q++]:W<2048?(ie[Q>>>2]|=(192|W>>>6)<<x[3&Q++],ie[Q>>>2]|=(128|63&W)<<x[3&Q++]):W<55296||W>=57344?(ie[Q>>>2]|=(224|W>>>12)<<x[3&Q++],ie[Q>>>2]|=(128|W>>>6&63)<<x[3&Q++],ie[Q>>>2]|=(128|63&W)<<x[3&Q++]):(W=65536+((1023&W)<<10|1023&U.charCodeAt(++H)),ie[Q>>>2]|=(240|W>>>18)<<x[3&Q++],ie[Q>>>2]|=(128|W>>>12&63)<<x[3&Q++],ie[Q>>>2]|=(128|W>>>6&63)<<x[3&Q++],ie[Q>>>2]|=(128|63&W)<<x[3&Q++]);this.lastByteIndex=Q,this.bytes+=Q-this.start,Q>=64?(this.block=ie[16],this.start=Q-64,this.hash(),this.hashed=!0):this.start=Q}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},te.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var U=this.blocks,ne=this.lastByteIndex;U[16]=this.block,U[ne>>>2]|=g[3&ne],this.block=U[16],ne>=56&&(this.hashed||this.hash(),U[0]=this.block,U[16]=U[1]=U[2]=U[3]=U[4]=U[5]=U[6]=U[7]=U[8]=U[9]=U[10]=U[11]=U[12]=U[13]=U[14]=U[15]=0),U[14]=this.hBytes<<3|this.bytes>>>29,U[15]=this.bytes<<3,this.hash()}},te.prototype.hash=function(){var U,ne,oe,W,Q,H,le,ie,ve,Ge=this.h0,tt=this.h1,ae=this.h2,pe=this.h3,xe=this.h4,je=this.h5,Te=this.h6,J=this.h7,Ne=this.blocks;for(U=16;U<64;++U)ne=((Q=Ne[U-15])>>>7|Q<<25)^(Q>>>18|Q<<14)^Q>>>3,oe=((Q=Ne[U-2])>>>17|Q<<15)^(Q>>>19|Q<<13)^Q>>>10,Ne[U]=Ne[U-16]+ne+Ne[U-7]+oe|0;for(ve=tt&ae,U=0;U<64;U+=4)this.first?(this.is224?(H=300032,J=(Q=Ne[0]-1413257819)-150054599|0,pe=Q+24177077|0):(H=704751109,J=(Q=Ne[0]-210244248)-1521486534|0,pe=Q+143694565|0),this.first=!1):(ne=(Ge>>>2|Ge<<30)^(Ge>>>13|Ge<<19)^(Ge>>>22|Ge<<10),W=(H=Ge&tt)^Ge&ae^ve,J=pe+(Q=J+(oe=(xe>>>6|xe<<26)^(xe>>>11|xe<<21)^(xe>>>25|xe<<7))+(xe&je^~xe&Te)+_[U]+Ne[U])|0,pe=Q+(ne+W)|0),ne=(pe>>>2|pe<<30)^(pe>>>13|pe<<19)^(pe>>>22|pe<<10),W=(le=pe&Ge)^pe&tt^H,Te=ae+(Q=Te+(oe=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7))+(J&xe^~J&je)+_[U+1]+Ne[U+1])|0,ne=((ae=Q+(ne+W)|0)>>>2|ae<<30)^(ae>>>13|ae<<19)^(ae>>>22|ae<<10),W=(ie=ae&pe)^ae&Ge^le,je=tt+(Q=je+(oe=(Te>>>6|Te<<26)^(Te>>>11|Te<<21)^(Te>>>25|Te<<7))+(Te&J^~Te&xe)+_[U+2]+Ne[U+2])|0,ne=((tt=Q+(ne+W)|0)>>>2|tt<<30)^(tt>>>13|tt<<19)^(tt>>>22|tt<<10),W=(ve=tt&ae)^tt&pe^ie,xe=Ge+(Q=xe+(oe=(je>>>6|je<<26)^(je>>>11|je<<21)^(je>>>25|je<<7))+(je&Te^~je&J)+_[U+3]+Ne[U+3])|0,Ge=Q+(ne+W)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+Ge|0,this.h1=this.h1+tt|0,this.h2=this.h2+ae|0,this.h3=this.h3+pe|0,this.h4=this.h4+xe|0,this.h5=this.h5+je|0,this.h6=this.h6+Te|0,this.h7=this.h7+J|0},te.prototype.hex=function(){this.finalize();var U=this.h0,ne=this.h1,oe=this.h2,W=this.h3,Q=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=m[U>>>28&15]+m[U>>>24&15]+m[U>>>20&15]+m[U>>>16&15]+m[U>>>12&15]+m[U>>>8&15]+m[U>>>4&15]+m[15&U]+m[ne>>>28&15]+m[ne>>>24&15]+m[ne>>>20&15]+m[ne>>>16&15]+m[ne>>>12&15]+m[ne>>>8&15]+m[ne>>>4&15]+m[15&ne]+m[oe>>>28&15]+m[oe>>>24&15]+m[oe>>>20&15]+m[oe>>>16&15]+m[oe>>>12&15]+m[oe>>>8&15]+m[oe>>>4&15]+m[15&oe]+m[W>>>28&15]+m[W>>>24&15]+m[W>>>20&15]+m[W>>>16&15]+m[W>>>12&15]+m[W>>>8&15]+m[W>>>4&15]+m[15&W]+m[Q>>>28&15]+m[Q>>>24&15]+m[Q>>>20&15]+m[Q>>>16&15]+m[Q>>>12&15]+m[Q>>>8&15]+m[Q>>>4&15]+m[15&Q]+m[H>>>28&15]+m[H>>>24&15]+m[H>>>20&15]+m[H>>>16&15]+m[H>>>12&15]+m[H>>>8&15]+m[H>>>4&15]+m[15&H]+m[le>>>28&15]+m[le>>>24&15]+m[le>>>20&15]+m[le>>>16&15]+m[le>>>12&15]+m[le>>>8&15]+m[le>>>4&15]+m[15&le];return this.is224||(ve+=m[ie>>>28&15]+m[ie>>>24&15]+m[ie>>>20&15]+m[ie>>>16&15]+m[ie>>>12&15]+m[ie>>>8&15]+m[ie>>>4&15]+m[15&ie]),ve},te.prototype.toString=te.prototype.hex,te.prototype.digest=function(){this.finalize();var U=this.h0,ne=this.h1,oe=this.h2,W=this.h3,Q=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=[U>>>24&255,U>>>16&255,U>>>8&255,255&U,ne>>>24&255,ne>>>16&255,ne>>>8&255,255&ne,oe>>>24&255,oe>>>16&255,oe>>>8&255,255&oe,W>>>24&255,W>>>16&255,W>>>8&255,255&W,Q>>>24&255,Q>>>16&255,Q>>>8&255,255&Q,H>>>24&255,H>>>16&255,H>>>8&255,255&H,le>>>24&255,le>>>16&255,le>>>8&255,255&le];return this.is224||ve.push(ie>>>24&255,ie>>>16&255,ie>>>8&255,255&ie),ve},te.prototype.array=te.prototype.digest,te.prototype.arrayBuffer=function(){this.finalize();var U=new ArrayBuffer(this.is224?28:32),ne=new DataView(U);return ne.setUint32(0,this.h0),ne.setUint32(4,this.h1),ne.setUint32(8,this.h2),ne.setUint32(12,this.h3),ne.setUint32(16,this.h4),ne.setUint32(20,this.h5),ne.setUint32(24,this.h6),this.is224||ne.setUint32(28,this.h7),U},we.prototype=new te,we.prototype.finalize=function(){if(te.prototype.finalize.call(this),this.inner){this.inner=!1;var U=this.array();te.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(U),te.prototype.finalize.call(this)}};var De=q();De.sha256=De,De.sha224=q(!0),De.sha256.hmac=ee(),De.sha224.hmac=ee(!0),d?o0.exports=De:(a.sha256=De.sha256,a.sha224=De.sha224)})();yh.exports;yh.exports.sha224;var aw=yh.exports.sha256;function C0(i){return PT(i)}function zT(i){if(!/^[0-9A-Fa-f]+$/.test(i))return!1;const a=/^[0-9A-F]+$/.test(i),o=/^[0-9a-f]+$/.test(i);return a||o?i.length%2===0:!1}function BT(i){return/^[A-Za-z0-9\-_]*(={0,2})?$/.test(i)||/^[A-Za-z0-9+/]*(={0,2})?$/.test(i)}function qT(i){return zT(i)?"hex":BT(i)?"b64":""}function LT(i){if(i.length%2!==0)throw new Error("hex string must have an even length");const s=new Uint8Array(i.length/2);for(let a=0;a<i.length;a+=2)s[a/2]=parseInt(i.substring(a,a+2),16);return s}function HT(i){i=i.replace(/-/g,"+"),i=i.replace(/_/g,"/");const s=atob(i);return Uint8Array.from(s,a=>a.charCodeAt(0))}function PT(i){switch(qT(i)){case"hex":return LT(i);case"b64":return HT(i)}return null}function $T(i,s){const a=typeof i=="string"?C0(i):i,o=typeof s=="string"?C0(s):s;if(a===null||o===null||a.length!==o.length)return!1;for(let u=0;u<a.length;u++)if(a[u]!==o[u])return!1;return!0}class oE{constructor(s,a,o=!0){S(this,"token");S(this,"received");S(this,"ctx");S(this,"requestSubject");S(this,"mux");this.mux=s,this.requestSubject=a,this.received=0,this.token=ai.next(),o&&(this.ctx=new Error)}}class IT extends oE{constructor(a,o,u={maxWait:1e3}){super(a,o);S(this,"callback");S(this,"done");S(this,"timer");S(this,"max");S(this,"opts");if(this.opts=u,typeof this.opts.callback!="function")throw new Error("callback is required");this.callback=this.opts.callback,this.max=typeof u.maxMessages=="number"&&u.maxMessages>0?u.maxMessages:-1,this.done=_t(),this.done.then(()=>{this.callback(null,null)}),this.timer=setTimeout(()=>{this.cancel()},u.maxWait)}cancel(a){a&&this.callback(a,null),clearTimeout(this.timer),this.mux.cancel(this),this.done.resolve()}resolver(a,o){a?(this.ctx&&(a.stack+=`
|
|
250
|
+
`:o="\\n";break;case"\r":o="\\r";break;case" ":o="\\t";break}throw Error(`invalid ${i} name - ${i} name cannot contain '${o}'`)}}),""}function ou(i,s=""){if(s==="")throw Error(`${i} name required`);const a=CT(s);if(a.length)throw new Error(`invalid ${i} name - ${i} name ${a}`)}function CT(i=""){if(i==="")throw Error("name required");const s=/^[-\w]+$/g;if(i.match(s)===null){for(const o of i.split(""))if(o.match(s)===null)return`cannot contain '${o}'`}return""}function _0(i){if(i.data.length>0)return!1;const s=i.headers;return s?s.code>=100&&s.code<200:!1}function A0(i){var s;return _0(i)&&((s=i.headers)==null?void 0:s.description)==="Idle Heartbeat"}function TT(i,s,a){const o=sr(i,s),u={hdr:1,sid:0,size:0},d=new Z0(u,es,{});return d._headers=o,d._subject=a,d}function dl(i){if(i.data.length!==0)return null;const s=i.headers;return s?iE(s.code,s.description):null}var ys;(function(i){i.MaxBatchExceeded="exceeded maxrequestbatch of",i.MaxExpiresExceeded="exceeded maxrequestexpires of",i.MaxBytesExceeded="exceeded maxrequestmaxbytes of",i.MaxMessageSizeExceeded="message size exceeds maxbytes",i.PushConsumer="consumer is push based",i.MaxWaitingExceeded="exceeded maxwaiting",i.IdleHeartbeatMissed="idle heartbeats missed",i.ConsumerDeleted="consumer deleted"})(ys||(ys={}));function OT(i){return i.code!==ue.JetStream409?!1:[ys.MaxBatchExceeded,ys.MaxExpiresExceeded,ys.MaxBytesExceeded,ys.MaxMessageSizeExceeded,ys.PushConsumer,ys.IdleHeartbeatMissed,ys.ConsumerDeleted].find(a=>i.message.indexOf(a)!==-1)!==void 0}function iE(i,s=""){if(i<300)return null;switch(s=s.toLowerCase(),i){case 404:return new ge(s,ue.JetStream404NoMessages);case 408:return new ge(s,ue.JetStream408RequestTimeout);case 409:{const a=s.startsWith(ys.IdleHeartbeatMissed)?ue.JetStreamIdleHeartBeat:ue.JetStream409;return new ge(s,a)}case 503:return ge.errorForCode(ue.JetStreamNotEnabled,new Error(s));default:return s===""&&(s=ue.Unknown),new ge(s,`${i}`)}}class sn{constructor(){S(this,"inflight");S(this,"processed");S(this,"received");S(this,"noIterator");S(this,"iterClosed");S(this,"done");S(this,"signal");S(this,"yields");S(this,"filtered");S(this,"pendingFiltered");S(this,"ingestionFilterFn");S(this,"protocolFilterFn");S(this,"dispatchedFn");S(this,"ctx");S(this,"_data");S(this,"err");S(this,"time");S(this,"yielding");this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=_t(),this.yields=[],this.iterClosed=_t(),this.time=0,this.yielding=!1}[Symbol.asyncIterator](){return this.iterate()}push(s){if(this.done)return;if(typeof s=="function"){this.yields.push(s),this.signal.resolve();return}const{ingest:a,protocol:o}=this.ingestionFilterFn?this.ingestionFilterFn(s,this.ctx||this):{ingest:!0,protocol:!1};a&&(o&&(this.filtered++,this.pendingFiltered++),this.yields.push(s),this.signal.resolve())}async*iterate(){if(this.noIterator)throw new ge("unsupported iterator",ue.ApiError);if(this.yielding)throw new ge("already yielding",ue.ApiError);this.yielding=!0;try{for(;;){if(this.yields.length===0&&await this.signal,this.err)throw this.err;const s=this.yields;this.inflight=s.length,this.yields=[];for(let a=0;a<s.length;a++){if(typeof s[a]=="function"){const u=s[a];try{u()}catch(d){throw d}if(this.err)throw this.err;continue}if(this.protocolFilterFn?this.protocolFilterFn(s[a]):!0){this.processed++;const u=Date.now();yield s[a],this.time=Date.now()-u,this.dispatchedFn&&s[a]&&this.dispatchedFn(s[a])}else this.pendingFiltered--;this.inflight--}if(this.done)break;this.yields.length===0&&(s.length=0,this.yields=s,this.signal=_t())}}finally{this.stop()}}stop(s){this.done||(this.err=s,this.done=!0,this.signal.resolve(),this.iterClosed.resolve(s))}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}class K0{constructor(s,a,o={maxOut:2}){S(this,"interval");S(this,"maxOut");S(this,"cancelAfter");S(this,"timer");S(this,"autoCancelTimer");S(this,"last");S(this,"missed");S(this,"count");S(this,"callback");this.interval=s,this.maxOut=(o==null?void 0:o.maxOut)||2,this.cancelAfter=(o==null?void 0:o.cancelAfter)||0,this.last=Date.now(),this.missed=0,this.count=0,this.callback=a,this._schedule()}cancel(){this.autoCancelTimer&&clearTimeout(this.autoCancelTimer),this.timer&&clearInterval(this.timer),this.timer=0,this.autoCancelTimer=0,this.missed=0}work(){this.last=Date.now(),this.missed=0}_change(s,a=0,o=2){this.interval=s,this.maxOut=o,this.cancelAfter=a,this.restart()}restart(){this.cancel(),this._schedule()}_schedule(){this.cancelAfter>0&&(this.autoCancelTimer=setTimeout(()=>{this.cancel()},this.cancelAfter)),this.timer=setInterval(()=>{if(this.count++,Date.now()-this.last>this.interval&&this.missed++,this.missed>=this.maxOut)try{this.callback(this.missed)===!0&&this.cancel()}catch(s){console.log(s)}},this.interval)}}var D0;(function(i){i.Limits="limits",i.Interest="interest",i.Workqueue="workqueue"})(D0||(D0={}));var bu;(function(i){i.Old="old",i.New="new"})(bu||(bu={}));var C0;(function(i){i.File="file",i.Memory="memory"})(C0||(C0={}));var Vt;(function(i){i.All="all",i.Last="last",i.New="new",i.StartSequence="by_start_sequence",i.StartTime="by_start_time",i.LastPerSubject="last_per_subject"})(Vt||(Vt={}));var nn;(function(i){i.None="none",i.All="all",i.Explicit="explicit",i.NotSet=""})(nn||(nn={}));var bl;(function(i){i.Instant="instant",i.Original="original"})(bl||(bl={}));var ri;(function(i){i.None="none",i.S2="s2"})(ri||(ri={}));var oh;(function(i){i.CreateOrUpdate="",i.Update="update",i.Create="create"})(oh||(oh={}));function RT(i,s={}){return Object.assign({name:i,deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:bl.Instant},s)}var KS;(function(i){i.API="api_audit",i.StreamAction="stream_action",i.ConsumerAction="consumer_action",i.SnapshotCreate="snapshot_create",i.SnapshotComplete="snapshot_complete",i.RestoreCreate="restore_create",i.RestoreComplete="restore_complete",i.MaxDeliver="max_deliver",i.Terminated="terminated",i.Ack="consumer_ack",i.StreamLeaderElected="stream_leader_elected",i.StreamQuorumLost="stream_quorum_lost",i.ConsumerLeaderElected="consumer_leader_elected",i.ConsumerQuorumLost="consumer_quorum_lost"})(KS||(KS={}));var Dn;(function(i){i.StreamSourceHdr="Nats-Stream-Source",i.LastConsumerSeqHdr="Nats-Last-Consumer",i.LastStreamSeqHdr="Nats-Last-Stream",i.ConsumerStalledHdr="Nats-Consumer-Stalled",i.MessageSizeHdr="Nats-Msg-Size",i.RollupHdr="Nats-Rollup",i.RollupValueSubject="sub",i.RollupValueAll="all",i.PendingMessagesHdr="Nats-Pending-Messages",i.PendingBytesHdr="Nats-Pending-Bytes"})(Dn||(Dn={}));var Rs;(function(i){i.LastValue="",i.AllHistory="history",i.UpdatesOnly="updates"})(Rs||(Rs={}));var cl;(function(i){i.Stream="Nats-Stream",i.Sequence="Nats-Sequence",i.TimeStamp="Nats-Time-Stamp",i.Subject="Nats-Subject"})(cl||(cl={}));var WS;(function(i){i.Stream="Nats-Stream",i.Subject="Nats-Subject",i.Sequence="Nats-Sequence",i.LastSequence="Nats-Last-Sequence",i.Size="Nats-Msg-Size"})(WS||(WS={}));const Zn="KV_";class jT{constructor(s){S(this,"config");S(this,"ordered");S(this,"mack");S(this,"stream");S(this,"callbackFn");S(this,"max");S(this,"qname");S(this,"isBind");S(this,"filters");this.stream="",this.mack=!1,this.ordered=!1,this.config=RT("",s||{})}getOpts(){var a;const s={};if(s.config=Object.assign({},this.config),s.config.filter_subject&&(this.filterSubject(s.config.filter_subject),s.config.filter_subject=void 0),s.config.filter_subjects&&((a=s.config.filter_subjects)==null||a.forEach(o=>{this.filterSubject(o)}),s.config.filter_subjects=void 0),s.mack=this.mack,s.stream=this.stream,s.callbackFn=this.callbackFn,s.max=this.max,s.queue=this.qname,s.ordered=this.ordered,s.config.ack_policy=s.ordered?nn.None:s.config.ack_policy,s.isBind=s.isBind||!1,this.filters)switch(this.filters.length){case 0:break;case 1:s.config.filter_subject=this.filters[0];break;default:s.config.filter_subjects=this.filters}return s}description(s){return this.config.description=s,this}deliverTo(s){return this.config.deliver_subject=s,this}durable(s){return fl(s),this.config.durable_name=s,this}startSequence(s){if(s<=0)throw new Error("sequence must be greater than 0");return this.config.deliver_policy=Vt.StartSequence,this.config.opt_start_seq=s,this}startTime(s){return this.config.deliver_policy=Vt.StartTime,this.config.opt_start_time=s.toISOString(),this}deliverAll(){return this.config.deliver_policy=Vt.All,this}deliverLastPerSubject(){return this.config.deliver_policy=Vt.LastPerSubject,this}deliverLast(){return this.config.deliver_policy=Vt.Last,this}deliverNew(){return this.config.deliver_policy=Vt.New,this}startAtTimeDelta(s){return this.startTime(new Date(Date.now()-s)),this}headersOnly(){return this.config.headers_only=!0,this}ackNone(){return this.config.ack_policy=nn.None,this}ackAll(){return this.config.ack_policy=nn.All,this}ackExplicit(){return this.config.ack_policy=nn.Explicit,this}ackWait(s){return this.config.ack_wait=Et(s),this}maxDeliver(s){return this.config.max_deliver=s,this}filterSubject(s){return this.filters=this.filters||[],this.filters.push(s),this}replayInstantly(){return this.config.replay_policy=bl.Instant,this}replayOriginal(){return this.config.replay_policy=bl.Original,this}sample(s){if(s=Math.trunc(s),s<0||s>100)throw new Error("value must be between 0-100");return this.config.sample_freq=`${s}%`,this}limit(s){return this.config.rate_limit_bps=s,this}maxWaiting(s){return this.config.max_waiting=s,this}maxAckPending(s){return this.config.max_ack_pending=s,this}idleHeartbeat(s){return this.config.idle_heartbeat=Et(s),this}flowControl(){return this.config.flow_control=!0,this}deliverGroup(s){return this.queue(s),this}manualAck(){return this.mack=!0,this}maxMessages(s){return this.max=s,this}callback(s){return this.callbackFn=s,this}queue(s){return this.qname=s,this.config.deliver_group=s,this}orderedConsumer(){return this.ordered=!0,this}bind(s,a){return this.stream=s,this.config.durable_name=a,this.isBind=!0,this}bindStream(s){return this.stream=s,this}inactiveEphemeralThreshold(s){return this.config.inactive_threshold=Et(s),this}maxPullBatch(s){return this.config.max_batch=s,this}maxPullRequestExpires(s){return this.config.max_expires=Et(s),this}memory(){return this.config.mem_storage=!0,this}numReplicas(s){return this.config.num_replicas=s,this}consumerName(s){return this.config.name=s,this}}function ni(i){return new jT(i)}function ew(i){return typeof i.getOpts=="function"}class MT{static encode(s){if(typeof s=="string")return btoa(s);const a=Array.from(s);return btoa(String.fromCharCode(...a))}static decode(s,a=!1){const o=atob(s);return a?Uint8Array.from(o,u=>u.charCodeAt(0)):o}}class hl{static encode(s){return hl.toB64URLEncoding(MT.encode(s))}static decode(s,a=!1){return hl.decode(hl.fromB64URLEncoding(s),a)}static toB64URLEncoding(s){return s.replace(/\+/g,"-").replace(/\//g,"_")}static fromB64URLEncoding(s){return s.replace(/_/g,"/").replace(/-/g,"+")}}class yl{constructor(){S(this,"buffers");S(this,"byteLength");this.buffers=[],this.byteLength=0}static concat(...s){let a=0;for(let d=0;d<s.length;d++)a+=s[d].length;const o=new Uint8Array(a);let u=0;for(let d=0;d<s.length;d++)o.set(s[d],u),u+=s[d].length;return o}static fromAscii(s){return s||(s=""),Wi.encode(s)}static toAscii(s){return Kn.decode(s)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){const s=new Uint8Array(this.byteLength);let a=0;for(let o=0;o<this.buffers.length;o++)s.set(this.buffers[o],a),a+=this.buffers[o].length;this.buffers.length=0,this.buffers.push(s)}}shift(){if(this.buffers.length){const s=this.buffers.shift();if(s)return this.byteLength-=s.length,s}return new Uint8Array(0)}drain(s){if(this.buffers.length){this.pack();const a=this.buffers.pop();if(a){const o=this.byteLength;(s===void 0||s>o)&&(s=o);const u=a.subarray(0,s);return o>s&&this.buffers.push(a.subarray(s)),this.byteLength=o-s,u}}return new Uint8Array(0)}fill(s,...a){s&&(this.buffers.push(s),this.byteLength+=s.length);for(let o=0;o<a.length;o++)a[o]&&a[o].length&&(this.buffers.push(a[o]),this.byteLength+=a[o].length)}peek(){return this.buffers.length?(this.pack(),this.buffers[0]):new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}function kT(i,s){return s.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(o){if(o!=="default"&&!(o in i)){var u=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(i,o,u.get?u:{enumerable:!0,get:function(){return a[o]}})}})}),Object.freeze(i)}var VT=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},nu=VT.performance||{};nu.now||nu.mozNow||nu.msNow||nu.oNow||nu.webkitNow;var tw={versions:{}},UT=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zT(i){if(i.__esModule)return i;var s=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(i).forEach(function(a){var o=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(s,a,o.get?o:{enumerable:!0,get:function(){return i[a]}})}),s}var l0,yh={exports:{}},nw={},sw=zT(kT({__proto__:null,default:nw},[nw]));l0=yh,(function(){var i="input is invalid type",s=typeof window=="object",a=s?window:{};a.JS_SHA256_NO_WINDOW&&(s=!1);var o=!s&&typeof self=="object",u=!a.JS_SHA256_NO_NODE_JS&&tw.versions&&tw.versions.node;u?a=UT:o&&(a=self);var d=!a.JS_SHA256_NO_COMMON_JS&&l0.exports,p=!a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),g=[-2147483648,8388608,32768,128],x=[24,16,8,0],_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],w=["hex","array","digest","arrayBuffer"],D=[];!a.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(U){return Object.prototype.toString.call(U)==="[object Array]"}),!p||!a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(U){return typeof U=="object"&&U.buffer&&U.buffer.constructor===ArrayBuffer});var z=function(U,ne){return function(oe){return new te(ne,!0).update(oe)[U]()}},q=function(U){var ne=z("hex",U);u&&(ne=Y(ne,U)),ne.create=function(){return new te(U)},ne.update=function(Q){return ne.create().update(Q)};for(var oe=0;oe<w.length;++oe){var W=w[oe];ne[W]=z(W,U)}return ne},Y=function(U,ne){var oe,W=sw,Q=sw.Buffer,H=ne?"sha224":"sha256";return oe=Q.from&&!a.JS_SHA256_NO_BUFFER_FROM?Q.from:function(le){return new Q(le)},function(le){if(typeof le=="string")return W.createHash(H).update(le,"utf8").digest("hex");if(le==null)throw new Error(i);return le.constructor===ArrayBuffer&&(le=new Uint8Array(le)),Array.isArray(le)||ArrayBuffer.isView(le)||le.constructor===Q?W.createHash(H).update(oe(le)).digest("hex"):U(le)}},Z=function(U,ne){return function(oe,W){return new we(oe,ne,!0).update(W)[U]()}},ee=function(U){var ne=Z("hex",U);ne.create=function(Q){return new we(Q,U)},ne.update=function(Q,H){return ne.create(Q).update(H)};for(var oe=0;oe<w.length;++oe){var W=w[oe];ne[W]=Z(W,U)}return ne};function te(U,ne){ne?(D[0]=D[16]=D[1]=D[2]=D[3]=D[4]=D[5]=D[6]=D[7]=D[8]=D[9]=D[10]=D[11]=D[12]=D[13]=D[14]=D[15]=0,this.blocks=D):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],U?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=U}function we(U,ne,oe){var W,Q=typeof U;if(Q==="string"){var H,le=[],ie=U.length,ve=0;for(W=0;W<ie;++W)(H=U.charCodeAt(W))<128?le[ve++]=H:H<2048?(le[ve++]=192|H>>>6,le[ve++]=128|63&H):H<55296||H>=57344?(le[ve++]=224|H>>>12,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H):(H=65536+((1023&H)<<10|1023&U.charCodeAt(++W)),le[ve++]=240|H>>>18,le[ve++]=128|H>>>12&63,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H);U=le}else{if(Q!=="object")throw new Error(i);if(U===null)throw new Error(i);if(p&&U.constructor===ArrayBuffer)U=new Uint8Array(U);else if(!(Array.isArray(U)||p&&ArrayBuffer.isView(U)))throw new Error(i)}U.length>64&&(U=new te(ne,!0).update(U).array());var Qe=[],nt=[];for(W=0;W<64;++W){var ae=U[W]||0;Qe[W]=92^ae,nt[W]=54^ae}te.call(this,ne,oe),this.update(nt),this.oKeyPad=Qe,this.inner=!0,this.sharedMemory=oe}te.prototype.update=function(U){if(!this.finalized){var ne,oe=typeof U;if(oe!=="string"){if(oe!=="object")throw new Error(i);if(U===null)throw new Error(i);if(p&&U.constructor===ArrayBuffer)U=new Uint8Array(U);else if(!(Array.isArray(U)||p&&ArrayBuffer.isView(U)))throw new Error(i);ne=!0}for(var W,Q,H=0,le=U.length,ie=this.blocks;H<le;){if(this.hashed&&(this.hashed=!1,ie[0]=this.block,this.block=ie[16]=ie[1]=ie[2]=ie[3]=ie[4]=ie[5]=ie[6]=ie[7]=ie[8]=ie[9]=ie[10]=ie[11]=ie[12]=ie[13]=ie[14]=ie[15]=0),ne)for(Q=this.start;H<le&&Q<64;++H)ie[Q>>>2]|=U[H]<<x[3&Q++];else for(Q=this.start;H<le&&Q<64;++H)(W=U.charCodeAt(H))<128?ie[Q>>>2]|=W<<x[3&Q++]:W<2048?(ie[Q>>>2]|=(192|W>>>6)<<x[3&Q++],ie[Q>>>2]|=(128|63&W)<<x[3&Q++]):W<55296||W>=57344?(ie[Q>>>2]|=(224|W>>>12)<<x[3&Q++],ie[Q>>>2]|=(128|W>>>6&63)<<x[3&Q++],ie[Q>>>2]|=(128|63&W)<<x[3&Q++]):(W=65536+((1023&W)<<10|1023&U.charCodeAt(++H)),ie[Q>>>2]|=(240|W>>>18)<<x[3&Q++],ie[Q>>>2]|=(128|W>>>12&63)<<x[3&Q++],ie[Q>>>2]|=(128|W>>>6&63)<<x[3&Q++],ie[Q>>>2]|=(128|63&W)<<x[3&Q++]);this.lastByteIndex=Q,this.bytes+=Q-this.start,Q>=64?(this.block=ie[16],this.start=Q-64,this.hash(),this.hashed=!0):this.start=Q}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},te.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var U=this.blocks,ne=this.lastByteIndex;U[16]=this.block,U[ne>>>2]|=g[3&ne],this.block=U[16],ne>=56&&(this.hashed||this.hash(),U[0]=this.block,U[16]=U[1]=U[2]=U[3]=U[4]=U[5]=U[6]=U[7]=U[8]=U[9]=U[10]=U[11]=U[12]=U[13]=U[14]=U[15]=0),U[14]=this.hBytes<<3|this.bytes>>>29,U[15]=this.bytes<<3,this.hash()}},te.prototype.hash=function(){var U,ne,oe,W,Q,H,le,ie,ve,Qe=this.h0,nt=this.h1,ae=this.h2,pe=this.h3,xe=this.h4,je=this.h5,Te=this.h6,J=this.h7,Ne=this.blocks;for(U=16;U<64;++U)ne=((Q=Ne[U-15])>>>7|Q<<25)^(Q>>>18|Q<<14)^Q>>>3,oe=((Q=Ne[U-2])>>>17|Q<<15)^(Q>>>19|Q<<13)^Q>>>10,Ne[U]=Ne[U-16]+ne+Ne[U-7]+oe|0;for(ve=nt&ae,U=0;U<64;U+=4)this.first?(this.is224?(H=300032,J=(Q=Ne[0]-1413257819)-150054599|0,pe=Q+24177077|0):(H=704751109,J=(Q=Ne[0]-210244248)-1521486534|0,pe=Q+143694565|0),this.first=!1):(ne=(Qe>>>2|Qe<<30)^(Qe>>>13|Qe<<19)^(Qe>>>22|Qe<<10),W=(H=Qe&nt)^Qe&ae^ve,J=pe+(Q=J+(oe=(xe>>>6|xe<<26)^(xe>>>11|xe<<21)^(xe>>>25|xe<<7))+(xe&je^~xe&Te)+_[U]+Ne[U])|0,pe=Q+(ne+W)|0),ne=(pe>>>2|pe<<30)^(pe>>>13|pe<<19)^(pe>>>22|pe<<10),W=(le=pe&Qe)^pe&nt^H,Te=ae+(Q=Te+(oe=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7))+(J&xe^~J&je)+_[U+1]+Ne[U+1])|0,ne=((ae=Q+(ne+W)|0)>>>2|ae<<30)^(ae>>>13|ae<<19)^(ae>>>22|ae<<10),W=(ie=ae&pe)^ae&Qe^le,je=nt+(Q=je+(oe=(Te>>>6|Te<<26)^(Te>>>11|Te<<21)^(Te>>>25|Te<<7))+(Te&J^~Te&xe)+_[U+2]+Ne[U+2])|0,ne=((nt=Q+(ne+W)|0)>>>2|nt<<30)^(nt>>>13|nt<<19)^(nt>>>22|nt<<10),W=(ve=nt&ae)^nt&pe^ie,xe=Qe+(Q=xe+(oe=(je>>>6|je<<26)^(je>>>11|je<<21)^(je>>>25|je<<7))+(je&Te^~je&J)+_[U+3]+Ne[U+3])|0,Qe=Q+(ne+W)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+Qe|0,this.h1=this.h1+nt|0,this.h2=this.h2+ae|0,this.h3=this.h3+pe|0,this.h4=this.h4+xe|0,this.h5=this.h5+je|0,this.h6=this.h6+Te|0,this.h7=this.h7+J|0},te.prototype.hex=function(){this.finalize();var U=this.h0,ne=this.h1,oe=this.h2,W=this.h3,Q=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=m[U>>>28&15]+m[U>>>24&15]+m[U>>>20&15]+m[U>>>16&15]+m[U>>>12&15]+m[U>>>8&15]+m[U>>>4&15]+m[15&U]+m[ne>>>28&15]+m[ne>>>24&15]+m[ne>>>20&15]+m[ne>>>16&15]+m[ne>>>12&15]+m[ne>>>8&15]+m[ne>>>4&15]+m[15&ne]+m[oe>>>28&15]+m[oe>>>24&15]+m[oe>>>20&15]+m[oe>>>16&15]+m[oe>>>12&15]+m[oe>>>8&15]+m[oe>>>4&15]+m[15&oe]+m[W>>>28&15]+m[W>>>24&15]+m[W>>>20&15]+m[W>>>16&15]+m[W>>>12&15]+m[W>>>8&15]+m[W>>>4&15]+m[15&W]+m[Q>>>28&15]+m[Q>>>24&15]+m[Q>>>20&15]+m[Q>>>16&15]+m[Q>>>12&15]+m[Q>>>8&15]+m[Q>>>4&15]+m[15&Q]+m[H>>>28&15]+m[H>>>24&15]+m[H>>>20&15]+m[H>>>16&15]+m[H>>>12&15]+m[H>>>8&15]+m[H>>>4&15]+m[15&H]+m[le>>>28&15]+m[le>>>24&15]+m[le>>>20&15]+m[le>>>16&15]+m[le>>>12&15]+m[le>>>8&15]+m[le>>>4&15]+m[15&le];return this.is224||(ve+=m[ie>>>28&15]+m[ie>>>24&15]+m[ie>>>20&15]+m[ie>>>16&15]+m[ie>>>12&15]+m[ie>>>8&15]+m[ie>>>4&15]+m[15&ie]),ve},te.prototype.toString=te.prototype.hex,te.prototype.digest=function(){this.finalize();var U=this.h0,ne=this.h1,oe=this.h2,W=this.h3,Q=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=[U>>>24&255,U>>>16&255,U>>>8&255,255&U,ne>>>24&255,ne>>>16&255,ne>>>8&255,255&ne,oe>>>24&255,oe>>>16&255,oe>>>8&255,255&oe,W>>>24&255,W>>>16&255,W>>>8&255,255&W,Q>>>24&255,Q>>>16&255,Q>>>8&255,255&Q,H>>>24&255,H>>>16&255,H>>>8&255,255&H,le>>>24&255,le>>>16&255,le>>>8&255,255&le];return this.is224||ve.push(ie>>>24&255,ie>>>16&255,ie>>>8&255,255&ie),ve},te.prototype.array=te.prototype.digest,te.prototype.arrayBuffer=function(){this.finalize();var U=new ArrayBuffer(this.is224?28:32),ne=new DataView(U);return ne.setUint32(0,this.h0),ne.setUint32(4,this.h1),ne.setUint32(8,this.h2),ne.setUint32(12,this.h3),ne.setUint32(16,this.h4),ne.setUint32(20,this.h5),ne.setUint32(24,this.h6),this.is224||ne.setUint32(28,this.h7),U},we.prototype=new te,we.prototype.finalize=function(){if(te.prototype.finalize.call(this),this.inner){this.inner=!1;var U=this.array();te.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(U),te.prototype.finalize.call(this)}};var De=q();De.sha256=De,De.sha224=q(!0),De.sha256.hmac=ee(),De.sha224.hmac=ee(!0),d?l0.exports=De:(a.sha256=De.sha256,a.sha224=De.sha224)})();yh.exports;yh.exports.sha224;var aw=yh.exports.sha256;function T0(i){return $T(i)}function BT(i){if(!/^[0-9A-Fa-f]+$/.test(i))return!1;const a=/^[0-9A-F]+$/.test(i),o=/^[0-9a-f]+$/.test(i);return a||o?i.length%2===0:!1}function qT(i){return/^[A-Za-z0-9\-_]*(={0,2})?$/.test(i)||/^[A-Za-z0-9+/]*(={0,2})?$/.test(i)}function LT(i){return BT(i)?"hex":qT(i)?"b64":""}function HT(i){if(i.length%2!==0)throw new Error("hex string must have an even length");const s=new Uint8Array(i.length/2);for(let a=0;a<i.length;a+=2)s[a/2]=parseInt(i.substring(a,a+2),16);return s}function PT(i){i=i.replace(/-/g,"+"),i=i.replace(/_/g,"/");const s=atob(i);return Uint8Array.from(s,a=>a.charCodeAt(0))}function $T(i){switch(LT(i)){case"hex":return HT(i);case"b64":return PT(i)}return null}function IT(i,s){const a=typeof i=="string"?T0(i):i,o=typeof s=="string"?T0(s):s;if(a===null||o===null||a.length!==o.length)return!1;for(let u=0;u<a.length;u++)if(a[u]!==o[u])return!1;return!0}class oE{constructor(s,a,o=!0){S(this,"token");S(this,"received");S(this,"ctx");S(this,"requestSubject");S(this,"mux");this.mux=s,this.requestSubject=a,this.received=0,this.token=ai.next(),o&&(this.ctx=new Error)}}class FT extends oE{constructor(a,o,u={maxWait:1e3}){super(a,o);S(this,"callback");S(this,"done");S(this,"timer");S(this,"max");S(this,"opts");if(this.opts=u,typeof this.opts.callback!="function")throw new Error("callback is required");this.callback=this.opts.callback,this.max=typeof u.maxMessages=="number"&&u.maxMessages>0?u.maxMessages:-1,this.done=_t(),this.done.then(()=>{this.callback(null,null)}),this.timer=setTimeout(()=>{this.cancel()},u.maxWait)}cancel(a){a&&this.callback(a,null),clearTimeout(this.timer),this.mux.cancel(this),this.done.resolve()}resolver(a,o){a?(this.ctx&&(a.stack+=`
|
|
251
251
|
|
|
252
252
|
${this.ctx.stack}`),this.cancel(a)):(this.callback(null,o),this.opts.strategy===Ms.Count&&(this.max--,this.max===0&&this.cancel()),this.opts.strategy===Ms.JitterTimer&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.cancel()},this.opts.jitter||300)),this.opts.strategy===Ms.SentinelMsg&&o&&o.data.length===0&&this.cancel())}}class lE extends oE{constructor(a,o,u={timeout:1e3},d=!0){super(a,o,d);S(this,"deferred");S(this,"timer");this.deferred=_t(),this.timer=pl(u.timeout,d)}resolver(a,o){this.timer&&this.timer.cancel(),a?(this.ctx&&(a.stack+=`
|
|
253
253
|
|
|
254
|
-
${this.ctx.stack}`),this.deferred.reject(a)):this.deferred.resolve(o),this.cancel()}cancel(a){this.timer&&this.timer.cancel(),this.mux.cancel(this),this.deferred.reject(a||ge.errorForCode(ue.Cancelled))}}const YT="$JS.API";function
|
|
255
|
-
`,ch=yl.fromAscii(Zd),ZT=new Uint8Array(ch)[0],KT=new Uint8Array(ch)[1];function WT(i){for(let s=0;s<i.length;s++){const a=s+1;if(i.byteLength>a&&i[s]===ZT&&i[a]===KT)return a+1}return 0}function e3(i){const s=WT(i);if(s>0){const o=new Uint8Array(i).slice(0,s);return Kn.decode(o)}return""}const t3=4,uE=48,n3=65,s3=97;function a3(i,s,a,o){const u=new Uint8Array(16);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((p,m)=>{u[m]=p}),u[12]=i,u[13]=s,u[14]=a,u[15]=o,u}function R0(i){return r3(i)!==void 0}function r3(i){for(let s=0;s<i.length;s++)switch(i[s]){case".":return fE(i);case":":return i3(i)}}function fE(i){const s=new Uint8Array(4);for(let a=0;a<4;a++){if(i.length===0)return;if(a>0){if(i[0]!==".")return;i=i.substring(1)}const{n:o,c:u,ok:d}=o3(i);if(!d||o>255)return;i=i.substring(u),s[a]=o}return a3(s[0],s[1],s[2],s[3])}function i3(i){const s=new Uint8Array(16);let a=-1;if(i.length>=2&&i[0]===":"&&i[1]===":"&&(a=0,i=i.substring(2),i.length===0))return s;let o=0;for(;o<16;){const{n:u,c:d,ok:p}=l3(i);if(!p||u>65535)return;if(d<i.length&&i[d]==="."){if(a<0&&o!=12||o+4>16)return;const m=fE(i);if(m===void 0)return;s[o]=m[12],s[o+1]=m[13],s[o+2]=m[14],s[o+3]=m[15],i="",o+=t3;break}if(s[o]=u>>8,s[o+1]=u,o+=2,i=i.substring(d),i.length===0)break;if(i[0]!==":"||i.length==1)return;if(i=i.substring(1),i[0]===":"){if(a>=0)return;if(a=o,i=i.substring(1),i.length===0)break}}if(i.length===0){if(o<16){if(a<0)return;const u=16-o;for(let d=o-1;d>=a;d--)s[d+u]=s[d];for(let d=a+u-1;d>=a;d--)s[d]=0}else if(a>=0)return;return s}}function o3(i){let s=0,a=0;for(s=0;s<i.length&&48<=i.charCodeAt(s)&&i.charCodeAt(s)<=57;s++)if(a=a*10+(i.charCodeAt(s)-uE),a>=16777215)return{n:16777215,c:s,ok:!1};return s===0?{n:0,c:0,ok:!1}:{n:a,c:s,ok:!0}}function l3(i){let s=0,a=0;for(a=0;a<i.length;a++){if(48<=i.charCodeAt(a)&&i.charCodeAt(a)<=57)s*=16,s+=i.charCodeAt(a)-uE;else if(97<=i.charCodeAt(a)&&i.charCodeAt(a)<=102)s*=16,s+=i.charCodeAt(a)-s3+10;else if(65<=i.charCodeAt(a)&&i.charCodeAt(a)<=70)s*=16,s+=i.charCodeAt(a)-n3+10;else break;if(s>=16777215)return{n:0,c:a,ok:!1}}return a===0?{n:0,c:a,ok:!1}:{n:s,c:a,ok:!0}}function c3(i){return i.indexOf("[")!==-1||i.indexOf("::")!==-1?!1:i.indexOf(".")!==-1||i.split(":").length<=2}function j0(i){return!c3(i)}function u3(i){const s="::FFFF:",a=i.toUpperCase().indexOf(s);if(a!==-1&&i.indexOf(".")!==-1){let o=i.substring(a+s.length);return o=o.replace("[",""),o.replace("]","")}return i}function f3(i){i=i.trim(),i.match(/^(.*:\/\/)(.*)/m)&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2")),i=u3(i),j0(i)&&i.indexOf("[")===-1&&(i=`[${i}]`);const s=j0(i)?i.match(/(]:)(\d+)/):i.match(/(:)(\d+)/),a=s&&s.length===3&&s[1]&&s[2]?parseInt(s[2]):4222,o=a===80?"https":"http",u=new URL(`${o}://${i}`);u.port=`${a}`;let d=u.hostname;return d.charAt(0)==="["&&(d=d.substring(1,d.length-1)),{listen:u.host,hostname:d,port:a}}class hu{constructor(s,a=!1){S(this,"src");S(this,"listen");S(this,"hostname");S(this,"port");S(this,"didConnect");S(this,"reconnects");S(this,"lastConnect");S(this,"gossiped");S(this,"tlsName");S(this,"resolves");this.src=s,this.tlsName="";const o=f3(s);this.listen=o.listen,this.hostname=o.hostname,this.port=o.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=a}toString(){return this.listen}async resolve(s){if(!s.fn||s.resolve===!1)return[this];const a=[];if(R0(this.hostname))return[this];{const o=await s.fn(this.hostname);s.debug&&console.log(`resolve ${this.hostname} = ${o.join(",")}`);for(const u of o){const d=this.port===80?"https":"http",p=new URL(`${d}://${j0(u)?"["+u+"]":u}`);p.port=`${this.port}`;const m=new hu(p.host,!1);m.tlsName=this.hostname,a.push(m)}}return s.randomize&&aE(a),this.resolves=a,a}}class d3{constructor(s=[],a={}){S(this,"firstSelect");S(this,"servers");S(this,"currentServer");S(this,"tlsName");S(this,"randomize");this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=a.randomize||!1;const o=l0();s&&(s.forEach(u=>{u=o?o(u):u,this.servers.push(new hu(u))}),this.randomize&&(this.servers=aE(this.servers))),this.servers.length===0&&this.addServer(`${S0}:${cE()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const s=this.getCurrentServer();R0(s.hostname)||(this.tlsName=s.hostname,this.servers.forEach(a=>{a.gossiped&&(a.tlsName=this.tlsName)}))}getCurrentServer(){return this.currentServer}addServer(s,a=!1){const o=l0();s=o?o(s):s;const u=new hu(s,a);R0(u.hostname)&&(u.tlsName=this.tlsName),this.servers.push(u)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;const s=this.servers.shift();return s&&(this.servers.push(s),this.currentServer=s),s}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer(s){if(s){const a=this.servers.indexOf(s);this.servers.splice(a,1)}}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update(s,a){const o=[];let u=[];const d=l0(),p=new Map;s.connect_urls&&s.connect_urls.length>0&&s.connect_urls.forEach(g=>{g=d?d(g,a):g;const x=new hu(g,!0);p.set(g,x)});const m=[];return this.servers.forEach((g,x)=>{const _=g.listen;g.gossiped&&this.currentServer.listen!==_&&p.get(_)===void 0&&m.push(x),p.delete(_)}),m.reverse(),m.forEach(g=>{const x=this.servers.splice(g,1);u=u.concat(x[0].listen)}),p.forEach((g,x)=>{this.servers.push(g),o.push(x)}),{added:o,deleted:u}}}class h3{constructor(){S(this,"baseInbox");S(this,"reqs");this.reqs=new Map}size(){return this.reqs.size}init(s){return this.baseInbox=`${nr(s)}.`,this.baseInbox}add(s){isNaN(s.received)||(s.received=0),this.reqs.set(s.token,s)}get(s){return this.reqs.get(s)}cancel(s){this.reqs.delete(s.token)}getToken(s){const a=s.subject||"";return a.indexOf(this.baseInbox)===0?a.substring(this.baseInbox.length):null}all(){return Array.from(this.reqs.values())}handleError(s,a){if(a&&a.permissionContext){if(s)return this.all().forEach(u=>{u.resolver(a,{})}),!0;const o=a.permissionContext;if(o.operation==="publish"){const u=this.all().find(d=>d.requestSubject===o.subject);if(u)return u.resolver(a,{}),!0}}return!1}dispatcher(){return(s,a)=>{const o=this.getToken(a);if(o){const u=this.get(o);u&&(s===null&&a.headers&&(s=rE(a)),u.resolver(s,a))}}}close(){const s=ge.errorForCode(ue.Timeout);this.reqs.forEach(a=>{a.resolver(s,{})})}}class m3{constructor(s,a,o){S(this,"ph");S(this,"interval");S(this,"maxOut");S(this,"timer");S(this,"pendings");this.ph=s,this.interval=a,this.maxOut=o,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel(s){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this._reset(),s&&this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:ul.PingTimer,data:`${this.pendings.length+1}`}),this.pendings.length===this.maxOut){this.cancel(!0);return}const s=_t();this.ph.flush(s).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push(s),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(s=>(s.resolve(),!1))}}class p3 extends Error{constructor(s){super(s),this.name="AssertionError"}}function b3(i,s="Assertion failed."){if(!i)throw new p3(s)}const rw=32*1024,c0=2**32-2;function Pd(i,s,a=0){const o=s.byteLength-a;return i.byteLength>o&&(i=i.subarray(0,o)),s.set(i,a),i.byteLength}class u0{constructor(s){S(this,"_buf");S(this,"_off");if(this._off=0,s==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array(s)}bytes(s={copy:!0}){return s.copy===!1?this._buf.subarray(this._off):this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate(s){if(s===0){this.reset();return}if(s<0||s>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+s)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice(s){const a=this._buf.byteLength;return s<=this.capacity-a?(this._reslice(a+s),a):-1}_reslice(s){b3(s<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,s)}readByte(){const s=new Uint8Array(1);return this.read(s)?s[0]:null}read(s){if(this.empty())return this.reset(),s.byteLength===0?0:null;const a=Pd(this._buf.subarray(this._off),s);return this._off+=a,a}writeByte(s){return this.write(Uint8Array.of(s))}writeString(s){return this.write(Wi.encode(s))}write(s){const a=this._grow(s.byteLength);return Pd(s,this._buf,a)}_grow(s){const a=this.length;a===0&&this._off!==0&&this.reset();const o=this._tryGrowByReslice(s);if(o>=0)return o;const u=this.capacity;if(s<=Math.floor(u/2)-a)Pd(this._buf.subarray(this._off),this._buf);else{if(u+s>c0)throw new Error("The buffer cannot be grown beyond the maximum size.");{const d=new Uint8Array(Math.min(2*u+s,c0));Pd(this._buf.subarray(this._off),d),this._buf=d}}return this._off=0,this._reslice(Math.min(a+s,c0)),a}grow(s){if(s<0)throw Error("Buffer._grow: negative count");const a=this._grow(s);this._reslice(a)}readFrom(s){let a=0;const o=new Uint8Array(rw);for(;;){const u=this.capacity-this.length<rw,d=u?o:new Uint8Array(this._buf.buffer,this.length),p=s.read(d);if(p===null)return a;u?this.write(d.subarray(0,p)):this._reslice(this.length+p),a+=p}}}var An;(function(i){i[i.OK=0]="OK",i[i.ERR=1]="ERR",i[i.MSG=2]="MSG",i[i.INFO=3]="INFO",i[i.PING=4]="PING",i[i.PONG=5]="PONG"})(An||(An={}));function iw(){const i={};return i.sid=-1,i.hdr=-1,i.size=-1,i}const y3=48;class ow{constructor(s){S(this,"dispatcher");S(this,"state");S(this,"as");S(this,"drop");S(this,"hdr");S(this,"ma");S(this,"argBuf");S(this,"msgBuf");this.dispatcher=s,this.state=de.OP_START,this.as=0,this.drop=0,this.hdr=0}parse(s){let a;for(a=0;a<s.length;a++){const o=s[a];switch(this.state){case de.OP_START:switch(o){case he.M:case he.m:this.state=de.OP_M,this.hdr=-1,this.ma=iw();break;case he.H:case he.h:this.state=de.OP_H,this.hdr=0,this.ma=iw();break;case he.P:case he.p:this.state=de.OP_P;break;case he.PLUS:this.state=de.OP_PLUS;break;case he.MINUS:this.state=de.OP_MINUS;break;case he.I:case he.i:this.state=de.OP_I;break;default:throw this.fail(s.subarray(a))}break;case de.OP_H:switch(o){case he.M:case he.m:this.state=de.OP_M;break;default:throw this.fail(s.subarray(a))}break;case de.OP_M:switch(o){case he.S:case he.s:this.state=de.OP_MS;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MS:switch(o){case he.G:case he.g:this.state=de.OP_MSG;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MSG:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_MSG_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MSG_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.MSG_ARG,this.as=a}break;case de.MSG_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{const u=this.argBuf?this.argBuf.bytes():s.subarray(this.as,a-this.drop);this.processMsgArgs(u),this.drop=0,this.as=a+1,this.state=de.MSG_PAYLOAD,a=this.as+this.ma.size-1;break}default:this.argBuf&&this.argBuf.writeByte(o)}break;case de.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){const u=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:An.MSG,msg:this.ma,data:u}),this.argBuf=void 0,this.msgBuf=void 0,this.state=de.MSG_END}else{let u=this.ma.size-this.msgBuf.length;const d=s.length-a;d<u&&(u=d),u>0?(this.msgBuf.write(s.subarray(a,a+u)),a=a+u-1):this.msgBuf.writeByte(o)}else a-this.as>=this.ma.size&&(this.dispatcher.push({kind:An.MSG,msg:this.ma,data:s.subarray(this.as,a)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=de.MSG_END);break;case de.MSG_END:switch(o){case he.NL:this.drop=0,this.as=a+1,this.state=de.OP_START;break;default:continue}break;case de.OP_PLUS:switch(o){case he.O:case he.o:this.state=de.OP_PLUS_O;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PLUS_O:switch(o){case he.K:case he.k:this.state=de.OP_PLUS_OK;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PLUS_OK:switch(o){case he.NL:this.dispatcher.push({kind:An.OK}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_MINUS:switch(o){case he.E:case he.e:this.state=de.OP_MINUS_E;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_E:switch(o){case he.R:case he.r:this.state=de.OP_MINUS_ER;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ER:switch(o){case he.R:case he.r:this.state=de.OP_MINUS_ERR;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ERR:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_MINUS_ERR_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ERR_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.MINUS_ERR_ARG,this.as=a}break;case de.MINUS_ERR_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{let u;this.argBuf?(u=this.argBuf.bytes(),this.argBuf=void 0):u=s.subarray(this.as,a-this.drop),this.dispatcher.push({kind:An.ERR,data:u}),this.drop=0,this.as=a+1,this.state=de.OP_START;break}default:this.argBuf&&this.argBuf.write(Uint8Array.of(o))}break;case de.OP_P:switch(o){case he.I:case he.i:this.state=de.OP_PI;break;case he.O:case he.o:this.state=de.OP_PO;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PO:switch(o){case he.N:case he.n:this.state=de.OP_PON;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PON:switch(o){case he.G:case he.g:this.state=de.OP_PONG;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PONG:switch(o){case he.NL:this.dispatcher.push({kind:An.PONG}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_PI:switch(o){case he.N:case he.n:this.state=de.OP_PIN;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PIN:switch(o){case he.G:case he.g:this.state=de.OP_PING;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PING:switch(o){case he.NL:this.dispatcher.push({kind:An.PING}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_I:switch(o){case he.N:case he.n:this.state=de.OP_IN;break;default:throw this.fail(s.subarray(a))}break;case de.OP_IN:switch(o){case he.F:case he.f:this.state=de.OP_INF;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INF:switch(o){case he.O:case he.o:this.state=de.OP_INFO;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INFO:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_INFO_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INFO_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.INFO_ARG,this.as=a}break;case de.INFO_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{let u;this.argBuf?(u=this.argBuf.bytes(),this.argBuf=void 0):u=s.subarray(this.as,a-this.drop),this.dispatcher.push({kind:An.INFO,data:u}),this.drop=0,this.as=a+1,this.state=de.OP_START;break}default:this.argBuf&&this.argBuf.writeByte(o)}break;default:throw this.fail(s.subarray(a))}}(this.state===de.MSG_ARG||this.state===de.MINUS_ERR_ARG||this.state===de.INFO_ARG)&&!this.argBuf&&(this.argBuf=new u0(s.subarray(this.as,a-this.drop))),this.state===de.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new u0(s.subarray(this.as)))}cloneMsgArg(){const s=this.ma.subject.length,a=this.ma.reply?this.ma.reply.length:0,o=new Uint8Array(s+a);o.set(this.ma.subject),this.ma.reply&&o.set(this.ma.reply,s),this.argBuf=new u0(o),this.ma.subject=o.subarray(0,s),this.ma.reply&&(this.ma.reply=o.subarray(s))}processMsgArgs(s){if(this.hdr>=0)return this.processHeaderMsgArgs(s);const a=[];let o=-1;for(let u=0;u<s.length;u++)switch(s[u]){case he.SPACE:case he.TAB:case he.CR:case he.NL:o>=0&&(a.push(s.subarray(o,u)),o=-1);break;default:o<0&&(o=u)}switch(o>=0&&a.push(s.subarray(o)),a.length){case 3:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(a[2]);break;case 4:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=a[2],this.ma.size=this.protoParseInt(a[3]);break;default:throw this.fail(s,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(s,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail(s,"processMsgArgs Bad or Missing Size Error")}fail(s,a=""){return a?a=`${a} [${this.state}]`:a=`parse error [${this.state}]`,new Error(`${a}: ${Kn.decode(s)}`)}processHeaderMsgArgs(s){const a=[];let o=-1;for(let u=0;u<s.length;u++)switch(s[u]){case he.SPACE:case he.TAB:case he.CR:case he.NL:o>=0&&(a.push(s.subarray(o,u)),o=-1);break;default:o<0&&(o=u)}switch(o>=0&&a.push(s.subarray(o)),a.length){case 4:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(a[2]),this.ma.size=this.protoParseInt(a[3]);break;case 5:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=a[2],this.ma.hdr=this.protoParseInt(a[3]),this.ma.size=this.protoParseInt(a[4]);break;default:throw this.fail(s,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt(s){if(s.length===0)return-1;let a=0;for(let o=0;o<s.length;o++){if(s[o]<48||s[o]>57)return-1;a=a*10+(s[o]-y3)}return a}}var de;(function(i){i[i.OP_START=0]="OP_START",i[i.OP_PLUS=1]="OP_PLUS",i[i.OP_PLUS_O=2]="OP_PLUS_O",i[i.OP_PLUS_OK=3]="OP_PLUS_OK",i[i.OP_MINUS=4]="OP_MINUS",i[i.OP_MINUS_E=5]="OP_MINUS_E",i[i.OP_MINUS_ER=6]="OP_MINUS_ER",i[i.OP_MINUS_ERR=7]="OP_MINUS_ERR",i[i.OP_MINUS_ERR_SPC=8]="OP_MINUS_ERR_SPC",i[i.MINUS_ERR_ARG=9]="MINUS_ERR_ARG",i[i.OP_M=10]="OP_M",i[i.OP_MS=11]="OP_MS",i[i.OP_MSG=12]="OP_MSG",i[i.OP_MSG_SPC=13]="OP_MSG_SPC",i[i.MSG_ARG=14]="MSG_ARG",i[i.MSG_PAYLOAD=15]="MSG_PAYLOAD",i[i.MSG_END=16]="MSG_END",i[i.OP_H=17]="OP_H",i[i.OP_P=18]="OP_P",i[i.OP_PI=19]="OP_PI",i[i.OP_PIN=20]="OP_PIN",i[i.OP_PING=21]="OP_PING",i[i.OP_PO=22]="OP_PO",i[i.OP_PON=23]="OP_PON",i[i.OP_PONG=24]="OP_PONG",i[i.OP_I=25]="OP_I",i[i.OP_IN=26]="OP_IN",i[i.OP_INF=27]="OP_INF",i[i.OP_INFO=28]="OP_INFO",i[i.OP_INFO_SPC=29]="OP_INFO_SPC",i[i.INFO_ARG=30]="INFO_ARG"})(de||(de={}));var he;(function(i){i[i.CR=13]="CR",i[i.E=69]="E",i[i.e=101]="e",i[i.F=70]="F",i[i.f=102]="f",i[i.G=71]="G",i[i.g=103]="g",i[i.H=72]="H",i[i.h=104]="h",i[i.I=73]="I",i[i.i=105]="i",i[i.K=75]="K",i[i.k=107]="k",i[i.M=77]="M",i[i.m=109]="m",i[i.MINUS=45]="MINUS",i[i.N=78]="N",i[i.n=110]="n",i[i.NL=10]="NL",i[i.O=79]="O",i[i.o=111]="o",i[i.P=80]="P",i[i.p=112]="p",i[i.PLUS=43]="PLUS",i[i.R=82]="R",i[i.r=114]="r",i[i.S=83]="S",i[i.s=115]="s",i[i.SPACE=32]="SPACE",i[i.TAB=9]="TAB"})(he||(he={}));(function(i){var s=function(N,A){this.hi=N|0,this.lo=A|0},a=function(N){var A,E=new Float64Array(16);if(N)for(A=0;A<N.length;A++)E[A]=N[A];return E},o=function(){throw new Error("no PRNG")},u=new Uint8Array(16),d=new Uint8Array(32);d[0]=9;var p=a(),m=a([1]),g=a([56129,1]),x=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),_=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),w=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),D=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),z=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function q(N,A){return N<<A|N>>>32-A}function F(N,A){var E=N[A+3]&255;return E=E<<8|N[A+2]&255,E=E<<8|N[A+1]&255,E<<8|N[A+0]&255}function Z(N,A){var E=N[A]<<24|N[A+1]<<16|N[A+2]<<8|N[A+3],C=N[A+4]<<24|N[A+5]<<16|N[A+6]<<8|N[A+7];return new s(E,C)}function ee(N,A,E){var C;for(C=0;C<4;C++)N[A+C]=E&255,E>>>=8}function te(N,A,E){N[A]=E.hi>>24&255,N[A+1]=E.hi>>16&255,N[A+2]=E.hi>>8&255,N[A+3]=E.hi&255,N[A+4]=E.lo>>24&255,N[A+5]=E.lo>>16&255,N[A+6]=E.lo>>8&255,N[A+7]=E.lo&255}function we(N,A,E,C,M){var L,X=0;for(L=0;L<M;L++)X|=N[A+L]^E[C+L];return(1&X-1>>>8)-1}function De(N,A,E,C){return we(N,A,E,C,16)}function U(N,A,E,C){return we(N,A,E,C,32)}function ne(N,A,E,C,M){var L=new Uint32Array(16),X=new Uint32Array(16),se=new Uint32Array(16),$=new Uint32Array(4),K,ye,Be;for(K=0;K<4;K++)X[5*K]=F(C,4*K),X[1+K]=F(E,4*K),X[6+K]=F(A,4*K),X[11+K]=F(E,16+4*K);for(K=0;K<16;K++)se[K]=X[K];for(K=0;K<20;K++){for(ye=0;ye<4;ye++){for(Be=0;Be<4;Be++)$[Be]=X[(5*ye+4*Be)%16];for($[1]^=q($[0]+$[3]|0,7),$[2]^=q($[1]+$[0]|0,9),$[3]^=q($[2]+$[1]|0,13),$[0]^=q($[3]+$[2]|0,18),Be=0;Be<4;Be++)L[4*ye+(ye+Be)%4]=$[Be]}for(Be=0;Be<16;Be++)X[Be]=L[Be]}if(M){for(K=0;K<16;K++)X[K]=X[K]+se[K]|0;for(K=0;K<4;K++)X[5*K]=X[5*K]-F(C,4*K)|0,X[6+K]=X[6+K]-F(A,4*K)|0;for(K=0;K<4;K++)ee(N,4*K,X[5*K]),ee(N,16+4*K,X[6+K])}else for(K=0;K<16;K++)ee(N,4*K,X[K]+se[K]|0)}function oe(N,A,E,C){return ne(N,A,E,C,!1),0}function W(N,A,E,C){return ne(N,A,E,C,!0),0}var Q=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function H(N,A,E,C,M,L,X){var se=new Uint8Array(16),$=new Uint8Array(64),K,ye;if(!M)return 0;for(ye=0;ye<16;ye++)se[ye]=0;for(ye=0;ye<8;ye++)se[ye]=L[ye];for(;M>=64;){for(oe($,se,X,Q),ye=0;ye<64;ye++)N[A+ye]=(E?E[C+ye]:0)^$[ye];for(K=1,ye=8;ye<16;ye++)K=K+(se[ye]&255)|0,se[ye]=K&255,K>>>=8;M-=64,A+=64,E&&(C+=64)}if(M>0)for(oe($,se,X,Q),ye=0;ye<M;ye++)N[A+ye]=(E?E[C+ye]:0)^$[ye];return 0}function le(N,A,E,C,M){return H(N,A,null,0,E,C,M)}function ie(N,A,E,C,M){var L=new Uint8Array(32);return W(L,C,M,Q),le(N,A,E,C.subarray(16),L)}function ve(N,A,E,C,M,L,X){var se=new Uint8Array(32);return W(se,L,X,Q),H(N,A,E,C,M,L.subarray(16),se)}function Ge(N,A){var E,C=0;for(E=0;E<17;E++)C=C+(N[E]+A[E]|0)|0,N[E]=C&255,C>>>=8}var tt=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]);function ae(N,A,E,C,M,L){var X,se,$,K,ye=new Uint32Array(17),Be=new Uint32Array(17),it=new Uint32Array(17),pn=new Uint32Array(17),ur=new Uint32Array(17);for($=0;$<17;$++)Be[$]=it[$]=0;for($=0;$<16;$++)Be[$]=L[$];for(Be[3]&=15,Be[4]&=252,Be[7]&=15,Be[8]&=252,Be[11]&=15,Be[12]&=252,Be[15]&=15;M>0;){for($=0;$<17;$++)pn[$]=0;for($=0;$<16&&$<M;++$)pn[$]=E[C+$];for(pn[$]=1,C+=$,M-=$,Ge(it,pn),se=0;se<17;se++)for(ye[se]=0,$=0;$<17;$++)ye[se]=ye[se]+it[$]*($<=se?Be[se-$]:320*Be[se+17-$]|0)|0|0;for(se=0;se<17;se++)it[se]=ye[se];for(K=0,$=0;$<16;$++)K=K+it[$]|0,it[$]=K&255,K>>>=8;for(K=K+it[16]|0,it[16]=K&3,K=5*(K>>>2)|0,$=0;$<16;$++)K=K+it[$]|0,it[$]=K&255,K>>>=8;K=K+it[16]|0,it[16]=K}for($=0;$<17;$++)ur[$]=it[$];for(Ge(it,tt),X=-(it[16]>>>7)|0,$=0;$<17;$++)it[$]^=X&(ur[$]^it[$]);for($=0;$<16;$++)pn[$]=L[$+16];for(pn[16]=0,Ge(it,pn),$=0;$<16;$++)N[A+$]=it[$];return 0}function pe(N,A,E,C,M,L){var X=new Uint8Array(16);return ae(X,0,E,C,M,L),De(N,A,X,0)}function xe(N,A,E,C,M){var L;if(E<32)return-1;for(ve(N,0,A,0,E,C,M),ae(N,16,N,32,E-32,N),L=0;L<16;L++)N[L]=0;return 0}function je(N,A,E,C,M){var L,X=new Uint8Array(32);if(E<32||(ie(X,0,32,C,M),pe(A,16,A,32,E-32,X)!==0))return-1;for(ve(N,0,A,0,E,C,M),L=0;L<32;L++)N[L]=0;return 0}function Te(N,A){var E;for(E=0;E<16;E++)N[E]=A[E]|0}function J(N){var A,E;for(E=0;E<16;E++)N[E]+=65536,A=Math.floor(N[E]/65536),N[(E+1)*(E<15?1:0)]+=A-1+37*(A-1)*(E===15?1:0),N[E]-=A*65536}function Ne(N,A,E){for(var C,M=~(E-1),L=0;L<16;L++)C=M&(N[L]^A[L]),N[L]^=C,A[L]^=C}function Qe(N,A){var E,C,M,L=a(),X=a();for(E=0;E<16;E++)X[E]=A[E];for(J(X),J(X),J(X),C=0;C<2;C++){for(L[0]=X[0]-65517,E=1;E<15;E++)L[E]=X[E]-65535-(L[E-1]>>16&1),L[E-1]&=65535;L[15]=X[15]-32767-(L[14]>>16&1),M=L[15]>>16&1,L[14]&=65535,Ne(X,L,1-M)}for(E=0;E<16;E++)N[2*E]=X[E]&255,N[2*E+1]=X[E]>>8}function Le(N,A){var E=new Uint8Array(32),C=new Uint8Array(32);return Qe(E,N),Qe(C,A),U(E,0,C,0)}function Ft(N){var A=new Uint8Array(32);return Qe(A,N),A[0]&1}function wa(N,A){var E;for(E=0;E<16;E++)N[E]=A[2*E]+(A[2*E+1]<<8);N[15]&=32767}function We(N,A,E){var C;for(C=0;C<16;C++)N[C]=A[C]+E[C]|0}function Rt(N,A,E){var C;for(C=0;C<16;C++)N[C]=A[C]-E[C]|0}function Me(N,A,E){var C,M,L=new Float64Array(31);for(C=0;C<31;C++)L[C]=0;for(C=0;C<16;C++)for(M=0;M<16;M++)L[C+M]+=A[C]*E[M];for(C=0;C<15;C++)L[C]+=38*L[C+16];for(C=0;C<16;C++)N[C]=L[C];J(N),J(N)}function un(N,A){Me(N,A,A)}function be(N,A){var E=a(),C;for(C=0;C<16;C++)E[C]=A[C];for(C=253;C>=0;C--)un(E,E),C!==2&&C!==4&&Me(E,E,A);for(C=0;C<16;C++)N[C]=E[C]}function eo(N,A){var E=a(),C;for(C=0;C<16;C++)E[C]=A[C];for(C=250;C>=0;C--)un(E,E),C!==1&&Me(E,E,A);for(C=0;C<16;C++)N[C]=E[C]}function Ea(N,A,E){var C=new Uint8Array(32),M=new Float64Array(80),L,X,se=a(),$=a(),K=a(),ye=a(),Be=a(),it=a();for(X=0;X<31;X++)C[X]=A[X];for(C[31]=A[31]&127|64,C[0]&=248,wa(M,E),X=0;X<16;X++)$[X]=M[X],ye[X]=se[X]=K[X]=0;for(se[0]=ye[0]=1,X=254;X>=0;--X)L=C[X>>>3]>>>(X&7)&1,Ne(se,$,L),Ne(K,ye,L),We(Be,se,K),Rt(se,se,K),We(K,$,ye),Rt($,$,ye),un(ye,Be),un(it,se),Me(se,K,se),Me(K,$,Be),We(Be,se,K),Rt(se,se,K),un($,se),Rt(K,ye,it),Me(se,K,g),We(se,se,ye),Me(K,K,se),Me(se,ye,it),Me(ye,$,M),un($,Be),Ne(se,$,L),Ne(K,ye,L);for(X=0;X<16;X++)M[X+16]=se[X],M[X+32]=K[X],M[X+48]=$[X],M[X+64]=ye[X];var pn=M.subarray(32),ur=M.subarray(16);return be(pn,pn),Me(ur,ur,pn),Qe(N,ur),0}function _a(N,A){return Ea(N,A,d)}function rr(N,A){return o(A,32),_a(N,A)}function nt(N,A,E){var C=new Uint8Array(32);return Ea(C,E,A),W(N,u,C,Q)}var to=xe,xl=je;function Sh(N,A,E,C,M,L){var X=new Uint8Array(32);return nt(X,M,L),to(N,A,E,C,X)}function pt(N,A,E,C,M,L){var X=new Uint8Array(32);return nt(X,M,L),xl(N,A,E,C,X)}function oi(){var N=0,A=0,E=0,C=0,M=65535,L,X,se;for(se=0;se<arguments.length;se++)L=arguments[se].lo,X=arguments[se].hi,N+=L&M,A+=L>>>16,E+=X&M,C+=X>>>16;return A+=N>>>16,E+=A>>>16,C+=E>>>16,new s(E&M|C<<16,N&M|A<<16)}function Us(N,A){return new s(N.hi>>>A,N.lo>>>A|N.hi<<32-A)}function Aa(){var N=0,A=0,E;for(E=0;E<arguments.length;E++)N^=arguments[E].lo,A^=arguments[E].hi;return new s(A,N)}function fn(N,A){var E,C,M=32-A;return A<32?(E=N.hi>>>A|N.lo<<M,C=N.lo>>>A|N.hi<<M):A<64&&(E=N.lo>>>A|N.hi<<M,C=N.hi>>>A|N.lo<<M),new s(E,C)}function wh(N,A,E){var C=N.hi&A.hi^~N.hi&E.hi,M=N.lo&A.lo^~N.lo&E.lo;return new s(C,M)}function Nl(N,A,E){var C=N.hi&A.hi^N.hi&E.hi^A.hi&E.hi,M=N.lo&A.lo^N.lo&E.lo^A.lo&E.lo;return new s(C,M)}function Sl(N){return Aa(fn(N,28),fn(N,34),fn(N,39))}function li(N){return Aa(fn(N,14),fn(N,18),fn(N,41))}function Eh(N){return Aa(fn(N,1),fn(N,8),Us(N,7))}function Eu(N){return Aa(fn(N,19),fn(N,61),Us(N,6))}var _u=[new s(1116352408,3609767458),new s(1899447441,602891725),new s(3049323471,3964484399),new s(3921009573,2173295548),new s(961987163,4081628472),new s(1508970993,3053834265),new s(2453635748,2937671579),new s(2870763221,3664609560),new s(3624381080,2734883394),new s(310598401,1164996542),new s(607225278,1323610764),new s(1426881987,3590304994),new s(1925078388,4068182383),new s(2162078206,991336113),new s(2614888103,633803317),new s(3248222580,3479774868),new s(3835390401,2666613458),new s(4022224774,944711139),new s(264347078,2341262773),new s(604807628,2007800933),new s(770255983,1495990901),new s(1249150122,1856431235),new s(1555081692,3175218132),new s(1996064986,2198950837),new s(2554220882,3999719339),new s(2821834349,766784016),new s(2952996808,2566594879),new s(3210313671,3203337956),new s(3336571891,1034457026),new s(3584528711,2466948901),new s(113926993,3758326383),new s(338241895,168717936),new s(666307205,1188179964),new s(773529912,1546045734),new s(1294757372,1522805485),new s(1396182291,2643833823),new s(1695183700,2343527390),new s(1986661051,1014477480),new s(2177026350,1206759142),new s(2456956037,344077627),new s(2730485921,1290863460),new s(2820302411,3158454273),new s(3259730800,3505952657),new s(3345764771,106217008),new s(3516065817,3606008344),new s(3600352804,1432725776),new s(4094571909,1467031594),new s(275423344,851169720),new s(430227734,3100823752),new s(506948616,1363258195),new s(659060556,3750685593),new s(883997877,3785050280),new s(958139571,3318307427),new s(1322822218,3812723403),new s(1537002063,2003034995),new s(1747873779,3602036899),new s(1955562222,1575990012),new s(2024104815,1125592928),new s(2227730452,2716904306),new s(2361852424,442776044),new s(2428436474,593698344),new s(2756734187,3733110249),new s(3204031479,2999351573),new s(3329325298,3815920427),new s(3391569614,3928383900),new s(3515267271,566280711),new s(3940187606,3454069534),new s(4118630271,4000239992),new s(116418474,1914138554),new s(174292421,2731055270),new s(289380356,3203993006),new s(460393269,320620315),new s(685471733,587496836),new s(852142971,1086792851),new s(1017036298,365543100),new s(1126000580,2618297676),new s(1288033470,3409855158),new s(1501505948,4234509866),new s(1607167915,987167468),new s(1816402316,1246189591)];function wl(N,A,E){var C=[],M=[],L=[],X=[],se,$,K;for($=0;$<8;$++)C[$]=L[$]=Z(N,8*$);for(var ye=0;E>=128;){for($=0;$<16;$++)X[$]=Z(A,8*$+ye);for($=0;$<80;$++){for(K=0;K<8;K++)M[K]=L[K];for(se=oi(L[7],li(L[4]),wh(L[4],L[5],L[6]),_u[$],X[$%16]),M[7]=oi(se,Sl(L[0]),Nl(L[0],L[1],L[2])),M[3]=oi(M[3],se),K=0;K<8;K++)L[(K+1)%8]=M[K];if($%16===15)for(K=0;K<16;K++)X[K]=oi(X[K],X[(K+9)%16],Eh(X[(K+1)%16]),Eu(X[(K+14)%16]))}for($=0;$<8;$++)L[$]=oi(L[$],C[$]),C[$]=L[$];ye+=128,E-=128}for($=0;$<8;$++)te(N,8*$,C[$]);return E}var El=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]);function zs(N,A,E){var C=new Uint8Array(64),M=new Uint8Array(256),L,X=E;for(L=0;L<64;L++)C[L]=El[L];for(wl(C,A,E),E%=128,L=0;L<256;L++)M[L]=0;for(L=0;L<E;L++)M[L]=A[X-E+L];for(M[E]=128,E=256-128*(E<112?1:0),M[E-9]=0,te(M,E-8,new s(X/536870912|0,X<<3)),wl(C,M,E),L=0;L<64;L++)N[L]=C[L];return 0}function ci(N,A){var E=a(),C=a(),M=a(),L=a(),X=a(),se=a(),$=a(),K=a(),ye=a();Rt(E,N[1],N[0]),Rt(ye,A[1],A[0]),Me(E,E,ye),We(C,N[0],N[1]),We(ye,A[0],A[1]),Me(C,C,ye),Me(M,N[3],A[3]),Me(M,M,_),Me(L,N[2],A[2]),We(L,L,L),Rt(X,C,E),Rt(se,L,M),We($,L,M),We(K,C,E),Me(N[0],X,se),Me(N[1],K,$),Me(N[2],$,se),Me(N[3],X,K)}function no(N,A,E){var C;for(C=0;C<4;C++)Ne(N[C],A[C],E)}function so(N,A){var E=a(),C=a(),M=a();be(M,A[2]),Me(E,A[0],M),Me(C,A[1],M),Qe(N,C),N[31]^=Ft(E)<<7}function ao(N,A,E){var C,M;for(Te(N[0],p),Te(N[1],m),Te(N[2],m),Te(N[3],p),M=255;M>=0;--M)C=E[M/8|0]>>(M&7)&1,no(N,A,C),ci(A,N),ci(N,N),no(N,A,C)}function ir(N,A){var E=[a(),a(),a(),a()];Te(E[0],w),Te(E[1],D),Te(E[2],m),Me(E[3],w,D),ao(N,E,A)}function Bs(N,A,E){var C=new Uint8Array(64),M=[a(),a(),a(),a()],L;for(E||o(A,32),zs(C,A,32),C[0]&=248,C[31]&=127,C[31]|=64,ir(M,C),so(N,M),L=0;L<32;L++)A[L+32]=N[L];return 0}var Un=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Da(N,A){var E,C,M,L;for(C=63;C>=32;--C){for(E=0,M=C-32,L=C-12;M<L;++M)A[M]+=E-16*A[C]*Un[M-(C-32)],E=Math.floor((A[M]+128)/256),A[M]-=E*256;A[M]+=E,A[C]=0}for(E=0,M=0;M<32;M++)A[M]+=E-(A[31]>>4)*Un[M],E=A[M]>>8,A[M]&=255;for(M=0;M<32;M++)A[M]-=E*Un[M];for(C=0;C<32;C++)A[C+1]+=A[C]>>8,N[C]=A[C]&255}function qs(N){var A=new Float64Array(64),E;for(E=0;E<64;E++)A[E]=N[E];for(E=0;E<64;E++)N[E]=0;Da(N,A)}function jt(N,A,E,C){var M=new Uint8Array(64),L=new Uint8Array(64),X=new Uint8Array(64),se,$,K=new Float64Array(64),ye=[a(),a(),a(),a()];zs(M,C,32),M[0]&=248,M[31]&=127,M[31]|=64;var Be=E+64;for(se=0;se<E;se++)N[64+se]=A[se];for(se=0;se<32;se++)N[32+se]=M[32+se];for(zs(X,N.subarray(32),E+32),qs(X),ir(ye,X),so(N,ye),se=32;se<64;se++)N[se]=C[se];for(zs(L,N,E+64),qs(L),se=0;se<64;se++)K[se]=0;for(se=0;se<32;se++)K[se]=X[se];for(se=0;se<32;se++)for($=0;$<32;$++)K[se+$]+=L[se]*M[$];return Da(N.subarray(32),K),Be}function Ca(N,A){var E=a(),C=a(),M=a(),L=a(),X=a(),se=a(),$=a();return Te(N[2],m),wa(N[1],A),un(M,N[1]),Me(L,M,x),Rt(M,M,N[2]),We(L,N[2],L),un(X,L),un(se,X),Me($,se,X),Me(E,$,M),Me(E,E,L),eo(E,E),Me(E,E,M),Me(E,E,L),Me(E,E,L),Me(N[0],E,L),un(C,N[0]),Me(C,C,L),Le(C,M)&&Me(N[0],N[0],z),un(C,N[0]),Me(C,C,L),Le(C,M)?-1:(Ft(N[0])===A[31]>>7&&Rt(N[0],p,N[0]),Me(N[3],N[0],N[1]),0)}function Ls(N,A,E,C){var M,L=new Uint8Array(32),X=new Uint8Array(64),se=[a(),a(),a(),a()],$=[a(),a(),a(),a()];if(E<64||Ca($,C))return-1;for(M=0;M<E;M++)N[M]=A[M];for(M=0;M<32;M++)N[M+32]=C[M];if(zs(X,N,E),qs(X),ao(se,$,X),ir($,A.subarray(32)),ci(se,$),so(L,se),E-=64,U(A,0,L,0)){for(M=0;M<E;M++)N[M]=0;return-1}for(M=0;M<E;M++)N[M]=A[M+64];return E}var Hs=32,or=24,lr=32,vs=16,Ps=32,Cn=32,Xt=32,cr=32,_l=32,ro=or,Au=lr,io=vs,Ct=64,$s=32,Is=64,oo=32,ui=64;i.lowlevel={crypto_core_hsalsa20:W,crypto_stream_xor:ve,crypto_stream:ie,crypto_stream_salsa20_xor:H,crypto_stream_salsa20:le,crypto_onetimeauth:ae,crypto_onetimeauth_verify:pe,crypto_verify_16:De,crypto_verify_32:U,crypto_secretbox:xe,crypto_secretbox_open:je,crypto_scalarmult:Ea,crypto_scalarmult_base:_a,crypto_box_beforenm:nt,crypto_box_afternm:to,crypto_box:Sh,crypto_box_open:pt,crypto_box_keypair:rr,crypto_hash:zs,crypto_sign:jt,crypto_sign_keypair:Bs,crypto_sign_open:Ls,crypto_secretbox_KEYBYTES:Hs,crypto_secretbox_NONCEBYTES:or,crypto_secretbox_ZEROBYTES:lr,crypto_secretbox_BOXZEROBYTES:vs,crypto_scalarmult_BYTES:Ps,crypto_scalarmult_SCALARBYTES:Cn,crypto_box_PUBLICKEYBYTES:Xt,crypto_box_SECRETKEYBYTES:cr,crypto_box_BEFORENMBYTES:_l,crypto_box_NONCEBYTES:ro,crypto_box_ZEROBYTES:Au,crypto_box_BOXZEROBYTES:io,crypto_sign_BYTES:Ct,crypto_sign_PUBLICKEYBYTES:$s,crypto_sign_SECRETKEYBYTES:Is,crypto_sign_SEEDBYTES:oo,crypto_hash_BYTES:ui,gf:a,D:x,L:Un,pack25519:Qe,unpack25519:wa,M:Me,A:We,S:un,Z:Rt,pow2523:eo,add:ci,set25519:Te,modL:Da,scalarmult:ao,scalarbase:ir};function Al(N,A){if(N.length!==Hs)throw new Error("bad key size");if(A.length!==or)throw new Error("bad nonce size")}function Du(N,A){if(N.length!==Xt)throw new Error("bad public key size");if(A.length!==cr)throw new Error("bad secret key size")}function Ut(){for(var N=0;N<arguments.length;N++)if(!(arguments[N]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Dl(N){for(var A=0;A<N.length;A++)N[A]=0}i.randomBytes=function(N){var A=new Uint8Array(N);return o(A,N),A},i.secretbox=function(N,A,E){Ut(N,A,E),Al(E,A);for(var C=new Uint8Array(lr+N.length),M=new Uint8Array(C.length),L=0;L<N.length;L++)C[L+lr]=N[L];return xe(M,C,C.length,A,E),M.subarray(vs)},i.secretbox.open=function(N,A,E){Ut(N,A,E),Al(E,A);for(var C=new Uint8Array(vs+N.length),M=new Uint8Array(C.length),L=0;L<N.length;L++)C[L+vs]=N[L];return C.length<32||je(M,C,C.length,A,E)!==0?null:M.subarray(lr)},i.secretbox.keyLength=Hs,i.secretbox.nonceLength=or,i.secretbox.overheadLength=vs,i.scalarMult=function(N,A){if(Ut(N,A),N.length!==Cn)throw new Error("bad n size");if(A.length!==Ps)throw new Error("bad p size");var E=new Uint8Array(Ps);return Ea(E,N,A),E},i.scalarMult.base=function(N){if(Ut(N),N.length!==Cn)throw new Error("bad n size");var A=new Uint8Array(Ps);return _a(A,N),A},i.scalarMult.scalarLength=Cn,i.scalarMult.groupElementLength=Ps,i.box=function(N,A,E,C){var M=i.box.before(E,C);return i.secretbox(N,A,M)},i.box.before=function(N,A){Ut(N,A),Du(N,A);var E=new Uint8Array(_l);return nt(E,N,A),E},i.box.after=i.secretbox,i.box.open=function(N,A,E,C){var M=i.box.before(E,C);return i.secretbox.open(N,A,M)},i.box.open.after=i.secretbox.open,i.box.keyPair=function(){var N=new Uint8Array(Xt),A=new Uint8Array(cr);return rr(N,A),{publicKey:N,secretKey:A}},i.box.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==cr)throw new Error("bad secret key size");var A=new Uint8Array(Xt);return _a(A,N),{publicKey:A,secretKey:new Uint8Array(N)}},i.box.publicKeyLength=Xt,i.box.secretKeyLength=cr,i.box.sharedKeyLength=_l,i.box.nonceLength=ro,i.box.overheadLength=i.secretbox.overheadLength,i.sign=function(N,A){if(Ut(N,A),A.length!==Is)throw new Error("bad secret key size");var E=new Uint8Array(Ct+N.length);return jt(E,N,N.length,A),E},i.sign.open=function(N,A){if(Ut(N,A),A.length!==$s)throw new Error("bad public key size");var E=new Uint8Array(N.length),C=Ls(E,N,N.length,A);if(C<0)return null;for(var M=new Uint8Array(C),L=0;L<M.length;L++)M[L]=E[L];return M},i.sign.detached=function(N,A){for(var E=i.sign(N,A),C=new Uint8Array(Ct),M=0;M<C.length;M++)C[M]=E[M];return C},i.sign.detached.verify=function(N,A,E){if(Ut(N,A,E),A.length!==Ct)throw new Error("bad signature size");if(E.length!==$s)throw new Error("bad public key size");var C=new Uint8Array(Ct+N.length),M=new Uint8Array(Ct+N.length),L;for(L=0;L<Ct;L++)C[L]=A[L];for(L=0;L<N.length;L++)C[L+Ct]=N[L];return Ls(M,C,C.length,E)>=0},i.sign.keyPair=function(){var N=new Uint8Array($s),A=new Uint8Array(Is);return Bs(N,A),{publicKey:N,secretKey:A}},i.sign.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==Is)throw new Error("bad secret key size");for(var A=new Uint8Array($s),E=0;E<A.length;E++)A[E]=N[32+E];return{publicKey:A,secretKey:new Uint8Array(N)}},i.sign.keyPair.fromSeed=function(N){if(Ut(N),N.length!==oo)throw new Error("bad seed size");for(var A=new Uint8Array($s),E=new Uint8Array(Is),C=0;C<32;C++)E[C]=N[C];return Bs(A,E,!0),{publicKey:A,secretKey:E}},i.sign.publicKeyLength=$s,i.sign.secretKeyLength=Is,i.sign.seedLength=oo,i.sign.signatureLength=Ct,i.hash=function(N){Ut(N);var A=new Uint8Array(ui);return zs(A,N,N.length),A},i.hash.hashLength=ui,i.verify=function(N,A){return Ut(N,A),N.length===0||A.length===0||N.length!==A.length?!1:we(N,0,A,0,N.length)===0},i.setPRNG=function(N){o=N},(function(){var N=typeof globalThis<"u"?globalThis.crypto||globalThis.msCrypto:null;if(N&&N.getRandomValues){var A=65536;i.setPRNG(function(E,C){var M,L=new Uint8Array(C);for(M=0;M<C;M+=A)N.getRandomValues(L.subarray(M,M+Math.min(C-M,A)));for(M=0;M<C;M++)E[M]=L[M];Dl(L)})}else typeof require<"u"&&(N=require("crypto"),N&&N.randomBytes&&i.setPRNG(function(E,C){var M,L=N.randomBytes(C);for(M=0;M<C;M++)E[M]=L[M];Dl(L)}))})()})(typeof module<"u"&&module.exports?module.exports:globalThis.nacl=globalThis.nacl||{});const $d=typeof module<"u"&&module.exports?module.exports:globalThis.nacl;$d.sign.keyPair.fromSeed,$d.sign.detached,$d.sign.detached.verify,$d.randomBytes;var lw;(function(i){i.InvalidPrefixByte="nkeys: invalid prefix byte",i.InvalidKey="nkeys: invalid key",i.InvalidPublicKey="nkeys: invalid public key",i.InvalidSeedLen="nkeys: invalid seed length",i.InvalidSeed="nkeys: invalid seed",i.InvalidEncoding="nkeys: invalid encoded key",i.InvalidSignature="nkeys: signature verification failed",i.CannotSign="nkeys: cannot sign, no private key available",i.PublicKeyOnly="nkeys: no seed or private key available",i.InvalidChecksum="nkeys: invalid checksum",i.SerializationError="nkeys: serialization error",i.ApiError="nkeys: api error",i.ClearedPair="nkeys: pair is cleared"})(lw||(lw={}));var cw;(function(i){i[i.Seed=144]="Seed",i[i.Private=120]="Private",i[i.Operator=112]="Operator",i[i.Server=104]="Server",i[i.Cluster=16]="Cluster",i[i.Account=0]="Account",i[i.User=160]="User"})(cw||(cw={}));function g3(i){return s=>{let a={};return i.forEach(o=>{const u=o(s)||{};a=Object.assign(a,u)}),a}}function v3(){return()=>{}}function x3(i,s){return()=>{const a=typeof i=="function"?i():i,o=typeof s=="function"?s():s;return{user:a,pass:o}}}function N3(i){return()=>({auth_token:typeof i=="function"?i():i})}const dE=120*1e3,S3=2,hE=2*1e3;function w3(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:dE,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:hE,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function E3(i){const s=[];return typeof i.authenticator=="function"&&s.push(i.authenticator),Array.isArray(i.authenticator)&&s.push(...i.authenticator),i.token&&s.push(N3(i.token)),i.user&&s.push(x3(i.user,i.pass)),s.length===0?v3():g3(s)}function _3(i){const s=`${S0}:${cE()}`;if(i=i||{servers:[s]},i.servers=i.servers||[],typeof i.servers=="string"&&(i.servers=[i.servers]),i.servers.length>0&&i.port)throw new ge("port and servers options are mutually exclusive",ue.InvalidOption);i.servers.length===0&&i.port&&(i.servers=[`${S0}:${i.port}`]),i.servers&&i.servers.length===0&&(i.servers=[s]);const a=ph(w3(),i);if(a.authenticator=E3(a),["reconnectDelayHandler","authenticator"].forEach(o=>{if(a[o]&&typeof a[o]!="function")throw new ge(`${o} option should be a function`,ue.NotFunction)}),a.reconnectDelayHandler||(a.reconnectDelayHandler=()=>{let o=a.tls?a.reconnectJitterTLS:a.reconnectJitter;return o&&(o++,o=Math.floor(Math.random()*o)),a.reconnectTimeWait+o}),a.inboxPrefix)try{nr(a.inboxPrefix)}catch(o){throw new ge(o.message,ue.ApiError)}if(a.resolve===void 0&&(a.resolve=typeof O0()=="function"),a.resolve&&typeof O0()!="function")throw new ge("'resolve' is not supported on this client",ue.InvalidOption);return a}function A3(i,s){const{proto:a,tls_required:o,tls_available:u}=i;if((a===void 0||a<1)&&s.noEcho)throw new ge("noEcho",ue.ServerOptionNotAvailable);const d=o||u||!1;if(s.tls&&!d)throw new ge("tls",ue.ServerOptionNotAvailable)}const D3=1024*32,C3=/^INFO\s+([^\r\n]+)\r\n/i,T3=fu(`PONG\r
|
|
254
|
+
${this.ctx.stack}`),this.deferred.reject(a)):this.deferred.resolve(o),this.cancel()}cancel(a){this.timer&&this.timer.cancel(),this.mux.cancel(this),this.deferred.reject(a||ge.errorForCode(ue.Cancelled))}}const YT="$JS.API";function JT(i){return i=i||{},i.domain&&(i.apiPrefix=`$JS.${i.domain}.API`,delete i.domain),ph({apiPrefix:YT,timeout:5e3},i)}class Nu{constructor(s,a){S(this,"nc");S(this,"opts");S(this,"prefix");S(this,"timeout");S(this,"jc");this.nc=s,this.opts=JT(a),this._parseOpts(),this.prefix=this.opts.apiPrefix,this.timeout=this.opts.timeout,this.jc=ks()}getOptions(){return Object.assign({},this.opts)}_parseOpts(){let s=this.opts.apiPrefix;if(!s||s.length===0)throw new Error("invalid empty prefix");s[s.length-1]==="."&&(s=s.substr(0,s.length-1)),this.opts.apiPrefix=s}async _request(s,a=null,o){o=o||{},o.timeout=this.timeout;let u=es;a&&(u=this.jc.encode(a));let{retries:d}=o;d=d||1,d=d===-1?Number.MAX_SAFE_INTEGER:d;const p=Q0();for(let m=0;m<d;m++)try{const g=await this.nc.request(s,u,o);return this.parseJsResponse(g)}catch(g){const x=g;if((x.code==="503"||x.code===ue.Timeout)&&m+1<d)await gl(p.backoff(m));else throw g}}async findStream(s){const a={subject:s},u=await this._request(`${this.prefix}.STREAM.NAMES`,a);if(!u.streams||u.streams.length!==1)throw new Error("no stream matches subject");return u.streams[0]}getConnection(){return this.nc}parseJsResponse(s){const a=this.jc.decode(s.data),o=a;if(o.error){const u=iE(o.error.code,o.error.description);if(u!==null)throw u.api_error=o.error,u}return a}}class lu{constructor(s,a,o,u){S(this,"err");S(this,"offset");S(this,"pageInfo");S(this,"subject");S(this,"jsm");S(this,"filter");S(this,"payload");if(!s)throw new Error("subject is required");this.subject=s,this.jsm=o,this.offset=0,this.pageInfo={},this.filter=a,this.payload=u||{}}async next(){if(this.err)return[];if(this.pageInfo&&this.offset>=this.pageInfo.total)return[];const s={offset:this.offset};this.payload&&Object.assign(s,this.payload);try{const a=await this.jsm._request(this.subject,s,{timeout:this.jsm.timeout});this.pageInfo=a;const o=this.countResponse(a);return o===0?[]:(this.offset+=o,this.filter(a))}catch(a){throw this.err=a,a}}countResponse(s){var a,o,u;switch(s==null?void 0:s.type){case"io.nats.jetstream.api.v1.stream_names_response":case"io.nats.jetstream.api.v1.stream_list_response":return((a=s.streams)==null?void 0:a.length)||0;case"io.nats.jetstream.api.v1.consumer_list_response":return((o=s.consumers)==null?void 0:o.length)||0;default:return console.error(`jslister.ts: unknown API response for paged output: ${s==null?void 0:s.type}`),((u=s.streams)==null?void 0:u.length)||0}return 0}async*[Symbol.asyncIterator](){let s=await this.next();for(;s.length>0;){for(const a of s)yield a;s=await this.next()}}}function Xi(i=""){const s=i.match(/(\d+).(\d+).(\d+)/);if(s)return{major:parseInt(s[1]),minor:parseInt(s[2]),micro:parseInt(s[3])};throw new Error(`'${i}' is not a semver value`)}function O0(i,s){return i.major<s.major?-1:i.major>s.major?1:i.minor<s.minor?-1:i.minor>s.minor?1:i.micro<s.micro?-1:i.micro>s.micro?1:0}var et;(function(i){i.JS_KV="js_kv",i.JS_OBJECTSTORE="js_objectstore",i.JS_PULL_MAX_BYTES="js_pull_max_bytes",i.JS_NEW_CONSUMER_CREATE_API="js_new_consumer_create",i.JS_ALLOW_DIRECT="js_allow_direct",i.JS_MULTIPLE_CONSUMER_FILTER="js_multiple_consumer_filter",i.JS_SIMPLIFICATION="js_simplification",i.JS_STREAM_CONSUMER_METADATA="js_stream_consumer_metadata",i.JS_CONSUMER_FILTER_SUBJECTS="js_consumer_filter_subjects",i.JS_STREAM_FIRST_SEQ="js_stream_first_seq",i.JS_STREAM_SUBJECT_TRANSFORM="js_stream_subject_transform",i.JS_STREAM_SOURCE_SUBJECT_TRANSFORM="js_stream_source_subject_transform",i.JS_STREAM_COMPRESSION="js_stream_compression",i.JS_DEFAULT_CONSUMER_LIMITS="js_default_consumer_limits",i.JS_BATCH_DIRECT_GET="js_batch_direct_get"})(et||(et={}));class GT{constructor(s){S(this,"server");S(this,"features");S(this,"disabled");this.features=new Map,this.disabled=[],this.update(s)}resetDisabled(){this.disabled.length=0,this.update(this.server)}disable(s){this.disabled.push(s),this.update(this.server)}isDisabled(s){return this.disabled.indexOf(s)!==-1}update(s){typeof s=="string"&&(s=Xi(s)),this.server=s,this.set(et.JS_KV,"2.6.2"),this.set(et.JS_OBJECTSTORE,"2.6.3"),this.set(et.JS_PULL_MAX_BYTES,"2.8.3"),this.set(et.JS_NEW_CONSUMER_CREATE_API,"2.9.0"),this.set(et.JS_ALLOW_DIRECT,"2.9.0"),this.set(et.JS_MULTIPLE_CONSUMER_FILTER,"2.10.0"),this.set(et.JS_SIMPLIFICATION,"2.9.4"),this.set(et.JS_STREAM_CONSUMER_METADATA,"2.10.0"),this.set(et.JS_CONSUMER_FILTER_SUBJECTS,"2.10.0"),this.set(et.JS_STREAM_FIRST_SEQ,"2.10.0"),this.set(et.JS_STREAM_SUBJECT_TRANSFORM,"2.10.0"),this.set(et.JS_STREAM_SOURCE_SUBJECT_TRANSFORM,"2.10.0"),this.set(et.JS_STREAM_COMPRESSION,"2.10.0"),this.set(et.JS_DEFAULT_CONSUMER_LIMITS,"2.10.0"),this.set(et.JS_BATCH_DIRECT_GET,"2.11.0"),this.disabled.forEach(a=>{this.features.delete(a)})}set(s,a){this.features.set(s,{min:a,ok:O0(this.server,Xi(a))>=0})}get(s){return this.features.get(s)||{min:"unknown",ok:!1}}supports(s){var a;return((a=this.get(s))==null?void 0:a.ok)||!1}require(s){return typeof s=="string"&&(s=Xi(s)),O0(this.server,s)>=0}}class lh extends Nu{constructor(s,a){super(s,a)}async add(s,a,o=oh.Create){if(_n(s),a.deliver_group&&a.flow_control)throw new Error("jetstream flow control is not supported with queue groups");if(a.deliver_group&&a.idle_heartbeat)throw new Error("jetstream idle heartbeat is not supported with queue groups");const u={};u.config=a,u.stream_name=s,u.action=o,u.config.durable_name&&fl(u.config.durable_name);const d=this.nc;let{min:p,ok:m}=d.features.get(et.JS_NEW_CONSUMER_CREATE_API);const g=a.name===""?void 0:a.name;if(g&&!m)throw new Error(`consumer 'name' requires server ${p}`);if(g)try{bh("name",g)}catch(D){const z=D.message,q=z.indexOf("cannot contain");throw q!==-1?new Error(`consumer 'name' ${z.substring(q)}`):D}let x,_="";if(Array.isArray(a.filter_subjects)){const{min:D,ok:z}=d.features.get(et.JS_MULTIPLE_CONSUMER_FILTER);if(!z)throw new Error(`consumer 'filter_subjects' requires server ${D}`);m=!1}if(a.metadata){const{min:D,ok:z}=d.features.get(et.JS_STREAM_CONSUMER_METADATA);if(!z)throw new Error(`consumer 'metadata' requires server ${D}`)}if(m&&(_=a.name??a.durable_name??""),_!==""){let D=a.filter_subject??void 0;D===">"&&(D=void 0),x=D!==void 0?`${this.prefix}.CONSUMER.CREATE.${s}.${_}.${D}`:`${this.prefix}.CONSUMER.CREATE.${s}.${_}`}else x=a.durable_name?`${this.prefix}.CONSUMER.DURABLE.CREATE.${s}.${a.durable_name}`:`${this.prefix}.CONSUMER.CREATE.${s}`;return await this._request(x,u)}async update(s,a,o){const u=await this.info(s,a),d=o;return this.add(s,Object.assign(u.config,d),oh.Update)}async info(s,a){return _n(s),fl(a),await this._request(`${this.prefix}.CONSUMER.INFO.${s}.${a}`)}async delete(s,a){return _n(s),fl(a),(await this._request(`${this.prefix}.CONSUMER.DELETE.${s}.${a}`)).success}list(s){_n(s);const a=u=>u.consumers,o=`${this.prefix}.CONSUMER.LIST.${s}`;return new lu(o,a,this)}pause(s,a,o){const u=`${this.prefix}.CONSUMER.PAUSE.${s}.${a}`,d={pause_until:o.toISOString()};return this._request(u,d)}resume(s,a){return this.pause(s,a,new Date(0))}}function ol(i,s,a=!1){if(a===!0&&!i)throw ge.errorForCode(ue.ApiError,new Error(`${s} is not a function`));if(i&&typeof i!="function")throw ge.errorForCode(ue.ApiError,new Error(`${s} is not a function`))}class QT extends sn{constructor(a,o,u){super();S(this,"sub");S(this,"adapter");S(this,"subIterDone");ol(u.adapter,"adapter",!0),this.adapter=u.adapter,u.callback&&ol(u.callback,"callback"),this.noIterator=typeof u.callback=="function",u.ingestionFilterFn&&(ol(u.ingestionFilterFn,"ingestionFilterFn"),this.ingestionFilterFn=u.ingestionFilterFn),u.protocolFilterFn&&(ol(u.protocolFilterFn,"protocolFilterFn"),this.protocolFilterFn=u.protocolFilterFn),u.dispatchedFn&&(ol(u.dispatchedFn,"dispatchedFn"),this.dispatchedFn=u.dispatchedFn),u.cleanupFn&&ol(u.cleanupFn,"cleanupFn");let d=(_,w)=>{this.callback(_,w)};if(u.callback){const _=u.callback;d=(w,D)=>{const[z,q]=this.adapter(w,D);if(z){_(z,null);return}const{ingest:Y}=this.ingestionFilterFn?this.ingestionFilterFn(q,this):{ingest:!0};Y&&(!this.protocolFilterFn||this.protocolFilterFn(q))&&(_(z,q),this.dispatchedFn&&q&&this.dispatchedFn(q))}}const{max:p,queue:m,timeout:g}=u,x={queue:m,timeout:g,callback:d};p&&p>0&&(x.max=p),this.sub=a.subscribe(o,x),u.cleanupFn&&(this.sub.cleanupFn=u.cleanupFn),this.noIterator||this.iterClosed.then(()=>{this.unsubscribe()}),this.subIterDone=_t(),Promise.all([this.sub.closed,this.iterClosed]).then(()=>{this.subIterDone.resolve()}).catch(()=>{this.subIterDone.resolve()}),(async _=>{await _.closed,this.stop()})(this.sub).then().catch()}unsubscribe(a){this.sub.unsubscribe(a)}drain(){return this.sub.drain()}isDraining(){return this.sub.isDraining()}isClosed(){return this.sub.isClosed()}callback(a,o){this.sub.cancelTimeout();const[u,d]=this.adapter(a,o);u&&this.stop(u),d&&this.push(d)}getSubject(){return this.sub.getSubject()}getReceived(){return this.sub.getReceived()}getProcessed(){return this.sub.getProcessed()}getPending(){return this.sub.getPending()}getID(){return this.sub.getID()}getMax(){return this.sub.getMax()}get closed(){return this.sub.closed}}let Wn;function XT(i){Wn=i}function cE(){return Wn!==void 0&&Wn.defaultPort!==void 0?Wn.defaultPort:4222}function c0(){return Wn!==void 0&&Wn.urlParseFn?Wn.urlParseFn:void 0}function ZT(){if(!Wn||typeof Wn.factory!="function")throw new Error("transport fn is not set");return Wn.factory()}function R0(){return Wn!==void 0&&Wn.dnsResolveFn?Wn.dnsResolveFn:void 0}const Zd=`\r
|
|
255
|
+
`,ch=yl.fromAscii(Zd),KT=new Uint8Array(ch)[0],WT=new Uint8Array(ch)[1];function e3(i){for(let s=0;s<i.length;s++){const a=s+1;if(i.byteLength>a&&i[s]===KT&&i[a]===WT)return a+1}return 0}function t3(i){const s=e3(i);if(s>0){const o=new Uint8Array(i).slice(0,s);return Kn.decode(o)}return""}const n3=4,uE=48,s3=65,a3=97;function r3(i,s,a,o){const u=new Uint8Array(16);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((p,m)=>{u[m]=p}),u[12]=i,u[13]=s,u[14]=a,u[15]=o,u}function j0(i){return i3(i)!==void 0}function i3(i){for(let s=0;s<i.length;s++)switch(i[s]){case".":return fE(i);case":":return o3(i)}}function fE(i){const s=new Uint8Array(4);for(let a=0;a<4;a++){if(i.length===0)return;if(a>0){if(i[0]!==".")return;i=i.substring(1)}const{n:o,c:u,ok:d}=l3(i);if(!d||o>255)return;i=i.substring(u),s[a]=o}return r3(s[0],s[1],s[2],s[3])}function o3(i){const s=new Uint8Array(16);let a=-1;if(i.length>=2&&i[0]===":"&&i[1]===":"&&(a=0,i=i.substring(2),i.length===0))return s;let o=0;for(;o<16;){const{n:u,c:d,ok:p}=c3(i);if(!p||u>65535)return;if(d<i.length&&i[d]==="."){if(a<0&&o!=12||o+4>16)return;const m=fE(i);if(m===void 0)return;s[o]=m[12],s[o+1]=m[13],s[o+2]=m[14],s[o+3]=m[15],i="",o+=n3;break}if(s[o]=u>>8,s[o+1]=u,o+=2,i=i.substring(d),i.length===0)break;if(i[0]!==":"||i.length==1)return;if(i=i.substring(1),i[0]===":"){if(a>=0)return;if(a=o,i=i.substring(1),i.length===0)break}}if(i.length===0){if(o<16){if(a<0)return;const u=16-o;for(let d=o-1;d>=a;d--)s[d+u]=s[d];for(let d=a+u-1;d>=a;d--)s[d]=0}else if(a>=0)return;return s}}function l3(i){let s=0,a=0;for(s=0;s<i.length&&48<=i.charCodeAt(s)&&i.charCodeAt(s)<=57;s++)if(a=a*10+(i.charCodeAt(s)-uE),a>=16777215)return{n:16777215,c:s,ok:!1};return s===0?{n:0,c:0,ok:!1}:{n:a,c:s,ok:!0}}function c3(i){let s=0,a=0;for(a=0;a<i.length;a++){if(48<=i.charCodeAt(a)&&i.charCodeAt(a)<=57)s*=16,s+=i.charCodeAt(a)-uE;else if(97<=i.charCodeAt(a)&&i.charCodeAt(a)<=102)s*=16,s+=i.charCodeAt(a)-a3+10;else if(65<=i.charCodeAt(a)&&i.charCodeAt(a)<=70)s*=16,s+=i.charCodeAt(a)-s3+10;else break;if(s>=16777215)return{n:0,c:a,ok:!1}}return a===0?{n:0,c:a,ok:!1}:{n:s,c:a,ok:!0}}function u3(i){return i.indexOf("[")!==-1||i.indexOf("::")!==-1?!1:i.indexOf(".")!==-1||i.split(":").length<=2}function M0(i){return!u3(i)}function f3(i){const s="::FFFF:",a=i.toUpperCase().indexOf(s);if(a!==-1&&i.indexOf(".")!==-1){let o=i.substring(a+s.length);return o=o.replace("[",""),o.replace("]","")}return i}function d3(i){i=i.trim(),i.match(/^(.*:\/\/)(.*)/m)&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2")),i=f3(i),M0(i)&&i.indexOf("[")===-1&&(i=`[${i}]`);const s=M0(i)?i.match(/(]:)(\d+)/):i.match(/(:)(\d+)/),a=s&&s.length===3&&s[1]&&s[2]?parseInt(s[2]):4222,o=a===80?"https":"http",u=new URL(`${o}://${i}`);u.port=`${a}`;let d=u.hostname;return d.charAt(0)==="["&&(d=d.substring(1,d.length-1)),{listen:u.host,hostname:d,port:a}}class hu{constructor(s,a=!1){S(this,"src");S(this,"listen");S(this,"hostname");S(this,"port");S(this,"didConnect");S(this,"reconnects");S(this,"lastConnect");S(this,"gossiped");S(this,"tlsName");S(this,"resolves");this.src=s,this.tlsName="";const o=d3(s);this.listen=o.listen,this.hostname=o.hostname,this.port=o.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=a}toString(){return this.listen}async resolve(s){if(!s.fn||s.resolve===!1)return[this];const a=[];if(j0(this.hostname))return[this];{const o=await s.fn(this.hostname);s.debug&&console.log(`resolve ${this.hostname} = ${o.join(",")}`);for(const u of o){const d=this.port===80?"https":"http",p=new URL(`${d}://${M0(u)?"["+u+"]":u}`);p.port=`${this.port}`;const m=new hu(p.host,!1);m.tlsName=this.hostname,a.push(m)}}return s.randomize&&aE(a),this.resolves=a,a}}class h3{constructor(s=[],a={}){S(this,"firstSelect");S(this,"servers");S(this,"currentServer");S(this,"tlsName");S(this,"randomize");this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=a.randomize||!1;const o=c0();s&&(s.forEach(u=>{u=o?o(u):u,this.servers.push(new hu(u))}),this.randomize&&(this.servers=aE(this.servers))),this.servers.length===0&&this.addServer(`${w0}:${cE()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const s=this.getCurrentServer();j0(s.hostname)||(this.tlsName=s.hostname,this.servers.forEach(a=>{a.gossiped&&(a.tlsName=this.tlsName)}))}getCurrentServer(){return this.currentServer}addServer(s,a=!1){const o=c0();s=o?o(s):s;const u=new hu(s,a);j0(u.hostname)&&(u.tlsName=this.tlsName),this.servers.push(u)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;const s=this.servers.shift();return s&&(this.servers.push(s),this.currentServer=s),s}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer(s){if(s){const a=this.servers.indexOf(s);this.servers.splice(a,1)}}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update(s,a){const o=[];let u=[];const d=c0(),p=new Map;s.connect_urls&&s.connect_urls.length>0&&s.connect_urls.forEach(g=>{g=d?d(g,a):g;const x=new hu(g,!0);p.set(g,x)});const m=[];return this.servers.forEach((g,x)=>{const _=g.listen;g.gossiped&&this.currentServer.listen!==_&&p.get(_)===void 0&&m.push(x),p.delete(_)}),m.reverse(),m.forEach(g=>{const x=this.servers.splice(g,1);u=u.concat(x[0].listen)}),p.forEach((g,x)=>{this.servers.push(g),o.push(x)}),{added:o,deleted:u}}}class m3{constructor(){S(this,"baseInbox");S(this,"reqs");this.reqs=new Map}size(){return this.reqs.size}init(s){return this.baseInbox=`${nr(s)}.`,this.baseInbox}add(s){isNaN(s.received)||(s.received=0),this.reqs.set(s.token,s)}get(s){return this.reqs.get(s)}cancel(s){this.reqs.delete(s.token)}getToken(s){const a=s.subject||"";return a.indexOf(this.baseInbox)===0?a.substring(this.baseInbox.length):null}all(){return Array.from(this.reqs.values())}handleError(s,a){if(a&&a.permissionContext){if(s)return this.all().forEach(u=>{u.resolver(a,{})}),!0;const o=a.permissionContext;if(o.operation==="publish"){const u=this.all().find(d=>d.requestSubject===o.subject);if(u)return u.resolver(a,{}),!0}}return!1}dispatcher(){return(s,a)=>{const o=this.getToken(a);if(o){const u=this.get(o);u&&(s===null&&a.headers&&(s=rE(a)),u.resolver(s,a))}}}close(){const s=ge.errorForCode(ue.Timeout);this.reqs.forEach(a=>{a.resolver(s,{})})}}class p3{constructor(s,a,o){S(this,"ph");S(this,"interval");S(this,"maxOut");S(this,"timer");S(this,"pendings");this.ph=s,this.interval=a,this.maxOut=o,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel(s){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this._reset(),s&&this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:ul.PingTimer,data:`${this.pendings.length+1}`}),this.pendings.length===this.maxOut){this.cancel(!0);return}const s=_t();this.ph.flush(s).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push(s),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(s=>(s.resolve(),!1))}}class b3 extends Error{constructor(s){super(s),this.name="AssertionError"}}function y3(i,s="Assertion failed."){if(!i)throw new b3(s)}const rw=32*1024,u0=2**32-2;function Pd(i,s,a=0){const o=s.byteLength-a;return i.byteLength>o&&(i=i.subarray(0,o)),s.set(i,a),i.byteLength}class f0{constructor(s){S(this,"_buf");S(this,"_off");if(this._off=0,s==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array(s)}bytes(s={copy:!0}){return s.copy===!1?this._buf.subarray(this._off):this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate(s){if(s===0){this.reset();return}if(s<0||s>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+s)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice(s){const a=this._buf.byteLength;return s<=this.capacity-a?(this._reslice(a+s),a):-1}_reslice(s){y3(s<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,s)}readByte(){const s=new Uint8Array(1);return this.read(s)?s[0]:null}read(s){if(this.empty())return this.reset(),s.byteLength===0?0:null;const a=Pd(this._buf.subarray(this._off),s);return this._off+=a,a}writeByte(s){return this.write(Uint8Array.of(s))}writeString(s){return this.write(Wi.encode(s))}write(s){const a=this._grow(s.byteLength);return Pd(s,this._buf,a)}_grow(s){const a=this.length;a===0&&this._off!==0&&this.reset();const o=this._tryGrowByReslice(s);if(o>=0)return o;const u=this.capacity;if(s<=Math.floor(u/2)-a)Pd(this._buf.subarray(this._off),this._buf);else{if(u+s>u0)throw new Error("The buffer cannot be grown beyond the maximum size.");{const d=new Uint8Array(Math.min(2*u+s,u0));Pd(this._buf.subarray(this._off),d),this._buf=d}}return this._off=0,this._reslice(Math.min(a+s,u0)),a}grow(s){if(s<0)throw Error("Buffer._grow: negative count");const a=this._grow(s);this._reslice(a)}readFrom(s){let a=0;const o=new Uint8Array(rw);for(;;){const u=this.capacity-this.length<rw,d=u?o:new Uint8Array(this._buf.buffer,this.length),p=s.read(d);if(p===null)return a;u?this.write(d.subarray(0,p)):this._reslice(this.length+p),a+=p}}}var An;(function(i){i[i.OK=0]="OK",i[i.ERR=1]="ERR",i[i.MSG=2]="MSG",i[i.INFO=3]="INFO",i[i.PING=4]="PING",i[i.PONG=5]="PONG"})(An||(An={}));function iw(){const i={};return i.sid=-1,i.hdr=-1,i.size=-1,i}const g3=48;class ow{constructor(s){S(this,"dispatcher");S(this,"state");S(this,"as");S(this,"drop");S(this,"hdr");S(this,"ma");S(this,"argBuf");S(this,"msgBuf");this.dispatcher=s,this.state=de.OP_START,this.as=0,this.drop=0,this.hdr=0}parse(s){let a;for(a=0;a<s.length;a++){const o=s[a];switch(this.state){case de.OP_START:switch(o){case he.M:case he.m:this.state=de.OP_M,this.hdr=-1,this.ma=iw();break;case he.H:case he.h:this.state=de.OP_H,this.hdr=0,this.ma=iw();break;case he.P:case he.p:this.state=de.OP_P;break;case he.PLUS:this.state=de.OP_PLUS;break;case he.MINUS:this.state=de.OP_MINUS;break;case he.I:case he.i:this.state=de.OP_I;break;default:throw this.fail(s.subarray(a))}break;case de.OP_H:switch(o){case he.M:case he.m:this.state=de.OP_M;break;default:throw this.fail(s.subarray(a))}break;case de.OP_M:switch(o){case he.S:case he.s:this.state=de.OP_MS;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MS:switch(o){case he.G:case he.g:this.state=de.OP_MSG;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MSG:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_MSG_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MSG_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.MSG_ARG,this.as=a}break;case de.MSG_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{const u=this.argBuf?this.argBuf.bytes():s.subarray(this.as,a-this.drop);this.processMsgArgs(u),this.drop=0,this.as=a+1,this.state=de.MSG_PAYLOAD,a=this.as+this.ma.size-1;break}default:this.argBuf&&this.argBuf.writeByte(o)}break;case de.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){const u=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:An.MSG,msg:this.ma,data:u}),this.argBuf=void 0,this.msgBuf=void 0,this.state=de.MSG_END}else{let u=this.ma.size-this.msgBuf.length;const d=s.length-a;d<u&&(u=d),u>0?(this.msgBuf.write(s.subarray(a,a+u)),a=a+u-1):this.msgBuf.writeByte(o)}else a-this.as>=this.ma.size&&(this.dispatcher.push({kind:An.MSG,msg:this.ma,data:s.subarray(this.as,a)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=de.MSG_END);break;case de.MSG_END:switch(o){case he.NL:this.drop=0,this.as=a+1,this.state=de.OP_START;break;default:continue}break;case de.OP_PLUS:switch(o){case he.O:case he.o:this.state=de.OP_PLUS_O;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PLUS_O:switch(o){case he.K:case he.k:this.state=de.OP_PLUS_OK;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PLUS_OK:switch(o){case he.NL:this.dispatcher.push({kind:An.OK}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_MINUS:switch(o){case he.E:case he.e:this.state=de.OP_MINUS_E;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_E:switch(o){case he.R:case he.r:this.state=de.OP_MINUS_ER;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ER:switch(o){case he.R:case he.r:this.state=de.OP_MINUS_ERR;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ERR:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_MINUS_ERR_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ERR_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.MINUS_ERR_ARG,this.as=a}break;case de.MINUS_ERR_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{let u;this.argBuf?(u=this.argBuf.bytes(),this.argBuf=void 0):u=s.subarray(this.as,a-this.drop),this.dispatcher.push({kind:An.ERR,data:u}),this.drop=0,this.as=a+1,this.state=de.OP_START;break}default:this.argBuf&&this.argBuf.write(Uint8Array.of(o))}break;case de.OP_P:switch(o){case he.I:case he.i:this.state=de.OP_PI;break;case he.O:case he.o:this.state=de.OP_PO;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PO:switch(o){case he.N:case he.n:this.state=de.OP_PON;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PON:switch(o){case he.G:case he.g:this.state=de.OP_PONG;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PONG:switch(o){case he.NL:this.dispatcher.push({kind:An.PONG}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_PI:switch(o){case he.N:case he.n:this.state=de.OP_PIN;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PIN:switch(o){case he.G:case he.g:this.state=de.OP_PING;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PING:switch(o){case he.NL:this.dispatcher.push({kind:An.PING}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_I:switch(o){case he.N:case he.n:this.state=de.OP_IN;break;default:throw this.fail(s.subarray(a))}break;case de.OP_IN:switch(o){case he.F:case he.f:this.state=de.OP_INF;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INF:switch(o){case he.O:case he.o:this.state=de.OP_INFO;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INFO:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_INFO_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INFO_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.INFO_ARG,this.as=a}break;case de.INFO_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{let u;this.argBuf?(u=this.argBuf.bytes(),this.argBuf=void 0):u=s.subarray(this.as,a-this.drop),this.dispatcher.push({kind:An.INFO,data:u}),this.drop=0,this.as=a+1,this.state=de.OP_START;break}default:this.argBuf&&this.argBuf.writeByte(o)}break;default:throw this.fail(s.subarray(a))}}(this.state===de.MSG_ARG||this.state===de.MINUS_ERR_ARG||this.state===de.INFO_ARG)&&!this.argBuf&&(this.argBuf=new f0(s.subarray(this.as,a-this.drop))),this.state===de.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new f0(s.subarray(this.as)))}cloneMsgArg(){const s=this.ma.subject.length,a=this.ma.reply?this.ma.reply.length:0,o=new Uint8Array(s+a);o.set(this.ma.subject),this.ma.reply&&o.set(this.ma.reply,s),this.argBuf=new f0(o),this.ma.subject=o.subarray(0,s),this.ma.reply&&(this.ma.reply=o.subarray(s))}processMsgArgs(s){if(this.hdr>=0)return this.processHeaderMsgArgs(s);const a=[];let o=-1;for(let u=0;u<s.length;u++)switch(s[u]){case he.SPACE:case he.TAB:case he.CR:case he.NL:o>=0&&(a.push(s.subarray(o,u)),o=-1);break;default:o<0&&(o=u)}switch(o>=0&&a.push(s.subarray(o)),a.length){case 3:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(a[2]);break;case 4:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=a[2],this.ma.size=this.protoParseInt(a[3]);break;default:throw this.fail(s,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(s,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail(s,"processMsgArgs Bad or Missing Size Error")}fail(s,a=""){return a?a=`${a} [${this.state}]`:a=`parse error [${this.state}]`,new Error(`${a}: ${Kn.decode(s)}`)}processHeaderMsgArgs(s){const a=[];let o=-1;for(let u=0;u<s.length;u++)switch(s[u]){case he.SPACE:case he.TAB:case he.CR:case he.NL:o>=0&&(a.push(s.subarray(o,u)),o=-1);break;default:o<0&&(o=u)}switch(o>=0&&a.push(s.subarray(o)),a.length){case 4:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(a[2]),this.ma.size=this.protoParseInt(a[3]);break;case 5:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=a[2],this.ma.hdr=this.protoParseInt(a[3]),this.ma.size=this.protoParseInt(a[4]);break;default:throw this.fail(s,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt(s){if(s.length===0)return-1;let a=0;for(let o=0;o<s.length;o++){if(s[o]<48||s[o]>57)return-1;a=a*10+(s[o]-g3)}return a}}var de;(function(i){i[i.OP_START=0]="OP_START",i[i.OP_PLUS=1]="OP_PLUS",i[i.OP_PLUS_O=2]="OP_PLUS_O",i[i.OP_PLUS_OK=3]="OP_PLUS_OK",i[i.OP_MINUS=4]="OP_MINUS",i[i.OP_MINUS_E=5]="OP_MINUS_E",i[i.OP_MINUS_ER=6]="OP_MINUS_ER",i[i.OP_MINUS_ERR=7]="OP_MINUS_ERR",i[i.OP_MINUS_ERR_SPC=8]="OP_MINUS_ERR_SPC",i[i.MINUS_ERR_ARG=9]="MINUS_ERR_ARG",i[i.OP_M=10]="OP_M",i[i.OP_MS=11]="OP_MS",i[i.OP_MSG=12]="OP_MSG",i[i.OP_MSG_SPC=13]="OP_MSG_SPC",i[i.MSG_ARG=14]="MSG_ARG",i[i.MSG_PAYLOAD=15]="MSG_PAYLOAD",i[i.MSG_END=16]="MSG_END",i[i.OP_H=17]="OP_H",i[i.OP_P=18]="OP_P",i[i.OP_PI=19]="OP_PI",i[i.OP_PIN=20]="OP_PIN",i[i.OP_PING=21]="OP_PING",i[i.OP_PO=22]="OP_PO",i[i.OP_PON=23]="OP_PON",i[i.OP_PONG=24]="OP_PONG",i[i.OP_I=25]="OP_I",i[i.OP_IN=26]="OP_IN",i[i.OP_INF=27]="OP_INF",i[i.OP_INFO=28]="OP_INFO",i[i.OP_INFO_SPC=29]="OP_INFO_SPC",i[i.INFO_ARG=30]="INFO_ARG"})(de||(de={}));var he;(function(i){i[i.CR=13]="CR",i[i.E=69]="E",i[i.e=101]="e",i[i.F=70]="F",i[i.f=102]="f",i[i.G=71]="G",i[i.g=103]="g",i[i.H=72]="H",i[i.h=104]="h",i[i.I=73]="I",i[i.i=105]="i",i[i.K=75]="K",i[i.k=107]="k",i[i.M=77]="M",i[i.m=109]="m",i[i.MINUS=45]="MINUS",i[i.N=78]="N",i[i.n=110]="n",i[i.NL=10]="NL",i[i.O=79]="O",i[i.o=111]="o",i[i.P=80]="P",i[i.p=112]="p",i[i.PLUS=43]="PLUS",i[i.R=82]="R",i[i.r=114]="r",i[i.S=83]="S",i[i.s=115]="s",i[i.SPACE=32]="SPACE",i[i.TAB=9]="TAB"})(he||(he={}));(function(i){var s=function(N,A){this.hi=N|0,this.lo=A|0},a=function(N){var A,E=new Float64Array(16);if(N)for(A=0;A<N.length;A++)E[A]=N[A];return E},o=function(){throw new Error("no PRNG")},u=new Uint8Array(16),d=new Uint8Array(32);d[0]=9;var p=a(),m=a([1]),g=a([56129,1]),x=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),_=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),w=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),D=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),z=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function q(N,A){return N<<A|N>>>32-A}function Y(N,A){var E=N[A+3]&255;return E=E<<8|N[A+2]&255,E=E<<8|N[A+1]&255,E<<8|N[A+0]&255}function Z(N,A){var E=N[A]<<24|N[A+1]<<16|N[A+2]<<8|N[A+3],C=N[A+4]<<24|N[A+5]<<16|N[A+6]<<8|N[A+7];return new s(E,C)}function ee(N,A,E){var C;for(C=0;C<4;C++)N[A+C]=E&255,E>>>=8}function te(N,A,E){N[A]=E.hi>>24&255,N[A+1]=E.hi>>16&255,N[A+2]=E.hi>>8&255,N[A+3]=E.hi&255,N[A+4]=E.lo>>24&255,N[A+5]=E.lo>>16&255,N[A+6]=E.lo>>8&255,N[A+7]=E.lo&255}function we(N,A,E,C,M){var L,X=0;for(L=0;L<M;L++)X|=N[A+L]^E[C+L];return(1&X-1>>>8)-1}function De(N,A,E,C){return we(N,A,E,C,16)}function U(N,A,E,C){return we(N,A,E,C,32)}function ne(N,A,E,C,M){var L=new Uint32Array(16),X=new Uint32Array(16),se=new Uint32Array(16),$=new Uint32Array(4),K,ye,Be;for(K=0;K<4;K++)X[5*K]=Y(C,4*K),X[1+K]=Y(E,4*K),X[6+K]=Y(A,4*K),X[11+K]=Y(E,16+4*K);for(K=0;K<16;K++)se[K]=X[K];for(K=0;K<20;K++){for(ye=0;ye<4;ye++){for(Be=0;Be<4;Be++)$[Be]=X[(5*ye+4*Be)%16];for($[1]^=q($[0]+$[3]|0,7),$[2]^=q($[1]+$[0]|0,9),$[3]^=q($[2]+$[1]|0,13),$[0]^=q($[3]+$[2]|0,18),Be=0;Be<4;Be++)L[4*ye+(ye+Be)%4]=$[Be]}for(Be=0;Be<16;Be++)X[Be]=L[Be]}if(M){for(K=0;K<16;K++)X[K]=X[K]+se[K]|0;for(K=0;K<4;K++)X[5*K]=X[5*K]-Y(C,4*K)|0,X[6+K]=X[6+K]-Y(A,4*K)|0;for(K=0;K<4;K++)ee(N,4*K,X[5*K]),ee(N,16+4*K,X[6+K])}else for(K=0;K<16;K++)ee(N,4*K,X[K]+se[K]|0)}function oe(N,A,E,C){return ne(N,A,E,C,!1),0}function W(N,A,E,C){return ne(N,A,E,C,!0),0}var Q=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function H(N,A,E,C,M,L,X){var se=new Uint8Array(16),$=new Uint8Array(64),K,ye;if(!M)return 0;for(ye=0;ye<16;ye++)se[ye]=0;for(ye=0;ye<8;ye++)se[ye]=L[ye];for(;M>=64;){for(oe($,se,X,Q),ye=0;ye<64;ye++)N[A+ye]=(E?E[C+ye]:0)^$[ye];for(K=1,ye=8;ye<16;ye++)K=K+(se[ye]&255)|0,se[ye]=K&255,K>>>=8;M-=64,A+=64,E&&(C+=64)}if(M>0)for(oe($,se,X,Q),ye=0;ye<M;ye++)N[A+ye]=(E?E[C+ye]:0)^$[ye];return 0}function le(N,A,E,C,M){return H(N,A,null,0,E,C,M)}function ie(N,A,E,C,M){var L=new Uint8Array(32);return W(L,C,M,Q),le(N,A,E,C.subarray(16),L)}function ve(N,A,E,C,M,L,X){var se=new Uint8Array(32);return W(se,L,X,Q),H(N,A,E,C,M,L.subarray(16),se)}function Qe(N,A){var E,C=0;for(E=0;E<17;E++)C=C+(N[E]+A[E]|0)|0,N[E]=C&255,C>>>=8}var nt=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]);function ae(N,A,E,C,M,L){var X,se,$,K,ye=new Uint32Array(17),Be=new Uint32Array(17),it=new Uint32Array(17),pn=new Uint32Array(17),ur=new Uint32Array(17);for($=0;$<17;$++)Be[$]=it[$]=0;for($=0;$<16;$++)Be[$]=L[$];for(Be[3]&=15,Be[4]&=252,Be[7]&=15,Be[8]&=252,Be[11]&=15,Be[12]&=252,Be[15]&=15;M>0;){for($=0;$<17;$++)pn[$]=0;for($=0;$<16&&$<M;++$)pn[$]=E[C+$];for(pn[$]=1,C+=$,M-=$,Qe(it,pn),se=0;se<17;se++)for(ye[se]=0,$=0;$<17;$++)ye[se]=ye[se]+it[$]*($<=se?Be[se-$]:320*Be[se+17-$]|0)|0|0;for(se=0;se<17;se++)it[se]=ye[se];for(K=0,$=0;$<16;$++)K=K+it[$]|0,it[$]=K&255,K>>>=8;for(K=K+it[16]|0,it[16]=K&3,K=5*(K>>>2)|0,$=0;$<16;$++)K=K+it[$]|0,it[$]=K&255,K>>>=8;K=K+it[16]|0,it[16]=K}for($=0;$<17;$++)ur[$]=it[$];for(Qe(it,nt),X=-(it[16]>>>7)|0,$=0;$<17;$++)it[$]^=X&(ur[$]^it[$]);for($=0;$<16;$++)pn[$]=L[$+16];for(pn[16]=0,Qe(it,pn),$=0;$<16;$++)N[A+$]=it[$];return 0}function pe(N,A,E,C,M,L){var X=new Uint8Array(16);return ae(X,0,E,C,M,L),De(N,A,X,0)}function xe(N,A,E,C,M){var L;if(E<32)return-1;for(ve(N,0,A,0,E,C,M),ae(N,16,N,32,E-32,N),L=0;L<16;L++)N[L]=0;return 0}function je(N,A,E,C,M){var L,X=new Uint8Array(32);if(E<32||(ie(X,0,32,C,M),pe(A,16,A,32,E-32,X)!==0))return-1;for(ve(N,0,A,0,E,C,M),L=0;L<32;L++)N[L]=0;return 0}function Te(N,A){var E;for(E=0;E<16;E++)N[E]=A[E]|0}function J(N){var A,E;for(E=0;E<16;E++)N[E]+=65536,A=Math.floor(N[E]/65536),N[(E+1)*(E<15?1:0)]+=A-1+37*(A-1)*(E===15?1:0),N[E]-=A*65536}function Ne(N,A,E){for(var C,M=~(E-1),L=0;L<16;L++)C=M&(N[L]^A[L]),N[L]^=C,A[L]^=C}function Xe(N,A){var E,C,M,L=a(),X=a();for(E=0;E<16;E++)X[E]=A[E];for(J(X),J(X),J(X),C=0;C<2;C++){for(L[0]=X[0]-65517,E=1;E<15;E++)L[E]=X[E]-65535-(L[E-1]>>16&1),L[E-1]&=65535;L[15]=X[15]-32767-(L[14]>>16&1),M=L[15]>>16&1,L[14]&=65535,Ne(X,L,1-M)}for(E=0;E<16;E++)N[2*E]=X[E]&255,N[2*E+1]=X[E]>>8}function Le(N,A){var E=new Uint8Array(32),C=new Uint8Array(32);return Xe(E,N),Xe(C,A),U(E,0,C,0)}function Yt(N){var A=new Uint8Array(32);return Xe(A,N),A[0]&1}function wa(N,A){var E;for(E=0;E<16;E++)N[E]=A[2*E]+(A[2*E+1]<<8);N[15]&=32767}function We(N,A,E){var C;for(C=0;C<16;C++)N[C]=A[C]+E[C]|0}function Rt(N,A,E){var C;for(C=0;C<16;C++)N[C]=A[C]-E[C]|0}function Me(N,A,E){var C,M,L=new Float64Array(31);for(C=0;C<31;C++)L[C]=0;for(C=0;C<16;C++)for(M=0;M<16;M++)L[C+M]+=A[C]*E[M];for(C=0;C<15;C++)L[C]+=38*L[C+16];for(C=0;C<16;C++)N[C]=L[C];J(N),J(N)}function un(N,A){Me(N,A,A)}function be(N,A){var E=a(),C;for(C=0;C<16;C++)E[C]=A[C];for(C=253;C>=0;C--)un(E,E),C!==2&&C!==4&&Me(E,E,A);for(C=0;C<16;C++)N[C]=E[C]}function eo(N,A){var E=a(),C;for(C=0;C<16;C++)E[C]=A[C];for(C=250;C>=0;C--)un(E,E),C!==1&&Me(E,E,A);for(C=0;C<16;C++)N[C]=E[C]}function Ea(N,A,E){var C=new Uint8Array(32),M=new Float64Array(80),L,X,se=a(),$=a(),K=a(),ye=a(),Be=a(),it=a();for(X=0;X<31;X++)C[X]=A[X];for(C[31]=A[31]&127|64,C[0]&=248,wa(M,E),X=0;X<16;X++)$[X]=M[X],ye[X]=se[X]=K[X]=0;for(se[0]=ye[0]=1,X=254;X>=0;--X)L=C[X>>>3]>>>(X&7)&1,Ne(se,$,L),Ne(K,ye,L),We(Be,se,K),Rt(se,se,K),We(K,$,ye),Rt($,$,ye),un(ye,Be),un(it,se),Me(se,K,se),Me(K,$,Be),We(Be,se,K),Rt(se,se,K),un($,se),Rt(K,ye,it),Me(se,K,g),We(se,se,ye),Me(K,K,se),Me(se,ye,it),Me(ye,$,M),un($,Be),Ne(se,$,L),Ne(K,ye,L);for(X=0;X<16;X++)M[X+16]=se[X],M[X+32]=K[X],M[X+48]=$[X],M[X+64]=ye[X];var pn=M.subarray(32),ur=M.subarray(16);return be(pn,pn),Me(ur,ur,pn),Xe(N,ur),0}function _a(N,A){return Ea(N,A,d)}function rr(N,A){return o(A,32),_a(N,A)}function st(N,A,E){var C=new Uint8Array(32);return Ea(C,E,A),W(N,u,C,Q)}var to=xe,xl=je;function wh(N,A,E,C,M,L){var X=new Uint8Array(32);return st(X,M,L),to(N,A,E,C,X)}function pt(N,A,E,C,M,L){var X=new Uint8Array(32);return st(X,M,L),xl(N,A,E,C,X)}function oi(){var N=0,A=0,E=0,C=0,M=65535,L,X,se;for(se=0;se<arguments.length;se++)L=arguments[se].lo,X=arguments[se].hi,N+=L&M,A+=L>>>16,E+=X&M,C+=X>>>16;return A+=N>>>16,E+=A>>>16,C+=E>>>16,new s(E&M|C<<16,N&M|A<<16)}function Us(N,A){return new s(N.hi>>>A,N.lo>>>A|N.hi<<32-A)}function Aa(){var N=0,A=0,E;for(E=0;E<arguments.length;E++)N^=arguments[E].lo,A^=arguments[E].hi;return new s(A,N)}function fn(N,A){var E,C,M=32-A;return A<32?(E=N.hi>>>A|N.lo<<M,C=N.lo>>>A|N.hi<<M):A<64&&(E=N.lo>>>A|N.hi<<M,C=N.hi>>>A|N.lo<<M),new s(E,C)}function Eh(N,A,E){var C=N.hi&A.hi^~N.hi&E.hi,M=N.lo&A.lo^~N.lo&E.lo;return new s(C,M)}function Nl(N,A,E){var C=N.hi&A.hi^N.hi&E.hi^A.hi&E.hi,M=N.lo&A.lo^N.lo&E.lo^A.lo&E.lo;return new s(C,M)}function Sl(N){return Aa(fn(N,28),fn(N,34),fn(N,39))}function li(N){return Aa(fn(N,14),fn(N,18),fn(N,41))}function _h(N){return Aa(fn(N,1),fn(N,8),Us(N,7))}function Eu(N){return Aa(fn(N,19),fn(N,61),Us(N,6))}var _u=[new s(1116352408,3609767458),new s(1899447441,602891725),new s(3049323471,3964484399),new s(3921009573,2173295548),new s(961987163,4081628472),new s(1508970993,3053834265),new s(2453635748,2937671579),new s(2870763221,3664609560),new s(3624381080,2734883394),new s(310598401,1164996542),new s(607225278,1323610764),new s(1426881987,3590304994),new s(1925078388,4068182383),new s(2162078206,991336113),new s(2614888103,633803317),new s(3248222580,3479774868),new s(3835390401,2666613458),new s(4022224774,944711139),new s(264347078,2341262773),new s(604807628,2007800933),new s(770255983,1495990901),new s(1249150122,1856431235),new s(1555081692,3175218132),new s(1996064986,2198950837),new s(2554220882,3999719339),new s(2821834349,766784016),new s(2952996808,2566594879),new s(3210313671,3203337956),new s(3336571891,1034457026),new s(3584528711,2466948901),new s(113926993,3758326383),new s(338241895,168717936),new s(666307205,1188179964),new s(773529912,1546045734),new s(1294757372,1522805485),new s(1396182291,2643833823),new s(1695183700,2343527390),new s(1986661051,1014477480),new s(2177026350,1206759142),new s(2456956037,344077627),new s(2730485921,1290863460),new s(2820302411,3158454273),new s(3259730800,3505952657),new s(3345764771,106217008),new s(3516065817,3606008344),new s(3600352804,1432725776),new s(4094571909,1467031594),new s(275423344,851169720),new s(430227734,3100823752),new s(506948616,1363258195),new s(659060556,3750685593),new s(883997877,3785050280),new s(958139571,3318307427),new s(1322822218,3812723403),new s(1537002063,2003034995),new s(1747873779,3602036899),new s(1955562222,1575990012),new s(2024104815,1125592928),new s(2227730452,2716904306),new s(2361852424,442776044),new s(2428436474,593698344),new s(2756734187,3733110249),new s(3204031479,2999351573),new s(3329325298,3815920427),new s(3391569614,3928383900),new s(3515267271,566280711),new s(3940187606,3454069534),new s(4118630271,4000239992),new s(116418474,1914138554),new s(174292421,2731055270),new s(289380356,3203993006),new s(460393269,320620315),new s(685471733,587496836),new s(852142971,1086792851),new s(1017036298,365543100),new s(1126000580,2618297676),new s(1288033470,3409855158),new s(1501505948,4234509866),new s(1607167915,987167468),new s(1816402316,1246189591)];function wl(N,A,E){var C=[],M=[],L=[],X=[],se,$,K;for($=0;$<8;$++)C[$]=L[$]=Z(N,8*$);for(var ye=0;E>=128;){for($=0;$<16;$++)X[$]=Z(A,8*$+ye);for($=0;$<80;$++){for(K=0;K<8;K++)M[K]=L[K];for(se=oi(L[7],li(L[4]),Eh(L[4],L[5],L[6]),_u[$],X[$%16]),M[7]=oi(se,Sl(L[0]),Nl(L[0],L[1],L[2])),M[3]=oi(M[3],se),K=0;K<8;K++)L[(K+1)%8]=M[K];if($%16===15)for(K=0;K<16;K++)X[K]=oi(X[K],X[(K+9)%16],_h(X[(K+1)%16]),Eu(X[(K+14)%16]))}for($=0;$<8;$++)L[$]=oi(L[$],C[$]),C[$]=L[$];ye+=128,E-=128}for($=0;$<8;$++)te(N,8*$,C[$]);return E}var El=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]);function zs(N,A,E){var C=new Uint8Array(64),M=new Uint8Array(256),L,X=E;for(L=0;L<64;L++)C[L]=El[L];for(wl(C,A,E),E%=128,L=0;L<256;L++)M[L]=0;for(L=0;L<E;L++)M[L]=A[X-E+L];for(M[E]=128,E=256-128*(E<112?1:0),M[E-9]=0,te(M,E-8,new s(X/536870912|0,X<<3)),wl(C,M,E),L=0;L<64;L++)N[L]=C[L];return 0}function ci(N,A){var E=a(),C=a(),M=a(),L=a(),X=a(),se=a(),$=a(),K=a(),ye=a();Rt(E,N[1],N[0]),Rt(ye,A[1],A[0]),Me(E,E,ye),We(C,N[0],N[1]),We(ye,A[0],A[1]),Me(C,C,ye),Me(M,N[3],A[3]),Me(M,M,_),Me(L,N[2],A[2]),We(L,L,L),Rt(X,C,E),Rt(se,L,M),We($,L,M),We(K,C,E),Me(N[0],X,se),Me(N[1],K,$),Me(N[2],$,se),Me(N[3],X,K)}function no(N,A,E){var C;for(C=0;C<4;C++)Ne(N[C],A[C],E)}function so(N,A){var E=a(),C=a(),M=a();be(M,A[2]),Me(E,A[0],M),Me(C,A[1],M),Xe(N,C),N[31]^=Yt(E)<<7}function ao(N,A,E){var C,M;for(Te(N[0],p),Te(N[1],m),Te(N[2],m),Te(N[3],p),M=255;M>=0;--M)C=E[M/8|0]>>(M&7)&1,no(N,A,C),ci(A,N),ci(N,N),no(N,A,C)}function ir(N,A){var E=[a(),a(),a(),a()];Te(E[0],w),Te(E[1],D),Te(E[2],m),Me(E[3],w,D),ao(N,E,A)}function Bs(N,A,E){var C=new Uint8Array(64),M=[a(),a(),a(),a()],L;for(E||o(A,32),zs(C,A,32),C[0]&=248,C[31]&=127,C[31]|=64,ir(M,C),so(N,M),L=0;L<32;L++)A[L+32]=N[L];return 0}var Un=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Da(N,A){var E,C,M,L;for(C=63;C>=32;--C){for(E=0,M=C-32,L=C-12;M<L;++M)A[M]+=E-16*A[C]*Un[M-(C-32)],E=Math.floor((A[M]+128)/256),A[M]-=E*256;A[M]+=E,A[C]=0}for(E=0,M=0;M<32;M++)A[M]+=E-(A[31]>>4)*Un[M],E=A[M]>>8,A[M]&=255;for(M=0;M<32;M++)A[M]-=E*Un[M];for(C=0;C<32;C++)A[C+1]+=A[C]>>8,N[C]=A[C]&255}function qs(N){var A=new Float64Array(64),E;for(E=0;E<64;E++)A[E]=N[E];for(E=0;E<64;E++)N[E]=0;Da(N,A)}function jt(N,A,E,C){var M=new Uint8Array(64),L=new Uint8Array(64),X=new Uint8Array(64),se,$,K=new Float64Array(64),ye=[a(),a(),a(),a()];zs(M,C,32),M[0]&=248,M[31]&=127,M[31]|=64;var Be=E+64;for(se=0;se<E;se++)N[64+se]=A[se];for(se=0;se<32;se++)N[32+se]=M[32+se];for(zs(X,N.subarray(32),E+32),qs(X),ir(ye,X),so(N,ye),se=32;se<64;se++)N[se]=C[se];for(zs(L,N,E+64),qs(L),se=0;se<64;se++)K[se]=0;for(se=0;se<32;se++)K[se]=X[se];for(se=0;se<32;se++)for($=0;$<32;$++)K[se+$]+=L[se]*M[$];return Da(N.subarray(32),K),Be}function Ca(N,A){var E=a(),C=a(),M=a(),L=a(),X=a(),se=a(),$=a();return Te(N[2],m),wa(N[1],A),un(M,N[1]),Me(L,M,x),Rt(M,M,N[2]),We(L,N[2],L),un(X,L),un(se,X),Me($,se,X),Me(E,$,M),Me(E,E,L),eo(E,E),Me(E,E,M),Me(E,E,L),Me(E,E,L),Me(N[0],E,L),un(C,N[0]),Me(C,C,L),Le(C,M)&&Me(N[0],N[0],z),un(C,N[0]),Me(C,C,L),Le(C,M)?-1:(Yt(N[0])===A[31]>>7&&Rt(N[0],p,N[0]),Me(N[3],N[0],N[1]),0)}function Ls(N,A,E,C){var M,L=new Uint8Array(32),X=new Uint8Array(64),se=[a(),a(),a(),a()],$=[a(),a(),a(),a()];if(E<64||Ca($,C))return-1;for(M=0;M<E;M++)N[M]=A[M];for(M=0;M<32;M++)N[M+32]=C[M];if(zs(X,N,E),qs(X),ao(se,$,X),ir($,A.subarray(32)),ci(se,$),so(L,se),E-=64,U(A,0,L,0)){for(M=0;M<E;M++)N[M]=0;return-1}for(M=0;M<E;M++)N[M]=A[M+64];return E}var Hs=32,or=24,lr=32,vs=16,Ps=32,Cn=32,Xt=32,cr=32,_l=32,ro=or,Au=lr,io=vs,Ct=64,$s=32,Is=64,oo=32,ui=64;i.lowlevel={crypto_core_hsalsa20:W,crypto_stream_xor:ve,crypto_stream:ie,crypto_stream_salsa20_xor:H,crypto_stream_salsa20:le,crypto_onetimeauth:ae,crypto_onetimeauth_verify:pe,crypto_verify_16:De,crypto_verify_32:U,crypto_secretbox:xe,crypto_secretbox_open:je,crypto_scalarmult:Ea,crypto_scalarmult_base:_a,crypto_box_beforenm:st,crypto_box_afternm:to,crypto_box:wh,crypto_box_open:pt,crypto_box_keypair:rr,crypto_hash:zs,crypto_sign:jt,crypto_sign_keypair:Bs,crypto_sign_open:Ls,crypto_secretbox_KEYBYTES:Hs,crypto_secretbox_NONCEBYTES:or,crypto_secretbox_ZEROBYTES:lr,crypto_secretbox_BOXZEROBYTES:vs,crypto_scalarmult_BYTES:Ps,crypto_scalarmult_SCALARBYTES:Cn,crypto_box_PUBLICKEYBYTES:Xt,crypto_box_SECRETKEYBYTES:cr,crypto_box_BEFORENMBYTES:_l,crypto_box_NONCEBYTES:ro,crypto_box_ZEROBYTES:Au,crypto_box_BOXZEROBYTES:io,crypto_sign_BYTES:Ct,crypto_sign_PUBLICKEYBYTES:$s,crypto_sign_SECRETKEYBYTES:Is,crypto_sign_SEEDBYTES:oo,crypto_hash_BYTES:ui,gf:a,D:x,L:Un,pack25519:Xe,unpack25519:wa,M:Me,A:We,S:un,Z:Rt,pow2523:eo,add:ci,set25519:Te,modL:Da,scalarmult:ao,scalarbase:ir};function Al(N,A){if(N.length!==Hs)throw new Error("bad key size");if(A.length!==or)throw new Error("bad nonce size")}function Du(N,A){if(N.length!==Xt)throw new Error("bad public key size");if(A.length!==cr)throw new Error("bad secret key size")}function Ut(){for(var N=0;N<arguments.length;N++)if(!(arguments[N]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Dl(N){for(var A=0;A<N.length;A++)N[A]=0}i.randomBytes=function(N){var A=new Uint8Array(N);return o(A,N),A},i.secretbox=function(N,A,E){Ut(N,A,E),Al(E,A);for(var C=new Uint8Array(lr+N.length),M=new Uint8Array(C.length),L=0;L<N.length;L++)C[L+lr]=N[L];return xe(M,C,C.length,A,E),M.subarray(vs)},i.secretbox.open=function(N,A,E){Ut(N,A,E),Al(E,A);for(var C=new Uint8Array(vs+N.length),M=new Uint8Array(C.length),L=0;L<N.length;L++)C[L+vs]=N[L];return C.length<32||je(M,C,C.length,A,E)!==0?null:M.subarray(lr)},i.secretbox.keyLength=Hs,i.secretbox.nonceLength=or,i.secretbox.overheadLength=vs,i.scalarMult=function(N,A){if(Ut(N,A),N.length!==Cn)throw new Error("bad n size");if(A.length!==Ps)throw new Error("bad p size");var E=new Uint8Array(Ps);return Ea(E,N,A),E},i.scalarMult.base=function(N){if(Ut(N),N.length!==Cn)throw new Error("bad n size");var A=new Uint8Array(Ps);return _a(A,N),A},i.scalarMult.scalarLength=Cn,i.scalarMult.groupElementLength=Ps,i.box=function(N,A,E,C){var M=i.box.before(E,C);return i.secretbox(N,A,M)},i.box.before=function(N,A){Ut(N,A),Du(N,A);var E=new Uint8Array(_l);return st(E,N,A),E},i.box.after=i.secretbox,i.box.open=function(N,A,E,C){var M=i.box.before(E,C);return i.secretbox.open(N,A,M)},i.box.open.after=i.secretbox.open,i.box.keyPair=function(){var N=new Uint8Array(Xt),A=new Uint8Array(cr);return rr(N,A),{publicKey:N,secretKey:A}},i.box.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==cr)throw new Error("bad secret key size");var A=new Uint8Array(Xt);return _a(A,N),{publicKey:A,secretKey:new Uint8Array(N)}},i.box.publicKeyLength=Xt,i.box.secretKeyLength=cr,i.box.sharedKeyLength=_l,i.box.nonceLength=ro,i.box.overheadLength=i.secretbox.overheadLength,i.sign=function(N,A){if(Ut(N,A),A.length!==Is)throw new Error("bad secret key size");var E=new Uint8Array(Ct+N.length);return jt(E,N,N.length,A),E},i.sign.open=function(N,A){if(Ut(N,A),A.length!==$s)throw new Error("bad public key size");var E=new Uint8Array(N.length),C=Ls(E,N,N.length,A);if(C<0)return null;for(var M=new Uint8Array(C),L=0;L<M.length;L++)M[L]=E[L];return M},i.sign.detached=function(N,A){for(var E=i.sign(N,A),C=new Uint8Array(Ct),M=0;M<C.length;M++)C[M]=E[M];return C},i.sign.detached.verify=function(N,A,E){if(Ut(N,A,E),A.length!==Ct)throw new Error("bad signature size");if(E.length!==$s)throw new Error("bad public key size");var C=new Uint8Array(Ct+N.length),M=new Uint8Array(Ct+N.length),L;for(L=0;L<Ct;L++)C[L]=A[L];for(L=0;L<N.length;L++)C[L+Ct]=N[L];return Ls(M,C,C.length,E)>=0},i.sign.keyPair=function(){var N=new Uint8Array($s),A=new Uint8Array(Is);return Bs(N,A),{publicKey:N,secretKey:A}},i.sign.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==Is)throw new Error("bad secret key size");for(var A=new Uint8Array($s),E=0;E<A.length;E++)A[E]=N[32+E];return{publicKey:A,secretKey:new Uint8Array(N)}},i.sign.keyPair.fromSeed=function(N){if(Ut(N),N.length!==oo)throw new Error("bad seed size");for(var A=new Uint8Array($s),E=new Uint8Array(Is),C=0;C<32;C++)E[C]=N[C];return Bs(A,E,!0),{publicKey:A,secretKey:E}},i.sign.publicKeyLength=$s,i.sign.secretKeyLength=Is,i.sign.seedLength=oo,i.sign.signatureLength=Ct,i.hash=function(N){Ut(N);var A=new Uint8Array(ui);return zs(A,N,N.length),A},i.hash.hashLength=ui,i.verify=function(N,A){return Ut(N,A),N.length===0||A.length===0||N.length!==A.length?!1:we(N,0,A,0,N.length)===0},i.setPRNG=function(N){o=N},(function(){var N=typeof globalThis<"u"?globalThis.crypto||globalThis.msCrypto:null;if(N&&N.getRandomValues){var A=65536;i.setPRNG(function(E,C){var M,L=new Uint8Array(C);for(M=0;M<C;M+=A)N.getRandomValues(L.subarray(M,M+Math.min(C-M,A)));for(M=0;M<C;M++)E[M]=L[M];Dl(L)})}else typeof require<"u"&&(N=require("crypto"),N&&N.randomBytes&&i.setPRNG(function(E,C){var M,L=N.randomBytes(C);for(M=0;M<C;M++)E[M]=L[M];Dl(L)}))})()})(typeof module<"u"&&module.exports?module.exports:globalThis.nacl=globalThis.nacl||{});const $d=typeof module<"u"&&module.exports?module.exports:globalThis.nacl;$d.sign.keyPair.fromSeed,$d.sign.detached,$d.sign.detached.verify,$d.randomBytes;var lw;(function(i){i.InvalidPrefixByte="nkeys: invalid prefix byte",i.InvalidKey="nkeys: invalid key",i.InvalidPublicKey="nkeys: invalid public key",i.InvalidSeedLen="nkeys: invalid seed length",i.InvalidSeed="nkeys: invalid seed",i.InvalidEncoding="nkeys: invalid encoded key",i.InvalidSignature="nkeys: signature verification failed",i.CannotSign="nkeys: cannot sign, no private key available",i.PublicKeyOnly="nkeys: no seed or private key available",i.InvalidChecksum="nkeys: invalid checksum",i.SerializationError="nkeys: serialization error",i.ApiError="nkeys: api error",i.ClearedPair="nkeys: pair is cleared"})(lw||(lw={}));var cw;(function(i){i[i.Seed=144]="Seed",i[i.Private=120]="Private",i[i.Operator=112]="Operator",i[i.Server=104]="Server",i[i.Cluster=16]="Cluster",i[i.Account=0]="Account",i[i.User=160]="User"})(cw||(cw={}));function v3(i){return s=>{let a={};return i.forEach(o=>{const u=o(s)||{};a=Object.assign(a,u)}),a}}function x3(){return()=>{}}function N3(i,s){return()=>{const a=typeof i=="function"?i():i,o=typeof s=="function"?s():s;return{user:a,pass:o}}}function S3(i){return()=>({auth_token:typeof i=="function"?i():i})}const dE=120*1e3,w3=2,hE=2*1e3;function E3(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:dE,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:hE,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function _3(i){const s=[];return typeof i.authenticator=="function"&&s.push(i.authenticator),Array.isArray(i.authenticator)&&s.push(...i.authenticator),i.token&&s.push(S3(i.token)),i.user&&s.push(N3(i.user,i.pass)),s.length===0?x3():v3(s)}function A3(i){const s=`${w0}:${cE()}`;if(i=i||{servers:[s]},i.servers=i.servers||[],typeof i.servers=="string"&&(i.servers=[i.servers]),i.servers.length>0&&i.port)throw new ge("port and servers options are mutually exclusive",ue.InvalidOption);i.servers.length===0&&i.port&&(i.servers=[`${w0}:${i.port}`]),i.servers&&i.servers.length===0&&(i.servers=[s]);const a=ph(E3(),i);if(a.authenticator=_3(a),["reconnectDelayHandler","authenticator"].forEach(o=>{if(a[o]&&typeof a[o]!="function")throw new ge(`${o} option should be a function`,ue.NotFunction)}),a.reconnectDelayHandler||(a.reconnectDelayHandler=()=>{let o=a.tls?a.reconnectJitterTLS:a.reconnectJitter;return o&&(o++,o=Math.floor(Math.random()*o)),a.reconnectTimeWait+o}),a.inboxPrefix)try{nr(a.inboxPrefix)}catch(o){throw new ge(o.message,ue.ApiError)}if(a.resolve===void 0&&(a.resolve=typeof R0()=="function"),a.resolve&&typeof R0()!="function")throw new ge("'resolve' is not supported on this client",ue.InvalidOption);return a}function D3(i,s){const{proto:a,tls_required:o,tls_available:u}=i;if((a===void 0||a<1)&&s.noEcho)throw new ge("noEcho",ue.ServerOptionNotAvailable);const d=o||u||!1;if(s.tls&&!d)throw new ge("tls",ue.ServerOptionNotAvailable)}const C3=1024*32,T3=/^INFO\s+([^\r\n]+)\r\n/i,O3=fu(`PONG\r
|
|
256
256
|
`),uw=fu(`PING\r
|
|
257
|
-
`);class O3{constructor(s,a,o){S(this,"echo");S(this,"no_responders");S(this,"protocol");S(this,"verbose");S(this,"pedantic");S(this,"jwt");S(this,"nkey");S(this,"sig");S(this,"user");S(this,"pass");S(this,"auth_token");S(this,"tls_required");S(this,"name");S(this,"lang");S(this,"version");S(this,"headers");this.protocol=1,this.version=s.version,this.lang=s.lang,this.echo=a.noEcho?!1:void 0,this.verbose=a.verbose,this.pedantic=a.pedantic,this.tls_required=a.tls?!0:void 0,this.name=a.name;const u=(a&&typeof a.authenticator=="function"?a.authenticator(o):{})||{};ph(this,u)}}class mE extends sn{constructor(a,o,u={}){var p;super();S(this,"sid");S(this,"queue");S(this,"draining");S(this,"max");S(this,"subject");S(this,"drained");S(this,"protocol");S(this,"timer");S(this,"info");S(this,"cleanupFn");S(this,"closed");S(this,"requestSubject");ph(this,u),this.protocol=a,this.subject=o,this.draining=!1,this.noIterator=typeof u.callback=="function",this.closed=_t();const d=!((p=a.options)!=null&&p.noAsyncTraces);u.timeout&&(this.timer=pl(u.timeout,d),this.timer.then(()=>{this.timer=void 0}).catch(m=>{this.stop(m),this.noIterator&&this.callback(m,{})})),this.noIterator||this.iterClosed.then(()=>{this.closed.resolve(),this.unsubscribe()})}setPrePostHandlers(a){if(this.noIterator){const o=this.callback,u=a.ingestionFilterFn?a.ingestionFilterFn:()=>({ingest:!0,protocol:!1}),d=a.protocolFilterFn?a.protocolFilterFn:()=>!0,p=a.dispatchedFn?a.dispatchedFn:()=>{};this.callback=(m,g)=>{const{ingest:x}=u(g);x&&d(g)&&(o(m,g),p(g))}}else this.protocolFilterFn=a.protocolFilterFn,this.dispatchedFn=a.dispatchedFn}callback(a,o){this.cancelTimeout(),a?this.stop(a):this.push(o)}close(){if(!this.isClosed()){this.cancelTimeout();const a=()=>{if(this.stop(),this.cleanupFn)try{this.cleanupFn(this,this.info)}catch{}this.closed.resolve()};this.noIterator?a():this.push(a)}}unsubscribe(a){this.protocol.unsubscribe(this,a)}cancelTimeout(){this.timer&&(this.timer.cancel(),this.timer=void 0)}drain(){return this.protocol.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isClosed()?Promise.reject(ge.errorForCode(ue.SubClosed)):(this.drained||(this.draining=!0,this.protocol.unsub(this),this.drained=this.protocol.flush(_t()).then(()=>{this.protocol.subscriptions.cancel(this)}).catch(()=>{this.protocol.subscriptions.cancel(this)})),this.drained)}isDraining(){return this.draining}isClosed(){return this.done}getSubject(){return this.subject}getMax(){return this.max}getID(){return this.sid}}class R3{constructor(){S(this,"mux");S(this,"subs");S(this,"sidCounter");this.sidCounter=0,this.mux=null,this.subs=new Map}size(){return this.subs.size}add(s){return this.sidCounter++,s.sid=this.sidCounter,this.subs.set(s.sid,s),s}setMux(s){return this.mux=s,s}getMux(){return this.mux}get(s){return this.subs.get(s)}resub(s){return this.sidCounter++,this.subs.delete(s.sid),s.sid=this.sidCounter,this.subs.set(s.sid,s),s}all(){return Array.from(this.subs.values())}cancel(s){s&&(s.close(),this.subs.delete(s.sid))}handleError(s){if(s&&s.permissionContext){const a=s.permissionContext,o=this.all();let u;if(a.operation==="subscription"&&(u=o.find(d=>d.subject===a.subject&&d.queue===a.queue)),a.operation==="publish"&&(u=o.find(d=>d.requestSubject===a.subject)),u)return u.callback(s,{}),u.close(),this.subs.delete(u.sid),u!==this.mux}return!1}close(){this.subs.forEach(s=>{s.close()})}}class uh{constructor(s,a){S(this,"connected");S(this,"connectedOnce");S(this,"infoReceived");S(this,"info");S(this,"muxSubscriptions");S(this,"options");S(this,"outbound");S(this,"pongs");S(this,"subscriptions");S(this,"transport");S(this,"noMorePublishing");S(this,"connectError");S(this,"publisher");S(this,"_closed");S(this,"closed");S(this,"listeners");S(this,"heartbeats");S(this,"parser");S(this,"outMsgs");S(this,"inMsgs");S(this,"outBytes");S(this,"inBytes");S(this,"pendingLimit");S(this,"lastError");S(this,"abortReconnect");S(this,"whyClosed");S(this,"servers");S(this,"server");S(this,"features");S(this,"connectPromise");this._closed=!1,this.connected=!1,this.connectedOnce=!1,this.infoReceived=!1,this.noMorePublishing=!1,this.abortReconnect=!1,this.listeners=[],this.pendingLimit=D3,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=s,this.publisher=a,this.subscriptions=new R3,this.muxSubscriptions=new h3,this.outbound=new yl,this.pongs=[],this.whyClosed="",this.pendingLimit=s.pendingLimit||this.pendingLimit,this.features=new JT({major:0,minor:0,micro:0}),this.connectPromise=null;const o=typeof s.servers=="string"?[s.servers]:s.servers;this.servers=new d3(o,{randomize:!s.noRandomize}),this.closed=_t(),this.parser=new ow(this),this.heartbeats=new m3(this,this.options.pingInterval||dE,this.options.maxPingOut||S3)}resetOutbound(){this.outbound.reset();const s=this.pongs;this.pongs=[];const a=ge.errorForCode(ue.Disconnect);a.stack="",s.forEach(o=>{o.reject(a)}),this.parser=new ow(this),this.infoReceived=!1}dispatchStatus(s){this.listeners.forEach(a=>{a.push(s)})}status(){const s=new sn;return this.listeners.push(s),s}prepare(){this.transport&&this.transport.discard(),this.info=void 0,this.resetOutbound();const s=_t();return s.catch(()=>{}),this.pongs.unshift(s),this.connectError=a=>{s.reject(a)},this.transport=XT(),this.transport.closed().then(async a=>{if(this.connected=!1,!this.isClosed()){await this.disconnected(this.transport.closeError||this.lastError);return}}),s}disconnect(){this.dispatchStatus({type:ul.StaleConnection,data:""}),this.transport.disconnect()}reconnect(){return this.connected&&(this.dispatchStatus({type:ul.ClientInitiatedReconnect,data:""}),this.transport.disconnect()),Promise.resolve()}async disconnected(s){this.dispatchStatus({type:tr.Disconnect,data:this.servers.getCurrentServer().toString()}),this.options.reconnect?await this.dialLoop().then(()=>{var a;this.dispatchStatus({type:tr.Reconnect,data:this.servers.getCurrentServer().toString()}),((a=this.lastError)==null?void 0:a.code)===ue.AuthenticationExpired&&(this.lastError=void 0)}).catch(a=>{this._close(a)}):await this._close(s)}async dial(s){const a=this.prepare();let o;try{o=pl(this.options.timeout||2e4);const u=this.transport.connect(s,this.options);await Promise.race([u,o]),(async()=>{try{for await(const d of this.transport)this.parser.parse(d)}catch(d){console.log("reader closed",d)}})().then()}catch(u){a.reject(u)}try{await Promise.race([o,a]),o&&o.cancel(),this.connected=!0,this.connectError=void 0,this.sendSubscriptions(),this.connectedOnce=!0,this.server.didConnect=!0,this.server.reconnects=0,this.flushPending(),this.heartbeats.start()}catch(u){throw o&&o.cancel(),await this.transport.close(u),u}}async _doDial(s){const{resolve:a}=this.options,o=await s.resolve({fn:O0(),debug:this.options.debug,randomize:!this.options.noRandomize,resolve:a});let u=null;for(const d of o)try{u=null,this.dispatchStatus({type:ul.Reconnecting,data:d.toString()}),await this.dial(d);return}catch(p){u=p}throw u}dialLoop(){return this.connectPromise===null&&(this.connectPromise=this.dodialLoop(),this.connectPromise.then(()=>{}).catch(()=>{}).finally(()=>{this.connectPromise=null})),this.connectPromise}async dodialLoop(){let s;for(;;){this._closed&&this.servers.clear();const a=this.options.reconnectDelayHandler?this.options.reconnectDelayHandler():hE;let o=a;const u=this.selectServer();if(!u||this.abortReconnect)throw s||(this.lastError?this.lastError:ge.errorForCode(ue.ConnectionRefused));const d=Date.now();if(u.lastConnect===0||u.lastConnect+a<=d){u.lastConnect=Date.now();try{await this._doDial(u);break}catch(p){if(s=p,!this.connectedOnce){if(this.options.waitOnFirstConnect)continue;this.servers.removeCurrentServer()}u.reconnects++;const m=this.options.maxReconnectAttempts||0;m!==-1&&u.reconnects>=m&&this.servers.removeCurrentServer()}}else o=Math.min(o,u.lastConnect+a-d),await gl(o)}}static async connect(s,a){const o=new uh(s,a);return await o.dialLoop(),o}static toError(s){const a=s?s.toLowerCase():"";if(a.indexOf("permissions violation")!==-1){const o=new ge(s,ue.PermissionsViolation),u=s.match(/(Publish|Subscription) to "(\S+)"/);if(u){o.permissionContext={operation:u[1].toLowerCase(),subject:u[2],queue:void 0};const d=s.match(/using queue "(\S+)"/);d&&(o.permissionContext.queue=d[1])}return o}else return a.indexOf("authorization violation")!==-1?new ge(s,ue.AuthorizationViolation):a.indexOf("user authentication expired")!==-1?new ge(s,ue.AuthenticationExpired):a.indexOf("account authentication expired")!=-1?new ge(s,ue.AccountExpired):a.indexOf("authentication timeout")!==-1?new ge(s,ue.AuthenticationTimeout):new ge(s,ue.ProtocolError)}processMsg(s,a){if(this.inMsgs++,this.inBytes+=a.length,!this.subscriptions.sidCounter)return;const o=this.subscriptions.get(s.sid);o&&(o.received+=1,o.callback&&o.callback(null,new X0(s,a,this)),o.max!==void 0&&o.received>=o.max&&o.unsubscribe())}processError(s){const a=FS(s),o=uh.toError(a),u={type:tr.Error,data:o.code};if(o.isPermissionError()){let d=!1;if(o.permissionContext){u.permissionContext=o.permissionContext;const p=this.subscriptions.getMux();d=(p==null?void 0:p.subject)===o.permissionContext.subject}this.subscriptions.handleError(o),this.muxSubscriptions.handleError(d,o),d&&this.subscriptions.setMux(null)}this.dispatchStatus(u),this.handleError(o)}handleError(s){s.isAuthError()?this.handleAuthError(s):s.isProtocolError()?this.lastError=s:s.isAuthTimeout()&&(this.lastError=s),s.isPermissionError()||(this.lastError=s)}handleAuthError(s){this.lastError&&s.code===this.lastError.code&&this.options.ignoreAuthErrorAbort===!1&&(this.abortReconnect=!0),this.connectError?this.connectError(s):this.disconnect()}processPing(){this.transport.send(T3)}processPong(){const s=this.pongs.shift();s&&s.resolve()}processInfo(s){const a=JSON.parse(FS(s));this.info=a;const o=this.options&&this.options.ignoreClusterUpdates?void 0:this.servers.update(a,this.transport.isEncrypted());if(!this.infoReceived){this.features.update(Xi(a.version)),this.infoReceived=!0,this.transport.isEncrypted()&&this.servers.updateTLSName();const{version:d,lang:p}=this.transport;try{const m=new O3({version:d,lang:p},this.options,a.nonce);a.headers&&(m.headers=!0,m.no_responders=!0);const g=JSON.stringify(m);this.transport.send(fu(`CONNECT ${g}${Zd}`)),this.transport.send(uw)}catch(m){this._close(m)}}o&&this.dispatchStatus({type:tr.Update,data:o}),(a.ldm!==void 0?a.ldm:!1)&&this.dispatchStatus({type:tr.LDM,data:this.servers.getCurrentServer().toString()})}push(s){switch(s.kind){case An.MSG:{const{msg:a,data:o}=s;this.processMsg(a,o);break}case An.OK:break;case An.ERR:this.processError(s.data);break;case An.PING:this.processPing();break;case An.PONG:this.processPong();break;case An.INFO:this.processInfo(s.data);break}}sendCommand(s,...a){const o=this.outbound.length();let u;typeof s=="string"?u=fu(s):u=s,this.outbound.fill(u,...a),o===0?queueMicrotask(()=>{this.flushPending()}):this.outbound.size()>=this.pendingLimit&&this.flushPending()}publish(s,a=es,o){let u;if(a instanceof Uint8Array)u=a;else if(typeof a=="string")u=Wi.encode(a);else throw ge.errorForCode(ue.BadPayload);let d=u.length;o=o||{},o.reply=o.reply||"";let p=es,m=0;if(o.headers){if(this.info&&!this.info.headers)throw new ge("headers",ue.ServerOptionNotAvailable);p=o.headers.encode(),m=p.length,d=u.length+m}if(this.info&&d>this.info.max_payload)throw ge.errorForCode(ue.MaxPayloadExceeded);this.outBytes+=d,this.outMsgs++;let g;o.headers?(o.reply?g=`HPUB ${s} ${o.reply} ${m} ${d}\r
|
|
257
|
+
`);class R3{constructor(s,a,o){S(this,"echo");S(this,"no_responders");S(this,"protocol");S(this,"verbose");S(this,"pedantic");S(this,"jwt");S(this,"nkey");S(this,"sig");S(this,"user");S(this,"pass");S(this,"auth_token");S(this,"tls_required");S(this,"name");S(this,"lang");S(this,"version");S(this,"headers");this.protocol=1,this.version=s.version,this.lang=s.lang,this.echo=a.noEcho?!1:void 0,this.verbose=a.verbose,this.pedantic=a.pedantic,this.tls_required=a.tls?!0:void 0,this.name=a.name;const u=(a&&typeof a.authenticator=="function"?a.authenticator(o):{})||{};ph(this,u)}}class mE extends sn{constructor(a,o,u={}){var p;super();S(this,"sid");S(this,"queue");S(this,"draining");S(this,"max");S(this,"subject");S(this,"drained");S(this,"protocol");S(this,"timer");S(this,"info");S(this,"cleanupFn");S(this,"closed");S(this,"requestSubject");ph(this,u),this.protocol=a,this.subject=o,this.draining=!1,this.noIterator=typeof u.callback=="function",this.closed=_t();const d=!((p=a.options)!=null&&p.noAsyncTraces);u.timeout&&(this.timer=pl(u.timeout,d),this.timer.then(()=>{this.timer=void 0}).catch(m=>{this.stop(m),this.noIterator&&this.callback(m,{})})),this.noIterator||this.iterClosed.then(()=>{this.closed.resolve(),this.unsubscribe()})}setPrePostHandlers(a){if(this.noIterator){const o=this.callback,u=a.ingestionFilterFn?a.ingestionFilterFn:()=>({ingest:!0,protocol:!1}),d=a.protocolFilterFn?a.protocolFilterFn:()=>!0,p=a.dispatchedFn?a.dispatchedFn:()=>{};this.callback=(m,g)=>{const{ingest:x}=u(g);x&&d(g)&&(o(m,g),p(g))}}else this.protocolFilterFn=a.protocolFilterFn,this.dispatchedFn=a.dispatchedFn}callback(a,o){this.cancelTimeout(),a?this.stop(a):this.push(o)}close(){if(!this.isClosed()){this.cancelTimeout();const a=()=>{if(this.stop(),this.cleanupFn)try{this.cleanupFn(this,this.info)}catch{}this.closed.resolve()};this.noIterator?a():this.push(a)}}unsubscribe(a){this.protocol.unsubscribe(this,a)}cancelTimeout(){this.timer&&(this.timer.cancel(),this.timer=void 0)}drain(){return this.protocol.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isClosed()?Promise.reject(ge.errorForCode(ue.SubClosed)):(this.drained||(this.draining=!0,this.protocol.unsub(this),this.drained=this.protocol.flush(_t()).then(()=>{this.protocol.subscriptions.cancel(this)}).catch(()=>{this.protocol.subscriptions.cancel(this)})),this.drained)}isDraining(){return this.draining}isClosed(){return this.done}getSubject(){return this.subject}getMax(){return this.max}getID(){return this.sid}}class j3{constructor(){S(this,"mux");S(this,"subs");S(this,"sidCounter");this.sidCounter=0,this.mux=null,this.subs=new Map}size(){return this.subs.size}add(s){return this.sidCounter++,s.sid=this.sidCounter,this.subs.set(s.sid,s),s}setMux(s){return this.mux=s,s}getMux(){return this.mux}get(s){return this.subs.get(s)}resub(s){return this.sidCounter++,this.subs.delete(s.sid),s.sid=this.sidCounter,this.subs.set(s.sid,s),s}all(){return Array.from(this.subs.values())}cancel(s){s&&(s.close(),this.subs.delete(s.sid))}handleError(s){if(s&&s.permissionContext){const a=s.permissionContext,o=this.all();let u;if(a.operation==="subscription"&&(u=o.find(d=>d.subject===a.subject&&d.queue===a.queue)),a.operation==="publish"&&(u=o.find(d=>d.requestSubject===a.subject)),u)return u.callback(s,{}),u.close(),this.subs.delete(u.sid),u!==this.mux}return!1}close(){this.subs.forEach(s=>{s.close()})}}class uh{constructor(s,a){S(this,"connected");S(this,"connectedOnce");S(this,"infoReceived");S(this,"info");S(this,"muxSubscriptions");S(this,"options");S(this,"outbound");S(this,"pongs");S(this,"subscriptions");S(this,"transport");S(this,"noMorePublishing");S(this,"connectError");S(this,"publisher");S(this,"_closed");S(this,"closed");S(this,"listeners");S(this,"heartbeats");S(this,"parser");S(this,"outMsgs");S(this,"inMsgs");S(this,"outBytes");S(this,"inBytes");S(this,"pendingLimit");S(this,"lastError");S(this,"abortReconnect");S(this,"whyClosed");S(this,"servers");S(this,"server");S(this,"features");S(this,"connectPromise");this._closed=!1,this.connected=!1,this.connectedOnce=!1,this.infoReceived=!1,this.noMorePublishing=!1,this.abortReconnect=!1,this.listeners=[],this.pendingLimit=C3,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=s,this.publisher=a,this.subscriptions=new j3,this.muxSubscriptions=new m3,this.outbound=new yl,this.pongs=[],this.whyClosed="",this.pendingLimit=s.pendingLimit||this.pendingLimit,this.features=new GT({major:0,minor:0,micro:0}),this.connectPromise=null;const o=typeof s.servers=="string"?[s.servers]:s.servers;this.servers=new h3(o,{randomize:!s.noRandomize}),this.closed=_t(),this.parser=new ow(this),this.heartbeats=new p3(this,this.options.pingInterval||dE,this.options.maxPingOut||w3)}resetOutbound(){this.outbound.reset();const s=this.pongs;this.pongs=[];const a=ge.errorForCode(ue.Disconnect);a.stack="",s.forEach(o=>{o.reject(a)}),this.parser=new ow(this),this.infoReceived=!1}dispatchStatus(s){this.listeners.forEach(a=>{a.push(s)})}status(){const s=new sn;return this.listeners.push(s),s}prepare(){this.transport&&this.transport.discard(),this.info=void 0,this.resetOutbound();const s=_t();return s.catch(()=>{}),this.pongs.unshift(s),this.connectError=a=>{s.reject(a)},this.transport=ZT(),this.transport.closed().then(async a=>{if(this.connected=!1,!this.isClosed()){await this.disconnected(this.transport.closeError||this.lastError);return}}),s}disconnect(){this.dispatchStatus({type:ul.StaleConnection,data:""}),this.transport.disconnect()}reconnect(){return this.connected&&(this.dispatchStatus({type:ul.ClientInitiatedReconnect,data:""}),this.transport.disconnect()),Promise.resolve()}async disconnected(s){this.dispatchStatus({type:tr.Disconnect,data:this.servers.getCurrentServer().toString()}),this.options.reconnect?await this.dialLoop().then(()=>{var a;this.dispatchStatus({type:tr.Reconnect,data:this.servers.getCurrentServer().toString()}),((a=this.lastError)==null?void 0:a.code)===ue.AuthenticationExpired&&(this.lastError=void 0)}).catch(a=>{this._close(a)}):await this._close(s)}async dial(s){const a=this.prepare();let o;try{o=pl(this.options.timeout||2e4);const u=this.transport.connect(s,this.options);await Promise.race([u,o]),(async()=>{try{for await(const d of this.transport)this.parser.parse(d)}catch(d){console.log("reader closed",d)}})().then()}catch(u){a.reject(u)}try{await Promise.race([o,a]),o&&o.cancel(),this.connected=!0,this.connectError=void 0,this.sendSubscriptions(),this.connectedOnce=!0,this.server.didConnect=!0,this.server.reconnects=0,this.flushPending(),this.heartbeats.start()}catch(u){throw o&&o.cancel(),await this.transport.close(u),u}}async _doDial(s){const{resolve:a}=this.options,o=await s.resolve({fn:R0(),debug:this.options.debug,randomize:!this.options.noRandomize,resolve:a});let u=null;for(const d of o)try{u=null,this.dispatchStatus({type:ul.Reconnecting,data:d.toString()}),await this.dial(d);return}catch(p){u=p}throw u}dialLoop(){return this.connectPromise===null&&(this.connectPromise=this.dodialLoop(),this.connectPromise.then(()=>{}).catch(()=>{}).finally(()=>{this.connectPromise=null})),this.connectPromise}async dodialLoop(){let s;for(;;){this._closed&&this.servers.clear();const a=this.options.reconnectDelayHandler?this.options.reconnectDelayHandler():hE;let o=a;const u=this.selectServer();if(!u||this.abortReconnect)throw s||(this.lastError?this.lastError:ge.errorForCode(ue.ConnectionRefused));const d=Date.now();if(u.lastConnect===0||u.lastConnect+a<=d){u.lastConnect=Date.now();try{await this._doDial(u);break}catch(p){if(s=p,!this.connectedOnce){if(this.options.waitOnFirstConnect)continue;this.servers.removeCurrentServer()}u.reconnects++;const m=this.options.maxReconnectAttempts||0;m!==-1&&u.reconnects>=m&&this.servers.removeCurrentServer()}}else o=Math.min(o,u.lastConnect+a-d),await gl(o)}}static async connect(s,a){const o=new uh(s,a);return await o.dialLoop(),o}static toError(s){const a=s?s.toLowerCase():"";if(a.indexOf("permissions violation")!==-1){const o=new ge(s,ue.PermissionsViolation),u=s.match(/(Publish|Subscription) to "(\S+)"/);if(u){o.permissionContext={operation:u[1].toLowerCase(),subject:u[2],queue:void 0};const d=s.match(/using queue "(\S+)"/);d&&(o.permissionContext.queue=d[1])}return o}else return a.indexOf("authorization violation")!==-1?new ge(s,ue.AuthorizationViolation):a.indexOf("user authentication expired")!==-1?new ge(s,ue.AuthenticationExpired):a.indexOf("account authentication expired")!=-1?new ge(s,ue.AccountExpired):a.indexOf("authentication timeout")!==-1?new ge(s,ue.AuthenticationTimeout):new ge(s,ue.ProtocolError)}processMsg(s,a){if(this.inMsgs++,this.inBytes+=a.length,!this.subscriptions.sidCounter)return;const o=this.subscriptions.get(s.sid);o&&(o.received+=1,o.callback&&o.callback(null,new Z0(s,a,this)),o.max!==void 0&&o.received>=o.max&&o.unsubscribe())}processError(s){const a=YS(s),o=uh.toError(a),u={type:tr.Error,data:o.code};if(o.isPermissionError()){let d=!1;if(o.permissionContext){u.permissionContext=o.permissionContext;const p=this.subscriptions.getMux();d=(p==null?void 0:p.subject)===o.permissionContext.subject}this.subscriptions.handleError(o),this.muxSubscriptions.handleError(d,o),d&&this.subscriptions.setMux(null)}this.dispatchStatus(u),this.handleError(o)}handleError(s){s.isAuthError()?this.handleAuthError(s):s.isProtocolError()?this.lastError=s:s.isAuthTimeout()&&(this.lastError=s),s.isPermissionError()||(this.lastError=s)}handleAuthError(s){this.lastError&&s.code===this.lastError.code&&this.options.ignoreAuthErrorAbort===!1&&(this.abortReconnect=!0),this.connectError?this.connectError(s):this.disconnect()}processPing(){this.transport.send(O3)}processPong(){const s=this.pongs.shift();s&&s.resolve()}processInfo(s){const a=JSON.parse(YS(s));this.info=a;const o=this.options&&this.options.ignoreClusterUpdates?void 0:this.servers.update(a,this.transport.isEncrypted());if(!this.infoReceived){this.features.update(Xi(a.version)),this.infoReceived=!0,this.transport.isEncrypted()&&this.servers.updateTLSName();const{version:d,lang:p}=this.transport;try{const m=new R3({version:d,lang:p},this.options,a.nonce);a.headers&&(m.headers=!0,m.no_responders=!0);const g=JSON.stringify(m);this.transport.send(fu(`CONNECT ${g}${Zd}`)),this.transport.send(uw)}catch(m){this._close(m)}}o&&this.dispatchStatus({type:tr.Update,data:o}),(a.ldm!==void 0?a.ldm:!1)&&this.dispatchStatus({type:tr.LDM,data:this.servers.getCurrentServer().toString()})}push(s){switch(s.kind){case An.MSG:{const{msg:a,data:o}=s;this.processMsg(a,o);break}case An.OK:break;case An.ERR:this.processError(s.data);break;case An.PING:this.processPing();break;case An.PONG:this.processPong();break;case An.INFO:this.processInfo(s.data);break}}sendCommand(s,...a){const o=this.outbound.length();let u;typeof s=="string"?u=fu(s):u=s,this.outbound.fill(u,...a),o===0?queueMicrotask(()=>{this.flushPending()}):this.outbound.size()>=this.pendingLimit&&this.flushPending()}publish(s,a=es,o){let u;if(a instanceof Uint8Array)u=a;else if(typeof a=="string")u=Wi.encode(a);else throw ge.errorForCode(ue.BadPayload);let d=u.length;o=o||{},o.reply=o.reply||"";let p=es,m=0;if(o.headers){if(this.info&&!this.info.headers)throw new ge("headers",ue.ServerOptionNotAvailable);p=o.headers.encode(),m=p.length,d=u.length+m}if(this.info&&d>this.info.max_payload)throw ge.errorForCode(ue.MaxPayloadExceeded);this.outBytes+=d,this.outMsgs++;let g;o.headers?(o.reply?g=`HPUB ${s} ${o.reply} ${m} ${d}\r
|
|
258
258
|
`:g=`HPUB ${s} ${m} ${d}\r
|
|
259
259
|
`,this.sendCommand(g,p,u,ch)):(o.reply?g=`PUB ${s} ${o.reply} ${d}\r
|
|
260
260
|
`:g=`PUB ${s} ${d}\r
|
|
@@ -262,20 +262,20 @@ ${this.ctx.stack}`),this.deferred.reject(a)):this.deferred.resolve(o),this.cance
|
|
|
262
262
|
`):this.sendCommand(`SUB ${s.subject} ${s.sid}\r
|
|
263
263
|
`)}_subunsub(s){return this._sub(s),s.max&&this.unsubscribe(s,s.max),s}unsubscribe(s,a){this.unsub(s,a),(s.max===void 0||s.received>=s.max)&&this.subscriptions.cancel(s)}unsub(s,a){!s||this.isClosed()||(a?this.sendCommand(`UNSUB ${s.sid} ${a}\r
|
|
264
264
|
`):this.sendCommand(`UNSUB ${s.sid}\r
|
|
265
|
-
`),s.max=a)}resub(s,a){!s||this.isClosed()||(this.unsub(s),s.subject=a,this.subscriptions.resub(s),this._sub(s))}flush(s){return s||(s=_t()),this.pongs.push(s),this.outbound.fill(uw),this.flushPending(),s}sendSubscriptions(){const s=[];this.subscriptions.all().forEach(a=>{const o=a;o.queue?s.push(`SUB ${o.subject} ${o.queue} ${o.sid}${Zd}`):s.push(`SUB ${o.subject} ${o.sid}${Zd}`)}),s.length&&this.transport.send(fu(s.join("")))}async _close(s){this._closed||(this.whyClosed=new Error("close trace").stack||"",this.heartbeats.cancel(),this.connectError&&(this.connectError(s),this.connectError=void 0),this.muxSubscriptions.close(),this.subscriptions.close(),this.listeners.forEach(a=>{a.stop()}),this._closed=!0,await this.transport.close(s),await this.closed.resolve(s))}close(){return this._close()}isClosed(){return this._closed}drain(){const s=this.subscriptions.all(),a=[];return s.forEach(o=>{a.push(o.drain())}),Promise.all(a).then(async()=>(this.noMorePublishing=!0,await this.flush(),this.close())).catch(()=>{})}flushPending(){if(!(!this.infoReceived||!this.connected)&&this.outbound.size()){const s=this.outbound.drain();this.transport.send(s)}}initMux(){if(!this.subscriptions.getMux()){const a=this.muxSubscriptions.init(this.options.inboxPrefix),o=new mE(this,`${a}*`);o.callback=this.muxSubscriptions.dispatcher(),this.subscriptions.setMux(o),this.subscribe(o)}}selectServer(){const s=this.servers.selectServer();if(s!==void 0)return this.server=s,this.server}getServer(){return this.server}}const j3="$SRV";class fw{constructor(s){S(this,"msg");this.msg=s}get data(){return this.msg.data}get sid(){return this.msg.sid}get subject(){return this.msg.subject}get reply(){return this.msg.reply||""}get headers(){return this.msg.headers}respond(s,a){return this.msg.respond(s,a)}respondError(s,a,o,u){var d,p;return u=u||{},u.headers=u.headers||sr(),(d=u.headers)==null||d.set(rh,`${s}`),(p=u.headers)==null||p.set(ah,a),this.msg.respond(o,u)}json(s){return this.msg.json(s)}string(){return this.msg.string()}}class yu{constructor(s,a="",o=""){S(this,"subject");S(this,"queue");S(this,"srv");a!==""&&k3("service group",a);let u="";if(s instanceof Su)this.srv=s,u="";else if(s instanceof yu){const d=s;this.srv=d.srv,o===""&&d.queue!==""&&(o=d.queue),u=d.subject}else throw new Error("unknown ServiceGroup type");this.subject=this.calcSubject(u,a),this.queue=o}calcSubject(s,a=""){return a===""?s:s!==""?`${s}.${a}`:a}addEndpoint(s="",a){a=a||{subject:s};const o=typeof a=="function"?{handler:a,subject:s}:a;ou("endpoint",s);let{subject:u,handler:d,metadata:p,queue:m}=o;u=u||s,m=m||this.queue,M3("endpoint subject",u),u=this.calcSubject(this.subject,u);const g={name:s,subject:u,queue:m,handler:d,metadata:p};return this.srv._addEndpoint(g)}addGroup(s="",a=""){return new yu(this,s,a)}}function M3(i,s){if(s==="")throw new Error(`${i} cannot be empty`);if(s.indexOf(" ")!==-1)throw new Error(`${i} cannot contain spaces: '${s}'`);const a=s.split(".");a.forEach((o,u)=>{if(o===">"&&u!==a.length-1)throw new Error(`${i} cannot have internal '>': '${s}'`)})}function k3(i,s){if(s.indexOf(" ")!==-1)throw new Error(`${i} cannot contain spaces: '${s}'`);s.split(".").forEach(o=>{if(o===">")throw new Error(`${i} name cannot contain internal '>': '${s}'`)})}class Su{constructor(s,a={name:"",version:""}){S(this,"nc");S(this,"_id");S(this,"config");S(this,"handlers");S(this,"internal");S(this,"_stopped");S(this,"_done");S(this,"started");this.nc=s,this.config=Object.assign({},a),this.config.queue||(this.config.queue="q"),ou("name",this.config.name),ou("queue",this.config.queue),Xi(this.config.version),this._id=ai.next(),this.internal=[],this._done=_t(),this._stopped=!1,this.handlers=[],this.started=new Date().toISOString(),this.reset(),this.nc.closed().then(()=>{this.close().catch()}).catch(o=>{this.close(o).catch()})}static controlSubject(s,a="",o="",u){const d=u??j3;return a===""&&o===""?`${d}.${s}`:(ou("control subject name",a),o!==""?(ou("control subject id",o),`${d}.${s}.${a}.${o}`):`${d}.${s}.${a}`)}get subjects(){return this.handlers.filter(s=>s.internal===!1).map(s=>s.subject)}get id(){return this._id}get name(){return this.config.name}get description(){return this.config.description??""}get version(){return this.config.version}get metadata(){return this.config.metadata}errorToHeader(s){const a=sr();if(s instanceof ih){const o=s;a.set(ah,o.message),a.set(rh,`${o.code}`)}else a.set(ah,s.message),a.set(rh,"500");return a}setupHandler(s,a=!1){const o=a?"":s.queue?s.queue:this.config.queue,{name:u,subject:d,handler:p}=s,m=s;m.internal=a,a&&this.internal.push(m),m.stats=new V3(u,d,o),m.queue=o;const g=p?(x,_)=>{if(x){this.close(x);return}const w=Date.now();try{p(x,new fw(_))}catch(D){m.stats.countError(D),_==null||_.respond(es,{headers:this.errorToHeader(D)})}finally{m.stats.countLatency(w)}}:void 0;return m.sub=this.nc.subscribe(d,{callback:g,queue:o}),m.sub.closed.then(()=>{this._stopped||this.close(new Error(`required subscription ${s.subject} stopped`)).catch()}).catch(x=>{if(!this._stopped){const _=new Error(`required subscription ${s.subject} errored: ${x.message}`);_.stack=x.stack,this.close(_).catch()}}),m}info(){return{type:du.INFO,name:this.name,id:this.id,version:this.version,description:this.description,metadata:this.metadata,endpoints:this.endpoints()}}endpoints(){return this.handlers.map(s=>{const{subject:a,metadata:o,name:u,queue:d}=s;return{subject:a,metadata:o,name:u,queue_group:d}})}async stats(){const s=[];for(const a of this.handlers){if(typeof this.config.statsHandler=="function")try{a.stats.data=await this.config.statsHandler(a)}catch(o){a.stats.countError(o)}s.push(a.stats.stats(a.qi))}return{type:du.STATS,name:this.name,id:this.id,version:this.version,started:this.started,metadata:this.metadata,endpoints:s}}addInternalHandler(s,a){const o=`${s}`.toUpperCase();this._doAddInternalHandler(`${o}-all`,s,a),this._doAddInternalHandler(`${o}-kind`,s,a,this.name),this._doAddInternalHandler(`${o}`,s,a,this.name,this.id)}_doAddInternalHandler(s,a,o,u="",d=""){const p={};p.name=s,p.subject=Su.controlSubject(a,u,d),p.handler=o,this.setupHandler(p,!0)}start(){const s=ks(),a=(p,m)=>p?(this.close(p),Promise.reject(p)):this.stats().then(g=>(m==null||m.respond(s.encode(g)),Promise.resolve())),o=(p,m)=>p?(this.close(p),Promise.reject(p)):(m==null||m.respond(s.encode(this.info())),Promise.resolve()),u=s.encode(this.ping()),d=(p,m)=>p?(this.close(p).then().catch(),Promise.reject(p)):(m.respond(u),Promise.resolve());return this.addInternalHandler(ei.PING,d),this.addInternalHandler(ei.STATS,a),this.addInternalHandler(ei.INFO,o),this.handlers.forEach(p=>{const{subject:m}=p;typeof m=="string"&&p.handler!==null&&this.setupHandler(p)}),Promise.resolve(this)}close(s){if(this._stopped)return this._done;this._stopped=!0;let a=[];return this.nc.isClosed()||(a=this.handlers.concat(this.internal).map(o=>o.sub.drain())),Promise.allSettled(a).then(()=>{this._done.resolve(s||null)}),this._done}get stopped(){return this._done}get isStopped(){return this._stopped}stop(s){return this.close(s)}ping(){return{type:du.PING,name:this.name,id:this.id,version:this.version,metadata:this.metadata}}reset(){if(this.started=new Date().toISOString(),this.handlers)for(const s of this.handlers)s.stats.reset(s.qi)}addGroup(s,a){return new yu(this,s,a)}addEndpoint(s,a){return new yu(this).addEndpoint(s,a)}_addEndpoint(s){const a=new sn;a.noIterator=typeof s.handler=="function",a.noIterator||(s.handler=(u,d)=>{u?this.stop(u).catch():a.push(new fw(d))},a.iterClosed.then(()=>{this.close().catch()}));const o=this.setupHandler(s,!1);return o.qi=a,this.handlers.push(o),a}}class V3{constructor(s,a,o=""){S(this,"name");S(this,"subject");S(this,"average_processing_time");S(this,"num_requests");S(this,"processing_time");S(this,"num_errors");S(this,"last_error");S(this,"data");S(this,"metadata");S(this,"queue");this.name=s,this.subject=a,this.average_processing_time=0,this.num_errors=0,this.num_requests=0,this.processing_time=0,this.queue=o}reset(s){this.num_requests=0,this.processing_time=0,this.average_processing_time=0,this.num_errors=0,this.last_error=void 0,this.data=void 0;const a=s;a&&(a.time=0,a.processed=0)}countLatency(s){this.num_requests++,this.processing_time+=Et(Date.now()-s),this.average_processing_time=Math.round(this.processing_time/this.num_requests)}countError(s){this.num_errors++,this.last_error=s.message}_stats(){const{name:s,subject:a,average_processing_time:o,num_errors:u,num_requests:d,processing_time:p,last_error:m,data:g,queue:x}=this;return{name:s,subject:a,average_processing_time:o,num_errors:u,num_requests:d,processing_time:p,last_error:m,data:g,queue_group:x}}stats(s){const a=s;return(a==null?void 0:a.noIterator)===!1&&(this.processing_time=Et(a.time),this.num_requests=a.processed,this.average_processing_time=this.processing_time>0&&this.num_requests>0?this.processing_time/this.num_requests:0),this._stats()}}class U3{constructor(s,a={strategy:Ms.JitterTimer,maxWait:2e3},o){S(this,"nc");S(this,"prefix");S(this,"opts");this.nc=s,this.prefix=o,this.opts=a}ping(s="",a=""){return this.q(ei.PING,s,a)}stats(s="",a=""){return this.q(ei.STATS,s,a)}info(s="",a=""){return this.q(ei.INFO,s,a)}async q(s,a="",o=""){const u=new sn,d=ks(),p=Su.controlSubject(s,a,o,this.prefix),m=await this.nc.requestMany(p,es,this.opts);return(async()=>{for await(const g of m)try{const x=d.decode(g.data);u.push(x)}catch(x){u.push(()=>{u.stop(x)})}u.push(()=>{u.stop()})})().catch(g=>{u.stop(g)}),u}}function pE(){return{key:{encode(i){return i},decode(i){return i}},value:{encode(i){return i},decode(i){return i}}}}function z3(){return{replicas:1,history:1,timeout:2e3,max_bytes:-1,maxValueSize:-1,codec:pE(),storage:D0.File}}const fh="KV-Operation",dw="$KV",B3=/^[-/=.\w]+$/,q3=/^[-/=.>*\w]+$/,L3=/^[-\w]+$/;function H3(i){if(i.startsWith(".")||i.endsWith(".")||!B3.test(i))throw new Error(`invalid key: ${i}`)}function P3(i){if(i.startsWith(".")||i.endsWith(".")||!q3.test(i))throw new Error(`invalid key: ${i}`)}function $3(i){if(i.startsWith(".")||i.endsWith("."))throw new Error(`invalid key: ${i}`);const s=i.split(".");let a=!1;for(let o=0;o<s.length;o++)switch(s[o]){case"*":a=!0;break;case">":if(o!==s.length-1)throw new Error(`invalid key: ${i}`);a=!0;break}return a}function Kd(i){if(!L3.test(i))throw new Error(`invalid bucket name: ${i}`)}var ga;(function(i){i.MsgIdHdr="Nats-Msg-Id",i.ExpectedStreamHdr="Nats-Expected-Stream",i.ExpectedLastSeqHdr="Nats-Expected-Last-Sequence",i.ExpectedLastMsgIdHdr="Nats-Expected-Last-Msg-Id",i.ExpectedLastSubjectSequenceHdr="Nats-Expected-Last-Subject-Sequence"})(ga||(ga={}));class gu{constructor(s,a,o){S(this,"js");S(this,"jsm");S(this,"stream");S(this,"bucket");S(this,"direct");S(this,"codec");S(this,"prefix");S(this,"editPrefix");S(this,"useJsPrefix");S(this,"_prefixLen");S(this,"validateKey",H3);S(this,"validateSearchKey",P3);S(this,"hasWildcards",$3);Kd(s),this.js=a,this.jsm=o,this.bucket=s,this.prefix=dw,this.editPrefix="",this.useJsPrefix=!1,this._prefixLen=0}static async create(s,a,o={}){Kd(a);const u=await s.jetstreamManager(),d=new gu(a,s,u);return await d.init(o),d}static async bind(s,a,o={}){const u=await s.jetstreamManager(),d={config:{allow_direct:o.allow_direct}};Kd(a);const p=new gu(a,s,u);return d.config.name=o.streamName??p.bucketName(),Object.assign(p,d),p.stream=d.config.name,p.codec=o.codec||pE(),p.direct=d.config.allow_direct??!1,p.initializePrefixes(d),p}async init(s={}){const a=Object.assign(z3(),s);this.codec=a.codec;const o={};this.stream=o.name=s.streamName??this.bucketName(),o.retention=A0.Limits,o.max_msgs_per_subject=a.history,a.maxBucketSize&&(a.max_bytes=a.maxBucketSize),a.max_bytes&&(o.max_bytes=a.max_bytes),o.max_msg_size=a.maxValueSize,o.storage=a.storage;const u=s.placementCluster??"";if(u&&(s.placement={},s.placement.cluster=u,s.placement.tags=[]),s.placement&&(o.placement=s.placement),s.republish&&(o.republish=s.republish),s.description&&(o.description=s.description),s.mirror){const w=Object.assign({},s.mirror);w.name.startsWith(Zn)||(w.name=`${Zn}${w.name}`),o.mirror=w,o.mirror_direct=!0}else if(s.sources){const w=s.sources.map(D=>{const z=Object.assign({},D),q=z.name.startsWith(Zn)?z.name.substring(Zn.length):z.name;return z.name.startsWith(Zn)||(z.name=`${Zn}${z.name}`),!D.external&&q!==this.bucket&&(z.subject_transforms=[{src:`$KV.${q}.>`,dest:`$KV.${this.bucket}.>`}]),z});o.sources=w,o.subjects=[this.subjectForBucket()]}else o.subjects=[this.subjectForBucket()];s.metadata&&(o.metadata=s.metadata),typeof s.compression=="boolean"&&(o.compression=s.compression?ri.S2:ri.None);const d=this.js.nc,p=d.getServerVersion(),m=p?T0(p,Xi("2.7.2"))>=0:!1;o.discard=m?bu.New:bu.Old;const{ok:g,min:x}=d.features.get(et.JS_ALLOW_DIRECT);if(!g&&s.allow_direct===!0){const w=p?`${p.major}.${p.minor}.${p.micro}`:"unknown";return Promise.reject(new Error(`allow_direct is not available on server version ${w} - requires ${x}`))}s.allow_direct=typeof s.allow_direct=="boolean"?s.allow_direct:g,o.allow_direct=s.allow_direct,this.direct=o.allow_direct,o.num_replicas=a.replicas,a.ttl&&(o.max_age=Et(a.ttl)),o.allow_rollup_hdrs=!0;let _;try{_=await this.jsm.streams.info(o.name),!_.config.allow_direct&&this.direct===!0&&(this.direct=!1)}catch(w){if(w.message==="stream not found")_=await this.jsm.streams.add(o);else throw w}this.initializePrefixes(_)}initializePrefixes(s){this._prefixLen=0,this.prefix=`$KV.${this.bucket}`,this.useJsPrefix=this.js.apiPrefix!=="$JS.API";const{mirror:a}=s.config;if(a){let o=a.name;if(o.startsWith(Zn)&&(o=o.substring(Zn.length)),a.external&&a.external.api!==""){const u=a.name.substring(Zn.length);this.useJsPrefix=!1,this.prefix=`$KV.${u}`,this.editPrefix=`${a.external.api}.$KV.${o}`}else this.editPrefix=this.prefix}}bucketName(){return this.stream??`${Zn}${this.bucket}`}subjectForBucket(){return`${this.prefix}.${this.bucket}.>`}subjectForKey(s,a=!1){const o=[];return a?(this.useJsPrefix&&o.push(this.js.apiPrefix),this.editPrefix!==""?o.push(this.editPrefix):o.push(this.prefix)):this.prefix&&o.push(this.prefix),o.push(s),o.join(".")}fullKeyName(s){return this.prefix!==""?`${this.prefix}.${s}`:`${dw}.${this.bucket}.${s}`}get prefixLen(){return this._prefixLen===0&&(this._prefixLen=this.prefix.length+1),this._prefixLen}encodeKey(s){const a=[];for(const o of s.split("."))switch(o){case">":case"*":a.push(o);break;default:a.push(this.codec.key.encode(o));break}return a.join(".")}decodeKey(s){const a=[];for(const o of s.split("."))switch(o){case">":case"*":a.push(o);break;default:a.push(this.codec.key.decode(o));break}return a.join(".")}close(){return Promise.resolve()}dataLen(s,a){const o=a&&a.get(Dn.MessageSizeHdr)||"";return o!==""?parseInt(o,10):s.length}smToEntry(s){return new aO(this.bucket,this.prefixLen,s)}jmToEntry(s){const a=this.decodeKey(s.subject.substring(this.prefixLen));return new rO(this.bucket,a,s)}async create(s,a){var d;let o;try{const p=await this.put(s,a,{previousSeq:0});return Promise.resolve(p)}catch(p){if(o=p,((d=p==null?void 0:p.api_error)==null?void 0:d.err_code)!==10071)return Promise.reject(p)}let u=0;try{const p=await this.get(s);return(p==null?void 0:p.operation)==="DEL"||(p==null?void 0:p.operation)==="PURGE"?(u=p!==null?p.revision:0,this.update(s,a,u)):Promise.reject(o)}catch(p){return Promise.reject(p)}}update(s,a,o){if(o<=0)throw new Error("version must be greater than 0");return this.put(s,a,{previousSeq:o})}async put(s,a,o={}){var p,m;const u=this.encodeKey(s);this.validateKey(u);const d={};if(o.previousSeq!==void 0){const g=sr();d.headers=g,g.set(ga.ExpectedLastSubjectSequenceHdr,`${o.previousSeq}`)}try{return(await this.js.publish(this.subjectForKey(u,!0),a,d)).seq}catch(g){const x=g;return x.isJetStreamError()?(x.message=(p=x.api_error)==null?void 0:p.description,x.code=`${(m=x.api_error)==null?void 0:m.code}`,Promise.reject(x)):Promise.reject(g)}}async get(s,a){const o=this.encodeKey(s);this.validateKey(o);let u={last_by_subj:this.subjectForKey(o)};a&&a.revision>0&&(u={seq:a.revision});let d;try{this.direct?d=await this.jsm.direct.getMessage(this.bucketName(),u):d=await this.jsm.streams.getMessage(this.bucketName(),u);const p=this.smToEntry(d);return p.key!==o?null:p}catch(p){if(p.code===ue.JetStream404NoMessages)return null;throw p}}purge(s,a){return this._deleteOrPurge(s,"PURGE",a)}delete(s,a){return this._deleteOrPurge(s,"DEL",a)}async purgeDeletes(s=1800*1e3){const a=_t(),o=[],u=await this.watch({key:">",initializedFn:()=>{a.resolve()}});(async()=>{for await(const g of u)(g.operation==="DEL"||g.operation==="PURGE")&&o.push(g)})().then(),await a,u.stop();const d=Date.now()-s,p=o.map(g=>{const x=this.subjectForKey(g.key);return g.created.getTime()>=d?this.jsm.streams.purge(this.stream,{filter:x,keep:1}):this.jsm.streams.purge(this.stream,{filter:x,keep:0})}),m=await Promise.all(p);return m.unshift({success:!0,purged:0}),m.reduce((g,x)=>(g.purged+=x.purged,g))}async _deleteOrPurge(s,a,o){if(!this.hasWildcards(s))return this._doDeleteOrPurge(s,a,o);const u=await this.keys(s),d=[];for await(const p of u)d.push(this._doDeleteOrPurge(p,a)),d.length===100&&(await Promise.all(d),d.length=0);d.length>0&&await Promise.all(d)}async _doDeleteOrPurge(s,a,o){const u=this.encodeKey(s);this.validateKey(u);const d=sr();d.set(fh,a),a==="PURGE"&&d.set(Dn.RollupHdr,Dn.RollupValueSubject),o!=null&&o.previousSeq&&d.set(ga.ExpectedLastSubjectSequenceHdr,`${o.previousSeq}`),await this.js.publish(this.subjectForKey(u,!0),es,{headers:d})}_buildCC(s,a,o={}){let d=(Array.isArray(s)?s:[s]).map(g=>{const x=this.encodeKey(g);return this.validateSearchKey(g),this.fullKeyName(x)}),p=Vt.LastPerSubject;a===Rs.AllHistory&&(p=Vt.All),a===Rs.UpdatesOnly&&(p=Vt.New);let m;return d.length===1&&(m=d[0],d=void 0),Object.assign({deliver_policy:p,ack_policy:nn.None,filter_subjects:d,filter_subject:m,flow_control:!0,idle_heartbeat:Et(5*1e3)},o)}remove(s){return this.purge(s)}async history(s={}){const a=s.key??">",o=new sn,u={};u.headers_only=s.headers_only||!1;let d;d=()=>{o.stop()};let p=0;const m=this._buildCC(a,Rs.AllHistory,u),g=m.filter_subject,x=ni(m);x.bindStream(this.stream),x.orderedConsumer(),x.callback((w,D)=>{if(w){o.stop(w);return}if(D){const z=this.jmToEntry(D);o.push(z),o.received++,(d&&p>0&&o.received>=p||D.info.pending===0)&&(o.push(d),d=void 0)}});const _=await this.js.subscribe(g,x);if(d){const{info:{last:w}}=_,D=w.num_pending+w.delivered.consumer_seq;if(D===0||o.received>=D)try{d()}catch(z){o.stop(z)}finally{d=void 0}else p=D}return o._data=_,o.iterClosed.then(()=>{_.unsubscribe()}),_.closed.then(()=>{o.stop()}).catch(w=>{o.stop(w)}),o}canSetWatcherName(){const a=this.js.nc,{ok:o}=a.features.get(et.JS_NEW_CONSUMER_CREATE_API);return o}async watch(s={}){const a=s.key??">",o=new sn,u={};u.headers_only=s.headers_only||!1;let d=Rs.LastValue;s.include===Rs.AllHistory?d=Rs.AllHistory:s.include===Rs.UpdatesOnly&&(d=Rs.UpdatesOnly);const p=s.ignoreDeletes===!0;let m=s.initializedFn,g=0;const x=this._buildCC(a,d,u),_=x.filter_subject,w=ni(x);this.canSetWatcherName()&&w.consumerName(ai.next()),w.bindStream(this.stream),s.resumeFromRevision&&s.resumeFromRevision>0&&w.startSequence(s.resumeFromRevision),w.orderedConsumer(),w.callback((z,q)=>{if(z){o.stop(z);return}if(q){const F=this.jmToEntry(q);if(p&&F.operation==="DEL")return;o.push(F),o.received++,m&&(g>0&&o.received>=g||q.info.pending===0)&&(o.push(m),m=void 0)}});const D=await this.js.subscribe(_,w);if(m){const{info:{last:z}}=D,q=z.num_pending+z.delivered.consumer_seq;if(q===0||o.received>=q)try{m()}catch(F){o.stop(F)}finally{m=void 0}else g=q}return o._data=D,o.iterClosed.then(()=>{D.unsubscribe()}),D.closed.then(()=>{o.stop()}).catch(z=>{o.stop(z)}),o}async keys(s=">"){const a=new sn,o=this._buildCC(s,Rs.LastValue,{headers_only:!0}),u=Array.isArray(s)?">":o.filter_subject,d=ni(o);d.bindStream(this.stream),d.orderedConsumer();const p=await this.js.subscribe(u,d);return(async()=>{var g;for await(const x of p){const _=(g=x.headers)==null?void 0:g.get(fh);if(_!=="DEL"&&_!=="PURGE"){const w=this.decodeKey(x.subject.substring(this.prefixLen));a.push(w)}x.info.pending===0&&p.unsubscribe()}})().then(()=>{a.stop()}).catch(g=>{a.stop(g)}),p.info.last.num_pending===0&&p.unsubscribe(),a}purgeBucket(s){return this.jsm.streams.purge(this.bucketName(),s)}destroy(){return this.jsm.streams.delete(this.bucketName())}async status(){var d;const a=((d=this.js.nc.info)==null?void 0:d.cluster)??"",o=this.bucketName(),u=await this.jsm.streams.info(o);return new bE(u,a)}}class bE{constructor(s,a=""){S(this,"si");S(this,"cluster");this.si=s,this.cluster=a}get bucket(){return this.si.config.name.startsWith(Zn)?this.si.config.name.substring(Zn.length):this.si.config.name}get values(){return this.si.state.messages}get history(){return this.si.config.max_msgs_per_subject}get ttl(){return Q0(this.si.config.max_age)}get bucket_location(){return this.cluster}get backingStore(){return this.si.config.storage}get storage(){return this.si.config.storage}get replicas(){return this.si.config.num_replicas}get description(){return this.si.config.description??""}get maxBucketSize(){return this.si.config.max_bytes}get maxValueSize(){return this.si.config.max_msg_size}get max_bytes(){return this.si.config.max_bytes}get placement(){return this.si.config.placement||{cluster:"",tags:[]}}get placementCluster(){var s;return((s=this.si.config.placement)==null?void 0:s.cluster)??""}get republish(){return this.si.config.republish??{src:"",dest:""}}get streamInfo(){return this.si}get size(){return this.si.state.bytes}get metadata(){return this.si.config.metadata??{}}get compression(){return this.si.config.compression?this.si.config.compression!==ri.None:!1}}const K0="OBJ_",hw="SHA-256=";function I3(i){return Kd(i),`${K0}${i}`}function Y3(i){return i.startsWith(K0)?i.substring(4):i}class M0{constructor(s){S(this,"si");S(this,"backingStore");this.si=s,this.backingStore="JetStream"}get bucket(){return Y3(this.si.config.name)}get description(){return this.si.config.description??""}get ttl(){return this.si.config.max_age}get storage(){return this.si.config.storage}get replicas(){return this.si.config.num_replicas}get sealed(){return this.si.config.sealed}get size(){return this.si.state.bytes}get streamInfo(){return this.si}get metadata(){return this.si.config.metadata}get compression(){return this.si.config.compression?this.si.config.compression!==ri.None:!1}}function Id(i){if(i===void 0)return;const{domain:s}=i;if(s===void 0)return i;const a=Object.assign({},i);if(delete a.domain,s==="")return a;if(a.external)throw new Error("domain and external are both set");return a.external={api:`$JS.${s}.API`},a}var bs;(function(i){i[i.Unset=-1]="Unset",i[i.Consume=0]="Consume",i[i.Fetch=1]="Fetch"})(bs||(bs={}));var va;(function(i){i.HeartbeatsMissed="heartbeats_missed",i.ConsumerNotFound="consumer_not_found",i.StreamNotFound="stream_not_found",i.ConsumerDeleted="consumer_deleted",i.OrderedConsumerRecreated="ordered_consumer_recreated",i.NoResponders="no_responders"})(va||(va={}));var ml;(function(i){i.DebugEvent="debug",i.Discard="discard",i.Reset="reset",i.Next="next"})(ml||(ml={}));const mw=Uint8Array.of(43,65,67,75),F3=Uint8Array.of(45,78,65,75),su=Uint8Array.of(43,87,80,73),J3=Uint8Array.of(43,78,88,84),G3=Uint8Array.of(43,84,69,82,77),Q3=Uint8Array.of(32);function vu(i,s=5e3){return new dO(i,s)}class f0 extends sn{constructor(a,o,u=!1){super();S(this,"consumer");S(this,"opts");S(this,"sub");S(this,"monitor");S(this,"pending");S(this,"inbox");S(this,"refilling");S(this,"pong");S(this,"callback");S(this,"timeout");S(this,"cleanupHandler");S(this,"listeners");S(this,"statusIterator");S(this,"forOrderedConsumer");S(this,"resetHandler");S(this,"abortOnMissingResource");S(this,"bind");S(this,"inBackOff");this.consumer=a;const d=o;this.opts=this.parseOptions(o,u),this.callback=d.callback||null,this.noIterator=typeof this.callback=="function",this.monitor=null,this.pong=null,this.pending={msgs:0,bytes:0,requests:0},this.refilling=u,this.timeout=null,this.inbox=nr(a.api.nc.options.inboxPrefix),this.listeners=[],this.forOrderedConsumer=!1,this.abortOnMissingResource=d.abort_on_missing_resource===!0,this.bind=d.bind===!0,this.inBackOff=!1,this.start()}start(){const{max_messages:a,max_bytes:o,idle_heartbeat:u,threshold_bytes:d,threshold_messages:p}=this.opts;this.closed().then(g=>{if(this.cleanupHandler)try{this.cleanupHandler(g)}catch{}});const{sub:m}=this;m&&m.unsubscribe(),this.sub=this.consumer.api.nc.subscribe(this.inbox,{callback:(g,x)=>{var w,D,z,q;if(g){this.stop(g);return}if((w=this.monitor)==null||w.work(),x.subject===this.inbox){if(_0(x))return;const F=(D=x.headers)==null?void 0:D.code,Z=((q=(z=x.headers)==null?void 0:z.description)==null?void 0:q.toLowerCase())||"unknown",{msgsLeft:ee,bytesLeft:te}=this.parseDiscard(x.headers);if(ee>0||te>0)this.pending.msgs-=ee,this.pending.bytes-=te,this.pending.requests--,this.notify(ml.Discard,{msgsLeft:ee,bytesLeft:te});else if(F===400){this.stop(new ge(Z,`${F}`));return}else if(F===409&&Z==="consumer deleted"){if(this.notify(va.ConsumerDeleted,`${F} ${Z}`),!this.refilling||this.abortOnMissingResource){const we=new ge(Z,`${F}`);this.stop(we);return}}else if(F===503){if(this.notify(va.NoResponders,`${F} No Responders`),!this.refilling||this.abortOnMissingResource){const we=new ge("no responders",`${F}`);this.stop(we);return}}else this.notify(ml.DebugEvent,`${F} ${Z}`)}else this._push(vu(x,this.consumer.api.timeout)),this.received++,this.pending.msgs&&this.pending.msgs--,this.pending.bytes&&(this.pending.bytes-=x.size());if(this.pending.msgs===0&&this.pending.bytes===0&&(this.pending.requests=0),this.refilling){if(a&&this.pending.msgs<=p||o&&this.pending.bytes<=d){const F=this.pullOptions();this.pull(F)}}else this.pending.requests===0&&this._push(()=>{this.stop()})}}),this.sub.closed.then(()=>{this.sub.draining&&this._push(()=>{this.stop()})}),u&&(this.monitor=new Z0(u,g=>(this.notify(va.HeartbeatsMissed,g),this.resetPending().then(()=>{}).catch(()=>{}),!1),{maxOut:2})),(async()=>{var x;const g=this.consumer.api.nc.status();this.statusIterator=g;for await(const _ of g)switch(_.type){case tr.Disconnect:(x=this.monitor)==null||x.cancel();break;case tr.Reconnect:this.resetPending().then(w=>{var D;w&&((D=this.monitor)==null||D.restart())}).catch(()=>{});break}})(),this.pull(this.pullOptions())}_push(a){if(!this.callback)super.push(a);else{const o=typeof a=="function"?a:null;try{o?o():this.callback(a)}catch(u){this.stop(u)}}}notify(a,o){this.listeners.length>0&&this.listeners.forEach(u=>{u.done||u.push({type:a,data:o})})}resetPending(){return this.bind?this.resetPendingNoInfo():this.resetPendingWithInfo()}resetPendingNoInfo(){return this.pending.msgs=0,this.pending.bytes=0,this.pending.requests=0,this.pull(this.pullOptions()),Promise.resolve(!0)}async resetPendingWithInfo(){if(this.inBackOff)return!1;let a=0,o=0;const u=G0([this.opts.expires]);let d=0;for(;;){if(this.done)return!1;if(this.consumer.api.nc.isClosed())return console.error("aborting resetPending - connection is closed"),!1;try{return await this.consumer.info(),this.inBackOff=!1,a=0,this.pending.msgs=0,this.pending.bytes=0,this.pending.requests=0,this.pull(this.pullOptions()),!0}catch(p){if(p.message==="stream not found"){if(o++,this.notify(va.StreamNotFound,o),!this.refilling||this.abortOnMissingResource)return this.stop(p),!1}else if(p.message==="consumer not found"){if(a++,this.notify(va.ConsumerNotFound,a),this.resetHandler)try{this.resetHandler()}catch{}if(!this.refilling||this.abortOnMissingResource)return this.stop(p),!1;if(this.forOrderedConsumer)return!1}else a=0,o=0;this.inBackOff=!0;const m=u.backoff(d),g=gl(m);await Promise.race([g,this.consumer.api.nc.closed()]),g.cancel(),d++}}}pull(a){this.pending.bytes+=a.max_bytes??0,this.pending.msgs+=a.batch??0,this.pending.requests++;const o=this.consumer.api.nc;this._push(()=>{o.publish(`${this.consumer.api.prefix}.CONSUMER.MSG.NEXT.${this.consumer.stream}.${this.consumer.name}`,this.consumer.api.jc.encode(a),{reply:this.inbox}),this.notify(ml.Next,a)})}pullOptions(){const a=this.opts.max_messages-this.pending.msgs,o=this.opts.max_bytes-this.pending.bytes,u=Et(this.opts.idle_heartbeat),d=Et(this.opts.expires);return{batch:a,max_bytes:o,idle_heartbeat:u,expires:d}}parseDiscard(a){const o={msgsLeft:0,bytesLeft:0},u=a==null?void 0:a.get(Dn.PendingMessagesHdr);u&&(o.msgsLeft=parseInt(u));const d=a==null?void 0:a.get(Dn.PendingBytesHdr);return d&&(o.bytesLeft=parseInt(d)),o}trackTimeout(a){this.timeout=a}close(){return this.stop(),this.iterClosed}closed(){return this.iterClosed}clearTimers(){var a,o;(a=this.monitor)==null||a.cancel(),this.monitor=null,(o=this.timeout)==null||o.cancel(),this.timeout=null}setCleanupHandler(a){this.cleanupHandler=a}stop(a){var o,u;this.done||((o=this.sub)==null||o.unsubscribe(),this.clearTimers(),(u=this.statusIterator)==null||u.stop(),this._push(()=>{super.stop(a),this.listeners.forEach(d=>{d.stop()})}))}parseOptions(a,o=!1){const u=a||{};if(u.max_messages=u.max_messages||0,u.max_bytes=u.max_bytes||0,u.max_messages!==0&&u.max_bytes!==0)throw new Error("only specify one of max_messages or max_bytes");if(u.max_messages===0&&(u.max_messages=100),u.expires=u.expires||3e4,u.expires<1e3)throw new Error("expires should be at least 1000ms");if(u.idle_heartbeat=u.idle_heartbeat||u.expires/2,u.idle_heartbeat=u.idle_heartbeat>3e4?3e4:u.idle_heartbeat,o){const d=Math.round(u.max_messages*.75)||1;u.threshold_messages=u.threshold_messages||d;const p=Math.round(u.max_bytes*.75)||1;u.threshold_bytes=u.threshold_bytes||p}return u}status(){const a=new sn;return this.listeners.push(a),Promise.resolve(a)}}class X3 extends sn{constructor(){super();S(this,"src");S(this,"listeners");this.listeners=[]}setSource(a){this.src&&(this.src.resetHandler=void 0,this.src.setCleanupHandler(),this.src.stop()),this.src=a,this.src.setCleanupHandler(o=>{this.stop(o||void 0)}),(async()=>{const o=await this.src.status();for await(const u of o)this.notify(u.type,u.data)})().catch(()=>{})}notify(a,o){this.listeners.length>0&&this.listeners.forEach(u=>{u.done||u.push({type:a,data:o})})}stop(a){var o;this.done||((o=this.src)==null||o.stop(a),super.stop(a),this.listeners.forEach(u=>{u.stop()}))}close(){return this.stop(),this.iterClosed}closed(){return this.iterClosed}status(){const a=new sn;return this.listeners.push(a),Promise.resolve(a)}}class k0{constructor(s,a){S(this,"api");S(this,"_info");S(this,"stream");S(this,"name");this.api=s,this._info=a,this.stream=a.stream_name,this.name=a.name}consume(s={max_messages:100,expires:3e4}){return Promise.resolve(new f0(this,s,!0))}fetch(s={max_messages:100,expires:3e4}){const a=new f0(this,s,!1),o=Math.round(a.opts.expires*1.05),u=pl(o);return a.closed().catch(()=>{}).finally(()=>{u.cancel()}),u.catch(()=>{a.close().catch()}),a.trackTimeout(u),Promise.resolve(a)}next(s={expires:3e4}){const a=_t(),o=s;o.max_messages=1;const u=new f0(this,o,!1),d=Math.round(u.opts.expires*1.05);d>=6e4&&(async()=>{for await(const m of await u.status())if(m.type===va.HeartbeatsMissed&&m.data>=2){a.reject(new Error("consumer missed heartbeats"));break}})().catch(),(async()=>{for await(const m of u){a.resolve(m);break}})().catch(()=>{});const p=pl(d);return u.closed().then(m=>{m?a.reject(m):a.resolve(null)}).catch(m=>{a.reject(m)}).finally(()=>{p.cancel()}),p.catch(m=>{a.resolve(null),u.close().catch()}),u.trackTimeout(p),a}delete(){const{stream_name:s,name:a}=this._info;return this.api.delete(s,a)}info(s=!1){if(s)return Promise.resolve(this._info);const{stream_name:a,name:o}=this._info;return this.api.info(a,o).then(u=>(this._info=u,this._info))}}class Z3{constructor(s,a,o={}){S(this,"api");S(this,"consumerOpts");S(this,"consumer");S(this,"opts");S(this,"cursor");S(this,"stream");S(this,"namePrefix");S(this,"serial");S(this,"currentConsumer");S(this,"userCallback");S(this,"iter");S(this,"type");S(this,"startSeq");S(this,"maxInitialReset");this.api=s,this.stream=a,this.cursor={stream_seq:1,deliver_seq:0},this.namePrefix=ai.next(),typeof o.name_prefix=="string"&&(bh("name_prefix",o.name_prefix),this.namePrefix=o.name_prefix+this.namePrefix),this.serial=0,this.currentConsumer=null,this.userCallback=null,this.iter=null,this.type=bs.Unset,this.consumerOpts=o,this.maxInitialReset=30,this.startSeq=this.consumerOpts.opt_start_seq||0,this.cursor.stream_seq=this.startSeq>0?this.startSeq-1:0}getConsumerOpts(s){this.serial++;const a=`${this.namePrefix}_${this.serial}`;s=s===0?1:s;const o={name:a,deliver_policy:Vt.StartSequence,opt_start_seq:s,ack_policy:nn.None,inactive_threshold:Et(300*1e3),num_replicas:1};return this.consumerOpts.headers_only===!0&&(o.headers_only=!0),Array.isArray(this.consumerOpts.filterSubjects)&&(o.filter_subjects=this.consumerOpts.filterSubjects),typeof this.consumerOpts.filterSubjects=="string"&&(o.filter_subject=this.consumerOpts.filterSubjects),this.consumerOpts.replay_policy&&(o.replay_policy=this.consumerOpts.replay_policy),s===this.startSeq+1&&(o.deliver_policy=this.consumerOpts.deliver_policy||Vt.StartSequence,(this.consumerOpts.deliver_policy===Vt.LastPerSubject||this.consumerOpts.deliver_policy===Vt.New||this.consumerOpts.deliver_policy===Vt.Last)&&(delete o.opt_start_seq,o.deliver_policy=this.consumerOpts.deliver_policy),o.deliver_policy===Vt.LastPerSubject&&typeof o.filter_subjects>"u"&&typeof o.filter_subject>"u"&&(o.filter_subject=">"),this.consumerOpts.opt_start_time&&(delete o.opt_start_seq,o.deliver_policy=Vt.StartTime,o.opt_start_time=this.consumerOpts.opt_start_time),this.consumerOpts.inactive_threshold&&(o.inactive_threshold=Et(this.consumerOpts.inactive_threshold))),o}async resetConsumer(s=0){var p,m,g,x,_;ai.next();const a=this.serial===0;(p=this.consumer)==null||p.delete().catch(()=>{}),s=s===0?1:s,this.cursor.deliver_seq=0;const o=this.getConsumerOpts(s);o.max_deliver=1,o.mem_storage=!0;const u=G0([((m=this.opts)==null?void 0:m.expires)||3e4]);let d;for(let w=0;;w++)try{d=await this.api.add(this.stream,o),(g=this.iter)==null||g.notify(va.OrderedConsumerRecreated,d.name);break}catch(D){if(D.message==="stream not found"&&((x=this.iter)==null||x.notify(va.StreamNotFound,w),this.type===bs.Fetch||this.opts.abort_on_missing_resource===!0))return(_=this.iter)==null||_.stop(D),Promise.reject(D);if(a&&w>=this.maxInitialReset)throw D;await gl(u.backoff(w+1))}return d}internalHandler(s){return a=>{var u;if(this.serial!==s)return;const o=a.info.deliverySequence;if(o!==this.cursor.deliver_seq+1){this.notifyOrderedResetAndReset();return}this.cursor.deliver_seq=o,this.cursor.stream_seq=a.info.streamSequence,this.userCallback?this.userCallback(a):(u=this.iter)==null||u.push(a)}}async reset(s={max_messages:100,expires:3e4},a){var g,x;a=a||{};const o=a.fromFetch||!1,u=a.orderedReset||!1;if(this.type===bs.Fetch&&u){(g=this.iter)==null||g.src.stop(),await((x=this.iter)==null?void 0:x.closed()),this.currentConsumer=null;return}(this.currentConsumer===null||u)&&(this.currentConsumer=await this.resetConsumer(this.cursor.stream_seq+1)),(this.iter===null||o)&&(this.iter=new X3),this.consumer=new k0(this.api,this.currentConsumer);const d=s;d.callback=this.internalHandler(this.serial);let p=null;this.type===bs.Fetch&&o?p=await this.consumer.fetch(s):this.type===bs.Consume&&(p=await this.consumer.consume(s));const m=p;m.forOrderedConsumer=!0,m.resetHandler=()=>{this.notifyOrderedResetAndReset()},this.iter.setSource(m)}notifyOrderedResetAndReset(){var s;(s=this.iter)==null||s.notify(ml.Reset,""),this.reset(this.opts,{orderedReset:!0})}async consume(s={max_messages:100,expires:3e4}){if(s.bind)return Promise.reject(new Error("bind is not supported"));if(this.type===bs.Fetch)return Promise.reject(new Error("ordered consumer initialized as fetch"));if(this.type===bs.Consume)return Promise.reject(new Error("ordered consumer doesn't support concurrent consume"));const{callback:o}=s;return o&&(this.userCallback=o),this.type=bs.Consume,this.opts=s,await this.reset(s),this.iter}async fetch(s={max_messages:100,expires:3e4}){var u;if(s.bind)return Promise.reject(new Error("bind is not supported"));if(this.type===bs.Consume)return Promise.reject(new Error("ordered consumer already initialized as consume"));if(((u=this.iter)==null?void 0:u.done)===!1)return Promise.reject(new Error("ordered consumer doesn't support concurrent fetch"));const{callback:o}=s;return o&&(this.userCallback=o),this.type=bs.Fetch,this.opts=s,await this.reset(s,{fromFetch:!0}),this.iter}async next(s={expires:3e4}){const a=s;if(a.bind)return Promise.reject(new Error("bind is not supported"));a.max_messages=1;const o=_t();return a.callback=d=>{this.userCallback=null,o.resolve(d)},(await this.fetch(a)).iterClosed.then(d=>{d&&o.reject(d),o.resolve(null)}).catch(d=>{o.reject(d)}),o}delete(){return this.currentConsumer?this.api.delete(this.stream,this.currentConsumer.name).then(s=>Promise.resolve(s)).catch(s=>Promise.reject(s)).finally(()=>{this.currentConsumer=null}):Promise.resolve(!1)}async info(s){return this.currentConsumer==null?(this.currentConsumer=await this.resetConsumer(this.startSeq),Promise.resolve(this.currentConsumer)):s&&this.currentConsumer?Promise.resolve(this.currentConsumer):this.api.info(this.stream,this.currentConsumer.name)}}class V0{constructor(s){S(this,"api");S(this,"notified");this.api=s,this.notified=!1}checkVersion(){const s=this.api.nc.features.get(et.JS_SIMPLIFICATION);return s.ok?Promise.resolve():Promise.reject(new Error(`consumers framework is only supported on servers ${s.min} or better`))}getPullConsumerFor(s){if(s.config.deliver_subject!==void 0)throw new Error("push consumer not supported");return new k0(this.api,s)}async get(s,a={}){return typeof a=="object"?this.ordered(s,a):(await this.checkVersion(),this.api.info(s,a).then(o=>o.config.deliver_subject!==void 0?Promise.reject(new Error("push consumer not supported")):new k0(this.api,o)).catch(o=>Promise.reject(o)))}async ordered(s,a){await this.checkVersion();const o=this.api;return new W0(o.nc,o.opts).info(s).then(d=>Promise.resolve(new Z3(this.api,s,a))).catch(d=>Promise.reject(d))}}class gh{constructor(s,a){S(this,"api");S(this,"_info");this.api=s,this._info=a}get name(){return this._info.config.name}alternates(){return this.info().then(s=>s.alternates?s.alternates:[])}async best(){if(await this.info(),this._info.alternates){const s=await this.api.info(this._info.alternates[0].name);return new gh(this.api,s)}else return this}info(s=!1,a){return s?Promise.resolve(this._info):this.api.info(this.name,a).then(o=>(this._info=o,this._info))}getConsumerFromInfo(s){return new V0(new lh(this.api.nc,this.api.opts)).getPullConsumerFor(s)}getConsumer(s){return new V0(new lh(this.api.nc,this.api.opts)).get(this.name,s)}getMessage(s){return this.api.getMessage(this.name,s)}deleteMessage(s,a){return this.api.deleteMessage(this.name,s,a)}}class W0 extends Nu{constructor(s,a){super(s,a)}checkStreamConfigVersions(s){const a=this.nc;if(s.metadata){const{min:u,ok:d}=a.features.get(et.JS_STREAM_CONSUMER_METADATA);if(!d)throw new Error(`stream 'metadata' requires server ${u}`)}if(s.first_seq){const{min:u,ok:d}=a.features.get(et.JS_STREAM_FIRST_SEQ);if(!d)throw new Error(`stream 'first_seq' requires server ${u}`)}if(s.subject_transform){const{min:u,ok:d}=a.features.get(et.JS_STREAM_SUBJECT_TRANSFORM);if(!d)throw new Error(`stream 'subject_transform' requires server ${u}`)}if(s.compression){const{min:u,ok:d}=a.features.get(et.JS_STREAM_COMPRESSION);if(!d)throw new Error(`stream 'compression' requires server ${u}`)}if(s.consumer_limits){const{min:u,ok:d}=a.features.get(et.JS_DEFAULT_CONSUMER_LIMITS);if(!d)throw new Error(`stream 'consumer_limits' requires server ${u}`)}function o(u,d){var m;if((((m=d==null?void 0:d.subject_transforms)==null?void 0:m.length)||0)>0){const{min:g,ok:x}=a.features.get(et.JS_STREAM_SOURCE_SUBJECT_TRANSFORM);if(!x)throw new Error(`${u} 'subject_transforms' requires server ${g}`)}}s.sources&&s.sources.forEach(u=>{o("stream sources",u)}),s.mirror&&o("stream mirror",s.mirror)}async add(s={}){var u;this.checkStreamConfigVersions(s),_n(s.name),s.mirror=Id(s.mirror),s.sources=(u=s.sources)==null?void 0:u.map(Id);const o=await this._request(`${this.prefix}.STREAM.CREATE.${s.name}`,s);return this._fixInfo(o),o}async delete(s){return _n(s),(await this._request(`${this.prefix}.STREAM.DELETE.${s}`)).success}async update(s,a={}){var m;if(typeof s=="object"){const g=s;s=g.name,a=g,console.trace("\x1B[33m >> streams.update(config: StreamConfig) api changed to streams.update(name: string, config: StreamUpdateConfig) - this shim will be removed - update your code. \x1B[0m")}this.checkStreamConfigVersions(a),_n(s);const o=await this.info(s),u=Object.assign(o.config,a);u.mirror=Id(u.mirror),u.sources=(m=u.sources)==null?void 0:m.map(Id);const p=await this._request(`${this.prefix}.STREAM.UPDATE.${s}`,u);return this._fixInfo(p),p}async info(s,a){_n(s);const o=`${this.prefix}.STREAM.INFO.${s}`;let d=await this._request(o,a),{total:p,limit:m}=d,g=d.state.subjects?Object.getOwnPropertyNames(d.state.subjects).length:1;if(p&&p>g){const x=[d],_=a||{};let w=0;for(;p>g;){w++,_.offset=m*w;const z=await this._request(o,_);p=z.total,x.push(z);const q=Object.getOwnPropertyNames(z.state.subjects).length;if(g+=q,q<m)break}let D={};for(let z=0;z<x.length;z++)d=x[z],d.state.subjects&&(D=Object.assign(D,d.state.subjects));d.offset=0,d.total=0,d.limit=0,d.state.subjects=D}return this._fixInfo(d),d}list(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>{const p=d;return p.streams.forEach(m=>{this._fixInfo(m)}),p.streams},u=`${this.prefix}.STREAM.LIST`;return new lu(u,o,this,a)}_fixInfo(s){s.config.sealed=s.config.sealed||!1,s.config.deny_delete=s.config.deny_delete||!1,s.config.deny_purge=s.config.deny_purge||!1,s.config.allow_rollup_hdrs=s.config.allow_rollup_hdrs||!1}async purge(s,a){if(a){const{keep:u,seq:d}=a;if(typeof u=="number"&&typeof d=="number")throw new Error("can specify one of keep or seq")}return _n(s),await this._request(`${this.prefix}.STREAM.PURGE.${s}`,a)}async deleteMessage(s,a,o=!0){_n(s);const u={seq:a};return o||(u.no_erase=!0),(await this._request(`${this.prefix}.STREAM.MSG.DELETE.${s}`,u)).success}async getMessage(s,a){_n(s);const u=await this._request(`${this.prefix}.STREAM.MSG.GET.${s}`,a);return new yE(u)}find(s){return this.findStream(s)}listKvs(){const s=o=>{var g;const d=o.streams.filter(x=>x.config.name.startsWith(Zn));d.forEach(x=>{this._fixInfo(x)});let p="";return d.length&&(p=((g=this.nc.info)==null?void 0:g.cluster)??""),d.map(x=>new bE(x,p))},a=`${this.prefix}.STREAM.LIST`;return new lu(a,s,this)}listObjectStores(){const s=o=>{const d=o.streams.filter(m=>m.config.name.startsWith(K0));return d.forEach(m=>{this._fixInfo(m)}),d.map(m=>new M0(m))},a=`${this.prefix}.STREAM.LIST`;return new lu(a,s,this)}names(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>d.streams,u=`${this.prefix}.STREAM.NAMES`;return new lu(u,o,this,a)}async get(s){const a=await this.info(s);return Promise.resolve(new gh(this,a))}}class K3 extends Nu{constructor(s,a){super(s,a)}async getMessage(s,a){_n(s);let o=a;const{last_by_subj:u}=o;u&&(o=null);const d=o?this.jc.encode(o):es,p=this.opts.apiPrefix||"$JS.API",m=u?`${p}.DIRECT.GET.${s}.${u}`:`${p}.DIRECT.GET.${s}`,g=await this.nc.request(m,d,{timeout:this.timeout}),x=dl(g);if(x)return Promise.reject(x);const _=new U0(g);return Promise.resolve(_)}async getBatch(s,a){_n(s);const u=`${this.opts.apiPrefix||"$JS.API"}.DIRECT.GET.${s}`;if(!Array.isArray(a.multi_last)||a.multi_last.length===0)return Promise.reject("multi_last is required");const d=JSON.stringify(a,(g,x)=>g==="up_to_time"&&x instanceof Date?x.toISOString():x),p=new sn,m=await this.nc.requestMany(u,d,{strategy:Ms.SentinelMsg});return(async()=>{var w,D,z;let g=!1,x=!1,_;for await(const q of m){if(!g){g=!0;const F=((w=q.headers)==null?void 0:w.code)||0;if(F!==0&&F<200||F>299){_=(D=q.headers)==null?void 0:D.description.toLowerCase();break}if(((z=q.headers)==null?void 0:z.get("Nats-Num-Pending"))===""){x=!0;break}}if(q.data.length===0)break;p.push(new U0(q))}p.push(()=>{if(x)throw new Error("batch direct get not supported by the server");if(_)throw new Error(`bad request: ${_}`);p.stop()})})(),Promise.resolve(p)}}class U0{constructor(s){S(this,"data");S(this,"header");if(!s.headers)throw new Error("headers expected");this.data=s.data,this.header=s.headers}get subject(){return this.header.last(cl.Subject)}get seq(){const s=this.header.last(cl.Sequence);return typeof s=="string"?parseInt(s):0}get time(){return new Date(Date.parse(this.timestamp))}get timestamp(){return this.header.last(cl.TimeStamp)}get stream(){return this.header.last(cl.Stream)}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}S(U0,"jc");class W3 extends Nu{constructor(a,o){super(a,o);S(this,"streams");S(this,"consumers");S(this,"direct");this.streams=new W0(a,o),this.consumers=new lh(a,o),this.direct=new K3(a,o)}async getAccountInfo(){return await this._request(`${this.prefix}.INFO`)}jetstream(){return this.nc.jetstream(this.getOptions())}advisories(){const a=new sn;return this.nc.subscribe("$JS.EVENT.ADVISORY.>",{callback:(o,u)=>{if(o)throw o;try{const d=this.parseJsResponse(u),p=d.type.split("."),m=p[p.length-1];a.push({kind:m,data:d})}catch(d){a.stop(d)}}}),a}}class yE{constructor(s){S(this,"_header");S(this,"smr");this.smr=s}get subject(){return this.smr.message.subject}get seq(){return this.smr.message.seq}get timestamp(){return this.smr.message.time}get time(){return new Date(Date.parse(this.timestamp))}get data(){return this.smr.message.data?this._parse(this.smr.message.data):es}get header(){if(!this._header)if(this.smr.message.hdrs){const s=this._parse(this.smr.message.hdrs);this._header=ti.decode(s)}else this._header=sr();return this._header}_parse(s){const a=atob(s),o=a.length,u=new Uint8Array(o);for(let d=0;d<o;d++)u[d]=a.charCodeAt(d);return u}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}S(yE,"jc");class eO{constructor(s){S(this,"api");this.api=s}get(s){return this.api.info(s).then(a=>new gh(this.api,a))}}class d0{constructor(s){S(this,"info");S(this,"hdrs");this.info=s}get name(){return this.info.name}get description(){return this.info.description??""}get headers(){return this.hdrs||(this.hdrs=ti.fromRecord(this.info.headers||{})),this.hdrs}get options(){return this.info.options}get bucket(){return this.info.bucket}get chunks(){return this.info.chunks}get deleted(){return this.info.deleted??!1}get digest(){return this.info.digest}get mtime(){return this.info.mtime}get nuid(){return this.info.nuid}get size(){return this.info.size}get revision(){return this.info.revision}get metadata(){return this.info.metadata||{}}isLink(){var s,a;return((s=this.info.options)==null?void 0:s.link)!==void 0&&((a=this.info.options)==null?void 0:a.link)!==null}}function pw(i){const s={name:i.name,description:i.description??"",options:i.options,metadata:i.metadata};if(i.headers){const a=i.headers;s.headers=a.toRecord()}return s}function tO(){return new ReadableStream({pull(i){i.enqueue(new Uint8Array(0)),i.close()}})}class mu{constructor(s,a,o){S(this,"jsm");S(this,"js");S(this,"stream");S(this,"name");this.name=s,this.jsm=a,this.js=o}_checkNotEmpty(s){return!s||s.length===0?{name:s,error:new Error("name cannot be empty")}:{name:s}}async info(s){const a=await this.rawInfo(s);return a?new d0(a):null}async list(){const s=[],a=await this.watch({ignoreDeletes:!0,includeHistory:!0});for await(const o of a){if(o===null)break;s.push(o)}return Promise.resolve(s)}async rawInfo(s){const{name:a,error:o}=this._checkNotEmpty(s);if(o)return Promise.reject(o);const u=this._metaSubject(a);try{const d=await this.jsm.streams.getMessage(this.stream,{last_by_subj:u}),m=ks().decode(d.data);return m.revision=d.seq,m}catch(d){return d.code==="404"?null:Promise.reject(d)}}async _si(s){try{return await this.jsm.streams.info(this.stream,s)}catch(a){return a.code==="404"?null:Promise.reject(a)}}async seal(){let s=await this._si();return s===null?Promise.reject(new Error("object store not found")):(s.config.sealed=!0,s=await this.jsm.streams.update(this.stream,s.config),Promise.resolve(new M0(s)))}async status(s){const a=await this._si(s);return a===null?Promise.reject(new Error("object store not found")):Promise.resolve(new M0(a))}destroy(){return this.jsm.streams.delete(this.stream)}async _put(s,a,o){var De;const u=this.js.getOptions();o=o||{timeout:u.timeout},o.timeout=o.timeout||u.timeout,o.previousRevision=o.previousRevision??void 0;const{timeout:d,previousRevision:p}=o,m=this.js.nc.info,g=(m==null?void 0:m.max_payload)||1024;s=s||{},s.options=s.options||{};let x=((De=s.options)==null?void 0:De.max_chunk_size)||128*1024;x=x>g?g:x,s.options.max_chunk_size=x;const _=await this.info(s.name),{name:w,error:D}=this._checkNotEmpty(s.name);if(D)return Promise.reject(D);const z=ai.next(),q=this._chunkSubject(z),F=this._metaSubject(w),Z=Object.assign({bucket:this.name,nuid:z,size:0,chunks:0},pw(s)),ee=_t(),te=[],we=new yl;try{const U=a?a.getReader():null,ne=aw.create();for(;;){const{done:oe,value:W}=U?await U.read():{done:!0,value:void 0};if(oe){if(we.size()>0){const ie=we.drain();ne.update(ie),Z.chunks++,Z.size+=ie.length,te.push(this.js.publish(q,ie,{timeout:d}))}await Promise.all(te),te.length=0,Z.mtime=new Date().toISOString();const Q=hl.encode(ne.digest());Z.digest=`${hw}${Q}`,Z.deleted=!1;const H=sr();typeof p=="number"&&H.set(ga.ExpectedLastSubjectSequenceHdr,`${p}`),H.set(Dn.RollupHdr,Dn.RollupValueSubject);const le=await this.js.publish(F,ks().encode(Z),{headers:H,timeout:d});if(Z.revision=le.seq,_)try{await this.jsm.streams.purge(this.stream,{filter:`$O.${this.name}.C.${_.nuid}`})}catch{}ee.resolve(new d0(Z));break}if(W)for(we.fill(W);we.size()>x;){Z.chunks++,Z.size+=x;const Q=we.drain(s.options.max_chunk_size);ne.update(Q),te.push(this.js.publish(q,Q,{timeout:d}))}}}catch(U){await this.jsm.streams.purge(this.stream,{filter:q}),ee.reject(U)}return ee}putBlob(s,a,o){function u(d){return new ReadableStream({pull(p){p.enqueue(d),p.close()}})}return a===null&&(a=new Uint8Array(0)),this.put(s,u(a),o)}put(s,a,o){var u;return(u=s==null?void 0:s.options)!=null&&u.link?Promise.reject(new Error("link cannot be set when putting the object in bucket")):this._put(s,a,o)}async getBlob(s){async function a(d){const p=new yl,m=d.getReader();for(;;){const{done:g,value:x}=await m.read();if(g)return p.drain();x&&x.length&&p.fill(x)}}const o=await this.get(s);if(o===null)return Promise.resolve(null);const u=await Promise.all([o.error,a(o.data)]);return u[0]?Promise.reject(u[0]):Promise.resolve(u[1])}async get(s){const a=await this.rawInfo(s);if(a===null||a.deleted)return Promise.resolve(null);if(a.options&&a.options.link){const w=a.options.link.name||"";if(w==="")throw new Error("link is a bucket");return(a.options.link.bucket!==this.name?await mu.create(this.js,a.options.link.bucket):this).get(w)}if(!a.digest.startsWith(hw))return Promise.reject(new Error(`unknown digest type: ${a.digest}`));const o=C0(a.digest.substring(8));if(o===null)return Promise.reject(new Error(`unable to parse digest: ${a.digest}`));const u=_t(),d={info:new d0(a),error:u};if(a.size===0)return d.data=tO(),u.resolve(null),Promise.resolve(d);let p;const m=ni();m.orderedConsumer();const g=aw.create(),x=`$O.${this.name}.C.${a.nuid}`,_=await this.js.subscribe(x,m);return(async()=>{for await(const w of _)w.data.length>0&&(g.update(w.data),p.enqueue(w.data)),w.info.pending===0&&($T(o,g.digest())?p.close():p.error(new Error(`received a corrupt object, digests do not match received: ${a.digest} calculated ${o}`)),_.unsubscribe())})().then(()=>{u.resolve()}).catch(w=>{p.error(w),u.reject(w)}),d.data=new ReadableStream({start(w){p=w},cancel(){_.unsubscribe()}}),d}linkStore(s,a){if(!(a instanceof mu))return Promise.reject("bucket required");const o=a,{name:u,error:d}=this._checkNotEmpty(s);if(d)return Promise.reject(d);const p={name:u,options:{link:{bucket:o.name}}};return this._put(p,null)}async link(s,a){const{name:o,error:u}=this._checkNotEmpty(s);if(u)return Promise.reject(u);if(a.deleted)return Promise.reject(new Error("src object is deleted"));if(a.isLink())return Promise.reject(new Error("src object is a link"));const d=await this.rawInfo(s);if(d!==null&&!d.deleted)return Promise.reject(new Error("an object already exists with that name"));const p={bucket:a.bucket,name:a.name},m={name:o,bucket:a.bucket,options:{link:p}};await this.js.publish(this._metaSubject(s),JSON.stringify(m));const g=await this.info(s);return Promise.resolve(g)}async delete(s){const a=await this.rawInfo(s);if(a===null)return Promise.resolve({purged:0,success:!1});a.deleted=!0,a.size=0,a.chunks=0,a.digest="";const o=ks(),u=sr();return u.set(Dn.RollupHdr,Dn.RollupValueSubject),await this.js.publish(this._metaSubject(a.name),o.encode(a),{headers:u}),this.jsm.streams.purge(this.stream,{filter:this._chunkSubject(a.nuid)})}async update(s,a={}){const o=await this.rawInfo(s);if(o===null)return Promise.reject(new Error("object not found"));if(o.deleted)return Promise.reject(new Error("cannot update meta for a deleted object"));a.name=a.name??o.name;const{name:u,error:d}=this._checkNotEmpty(a.name);if(d)return Promise.reject(d);if(s!==a.name){const g=await this.info(a.name);if(g&&!g.deleted)return Promise.reject(new Error("an object already exists with that name"))}a.name=u;const p=Object.assign({},o,pw(a)),m=await this.js.publish(this._metaSubject(p.name),JSON.stringify(p));return s!==a.name&&await this.jsm.streams.purge(this.stream,{filter:this._metaSubject(s)}),Promise.resolve(m)}async watch(s={}){s.includeHistory=s.includeHistory??!1,s.ignoreDeletes=s.ignoreDeletes??!1;let a=!1;const o=new sn,u=this._metaSubjectAll();try{await this.jsm.streams.getMessage(this.stream,{last_by_subj:u})}catch(g){g.code==="404"?(o.push(null),a=!0):o.stop(g)}const d=ks(),p=ni();p.orderedConsumer(),s.includeHistory?p.deliverLastPerSubject():(a=!0,p.deliverNew()),p.callback((g,x)=>{var _;if(g){o.stop(g);return}if(x!==null){const w=d.decode(x.data);w.deleted&&s.ignoreDeletes===!0||o.push(w),((_=x.info)==null?void 0:_.pending)===0&&!a&&(a=!0,o.push(null))}});const m=await this.js.subscribe(u,p);return o._data=m,o.iterClosed.then(()=>{m.unsubscribe()}),m.closed.then(()=>{o.stop()}).catch(g=>{o.stop(g)}),o}_chunkSubject(s){return`$O.${this.name}.C.${s}`}_metaSubject(s){return`$O.${this.name}.M.${hl.encode(s)}`}_metaSubjectAll(){return`$O.${this.name}.M.>`}async init(s={}){try{this.stream=I3(this.name)}catch(u){return Promise.reject(u)}const a=(s==null?void 0:s.ttl)||0;delete s.ttl;const o=Object.assign({max_age:a},s);o.name=this.stream,o.num_replicas=s.replicas??1,o.allow_direct=!0,o.allow_rollup_hdrs=!0,o.discard=bu.New,o.subjects=[`$O.${this.name}.C.>`,`$O.${this.name}.M.>`],s.placement&&(o.placement=s.placement),s.metadata&&(o.metadata=s.metadata),typeof s.compression=="boolean"&&(o.compression=s.compression?ri.S2:ri.None);try{await this.jsm.streams.info(o.name)}catch(u){u.message==="stream not found"&&await this.jsm.streams.add(o)}}static async create(s,a,o={}){const u=await s.jetstreamManager(),d=new mu(a,u,s);return await d.init(o),Promise.resolve(d)}}class nO{constructor(s){S(this,"js");this.js=s}kv(s,a={}){const o=this.js,{ok:u,min:d}=o.nc.features.get(et.JS_KV);return u?a.bindOnly?gu.bind(this.js,s,a):gu.create(this.js,s,a):Promise.reject(new Error(`kv is only supported on servers ${d} or better`))}os(s,a={}){var p;if(typeof((p=crypto==null?void 0:crypto.subtle)==null?void 0:p.digest)!="function")return Promise.reject(new Error("objectstore: unable to calculate hashes - crypto.subtle.digest with sha256 support is required"));const o=this.js,{ok:u,min:d}=o.nc.features.get(et.JS_OBJECTSTORE);return u?mu.create(this.js,s,a):Promise.reject(new Error(`objectstore is only supported on servers ${d} or better`))}}class ey extends Nu{constructor(a,o){super(a,o);S(this,"consumers");S(this,"streams");S(this,"consumerAPI");S(this,"streamAPI");this.consumerAPI=new lh(a,o),this.streamAPI=new W0(a,o),this.consumers=new V0(this.consumerAPI),this.streams=new eO(this.streamAPI)}jetstreamManager(a){a===void 0&&(a=this.opts.checkAPI);const o=Object.assign({},this.opts,{checkAPI:a});return this.nc.jetstreamManager(o)}get apiPrefix(){return this.prefix}get views(){return new nO(this)}async publish(a,o=es,u){u=u||{},u.expect=u.expect||{};const d=(u==null?void 0:u.headers)||sr();u&&(u.msgID&&d.set(ga.MsgIdHdr,u.msgID),u.expect.lastMsgID&&d.set(ga.ExpectedLastMsgIdHdr,u.expect.lastMsgID),u.expect.streamName&&d.set(ga.ExpectedStreamHdr,u.expect.streamName),typeof u.expect.lastSequence=="number"&&d.set(ga.ExpectedLastSeqHdr,`${u.expect.lastSequence}`),typeof u.expect.lastSubjectSequence=="number"&&d.set(ga.ExpectedLastSubjectSequenceHdr,`${u.expect.lastSubjectSequence}`));const p=u.timeout||this.timeout,m={};p&&(m.timeout=p),u&&(m.headers=d);let{retries:g,retry_delay:x}=u;g=g||1,x=x||250;let _;for(let D=0;D<g;D++)try{_=await this.nc.request(a,o,m);break}catch(z){if(z.code==="503"&&D+1<g)await gl(x);else throw z}const w=this.parseJsResponse(_);if(w.stream==="")throw ge.errorForCode(ue.JetStreamInvalidAck);return w.duplicate=w.duplicate?w.duplicate:!1,w}async pull(a,o,u=0){_n(a),fl(o);let d=this.timeout;u>d&&(d=u),u=u<0?0:Et(u);const p={batch:1,no_wait:u===0,expires:u},m=await this.nc.request(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(p),{noMux:!0,timeout:d}),g=dl(m);if(g)throw g;return vu(m,this.timeout)}fetch(a,o,u={}){_n(a),fl(o);let d=null;const p=(u.max_bytes??0)>0;let m=0;const g=p?u.max_bytes:0;let x=null;const _={};if(_.batch=u.batch||1,g){const te=this.nc.features.get(et.JS_PULL_MAX_BYTES);if(!te.ok)throw new Error(`max_bytes is only supported on servers ${te.min} or better`);_.max_bytes=g}_.no_wait=u.no_wait||!1,_.no_wait&&_.expires&&(_.expires=0);const w=u.expires||0;if(w&&(_.expires=Et(w)),w===0&&_.no_wait===!1)throw new Error("expires or no_wait is required");const D=u.idle_heartbeat||0;D&&(_.idle_heartbeat=Et(D),u.delay_heartbeat===!0&&(_.idle_heartbeat=Et(D*4)));const z=new sn,q=_.batch;let F=0;z.protocolFilterFn=(te,we=!1)=>_0(te.msg)?(x==null||x.work(),!1):!0,z.dispatchedFn=te=>{if(te){if(p&&(m+=te.data.length),F++,d&&te.info.pending===0)return;(z.getPending()===1&&te.info.pending===0||q===F||g>0&&m>=g)&&z.stop()}};const Z=nr(this.nc.options.inboxPrefix),ee=this.nc.subscribe(Z,{max:u.batch,callback:(te,we)=>{te===null&&(te=dl(we)),te!==null?(d&&(d.cancel(),d=null),ET(te)?z.stop(vE(te)===null?void 0:te):z.stop(te)):(x==null||x.work(),z.received++,z.push(vu(we,this.timeout)))}});return w&&(d=pl(w),d.catch(()=>{ee.isClosed()||(ee.drain().catch(()=>{}),d=null),x&&x.cancel()})),(async()=>{try{D&&(x=new Z0(D,te=>(z.push(()=>{z.err=new ge(`${ys.IdleHeartbeatMissed}: ${te}`,ue.JetStreamIdleHeartBeat)}),!0)))}catch{}await ee.closed,d!==null&&(d.cancel(),d=null),x&&x.cancel(),z.stop()})().catch(),this.nc.publish(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(_),{reply:Z}),z}async pullSubscribe(a,o=ni()){const u=await this._processOptions(a,o);if(u.ordered)throw new Error("pull subscribers cannot be be ordered");if(u.config.deliver_subject)throw new Error("consumer info specifies deliver_subject - pull consumers cannot have deliver_subject set");const d=u.config.ack_policy;if(d===nn.None||d===nn.All)throw new Error("ack policy for pull consumers must be explicit");const p=this._buildTypedSubscriptionOpts(u),m=new iO(this,u.deliver,p);m.info=u;try{await this._maybeCreateConsumer(u)}catch(g){throw m.unsubscribe(),g}return m}async subscribe(a,o=ni()){const u=await this._processOptions(a,o);if(!u.isBind&&!u.config.deliver_subject)throw new Error("push consumer requires deliver_subject");const d=this._buildTypedSubscriptionOpts(u),p=new gE(this,u.deliver,d);p.info=u;try{await this._maybeCreateConsumer(u)}catch(m){throw p.unsubscribe(),m}return p._maybeSetupHbMonitoring(),p}async _processOptions(a,o=ni()){const u=ew(o)?o.getOpts():o;if(u.isBind=ew(o)?o.isBind:!1,u.flow_control={heartbeat_count:0,fc_count:0,consumer_restarts:0},u.ordered){if(u.ordered_consumer_sequence={stream_seq:0,delivery_seq:0},u.config.ack_policy!==nn.NotSet&&u.config.ack_policy!==nn.None)throw new ge("ordered consumer: ack_policy can only be set to 'none'",ue.ApiError);if(u.config.durable_name&&u.config.durable_name.length>0)throw new ge("ordered consumer: durable_name cannot be set",ue.ApiError);if(u.config.deliver_subject&&u.config.deliver_subject.length>0)throw new ge("ordered consumer: deliver_subject cannot be set",ue.ApiError);if(u.config.max_deliver!==void 0&&u.config.max_deliver>1)throw new ge("ordered consumer: max_deliver cannot be set",ue.ApiError);if(u.config.deliver_group&&u.config.deliver_group.length>0)throw new ge("ordered consumer: deliver_group cannot be set",ue.ApiError);u.config.deliver_subject=nr(this.nc.options.inboxPrefix),u.config.ack_policy=nn.None,u.config.max_deliver=1,u.config.flow_control=!0,u.config.idle_heartbeat=u.config.idle_heartbeat||Et(5e3),u.config.ack_wait=Et(1320*60*1e3),u.config.mem_storage=!0,u.config.num_replicas=1}if(u.config.ack_policy===nn.NotSet&&(u.config.ack_policy=nn.All),u.api=this,u.config=u.config||{},u.stream=u.stream?u.stream:await this.findStream(a),u.attached=!1,u.config.durable_name)try{const d=await this.consumerAPI.info(u.stream,u.config.durable_name);if(d){if(d.config.filter_subject&&d.config.filter_subject!==a)throw new Error("subject does not match consumer");const p=u.config.deliver_group??"";if(p===""&&d.push_bound===!0)throw new Error("duplicate subscription");const m=d.config.deliver_group??"";if(p!==m)throw m===""?new Error("durable requires no queue group"):new Error(`durable requires queue group '${m}'`);u.last=d,u.config=d.config,u.attached=!0,u.config.durable_name||(u.name=d.name)}}catch(d){if(d.code!=="404")throw d}return!u.attached&&u.config.filter_subject===void 0&&u.config.filter_subjects===void 0&&(u.config.filter_subject=a),u.deliver=u.config.deliver_subject||nr(this.nc.options.inboxPrefix),u}_buildTypedSubscriptionOpts(a){const o={};return o.adapter=oO(a.callbackFn===void 0,this.timeout),o.ingestionFilterFn=ey.ingestionFn(a.ordered),o.protocolFilterFn=(u,d=!1)=>{const p=u;return E0(p.msg)?(d||p.msg.respond(),!1):!0},!a.mack&&a.config.ack_policy!==nn.None&&(o.dispatchedFn=uO),a.callbackFn&&(o.callback=a.callbackFn),o.max=a.max||0,o.queue=a.queue,o}async _maybeCreateConsumer(a){if(a.attached)return;if(a.isBind)throw new Error(`unable to bind - durable consumer ${a.config.durable_name} doesn't exist in ${a.stream}`);a.config=Object.assign({deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:bl.Instant},a.config);const o=await this.consumerAPI.add(a.stream,a.config);if(Array.isArray(a.config.filter_subjects&&!Array.isArray(o.config.filter_subjects)))throw new Error("jetstream server doesn't support consumers with multiple filter subjects");a.name=o.name,a.config=o.config,a.last=o}static ingestionFn(a){return(o,u)=>{var g;const d=u;if(!o)return{ingest:!1,protocol:!1};const p=o;if(dl(p.msg)||(g=d.monitor)==null||g.work(),_0(p.msg)){const x=a?d._checkHbOrderConsumer(p.msg):!0;return a||d.info.flow_control.heartbeat_count++,{ingest:x,protocol:!0}}else if(E0(p.msg))return d.info.flow_control.fc_count++,{ingest:!0,protocol:!0};return{ingest:a?d._checkOrderedConsumer(o):!0,protocol:!1}}}}class ty{constructor(s){S(this,"options");S(this,"protocol");S(this,"draining");S(this,"listeners");S(this,"_services");this.draining=!1,this.options=_3(s),this.listeners=[]}static connect(s={}){return new Promise((a,o)=>{const u=new ty(s);uh.connect(u.options,u).then(d=>{u.protocol=d,(async function(){for await(const p of d.status())u.listeners.forEach(m=>{m.push(p)})})(),a(u)}).catch(d=>{o(d)})})}closed(){return this.protocol.closed}async close(){await this.protocol.close()}_check(s,a,o){if(this.isClosed())throw ge.errorForCode(ue.ConnectionClosed);if(a&&this.isDraining()||o&&this.protocol.noMorePublishing)throw ge.errorForCode(ue.ConnectionDraining);if(s=s||"",s.length===0)throw ge.errorForCode(ue.BadSubject)}publish(s,a,o){this._check(s,!1,!0),this.protocol.publish(s,a,o)}publishMessage(s){return this.publish(s.subject,s.data,{reply:s.reply,headers:s.headers})}respondMessage(s){return s.reply?(this.publish(s.reply,s.data,{reply:s.reply,headers:s.headers}),!0):!1}subscribe(s,a={}){this._check(s,!0,!1);const o=new mE(this.protocol,s,a);return this.protocol.subscribe(o),o}_resub(s,a,o){this._check(a,!0,!1);const u=s;u.max=o,o&&(u.max=o+u.received),this.protocol.resub(u,a)}requestMany(s,a=es,o={maxWait:1e3,maxMessages:-1}){const u=!this.protocol.options.noAsyncTraces;try{this._check(s,!0,!0)}catch(g){return Promise.reject(g)}if(o.strategy=o.strategy||Ms.Timer,o.maxWait=o.maxWait||1e3,o.maxWait<1)return Promise.reject(new ge("timeout",ue.InvalidOption));const d=new sn;function p(g){d.push(()=>{d.stop(g)})}function m(g,x){g||x===null?p(g===null?void 0:g):d.push(x)}if(o.noMux){const g=u?new Error().stack:null;let x=typeof o.maxMessages=="number"&&o.maxMessages>0?o.maxMessages:-1;const _=this.subscribe(nr(this.options.inboxPrefix),{callback:(q,F)=>{var Z,ee;if(((Z=F==null?void 0:F.data)==null?void 0:Z.length)===0&&((ee=F==null?void 0:F.headers)==null?void 0:ee.status)===ue.NoResponders&&(q=ge.errorForCode(ue.NoResponders)),q){g&&(q.stack+=`
|
|
265
|
+
`),s.max=a)}resub(s,a){!s||this.isClosed()||(this.unsub(s),s.subject=a,this.subscriptions.resub(s),this._sub(s))}flush(s){return s||(s=_t()),this.pongs.push(s),this.outbound.fill(uw),this.flushPending(),s}sendSubscriptions(){const s=[];this.subscriptions.all().forEach(a=>{const o=a;o.queue?s.push(`SUB ${o.subject} ${o.queue} ${o.sid}${Zd}`):s.push(`SUB ${o.subject} ${o.sid}${Zd}`)}),s.length&&this.transport.send(fu(s.join("")))}async _close(s){this._closed||(this.whyClosed=new Error("close trace").stack||"",this.heartbeats.cancel(),this.connectError&&(this.connectError(s),this.connectError=void 0),this.muxSubscriptions.close(),this.subscriptions.close(),this.listeners.forEach(a=>{a.stop()}),this._closed=!0,await this.transport.close(s),await this.closed.resolve(s))}close(){return this._close()}isClosed(){return this._closed}drain(){const s=this.subscriptions.all(),a=[];return s.forEach(o=>{a.push(o.drain())}),Promise.all(a).then(async()=>(this.noMorePublishing=!0,await this.flush(),this.close())).catch(()=>{})}flushPending(){if(!(!this.infoReceived||!this.connected)&&this.outbound.size()){const s=this.outbound.drain();this.transport.send(s)}}initMux(){if(!this.subscriptions.getMux()){const a=this.muxSubscriptions.init(this.options.inboxPrefix),o=new mE(this,`${a}*`);o.callback=this.muxSubscriptions.dispatcher(),this.subscriptions.setMux(o),this.subscribe(o)}}selectServer(){const s=this.servers.selectServer();if(s!==void 0)return this.server=s,this.server}getServer(){return this.server}}const M3="$SRV";class fw{constructor(s){S(this,"msg");this.msg=s}get data(){return this.msg.data}get sid(){return this.msg.sid}get subject(){return this.msg.subject}get reply(){return this.msg.reply||""}get headers(){return this.msg.headers}respond(s,a){return this.msg.respond(s,a)}respondError(s,a,o,u){var d,p;return u=u||{},u.headers=u.headers||sr(),(d=u.headers)==null||d.set(rh,`${s}`),(p=u.headers)==null||p.set(ah,a),this.msg.respond(o,u)}json(s){return this.msg.json(s)}string(){return this.msg.string()}}class yu{constructor(s,a="",o=""){S(this,"subject");S(this,"queue");S(this,"srv");a!==""&&V3("service group",a);let u="";if(s instanceof Su)this.srv=s,u="";else if(s instanceof yu){const d=s;this.srv=d.srv,o===""&&d.queue!==""&&(o=d.queue),u=d.subject}else throw new Error("unknown ServiceGroup type");this.subject=this.calcSubject(u,a),this.queue=o}calcSubject(s,a=""){return a===""?s:s!==""?`${s}.${a}`:a}addEndpoint(s="",a){a=a||{subject:s};const o=typeof a=="function"?{handler:a,subject:s}:a;ou("endpoint",s);let{subject:u,handler:d,metadata:p,queue:m}=o;u=u||s,m=m||this.queue,k3("endpoint subject",u),u=this.calcSubject(this.subject,u);const g={name:s,subject:u,queue:m,handler:d,metadata:p};return this.srv._addEndpoint(g)}addGroup(s="",a=""){return new yu(this,s,a)}}function k3(i,s){if(s==="")throw new Error(`${i} cannot be empty`);if(s.indexOf(" ")!==-1)throw new Error(`${i} cannot contain spaces: '${s}'`);const a=s.split(".");a.forEach((o,u)=>{if(o===">"&&u!==a.length-1)throw new Error(`${i} cannot have internal '>': '${s}'`)})}function V3(i,s){if(s.indexOf(" ")!==-1)throw new Error(`${i} cannot contain spaces: '${s}'`);s.split(".").forEach(o=>{if(o===">")throw new Error(`${i} name cannot contain internal '>': '${s}'`)})}class Su{constructor(s,a={name:"",version:""}){S(this,"nc");S(this,"_id");S(this,"config");S(this,"handlers");S(this,"internal");S(this,"_stopped");S(this,"_done");S(this,"started");this.nc=s,this.config=Object.assign({},a),this.config.queue||(this.config.queue="q"),ou("name",this.config.name),ou("queue",this.config.queue),Xi(this.config.version),this._id=ai.next(),this.internal=[],this._done=_t(),this._stopped=!1,this.handlers=[],this.started=new Date().toISOString(),this.reset(),this.nc.closed().then(()=>{this.close().catch()}).catch(o=>{this.close(o).catch()})}static controlSubject(s,a="",o="",u){const d=u??M3;return a===""&&o===""?`${d}.${s}`:(ou("control subject name",a),o!==""?(ou("control subject id",o),`${d}.${s}.${a}.${o}`):`${d}.${s}.${a}`)}get subjects(){return this.handlers.filter(s=>s.internal===!1).map(s=>s.subject)}get id(){return this._id}get name(){return this.config.name}get description(){return this.config.description??""}get version(){return this.config.version}get metadata(){return this.config.metadata}errorToHeader(s){const a=sr();if(s instanceof ih){const o=s;a.set(ah,o.message),a.set(rh,`${o.code}`)}else a.set(ah,s.message),a.set(rh,"500");return a}setupHandler(s,a=!1){const o=a?"":s.queue?s.queue:this.config.queue,{name:u,subject:d,handler:p}=s,m=s;m.internal=a,a&&this.internal.push(m),m.stats=new U3(u,d,o),m.queue=o;const g=p?(x,_)=>{if(x){this.close(x);return}const w=Date.now();try{p(x,new fw(_))}catch(D){m.stats.countError(D),_==null||_.respond(es,{headers:this.errorToHeader(D)})}finally{m.stats.countLatency(w)}}:void 0;return m.sub=this.nc.subscribe(d,{callback:g,queue:o}),m.sub.closed.then(()=>{this._stopped||this.close(new Error(`required subscription ${s.subject} stopped`)).catch()}).catch(x=>{if(!this._stopped){const _=new Error(`required subscription ${s.subject} errored: ${x.message}`);_.stack=x.stack,this.close(_).catch()}}),m}info(){return{type:du.INFO,name:this.name,id:this.id,version:this.version,description:this.description,metadata:this.metadata,endpoints:this.endpoints()}}endpoints(){return this.handlers.map(s=>{const{subject:a,metadata:o,name:u,queue:d}=s;return{subject:a,metadata:o,name:u,queue_group:d}})}async stats(){const s=[];for(const a of this.handlers){if(typeof this.config.statsHandler=="function")try{a.stats.data=await this.config.statsHandler(a)}catch(o){a.stats.countError(o)}s.push(a.stats.stats(a.qi))}return{type:du.STATS,name:this.name,id:this.id,version:this.version,started:this.started,metadata:this.metadata,endpoints:s}}addInternalHandler(s,a){const o=`${s}`.toUpperCase();this._doAddInternalHandler(`${o}-all`,s,a),this._doAddInternalHandler(`${o}-kind`,s,a,this.name),this._doAddInternalHandler(`${o}`,s,a,this.name,this.id)}_doAddInternalHandler(s,a,o,u="",d=""){const p={};p.name=s,p.subject=Su.controlSubject(a,u,d),p.handler=o,this.setupHandler(p,!0)}start(){const s=ks(),a=(p,m)=>p?(this.close(p),Promise.reject(p)):this.stats().then(g=>(m==null||m.respond(s.encode(g)),Promise.resolve())),o=(p,m)=>p?(this.close(p),Promise.reject(p)):(m==null||m.respond(s.encode(this.info())),Promise.resolve()),u=s.encode(this.ping()),d=(p,m)=>p?(this.close(p).then().catch(),Promise.reject(p)):(m.respond(u),Promise.resolve());return this.addInternalHandler(ei.PING,d),this.addInternalHandler(ei.STATS,a),this.addInternalHandler(ei.INFO,o),this.handlers.forEach(p=>{const{subject:m}=p;typeof m=="string"&&p.handler!==null&&this.setupHandler(p)}),Promise.resolve(this)}close(s){if(this._stopped)return this._done;this._stopped=!0;let a=[];return this.nc.isClosed()||(a=this.handlers.concat(this.internal).map(o=>o.sub.drain())),Promise.allSettled(a).then(()=>{this._done.resolve(s||null)}),this._done}get stopped(){return this._done}get isStopped(){return this._stopped}stop(s){return this.close(s)}ping(){return{type:du.PING,name:this.name,id:this.id,version:this.version,metadata:this.metadata}}reset(){if(this.started=new Date().toISOString(),this.handlers)for(const s of this.handlers)s.stats.reset(s.qi)}addGroup(s,a){return new yu(this,s,a)}addEndpoint(s,a){return new yu(this).addEndpoint(s,a)}_addEndpoint(s){const a=new sn;a.noIterator=typeof s.handler=="function",a.noIterator||(s.handler=(u,d)=>{u?this.stop(u).catch():a.push(new fw(d))},a.iterClosed.then(()=>{this.close().catch()}));const o=this.setupHandler(s,!1);return o.qi=a,this.handlers.push(o),a}}class U3{constructor(s,a,o=""){S(this,"name");S(this,"subject");S(this,"average_processing_time");S(this,"num_requests");S(this,"processing_time");S(this,"num_errors");S(this,"last_error");S(this,"data");S(this,"metadata");S(this,"queue");this.name=s,this.subject=a,this.average_processing_time=0,this.num_errors=0,this.num_requests=0,this.processing_time=0,this.queue=o}reset(s){this.num_requests=0,this.processing_time=0,this.average_processing_time=0,this.num_errors=0,this.last_error=void 0,this.data=void 0;const a=s;a&&(a.time=0,a.processed=0)}countLatency(s){this.num_requests++,this.processing_time+=Et(Date.now()-s),this.average_processing_time=Math.round(this.processing_time/this.num_requests)}countError(s){this.num_errors++,this.last_error=s.message}_stats(){const{name:s,subject:a,average_processing_time:o,num_errors:u,num_requests:d,processing_time:p,last_error:m,data:g,queue:x}=this;return{name:s,subject:a,average_processing_time:o,num_errors:u,num_requests:d,processing_time:p,last_error:m,data:g,queue_group:x}}stats(s){const a=s;return(a==null?void 0:a.noIterator)===!1&&(this.processing_time=Et(a.time),this.num_requests=a.processed,this.average_processing_time=this.processing_time>0&&this.num_requests>0?this.processing_time/this.num_requests:0),this._stats()}}class z3{constructor(s,a={strategy:Ms.JitterTimer,maxWait:2e3},o){S(this,"nc");S(this,"prefix");S(this,"opts");this.nc=s,this.prefix=o,this.opts=a}ping(s="",a=""){return this.q(ei.PING,s,a)}stats(s="",a=""){return this.q(ei.STATS,s,a)}info(s="",a=""){return this.q(ei.INFO,s,a)}async q(s,a="",o=""){const u=new sn,d=ks(),p=Su.controlSubject(s,a,o,this.prefix),m=await this.nc.requestMany(p,es,this.opts);return(async()=>{for await(const g of m)try{const x=d.decode(g.data);u.push(x)}catch(x){u.push(()=>{u.stop(x)})}u.push(()=>{u.stop()})})().catch(g=>{u.stop(g)}),u}}function pE(){return{key:{encode(i){return i},decode(i){return i}},value:{encode(i){return i},decode(i){return i}}}}function B3(){return{replicas:1,history:1,timeout:2e3,max_bytes:-1,maxValueSize:-1,codec:pE(),storage:C0.File}}const fh="KV-Operation",dw="$KV",q3=/^[-/=.\w]+$/,L3=/^[-/=.>*\w]+$/,H3=/^[-\w]+$/;function P3(i){if(i.startsWith(".")||i.endsWith(".")||!q3.test(i))throw new Error(`invalid key: ${i}`)}function $3(i){if(i.startsWith(".")||i.endsWith(".")||!L3.test(i))throw new Error(`invalid key: ${i}`)}function I3(i){if(i.startsWith(".")||i.endsWith("."))throw new Error(`invalid key: ${i}`);const s=i.split(".");let a=!1;for(let o=0;o<s.length;o++)switch(s[o]){case"*":a=!0;break;case">":if(o!==s.length-1)throw new Error(`invalid key: ${i}`);a=!0;break}return a}function Kd(i){if(!H3.test(i))throw new Error(`invalid bucket name: ${i}`)}var ga;(function(i){i.MsgIdHdr="Nats-Msg-Id",i.ExpectedStreamHdr="Nats-Expected-Stream",i.ExpectedLastSeqHdr="Nats-Expected-Last-Sequence",i.ExpectedLastMsgIdHdr="Nats-Expected-Last-Msg-Id",i.ExpectedLastSubjectSequenceHdr="Nats-Expected-Last-Subject-Sequence"})(ga||(ga={}));class gu{constructor(s,a,o){S(this,"js");S(this,"jsm");S(this,"stream");S(this,"bucket");S(this,"direct");S(this,"codec");S(this,"prefix");S(this,"editPrefix");S(this,"useJsPrefix");S(this,"_prefixLen");S(this,"validateKey",P3);S(this,"validateSearchKey",$3);S(this,"hasWildcards",I3);Kd(s),this.js=a,this.jsm=o,this.bucket=s,this.prefix=dw,this.editPrefix="",this.useJsPrefix=!1,this._prefixLen=0}static async create(s,a,o={}){Kd(a);const u=await s.jetstreamManager(),d=new gu(a,s,u);return await d.init(o),d}static async bind(s,a,o={}){const u=await s.jetstreamManager(),d={config:{allow_direct:o.allow_direct}};Kd(a);const p=new gu(a,s,u);return d.config.name=o.streamName??p.bucketName(),Object.assign(p,d),p.stream=d.config.name,p.codec=o.codec||pE(),p.direct=d.config.allow_direct??!1,p.initializePrefixes(d),p}async init(s={}){const a=Object.assign(B3(),s);this.codec=a.codec;const o={};this.stream=o.name=s.streamName??this.bucketName(),o.retention=D0.Limits,o.max_msgs_per_subject=a.history,a.maxBucketSize&&(a.max_bytes=a.maxBucketSize),a.max_bytes&&(o.max_bytes=a.max_bytes),o.max_msg_size=a.maxValueSize,o.storage=a.storage;const u=s.placementCluster??"";if(u&&(s.placement={},s.placement.cluster=u,s.placement.tags=[]),s.placement&&(o.placement=s.placement),s.republish&&(o.republish=s.republish),s.description&&(o.description=s.description),s.mirror){const w=Object.assign({},s.mirror);w.name.startsWith(Zn)||(w.name=`${Zn}${w.name}`),o.mirror=w,o.mirror_direct=!0}else if(s.sources){const w=s.sources.map(D=>{const z=Object.assign({},D),q=z.name.startsWith(Zn)?z.name.substring(Zn.length):z.name;return z.name.startsWith(Zn)||(z.name=`${Zn}${z.name}`),!D.external&&q!==this.bucket&&(z.subject_transforms=[{src:`$KV.${q}.>`,dest:`$KV.${this.bucket}.>`}]),z});o.sources=w,o.subjects=[this.subjectForBucket()]}else o.subjects=[this.subjectForBucket()];s.metadata&&(o.metadata=s.metadata),typeof s.compression=="boolean"&&(o.compression=s.compression?ri.S2:ri.None);const d=this.js.nc,p=d.getServerVersion(),m=p?O0(p,Xi("2.7.2"))>=0:!1;o.discard=m?bu.New:bu.Old;const{ok:g,min:x}=d.features.get(et.JS_ALLOW_DIRECT);if(!g&&s.allow_direct===!0){const w=p?`${p.major}.${p.minor}.${p.micro}`:"unknown";return Promise.reject(new Error(`allow_direct is not available on server version ${w} - requires ${x}`))}s.allow_direct=typeof s.allow_direct=="boolean"?s.allow_direct:g,o.allow_direct=s.allow_direct,this.direct=o.allow_direct,o.num_replicas=a.replicas,a.ttl&&(o.max_age=Et(a.ttl)),o.allow_rollup_hdrs=!0;let _;try{_=await this.jsm.streams.info(o.name),!_.config.allow_direct&&this.direct===!0&&(this.direct=!1)}catch(w){if(w.message==="stream not found")_=await this.jsm.streams.add(o);else throw w}this.initializePrefixes(_)}initializePrefixes(s){this._prefixLen=0,this.prefix=`$KV.${this.bucket}`,this.useJsPrefix=this.js.apiPrefix!=="$JS.API";const{mirror:a}=s.config;if(a){let o=a.name;if(o.startsWith(Zn)&&(o=o.substring(Zn.length)),a.external&&a.external.api!==""){const u=a.name.substring(Zn.length);this.useJsPrefix=!1,this.prefix=`$KV.${u}`,this.editPrefix=`${a.external.api}.$KV.${o}`}else this.editPrefix=this.prefix}}bucketName(){return this.stream??`${Zn}${this.bucket}`}subjectForBucket(){return`${this.prefix}.${this.bucket}.>`}subjectForKey(s,a=!1){const o=[];return a?(this.useJsPrefix&&o.push(this.js.apiPrefix),this.editPrefix!==""?o.push(this.editPrefix):o.push(this.prefix)):this.prefix&&o.push(this.prefix),o.push(s),o.join(".")}fullKeyName(s){return this.prefix!==""?`${this.prefix}.${s}`:`${dw}.${this.bucket}.${s}`}get prefixLen(){return this._prefixLen===0&&(this._prefixLen=this.prefix.length+1),this._prefixLen}encodeKey(s){const a=[];for(const o of s.split("."))switch(o){case">":case"*":a.push(o);break;default:a.push(this.codec.key.encode(o));break}return a.join(".")}decodeKey(s){const a=[];for(const o of s.split("."))switch(o){case">":case"*":a.push(o);break;default:a.push(this.codec.key.decode(o));break}return a.join(".")}close(){return Promise.resolve()}dataLen(s,a){const o=a&&a.get(Dn.MessageSizeHdr)||"";return o!==""?parseInt(o,10):s.length}smToEntry(s){return new rO(this.bucket,this.prefixLen,s)}jmToEntry(s){const a=this.decodeKey(s.subject.substring(this.prefixLen));return new iO(this.bucket,a,s)}async create(s,a){var d;let o;try{const p=await this.put(s,a,{previousSeq:0});return Promise.resolve(p)}catch(p){if(o=p,((d=p==null?void 0:p.api_error)==null?void 0:d.err_code)!==10071)return Promise.reject(p)}let u=0;try{const p=await this.get(s);return(p==null?void 0:p.operation)==="DEL"||(p==null?void 0:p.operation)==="PURGE"?(u=p!==null?p.revision:0,this.update(s,a,u)):Promise.reject(o)}catch(p){return Promise.reject(p)}}update(s,a,o){if(o<=0)throw new Error("version must be greater than 0");return this.put(s,a,{previousSeq:o})}async put(s,a,o={}){var p,m;const u=this.encodeKey(s);this.validateKey(u);const d={};if(o.previousSeq!==void 0){const g=sr();d.headers=g,g.set(ga.ExpectedLastSubjectSequenceHdr,`${o.previousSeq}`)}try{return(await this.js.publish(this.subjectForKey(u,!0),a,d)).seq}catch(g){const x=g;return x.isJetStreamError()?(x.message=(p=x.api_error)==null?void 0:p.description,x.code=`${(m=x.api_error)==null?void 0:m.code}`,Promise.reject(x)):Promise.reject(g)}}async get(s,a){const o=this.encodeKey(s);this.validateKey(o);let u={last_by_subj:this.subjectForKey(o)};a&&a.revision>0&&(u={seq:a.revision});let d;try{this.direct?d=await this.jsm.direct.getMessage(this.bucketName(),u):d=await this.jsm.streams.getMessage(this.bucketName(),u);const p=this.smToEntry(d);return p.key!==o?null:p}catch(p){if(p.code===ue.JetStream404NoMessages)return null;throw p}}purge(s,a){return this._deleteOrPurge(s,"PURGE",a)}delete(s,a){return this._deleteOrPurge(s,"DEL",a)}async purgeDeletes(s=1800*1e3){const a=_t(),o=[],u=await this.watch({key:">",initializedFn:()=>{a.resolve()}});(async()=>{for await(const g of u)(g.operation==="DEL"||g.operation==="PURGE")&&o.push(g)})().then(),await a,u.stop();const d=Date.now()-s,p=o.map(g=>{const x=this.subjectForKey(g.key);return g.created.getTime()>=d?this.jsm.streams.purge(this.stream,{filter:x,keep:1}):this.jsm.streams.purge(this.stream,{filter:x,keep:0})}),m=await Promise.all(p);return m.unshift({success:!0,purged:0}),m.reduce((g,x)=>(g.purged+=x.purged,g))}async _deleteOrPurge(s,a,o){if(!this.hasWildcards(s))return this._doDeleteOrPurge(s,a,o);const u=await this.keys(s),d=[];for await(const p of u)d.push(this._doDeleteOrPurge(p,a)),d.length===100&&(await Promise.all(d),d.length=0);d.length>0&&await Promise.all(d)}async _doDeleteOrPurge(s,a,o){const u=this.encodeKey(s);this.validateKey(u);const d=sr();d.set(fh,a),a==="PURGE"&&d.set(Dn.RollupHdr,Dn.RollupValueSubject),o!=null&&o.previousSeq&&d.set(ga.ExpectedLastSubjectSequenceHdr,`${o.previousSeq}`),await this.js.publish(this.subjectForKey(u,!0),es,{headers:d})}_buildCC(s,a,o={}){let d=(Array.isArray(s)?s:[s]).map(g=>{const x=this.encodeKey(g);return this.validateSearchKey(g),this.fullKeyName(x)}),p=Vt.LastPerSubject;a===Rs.AllHistory&&(p=Vt.All),a===Rs.UpdatesOnly&&(p=Vt.New);let m;return d.length===1&&(m=d[0],d=void 0),Object.assign({deliver_policy:p,ack_policy:nn.None,filter_subjects:d,filter_subject:m,flow_control:!0,idle_heartbeat:Et(5*1e3)},o)}remove(s){return this.purge(s)}async history(s={}){const a=s.key??">",o=new sn,u={};u.headers_only=s.headers_only||!1;let d;d=()=>{o.stop()};let p=0;const m=this._buildCC(a,Rs.AllHistory,u),g=m.filter_subject,x=ni(m);x.bindStream(this.stream),x.orderedConsumer(),x.callback((w,D)=>{if(w){o.stop(w);return}if(D){const z=this.jmToEntry(D);o.push(z),o.received++,(d&&p>0&&o.received>=p||D.info.pending===0)&&(o.push(d),d=void 0)}});const _=await this.js.subscribe(g,x);if(d){const{info:{last:w}}=_,D=w.num_pending+w.delivered.consumer_seq;if(D===0||o.received>=D)try{d()}catch(z){o.stop(z)}finally{d=void 0}else p=D}return o._data=_,o.iterClosed.then(()=>{_.unsubscribe()}),_.closed.then(()=>{o.stop()}).catch(w=>{o.stop(w)}),o}canSetWatcherName(){const a=this.js.nc,{ok:o}=a.features.get(et.JS_NEW_CONSUMER_CREATE_API);return o}async watch(s={}){const a=s.key??">",o=new sn,u={};u.headers_only=s.headers_only||!1;let d=Rs.LastValue;s.include===Rs.AllHistory?d=Rs.AllHistory:s.include===Rs.UpdatesOnly&&(d=Rs.UpdatesOnly);const p=s.ignoreDeletes===!0;let m=s.initializedFn,g=0;const x=this._buildCC(a,d,u),_=x.filter_subject,w=ni(x);this.canSetWatcherName()&&w.consumerName(ai.next()),w.bindStream(this.stream),s.resumeFromRevision&&s.resumeFromRevision>0&&w.startSequence(s.resumeFromRevision),w.orderedConsumer(),w.callback((z,q)=>{if(z){o.stop(z);return}if(q){const Y=this.jmToEntry(q);if(p&&Y.operation==="DEL")return;o.push(Y),o.received++,m&&(g>0&&o.received>=g||q.info.pending===0)&&(o.push(m),m=void 0)}});const D=await this.js.subscribe(_,w);if(m){const{info:{last:z}}=D,q=z.num_pending+z.delivered.consumer_seq;if(q===0||o.received>=q)try{m()}catch(Y){o.stop(Y)}finally{m=void 0}else g=q}return o._data=D,o.iterClosed.then(()=>{D.unsubscribe()}),D.closed.then(()=>{o.stop()}).catch(z=>{o.stop(z)}),o}async keys(s=">"){const a=new sn,o=this._buildCC(s,Rs.LastValue,{headers_only:!0}),u=Array.isArray(s)?">":o.filter_subject,d=ni(o);d.bindStream(this.stream),d.orderedConsumer();const p=await this.js.subscribe(u,d);return(async()=>{var g;for await(const x of p){const _=(g=x.headers)==null?void 0:g.get(fh);if(_!=="DEL"&&_!=="PURGE"){const w=this.decodeKey(x.subject.substring(this.prefixLen));a.push(w)}x.info.pending===0&&p.unsubscribe()}})().then(()=>{a.stop()}).catch(g=>{a.stop(g)}),p.info.last.num_pending===0&&p.unsubscribe(),a}purgeBucket(s){return this.jsm.streams.purge(this.bucketName(),s)}destroy(){return this.jsm.streams.delete(this.bucketName())}async status(){var d;const a=((d=this.js.nc.info)==null?void 0:d.cluster)??"",o=this.bucketName(),u=await this.jsm.streams.info(o);return new bE(u,a)}}class bE{constructor(s,a=""){S(this,"si");S(this,"cluster");this.si=s,this.cluster=a}get bucket(){return this.si.config.name.startsWith(Zn)?this.si.config.name.substring(Zn.length):this.si.config.name}get values(){return this.si.state.messages}get history(){return this.si.config.max_msgs_per_subject}get ttl(){return X0(this.si.config.max_age)}get bucket_location(){return this.cluster}get backingStore(){return this.si.config.storage}get storage(){return this.si.config.storage}get replicas(){return this.si.config.num_replicas}get description(){return this.si.config.description??""}get maxBucketSize(){return this.si.config.max_bytes}get maxValueSize(){return this.si.config.max_msg_size}get max_bytes(){return this.si.config.max_bytes}get placement(){return this.si.config.placement||{cluster:"",tags:[]}}get placementCluster(){var s;return((s=this.si.config.placement)==null?void 0:s.cluster)??""}get republish(){return this.si.config.republish??{src:"",dest:""}}get streamInfo(){return this.si}get size(){return this.si.state.bytes}get metadata(){return this.si.config.metadata??{}}get compression(){return this.si.config.compression?this.si.config.compression!==ri.None:!1}}const W0="OBJ_",hw="SHA-256=";function F3(i){return Kd(i),`${W0}${i}`}function Y3(i){return i.startsWith(W0)?i.substring(4):i}class k0{constructor(s){S(this,"si");S(this,"backingStore");this.si=s,this.backingStore="JetStream"}get bucket(){return Y3(this.si.config.name)}get description(){return this.si.config.description??""}get ttl(){return this.si.config.max_age}get storage(){return this.si.config.storage}get replicas(){return this.si.config.num_replicas}get sealed(){return this.si.config.sealed}get size(){return this.si.state.bytes}get streamInfo(){return this.si}get metadata(){return this.si.config.metadata}get compression(){return this.si.config.compression?this.si.config.compression!==ri.None:!1}}function Id(i){if(i===void 0)return;const{domain:s}=i;if(s===void 0)return i;const a=Object.assign({},i);if(delete a.domain,s==="")return a;if(a.external)throw new Error("domain and external are both set");return a.external={api:`$JS.${s}.API`},a}var bs;(function(i){i[i.Unset=-1]="Unset",i[i.Consume=0]="Consume",i[i.Fetch=1]="Fetch"})(bs||(bs={}));var va;(function(i){i.HeartbeatsMissed="heartbeats_missed",i.ConsumerNotFound="consumer_not_found",i.StreamNotFound="stream_not_found",i.ConsumerDeleted="consumer_deleted",i.OrderedConsumerRecreated="ordered_consumer_recreated",i.NoResponders="no_responders"})(va||(va={}));var ml;(function(i){i.DebugEvent="debug",i.Discard="discard",i.Reset="reset",i.Next="next"})(ml||(ml={}));const mw=Uint8Array.of(43,65,67,75),J3=Uint8Array.of(45,78,65,75),su=Uint8Array.of(43,87,80,73),G3=Uint8Array.of(43,78,88,84),Q3=Uint8Array.of(43,84,69,82,77),X3=Uint8Array.of(32);function vu(i,s=5e3){return new hO(i,s)}class d0 extends sn{constructor(a,o,u=!1){super();S(this,"consumer");S(this,"opts");S(this,"sub");S(this,"monitor");S(this,"pending");S(this,"inbox");S(this,"refilling");S(this,"pong");S(this,"callback");S(this,"timeout");S(this,"cleanupHandler");S(this,"listeners");S(this,"statusIterator");S(this,"forOrderedConsumer");S(this,"resetHandler");S(this,"abortOnMissingResource");S(this,"bind");S(this,"inBackOff");this.consumer=a;const d=o;this.opts=this.parseOptions(o,u),this.callback=d.callback||null,this.noIterator=typeof this.callback=="function",this.monitor=null,this.pong=null,this.pending={msgs:0,bytes:0,requests:0},this.refilling=u,this.timeout=null,this.inbox=nr(a.api.nc.options.inboxPrefix),this.listeners=[],this.forOrderedConsumer=!1,this.abortOnMissingResource=d.abort_on_missing_resource===!0,this.bind=d.bind===!0,this.inBackOff=!1,this.start()}start(){const{max_messages:a,max_bytes:o,idle_heartbeat:u,threshold_bytes:d,threshold_messages:p}=this.opts;this.closed().then(g=>{if(this.cleanupHandler)try{this.cleanupHandler(g)}catch{}});const{sub:m}=this;m&&m.unsubscribe(),this.sub=this.consumer.api.nc.subscribe(this.inbox,{callback:(g,x)=>{var w,D,z,q;if(g){this.stop(g);return}if((w=this.monitor)==null||w.work(),x.subject===this.inbox){if(A0(x))return;const Y=(D=x.headers)==null?void 0:D.code,Z=((q=(z=x.headers)==null?void 0:z.description)==null?void 0:q.toLowerCase())||"unknown",{msgsLeft:ee,bytesLeft:te}=this.parseDiscard(x.headers);if(ee>0||te>0)this.pending.msgs-=ee,this.pending.bytes-=te,this.pending.requests--,this.notify(ml.Discard,{msgsLeft:ee,bytesLeft:te});else if(Y===400){this.stop(new ge(Z,`${Y}`));return}else if(Y===409&&Z==="consumer deleted"){if(this.notify(va.ConsumerDeleted,`${Y} ${Z}`),!this.refilling||this.abortOnMissingResource){const we=new ge(Z,`${Y}`);this.stop(we);return}}else if(Y===503){if(this.notify(va.NoResponders,`${Y} No Responders`),!this.refilling||this.abortOnMissingResource){const we=new ge("no responders",`${Y}`);this.stop(we);return}}else this.notify(ml.DebugEvent,`${Y} ${Z}`)}else this._push(vu(x,this.consumer.api.timeout)),this.received++,this.pending.msgs&&this.pending.msgs--,this.pending.bytes&&(this.pending.bytes-=x.size());if(this.pending.msgs===0&&this.pending.bytes===0&&(this.pending.requests=0),this.refilling){if(a&&this.pending.msgs<=p||o&&this.pending.bytes<=d){const Y=this.pullOptions();this.pull(Y)}}else this.pending.requests===0&&this._push(()=>{this.stop()})}}),this.sub.closed.then(()=>{this.sub.draining&&this._push(()=>{this.stop()})}),u&&(this.monitor=new K0(u,g=>(this.notify(va.HeartbeatsMissed,g),this.resetPending().then(()=>{}).catch(()=>{}),!1),{maxOut:2})),(async()=>{var x;const g=this.consumer.api.nc.status();this.statusIterator=g;for await(const _ of g)switch(_.type){case tr.Disconnect:(x=this.monitor)==null||x.cancel();break;case tr.Reconnect:this.resetPending().then(w=>{var D;w&&((D=this.monitor)==null||D.restart())}).catch(()=>{});break}})(),this.pull(this.pullOptions())}_push(a){if(!this.callback)super.push(a);else{const o=typeof a=="function"?a:null;try{o?o():this.callback(a)}catch(u){this.stop(u)}}}notify(a,o){this.listeners.length>0&&this.listeners.forEach(u=>{u.done||u.push({type:a,data:o})})}resetPending(){return this.bind?this.resetPendingNoInfo():this.resetPendingWithInfo()}resetPendingNoInfo(){return this.pending.msgs=0,this.pending.bytes=0,this.pending.requests=0,this.pull(this.pullOptions()),Promise.resolve(!0)}async resetPendingWithInfo(){if(this.inBackOff)return!1;let a=0,o=0;const u=Q0([this.opts.expires]);let d=0;for(;;){if(this.done)return!1;if(this.consumer.api.nc.isClosed())return console.error("aborting resetPending - connection is closed"),!1;try{return await this.consumer.info(),this.inBackOff=!1,a=0,this.pending.msgs=0,this.pending.bytes=0,this.pending.requests=0,this.pull(this.pullOptions()),!0}catch(p){if(p.message==="stream not found"){if(o++,this.notify(va.StreamNotFound,o),!this.refilling||this.abortOnMissingResource)return this.stop(p),!1}else if(p.message==="consumer not found"){if(a++,this.notify(va.ConsumerNotFound,a),this.resetHandler)try{this.resetHandler()}catch{}if(!this.refilling||this.abortOnMissingResource)return this.stop(p),!1;if(this.forOrderedConsumer)return!1}else a=0,o=0;this.inBackOff=!0;const m=u.backoff(d),g=gl(m);await Promise.race([g,this.consumer.api.nc.closed()]),g.cancel(),d++}}}pull(a){this.pending.bytes+=a.max_bytes??0,this.pending.msgs+=a.batch??0,this.pending.requests++;const o=this.consumer.api.nc;this._push(()=>{o.publish(`${this.consumer.api.prefix}.CONSUMER.MSG.NEXT.${this.consumer.stream}.${this.consumer.name}`,this.consumer.api.jc.encode(a),{reply:this.inbox}),this.notify(ml.Next,a)})}pullOptions(){const a=this.opts.max_messages-this.pending.msgs,o=this.opts.max_bytes-this.pending.bytes,u=Et(this.opts.idle_heartbeat),d=Et(this.opts.expires);return{batch:a,max_bytes:o,idle_heartbeat:u,expires:d}}parseDiscard(a){const o={msgsLeft:0,bytesLeft:0},u=a==null?void 0:a.get(Dn.PendingMessagesHdr);u&&(o.msgsLeft=parseInt(u));const d=a==null?void 0:a.get(Dn.PendingBytesHdr);return d&&(o.bytesLeft=parseInt(d)),o}trackTimeout(a){this.timeout=a}close(){return this.stop(),this.iterClosed}closed(){return this.iterClosed}clearTimers(){var a,o;(a=this.monitor)==null||a.cancel(),this.monitor=null,(o=this.timeout)==null||o.cancel(),this.timeout=null}setCleanupHandler(a){this.cleanupHandler=a}stop(a){var o,u;this.done||((o=this.sub)==null||o.unsubscribe(),this.clearTimers(),(u=this.statusIterator)==null||u.stop(),this._push(()=>{super.stop(a),this.listeners.forEach(d=>{d.stop()})}))}parseOptions(a,o=!1){const u=a||{};if(u.max_messages=u.max_messages||0,u.max_bytes=u.max_bytes||0,u.max_messages!==0&&u.max_bytes!==0)throw new Error("only specify one of max_messages or max_bytes");if(u.max_messages===0&&(u.max_messages=100),u.expires=u.expires||3e4,u.expires<1e3)throw new Error("expires should be at least 1000ms");if(u.idle_heartbeat=u.idle_heartbeat||u.expires/2,u.idle_heartbeat=u.idle_heartbeat>3e4?3e4:u.idle_heartbeat,o){const d=Math.round(u.max_messages*.75)||1;u.threshold_messages=u.threshold_messages||d;const p=Math.round(u.max_bytes*.75)||1;u.threshold_bytes=u.threshold_bytes||p}return u}status(){const a=new sn;return this.listeners.push(a),Promise.resolve(a)}}class Z3 extends sn{constructor(){super();S(this,"src");S(this,"listeners");this.listeners=[]}setSource(a){this.src&&(this.src.resetHandler=void 0,this.src.setCleanupHandler(),this.src.stop()),this.src=a,this.src.setCleanupHandler(o=>{this.stop(o||void 0)}),(async()=>{const o=await this.src.status();for await(const u of o)this.notify(u.type,u.data)})().catch(()=>{})}notify(a,o){this.listeners.length>0&&this.listeners.forEach(u=>{u.done||u.push({type:a,data:o})})}stop(a){var o;this.done||((o=this.src)==null||o.stop(a),super.stop(a),this.listeners.forEach(u=>{u.stop()}))}close(){return this.stop(),this.iterClosed}closed(){return this.iterClosed}status(){const a=new sn;return this.listeners.push(a),Promise.resolve(a)}}class V0{constructor(s,a){S(this,"api");S(this,"_info");S(this,"stream");S(this,"name");this.api=s,this._info=a,this.stream=a.stream_name,this.name=a.name}consume(s={max_messages:100,expires:3e4}){return Promise.resolve(new d0(this,s,!0))}fetch(s={max_messages:100,expires:3e4}){const a=new d0(this,s,!1),o=Math.round(a.opts.expires*1.05),u=pl(o);return a.closed().catch(()=>{}).finally(()=>{u.cancel()}),u.catch(()=>{a.close().catch()}),a.trackTimeout(u),Promise.resolve(a)}next(s={expires:3e4}){const a=_t(),o=s;o.max_messages=1;const u=new d0(this,o,!1),d=Math.round(u.opts.expires*1.05);d>=6e4&&(async()=>{for await(const m of await u.status())if(m.type===va.HeartbeatsMissed&&m.data>=2){a.reject(new Error("consumer missed heartbeats"));break}})().catch(),(async()=>{for await(const m of u){a.resolve(m);break}})().catch(()=>{});const p=pl(d);return u.closed().then(m=>{m?a.reject(m):a.resolve(null)}).catch(m=>{a.reject(m)}).finally(()=>{p.cancel()}),p.catch(m=>{a.resolve(null),u.close().catch()}),u.trackTimeout(p),a}delete(){const{stream_name:s,name:a}=this._info;return this.api.delete(s,a)}info(s=!1){if(s)return Promise.resolve(this._info);const{stream_name:a,name:o}=this._info;return this.api.info(a,o).then(u=>(this._info=u,this._info))}}class K3{constructor(s,a,o={}){S(this,"api");S(this,"consumerOpts");S(this,"consumer");S(this,"opts");S(this,"cursor");S(this,"stream");S(this,"namePrefix");S(this,"serial");S(this,"currentConsumer");S(this,"userCallback");S(this,"iter");S(this,"type");S(this,"startSeq");S(this,"maxInitialReset");this.api=s,this.stream=a,this.cursor={stream_seq:1,deliver_seq:0},this.namePrefix=ai.next(),typeof o.name_prefix=="string"&&(bh("name_prefix",o.name_prefix),this.namePrefix=o.name_prefix+this.namePrefix),this.serial=0,this.currentConsumer=null,this.userCallback=null,this.iter=null,this.type=bs.Unset,this.consumerOpts=o,this.maxInitialReset=30,this.startSeq=this.consumerOpts.opt_start_seq||0,this.cursor.stream_seq=this.startSeq>0?this.startSeq-1:0}getConsumerOpts(s){this.serial++;const a=`${this.namePrefix}_${this.serial}`;s=s===0?1:s;const o={name:a,deliver_policy:Vt.StartSequence,opt_start_seq:s,ack_policy:nn.None,inactive_threshold:Et(300*1e3),num_replicas:1};return this.consumerOpts.headers_only===!0&&(o.headers_only=!0),Array.isArray(this.consumerOpts.filterSubjects)&&(o.filter_subjects=this.consumerOpts.filterSubjects),typeof this.consumerOpts.filterSubjects=="string"&&(o.filter_subject=this.consumerOpts.filterSubjects),this.consumerOpts.replay_policy&&(o.replay_policy=this.consumerOpts.replay_policy),s===this.startSeq+1&&(o.deliver_policy=this.consumerOpts.deliver_policy||Vt.StartSequence,(this.consumerOpts.deliver_policy===Vt.LastPerSubject||this.consumerOpts.deliver_policy===Vt.New||this.consumerOpts.deliver_policy===Vt.Last)&&(delete o.opt_start_seq,o.deliver_policy=this.consumerOpts.deliver_policy),o.deliver_policy===Vt.LastPerSubject&&typeof o.filter_subjects>"u"&&typeof o.filter_subject>"u"&&(o.filter_subject=">"),this.consumerOpts.opt_start_time&&(delete o.opt_start_seq,o.deliver_policy=Vt.StartTime,o.opt_start_time=this.consumerOpts.opt_start_time),this.consumerOpts.inactive_threshold&&(o.inactive_threshold=Et(this.consumerOpts.inactive_threshold))),o}async resetConsumer(s=0){var p,m,g,x,_;ai.next();const a=this.serial===0;(p=this.consumer)==null||p.delete().catch(()=>{}),s=s===0?1:s,this.cursor.deliver_seq=0;const o=this.getConsumerOpts(s);o.max_deliver=1,o.mem_storage=!0;const u=Q0([((m=this.opts)==null?void 0:m.expires)||3e4]);let d;for(let w=0;;w++)try{d=await this.api.add(this.stream,o),(g=this.iter)==null||g.notify(va.OrderedConsumerRecreated,d.name);break}catch(D){if(D.message==="stream not found"&&((x=this.iter)==null||x.notify(va.StreamNotFound,w),this.type===bs.Fetch||this.opts.abort_on_missing_resource===!0))return(_=this.iter)==null||_.stop(D),Promise.reject(D);if(a&&w>=this.maxInitialReset)throw D;await gl(u.backoff(w+1))}return d}internalHandler(s){return a=>{var u;if(this.serial!==s)return;const o=a.info.deliverySequence;if(o!==this.cursor.deliver_seq+1){this.notifyOrderedResetAndReset();return}this.cursor.deliver_seq=o,this.cursor.stream_seq=a.info.streamSequence,this.userCallback?this.userCallback(a):(u=this.iter)==null||u.push(a)}}async reset(s={max_messages:100,expires:3e4},a){var g,x;a=a||{};const o=a.fromFetch||!1,u=a.orderedReset||!1;if(this.type===bs.Fetch&&u){(g=this.iter)==null||g.src.stop(),await((x=this.iter)==null?void 0:x.closed()),this.currentConsumer=null;return}(this.currentConsumer===null||u)&&(this.currentConsumer=await this.resetConsumer(this.cursor.stream_seq+1)),(this.iter===null||o)&&(this.iter=new Z3),this.consumer=new V0(this.api,this.currentConsumer);const d=s;d.callback=this.internalHandler(this.serial);let p=null;this.type===bs.Fetch&&o?p=await this.consumer.fetch(s):this.type===bs.Consume&&(p=await this.consumer.consume(s));const m=p;m.forOrderedConsumer=!0,m.resetHandler=()=>{this.notifyOrderedResetAndReset()},this.iter.setSource(m)}notifyOrderedResetAndReset(){var s;(s=this.iter)==null||s.notify(ml.Reset,""),this.reset(this.opts,{orderedReset:!0})}async consume(s={max_messages:100,expires:3e4}){if(s.bind)return Promise.reject(new Error("bind is not supported"));if(this.type===bs.Fetch)return Promise.reject(new Error("ordered consumer initialized as fetch"));if(this.type===bs.Consume)return Promise.reject(new Error("ordered consumer doesn't support concurrent consume"));const{callback:o}=s;return o&&(this.userCallback=o),this.type=bs.Consume,this.opts=s,await this.reset(s),this.iter}async fetch(s={max_messages:100,expires:3e4}){var u;if(s.bind)return Promise.reject(new Error("bind is not supported"));if(this.type===bs.Consume)return Promise.reject(new Error("ordered consumer already initialized as consume"));if(((u=this.iter)==null?void 0:u.done)===!1)return Promise.reject(new Error("ordered consumer doesn't support concurrent fetch"));const{callback:o}=s;return o&&(this.userCallback=o),this.type=bs.Fetch,this.opts=s,await this.reset(s,{fromFetch:!0}),this.iter}async next(s={expires:3e4}){const a=s;if(a.bind)return Promise.reject(new Error("bind is not supported"));a.max_messages=1;const o=_t();return a.callback=d=>{this.userCallback=null,o.resolve(d)},(await this.fetch(a)).iterClosed.then(d=>{d&&o.reject(d),o.resolve(null)}).catch(d=>{o.reject(d)}),o}delete(){return this.currentConsumer?this.api.delete(this.stream,this.currentConsumer.name).then(s=>Promise.resolve(s)).catch(s=>Promise.reject(s)).finally(()=>{this.currentConsumer=null}):Promise.resolve(!1)}async info(s){return this.currentConsumer==null?(this.currentConsumer=await this.resetConsumer(this.startSeq),Promise.resolve(this.currentConsumer)):s&&this.currentConsumer?Promise.resolve(this.currentConsumer):this.api.info(this.stream,this.currentConsumer.name)}}class U0{constructor(s){S(this,"api");S(this,"notified");this.api=s,this.notified=!1}checkVersion(){const s=this.api.nc.features.get(et.JS_SIMPLIFICATION);return s.ok?Promise.resolve():Promise.reject(new Error(`consumers framework is only supported on servers ${s.min} or better`))}getPullConsumerFor(s){if(s.config.deliver_subject!==void 0)throw new Error("push consumer not supported");return new V0(this.api,s)}async get(s,a={}){return typeof a=="object"?this.ordered(s,a):(await this.checkVersion(),this.api.info(s,a).then(o=>o.config.deliver_subject!==void 0?Promise.reject(new Error("push consumer not supported")):new V0(this.api,o)).catch(o=>Promise.reject(o)))}async ordered(s,a){await this.checkVersion();const o=this.api;return new ey(o.nc,o.opts).info(s).then(d=>Promise.resolve(new K3(this.api,s,a))).catch(d=>Promise.reject(d))}}class gh{constructor(s,a){S(this,"api");S(this,"_info");this.api=s,this._info=a}get name(){return this._info.config.name}alternates(){return this.info().then(s=>s.alternates?s.alternates:[])}async best(){if(await this.info(),this._info.alternates){const s=await this.api.info(this._info.alternates[0].name);return new gh(this.api,s)}else return this}info(s=!1,a){return s?Promise.resolve(this._info):this.api.info(this.name,a).then(o=>(this._info=o,this._info))}getConsumerFromInfo(s){return new U0(new lh(this.api.nc,this.api.opts)).getPullConsumerFor(s)}getConsumer(s){return new U0(new lh(this.api.nc,this.api.opts)).get(this.name,s)}getMessage(s){return this.api.getMessage(this.name,s)}deleteMessage(s,a){return this.api.deleteMessage(this.name,s,a)}}class ey extends Nu{constructor(s,a){super(s,a)}checkStreamConfigVersions(s){const a=this.nc;if(s.metadata){const{min:u,ok:d}=a.features.get(et.JS_STREAM_CONSUMER_METADATA);if(!d)throw new Error(`stream 'metadata' requires server ${u}`)}if(s.first_seq){const{min:u,ok:d}=a.features.get(et.JS_STREAM_FIRST_SEQ);if(!d)throw new Error(`stream 'first_seq' requires server ${u}`)}if(s.subject_transform){const{min:u,ok:d}=a.features.get(et.JS_STREAM_SUBJECT_TRANSFORM);if(!d)throw new Error(`stream 'subject_transform' requires server ${u}`)}if(s.compression){const{min:u,ok:d}=a.features.get(et.JS_STREAM_COMPRESSION);if(!d)throw new Error(`stream 'compression' requires server ${u}`)}if(s.consumer_limits){const{min:u,ok:d}=a.features.get(et.JS_DEFAULT_CONSUMER_LIMITS);if(!d)throw new Error(`stream 'consumer_limits' requires server ${u}`)}function o(u,d){var m;if((((m=d==null?void 0:d.subject_transforms)==null?void 0:m.length)||0)>0){const{min:g,ok:x}=a.features.get(et.JS_STREAM_SOURCE_SUBJECT_TRANSFORM);if(!x)throw new Error(`${u} 'subject_transforms' requires server ${g}`)}}s.sources&&s.sources.forEach(u=>{o("stream sources",u)}),s.mirror&&o("stream mirror",s.mirror)}async add(s={}){var u;this.checkStreamConfigVersions(s),_n(s.name),s.mirror=Id(s.mirror),s.sources=(u=s.sources)==null?void 0:u.map(Id);const o=await this._request(`${this.prefix}.STREAM.CREATE.${s.name}`,s);return this._fixInfo(o),o}async delete(s){return _n(s),(await this._request(`${this.prefix}.STREAM.DELETE.${s}`)).success}async update(s,a={}){var m;if(typeof s=="object"){const g=s;s=g.name,a=g,console.trace("\x1B[33m >> streams.update(config: StreamConfig) api changed to streams.update(name: string, config: StreamUpdateConfig) - this shim will be removed - update your code. \x1B[0m")}this.checkStreamConfigVersions(a),_n(s);const o=await this.info(s),u=Object.assign(o.config,a);u.mirror=Id(u.mirror),u.sources=(m=u.sources)==null?void 0:m.map(Id);const p=await this._request(`${this.prefix}.STREAM.UPDATE.${s}`,u);return this._fixInfo(p),p}async info(s,a){_n(s);const o=`${this.prefix}.STREAM.INFO.${s}`;let d=await this._request(o,a),{total:p,limit:m}=d,g=d.state.subjects?Object.getOwnPropertyNames(d.state.subjects).length:1;if(p&&p>g){const x=[d],_=a||{};let w=0;for(;p>g;){w++,_.offset=m*w;const z=await this._request(o,_);p=z.total,x.push(z);const q=Object.getOwnPropertyNames(z.state.subjects).length;if(g+=q,q<m)break}let D={};for(let z=0;z<x.length;z++)d=x[z],d.state.subjects&&(D=Object.assign(D,d.state.subjects));d.offset=0,d.total=0,d.limit=0,d.state.subjects=D}return this._fixInfo(d),d}list(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>{const p=d;return p.streams.forEach(m=>{this._fixInfo(m)}),p.streams},u=`${this.prefix}.STREAM.LIST`;return new lu(u,o,this,a)}_fixInfo(s){s.config.sealed=s.config.sealed||!1,s.config.deny_delete=s.config.deny_delete||!1,s.config.deny_purge=s.config.deny_purge||!1,s.config.allow_rollup_hdrs=s.config.allow_rollup_hdrs||!1}async purge(s,a){if(a){const{keep:u,seq:d}=a;if(typeof u=="number"&&typeof d=="number")throw new Error("can specify one of keep or seq")}return _n(s),await this._request(`${this.prefix}.STREAM.PURGE.${s}`,a)}async deleteMessage(s,a,o=!0){_n(s);const u={seq:a};return o||(u.no_erase=!0),(await this._request(`${this.prefix}.STREAM.MSG.DELETE.${s}`,u)).success}async getMessage(s,a){_n(s);const u=await this._request(`${this.prefix}.STREAM.MSG.GET.${s}`,a);return new yE(u)}find(s){return this.findStream(s)}listKvs(){const s=o=>{var g;const d=o.streams.filter(x=>x.config.name.startsWith(Zn));d.forEach(x=>{this._fixInfo(x)});let p="";return d.length&&(p=((g=this.nc.info)==null?void 0:g.cluster)??""),d.map(x=>new bE(x,p))},a=`${this.prefix}.STREAM.LIST`;return new lu(a,s,this)}listObjectStores(){const s=o=>{const d=o.streams.filter(m=>m.config.name.startsWith(W0));return d.forEach(m=>{this._fixInfo(m)}),d.map(m=>new k0(m))},a=`${this.prefix}.STREAM.LIST`;return new lu(a,s,this)}names(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>d.streams,u=`${this.prefix}.STREAM.NAMES`;return new lu(u,o,this,a)}async get(s){const a=await this.info(s);return Promise.resolve(new gh(this,a))}}class W3 extends Nu{constructor(s,a){super(s,a)}async getMessage(s,a){_n(s);let o=a;const{last_by_subj:u}=o;u&&(o=null);const d=o?this.jc.encode(o):es,p=this.opts.apiPrefix||"$JS.API",m=u?`${p}.DIRECT.GET.${s}.${u}`:`${p}.DIRECT.GET.${s}`,g=await this.nc.request(m,d,{timeout:this.timeout}),x=dl(g);if(x)return Promise.reject(x);const _=new z0(g);return Promise.resolve(_)}async getBatch(s,a){_n(s);const u=`${this.opts.apiPrefix||"$JS.API"}.DIRECT.GET.${s}`;if(!Array.isArray(a.multi_last)||a.multi_last.length===0)return Promise.reject("multi_last is required");const d=JSON.stringify(a,(g,x)=>g==="up_to_time"&&x instanceof Date?x.toISOString():x),p=new sn,m=await this.nc.requestMany(u,d,{strategy:Ms.SentinelMsg});return(async()=>{var w,D,z;let g=!1,x=!1,_;for await(const q of m){if(!g){g=!0;const Y=((w=q.headers)==null?void 0:w.code)||0;if(Y!==0&&Y<200||Y>299){_=(D=q.headers)==null?void 0:D.description.toLowerCase();break}if(((z=q.headers)==null?void 0:z.get("Nats-Num-Pending"))===""){x=!0;break}}if(q.data.length===0)break;p.push(new z0(q))}p.push(()=>{if(x)throw new Error("batch direct get not supported by the server");if(_)throw new Error(`bad request: ${_}`);p.stop()})})(),Promise.resolve(p)}}class z0{constructor(s){S(this,"data");S(this,"header");if(!s.headers)throw new Error("headers expected");this.data=s.data,this.header=s.headers}get subject(){return this.header.last(cl.Subject)}get seq(){const s=this.header.last(cl.Sequence);return typeof s=="string"?parseInt(s):0}get time(){return new Date(Date.parse(this.timestamp))}get timestamp(){return this.header.last(cl.TimeStamp)}get stream(){return this.header.last(cl.Stream)}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}S(z0,"jc");class eO extends Nu{constructor(a,o){super(a,o);S(this,"streams");S(this,"consumers");S(this,"direct");this.streams=new ey(a,o),this.consumers=new lh(a,o),this.direct=new W3(a,o)}async getAccountInfo(){return await this._request(`${this.prefix}.INFO`)}jetstream(){return this.nc.jetstream(this.getOptions())}advisories(){const a=new sn;return this.nc.subscribe("$JS.EVENT.ADVISORY.>",{callback:(o,u)=>{if(o)throw o;try{const d=this.parseJsResponse(u),p=d.type.split("."),m=p[p.length-1];a.push({kind:m,data:d})}catch(d){a.stop(d)}}}),a}}class yE{constructor(s){S(this,"_header");S(this,"smr");this.smr=s}get subject(){return this.smr.message.subject}get seq(){return this.smr.message.seq}get timestamp(){return this.smr.message.time}get time(){return new Date(Date.parse(this.timestamp))}get data(){return this.smr.message.data?this._parse(this.smr.message.data):es}get header(){if(!this._header)if(this.smr.message.hdrs){const s=this._parse(this.smr.message.hdrs);this._header=ti.decode(s)}else this._header=sr();return this._header}_parse(s){const a=atob(s),o=a.length,u=new Uint8Array(o);for(let d=0;d<o;d++)u[d]=a.charCodeAt(d);return u}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}S(yE,"jc");class tO{constructor(s){S(this,"api");this.api=s}get(s){return this.api.info(s).then(a=>new gh(this.api,a))}}class h0{constructor(s){S(this,"info");S(this,"hdrs");this.info=s}get name(){return this.info.name}get description(){return this.info.description??""}get headers(){return this.hdrs||(this.hdrs=ti.fromRecord(this.info.headers||{})),this.hdrs}get options(){return this.info.options}get bucket(){return this.info.bucket}get chunks(){return this.info.chunks}get deleted(){return this.info.deleted??!1}get digest(){return this.info.digest}get mtime(){return this.info.mtime}get nuid(){return this.info.nuid}get size(){return this.info.size}get revision(){return this.info.revision}get metadata(){return this.info.metadata||{}}isLink(){var s,a;return((s=this.info.options)==null?void 0:s.link)!==void 0&&((a=this.info.options)==null?void 0:a.link)!==null}}function pw(i){const s={name:i.name,description:i.description??"",options:i.options,metadata:i.metadata};if(i.headers){const a=i.headers;s.headers=a.toRecord()}return s}function nO(){return new ReadableStream({pull(i){i.enqueue(new Uint8Array(0)),i.close()}})}class mu{constructor(s,a,o){S(this,"jsm");S(this,"js");S(this,"stream");S(this,"name");this.name=s,this.jsm=a,this.js=o}_checkNotEmpty(s){return!s||s.length===0?{name:s,error:new Error("name cannot be empty")}:{name:s}}async info(s){const a=await this.rawInfo(s);return a?new h0(a):null}async list(){const s=[],a=await this.watch({ignoreDeletes:!0,includeHistory:!0});for await(const o of a){if(o===null)break;s.push(o)}return Promise.resolve(s)}async rawInfo(s){const{name:a,error:o}=this._checkNotEmpty(s);if(o)return Promise.reject(o);const u=this._metaSubject(a);try{const d=await this.jsm.streams.getMessage(this.stream,{last_by_subj:u}),m=ks().decode(d.data);return m.revision=d.seq,m}catch(d){return d.code==="404"?null:Promise.reject(d)}}async _si(s){try{return await this.jsm.streams.info(this.stream,s)}catch(a){return a.code==="404"?null:Promise.reject(a)}}async seal(){let s=await this._si();return s===null?Promise.reject(new Error("object store not found")):(s.config.sealed=!0,s=await this.jsm.streams.update(this.stream,s.config),Promise.resolve(new k0(s)))}async status(s){const a=await this._si(s);return a===null?Promise.reject(new Error("object store not found")):Promise.resolve(new k0(a))}destroy(){return this.jsm.streams.delete(this.stream)}async _put(s,a,o){var De;const u=this.js.getOptions();o=o||{timeout:u.timeout},o.timeout=o.timeout||u.timeout,o.previousRevision=o.previousRevision??void 0;const{timeout:d,previousRevision:p}=o,m=this.js.nc.info,g=(m==null?void 0:m.max_payload)||1024;s=s||{},s.options=s.options||{};let x=((De=s.options)==null?void 0:De.max_chunk_size)||128*1024;x=x>g?g:x,s.options.max_chunk_size=x;const _=await this.info(s.name),{name:w,error:D}=this._checkNotEmpty(s.name);if(D)return Promise.reject(D);const z=ai.next(),q=this._chunkSubject(z),Y=this._metaSubject(w),Z=Object.assign({bucket:this.name,nuid:z,size:0,chunks:0},pw(s)),ee=_t(),te=[],we=new yl;try{const U=a?a.getReader():null,ne=aw.create();for(;;){const{done:oe,value:W}=U?await U.read():{done:!0,value:void 0};if(oe){if(we.size()>0){const ie=we.drain();ne.update(ie),Z.chunks++,Z.size+=ie.length,te.push(this.js.publish(q,ie,{timeout:d}))}await Promise.all(te),te.length=0,Z.mtime=new Date().toISOString();const Q=hl.encode(ne.digest());Z.digest=`${hw}${Q}`,Z.deleted=!1;const H=sr();typeof p=="number"&&H.set(ga.ExpectedLastSubjectSequenceHdr,`${p}`),H.set(Dn.RollupHdr,Dn.RollupValueSubject);const le=await this.js.publish(Y,ks().encode(Z),{headers:H,timeout:d});if(Z.revision=le.seq,_)try{await this.jsm.streams.purge(this.stream,{filter:`$O.${this.name}.C.${_.nuid}`})}catch{}ee.resolve(new h0(Z));break}if(W)for(we.fill(W);we.size()>x;){Z.chunks++,Z.size+=x;const Q=we.drain(s.options.max_chunk_size);ne.update(Q),te.push(this.js.publish(q,Q,{timeout:d}))}}}catch(U){await this.jsm.streams.purge(this.stream,{filter:q}),ee.reject(U)}return ee}putBlob(s,a,o){function u(d){return new ReadableStream({pull(p){p.enqueue(d),p.close()}})}return a===null&&(a=new Uint8Array(0)),this.put(s,u(a),o)}put(s,a,o){var u;return(u=s==null?void 0:s.options)!=null&&u.link?Promise.reject(new Error("link cannot be set when putting the object in bucket")):this._put(s,a,o)}async getBlob(s){async function a(d){const p=new yl,m=d.getReader();for(;;){const{done:g,value:x}=await m.read();if(g)return p.drain();x&&x.length&&p.fill(x)}}const o=await this.get(s);if(o===null)return Promise.resolve(null);const u=await Promise.all([o.error,a(o.data)]);return u[0]?Promise.reject(u[0]):Promise.resolve(u[1])}async get(s){const a=await this.rawInfo(s);if(a===null||a.deleted)return Promise.resolve(null);if(a.options&&a.options.link){const w=a.options.link.name||"";if(w==="")throw new Error("link is a bucket");return(a.options.link.bucket!==this.name?await mu.create(this.js,a.options.link.bucket):this).get(w)}if(!a.digest.startsWith(hw))return Promise.reject(new Error(`unknown digest type: ${a.digest}`));const o=T0(a.digest.substring(8));if(o===null)return Promise.reject(new Error(`unable to parse digest: ${a.digest}`));const u=_t(),d={info:new h0(a),error:u};if(a.size===0)return d.data=nO(),u.resolve(null),Promise.resolve(d);let p;const m=ni();m.orderedConsumer();const g=aw.create(),x=`$O.${this.name}.C.${a.nuid}`,_=await this.js.subscribe(x,m);return(async()=>{for await(const w of _)w.data.length>0&&(g.update(w.data),p.enqueue(w.data)),w.info.pending===0&&(IT(o,g.digest())?p.close():p.error(new Error(`received a corrupt object, digests do not match received: ${a.digest} calculated ${o}`)),_.unsubscribe())})().then(()=>{u.resolve()}).catch(w=>{p.error(w),u.reject(w)}),d.data=new ReadableStream({start(w){p=w},cancel(){_.unsubscribe()}}),d}linkStore(s,a){if(!(a instanceof mu))return Promise.reject("bucket required");const o=a,{name:u,error:d}=this._checkNotEmpty(s);if(d)return Promise.reject(d);const p={name:u,options:{link:{bucket:o.name}}};return this._put(p,null)}async link(s,a){const{name:o,error:u}=this._checkNotEmpty(s);if(u)return Promise.reject(u);if(a.deleted)return Promise.reject(new Error("src object is deleted"));if(a.isLink())return Promise.reject(new Error("src object is a link"));const d=await this.rawInfo(s);if(d!==null&&!d.deleted)return Promise.reject(new Error("an object already exists with that name"));const p={bucket:a.bucket,name:a.name},m={name:o,bucket:a.bucket,options:{link:p}};await this.js.publish(this._metaSubject(s),JSON.stringify(m));const g=await this.info(s);return Promise.resolve(g)}async delete(s){const a=await this.rawInfo(s);if(a===null)return Promise.resolve({purged:0,success:!1});a.deleted=!0,a.size=0,a.chunks=0,a.digest="";const o=ks(),u=sr();return u.set(Dn.RollupHdr,Dn.RollupValueSubject),await this.js.publish(this._metaSubject(a.name),o.encode(a),{headers:u}),this.jsm.streams.purge(this.stream,{filter:this._chunkSubject(a.nuid)})}async update(s,a={}){const o=await this.rawInfo(s);if(o===null)return Promise.reject(new Error("object not found"));if(o.deleted)return Promise.reject(new Error("cannot update meta for a deleted object"));a.name=a.name??o.name;const{name:u,error:d}=this._checkNotEmpty(a.name);if(d)return Promise.reject(d);if(s!==a.name){const g=await this.info(a.name);if(g&&!g.deleted)return Promise.reject(new Error("an object already exists with that name"))}a.name=u;const p=Object.assign({},o,pw(a)),m=await this.js.publish(this._metaSubject(p.name),JSON.stringify(p));return s!==a.name&&await this.jsm.streams.purge(this.stream,{filter:this._metaSubject(s)}),Promise.resolve(m)}async watch(s={}){s.includeHistory=s.includeHistory??!1,s.ignoreDeletes=s.ignoreDeletes??!1;let a=!1;const o=new sn,u=this._metaSubjectAll();try{await this.jsm.streams.getMessage(this.stream,{last_by_subj:u})}catch(g){g.code==="404"?(o.push(null),a=!0):o.stop(g)}const d=ks(),p=ni();p.orderedConsumer(),s.includeHistory?p.deliverLastPerSubject():(a=!0,p.deliverNew()),p.callback((g,x)=>{var _;if(g){o.stop(g);return}if(x!==null){const w=d.decode(x.data);w.deleted&&s.ignoreDeletes===!0||o.push(w),((_=x.info)==null?void 0:_.pending)===0&&!a&&(a=!0,o.push(null))}});const m=await this.js.subscribe(u,p);return o._data=m,o.iterClosed.then(()=>{m.unsubscribe()}),m.closed.then(()=>{o.stop()}).catch(g=>{o.stop(g)}),o}_chunkSubject(s){return`$O.${this.name}.C.${s}`}_metaSubject(s){return`$O.${this.name}.M.${hl.encode(s)}`}_metaSubjectAll(){return`$O.${this.name}.M.>`}async init(s={}){try{this.stream=F3(this.name)}catch(u){return Promise.reject(u)}const a=(s==null?void 0:s.ttl)||0;delete s.ttl;const o=Object.assign({max_age:a},s);o.name=this.stream,o.num_replicas=s.replicas??1,o.allow_direct=!0,o.allow_rollup_hdrs=!0,o.discard=bu.New,o.subjects=[`$O.${this.name}.C.>`,`$O.${this.name}.M.>`],s.placement&&(o.placement=s.placement),s.metadata&&(o.metadata=s.metadata),typeof s.compression=="boolean"&&(o.compression=s.compression?ri.S2:ri.None);try{await this.jsm.streams.info(o.name)}catch(u){u.message==="stream not found"&&await this.jsm.streams.add(o)}}static async create(s,a,o={}){const u=await s.jetstreamManager(),d=new mu(a,u,s);return await d.init(o),Promise.resolve(d)}}class sO{constructor(s){S(this,"js");this.js=s}kv(s,a={}){const o=this.js,{ok:u,min:d}=o.nc.features.get(et.JS_KV);return u?a.bindOnly?gu.bind(this.js,s,a):gu.create(this.js,s,a):Promise.reject(new Error(`kv is only supported on servers ${d} or better`))}os(s,a={}){var p;if(typeof((p=crypto==null?void 0:crypto.subtle)==null?void 0:p.digest)!="function")return Promise.reject(new Error("objectstore: unable to calculate hashes - crypto.subtle.digest with sha256 support is required"));const o=this.js,{ok:u,min:d}=o.nc.features.get(et.JS_OBJECTSTORE);return u?mu.create(this.js,s,a):Promise.reject(new Error(`objectstore is only supported on servers ${d} or better`))}}class ty extends Nu{constructor(a,o){super(a,o);S(this,"consumers");S(this,"streams");S(this,"consumerAPI");S(this,"streamAPI");this.consumerAPI=new lh(a,o),this.streamAPI=new ey(a,o),this.consumers=new U0(this.consumerAPI),this.streams=new tO(this.streamAPI)}jetstreamManager(a){a===void 0&&(a=this.opts.checkAPI);const o=Object.assign({},this.opts,{checkAPI:a});return this.nc.jetstreamManager(o)}get apiPrefix(){return this.prefix}get views(){return new sO(this)}async publish(a,o=es,u){u=u||{},u.expect=u.expect||{};const d=(u==null?void 0:u.headers)||sr();u&&(u.msgID&&d.set(ga.MsgIdHdr,u.msgID),u.expect.lastMsgID&&d.set(ga.ExpectedLastMsgIdHdr,u.expect.lastMsgID),u.expect.streamName&&d.set(ga.ExpectedStreamHdr,u.expect.streamName),typeof u.expect.lastSequence=="number"&&d.set(ga.ExpectedLastSeqHdr,`${u.expect.lastSequence}`),typeof u.expect.lastSubjectSequence=="number"&&d.set(ga.ExpectedLastSubjectSequenceHdr,`${u.expect.lastSubjectSequence}`));const p=u.timeout||this.timeout,m={};p&&(m.timeout=p),u&&(m.headers=d);let{retries:g,retry_delay:x}=u;g=g||1,x=x||250;let _;for(let D=0;D<g;D++)try{_=await this.nc.request(a,o,m);break}catch(z){if(z.code==="503"&&D+1<g)await gl(x);else throw z}const w=this.parseJsResponse(_);if(w.stream==="")throw ge.errorForCode(ue.JetStreamInvalidAck);return w.duplicate=w.duplicate?w.duplicate:!1,w}async pull(a,o,u=0){_n(a),fl(o);let d=this.timeout;u>d&&(d=u),u=u<0?0:Et(u);const p={batch:1,no_wait:u===0,expires:u},m=await this.nc.request(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(p),{noMux:!0,timeout:d}),g=dl(m);if(g)throw g;return vu(m,this.timeout)}fetch(a,o,u={}){_n(a),fl(o);let d=null;const p=(u.max_bytes??0)>0;let m=0;const g=p?u.max_bytes:0;let x=null;const _={};if(_.batch=u.batch||1,g){const te=this.nc.features.get(et.JS_PULL_MAX_BYTES);if(!te.ok)throw new Error(`max_bytes is only supported on servers ${te.min} or better`);_.max_bytes=g}_.no_wait=u.no_wait||!1,_.no_wait&&_.expires&&(_.expires=0);const w=u.expires||0;if(w&&(_.expires=Et(w)),w===0&&_.no_wait===!1)throw new Error("expires or no_wait is required");const D=u.idle_heartbeat||0;D&&(_.idle_heartbeat=Et(D),u.delay_heartbeat===!0&&(_.idle_heartbeat=Et(D*4)));const z=new sn,q=_.batch;let Y=0;z.protocolFilterFn=(te,we=!1)=>A0(te.msg)?(x==null||x.work(),!1):!0,z.dispatchedFn=te=>{if(te){if(p&&(m+=te.data.length),Y++,d&&te.info.pending===0)return;(z.getPending()===1&&te.info.pending===0||q===Y||g>0&&m>=g)&&z.stop()}};const Z=nr(this.nc.options.inboxPrefix),ee=this.nc.subscribe(Z,{max:u.batch,callback:(te,we)=>{te===null&&(te=dl(we)),te!==null?(d&&(d.cancel(),d=null),_T(te)?z.stop(vE(te)===null?void 0:te):z.stop(te)):(x==null||x.work(),z.received++,z.push(vu(we,this.timeout)))}});return w&&(d=pl(w),d.catch(()=>{ee.isClosed()||(ee.drain().catch(()=>{}),d=null),x&&x.cancel()})),(async()=>{try{D&&(x=new K0(D,te=>(z.push(()=>{z.err=new ge(`${ys.IdleHeartbeatMissed}: ${te}`,ue.JetStreamIdleHeartBeat)}),!0)))}catch{}await ee.closed,d!==null&&(d.cancel(),d=null),x&&x.cancel(),z.stop()})().catch(),this.nc.publish(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(_),{reply:Z}),z}async pullSubscribe(a,o=ni()){const u=await this._processOptions(a,o);if(u.ordered)throw new Error("pull subscribers cannot be be ordered");if(u.config.deliver_subject)throw new Error("consumer info specifies deliver_subject - pull consumers cannot have deliver_subject set");const d=u.config.ack_policy;if(d===nn.None||d===nn.All)throw new Error("ack policy for pull consumers must be explicit");const p=this._buildTypedSubscriptionOpts(u),m=new oO(this,u.deliver,p);m.info=u;try{await this._maybeCreateConsumer(u)}catch(g){throw m.unsubscribe(),g}return m}async subscribe(a,o=ni()){const u=await this._processOptions(a,o);if(!u.isBind&&!u.config.deliver_subject)throw new Error("push consumer requires deliver_subject");const d=this._buildTypedSubscriptionOpts(u),p=new gE(this,u.deliver,d);p.info=u;try{await this._maybeCreateConsumer(u)}catch(m){throw p.unsubscribe(),m}return p._maybeSetupHbMonitoring(),p}async _processOptions(a,o=ni()){const u=ew(o)?o.getOpts():o;if(u.isBind=ew(o)?o.isBind:!1,u.flow_control={heartbeat_count:0,fc_count:0,consumer_restarts:0},u.ordered){if(u.ordered_consumer_sequence={stream_seq:0,delivery_seq:0},u.config.ack_policy!==nn.NotSet&&u.config.ack_policy!==nn.None)throw new ge("ordered consumer: ack_policy can only be set to 'none'",ue.ApiError);if(u.config.durable_name&&u.config.durable_name.length>0)throw new ge("ordered consumer: durable_name cannot be set",ue.ApiError);if(u.config.deliver_subject&&u.config.deliver_subject.length>0)throw new ge("ordered consumer: deliver_subject cannot be set",ue.ApiError);if(u.config.max_deliver!==void 0&&u.config.max_deliver>1)throw new ge("ordered consumer: max_deliver cannot be set",ue.ApiError);if(u.config.deliver_group&&u.config.deliver_group.length>0)throw new ge("ordered consumer: deliver_group cannot be set",ue.ApiError);u.config.deliver_subject=nr(this.nc.options.inboxPrefix),u.config.ack_policy=nn.None,u.config.max_deliver=1,u.config.flow_control=!0,u.config.idle_heartbeat=u.config.idle_heartbeat||Et(5e3),u.config.ack_wait=Et(1320*60*1e3),u.config.mem_storage=!0,u.config.num_replicas=1}if(u.config.ack_policy===nn.NotSet&&(u.config.ack_policy=nn.All),u.api=this,u.config=u.config||{},u.stream=u.stream?u.stream:await this.findStream(a),u.attached=!1,u.config.durable_name)try{const d=await this.consumerAPI.info(u.stream,u.config.durable_name);if(d){if(d.config.filter_subject&&d.config.filter_subject!==a)throw new Error("subject does not match consumer");const p=u.config.deliver_group??"";if(p===""&&d.push_bound===!0)throw new Error("duplicate subscription");const m=d.config.deliver_group??"";if(p!==m)throw m===""?new Error("durable requires no queue group"):new Error(`durable requires queue group '${m}'`);u.last=d,u.config=d.config,u.attached=!0,u.config.durable_name||(u.name=d.name)}}catch(d){if(d.code!=="404")throw d}return!u.attached&&u.config.filter_subject===void 0&&u.config.filter_subjects===void 0&&(u.config.filter_subject=a),u.deliver=u.config.deliver_subject||nr(this.nc.options.inboxPrefix),u}_buildTypedSubscriptionOpts(a){const o={};return o.adapter=lO(a.callbackFn===void 0,this.timeout),o.ingestionFilterFn=ty.ingestionFn(a.ordered),o.protocolFilterFn=(u,d=!1)=>{const p=u;return _0(p.msg)?(d||p.msg.respond(),!1):!0},!a.mack&&a.config.ack_policy!==nn.None&&(o.dispatchedFn=fO),a.callbackFn&&(o.callback=a.callbackFn),o.max=a.max||0,o.queue=a.queue,o}async _maybeCreateConsumer(a){if(a.attached)return;if(a.isBind)throw new Error(`unable to bind - durable consumer ${a.config.durable_name} doesn't exist in ${a.stream}`);a.config=Object.assign({deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:bl.Instant},a.config);const o=await this.consumerAPI.add(a.stream,a.config);if(Array.isArray(a.config.filter_subjects&&!Array.isArray(o.config.filter_subjects)))throw new Error("jetstream server doesn't support consumers with multiple filter subjects");a.name=o.name,a.config=o.config,a.last=o}static ingestionFn(a){return(o,u)=>{var g;const d=u;if(!o)return{ingest:!1,protocol:!1};const p=o;if(dl(p.msg)||(g=d.monitor)==null||g.work(),A0(p.msg)){const x=a?d._checkHbOrderConsumer(p.msg):!0;return a||d.info.flow_control.heartbeat_count++,{ingest:x,protocol:!0}}else if(_0(p.msg))return d.info.flow_control.fc_count++,{ingest:!0,protocol:!0};return{ingest:a?d._checkOrderedConsumer(o):!0,protocol:!1}}}}class ny{constructor(s){S(this,"options");S(this,"protocol");S(this,"draining");S(this,"listeners");S(this,"_services");this.draining=!1,this.options=A3(s),this.listeners=[]}static connect(s={}){return new Promise((a,o)=>{const u=new ny(s);uh.connect(u.options,u).then(d=>{u.protocol=d,(async function(){for await(const p of d.status())u.listeners.forEach(m=>{m.push(p)})})(),a(u)}).catch(d=>{o(d)})})}closed(){return this.protocol.closed}async close(){await this.protocol.close()}_check(s,a,o){if(this.isClosed())throw ge.errorForCode(ue.ConnectionClosed);if(a&&this.isDraining()||o&&this.protocol.noMorePublishing)throw ge.errorForCode(ue.ConnectionDraining);if(s=s||"",s.length===0)throw ge.errorForCode(ue.BadSubject)}publish(s,a,o){this._check(s,!1,!0),this.protocol.publish(s,a,o)}publishMessage(s){return this.publish(s.subject,s.data,{reply:s.reply,headers:s.headers})}respondMessage(s){return s.reply?(this.publish(s.reply,s.data,{reply:s.reply,headers:s.headers}),!0):!1}subscribe(s,a={}){this._check(s,!0,!1);const o=new mE(this.protocol,s,a);return this.protocol.subscribe(o),o}_resub(s,a,o){this._check(a,!0,!1);const u=s;u.max=o,o&&(u.max=o+u.received),this.protocol.resub(u,a)}requestMany(s,a=es,o={maxWait:1e3,maxMessages:-1}){const u=!this.protocol.options.noAsyncTraces;try{this._check(s,!0,!0)}catch(g){return Promise.reject(g)}if(o.strategy=o.strategy||Ms.Timer,o.maxWait=o.maxWait||1e3,o.maxWait<1)return Promise.reject(new ge("timeout",ue.InvalidOption));const d=new sn;function p(g){d.push(()=>{d.stop(g)})}function m(g,x){g||x===null?p(g===null?void 0:g):d.push(x)}if(o.noMux){const g=u?new Error().stack:null;let x=typeof o.maxMessages=="number"&&o.maxMessages>0?o.maxMessages:-1;const _=this.subscribe(nr(this.options.inboxPrefix),{callback:(q,Y)=>{var Z,ee;if(((Z=Y==null?void 0:Y.data)==null?void 0:Z.length)===0&&((ee=Y==null?void 0:Y.headers)==null?void 0:ee.status)===ue.NoResponders&&(q=ge.errorForCode(ue.NoResponders)),q){g&&(q.stack+=`
|
|
266
266
|
|
|
267
|
-
${g}`),w(q);return}m(null,
|
|
267
|
+
${g}`),w(q);return}m(null,Y),o.strategy===Ms.Count&&(x--,x===0&&w()),o.strategy===Ms.JitterTimer&&(z(),D=setTimeout(()=>{w()},300)),o.strategy===Ms.SentinelMsg&&Y&&Y.data.length===0&&w()}});_.requestSubject=s,_.closed.then(()=>{p()}).catch(q=>{d.stop(q)});const w=q=>{q&&d.push(()=>{throw q}),z(),_.drain().then(()=>{p()}).catch(Y=>{p()})};d.iterClosed.then(()=>{z(),_==null||_.unsubscribe()}).catch(q=>{z(),_==null||_.unsubscribe()});try{this.publish(s,a,{reply:_.getSubject()})}catch(q){w(q)}let D=setTimeout(()=>{w()},o.maxWait);const z=()=>{D&&clearTimeout(D)}}else{const g=o;g.callback=m,d.iterClosed.then(()=>{x.cancel()}).catch(_=>{x.cancel(_)});const x=new FT(this.protocol.muxSubscriptions,s,g);this.protocol.request(x);try{this.publish(s,a,{reply:`${this.protocol.muxSubscriptions.baseInbox}${x.token}`,headers:o.headers})}catch(_){x.cancel(_)}}return Promise.resolve(d)}request(s,a,o={timeout:1e3,noMux:!1}){try{this._check(s,!0,!0)}catch(d){return Promise.reject(d)}const u=!this.protocol.options.noAsyncTraces;if(o.timeout=o.timeout||1e3,o.timeout<1)return Promise.reject(new ge("timeout",ue.InvalidOption));if(!o.noMux&&o.reply)return Promise.reject(new ge("reply can only be used with noMux",ue.InvalidOption));if(o.noMux){const d=o.reply?o.reply:nr(this.options.inboxPrefix),p=_t(),m=u?new Error:null,g=this.subscribe(d,{max:1,timeout:o.timeout,callback:(x,_)=>{x?(m&&x.code!==ue.Timeout&&(x.stack+=`
|
|
268
268
|
|
|
269
269
|
${m.stack}`),g.unsubscribe(),p.reject(x)):(x=rE(_),x?(m&&(x.stack+=`
|
|
270
270
|
|
|
271
|
-
${m.stack}`),p.reject(x)):p.resolve(_))}});return g.requestSubject=s,this.protocol.publish(s,a,{reply:d,headers:o.headers}),p}else{const d=new lE(this.protocol.muxSubscriptions,s,o,u);this.protocol.request(d);try{this.publish(s,a,{reply:`${this.protocol.muxSubscriptions.baseInbox}${d.token}`,headers:o.headers})}catch(m){d.cancel(m)}const p=Promise.race([d.timer,d.deferred]);return p.catch(()=>{d.cancel()}),p}}flush(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.protocol.flush()}drain(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isDraining()?Promise.reject(ge.errorForCode(ue.ConnectionDraining)):(this.draining=!0,this.protocol.drain())}isClosed(){return this.protocol.isClosed()}isDraining(){return this.draining}getServer(){const s=this.protocol.getServer();return s?s.listen:""}status(){const s=new sn;return s.iterClosed.then(()=>{const a=this.listeners.indexOf(s);this.listeners.splice(a,1)}),this.listeners.push(s),s}get info(){return this.protocol.isClosed()?void 0:this.protocol.info}async context(){return(await this.request("$SYS.REQ.USER.INFO")).json((a,o)=>a==="time"?new Date(Date.parse(o)):o)}stats(){return{inBytes:this.protocol.inBytes,outBytes:this.protocol.outBytes,inMsgs:this.protocol.inMsgs,outMsgs:this.protocol.outMsgs}}async jetstreamManager(s={}){const a=new W3(this,s);if(s.checkAPI!==!1)try{await a.getAccountInfo()}catch(o){const u=o;throw u.code===ue.NoResponders&&(u.code=ue.JetStreamNotEnabled),u}return a}jetstream(s={}){return new ey(this,s)}getServerVersion(){const s=this.info;return s?Xi(s.version):void 0}async rtt(){if(!this.protocol._closed&&!this.protocol.connected)throw ge.errorForCode(ue.Disconnect);const s=Date.now();return await this.flush(),Date.now()-s}get features(){return this.protocol.features}get services(){return this._services||(this._services=new sO(this)),this._services}reconnect(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isDraining()?Promise.reject(ge.errorForCode(ue.ConnectionDraining)):this.protocol.reconnect()}}class sO{constructor(s){S(this,"nc");this.nc=s}add(s){try{return new Su(this.nc,s).start()}catch(a){return Promise.reject(a)}}client(s,a){return new U3(this.nc,s,a)}}class aO{constructor(s,a,o){S(this,"bucket");S(this,"sm");S(this,"prefixLen");this.bucket=s,this.prefixLen=a,this.sm=o}get key(){return this.sm.subject.substring(this.prefixLen)}get value(){return this.sm.data}get delta(){return 0}get created(){return this.sm.time}get revision(){return this.sm.seq}get operation(){return this.sm.header.get(fh)||"PUT"}get length(){const s=this.sm.header.get(Dn.MessageSizeHdr)||"";return s!==""?parseInt(s,10):this.sm.data.length}json(){return this.sm.json()}string(){return this.sm.string()}}class rO{constructor(s,a,o){S(this,"bucket");S(this,"key");S(this,"sm");this.bucket=s,this.key=a,this.sm=o}get value(){return this.sm.data}get created(){return new Date(Q0(this.sm.info.timestampNanos))}get revision(){return this.sm.seq}get operation(){var s;return((s=this.sm.headers)==null?void 0:s.get(fh))||"PUT"}get delta(){return this.sm.info.pending}get length(){var a;const s=((a=this.sm.headers)==null?void 0:a.get(Dn.MessageSizeHdr))||"";return s!==""?parseInt(s,10):this.sm.data.length}json(){return this.sm.json()}string(){return this.sm.string()}}class gE extends GT{constructor(a,o,u){super(a.nc,o,u);S(this,"js");S(this,"monitor");this.js=a,this.monitor=null,this.sub.closed.then(()=>{this.monitor&&this.monitor.cancel()})}set info(a){this.sub.info=a}get info(){return this.sub.info}_resetOrderedConsumer(a){if(this.info===null||this.sub.isClosed())return;const o=nr(this.js.nc.options.inboxPrefix);this.js.nc._resub(this.sub,o);const d=this.info;d.config.name=ai.next(),d.ordered_consumer_sequence.delivery_seq=0,d.flow_control.heartbeat_count=0,d.flow_control.fc_count=0,d.flow_control.consumer_restarts++,d.deliver=o,d.config.deliver_subject=o,d.config.deliver_policy=Vt.StartSequence,d.config.opt_start_seq=a;const p={};p.stream_name=this.info.stream,p.config=d.config;const m=`${d.api.prefix}.CONSUMER.CREATE.${d.stream}`;this.js._request(m,p,{retries:-1}).then(g=>{const x=g,_=this.sub.info;_.last=x,this.info.config=x.config,this.info.name=x.name}).catch(g=>{const x=new ge(`unable to recreate ordered consumer ${d.stream} at seq ${a}`,ue.RequestError,g);this.sub.callback(x,{})})}_maybeSetupHbMonitoring(){var o,u;const a=((u=(o=this.info)==null?void 0:o.config)==null?void 0:u.idle_heartbeat)||0;a&&this._setupHbMonitoring(Q0(a))}_setupHbMonitoring(a,o=0){const u={cancelAfter:0,maxOut:2};o&&(u.cancelAfter=o);const d=this.sub,p=m=>{var _,w,D,z;const g=CT(409,`${ys.IdleHeartbeatMissed}: ${m}`,this.sub.subject);if(!((_=this.info)==null?void 0:_.ordered))this.sub.callback(null,g);else{if(!this.js.nc.protocol.connected)return!1;const q=((D=(w=this.info)==null?void 0:w.ordered_consumer_sequence)==null?void 0:D.stream_seq)||0;return this._resetOrderedConsumer(q+1),(z=this.monitor)==null||z.restart(),!1}return!d.noIterator};this.monitor=new Z0(a,p,u)}_checkHbOrderConsumer(a){const o=a.headers.get(Dn.ConsumerStalledHdr);o!==""&&this.js.nc.publish(o);const u=parseInt(a.headers.get(Dn.LastConsumerSeqHdr),10),d=this.info.ordered_consumer_sequence;return this.info.flow_control.heartbeat_count++,u!==d.delivery_seq&&this._resetOrderedConsumer(d.stream_seq+1),!1}_checkOrderedConsumer(a){const o=this.info.ordered_consumer_sequence,u=a.info.streamSequence,d=a.info.deliverySequence;return d!=o.delivery_seq+1?(this._resetOrderedConsumer(o.stream_seq+1),!1):(o.delivery_seq=d,o.stream_seq=u,!0)}async destroy(){this.isClosed()||await this.drain();const a=this.sub.info,o=a.config.durable_name||a.name,u=`${a.api.prefix}.CONSUMER.DELETE.${a.stream}.${o}`;await a.api._request(u)}async consumerInfo(){const a=this.sub.info,o=a.config.durable_name||a.name,u=`${a.api.prefix}.CONSUMER.INFO.${a.stream}.${o}`,d=await a.api._request(u);return a.last=d,d}}class iO extends gE{constructor(s,a,o){super(s,a,o)}pull(s={batch:1}){const{stream:a,config:o,name:u}=this.sub.info,d=o.durable_name??u,p={};if(p.batch=s.batch||1,p.no_wait=s.no_wait||!1,(s.max_bytes??0)>0){const x=this.js.nc.features.get(et.JS_PULL_MAX_BYTES);if(!x.ok)throw new Error(`max_bytes is only supported on servers ${x.min} or better`);p.max_bytes=s.max_bytes}let m=0;s.expires&&s.expires>0&&(m=s.expires,p.expires=Et(m));let g=0;if(s.idle_heartbeat&&s.idle_heartbeat>0&&(g=s.idle_heartbeat,p.idle_heartbeat=Et(g)),g&&m===0)throw new Error("idle_heartbeat requires expires");if(g>m)throw new Error("expires must be greater than idle_heartbeat");if(this.info){this.monitor&&this.monitor.cancel(),m&&g&&(this.monitor?this.monitor._change(g,m):this._setupHbMonitoring(g,m));const x=this.info.api,_=`${x.prefix}.CONSUMER.MSG.NEXT.${a}.${d}`,w=this.sub.subject;x.nc.publish(_,x.jc.encode(p),{reply:w})}}}function oO(i,s){return i?cO(s):lO(s)}function lO(i){return(s,a)=>s?[s,null]:(s=dl(a),s?[s,null]:[null,vu(a,i)])}function cO(i){return(s,a)=>{if(s)return[s,null];const o=dl(a);return o!==null?[vE(o),null]:[null,vu(a,i)]}}function vE(i){if(i!==null)switch(i.code){case ue.JetStream404NoMessages:case ue.JetStream408RequestTimeout:return null;case ue.JetStream409:return TT(i)?i:null;default:return i}return null}function uO(i){i&&i.ack()}function fO(i){const s=i.split(".");if(s.length===9&&s.splice(2,0,"_",""),s.length<11||s[0]!=="$JS"||s[1]!=="ACK")throw new Error("not js message");const a={};return a.domain=s[2]==="_"?"":s[2],a.account_hash=s[3],a.stream=s[4],a.consumer=s[5],a.deliveryCount=parseInt(s[6],10),a.redeliveryCount=a.deliveryCount,a.redelivered=a.deliveryCount>1,a.streamSequence=parseInt(s[7],10),a.deliverySequence=parseInt(s[8],10),a.timestampNanos=parseInt(s[9],10),a.pending=parseInt(s[10],10),a}class dO{constructor(s,a){S(this,"msg");S(this,"di");S(this,"didAck");S(this,"timeout");this.msg=s,this.didAck=!1,this.timeout=a}get subject(){return this.msg.subject}get sid(){return this.msg.sid}get data(){return this.msg.data}get headers(){return this.msg.headers}get info(){return this.di||(this.di=fO(this.reply)),this.di}get redelivered(){return this.info.deliveryCount>1}get reply(){return this.msg.reply||""}get seq(){return this.info.streamSequence}doAck(s){this.didAck||(this.didAck=!this.isWIP(s),this.msg.respond(s))}isWIP(s){return s.length===4&&s[0]===su[0]&&s[1]===su[1]&&s[2]===su[2]&&s[3]===su[3]}async ackAck(s){var o;s=s||{},s.timeout=s.timeout||this.timeout;const a=_t();if(this.didAck)a.resolve(!1);else if(this.didAck=!0,this.msg.reply){const d=this.msg.publisher,p=!((o=d.options)!=null&&o.noAsyncTraces),m=new lE(d.muxSubscriptions,this.msg.reply,{timeout:s.timeout},p);d.request(m);try{d.publish(this.msg.reply,mw,{reply:`${d.muxSubscriptions.baseInbox}${m.token}`})}catch(g){m.cancel(g)}try{await Promise.race([m.timer,m.deferred]),a.resolve(!0)}catch(g){m.cancel(g),a.reject(g)}}else a.resolve(!1);return a}ack(){this.doAck(mw)}nak(s){let a=F3;s&&(a=w0().encode(`-NAK ${JSON.stringify({delay:Et(s)})}`)),this.doAck(a)}working(){this.doAck(su)}next(s,a={batch:1}){const o={};o.batch=a.batch||1,o.no_wait=a.no_wait||!1,a.expires&&a.expires>0&&(o.expires=Et(a.expires));const u=ks().encode(o),d=yl.concat(J3,Q3,u),p=s?{reply:s}:void 0;this.msg.respond(d,p)}term(s=""){let a=G3;(s==null?void 0:s.length)>0&&(a=w0().encode(`+TERM ${s}`)),this.doAck(a)}json(){return this.msg.json()}string(){return this.msg.string()}}const hO="1.30.3",mO="nats.ws";class pO{constructor(){S(this,"version");S(this,"lang");S(this,"closeError");S(this,"connected");S(this,"done");S(this,"socket");S(this,"options");S(this,"socketClosed");S(this,"encrypted");S(this,"peeked");S(this,"yields");S(this,"signal");S(this,"closedNotification");this.version=hO,this.lang=mO,this.connected=!1,this.done=!1,this.socketClosed=!1,this.encrypted=!1,this.peeked=!1,this.yields=[],this.signal=_t(),this.closedNotification=_t()}async connect(s,a){const o=_t();if(a.tls)return o.reject(new ge("tls",ue.InvalidOption)),o;this.options=a;const u=s.src;if(a.wsFactory){const{socket:d,encrypted:p}=await a.wsFactory(s.src,a);this.socket=d,this.encrypted=p}else this.encrypted=u.indexOf("wss://")===0,this.socket=new WebSocket(u);return this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{this.isDiscarded()},this.socket.onmessage=d=>{if(this.isDiscarded())return;if(this.yields.push(new Uint8Array(d.data)),this.peeked){this.signal.resolve();return}const p=yl.concat(...this.yields),m=e3(p);if(m!==""){const g=C3.exec(m);if(!g){a.debug&&console.error("!!!",Hd(p)),o.reject(new Error("unexpected response from server"));return}try{const x=JSON.parse(g[1]);A3(x,this.options),this.peeked=!0,this.connected=!0,this.signal.resolve(),o.resolve()}catch(x){o.reject(x);return}}},this.socket.onclose=d=>{if(this.isDiscarded())return;this.socketClosed=!0;let p;this.done||(d.wasClean||(p=new Error(d.reason)),this._closed(p))},this.socket.onerror=d=>{if(this.isDiscarded())return;const p=d,m=new ge(p.message,ue.Unknown,new Error(p.error));o.reject(m)},o}disconnect(){this._closed(void 0,!0)}async _closed(s,a=!0){if(!this.isDiscarded()&&this.connected&&!this.done){if(this.closeError=s,!s)for(;!this.socketClosed&&this.socket.bufferedAmount>0;)await gl(100);this.done=!0;try{this.socket.close(s?1002:1e3,s?s.message:void 0)}catch{}a&&this.closedNotification.resolve(s)}}get isClosed(){return this.done}[Symbol.asyncIterator](){return this.iterate()}async*iterate(){for(;;){if(this.isDiscarded())return;this.yields.length===0&&await this.signal;const s=this.yields;this.yields=[];for(let a=0;a<s.length;a++)this.options.debug&&console.info(`> ${Hd(s[a])}`),yield s[a];if(this.done)break;this.yields.length===0&&(s.length=0,this.yields=s,this.signal=_t())}}isEncrypted(){return this.connected&&this.encrypted}send(s){if(!this.isDiscarded())try{this.socket.send(s.buffer),this.options.debug&&console.info(`< ${Hd(s)}`);return}catch(a){this.options.debug&&console.error(`!!! ${Hd(s)}: ${a}`)}}close(s){return this._closed(s,!1)}closed(){return this.closedNotification}isDiscarded(){return this.done?(this.discard(),!0):!1}discard(){var s;this.done=!0;try{(s=this.socket)==null||s.close()}catch{}}}function bO(i,s){/^(.*:\/\/)(.*)/.test(i)||(typeof s=="boolean"?i=`${s===!0?"https":"http"}://${i}`:i=`https://${i}`);let o=new URL(i);const u=o.protocol.toLowerCase();u==="ws:"&&(s=!1),u==="wss:"&&(s=!0),u!=="https:"&&u!=="http"&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2"),o=new URL(`http://${i}`));let d,p;const m=o.hostname,g=o.pathname,x=o.search||"";switch(u){case"http:":case"ws:":case"nats:":p=o.port||"80",d="ws:";break;case"https:":case"wss:":case"tls:":p=o.port||"443",d="wss:";break;default:p=o.port||s===!0?"443":"80",d=s===!0?"wss:":"ws:";break}return`${d}//${m}:${p}${g}${x}`}function yO(i={}){return QT({defaultPort:443,urlParseFn:bO,factory:()=>new pO}),ty.connect(i)}const gO="ws://localhost:9222",vO="dev_api_secret",xO="lt.events";function xE(i,s){const a=i.split("."),o=s.split(".");for(let u=0;u<o.length;u++){const d=o[u];if(d===">")return!0;if(u>=a.length||d!=="*"&&d!==a[u])return!1}return a.length===o.length}const vh=B.createContext({connected:!1,subscribe:()=>()=>{}});function NO(){const{connected:i}=B.useContext(vh);return{connected:i}}function NE(i,s){const{subscribe:a}=B.useContext(vh),o=B.useRef(s);o.current=s,B.useEffect(()=>a(i,d=>o.current(d)),[a,i])}const SO=B.createContext({connected:!1,subscribe:()=>()=>{}}),wO=w0();function EO({children:i}){const s=B.useRef(null),a=B.useRef(null),[o,u]=B.useState(!1),d=B.useRef(null),p=B.useRef(new Map),m=B.useCallback((_,w)=>{const D=p.current;return D.has(_)||D.set(_,new Set),D.get(_).add(w),()=>{const z=D.get(_);z&&(z.delete(w),z.size===0&&D.delete(_))}},[]),g=B.useCallback((_,w)=>{for(const[D,z]of p.current)if(xE(_,D))for(const q of z)try{q(w)}catch{}},[]),x=B.useCallback(async()=>{try{if(s.current)return;const _=await yO({servers:gO,token:vO,reconnect:!0,maxReconnectAttempts:-1,reconnectTimeWait:2e3});s.current=_,u(!0);const w=_.subscribe("lt.>");a.current=w,(async()=>{for await(const D of w)try{const z=JSON.parse(wO.decode(D.data));g(D.subject,z)}catch{}})(),(async()=>{for await(const D of _.status())D.type==="disconnect"||D.type==="error"?u(!1):D.type==="reconnect"&&u(!0)})()}catch{u(!1),d.current=setTimeout(x,3e3)}},[g]);return B.useEffect(()=>(x(),()=>{d.current&&clearTimeout(d.current),a.current&&a.current.unsubscribe(),s.current&&(s.current.close().catch(()=>{}),s.current=null),u(!1)}),[x]),b.jsxDEV(SO.Provider,{value:{connected:o,subscribe:m},children:b.jsxDEV(vh.Provider,{value:{connected:o,subscribe:m},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:192,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:191,columnNumber:5},this)}const Na=Object.create(null);Na.open="0";Na.close="1";Na.ping="2";Na.pong="3";Na.message="4";Na.upgrade="5";Na.noop="6";const Wd=Object.create(null);Object.keys(Na).forEach(i=>{Wd[Na[i]]=i});const z0={type:"error",data:"parser error"},SE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wE=typeof ArrayBuffer=="function",EE=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,ny=({type:i,data:s},a,o)=>SE&&s instanceof Blob?a?o(s):bw(s,o):wE&&(s instanceof ArrayBuffer||EE(s))?a?o(s):bw(new Blob([s]),o):o(Na[i]+(s||"")),bw=(i,s)=>{const a=new FileReader;return a.onload=function(){const o=a.result.split(",")[1];s("b"+(o||""))},a.readAsDataURL(i)};function yw(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let h0;function _O(i,s){if(SE&&i.data instanceof Blob)return i.data.arrayBuffer().then(yw).then(s);if(wE&&(i.data instanceof ArrayBuffer||EE(i.data)))return s(yw(i.data));ny(i,!1,a=>{h0||(h0=new TextEncoder),s(h0.encode(a))})}const gw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<gw.length;i++)cu[gw.charCodeAt(i)]=i;const AO=i=>{let s=i.length*.75,a=i.length,o,u=0,d,p,m,g;i[i.length-1]==="="&&(s--,i[i.length-2]==="="&&s--);const x=new ArrayBuffer(s),_=new Uint8Array(x);for(o=0;o<a;o+=4)d=cu[i.charCodeAt(o)],p=cu[i.charCodeAt(o+1)],m=cu[i.charCodeAt(o+2)],g=cu[i.charCodeAt(o+3)],_[u++]=d<<2|p>>4,_[u++]=(p&15)<<4|m>>2,_[u++]=(m&3)<<6|g&63;return x},DO=typeof ArrayBuffer=="function",sy=(i,s)=>{if(typeof i!="string")return{type:"message",data:_E(i,s)};const a=i.charAt(0);return a==="b"?{type:"message",data:CO(i.substring(1),s)}:Wd[a]?i.length>1?{type:Wd[a],data:i.substring(1)}:{type:Wd[a]}:z0},CO=(i,s)=>{if(DO){const a=AO(i);return _E(a,s)}else return{base64:!0,data:i}},_E=(i,s)=>{switch(s){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},AE="",TO=(i,s)=>{const a=i.length,o=new Array(a);let u=0;i.forEach((d,p)=>{ny(d,!1,m=>{o[p]=m,++u===a&&s(o.join(AE))})})},OO=(i,s)=>{const a=i.split(AE),o=[];for(let u=0;u<a.length;u++){const d=sy(a[u],s);if(o.push(d),d.type==="error")break}return o};function RO(){return new TransformStream({transform(i,s){_O(i,a=>{const o=a.length;let u;if(o<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,o);else if(o<65536){u=new Uint8Array(3);const d=new DataView(u.buffer);d.setUint8(0,126),d.setUint16(1,o)}else{u=new Uint8Array(9);const d=new DataView(u.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(o))}i.data&&typeof i.data!="string"&&(u[0]|=128),s.enqueue(u),s.enqueue(a)})}})}let m0;function Yd(i){return i.reduce((s,a)=>s+a.length,0)}function Fd(i,s){if(i[0].length===s)return i.shift();const a=new Uint8Array(s);let o=0;for(let u=0;u<s;u++)a[u]=i[0][o++],o===i[0].length&&(i.shift(),o=0);return i.length&&o<i[0].length&&(i[0]=i[0].slice(o)),a}function jO(i,s){m0||(m0=new TextDecoder);const a=[];let o=0,u=-1,d=!1;return new TransformStream({transform(p,m){for(a.push(p);;){if(o===0){if(Yd(a)<1)break;const g=Fd(a,1);d=(g[0]&128)===128,u=g[0]&127,u<126?o=3:u===126?o=1:o=2}else if(o===1){if(Yd(a)<2)break;const g=Fd(a,2);u=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(Yd(a)<8)break;const g=Fd(a,8),x=new DataView(g.buffer,g.byteOffset,g.length),_=x.getUint32(0);if(_>Math.pow(2,21)-1){m.enqueue(z0);break}u=_*Math.pow(2,32)+x.getUint32(4),o=3}else{if(Yd(a)<u)break;const g=Fd(a,u);m.enqueue(sy(d?g:m0.decode(g),s)),o=0}if(u===0||u>i){m.enqueue(z0);break}}}})}const DE=4;function Yt(i){if(i)return MO(i)}function MO(i){for(var s in Yt.prototype)i[s]=Yt.prototype[s];return i}Yt.prototype.on=Yt.prototype.addEventListener=function(i,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(s),this};Yt.prototype.once=function(i,s){function a(){this.off(i,a),s.apply(this,arguments)}return a.fn=s,this.on(i,a),this};Yt.prototype.off=Yt.prototype.removeListener=Yt.prototype.removeAllListeners=Yt.prototype.removeEventListener=function(i,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+i];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var o,u=0;u<a.length;u++)if(o=a[u],o===s||o.fn===s){a.splice(u,1);break}return a.length===0&&delete this._callbacks["$"+i],this};Yt.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var s=new Array(arguments.length-1),a=this._callbacks["$"+i],o=1;o<arguments.length;o++)s[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,u=a.length;o<u;++o)a[o].apply(this,s)}return this};Yt.prototype.emitReserved=Yt.prototype.emit;Yt.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};Yt.prototype.hasListeners=function(i){return!!this.listeners(i).length};const xh=typeof Promise=="function"&&typeof Promise.resolve=="function"?s=>Promise.resolve().then(s):(s,a)=>a(s,0),gs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),kO="arraybuffer";function CE(i,...s){return s.reduce((a,o)=>(i.hasOwnProperty(o)&&(a[o]=i[o]),a),{})}const VO=gs.setTimeout,UO=gs.clearTimeout;function Nh(i,s){s.useNativeTimers?(i.setTimeoutFn=VO.bind(gs),i.clearTimeoutFn=UO.bind(gs)):(i.setTimeoutFn=gs.setTimeout.bind(gs),i.clearTimeoutFn=gs.clearTimeout.bind(gs))}const zO=1.33;function BO(i){return typeof i=="string"?qO(i):Math.ceil((i.byteLength||i.size)*zO)}function qO(i){let s=0,a=0;for(let o=0,u=i.length;o<u;o++)s=i.charCodeAt(o),s<128?a+=1:s<2048?a+=2:s<55296||s>=57344?a+=3:(o++,a+=4);return a}function TE(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function LO(i){let s="";for(let a in i)i.hasOwnProperty(a)&&(s.length&&(s+="&"),s+=encodeURIComponent(a)+"="+encodeURIComponent(i[a]));return s}function HO(i){let s={},a=i.split("&");for(let o=0,u=a.length;o<u;o++){let d=a[o].split("=");s[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return s}class PO extends Error{constructor(s,a,o){super(s),this.description=a,this.context=o,this.type="TransportError"}}class ay extends Yt{constructor(s){super(),this.writable=!1,Nh(this,s),this.opts=s,this.query=s.query,this.socket=s.socket,this.supportsBinary=!s.forceBase64}onError(s,a,o){return super.emitReserved("error",new PO(s,a,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(s){this.readyState==="open"&&this.write(s)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(s){const a=sy(s,this.socket.binaryType);this.onPacket(a)}onPacket(s){super.emitReserved("packet",s)}onClose(s){this.readyState="closed",super.emitReserved("close",s)}pause(s){}createUri(s,a={}){return s+"://"+this._hostname()+this._port()+this.opts.path+this._query(a)}_hostname(){const s=this.opts.hostname;return s.indexOf(":")===-1?s:"["+s+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(s){const a=LO(s);return a.length?"?"+a:""}}class $O extends ay{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(s){this.readyState="pausing";const a=()=>{this.readyState="paused",s()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||a()})),this.writable||(o++,this.once("drain",function(){--o||a()}))}else a()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(s){const a=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};OO(s,this.socket.binaryType).forEach(a),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const s=()=>{this.write([{type:"close"}])};this.readyState==="open"?s():this.once("open",s)}write(s){this.writable=!1,TO(s,a=>{this.doWrite(a,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const s=this.opts.secure?"https":"http",a=this.query||{};return this.opts.timestampRequests!==!1&&(a[this.opts.timestampParam]=TE()),!this.supportsBinary&&!a.sid&&(a.b64=1),this.createUri(s,a)}}let OE=!1;try{OE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const IO=OE;function YO(){}class FO extends $O{constructor(s){if(super(s),typeof location<"u"){const a=location.protocol==="https:";let o=location.port;o||(o=a?"443":"80"),this.xd=typeof location<"u"&&s.hostname!==location.hostname||o!==s.port}}doWrite(s,a){const o=this.request({method:"POST",data:s});o.on("success",a),o.on("error",(u,d)=>{this.onError("xhr post error",u,d)})}doPoll(){const s=this.request();s.on("data",this.onData.bind(this)),s.on("error",(a,o)=>{this.onError("xhr poll error",a,o)}),this.pollXhr=s}}class xa extends Yt{constructor(s,a,o){super(),this.createRequest=s,Nh(this,o),this._opts=o,this._method=o.method||"GET",this._uri=a,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var s;const a=CE(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");a.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(a);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&o.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(s=this._opts.cookieJar)===null||s===void 0||s.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var u;o.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=xa.requestsCount++,xa.requests[this._index]=this)}_onError(s){this.emitReserved("error",s,this._xhr),this._cleanup(!0)}_cleanup(s){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=YO,s)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xa.requests[this._index],this._xhr=null}}_onLoad(){const s=this._xhr.responseText;s!==null&&(this.emitReserved("data",s),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xa.requestsCount=0;xa.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vw);else if(typeof addEventListener=="function"){const i="onpagehide"in gs?"pagehide":"unload";addEventListener(i,vw,!1)}}function vw(){for(let i in xa.requests)xa.requests.hasOwnProperty(i)&&xa.requests[i].abort()}const JO=(function(){const i=RE({xdomain:!1});return i&&i.responseType!==null})();class GO extends FO{constructor(s){super(s);const a=s&&s.forceBase64;this.supportsBinary=JO&&!a}request(s={}){return Object.assign(s,{xd:this.xd},this.opts),new xa(RE,this.uri(),s)}}function RE(i){const s=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!s||IO))return new XMLHttpRequest}catch{}if(!s)try{return new gs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const jE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class QO extends ay{get name(){return"websocket"}doOpen(){const s=this.uri(),a=this.opts.protocols,o=jE?{}:CE(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(s,a,o)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=s=>this.onClose({description:"websocket connection closed",context:s}),this.ws.onmessage=s=>this.onData(s.data),this.ws.onerror=s=>this.onError("websocket error",s)}write(s){this.writable=!1;for(let a=0;a<s.length;a++){const o=s[a],u=a===s.length-1;ny(o,this.supportsBinary,d=>{try{this.doWrite(o,d)}catch{}u&&xh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const s=this.opts.secure?"wss":"ws",a=this.query||{};return this.opts.timestampRequests&&(a[this.opts.timestampParam]=TE()),this.supportsBinary||(a.b64=1),this.createUri(s,a)}}const p0=gs.WebSocket||gs.MozWebSocket;class XO extends QO{createSocket(s,a,o){return jE?new p0(s,a,o):a?new p0(s,a):new p0(s)}doWrite(s,a){this.ws.send(a)}}class ZO extends ay{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(s){return this.emitReserved("error",s)}this._transport.closed.then(()=>{this.onClose()}).catch(s=>{this.onError("webtransport error",s)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(s=>{const a=jO(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=s.readable.pipeThrough(a).getReader(),u=RO();u.readable.pipeTo(s.writable),this._writer=u.writable.getWriter();const d=()=>{o.read().then(({done:m,value:g})=>{m||(this.onPacket(g),d())}).catch(m=>{})};d();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(s){this.writable=!1;for(let a=0;a<s.length;a++){const o=s[a],u=a===s.length-1;this._writer.write(o).then(()=>{u&&xh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var s;(s=this._transport)===null||s===void 0||s.close()}}const KO={websocket:XO,webtransport:ZO,polling:GO},WO=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,e5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function B0(i){if(i.length>8e3)throw"URI too long";const s=i,a=i.indexOf("["),o=i.indexOf("]");a!=-1&&o!=-1&&(i=i.substring(0,a)+i.substring(a,o).replace(/:/g,";")+i.substring(o,i.length));let u=WO.exec(i||""),d={},p=14;for(;p--;)d[e5[p]]=u[p]||"";return a!=-1&&o!=-1&&(d.source=s,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=t5(d,d.path),d.queryKey=n5(d,d.query),d}function t5(i,s){const a=/\/{2,9}/g,o=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&o.splice(0,1),s.slice(-1)=="/"&&o.splice(o.length-1,1),o}function n5(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,u,d){u&&(a[u]=d)}),a}const q0=typeof addEventListener=="function"&&typeof removeEventListener=="function",eh=[];q0&&addEventListener("offline",()=>{eh.forEach(i=>i())},!1);class si extends Yt{constructor(s,a){if(super(),this.binaryType=kO,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,s&&typeof s=="object"&&(a=s,s=null),s){const o=B0(s);a.hostname=o.host,a.secure=o.protocol==="https"||o.protocol==="wss",a.port=o.port,o.query&&(a.query=o.query)}else a.host&&(a.hostname=B0(a.host).host);Nh(this,a),this.secure=a.secure!=null?a.secure:typeof location<"u"&&location.protocol==="https:",a.hostname&&!a.port&&(a.port=this.secure?"443":"80"),this.hostname=a.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=a.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},a.transports.forEach(o=>{const u=o.prototype.name;this.transports.push(u),this._transportsByName[u]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},a),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=HO(this.opts.query)),q0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},eh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(s){const a=Object.assign({},this.opts.query);a.EIO=DE,a.transport=s,this.id&&(a.sid=this.id);const o=Object.assign({},this.opts,{query:a,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[s]);return new this._transportsByName[s](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const s=this.opts.rememberUpgrade&&si.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const a=this.createTransport(s);a.open(),this.setTransport(a)}setTransport(s){this.transport&&this.transport.removeAllListeners(),this.transport=s,s.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",a=>this._onClose("transport close",a))}onOpen(){this.readyState="open",si.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",s),this.emitReserved("heartbeat"),s.type){case"open":this.onHandshake(JSON.parse(s.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const a=new Error("server error");a.code=s.data,this._onError(a);break;case"message":this.emitReserved("data",s.data),this.emitReserved("message",s.data);break}}onHandshake(s){this.emitReserved("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this._pingInterval=s.pingInterval,this._pingTimeout=s.pingTimeout,this._maxPayload=s.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const s=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+s,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},s),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const s=this._getWritablePackets();this.transport.send(s),this._prevBufferLen=s.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let a=1;for(let o=0;o<this.writeBuffer.length;o++){const u=this.writeBuffer[o].data;if(u&&(a+=BO(u)),o>0&&a>this._maxPayload)return this.writeBuffer.slice(0,o);a+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const s=Date.now()>this._pingTimeoutTime;return s&&(this._pingTimeoutTime=0,xh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),s}write(s,a,o){return this._sendPacket("message",s,a,o),this}send(s,a,o){return this._sendPacket("message",s,a,o),this}_sendPacket(s,a,o,u){if(typeof a=="function"&&(u=a,a=void 0),typeof o=="function"&&(u=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const d={type:s,data:a,options:o};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),u&&this.once("flush",u),this.flush()}close(){const s=()=>{this._onClose("forced close"),this.transport.close()},a=()=>{this.off("upgrade",a),this.off("upgradeError",a),s()},o=()=>{this.once("upgrade",a),this.once("upgradeError",a)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():s()}):this.upgrading?o():s()),this}_onError(s){if(si.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",s),this._onClose("transport error",s)}_onClose(s,a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),q0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=eh.indexOf(this._offlineEventListener);o!==-1&&eh.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",s,a),this.writeBuffer=[],this._prevBufferLen=0}}}si.protocol=DE;class s5 extends si{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let s=0;s<this._upgrades.length;s++)this._probe(this._upgrades[s])}_probe(s){let a=this.createTransport(s),o=!1;si.priorWebsocketSuccess=!1;const u=()=>{o||(a.send([{type:"ping",data:"probe"}]),a.once("packet",w=>{if(!o)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",a),!a)return;si.priorWebsocketSuccess=a.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(_(),this.setTransport(a),a.send([{type:"upgrade"}]),this.emitReserved("upgrade",a),a=null,this.upgrading=!1,this.flush())})}else{const D=new Error("probe error");D.transport=a.name,this.emitReserved("upgradeError",D)}}))};function d(){o||(o=!0,_(),a.close(),a=null)}const p=w=>{const D=new Error("probe error: "+w);D.transport=a.name,d(),this.emitReserved("upgradeError",D)};function m(){p("transport closed")}function g(){p("socket closed")}function x(w){a&&w.name!==a.name&&d()}const _=()=>{a.removeListener("open",u),a.removeListener("error",p),a.removeListener("close",m),this.off("close",g),this.off("upgrading",x)};a.once("open",u),a.once("error",p),a.once("close",m),this.once("close",g),this.once("upgrading",x),this._upgrades.indexOf("webtransport")!==-1&&s!=="webtransport"?this.setTimeoutFn(()=>{o||a.open()},200):a.open()}onHandshake(s){this._upgrades=this._filterUpgrades(s.upgrades),super.onHandshake(s)}_filterUpgrades(s){const a=[];for(let o=0;o<s.length;o++)~this.transports.indexOf(s[o])&&a.push(s[o]);return a}}let a5=class extends s5{constructor(s,a={}){const o=typeof s=="object"?s:a;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(u=>KO[u]).filter(u=>!!u)),super(s,o)}};function r5(i,s="",a){let o=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),o=B0(i)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const d=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+d+":"+o.port+s,o.href=o.protocol+"://"+d+(a&&a.port===o.port?"":":"+o.port),o}const i5=typeof ArrayBuffer=="function",o5=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,ME=Object.prototype.toString,l5=typeof Blob=="function"||typeof Blob<"u"&&ME.call(Blob)==="[object BlobConstructor]",c5=typeof File=="function"||typeof File<"u"&&ME.call(File)==="[object FileConstructor]";function ry(i){return i5&&(i instanceof ArrayBuffer||o5(i))||l5&&i instanceof Blob||c5&&i instanceof File}function th(i,s){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let a=0,o=i.length;a<o;a++)if(th(i[a]))return!0;return!1}if(ry(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return th(i.toJSON(),!0);for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&th(i[a]))return!0;return!1}function u5(i){const s=[],a=i.data,o=i;return o.data=L0(a,s),o.attachments=s.length,{packet:o,buffers:s}}function L0(i,s){if(!i)return i;if(ry(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let o=0;o<i.length;o++)a[o]=L0(i[o],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(a[o]=L0(i[o],s));return a}return i}function f5(i,s){return i.data=H0(i.data,s),delete i.attachments,i}function H0(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=H0(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=H0(i[a],s));return i}var Jd={exports:{}},b0,xw;function d5(){if(xw)return b0;xw=1;var i=1e3,s=i*60,a=s*60,o=a*24,u=o*7,d=o*365.25;b0=function(_,w){w=w||{};var D=typeof _;if(D==="string"&&_.length>0)return p(_);if(D==="number"&&isFinite(_))return w.long?g(_):m(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function p(_){if(_=String(_),!(_.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(w){var D=parseFloat(w[1]),z=(w[2]||"ms").toLowerCase();switch(z){case"years":case"year":case"yrs":case"yr":case"y":return D*d;case"weeks":case"week":case"w":return D*u;case"days":case"day":case"d":return D*o;case"hours":case"hour":case"hrs":case"hr":case"h":return D*a;case"minutes":case"minute":case"mins":case"min":case"m":return D*s;case"seconds":case"second":case"secs":case"sec":case"s":return D*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return D;default:return}}}}function m(_){var w=Math.abs(_);return w>=o?Math.round(_/o)+"d":w>=a?Math.round(_/a)+"h":w>=s?Math.round(_/s)+"m":w>=i?Math.round(_/i)+"s":_+"ms"}function g(_){var w=Math.abs(_);return w>=o?x(_,w,o,"day"):w>=a?x(_,w,a,"hour"):w>=s?x(_,w,s,"minute"):w>=i?x(_,w,i,"second"):_+" ms"}function x(_,w,D,z){var q=w>=D*1.5;return Math.round(_/D)+" "+z+(q?"s":"")}return b0}var y0,Nw;function h5(){if(Nw)return y0;Nw=1;function i(s){o.debug=o,o.default=o,o.coerce=x,o.disable=m,o.enable=d,o.enabled=g,o.humanize=d5(),o.destroy=_,Object.keys(s).forEach(w=>{o[w]=s[w]}),o.names=[],o.skips=[],o.formatters={};function a(w){let D=0;for(let z=0;z<w.length;z++)D=(D<<5)-D+w.charCodeAt(z),D|=0;return o.colors[Math.abs(D)%o.colors.length]}o.selectColor=a;function o(w){let D,z=null,q,F;function Z(...ee){if(!Z.enabled)return;const te=Z,we=Number(new Date),De=we-(D||we);te.diff=De,te.prev=D,te.curr=we,D=we,ee[0]=o.coerce(ee[0]),typeof ee[0]!="string"&&ee.unshift("%O");let U=0;ee[0]=ee[0].replace(/%([a-zA-Z%])/g,(oe,W)=>{if(oe==="%%")return"%";U++;const Q=o.formatters[W];if(typeof Q=="function"){const H=ee[U];oe=Q.call(te,H),ee.splice(U,1),U--}return oe}),o.formatArgs.call(te,ee),(te.log||o.log).apply(te,ee)}return Z.namespace=w,Z.useColors=o.useColors(),Z.color=o.selectColor(w),Z.extend=u,Z.destroy=o.destroy,Object.defineProperty(Z,"enabled",{enumerable:!0,configurable:!1,get:()=>z!==null?z:(q!==o.namespaces&&(q=o.namespaces,F=o.enabled(w)),F),set:ee=>{z=ee}}),typeof o.init=="function"&&o.init(Z),Z}function u(w,D){const z=o(this.namespace+(typeof D>"u"?":":D)+w);return z.log=this.log,z}function d(w){o.save(w),o.namespaces=w,o.names=[],o.skips=[];const D=(typeof w=="string"?w:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const z of D)z[0]==="-"?o.skips.push(z.slice(1)):o.names.push(z)}function p(w,D){let z=0,q=0,F=-1,Z=0;for(;z<w.length;)if(q<D.length&&(D[q]===w[z]||D[q]==="*"))D[q]==="*"?(F=q,Z=z,q++):(z++,q++);else if(F!==-1)q=F+1,Z++,z=Z;else return!1;for(;q<D.length&&D[q]==="*";)q++;return q===D.length}function m(){const w=[...o.names,...o.skips.map(D=>"-"+D)].join(",");return o.enable(""),w}function g(w){for(const D of o.skips)if(p(w,D))return!1;for(const D of o.names)if(p(w,D))return!0;return!1}function x(w){return w instanceof Error?w.stack||w.message:w}function _(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}return y0=i,y0}var Sw;function m5(){return Sw||(Sw=1,(function(i,s){var a={};s.formatArgs=u,s.save=d,s.load=p,s.useColors=o,s.storage=m(),s.destroy=(()=>{let x=!1;return()=>{x||(x=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let x;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(x=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(x[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function u(x){if(x[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+x[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const _="color: "+this.color;x.splice(1,0,_,"color: inherit");let w=0,D=0;x[0].replace(/%[a-zA-Z%]/g,z=>{z!=="%%"&&(w++,z==="%c"&&(D=w))}),x.splice(D,0,_)}s.log=console.debug||console.log||(()=>{});function d(x){try{x?s.storage.setItem("debug",x):s.storage.removeItem("debug")}catch{}}function p(){let x;try{x=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!x&&typeof process<"u"&&"env"in process&&(x=a.DEBUG),x}function m(){try{return localStorage}catch{}}i.exports=h5()(s);const{formatters:g}=i.exports;g.j=function(x){try{return JSON.stringify(x)}catch(_){return"[UnexpectedJSONParseError]: "+_.message}}})(Jd,Jd.exports)),Jd.exports}var p5=m5();const b5=MC(p5),P0=b5("socket.io-parser"),y5=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(Ke||(Ke={}));class g5{constructor(s){this.replacer=s}encode(s){return P0("encoding packet %j",s),(s.type===Ke.EVENT||s.type===Ke.ACK)&&th(s)?this.encodeAsBinary({type:s.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:s.nsp,data:s.data,id:s.id}):[this.encodeAsString(s)]}encodeAsString(s){let a=""+s.type;return(s.type===Ke.BINARY_EVENT||s.type===Ke.BINARY_ACK)&&(a+=s.attachments+"-"),s.nsp&&s.nsp!=="/"&&(a+=s.nsp+","),s.id!=null&&(a+=s.id),s.data!=null&&(a+=JSON.stringify(s.data,this.replacer)),P0("encoded %j as %s",s,a),a}encodeAsBinary(s){const a=u5(s),o=this.encodeAsString(a.packet),u=a.buffers;return u.unshift(o),u}}class iy extends Yt{constructor(s){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof s=="function"?{reviver:s}:s)}add(s){let a;if(typeof s=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");a=this.decodeString(s);const o=a.type===Ke.BINARY_EVENT;o||a.type===Ke.BINARY_ACK?(a.type=o?Ke.EVENT:Ke.ACK,this.reconstructor=new v5(a),a.attachments===0&&super.emitReserved("decoded",a)):super.emitReserved("decoded",a)}else if(ry(s)||s.base64)if(this.reconstructor)a=this.reconstructor.takeBinaryData(s),a&&(this.reconstructor=null,super.emitReserved("decoded",a));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+s)}decodeString(s){let a=0;const o={type:Number(s.charAt(0))};if(Ke[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Ke.BINARY_EVENT||o.type===Ke.BINARY_ACK){const d=a+1;for(;s.charAt(++a)!=="-"&&a!=s.length;);const p=s.substring(d,a);if(p!=Number(p)||s.charAt(a)!=="-")throw new Error("Illegal attachments");const m=Number(p);if(!x5(m)||m<0)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=m}if(s.charAt(a+1)==="/"){const d=a+1;for(;++a&&!(s.charAt(a)===","||a===s.length););o.nsp=s.substring(d,a)}else o.nsp="/";const u=s.charAt(a+1);if(u!==""&&Number(u)==u){const d=a+1;for(;++a;){const p=s.charAt(a);if(p==null||Number(p)!=p){--a;break}if(a===s.length)break}o.id=Number(s.substring(d,a+1))}if(s.charAt(++a)){const d=this.tryParse(s.substr(a));if(iy.isPayloadValid(o.type,d))o.data=d;else throw new Error("invalid payload")}return P0("decoded %s as %j",s,o),o}tryParse(s){try{return JSON.parse(s,this.opts.reviver)}catch{return!1}}static isPayloadValid(s,a){switch(s){case Ke.CONNECT:return ww(a);case Ke.DISCONNECT:return a===void 0;case Ke.CONNECT_ERROR:return typeof a=="string"||ww(a);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(a)&&(typeof a[0]=="number"||typeof a[0]=="string"&&y5.indexOf(a[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(a)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class v5{constructor(s){this.packet=s,this.buffers=[],this.reconPack=s}takeBinaryData(s){if(this.buffers.push(s),this.buffers.length===this.reconPack.attachments){const a=f5(this.reconPack,this.buffers);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const x5=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};function ww(i){return Object.prototype.toString.call(i)==="[object Object]"}const N5=Object.freeze(Object.defineProperty({__proto__:null,Decoder:iy,Encoder:g5,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function js(i,s,a){return i.on(s,a),function(){i.off(s,a)}}const S5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kE extends Yt{constructor(s,a,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=s,this.nsp=a,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const s=this.io;this.subs=[js(s,"open",this.onopen.bind(this)),js(s,"packet",this.onpacket.bind(this)),js(s,"error",this.onerror.bind(this)),js(s,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...s){return s.unshift("message"),this.emit.apply(this,s),this}emit(s,...a){var o,u,d;if(S5.hasOwnProperty(s))throw new Error('"'+s.toString()+'" is a reserved event name');if(a.unshift(s),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const p={type:Ke.EVENT,data:a};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const _=this.ids++,w=a.pop();this._registerAckCallback(_,w),p.id=_}const m=(u=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||u===void 0?void 0:u.writable,g=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(s,a){var o;const u=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(u===void 0){this.acks[s]=a;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[s];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===s&&this.sendBuffer.splice(m,1);a.call(this,new Error("operation has timed out"))},u),p=(...m)=>{this.io.clearTimeoutFn(d),a.apply(this,m)};p.withError=!0,this.acks[s]=p}emitWithAck(s,...a){return new Promise((o,u)=>{const d=(p,m)=>p?u(p):o(m);d.withError=!0,a.push(d),this.emit(s,...a)})}_addToQueue(s){let a;typeof s[s.length-1]=="function"&&(a=s.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:s,flags:Object.assign({fromQueue:!0},this.flags)};s.push((u,...d)=>(this._queue[0],u!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),a&&a(u)):(this._queue.shift(),a&&a(null,...d)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(s=!1){if(!this.connected||this._queue.length===0)return;const a=this._queue[0];a.pending&&!s||(a.pending=!0,a.tryCount++,this.flags=a.flags,this.emit.apply(this,a.args))}packet(s){s.nsp=this.nsp,this.io._packet(s)}onopen(){typeof this.auth=="function"?this.auth(s=>{this._sendConnectPacket(s)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(s){this.packet({type:Ke.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},s):s})}onerror(s){this.connected||this.emitReserved("connect_error",s)}onclose(s,a){this.connected=!1,delete this.id,this.emitReserved("disconnect",s,a),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(s=>{if(!this.sendBuffer.some(o=>String(o.id)===s)){const o=this.acks[s];delete this.acks[s],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(s){if(s.nsp===this.nsp)switch(s.type){case Ke.CONNECT:s.data&&s.data.sid?this.onconnect(s.data.sid,s.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(s);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(s);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.CONNECT_ERROR:this.destroy();const o=new Error(s.data.message);o.data=s.data.data,this.emitReserved("connect_error",o);break}}onevent(s){const a=s.data||[];s.id!=null&&a.push(this.ack(s.id)),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(s){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const o of a)o.apply(this,s)}super.emit.apply(this,s),this._pid&&s.length&&typeof s[s.length-1]=="string"&&(this._lastOffset=s[s.length-1])}ack(s){const a=this;let o=!1;return function(...u){o||(o=!0,a.packet({type:Ke.ACK,id:s,data:u}))}}onack(s){const a=this.acks[s.id];typeof a=="function"&&(delete this.acks[s.id],a.withError&&s.data.unshift(null),a.apply(this,s.data))}onconnect(s,a){this.id=s,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(s=>this.emitEvent(s)),this.receiveBuffer=[],this.sendBuffer.forEach(s=>{this.notifyOutgoingListeners(s),this.packet(s)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(s=>s()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ke.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(s){return this.flags.compress=s,this}get volatile(){return this.flags.volatile=!0,this}timeout(s){return this.flags.timeout=s,this}onAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(s),this}prependAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(s),this}offAny(s){if(!this._anyListeners)return this;if(s){const a=this._anyListeners;for(let o=0;o<a.length;o++)if(s===a[o])return a.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(s){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(s),this}prependAnyOutgoing(s){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(s),this}offAnyOutgoing(s){if(!this._anyOutgoingListeners)return this;if(s){const a=this._anyOutgoingListeners;for(let o=0;o<a.length;o++)if(s===a[o])return a.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(s){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const o of a)o.apply(this,s.data)}}}function vl(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}vl.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),a=Math.floor(s*this.jitter*i);i=(Math.floor(s*10)&1)==0?i-a:i+a}return Math.min(i,this.max)|0};vl.prototype.reset=function(){this.attempts=0};vl.prototype.setMin=function(i){this.ms=i};vl.prototype.setMax=function(i){this.max=i};vl.prototype.setJitter=function(i){this.jitter=i};class $0 extends Yt{constructor(s,a){var o;super(),this.nsps={},this.subs=[],s&&typeof s=="object"&&(a=s,s=void 0),a=a||{},a.path=a.path||"/socket.io",this.opts=a,Nh(this,a),this.reconnection(a.reconnection!==!1),this.reconnectionAttempts(a.reconnectionAttempts||1/0),this.reconnectionDelay(a.reconnectionDelay||1e3),this.reconnectionDelayMax(a.reconnectionDelayMax||5e3),this.randomizationFactor((o=a.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new vl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(a.timeout==null?2e4:a.timeout),this._readyState="closed",this.uri=s;const u=a.parser||N5;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=a.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(s){return arguments.length?(this._reconnection=!!s,s||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(s){return s===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=s,this)}reconnectionDelay(s){var a;return s===void 0?this._reconnectionDelay:(this._reconnectionDelay=s,(a=this.backoff)===null||a===void 0||a.setMin(s),this)}randomizationFactor(s){var a;return s===void 0?this._randomizationFactor:(this._randomizationFactor=s,(a=this.backoff)===null||a===void 0||a.setJitter(s),this)}reconnectionDelayMax(s){var a;return s===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=s,(a=this.backoff)===null||a===void 0||a.setMax(s),this)}timeout(s){return arguments.length?(this._timeout=s,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(s){if(~this._readyState.indexOf("open"))return this;this.engine=new a5(this.uri,this.opts);const a=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const u=js(a,"open",function(){o.onopen(),s&&s()}),d=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),s?s(m):this.maybeReconnectOnOpen()},p=js(a,"error",d);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{u(),d(new Error("timeout")),a.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(u),this.subs.push(p),this}connect(s){return this.open(s)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const s=this.engine;this.subs.push(js(s,"ping",this.onping.bind(this)),js(s,"data",this.ondata.bind(this)),js(s,"error",this.onerror.bind(this)),js(s,"close",this.onclose.bind(this)),js(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(s){try{this.decoder.add(s)}catch(a){this.onclose("parse error",a)}}ondecoded(s){xh(()=>{this.emitReserved("packet",s)},this.setTimeoutFn)}onerror(s){this.emitReserved("error",s)}socket(s,a){let o=this.nsps[s];return o?this._autoConnect&&!o.active&&o.connect():(o=new kE(this,s,a),this.nsps[s]=o),o}_destroy(s){const a=Object.keys(this.nsps);for(const o of a)if(this.nsps[o].active)return;this._close()}_packet(s){const a=this.encoder.encode(s);for(let o=0;o<a.length;o++)this.engine.write(a[o],s.options)}cleanup(){this.subs.forEach(s=>s()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(s,a){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",s,a),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const s=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const a=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{s.skipReconnect||(this.emitReserved("reconnect_attempt",s.backoff.attempts),!s.skipReconnect&&s.open(u=>{u?(s._reconnecting=!1,s.reconnect(),this.emitReserved("reconnect_error",u)):s.onreconnect()}))},a);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const s=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",s)}}const au={};function nh(i,s){typeof i=="object"&&(s=i,i=void 0),s=s||{};const a=r5(i,s.path||"/socket.io"),o=a.source,u=a.id,d=a.path,p=au[u]&&d in au[u].nsps,m=s.forceNew||s["force new connection"]||s.multiplex===!1||p;let g;return m?g=new $0(o,s):(au[u]||(au[u]=new $0(o,s)),g=au[u]),a.query&&!s.query&&(s.query=a.queryKey),g.socket(a.path,s)}Object.assign(nh,{Manager:$0,Socket:kE,io:nh,connect:nh});const w5=B.createContext({connected:!1,subscribe:()=>()=>{}});function E5({children:i}){const s=B.useRef(null),[a,o]=B.useState(!1),u=B.useRef(new Map),d=B.useCallback((m,g)=>{const x=u.current;return x.has(m)||x.set(m,new Set),x.get(m).add(g),()=>{const _=x.get(m);_&&(_.delete(g),_.size===0&&x.delete(m))}},[]),p=B.useCallback((m,g)=>{for(const[x,_]of u.current)if(xE(m,x))for(const w of _)try{w(g)}catch{}},[]);return B.useEffect(()=>{const m=nh({path:"/socket.io",transports:["polling","websocket"],upgrade:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:2e3});return s.current=m,console.log("[lt-socketio] connecting..."),m.on("connect",()=>{console.log("[lt-socketio] connected, id:",m.id),o(!0)}),m.on("disconnect",g=>{console.log("[lt-socketio] disconnected:",g),o(!1)}),m.on("connect_error",g=>{console.warn("[lt-socketio] connect error:",g.message),o(!1)}),m.onAny((g,x)=>{if(g.startsWith("lt."))try{const _=typeof x=="string"?JSON.parse(x):x;p(g,_)}catch{}}),()=>{m.removeAllListeners(),m.disconnect(),s.current=null,o(!1)}},[p]),b.jsxDEV(w5.Provider,{value:{connected:a,subscribe:d},children:b.jsxDEV(vh.Provider,{value:{connected:a,subscribe:d},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:163,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:162,columnNumber:5},this)}function _5({children:i}){const[s,a]=B.useState(null);return B.useEffect(()=>{let o=!1;async function u(){var d;try{console.log("[lt-transport] detecting event transport...");const p=await fetch("/api/settings");if(!p.ok){console.warn("[lt-transport] settings fetch failed, falling back to socketio"),o||a("socketio");return}const m=await p.json(),g=(d=m==null?void 0:m.events)==null?void 0:d.transport;console.log("[lt-transport] server reports:",g),o||a(g==="nats"?"nats":"socketio")}catch(p){console.warn("[lt-transport] settings fetch error, falling back to socketio",p),o||a("socketio")}}return u(),()=>{o=!0}},[]),s==="nats"?b.jsxDEV(EO,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:48,columnNumber:12},this):s==="socketio"?b.jsxDEV(E5,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:52,columnNumber:12},this):b.jsxDEV(b.Fragment,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:56,columnNumber:10},this)}const VE=B.createContext(null),Ew="lt_sidebar_collapsed";function A5({children:i}){const[s,a]=B.useState(()=>{try{return localStorage.getItem(Ew)==="true"}catch{return!1}}),o=B.useCallback(()=>{a(u=>{const d=!u;try{localStorage.setItem(Ew,String(d))}catch{}return d})},[]);return b.jsxDEV(VE.Provider,{value:{collapsed:s,toggle:o},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSidebar.tsx",lineNumber:40,columnNumber:5},this)}function UE(){const i=B.useContext(VE);if(!i)throw new Error("useSidebar must be used within SidebarProvider");return i}function _6(i){const s=i?`?period=${i}`:"";return ii({queryKey:["escalationStats",i],queryFn:()=>Nt(`/escalations/stats${s}`)})}function A6(){return ii({queryKey:["escalationTypes"],queryFn:()=>Nt("/escalations/types")})}function D5(i){const s=new URLSearchParams;return i.status&&s.set("status",i.status),i.role&&s.set("role",i.role),i.type&&s.set("type",i.type),i.subtype&&s.set("subtype",i.subtype),i.assigned_to&&s.set("assigned_to",i.assigned_to),i.priority&&s.set("priority",String(i.priority)),i.limit&&s.set("limit",String(i.limit)),i.offset!==void 0&&s.set("offset",String(i.offset)),i.sort_by&&s.set("sort_by",i.sort_by),i.order&&s.set("order",i.order),ii({queryKey:["escalations",i],queryFn:()=>Nt(`/escalations?${s}`)})}function D6(i){return ii({queryKey:["escalations","by-workflow",i],queryFn:()=>Nt(`/escalations/by-workflow/${i}`),enabled:!!i})}function C6(i){return ii({queryKey:["escalations",i],queryFn:()=>Nt(`/escalations/${i}`),enabled:!!i})}function T6(){const i=Vs();return Sa({mutationFn:({id:s,durationMinutes:a})=>Nt(`/escalations/${s}/claim`,{method:"POST",body:JSON.stringify({durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function O6(){const i=Vs();return Sa({mutationFn:s=>Nt(`/escalations/${s}/release`,{method:"POST"}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function R6(){const i=Vs();return Sa({mutationFn:({id:s,resolverPayload:a})=>Nt(`/escalations/${s}/resolve`,{method:"POST",body:JSON.stringify({resolverPayload:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"}),i.invalidateQueries({queryKey:["tasks"],refetchType:"all"}),i.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}function j6(){const i=Vs();return Sa({mutationFn:({id:s,targetRole:a})=>Nt(`/escalations/${s}/escalate`,{method:"PATCH",body:JSON.stringify({targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function M6(){const i=Vs();return Sa({mutationFn:({ids:s,priority:a})=>Nt("/escalations/priority",{method:"PATCH",body:JSON.stringify({ids:s,priority:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function k6(){const i=Vs();return Sa({mutationFn:({ids:s,durationMinutes:a})=>Nt("/escalations/bulk-claim",{method:"POST",body:JSON.stringify({ids:s,durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function V6(){const i=Vs();return Sa({mutationFn:({ids:s,targetUserId:a,durationMinutes:o})=>Nt("/escalations/bulk-assign",{method:"POST",body:JSON.stringify({ids:s,targetUserId:a,durationMinutes:o})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function U6(){const i=Vs();return Sa({mutationFn:({ids:s,targetRole:a})=>Nt("/escalations/bulk-escalate",{method:"PATCH",body:JSON.stringify({ids:s,targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function z6(){const i=Vs();return Sa({mutationFn:({ids:s,hint:a})=>Nt("/escalations/bulk-triage",{method:"POST",body:JSON.stringify({ids:s,...a?{hint:a}:{}})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function C5(){const{user:i}=Ki(),s=i==null?void 0:i.userId,a=Vs(),{data:o}=D5({assigned_to:s,status:"pending"});NE(`${xO}.escalation.>`,()=>{s&&a.invalidateQueries({queryKey:["escalations"]})});const u=new Date;return((o==null?void 0:o.escalations)??[]).filter(p=>p.assigned_until&&new Date(p.assigned_until)>u).length}function T5({className:i="",onClick:s}){const{connected:a}=NO();return b.jsxDEV("button",{type:"button",onClick:s,className:`relative text-text-tertiary hover:text-accent transition-colors ${i}`,title:a?"Live events enabled":"Live events disconnected","aria-label":a?"Live events enabled":"Live events disconnected",children:[b.jsxDEV(qC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/NatsStatus.tsx",lineNumber:24,columnNumber:7},this),b.jsxDEV("span",{className:`absolute -top-1 -right-1 w-2 h-2 rounded-full ${a?"bg-emerald-500":"bg-text-tertiary"}`,"data-testid":"nats-status-dot"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/NatsStatus.tsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/NatsStatus.tsx",lineNumber:17,columnNumber:5},this)}function oy({size:i="sm",hideLabel:s=!1}){const a=i==="lg",o=a?"w-[16rem] h-[16rem] -rotate-[120deg] opacity-40 -ml-10":"w-[12.5rem] h-[12.5rem] -rotate-[120deg] opacity-40 -ml-8",u=a?"text-[44px] font-normal text-text-primary tracking-[0.15em] -ml-[12.5rem]":"text-[36px] font-normal text-text-primary tracking-[0.15em] -ml-[9.75rem]";return b.jsxDEV("div",{className:"flex items-center",style:{height:"50px"},children:[b.jsxDEV("img",{src:"/logo512.png",alt:"LongTail",className:`shrink-0 z-0 ${o}`},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:28,columnNumber:7},this),b.jsxDEV("span",{className:`z-[1] transition-opacity duration-300 ${u} ${s?"opacity-0":""}`,children:"LongTail"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:33,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:27,columnNumber:5},this)}function O5({onToggleEventFeed:i,onToggleDocs:s}){const{user:a,logout:o}=Ki(),u=C5(),[d,p]=B.useState(!1),m=B.useRef(null);return B.useEffect(()=>{if(!d)return;const g=x=>{m.current&&!m.current.contains(x.target)&&p(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[d]),b.jsxDEV("header",{className:"h-14 shrink-0 border-b border-surface-border bg-surface-raised flex items-center justify-between px-5 relative z-30",children:[b.jsxDEV("div",{className:"flex items-center gap-4",children:b.jsxDEV(uu,{to:"/","aria-label":"Home",children:b.jsxDEV(oy,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:31,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:30,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:29,columnNumber:7},this),b.jsxDEV("div",{className:"flex items-center gap-4",children:[b.jsxDEV("button",{onClick:s,className:"text-text-tertiary hover:text-accent transition-colors","aria-label":"Documentation",title:"Documentation",children:b.jsxDEV(Xw,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:43,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:37,columnNumber:9},this),b.jsxDEV(uu,{to:"/escalations/queue",className:"relative text-text-tertiary hover:text-accent transition-colors","aria-label":"Escalation inbox",title:"Escalation inbox",children:[b.jsxDEV(LC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:51,columnNumber:11},this),b.jsxDEV("span",{className:`absolute -top-1 -right-1 w-2 h-2 rounded-full ${u>0?"bg-status-warning":"bg-text-tertiary"}`},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:52,columnNumber:11},this),b.jsxDEV("span",{className:`absolute -top-2.5 -right-3 text-[8px] font-bold tabular-nums ${u>0?"text-status-warning":"text-text-tertiary"}`,children:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:53,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:45,columnNumber:9},this),b.jsxDEV(T5,{onClick:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:55,columnNumber:9},this),a&&b.jsxDEV("div",{className:"relative",ref:m,children:[b.jsxDEV("button",{onClick:()=>p(g=>!g),className:"btn-ghost text-xs flex items-center gap-1",children:[b.jsxDEV(HC,{className:"w-3.5 h-3.5 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:62,columnNumber:15},this),a.displayName||a.username||a.userId,b.jsxDEV("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:65,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:64,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:58,columnNumber:13},this),d&&b.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-surface-raised border border-surface-border rounded-md shadow-lg py-1 z-50",children:[b.jsxDEV(uu,{to:"/credentials",onClick:()=>p(!1),className:"block px-3 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Credentials"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:70,columnNumber:17},this),b.jsxDEV("button",{onClick:()=>{p(!1),o()},className:"block w-full text-left px-3 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Sign Out"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:77,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:69,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:28,columnNumber:5},this)}function ly({open:i,children:s}){const[a,o]=B.useState(i);return B.useEffect(()=>{i&&o(!0)},[i]),b.jsxDEV("div",{className:`grid transition-[grid-template-rows] duration-300 ease-out ${i?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,onTransitionEnd:()=>{i||o(!1)},children:b.jsxDEV("div",{className:"overflow-hidden",children:a?s:null},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/Collapsible.tsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/Collapsible.tsx",lineNumber:11,columnNumber:5},this)}function I0(i){return({isActive:s})=>{const a="flex items-center rounded-md transition-colors duration-150",o="bg-surface-hover text-text-primary font-medium",u="text-text-secondary hover:text-text-primary hover:bg-surface-hover";return i?`${a} justify-center w-10 h-10 mx-auto ${s?o:u}`:`${a} gap-3 px-4 py-2 text-sm ${s?o:u}`}}function R5(){return({isActive:i})=>`flex items-center gap-3 pl-11 pr-4 py-1.5 text-xs rounded-md transition-colors duration-150 ${i?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary"}`}function j5({group:i,collapsed:s}){const{pathname:a}=Zi(),o=i.matchPaths.some(m=>a.startsWith(m)),[u,d]=B.useState(o),p=u||o;return s?b.jsxDEV(b.Fragment,{children:i.items.map(m=>b.jsxDEV(sh,{to:m.to,className:I0(!0),title:m.label,children:m.icon&&b.jsxDEV(m.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:70,columnNumber:26},this)},m.to,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:64,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:62,columnNumber:7},this):b.jsxDEV("div",{children:[b.jsxDEV("button",{onClick:()=>d(m=>!m),className:"w-full flex items-center justify-between px-4 py-2 text-sm rounded-md transition-colors duration-150 text-text-secondary hover:text-text-primary hover:bg-surface-hover",children:[b.jsxDEV("span",{className:"flex items-center gap-3",children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:84,columnNumber:26},this),b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:85,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:83,columnNumber:9},this),b.jsxDEV("svg",{className:`w-3.5 h-3.5 text-text-tertiary transition-transform duration-150 ${p?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:94,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:79,columnNumber:7},this),b.jsxDEV(ly,{open:p,children:i.items.map(m=>b.jsxDEV(sh,{to:m.to,end:m.end,className:R5(),children:[m.icon&&b.jsxDEV(m.icon,{className:"w-4 h-4 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:100,columnNumber:26},this),b.jsxDEV("span",{children:m.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:101,columnNumber:13},this)]},m.to,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:99,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:97,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:78,columnNumber:5},this)}function M5(i){return i.kind==="group"}function k5({entry:i,collapsed:s}){const{pathname:a,search:o}=Zi();if(i.to.includes("?")){const[d,p]=i.to.split("?"),m=a===d&&o===`?${p}`,g=I0(s)({isActive:m});return b.jsxDEV(sh,{to:i.to,className:g,title:s?i.label:void 0,children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:128,columnNumber:24},this),!s&&b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:129,columnNumber:24},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:127,columnNumber:7},this)}return b.jsxDEV(sh,{to:i.to,end:i.end,className:I0(s),title:s?i.label:void 0,children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:141,columnNumber:22},this),!s&&b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:142,columnNumber:22},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:135,columnNumber:5},this)}function cy({heading:i,entries:s}){const{collapsed:a}=UE();return b.jsxDEV("div",{className:"space-y-1",children:[a?b.jsxDEV("div",{className:"h-px bg-surface-border mx-3 my-2",title:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:153,columnNumber:9},this):b.jsxDEV("p",{className:"px-4 py-2 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:155,columnNumber:9},this),s.map(o=>M5(o)?b.jsxDEV(j5,{group:o,collapsed:a},o.label,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:161,columnNumber:11},this):b.jsxDEV(k5,{entry:o,collapsed:a},o.to,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:163,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:151,columnNumber:5},this)}const V5=[{to:"/admin/users",label:"Accounts",icon:PC},{to:"/admin/roles",label:"Roles & Permissions",icon:$C},{to:"/admin/maintenance",label:"DB Maintenance",icon:IC},{to:"/admin/controlplane",label:"Task Queues",icon:YC}];function U5(){return b.jsxDEV(cy,{heading:"Admin",entries:V5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/AdminSidebar.tsx",lineNumber:17,columnNumber:10},this)}const z5=[{to:"/workflows/registry",label:"Workflow Registry",icon:FC},{to:"/workflows/start",label:"Invoke Workflow",icon:JC},{to:"/escalations/available",label:"All Escalations",icon:GC},{to:"/workflows/executions",label:"Durable Executions",icon:Zw}];function B5(){return b.jsxDEV(cy,{heading:"Durable Workflows",entries:z5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EngineerSidebar.tsx",lineNumber:12,columnNumber:10},this)}const q5=[{to:"/mcp/queries",label:"MCP Tool Designer",icon:QC},{to:"/mcp/servers",label:"MCP Server Tools",icon:XC},{to:"/mcp/workflows",label:"MCP Pipeline Tools",icon:Y0},{to:"/mcp/executions",label:"Pipeline Executions",icon:Zw}];function L5(){return b.jsxDEV(cy,{heading:"MCP Workflows",entries:q5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/McpSidebar.tsx",lineNumber:12,columnNumber:10},this)}function H5({children:i,className:s=""}){return b.jsxDEV("p",{className:`text-[10px] font-semibold uppercase tracking-widest text-text-tertiary ${s}`,children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/SectionLabel.tsx",lineNumber:10,columnNumber:5},this)}const g0=280,_w="cubic-bezier(0.4, 0, 0.2, 1)",Gd=40;function P5(i){if(!i)return"scale(0.92)";const s=window.innerWidth,a=window.innerHeight,o=s-Gd*2,u=a-Gd*2,d=i.width/o,p=i.height/u,m=i.left+i.width/2-(Gd+o/2),g=i.top+i.height/2-(Gd+u/2);return`translate(${m}px, ${g}px) scale(${d}, ${p})`}function zE({open:i,onClose:s,sourceRef:a,children:o}){const[u,d]=B.useState(null),p=B.useRef(null),m=B.useRef(!1);B.useEffect(()=>{var D,z;i&&!m.current?(p.current=((D=a==null?void 0:a.current)==null?void 0:D.getBoundingClientRect())??null,d("entering")):!i&&m.current&&u==="open"&&(p.current=((z=a==null?void 0:a.current)==null?void 0:z.getBoundingClientRect())??null,d("exiting")),m.current=i},[i,a,u]),B.useEffect(()=>{if(u!=="entering")return;const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>d("open"))});return()=>cancelAnimationFrame(D)},[u]),B.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),B.useEffect(()=>{if(!u)return;const D=z=>{z.key==="Escape"&&s()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[u,s]);const g=B.useCallback(D=>{D.propertyName==="transform"&&u==="exiting"&&d(null)},[u]);if(B.useEffect(()=>{if(u!=="exiting")return;const D=setTimeout(()=>d(null),g0+50);return()=>clearTimeout(D)},[u]),!u)return null;const x=u==="entering"||u==="exiting",_=x?P5(p.current):"none",w=x?0:1;return Gw.createPortal(b.jsxDEV("div",{className:"fixed inset-0 z-50 overflow-auto p-10",style:{transformOrigin:"center center",transition:`transform ${g0}ms ${_w}, opacity ${g0}ms ${_w}`,transform:_,opacity:w,backgroundColor:"#FFFFFF"},onTransitionEnd:g,children:o},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/FullscreenOverlay.tsx",lineNumber:93,columnNumber:5},this),document.body)}function $5(i){const s=i.trim().split(`
|
|
272
|
-
`);if(s.length<2)return i;const a=m=>m.split("|").map(g=>g.trim()).filter(Boolean),o=a(s[0]),u=s.slice(2),d=o.map(m=>`<th class="px-3 py-1.5 text-left text-[10px] font-semibold uppercase tracking-wider text-text-tertiary">${m}</th>`).join(""),p=u.map(m=>`<tr class="border-t border-surface-border">${a(m).map(_=>`<td class="px-3 py-1.5 text-xs text-text-secondary">${_}</td>`).join("")}</tr>`).join("");return`<table class="w-full my-3 text-xs"><thead><tr class="border-b border-surface-border">${d}</tr></thead><tbody>${p}</tbody></table>`}function Qd(i){return i.toLowerCase().replace(/<[^>]+>/g,"").replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").trim()}function
|
|
271
|
+
${m.stack}`),p.reject(x)):p.resolve(_))}});return g.requestSubject=s,this.protocol.publish(s,a,{reply:d,headers:o.headers}),p}else{const d=new lE(this.protocol.muxSubscriptions,s,o,u);this.protocol.request(d);try{this.publish(s,a,{reply:`${this.protocol.muxSubscriptions.baseInbox}${d.token}`,headers:o.headers})}catch(m){d.cancel(m)}const p=Promise.race([d.timer,d.deferred]);return p.catch(()=>{d.cancel()}),p}}flush(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.protocol.flush()}drain(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isDraining()?Promise.reject(ge.errorForCode(ue.ConnectionDraining)):(this.draining=!0,this.protocol.drain())}isClosed(){return this.protocol.isClosed()}isDraining(){return this.draining}getServer(){const s=this.protocol.getServer();return s?s.listen:""}status(){const s=new sn;return s.iterClosed.then(()=>{const a=this.listeners.indexOf(s);this.listeners.splice(a,1)}),this.listeners.push(s),s}get info(){return this.protocol.isClosed()?void 0:this.protocol.info}async context(){return(await this.request("$SYS.REQ.USER.INFO")).json((a,o)=>a==="time"?new Date(Date.parse(o)):o)}stats(){return{inBytes:this.protocol.inBytes,outBytes:this.protocol.outBytes,inMsgs:this.protocol.inMsgs,outMsgs:this.protocol.outMsgs}}async jetstreamManager(s={}){const a=new eO(this,s);if(s.checkAPI!==!1)try{await a.getAccountInfo()}catch(o){const u=o;throw u.code===ue.NoResponders&&(u.code=ue.JetStreamNotEnabled),u}return a}jetstream(s={}){return new ty(this,s)}getServerVersion(){const s=this.info;return s?Xi(s.version):void 0}async rtt(){if(!this.protocol._closed&&!this.protocol.connected)throw ge.errorForCode(ue.Disconnect);const s=Date.now();return await this.flush(),Date.now()-s}get features(){return this.protocol.features}get services(){return this._services||(this._services=new aO(this)),this._services}reconnect(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isDraining()?Promise.reject(ge.errorForCode(ue.ConnectionDraining)):this.protocol.reconnect()}}class aO{constructor(s){S(this,"nc");this.nc=s}add(s){try{return new Su(this.nc,s).start()}catch(a){return Promise.reject(a)}}client(s,a){return new z3(this.nc,s,a)}}class rO{constructor(s,a,o){S(this,"bucket");S(this,"sm");S(this,"prefixLen");this.bucket=s,this.prefixLen=a,this.sm=o}get key(){return this.sm.subject.substring(this.prefixLen)}get value(){return this.sm.data}get delta(){return 0}get created(){return this.sm.time}get revision(){return this.sm.seq}get operation(){return this.sm.header.get(fh)||"PUT"}get length(){const s=this.sm.header.get(Dn.MessageSizeHdr)||"";return s!==""?parseInt(s,10):this.sm.data.length}json(){return this.sm.json()}string(){return this.sm.string()}}class iO{constructor(s,a,o){S(this,"bucket");S(this,"key");S(this,"sm");this.bucket=s,this.key=a,this.sm=o}get value(){return this.sm.data}get created(){return new Date(X0(this.sm.info.timestampNanos))}get revision(){return this.sm.seq}get operation(){var s;return((s=this.sm.headers)==null?void 0:s.get(fh))||"PUT"}get delta(){return this.sm.info.pending}get length(){var a;const s=((a=this.sm.headers)==null?void 0:a.get(Dn.MessageSizeHdr))||"";return s!==""?parseInt(s,10):this.sm.data.length}json(){return this.sm.json()}string(){return this.sm.string()}}class gE extends QT{constructor(a,o,u){super(a.nc,o,u);S(this,"js");S(this,"monitor");this.js=a,this.monitor=null,this.sub.closed.then(()=>{this.monitor&&this.monitor.cancel()})}set info(a){this.sub.info=a}get info(){return this.sub.info}_resetOrderedConsumer(a){if(this.info===null||this.sub.isClosed())return;const o=nr(this.js.nc.options.inboxPrefix);this.js.nc._resub(this.sub,o);const d=this.info;d.config.name=ai.next(),d.ordered_consumer_sequence.delivery_seq=0,d.flow_control.heartbeat_count=0,d.flow_control.fc_count=0,d.flow_control.consumer_restarts++,d.deliver=o,d.config.deliver_subject=o,d.config.deliver_policy=Vt.StartSequence,d.config.opt_start_seq=a;const p={};p.stream_name=this.info.stream,p.config=d.config;const m=`${d.api.prefix}.CONSUMER.CREATE.${d.stream}`;this.js._request(m,p,{retries:-1}).then(g=>{const x=g,_=this.sub.info;_.last=x,this.info.config=x.config,this.info.name=x.name}).catch(g=>{const x=new ge(`unable to recreate ordered consumer ${d.stream} at seq ${a}`,ue.RequestError,g);this.sub.callback(x,{})})}_maybeSetupHbMonitoring(){var o,u;const a=((u=(o=this.info)==null?void 0:o.config)==null?void 0:u.idle_heartbeat)||0;a&&this._setupHbMonitoring(X0(a))}_setupHbMonitoring(a,o=0){const u={cancelAfter:0,maxOut:2};o&&(u.cancelAfter=o);const d=this.sub,p=m=>{var _,w,D,z;const g=TT(409,`${ys.IdleHeartbeatMissed}: ${m}`,this.sub.subject);if(!((_=this.info)==null?void 0:_.ordered))this.sub.callback(null,g);else{if(!this.js.nc.protocol.connected)return!1;const q=((D=(w=this.info)==null?void 0:w.ordered_consumer_sequence)==null?void 0:D.stream_seq)||0;return this._resetOrderedConsumer(q+1),(z=this.monitor)==null||z.restart(),!1}return!d.noIterator};this.monitor=new K0(a,p,u)}_checkHbOrderConsumer(a){const o=a.headers.get(Dn.ConsumerStalledHdr);o!==""&&this.js.nc.publish(o);const u=parseInt(a.headers.get(Dn.LastConsumerSeqHdr),10),d=this.info.ordered_consumer_sequence;return this.info.flow_control.heartbeat_count++,u!==d.delivery_seq&&this._resetOrderedConsumer(d.stream_seq+1),!1}_checkOrderedConsumer(a){const o=this.info.ordered_consumer_sequence,u=a.info.streamSequence,d=a.info.deliverySequence;return d!=o.delivery_seq+1?(this._resetOrderedConsumer(o.stream_seq+1),!1):(o.delivery_seq=d,o.stream_seq=u,!0)}async destroy(){this.isClosed()||await this.drain();const a=this.sub.info,o=a.config.durable_name||a.name,u=`${a.api.prefix}.CONSUMER.DELETE.${a.stream}.${o}`;await a.api._request(u)}async consumerInfo(){const a=this.sub.info,o=a.config.durable_name||a.name,u=`${a.api.prefix}.CONSUMER.INFO.${a.stream}.${o}`,d=await a.api._request(u);return a.last=d,d}}class oO extends gE{constructor(s,a,o){super(s,a,o)}pull(s={batch:1}){const{stream:a,config:o,name:u}=this.sub.info,d=o.durable_name??u,p={};if(p.batch=s.batch||1,p.no_wait=s.no_wait||!1,(s.max_bytes??0)>0){const x=this.js.nc.features.get(et.JS_PULL_MAX_BYTES);if(!x.ok)throw new Error(`max_bytes is only supported on servers ${x.min} or better`);p.max_bytes=s.max_bytes}let m=0;s.expires&&s.expires>0&&(m=s.expires,p.expires=Et(m));let g=0;if(s.idle_heartbeat&&s.idle_heartbeat>0&&(g=s.idle_heartbeat,p.idle_heartbeat=Et(g)),g&&m===0)throw new Error("idle_heartbeat requires expires");if(g>m)throw new Error("expires must be greater than idle_heartbeat");if(this.info){this.monitor&&this.monitor.cancel(),m&&g&&(this.monitor?this.monitor._change(g,m):this._setupHbMonitoring(g,m));const x=this.info.api,_=`${x.prefix}.CONSUMER.MSG.NEXT.${a}.${d}`,w=this.sub.subject;x.nc.publish(_,x.jc.encode(p),{reply:w})}}}function lO(i,s){return i?uO(s):cO(s)}function cO(i){return(s,a)=>s?[s,null]:(s=dl(a),s?[s,null]:[null,vu(a,i)])}function uO(i){return(s,a)=>{if(s)return[s,null];const o=dl(a);return o!==null?[vE(o),null]:[null,vu(a,i)]}}function vE(i){if(i!==null)switch(i.code){case ue.JetStream404NoMessages:case ue.JetStream408RequestTimeout:return null;case ue.JetStream409:return OT(i)?i:null;default:return i}return null}function fO(i){i&&i.ack()}function dO(i){const s=i.split(".");if(s.length===9&&s.splice(2,0,"_",""),s.length<11||s[0]!=="$JS"||s[1]!=="ACK")throw new Error("not js message");const a={};return a.domain=s[2]==="_"?"":s[2],a.account_hash=s[3],a.stream=s[4],a.consumer=s[5],a.deliveryCount=parseInt(s[6],10),a.redeliveryCount=a.deliveryCount,a.redelivered=a.deliveryCount>1,a.streamSequence=parseInt(s[7],10),a.deliverySequence=parseInt(s[8],10),a.timestampNanos=parseInt(s[9],10),a.pending=parseInt(s[10],10),a}class hO{constructor(s,a){S(this,"msg");S(this,"di");S(this,"didAck");S(this,"timeout");this.msg=s,this.didAck=!1,this.timeout=a}get subject(){return this.msg.subject}get sid(){return this.msg.sid}get data(){return this.msg.data}get headers(){return this.msg.headers}get info(){return this.di||(this.di=dO(this.reply)),this.di}get redelivered(){return this.info.deliveryCount>1}get reply(){return this.msg.reply||""}get seq(){return this.info.streamSequence}doAck(s){this.didAck||(this.didAck=!this.isWIP(s),this.msg.respond(s))}isWIP(s){return s.length===4&&s[0]===su[0]&&s[1]===su[1]&&s[2]===su[2]&&s[3]===su[3]}async ackAck(s){var o;s=s||{},s.timeout=s.timeout||this.timeout;const a=_t();if(this.didAck)a.resolve(!1);else if(this.didAck=!0,this.msg.reply){const d=this.msg.publisher,p=!((o=d.options)!=null&&o.noAsyncTraces),m=new lE(d.muxSubscriptions,this.msg.reply,{timeout:s.timeout},p);d.request(m);try{d.publish(this.msg.reply,mw,{reply:`${d.muxSubscriptions.baseInbox}${m.token}`})}catch(g){m.cancel(g)}try{await Promise.race([m.timer,m.deferred]),a.resolve(!0)}catch(g){m.cancel(g),a.reject(g)}}else a.resolve(!1);return a}ack(){this.doAck(mw)}nak(s){let a=J3;s&&(a=E0().encode(`-NAK ${JSON.stringify({delay:Et(s)})}`)),this.doAck(a)}working(){this.doAck(su)}next(s,a={batch:1}){const o={};o.batch=a.batch||1,o.no_wait=a.no_wait||!1,a.expires&&a.expires>0&&(o.expires=Et(a.expires));const u=ks().encode(o),d=yl.concat(G3,X3,u),p=s?{reply:s}:void 0;this.msg.respond(d,p)}term(s=""){let a=Q3;(s==null?void 0:s.length)>0&&(a=E0().encode(`+TERM ${s}`)),this.doAck(a)}json(){return this.msg.json()}string(){return this.msg.string()}}const mO="1.30.3",pO="nats.ws";class bO{constructor(){S(this,"version");S(this,"lang");S(this,"closeError");S(this,"connected");S(this,"done");S(this,"socket");S(this,"options");S(this,"socketClosed");S(this,"encrypted");S(this,"peeked");S(this,"yields");S(this,"signal");S(this,"closedNotification");this.version=mO,this.lang=pO,this.connected=!1,this.done=!1,this.socketClosed=!1,this.encrypted=!1,this.peeked=!1,this.yields=[],this.signal=_t(),this.closedNotification=_t()}async connect(s,a){const o=_t();if(a.tls)return o.reject(new ge("tls",ue.InvalidOption)),o;this.options=a;const u=s.src;if(a.wsFactory){const{socket:d,encrypted:p}=await a.wsFactory(s.src,a);this.socket=d,this.encrypted=p}else this.encrypted=u.indexOf("wss://")===0,this.socket=new WebSocket(u);return this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{this.isDiscarded()},this.socket.onmessage=d=>{if(this.isDiscarded())return;if(this.yields.push(new Uint8Array(d.data)),this.peeked){this.signal.resolve();return}const p=yl.concat(...this.yields),m=t3(p);if(m!==""){const g=T3.exec(m);if(!g){a.debug&&console.error("!!!",Hd(p)),o.reject(new Error("unexpected response from server"));return}try{const x=JSON.parse(g[1]);D3(x,this.options),this.peeked=!0,this.connected=!0,this.signal.resolve(),o.resolve()}catch(x){o.reject(x);return}}},this.socket.onclose=d=>{if(this.isDiscarded())return;this.socketClosed=!0;let p;this.done||(d.wasClean||(p=new Error(d.reason)),this._closed(p))},this.socket.onerror=d=>{if(this.isDiscarded())return;const p=d,m=new ge(p.message,ue.Unknown,new Error(p.error));o.reject(m)},o}disconnect(){this._closed(void 0,!0)}async _closed(s,a=!0){if(!this.isDiscarded()&&this.connected&&!this.done){if(this.closeError=s,!s)for(;!this.socketClosed&&this.socket.bufferedAmount>0;)await gl(100);this.done=!0;try{this.socket.close(s?1002:1e3,s?s.message:void 0)}catch{}a&&this.closedNotification.resolve(s)}}get isClosed(){return this.done}[Symbol.asyncIterator](){return this.iterate()}async*iterate(){for(;;){if(this.isDiscarded())return;this.yields.length===0&&await this.signal;const s=this.yields;this.yields=[];for(let a=0;a<s.length;a++)this.options.debug&&console.info(`> ${Hd(s[a])}`),yield s[a];if(this.done)break;this.yields.length===0&&(s.length=0,this.yields=s,this.signal=_t())}}isEncrypted(){return this.connected&&this.encrypted}send(s){if(!this.isDiscarded())try{this.socket.send(s.buffer),this.options.debug&&console.info(`< ${Hd(s)}`);return}catch(a){this.options.debug&&console.error(`!!! ${Hd(s)}: ${a}`)}}close(s){return this._closed(s,!1)}closed(){return this.closedNotification}isDiscarded(){return this.done?(this.discard(),!0):!1}discard(){var s;this.done=!0;try{(s=this.socket)==null||s.close()}catch{}}}function yO(i,s){/^(.*:\/\/)(.*)/.test(i)||(typeof s=="boolean"?i=`${s===!0?"https":"http"}://${i}`:i=`https://${i}`);let o=new URL(i);const u=o.protocol.toLowerCase();u==="ws:"&&(s=!1),u==="wss:"&&(s=!0),u!=="https:"&&u!=="http"&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2"),o=new URL(`http://${i}`));let d,p;const m=o.hostname,g=o.pathname,x=o.search||"";switch(u){case"http:":case"ws:":case"nats:":p=o.port||"80",d="ws:";break;case"https:":case"wss:":case"tls:":p=o.port||"443",d="wss:";break;default:p=o.port||s===!0?"443":"80",d=s===!0?"wss:":"ws:";break}return`${d}//${m}:${p}${g}${x}`}function gO(i={}){return XT({defaultPort:443,urlParseFn:yO,factory:()=>new bO}),ny.connect(i)}const vO="ws://localhost:9222",xO="dev_api_secret",NO="lt.events";function xE(i,s){const a=i.split("."),o=s.split(".");for(let u=0;u<o.length;u++){const d=o[u];if(d===">")return!0;if(u>=a.length||d!=="*"&&d!==a[u])return!1}return a.length===o.length}const vh=B.createContext({connected:!1,subscribe:()=>()=>{}});function SO(){const{connected:i}=B.useContext(vh);return{connected:i}}function NE(i,s){const{subscribe:a}=B.useContext(vh),o=B.useRef(s);o.current=s,B.useEffect(()=>a(i,d=>o.current(d)),[a,i])}const wO=B.createContext({connected:!1,subscribe:()=>()=>{}}),EO=E0();function _O({children:i}){const s=B.useRef(null),a=B.useRef(null),[o,u]=B.useState(!1),d=B.useRef(null),p=B.useRef(new Map),m=B.useCallback((_,w)=>{const D=p.current;return D.has(_)||D.set(_,new Set),D.get(_).add(w),()=>{const z=D.get(_);z&&(z.delete(w),z.size===0&&D.delete(_))}},[]),g=B.useCallback((_,w)=>{for(const[D,z]of p.current)if(xE(_,D))for(const q of z)try{q(w)}catch{}},[]),x=B.useCallback(async()=>{try{if(s.current)return;const _=await gO({servers:vO,token:xO,reconnect:!0,maxReconnectAttempts:-1,reconnectTimeWait:2e3});s.current=_,u(!0);const w=_.subscribe("lt.>");a.current=w,(async()=>{for await(const D of w)try{const z=JSON.parse(EO.decode(D.data));g(D.subject,z)}catch{}})(),(async()=>{for await(const D of _.status())D.type==="disconnect"||D.type==="error"?u(!1):D.type==="reconnect"&&u(!0)})()}catch{u(!1),d.current=setTimeout(x,3e3)}},[g]);return B.useEffect(()=>(x(),()=>{d.current&&clearTimeout(d.current),a.current&&a.current.unsubscribe(),s.current&&(s.current.close().catch(()=>{}),s.current=null),u(!1)}),[x]),b.jsxDEV(wO.Provider,{value:{connected:o,subscribe:m},children:b.jsxDEV(vh.Provider,{value:{connected:o,subscribe:m},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:192,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:191,columnNumber:5},this)}const Na=Object.create(null);Na.open="0";Na.close="1";Na.ping="2";Na.pong="3";Na.message="4";Na.upgrade="5";Na.noop="6";const Wd=Object.create(null);Object.keys(Na).forEach(i=>{Wd[Na[i]]=i});const B0={type:"error",data:"parser error"},SE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",wE=typeof ArrayBuffer=="function",EE=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,sy=({type:i,data:s},a,o)=>SE&&s instanceof Blob?a?o(s):bw(s,o):wE&&(s instanceof ArrayBuffer||EE(s))?a?o(s):bw(new Blob([s]),o):o(Na[i]+(s||"")),bw=(i,s)=>{const a=new FileReader;return a.onload=function(){const o=a.result.split(",")[1];s("b"+(o||""))},a.readAsDataURL(i)};function yw(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let m0;function AO(i,s){if(SE&&i.data instanceof Blob)return i.data.arrayBuffer().then(yw).then(s);if(wE&&(i.data instanceof ArrayBuffer||EE(i.data)))return s(yw(i.data));sy(i,!1,a=>{m0||(m0=new TextEncoder),s(m0.encode(a))})}const gw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<gw.length;i++)cu[gw.charCodeAt(i)]=i;const DO=i=>{let s=i.length*.75,a=i.length,o,u=0,d,p,m,g;i[i.length-1]==="="&&(s--,i[i.length-2]==="="&&s--);const x=new ArrayBuffer(s),_=new Uint8Array(x);for(o=0;o<a;o+=4)d=cu[i.charCodeAt(o)],p=cu[i.charCodeAt(o+1)],m=cu[i.charCodeAt(o+2)],g=cu[i.charCodeAt(o+3)],_[u++]=d<<2|p>>4,_[u++]=(p&15)<<4|m>>2,_[u++]=(m&3)<<6|g&63;return x},CO=typeof ArrayBuffer=="function",ay=(i,s)=>{if(typeof i!="string")return{type:"message",data:_E(i,s)};const a=i.charAt(0);return a==="b"?{type:"message",data:TO(i.substring(1),s)}:Wd[a]?i.length>1?{type:Wd[a],data:i.substring(1)}:{type:Wd[a]}:B0},TO=(i,s)=>{if(CO){const a=DO(i);return _E(a,s)}else return{base64:!0,data:i}},_E=(i,s)=>{switch(s){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},AE="",OO=(i,s)=>{const a=i.length,o=new Array(a);let u=0;i.forEach((d,p)=>{sy(d,!1,m=>{o[p]=m,++u===a&&s(o.join(AE))})})},RO=(i,s)=>{const a=i.split(AE),o=[];for(let u=0;u<a.length;u++){const d=ay(a[u],s);if(o.push(d),d.type==="error")break}return o};function jO(){return new TransformStream({transform(i,s){AO(i,a=>{const o=a.length;let u;if(o<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,o);else if(o<65536){u=new Uint8Array(3);const d=new DataView(u.buffer);d.setUint8(0,126),d.setUint16(1,o)}else{u=new Uint8Array(9);const d=new DataView(u.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(o))}i.data&&typeof i.data!="string"&&(u[0]|=128),s.enqueue(u),s.enqueue(a)})}})}let p0;function Fd(i){return i.reduce((s,a)=>s+a.length,0)}function Yd(i,s){if(i[0].length===s)return i.shift();const a=new Uint8Array(s);let o=0;for(let u=0;u<s;u++)a[u]=i[0][o++],o===i[0].length&&(i.shift(),o=0);return i.length&&o<i[0].length&&(i[0]=i[0].slice(o)),a}function MO(i,s){p0||(p0=new TextDecoder);const a=[];let o=0,u=-1,d=!1;return new TransformStream({transform(p,m){for(a.push(p);;){if(o===0){if(Fd(a)<1)break;const g=Yd(a,1);d=(g[0]&128)===128,u=g[0]&127,u<126?o=3:u===126?o=1:o=2}else if(o===1){if(Fd(a)<2)break;const g=Yd(a,2);u=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(Fd(a)<8)break;const g=Yd(a,8),x=new DataView(g.buffer,g.byteOffset,g.length),_=x.getUint32(0);if(_>Math.pow(2,21)-1){m.enqueue(B0);break}u=_*Math.pow(2,32)+x.getUint32(4),o=3}else{if(Fd(a)<u)break;const g=Yd(a,u);m.enqueue(ay(d?g:p0.decode(g),s)),o=0}if(u===0||u>i){m.enqueue(B0);break}}}})}const DE=4;function Ft(i){if(i)return kO(i)}function kO(i){for(var s in Ft.prototype)i[s]=Ft.prototype[s];return i}Ft.prototype.on=Ft.prototype.addEventListener=function(i,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(s),this};Ft.prototype.once=function(i,s){function a(){this.off(i,a),s.apply(this,arguments)}return a.fn=s,this.on(i,a),this};Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(i,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+i];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var o,u=0;u<a.length;u++)if(o=a[u],o===s||o.fn===s){a.splice(u,1);break}return a.length===0&&delete this._callbacks["$"+i],this};Ft.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var s=new Array(arguments.length-1),a=this._callbacks["$"+i],o=1;o<arguments.length;o++)s[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,u=a.length;o<u;++o)a[o].apply(this,s)}return this};Ft.prototype.emitReserved=Ft.prototype.emit;Ft.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};Ft.prototype.hasListeners=function(i){return!!this.listeners(i).length};const xh=typeof Promise=="function"&&typeof Promise.resolve=="function"?s=>Promise.resolve().then(s):(s,a)=>a(s,0),gs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),VO="arraybuffer";function CE(i,...s){return s.reduce((a,o)=>(i.hasOwnProperty(o)&&(a[o]=i[o]),a),{})}const UO=gs.setTimeout,zO=gs.clearTimeout;function Nh(i,s){s.useNativeTimers?(i.setTimeoutFn=UO.bind(gs),i.clearTimeoutFn=zO.bind(gs)):(i.setTimeoutFn=gs.setTimeout.bind(gs),i.clearTimeoutFn=gs.clearTimeout.bind(gs))}const BO=1.33;function qO(i){return typeof i=="string"?LO(i):Math.ceil((i.byteLength||i.size)*BO)}function LO(i){let s=0,a=0;for(let o=0,u=i.length;o<u;o++)s=i.charCodeAt(o),s<128?a+=1:s<2048?a+=2:s<55296||s>=57344?a+=3:(o++,a+=4);return a}function TE(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function HO(i){let s="";for(let a in i)i.hasOwnProperty(a)&&(s.length&&(s+="&"),s+=encodeURIComponent(a)+"="+encodeURIComponent(i[a]));return s}function PO(i){let s={},a=i.split("&");for(let o=0,u=a.length;o<u;o++){let d=a[o].split("=");s[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return s}class $O extends Error{constructor(s,a,o){super(s),this.description=a,this.context=o,this.type="TransportError"}}class ry extends Ft{constructor(s){super(),this.writable=!1,Nh(this,s),this.opts=s,this.query=s.query,this.socket=s.socket,this.supportsBinary=!s.forceBase64}onError(s,a,o){return super.emitReserved("error",new $O(s,a,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(s){this.readyState==="open"&&this.write(s)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(s){const a=ay(s,this.socket.binaryType);this.onPacket(a)}onPacket(s){super.emitReserved("packet",s)}onClose(s){this.readyState="closed",super.emitReserved("close",s)}pause(s){}createUri(s,a={}){return s+"://"+this._hostname()+this._port()+this.opts.path+this._query(a)}_hostname(){const s=this.opts.hostname;return s.indexOf(":")===-1?s:"["+s+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(s){const a=HO(s);return a.length?"?"+a:""}}class IO extends ry{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(s){this.readyState="pausing";const a=()=>{this.readyState="paused",s()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||a()})),this.writable||(o++,this.once("drain",function(){--o||a()}))}else a()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(s){const a=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};RO(s,this.socket.binaryType).forEach(a),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const s=()=>{this.write([{type:"close"}])};this.readyState==="open"?s():this.once("open",s)}write(s){this.writable=!1,OO(s,a=>{this.doWrite(a,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const s=this.opts.secure?"https":"http",a=this.query||{};return this.opts.timestampRequests!==!1&&(a[this.opts.timestampParam]=TE()),!this.supportsBinary&&!a.sid&&(a.b64=1),this.createUri(s,a)}}let OE=!1;try{OE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const FO=OE;function YO(){}class JO extends IO{constructor(s){if(super(s),typeof location<"u"){const a=location.protocol==="https:";let o=location.port;o||(o=a?"443":"80"),this.xd=typeof location<"u"&&s.hostname!==location.hostname||o!==s.port}}doWrite(s,a){const o=this.request({method:"POST",data:s});o.on("success",a),o.on("error",(u,d)=>{this.onError("xhr post error",u,d)})}doPoll(){const s=this.request();s.on("data",this.onData.bind(this)),s.on("error",(a,o)=>{this.onError("xhr poll error",a,o)}),this.pollXhr=s}}class xa extends Ft{constructor(s,a,o){super(),this.createRequest=s,Nh(this,o),this._opts=o,this._method=o.method||"GET",this._uri=a,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var s;const a=CE(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");a.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(a);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&o.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(s=this._opts.cookieJar)===null||s===void 0||s.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var u;o.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=xa.requestsCount++,xa.requests[this._index]=this)}_onError(s){this.emitReserved("error",s,this._xhr),this._cleanup(!0)}_cleanup(s){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=YO,s)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xa.requests[this._index],this._xhr=null}}_onLoad(){const s=this._xhr.responseText;s!==null&&(this.emitReserved("data",s),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xa.requestsCount=0;xa.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",vw);else if(typeof addEventListener=="function"){const i="onpagehide"in gs?"pagehide":"unload";addEventListener(i,vw,!1)}}function vw(){for(let i in xa.requests)xa.requests.hasOwnProperty(i)&&xa.requests[i].abort()}const GO=(function(){const i=RE({xdomain:!1});return i&&i.responseType!==null})();class QO extends JO{constructor(s){super(s);const a=s&&s.forceBase64;this.supportsBinary=GO&&!a}request(s={}){return Object.assign(s,{xd:this.xd},this.opts),new xa(RE,this.uri(),s)}}function RE(i){const s=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!s||FO))return new XMLHttpRequest}catch{}if(!s)try{return new gs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const jE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class XO extends ry{get name(){return"websocket"}doOpen(){const s=this.uri(),a=this.opts.protocols,o=jE?{}:CE(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(s,a,o)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=s=>this.onClose({description:"websocket connection closed",context:s}),this.ws.onmessage=s=>this.onData(s.data),this.ws.onerror=s=>this.onError("websocket error",s)}write(s){this.writable=!1;for(let a=0;a<s.length;a++){const o=s[a],u=a===s.length-1;sy(o,this.supportsBinary,d=>{try{this.doWrite(o,d)}catch{}u&&xh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const s=this.opts.secure?"wss":"ws",a=this.query||{};return this.opts.timestampRequests&&(a[this.opts.timestampParam]=TE()),this.supportsBinary||(a.b64=1),this.createUri(s,a)}}const b0=gs.WebSocket||gs.MozWebSocket;class ZO extends XO{createSocket(s,a,o){return jE?new b0(s,a,o):a?new b0(s,a):new b0(s)}doWrite(s,a){this.ws.send(a)}}class KO extends ry{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(s){return this.emitReserved("error",s)}this._transport.closed.then(()=>{this.onClose()}).catch(s=>{this.onError("webtransport error",s)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(s=>{const a=MO(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=s.readable.pipeThrough(a).getReader(),u=jO();u.readable.pipeTo(s.writable),this._writer=u.writable.getWriter();const d=()=>{o.read().then(({done:m,value:g})=>{m||(this.onPacket(g),d())}).catch(m=>{})};d();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(s){this.writable=!1;for(let a=0;a<s.length;a++){const o=s[a],u=a===s.length-1;this._writer.write(o).then(()=>{u&&xh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var s;(s=this._transport)===null||s===void 0||s.close()}}const WO={websocket:ZO,webtransport:KO,polling:QO},e5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function q0(i){if(i.length>8e3)throw"URI too long";const s=i,a=i.indexOf("["),o=i.indexOf("]");a!=-1&&o!=-1&&(i=i.substring(0,a)+i.substring(a,o).replace(/:/g,";")+i.substring(o,i.length));let u=e5.exec(i||""),d={},p=14;for(;p--;)d[t5[p]]=u[p]||"";return a!=-1&&o!=-1&&(d.source=s,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=n5(d,d.path),d.queryKey=s5(d,d.query),d}function n5(i,s){const a=/\/{2,9}/g,o=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&o.splice(0,1),s.slice(-1)=="/"&&o.splice(o.length-1,1),o}function s5(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,u,d){u&&(a[u]=d)}),a}const L0=typeof addEventListener=="function"&&typeof removeEventListener=="function",eh=[];L0&&addEventListener("offline",()=>{eh.forEach(i=>i())},!1);class si extends Ft{constructor(s,a){if(super(),this.binaryType=VO,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,s&&typeof s=="object"&&(a=s,s=null),s){const o=q0(s);a.hostname=o.host,a.secure=o.protocol==="https"||o.protocol==="wss",a.port=o.port,o.query&&(a.query=o.query)}else a.host&&(a.hostname=q0(a.host).host);Nh(this,a),this.secure=a.secure!=null?a.secure:typeof location<"u"&&location.protocol==="https:",a.hostname&&!a.port&&(a.port=this.secure?"443":"80"),this.hostname=a.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=a.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},a.transports.forEach(o=>{const u=o.prototype.name;this.transports.push(u),this._transportsByName[u]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},a),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=PO(this.opts.query)),L0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},eh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(s){const a=Object.assign({},this.opts.query);a.EIO=DE,a.transport=s,this.id&&(a.sid=this.id);const o=Object.assign({},this.opts,{query:a,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[s]);return new this._transportsByName[s](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const s=this.opts.rememberUpgrade&&si.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const a=this.createTransport(s);a.open(),this.setTransport(a)}setTransport(s){this.transport&&this.transport.removeAllListeners(),this.transport=s,s.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",a=>this._onClose("transport close",a))}onOpen(){this.readyState="open",si.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",s),this.emitReserved("heartbeat"),s.type){case"open":this.onHandshake(JSON.parse(s.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const a=new Error("server error");a.code=s.data,this._onError(a);break;case"message":this.emitReserved("data",s.data),this.emitReserved("message",s.data);break}}onHandshake(s){this.emitReserved("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this._pingInterval=s.pingInterval,this._pingTimeout=s.pingTimeout,this._maxPayload=s.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const s=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+s,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},s),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const s=this._getWritablePackets();this.transport.send(s),this._prevBufferLen=s.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let a=1;for(let o=0;o<this.writeBuffer.length;o++){const u=this.writeBuffer[o].data;if(u&&(a+=qO(u)),o>0&&a>this._maxPayload)return this.writeBuffer.slice(0,o);a+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const s=Date.now()>this._pingTimeoutTime;return s&&(this._pingTimeoutTime=0,xh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),s}write(s,a,o){return this._sendPacket("message",s,a,o),this}send(s,a,o){return this._sendPacket("message",s,a,o),this}_sendPacket(s,a,o,u){if(typeof a=="function"&&(u=a,a=void 0),typeof o=="function"&&(u=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const d={type:s,data:a,options:o};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),u&&this.once("flush",u),this.flush()}close(){const s=()=>{this._onClose("forced close"),this.transport.close()},a=()=>{this.off("upgrade",a),this.off("upgradeError",a),s()},o=()=>{this.once("upgrade",a),this.once("upgradeError",a)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():s()}):this.upgrading?o():s()),this}_onError(s){if(si.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",s),this._onClose("transport error",s)}_onClose(s,a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),L0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=eh.indexOf(this._offlineEventListener);o!==-1&&eh.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",s,a),this.writeBuffer=[],this._prevBufferLen=0}}}si.protocol=DE;class a5 extends si{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let s=0;s<this._upgrades.length;s++)this._probe(this._upgrades[s])}_probe(s){let a=this.createTransport(s),o=!1;si.priorWebsocketSuccess=!1;const u=()=>{o||(a.send([{type:"ping",data:"probe"}]),a.once("packet",w=>{if(!o)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",a),!a)return;si.priorWebsocketSuccess=a.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(_(),this.setTransport(a),a.send([{type:"upgrade"}]),this.emitReserved("upgrade",a),a=null,this.upgrading=!1,this.flush())})}else{const D=new Error("probe error");D.transport=a.name,this.emitReserved("upgradeError",D)}}))};function d(){o||(o=!0,_(),a.close(),a=null)}const p=w=>{const D=new Error("probe error: "+w);D.transport=a.name,d(),this.emitReserved("upgradeError",D)};function m(){p("transport closed")}function g(){p("socket closed")}function x(w){a&&w.name!==a.name&&d()}const _=()=>{a.removeListener("open",u),a.removeListener("error",p),a.removeListener("close",m),this.off("close",g),this.off("upgrading",x)};a.once("open",u),a.once("error",p),a.once("close",m),this.once("close",g),this.once("upgrading",x),this._upgrades.indexOf("webtransport")!==-1&&s!=="webtransport"?this.setTimeoutFn(()=>{o||a.open()},200):a.open()}onHandshake(s){this._upgrades=this._filterUpgrades(s.upgrades),super.onHandshake(s)}_filterUpgrades(s){const a=[];for(let o=0;o<s.length;o++)~this.transports.indexOf(s[o])&&a.push(s[o]);return a}}let r5=class extends a5{constructor(s,a={}){const o=typeof s=="object"?s:a;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(u=>WO[u]).filter(u=>!!u)),super(s,o)}};function i5(i,s="",a){let o=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),o=q0(i)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const d=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+d+":"+o.port+s,o.href=o.protocol+"://"+d+(a&&a.port===o.port?"":":"+o.port),o}const o5=typeof ArrayBuffer=="function",l5=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,ME=Object.prototype.toString,c5=typeof Blob=="function"||typeof Blob<"u"&&ME.call(Blob)==="[object BlobConstructor]",u5=typeof File=="function"||typeof File<"u"&&ME.call(File)==="[object FileConstructor]";function iy(i){return o5&&(i instanceof ArrayBuffer||l5(i))||c5&&i instanceof Blob||u5&&i instanceof File}function th(i,s){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let a=0,o=i.length;a<o;a++)if(th(i[a]))return!0;return!1}if(iy(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return th(i.toJSON(),!0);for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&th(i[a]))return!0;return!1}function f5(i){const s=[],a=i.data,o=i;return o.data=H0(a,s),o.attachments=s.length,{packet:o,buffers:s}}function H0(i,s){if(!i)return i;if(iy(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let o=0;o<i.length;o++)a[o]=H0(i[o],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(a[o]=H0(i[o],s));return a}return i}function d5(i,s){return i.data=P0(i.data,s),delete i.attachments,i}function P0(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=P0(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=P0(i[a],s));return i}var Jd={exports:{}},y0,xw;function h5(){if(xw)return y0;xw=1;var i=1e3,s=i*60,a=s*60,o=a*24,u=o*7,d=o*365.25;y0=function(_,w){w=w||{};var D=typeof _;if(D==="string"&&_.length>0)return p(_);if(D==="number"&&isFinite(_))return w.long?g(_):m(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function p(_){if(_=String(_),!(_.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(w){var D=parseFloat(w[1]),z=(w[2]||"ms").toLowerCase();switch(z){case"years":case"year":case"yrs":case"yr":case"y":return D*d;case"weeks":case"week":case"w":return D*u;case"days":case"day":case"d":return D*o;case"hours":case"hour":case"hrs":case"hr":case"h":return D*a;case"minutes":case"minute":case"mins":case"min":case"m":return D*s;case"seconds":case"second":case"secs":case"sec":case"s":return D*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return D;default:return}}}}function m(_){var w=Math.abs(_);return w>=o?Math.round(_/o)+"d":w>=a?Math.round(_/a)+"h":w>=s?Math.round(_/s)+"m":w>=i?Math.round(_/i)+"s":_+"ms"}function g(_){var w=Math.abs(_);return w>=o?x(_,w,o,"day"):w>=a?x(_,w,a,"hour"):w>=s?x(_,w,s,"minute"):w>=i?x(_,w,i,"second"):_+" ms"}function x(_,w,D,z){var q=w>=D*1.5;return Math.round(_/D)+" "+z+(q?"s":"")}return y0}var g0,Nw;function m5(){if(Nw)return g0;Nw=1;function i(s){o.debug=o,o.default=o,o.coerce=x,o.disable=m,o.enable=d,o.enabled=g,o.humanize=h5(),o.destroy=_,Object.keys(s).forEach(w=>{o[w]=s[w]}),o.names=[],o.skips=[],o.formatters={};function a(w){let D=0;for(let z=0;z<w.length;z++)D=(D<<5)-D+w.charCodeAt(z),D|=0;return o.colors[Math.abs(D)%o.colors.length]}o.selectColor=a;function o(w){let D,z=null,q,Y;function Z(...ee){if(!Z.enabled)return;const te=Z,we=Number(new Date),De=we-(D||we);te.diff=De,te.prev=D,te.curr=we,D=we,ee[0]=o.coerce(ee[0]),typeof ee[0]!="string"&&ee.unshift("%O");let U=0;ee[0]=ee[0].replace(/%([a-zA-Z%])/g,(oe,W)=>{if(oe==="%%")return"%";U++;const Q=o.formatters[W];if(typeof Q=="function"){const H=ee[U];oe=Q.call(te,H),ee.splice(U,1),U--}return oe}),o.formatArgs.call(te,ee),(te.log||o.log).apply(te,ee)}return Z.namespace=w,Z.useColors=o.useColors(),Z.color=o.selectColor(w),Z.extend=u,Z.destroy=o.destroy,Object.defineProperty(Z,"enabled",{enumerable:!0,configurable:!1,get:()=>z!==null?z:(q!==o.namespaces&&(q=o.namespaces,Y=o.enabled(w)),Y),set:ee=>{z=ee}}),typeof o.init=="function"&&o.init(Z),Z}function u(w,D){const z=o(this.namespace+(typeof D>"u"?":":D)+w);return z.log=this.log,z}function d(w){o.save(w),o.namespaces=w,o.names=[],o.skips=[];const D=(typeof w=="string"?w:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const z of D)z[0]==="-"?o.skips.push(z.slice(1)):o.names.push(z)}function p(w,D){let z=0,q=0,Y=-1,Z=0;for(;z<w.length;)if(q<D.length&&(D[q]===w[z]||D[q]==="*"))D[q]==="*"?(Y=q,Z=z,q++):(z++,q++);else if(Y!==-1)q=Y+1,Z++,z=Z;else return!1;for(;q<D.length&&D[q]==="*";)q++;return q===D.length}function m(){const w=[...o.names,...o.skips.map(D=>"-"+D)].join(",");return o.enable(""),w}function g(w){for(const D of o.skips)if(p(w,D))return!1;for(const D of o.names)if(p(w,D))return!0;return!1}function x(w){return w instanceof Error?w.stack||w.message:w}function _(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}return g0=i,g0}var Sw;function p5(){return Sw||(Sw=1,(function(i,s){var a={};s.formatArgs=u,s.save=d,s.load=p,s.useColors=o,s.storage=m(),s.destroy=(()=>{let x=!1;return()=>{x||(x=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let x;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(x=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(x[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function u(x){if(x[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+x[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const _="color: "+this.color;x.splice(1,0,_,"color: inherit");let w=0,D=0;x[0].replace(/%[a-zA-Z%]/g,z=>{z!=="%%"&&(w++,z==="%c"&&(D=w))}),x.splice(D,0,_)}s.log=console.debug||console.log||(()=>{});function d(x){try{x?s.storage.setItem("debug",x):s.storage.removeItem("debug")}catch{}}function p(){let x;try{x=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!x&&typeof process<"u"&&"env"in process&&(x=a.DEBUG),x}function m(){try{return localStorage}catch{}}i.exports=m5()(s);const{formatters:g}=i.exports;g.j=function(x){try{return JSON.stringify(x)}catch(_){return"[UnexpectedJSONParseError]: "+_.message}}})(Jd,Jd.exports)),Jd.exports}var b5=p5();const y5=MC(b5),$0=y5("socket.io-parser"),g5=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ke;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(Ke||(Ke={}));class v5{constructor(s){this.replacer=s}encode(s){return $0("encoding packet %j",s),(s.type===Ke.EVENT||s.type===Ke.ACK)&&th(s)?this.encodeAsBinary({type:s.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:s.nsp,data:s.data,id:s.id}):[this.encodeAsString(s)]}encodeAsString(s){let a=""+s.type;return(s.type===Ke.BINARY_EVENT||s.type===Ke.BINARY_ACK)&&(a+=s.attachments+"-"),s.nsp&&s.nsp!=="/"&&(a+=s.nsp+","),s.id!=null&&(a+=s.id),s.data!=null&&(a+=JSON.stringify(s.data,this.replacer)),$0("encoded %j as %s",s,a),a}encodeAsBinary(s){const a=f5(s),o=this.encodeAsString(a.packet),u=a.buffers;return u.unshift(o),u}}class oy extends Ft{constructor(s){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof s=="function"?{reviver:s}:s)}add(s){let a;if(typeof s=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");a=this.decodeString(s);const o=a.type===Ke.BINARY_EVENT;o||a.type===Ke.BINARY_ACK?(a.type=o?Ke.EVENT:Ke.ACK,this.reconstructor=new x5(a),a.attachments===0&&super.emitReserved("decoded",a)):super.emitReserved("decoded",a)}else if(iy(s)||s.base64)if(this.reconstructor)a=this.reconstructor.takeBinaryData(s),a&&(this.reconstructor=null,super.emitReserved("decoded",a));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+s)}decodeString(s){let a=0;const o={type:Number(s.charAt(0))};if(Ke[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Ke.BINARY_EVENT||o.type===Ke.BINARY_ACK){const d=a+1;for(;s.charAt(++a)!=="-"&&a!=s.length;);const p=s.substring(d,a);if(p!=Number(p)||s.charAt(a)!=="-")throw new Error("Illegal attachments");const m=Number(p);if(!N5(m)||m<0)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=m}if(s.charAt(a+1)==="/"){const d=a+1;for(;++a&&!(s.charAt(a)===","||a===s.length););o.nsp=s.substring(d,a)}else o.nsp="/";const u=s.charAt(a+1);if(u!==""&&Number(u)==u){const d=a+1;for(;++a;){const p=s.charAt(a);if(p==null||Number(p)!=p){--a;break}if(a===s.length)break}o.id=Number(s.substring(d,a+1))}if(s.charAt(++a)){const d=this.tryParse(s.substr(a));if(oy.isPayloadValid(o.type,d))o.data=d;else throw new Error("invalid payload")}return $0("decoded %s as %j",s,o),o}tryParse(s){try{return JSON.parse(s,this.opts.reviver)}catch{return!1}}static isPayloadValid(s,a){switch(s){case Ke.CONNECT:return ww(a);case Ke.DISCONNECT:return a===void 0;case Ke.CONNECT_ERROR:return typeof a=="string"||ww(a);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(a)&&(typeof a[0]=="number"||typeof a[0]=="string"&&g5.indexOf(a[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(a)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class x5{constructor(s){this.packet=s,this.buffers=[],this.reconPack=s}takeBinaryData(s){if(this.buffers.push(s),this.buffers.length===this.reconPack.attachments){const a=d5(this.reconPack,this.buffers);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const N5=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};function ww(i){return Object.prototype.toString.call(i)==="[object Object]"}const S5=Object.freeze(Object.defineProperty({__proto__:null,Decoder:oy,Encoder:v5,get PacketType(){return Ke}},Symbol.toStringTag,{value:"Module"}));function js(i,s,a){return i.on(s,a),function(){i.off(s,a)}}const w5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kE extends Ft{constructor(s,a,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=s,this.nsp=a,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const s=this.io;this.subs=[js(s,"open",this.onopen.bind(this)),js(s,"packet",this.onpacket.bind(this)),js(s,"error",this.onerror.bind(this)),js(s,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...s){return s.unshift("message"),this.emit.apply(this,s),this}emit(s,...a){var o,u,d;if(w5.hasOwnProperty(s))throw new Error('"'+s.toString()+'" is a reserved event name');if(a.unshift(s),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const p={type:Ke.EVENT,data:a};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const _=this.ids++,w=a.pop();this._registerAckCallback(_,w),p.id=_}const m=(u=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||u===void 0?void 0:u.writable,g=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(s,a){var o;const u=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(u===void 0){this.acks[s]=a;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[s];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===s&&this.sendBuffer.splice(m,1);a.call(this,new Error("operation has timed out"))},u),p=(...m)=>{this.io.clearTimeoutFn(d),a.apply(this,m)};p.withError=!0,this.acks[s]=p}emitWithAck(s,...a){return new Promise((o,u)=>{const d=(p,m)=>p?u(p):o(m);d.withError=!0,a.push(d),this.emit(s,...a)})}_addToQueue(s){let a;typeof s[s.length-1]=="function"&&(a=s.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:s,flags:Object.assign({fromQueue:!0},this.flags)};s.push((u,...d)=>(this._queue[0],u!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),a&&a(u)):(this._queue.shift(),a&&a(null,...d)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(s=!1){if(!this.connected||this._queue.length===0)return;const a=this._queue[0];a.pending&&!s||(a.pending=!0,a.tryCount++,this.flags=a.flags,this.emit.apply(this,a.args))}packet(s){s.nsp=this.nsp,this.io._packet(s)}onopen(){typeof this.auth=="function"?this.auth(s=>{this._sendConnectPacket(s)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(s){this.packet({type:Ke.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},s):s})}onerror(s){this.connected||this.emitReserved("connect_error",s)}onclose(s,a){this.connected=!1,delete this.id,this.emitReserved("disconnect",s,a),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(s=>{if(!this.sendBuffer.some(o=>String(o.id)===s)){const o=this.acks[s];delete this.acks[s],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(s){if(s.nsp===this.nsp)switch(s.type){case Ke.CONNECT:s.data&&s.data.sid?this.onconnect(s.data.sid,s.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(s);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(s);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.CONNECT_ERROR:this.destroy();const o=new Error(s.data.message);o.data=s.data.data,this.emitReserved("connect_error",o);break}}onevent(s){const a=s.data||[];s.id!=null&&a.push(this.ack(s.id)),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(s){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const o of a)o.apply(this,s)}super.emit.apply(this,s),this._pid&&s.length&&typeof s[s.length-1]=="string"&&(this._lastOffset=s[s.length-1])}ack(s){const a=this;let o=!1;return function(...u){o||(o=!0,a.packet({type:Ke.ACK,id:s,data:u}))}}onack(s){const a=this.acks[s.id];typeof a=="function"&&(delete this.acks[s.id],a.withError&&s.data.unshift(null),a.apply(this,s.data))}onconnect(s,a){this.id=s,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(s=>this.emitEvent(s)),this.receiveBuffer=[],this.sendBuffer.forEach(s=>{this.notifyOutgoingListeners(s),this.packet(s)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(s=>s()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ke.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(s){return this.flags.compress=s,this}get volatile(){return this.flags.volatile=!0,this}timeout(s){return this.flags.timeout=s,this}onAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(s),this}prependAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(s),this}offAny(s){if(!this._anyListeners)return this;if(s){const a=this._anyListeners;for(let o=0;o<a.length;o++)if(s===a[o])return a.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(s){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(s),this}prependAnyOutgoing(s){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(s),this}offAnyOutgoing(s){if(!this._anyOutgoingListeners)return this;if(s){const a=this._anyOutgoingListeners;for(let o=0;o<a.length;o++)if(s===a[o])return a.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(s){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const o of a)o.apply(this,s.data)}}}function vl(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}vl.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),a=Math.floor(s*this.jitter*i);i=(Math.floor(s*10)&1)==0?i-a:i+a}return Math.min(i,this.max)|0};vl.prototype.reset=function(){this.attempts=0};vl.prototype.setMin=function(i){this.ms=i};vl.prototype.setMax=function(i){this.max=i};vl.prototype.setJitter=function(i){this.jitter=i};class I0 extends Ft{constructor(s,a){var o;super(),this.nsps={},this.subs=[],s&&typeof s=="object"&&(a=s,s=void 0),a=a||{},a.path=a.path||"/socket.io",this.opts=a,Nh(this,a),this.reconnection(a.reconnection!==!1),this.reconnectionAttempts(a.reconnectionAttempts||1/0),this.reconnectionDelay(a.reconnectionDelay||1e3),this.reconnectionDelayMax(a.reconnectionDelayMax||5e3),this.randomizationFactor((o=a.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new vl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(a.timeout==null?2e4:a.timeout),this._readyState="closed",this.uri=s;const u=a.parser||S5;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=a.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(s){return arguments.length?(this._reconnection=!!s,s||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(s){return s===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=s,this)}reconnectionDelay(s){var a;return s===void 0?this._reconnectionDelay:(this._reconnectionDelay=s,(a=this.backoff)===null||a===void 0||a.setMin(s),this)}randomizationFactor(s){var a;return s===void 0?this._randomizationFactor:(this._randomizationFactor=s,(a=this.backoff)===null||a===void 0||a.setJitter(s),this)}reconnectionDelayMax(s){var a;return s===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=s,(a=this.backoff)===null||a===void 0||a.setMax(s),this)}timeout(s){return arguments.length?(this._timeout=s,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(s){if(~this._readyState.indexOf("open"))return this;this.engine=new r5(this.uri,this.opts);const a=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const u=js(a,"open",function(){o.onopen(),s&&s()}),d=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),s?s(m):this.maybeReconnectOnOpen()},p=js(a,"error",d);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{u(),d(new Error("timeout")),a.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(u),this.subs.push(p),this}connect(s){return this.open(s)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const s=this.engine;this.subs.push(js(s,"ping",this.onping.bind(this)),js(s,"data",this.ondata.bind(this)),js(s,"error",this.onerror.bind(this)),js(s,"close",this.onclose.bind(this)),js(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(s){try{this.decoder.add(s)}catch(a){this.onclose("parse error",a)}}ondecoded(s){xh(()=>{this.emitReserved("packet",s)},this.setTimeoutFn)}onerror(s){this.emitReserved("error",s)}socket(s,a){let o=this.nsps[s];return o?this._autoConnect&&!o.active&&o.connect():(o=new kE(this,s,a),this.nsps[s]=o),o}_destroy(s){const a=Object.keys(this.nsps);for(const o of a)if(this.nsps[o].active)return;this._close()}_packet(s){const a=this.encoder.encode(s);for(let o=0;o<a.length;o++)this.engine.write(a[o],s.options)}cleanup(){this.subs.forEach(s=>s()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(s,a){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",s,a),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const s=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const a=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{s.skipReconnect||(this.emitReserved("reconnect_attempt",s.backoff.attempts),!s.skipReconnect&&s.open(u=>{u?(s._reconnecting=!1,s.reconnect(),this.emitReserved("reconnect_error",u)):s.onreconnect()}))},a);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const s=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",s)}}const au={};function nh(i,s){typeof i=="object"&&(s=i,i=void 0),s=s||{};const a=i5(i,s.path||"/socket.io"),o=a.source,u=a.id,d=a.path,p=au[u]&&d in au[u].nsps,m=s.forceNew||s["force new connection"]||s.multiplex===!1||p;let g;return m?g=new I0(o,s):(au[u]||(au[u]=new I0(o,s)),g=au[u]),a.query&&!s.query&&(s.query=a.queryKey),g.socket(a.path,s)}Object.assign(nh,{Manager:I0,Socket:kE,io:nh,connect:nh});const E5=B.createContext({connected:!1,subscribe:()=>()=>{}});function _5({children:i}){const s=B.useRef(null),[a,o]=B.useState(!1),u=B.useRef(new Map),d=B.useCallback((m,g)=>{const x=u.current;return x.has(m)||x.set(m,new Set),x.get(m).add(g),()=>{const _=x.get(m);_&&(_.delete(g),_.size===0&&x.delete(m))}},[]),p=B.useCallback((m,g)=>{for(const[x,_]of u.current)if(xE(m,x))for(const w of _)try{w(g)}catch{}},[]);return B.useEffect(()=>{const m=nh({path:"/socket.io",transports:["polling","websocket"],upgrade:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:2e3});return s.current=m,console.log("[lt-socketio] connecting..."),m.on("connect",()=>{console.log("[lt-socketio] connected, id:",m.id),o(!0)}),m.on("disconnect",g=>{console.log("[lt-socketio] disconnected:",g),o(!1)}),m.on("connect_error",g=>{console.warn("[lt-socketio] connect error:",g.message),o(!1)}),m.onAny((g,x)=>{if(g.startsWith("lt."))try{const _=typeof x=="string"?JSON.parse(x):x;p(g,_)}catch{}}),()=>{m.removeAllListeners(),m.disconnect(),s.current=null,o(!1)}},[p]),b.jsxDEV(E5.Provider,{value:{connected:a,subscribe:d},children:b.jsxDEV(vh.Provider,{value:{connected:a,subscribe:d},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:163,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:162,columnNumber:5},this)}function A5({children:i}){const[s,a]=B.useState(null);return B.useEffect(()=>{let o=!1;async function u(){var d;try{console.log("[lt-transport] detecting event transport...");const p=await fetch("/api/settings");if(!p.ok){console.warn("[lt-transport] settings fetch failed, falling back to socketio"),o||a("socketio");return}const m=await p.json(),g=(d=m==null?void 0:m.events)==null?void 0:d.transport;console.log("[lt-transport] server reports:",g),o||a(g==="nats"?"nats":"socketio")}catch(p){console.warn("[lt-transport] settings fetch error, falling back to socketio",p),o||a("socketio")}}return u(),()=>{o=!0}},[]),s==="nats"?b.jsxDEV(_O,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:48,columnNumber:12},this):s==="socketio"?b.jsxDEV(_5,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:52,columnNumber:12},this):b.jsxDEV(b.Fragment,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:56,columnNumber:10},this)}const VE=B.createContext(null),Ew="lt_sidebar_collapsed";function D5({children:i}){const[s,a]=B.useState(()=>{try{return localStorage.getItem(Ew)==="true"}catch{return!1}}),o=B.useCallback(()=>{a(u=>{const d=!u;try{localStorage.setItem(Ew,String(d))}catch{}return d})},[]);return b.jsxDEV(VE.Provider,{value:{collapsed:s,toggle:o},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSidebar.tsx",lineNumber:40,columnNumber:5},this)}function UE(){const i=B.useContext(VE);if(!i)throw new Error("useSidebar must be used within SidebarProvider");return i}function T6(i){const s=i?`?period=${i}`:"";return ii({queryKey:["escalationStats",i],queryFn:()=>Nt(`/escalations/stats${s}`)})}function O6(){return ii({queryKey:["escalationTypes"],queryFn:()=>Nt("/escalations/types")})}function C5(i){const s=new URLSearchParams;return i.status&&s.set("status",i.status),i.role&&s.set("role",i.role),i.type&&s.set("type",i.type),i.subtype&&s.set("subtype",i.subtype),i.assigned_to&&s.set("assigned_to",i.assigned_to),i.priority&&s.set("priority",String(i.priority)),i.limit&&s.set("limit",String(i.limit)),i.offset!==void 0&&s.set("offset",String(i.offset)),i.sort_by&&s.set("sort_by",i.sort_by),i.order&&s.set("order",i.order),ii({queryKey:["escalations",i],queryFn:()=>Nt(`/escalations?${s}`)})}function R6(i){return ii({queryKey:["escalations","by-workflow",i],queryFn:()=>Nt(`/escalations/by-workflow/${i}`),enabled:!!i})}function j6(i){return ii({queryKey:["escalations",i],queryFn:()=>Nt(`/escalations/${i}`),enabled:!!i})}function M6(){const i=Vs();return Sa({mutationFn:({id:s,durationMinutes:a})=>Nt(`/escalations/${s}/claim`,{method:"POST",body:JSON.stringify({durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function k6(){const i=Vs();return Sa({mutationFn:s=>Nt(`/escalations/${s}/release`,{method:"POST"}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function V6(){const i=Vs();return Sa({mutationFn:({id:s,resolverPayload:a})=>Nt(`/escalations/${s}/resolve`,{method:"POST",body:JSON.stringify({resolverPayload:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"}),i.invalidateQueries({queryKey:["tasks"],refetchType:"all"}),i.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}function U6(){const i=Vs();return Sa({mutationFn:({id:s,targetRole:a})=>Nt(`/escalations/${s}/escalate`,{method:"PATCH",body:JSON.stringify({targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function z6(){const i=Vs();return Sa({mutationFn:({ids:s,priority:a})=>Nt("/escalations/priority",{method:"PATCH",body:JSON.stringify({ids:s,priority:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function B6(){const i=Vs();return Sa({mutationFn:({ids:s,durationMinutes:a})=>Nt("/escalations/bulk-claim",{method:"POST",body:JSON.stringify({ids:s,durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function q6(){const i=Vs();return Sa({mutationFn:({ids:s,targetUserId:a,durationMinutes:o})=>Nt("/escalations/bulk-assign",{method:"POST",body:JSON.stringify({ids:s,targetUserId:a,durationMinutes:o})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function L6(){const i=Vs();return Sa({mutationFn:({ids:s,targetRole:a})=>Nt("/escalations/bulk-escalate",{method:"PATCH",body:JSON.stringify({ids:s,targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function H6(){const i=Vs();return Sa({mutationFn:({ids:s,hint:a})=>Nt("/escalations/bulk-triage",{method:"POST",body:JSON.stringify({ids:s,...a?{hint:a}:{}})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function T5(){const{user:i}=Ki(),s=i==null?void 0:i.userId,a=Vs(),{data:o}=C5({assigned_to:s,status:"pending"});NE(`${NO}.escalation.>`,()=>{s&&a.invalidateQueries({queryKey:["escalations"]})});const u=new Date;return((o==null?void 0:o.escalations)??[]).filter(p=>p.assigned_until&&new Date(p.assigned_until)>u).length}function O5({className:i="",onClick:s}){const{connected:a}=SO();return b.jsxDEV("button",{type:"button",onClick:s,className:`relative text-text-tertiary hover:text-accent transition-colors ${i}`,title:a?"Live events enabled":"Live events disconnected","aria-label":a?"Live events enabled":"Live events disconnected",children:[b.jsxDEV(qC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/NatsStatus.tsx",lineNumber:24,columnNumber:7},this),b.jsxDEV("span",{className:`absolute -top-1 -right-1 w-2 h-2 rounded-full ${a?"bg-emerald-500":"bg-text-tertiary"}`,"data-testid":"nats-status-dot"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/NatsStatus.tsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/NatsStatus.tsx",lineNumber:17,columnNumber:5},this)}function ly({size:i="sm",hideLabel:s=!1}){const a=i==="lg",o=a?"w-[16rem] h-[16rem] -rotate-[120deg] opacity-40 -ml-10":"w-[12.5rem] h-[12.5rem] -rotate-[120deg] opacity-40 -ml-8",u=a?"text-[44px] font-normal text-text-primary tracking-[0.15em] -ml-[12.5rem]":"text-[36px] font-normal text-text-primary tracking-[0.15em] -ml-[9.75rem]";return b.jsxDEV("div",{className:"flex items-center",style:{height:"50px"},children:[b.jsxDEV("img",{src:"/logo512.png",alt:"LongTail",className:`shrink-0 z-0 ${o}`},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:28,columnNumber:7},this),b.jsxDEV("span",{className:`z-[1] transition-opacity duration-300 ${u} ${s?"opacity-0":""}`,children:"LongTail"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:33,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:27,columnNumber:5},this)}function R5({onToggleEventFeed:i,onToggleDocs:s}){const{user:a,logout:o}=Ki(),u=T5(),[d,p]=B.useState(!1),m=B.useRef(null);return B.useEffect(()=>{if(!d)return;const g=x=>{m.current&&!m.current.contains(x.target)&&p(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[d]),b.jsxDEV("header",{className:"h-14 shrink-0 border-b border-surface-border bg-surface-raised flex items-center justify-between px-5 relative z-30",children:[b.jsxDEV("div",{className:"flex items-center gap-4",children:b.jsxDEV(uu,{to:"/","aria-label":"Home",children:b.jsxDEV(ly,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:31,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:30,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:29,columnNumber:7},this),b.jsxDEV("div",{className:"flex items-center gap-4",children:[b.jsxDEV("button",{onClick:s,className:"text-text-tertiary hover:text-accent transition-colors","aria-label":"Documentation",title:"Documentation",children:b.jsxDEV(Xw,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:43,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:37,columnNumber:9},this),b.jsxDEV(uu,{to:"/escalations/queue",className:"relative text-text-tertiary hover:text-accent transition-colors","aria-label":"Escalation inbox",title:"Escalation inbox",children:[b.jsxDEV(LC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:51,columnNumber:11},this),b.jsxDEV("span",{className:`absolute -top-1 -right-1 w-2 h-2 rounded-full ${u>0?"bg-status-warning":"bg-text-tertiary"}`},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:52,columnNumber:11},this),b.jsxDEV("span",{className:`absolute -top-2.5 -right-3 text-[8px] font-bold tabular-nums ${u>0?"text-status-warning":"text-text-tertiary"}`,children:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:53,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:45,columnNumber:9},this),b.jsxDEV(O5,{onClick:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:55,columnNumber:9},this),a&&b.jsxDEV("div",{className:"relative",ref:m,children:[b.jsxDEV("button",{onClick:()=>p(g=>!g),className:"btn-ghost text-xs flex items-center gap-1",children:[b.jsxDEV(HC,{className:"w-3.5 h-3.5 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:62,columnNumber:15},this),a.displayName||a.username||a.userId,b.jsxDEV("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:65,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:64,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:58,columnNumber:13},this),d&&b.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-surface-raised border border-surface-border rounded-md shadow-lg py-1 z-50",children:[b.jsxDEV(uu,{to:"/credentials",onClick:()=>p(!1),className:"block px-3 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Credentials"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:70,columnNumber:17},this),b.jsxDEV("button",{onClick:()=>{p(!1),o()},className:"block w-full text-left px-3 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Sign Out"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:77,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:69,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:36,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:28,columnNumber:5},this)}function cy({open:i,children:s}){const[a,o]=B.useState(i);return B.useEffect(()=>{i&&o(!0)},[i]),b.jsxDEV("div",{className:`grid transition-[grid-template-rows] duration-300 ease-out ${i?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,onTransitionEnd:()=>{i||o(!1)},children:b.jsxDEV("div",{className:"overflow-hidden",children:a?s:null},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/Collapsible.tsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/Collapsible.tsx",lineNumber:11,columnNumber:5},this)}function F0(i){return({isActive:s})=>{const a="flex items-center rounded-md transition-colors duration-150",o="bg-surface-hover text-text-primary font-medium",u="text-text-secondary hover:text-text-primary hover:bg-surface-hover";return i?`${a} justify-center w-10 h-10 mx-auto ${s?o:u}`:`${a} gap-3 px-4 py-2 text-sm ${s?o:u}`}}function j5(){return({isActive:i})=>`flex items-center gap-3 pl-11 pr-4 py-1.5 text-xs rounded-md transition-colors duration-150 ${i?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary"}`}function M5({group:i,collapsed:s}){const{pathname:a}=Zi(),o=i.matchPaths.some(m=>a.startsWith(m)),[u,d]=B.useState(o),p=u||o;return s?b.jsxDEV(b.Fragment,{children:i.items.map(m=>b.jsxDEV(sh,{to:m.to,className:F0(!0),title:m.label,children:m.icon&&b.jsxDEV(m.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:70,columnNumber:26},this)},m.to,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:64,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:62,columnNumber:7},this):b.jsxDEV("div",{children:[b.jsxDEV("button",{onClick:()=>d(m=>!m),className:"w-full flex items-center justify-between px-4 py-2 text-sm rounded-md transition-colors duration-150 text-text-secondary hover:text-text-primary hover:bg-surface-hover",children:[b.jsxDEV("span",{className:"flex items-center gap-3",children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:84,columnNumber:26},this),b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:85,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:83,columnNumber:9},this),b.jsxDEV("svg",{className:`w-3.5 h-3.5 text-text-tertiary transition-transform duration-150 ${p?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:94,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:79,columnNumber:7},this),b.jsxDEV(cy,{open:p,children:i.items.map(m=>b.jsxDEV(sh,{to:m.to,end:m.end,className:j5(),children:[m.icon&&b.jsxDEV(m.icon,{className:"w-4 h-4 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:100,columnNumber:26},this),b.jsxDEV("span",{children:m.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:101,columnNumber:13},this)]},m.to,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:99,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:97,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:78,columnNumber:5},this)}function k5(i){return i.kind==="group"}function V5({entry:i,collapsed:s}){const{pathname:a,search:o}=Zi();if(i.to.includes("?")){const[d,p]=i.to.split("?"),m=a===d&&o===`?${p}`,g=F0(s)({isActive:m});return b.jsxDEV(sh,{to:i.to,className:g,title:s?i.label:void 0,children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:128,columnNumber:24},this),!s&&b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:129,columnNumber:24},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:127,columnNumber:7},this)}return b.jsxDEV(sh,{to:i.to,end:i.end,className:F0(s),title:s?i.label:void 0,children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:141,columnNumber:22},this),!s&&b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:142,columnNumber:22},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:135,columnNumber:5},this)}function Sh({heading:i,entries:s}){const{collapsed:a}=UE();return b.jsxDEV("div",{className:"space-y-1",children:[a?b.jsxDEV("div",{className:"h-px bg-surface-border mx-3 my-2",title:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:153,columnNumber:9},this):b.jsxDEV("p",{className:"px-4 py-2 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:155,columnNumber:9},this),s.map(o=>k5(o)?b.jsxDEV(M5,{group:o,collapsed:a},o.label,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:161,columnNumber:11},this):b.jsxDEV(V5,{entry:o,collapsed:a},o.to,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:163,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:151,columnNumber:5},this)}const U5=[{to:"/admin/users",label:"Accounts",icon:PC},{to:"/admin/roles",label:"Roles & Permissions",icon:$C},{to:"/admin/maintenance",label:"DB Maintenance",icon:IC},{to:"/admin/controlplane",label:"Task Queues",icon:FC}];function z5(){return b.jsxDEV(Sh,{heading:"Admin",entries:U5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/AdminSidebar.tsx",lineNumber:17,columnNumber:10},this)}const B5=[{to:"/workflows/registry",label:"Workflow Registry",icon:YC},{to:"/workflows/start",label:"Invoke Workflow",icon:JC},{to:"/escalations/available",label:"All Escalations",icon:GC},{to:"/workflows/executions",label:"Durable Executions",icon:Zw}];function q5(){return b.jsxDEV(Sh,{heading:"Durable Workflows",entries:B5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EngineerSidebar.tsx",lineNumber:12,columnNumber:10},this)}const L5=[{to:"/mcp/queries",label:"MCP Tool Designer",icon:QC},{to:"/mcp/servers",label:"MCP Server Tools",icon:XC},{to:"/mcp/workflows",label:"MCP Pipeline Tools",icon:Y0},{to:"/mcp/executions",label:"Pipeline Executions",icon:Zw}];function H5(){return b.jsxDEV(Sh,{heading:"MCP Workflows",entries:L5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/McpSidebar.tsx",lineNumber:12,columnNumber:10},this)}const P5=[{to:"/files",label:"Files",icon:ZC}];function $5(){return b.jsxDEV(Sh,{heading:"Storage",entries:P5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/FilesSidebar.tsx",lineNumber:9,columnNumber:10},this)}function I5({children:i,className:s=""}){return b.jsxDEV("p",{className:`text-[10px] font-semibold uppercase tracking-widest text-text-tertiary ${s}`,children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/SectionLabel.tsx",lineNumber:10,columnNumber:5},this)}const v0=280,_w="cubic-bezier(0.4, 0, 0.2, 1)",Gd=40;function F5(i){if(!i)return"scale(0.92)";const s=window.innerWidth,a=window.innerHeight,o=s-Gd*2,u=a-Gd*2,d=i.width/o,p=i.height/u,m=i.left+i.width/2-(Gd+o/2),g=i.top+i.height/2-(Gd+u/2);return`translate(${m}px, ${g}px) scale(${d}, ${p})`}function zE({open:i,onClose:s,sourceRef:a,children:o}){const[u,d]=B.useState(null),p=B.useRef(null),m=B.useRef(!1);B.useEffect(()=>{var D,z;i&&!m.current?(p.current=((D=a==null?void 0:a.current)==null?void 0:D.getBoundingClientRect())??null,d("entering")):!i&&m.current&&u==="open"&&(p.current=((z=a==null?void 0:a.current)==null?void 0:z.getBoundingClientRect())??null,d("exiting")),m.current=i},[i,a,u]),B.useEffect(()=>{if(u!=="entering")return;const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>d("open"))});return()=>cancelAnimationFrame(D)},[u]),B.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),B.useEffect(()=>{if(!u)return;const D=z=>{z.key==="Escape"&&s()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[u,s]);const g=B.useCallback(D=>{D.propertyName==="transform"&&u==="exiting"&&d(null)},[u]);if(B.useEffect(()=>{if(u!=="exiting")return;const D=setTimeout(()=>d(null),v0+50);return()=>clearTimeout(D)},[u]),!u)return null;const x=u==="entering"||u==="exiting",_=x?F5(p.current):"none",w=x?0:1;return Gw.createPortal(b.jsxDEV("div",{className:"fixed inset-0 z-50 overflow-auto p-10",style:{transformOrigin:"center center",transition:`transform ${v0}ms ${_w}, opacity ${v0}ms ${_w}`,transform:_,opacity:w,backgroundColor:"#FFFFFF"},onTransitionEnd:g,children:o},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/FullscreenOverlay.tsx",lineNumber:93,columnNumber:5},this),document.body)}function Y5(i){const s=i.trim().split(`
|
|
272
|
+
`);if(s.length<2)return i;const a=m=>m.split("|").map(g=>g.trim()).filter(Boolean),o=a(s[0]),u=s.slice(2),d=o.map(m=>`<th class="px-3 py-1.5 text-left text-[10px] font-semibold uppercase tracking-wider text-text-tertiary">${m}</th>`).join(""),p=u.map(m=>`<tr class="border-t border-surface-border">${a(m).map(_=>`<td class="px-3 py-1.5 text-xs text-text-secondary">${_}</td>`).join("")}</tr>`).join("");return`<table class="w-full my-3 text-xs"><thead><tr class="border-b border-surface-border">${d}</tr></thead><tbody>${p}</tbody></table>`}function Qd(i){return i.toLowerCase().replace(/<[^>]+>/g,"").replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").trim()}function J5(i){const s=[];let a=i.replace(/```(\w*)\n([\s\S]*?)```/g,(g,x,_)=>{const w=s.length;return s.push(`<pre class="bg-surface-sunken rounded p-3 my-2 overflow-x-auto text-[11px] leading-relaxed"><code>${_}</code></pre>`),`\0CODE${w}\0`});const o=/^(\|.+\|)\n(\|[-| :]+\|)\n((?:\|.+\|\n?)+)/gm;a=a.replace(o,(g,x,_,w)=>Y5(`${x}
|
|
273
273
|
${_}
|
|
274
|
-
${w.trimEnd()}`)),a=a.replace(/`([^`]+)`/g,'<code class="bg-surface-sunken px-1 py-0.5 rounded text-[11px]">$1</code>'),a=a.replace(/^#### (.+)$/gm,(g,x)=>`<h4 id="${Qd(x)}" class="text-xs font-semibold text-text-primary mt-4 mb-1">${x}</h4>`).replace(/^### (.+)$/gm,(g,x)=>`<h3 id="${Qd(x)}" class="text-sm font-semibold text-text-primary mt-5 mb-1.5">${x}</h3>`).replace(/^## (.+)$/gm,(g,x)=>`<h2 id="${Qd(x)}" class="text-base font-semibold text-text-primary mt-6 mb-2 pb-1 border-b border-surface-border">${x}</h2>`).replace(/^# (.+)$/gm,(g,x)=>`<h1 id="${Qd(x)}" class="text-lg font-bold text-text-primary mb-3">${x}</h1>`),a=a.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(#([^)]+)\)/g,'<a data-anchor="$2" class="text-accent hover:underline cursor-pointer">$1</a>').replace(/\[([^\]]+)\]\(([^)]*\.md(?:#[^)]*)?)\)/g,'<a data-doc-link="$2" class="text-accent hover:underline cursor-pointer">$1</a>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-accent hover:underline">$1</a>').replace(/^ - (.+)$/gm,'<li class="ml-8 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^ - (.+)$/gm,'<li class="ml-8 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^- (.+)$/gm,'<li class="ml-4 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^\d+\. (.+)$/gm,'<li class="ml-4 list-decimal text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^---+$/gm,'<hr class="border-surface-border my-4" />').replace(/(?:^> (.+)$\n?)+/gm,g=>{const x=g.replace(/^> /gm,"").trim(),_=/⚠️|warning|caution/i.test(x),w=/note:|ℹ️|info/i.test(x);return`<div class="${_?"bg-status-warning/5":w?"bg-accent/5":"bg-surface-sunken/50"} ${_?"border-status-warning":w?"border-accent":"border-text-tertiary"} border-l-2 rounded-r-md px-3 py-2 my-3 text-xs text-text-secondary leading-relaxed">${x}</div>`}).replace(/\n\n/g,"\0PARA\0").replace(/\n/g,"<br/>");const u=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=g=>new RegExp(`(${u(g)}[\\s\\S]*?<\\/li>(?:<br\\/>)?)+`,"g");a=a.replace(d('<li class="ml-8 list-disc'),g=>`<ul class="mb-3">${g}</ul>`),a=a.replace(d('<li class="ml-4 list-disc'),g=>`<ul class="mb-3">${g}</ul>`),a=a.replace(d('<li class="ml-4 list-decimal'),g=>`<ol class="list-decimal mb-3">${g}</ol>`),a=a.replace(/\x00CODE(\d+)\x00/g,(g,x)=>s[parseInt(x,10)]);const p="text-xs leading-relaxed text-text-secondary mb-2",m=/<\/(h[1-4]|pre|table|ul|ol|hr|div)>/;return a=a.split("\0PARA\0").map(g=>{const x=g.trim();if(!x)return"";const _=[];let w=x,D;for(;(D=m.exec(w))!==null;){const z=D.index+D[0].length;_.push(w.slice(0,z)),w=w.slice(z).replace(/^<br\/>/,"").trim(),m.lastIndex=0}return w&&_.push(w),_.map(z=>{const q=z.trim();return q?/^\s*<(h[1-4]|pre|table|ul|ol|hr|div)/.test(q)?q:`<p class="${p}">${q}</p>`:""}).join("")}).join(""),a}const Y5=/(\*\*|^#{1,4}\s|^- |^\d+\.\s|```|^\|.*\|$|\[.+\]\(.+\))/m;function F5(i){return Y5.test(i)}function uy({content:i,className:s,onClick:a}){const o=B.useMemo(()=>I5(i),[i]);return b.jsxDEV("div",{className:s,onClick:a,dangerouslySetInnerHTML:{__html:o}},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/MarkdownRenderer.tsx",lineNumber:136,columnNumber:10},this)}function J5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h8M4 18h12"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:4,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:3,columnNumber:5},this)}function G5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7l-5 5 5 5M16 7l5 5-5 5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:12,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:11,columnNumber:5},this)}function Q5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:20,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:19,columnNumber:5},this)}function X5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:27,columnNumber:5},this)}function Z5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9L3.5 3.5M9 15v4.5M9 15H4.5M9 15l-5.5 5.5M15 9h4.5M15 9V4.5M15 9l5.5-5.5M15 15h4.5M15 15v4.5m0-4.5l5.5 5.5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:36,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:35,columnNumber:5},this)}function K5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:44,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:43,columnNumber:5},this)}function dh({data:i,depth:s=0,generation:a}){const u=a!==void 0&&a>0&&a%2===1?!1:s>0,[d,p]=B.useState(u),[m,g]=B.useState(a);if(a!==void 0&&a!==m&&(g(a),p(a%2===0&&s>0)),i==null)return b.jsxDEV("span",{className:"text-text-tertiary italic",children:"null"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:25,columnNumber:12},this);if(typeof i=="string")return b.jsxDEV("span",{className:"text-text-primary",children:['"',i,'"']},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:29,columnNumber:12},this);if(typeof i=="number"||typeof i=="boolean")return b.jsxDEV("span",{className:"text-text-primary font-medium",children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:33,columnNumber:12},this);if(Array.isArray(i))return i.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"[]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:37,columnNumber:35},this):d?b.jsxDEV("button",{onClick:()=>p(!1),className:"text-text-secondary hover:text-text-primary",children:["[",i.length," items]"]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:41,columnNumber:9},this):b.jsxDEV("span",{children:[b.jsxDEV("button",{onClick:()=>p(!0),className:"text-text-tertiary hover:text-text-primary",children:"["},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:52,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:i.map((x,_)=>b.jsxDEV("div",{children:[b.jsxDEV(dh,{data:x,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:61,columnNumber:15},this),_<i.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:62,columnNumber:39},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:60,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:66,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:51,columnNumber:7},this);if(typeof i=="object"){const x=Object.entries(i);return x.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"{}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:73,columnNumber:38},this):d?b.jsxDEV("button",{onClick:()=>p(!1),className:"text-text-secondary hover:text-text-primary",children:["{","...","}"]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:77,columnNumber:9},this):b.jsxDEV("span",{children:[b.jsxDEV("button",{onClick:()=>p(!0),className:"text-text-tertiary hover:text-text-primary",children:"{"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:88,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:x.map(([_,w],D)=>b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"text-text-secondary",children:_},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:97,columnNumber:15},this),b.jsxDEV("span",{className:"text-text-tertiary",children:": "},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:98,columnNumber:15},this),b.jsxDEV(dh,{data:w,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:99,columnNumber:15},this),D<x.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:100,columnNumber:42},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:96,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:94,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:87,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:109,columnNumber:10},this)}function pu({data:i,depth:s=0}){if(i==null)return b.jsxDEV("span",{className:"text-text-tertiary italic",children:"null"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:118,columnNumber:12},this);if(typeof i=="string")return i.length>40&&F5(i)?b.jsxDEV(uy,{content:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:123,columnNumber:14},this):b.jsxDEV("span",{className:"text-text-primary",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:125,columnNumber:12},this);if(typeof i=="number"||typeof i=="boolean")return b.jsxDEV("span",{className:"text-text-primary font-medium",children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:129,columnNumber:12},this);if(Array.isArray(i))return i.length===0?b.jsxDEV("span",{className:"text-text-tertiary italic",children:"empty list"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:133,columnNumber:35},this):b.jsxDEV("div",{className:"space-y-2",children:i.map((a,o)=>b.jsxDEV("div",{className:"flex items-baseline gap-2",children:[b.jsxDEV("span",{className:"text-text-tertiary text-[10px] shrink-0",children:[o+1,"."]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:138,columnNumber:13},this),b.jsxDEV("div",{className:"flex-1",children:b.jsxDEV(pu,{data:a,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:140,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:139,columnNumber:13},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:137,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:135,columnNumber:7},this);if(typeof i=="object"){const a=Object.entries(i);return a.length===0?b.jsxDEV("span",{className:"text-text-tertiary italic",children:"empty"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:150,columnNumber:38},this):b.jsxDEV("div",{className:s>0?"pl-4 border-l border-surface-border space-y-3":"space-y-3",children:a.map(([o,u])=>{const d=u===null||typeof u!="object";return b.jsxDEV("div",{children:[b.jsxDEV("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-0.5",children:o.replace(/[_-]/g," ")},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:157,columnNumber:15},this),d?b.jsxDEV("p",{className:"text-sm text-text-primary",children:b.jsxDEV(pu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:162,columnNumber:19},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:161,columnNumber:17},this):b.jsxDEV(pu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:165,columnNumber:17},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:156,columnNumber:13},this)})},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:152,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:174,columnNumber:10},this)}function Aw({mode:i,setMode:s,isCollapsed:a,onToggleCollapse:o,onCopy:u,copied:d,onFullscreen:p,onClose:m,large:g}){const x=g?"w-5 h-5":"w-3.5 h-3.5",_=`${g?"p-2":"p-1.5"} rounded text-text-tertiary hover:text-text-primary hover:bg-surface-raised transition-colors duration-150`;return b.jsxDEV("div",{className:"flex items-center gap-0.5 bg-surface-sunken/80 rounded-md backdrop-blur-sm",children:[i==="json"&&b.jsxDEV("button",{onClick:o,className:_,title:a?"Expand all":"Collapse all",children:a?b.jsxDEV(K5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:207,columnNumber:26},this):b.jsxDEV(Z5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:207,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:206,columnNumber:9},this),b.jsxDEV("button",{onClick:()=>s(i==="json"?"tree":"json"),className:_,title:i==="json"?"Outline view":"JSON view",children:i==="json"?b.jsxDEV(J5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:211,columnNumber:28},this):b.jsxDEV(G5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:211,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:210,columnNumber:7},this),b.jsxDEV("button",{onClick:u,className:_,title:"Copy to clipboard",children:d?b.jsxDEV(X5,{className:`${x} text-status-success`},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:214,columnNumber:19},this):b.jsxDEV(Q5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:214,columnNumber:77},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:213,columnNumber:7},this),p&&b.jsxDEV("button",{onClick:p,className:_,title:"Fullscreen",children:b.jsxDEV(Kw,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:218,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:217,columnNumber:9},this),m&&b.jsxDEV("button",{onClick:m,className:_,title:"Close (Esc)",children:b.jsxDEV(Ww,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:223,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:222,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:204,columnNumber:5},this)}function W5({data:i,label:s,variant:a,defaultCollapsed:o=!1,defaultMode:u}){const d=B.useRef(null),[p,m]=B.useState(u??"json"),[g,x]=B.useState(!1),[_,w]=B.useState(!1),[D,z]=B.useState(0),[q,F]=B.useState(1),Z=D%2===0,ee=q%2===0,te=B.useCallback(()=>z(H=>H+1),[]),we=B.useCallback(()=>F(H=>H+1),[]);let De=i;if(typeof i=="string")try{De=JSON.parse(i)}catch{}const U=async()=>{const H=typeof i=="string"?i:JSON.stringify(De,null,2);await navigator.clipboard.writeText(H),x(!0),setTimeout(()=>x(!1),2e3)},ne=B.useCallback(()=>{F(1),w(!0)},[]),oe=a==="panel",W=oe?"border border-accent-muted/40 rounded-lg p-3 bg-surface-hover/30":"",Q=oe?"font-mono text-xs leading-relaxed bg-white rounded-md p-4 overflow-x-auto":"font-mono text-xs leading-relaxed bg-surface-sunken rounded-md p-4 overflow-x-auto";return b.jsxDEV("div",{className:W,children:[s&&b.jsxDEV(H5,{children:s},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:295,columnNumber:17},this),b.jsxDEV("div",{ref:d,className:"relative",children:[b.jsxDEV("div",{className:"absolute top-2 right-2 z-[5]",children:b.jsxDEV(Aw,{mode:p,setMode:m,isCollapsed:Z,onToggleCollapse:te,onCopy:U,copied:g,onFullscreen:ne},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:298,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:297,columnNumber:9},this),b.jsxDEV("div",{className:Q,children:p==="json"?b.jsxDEV(dh,{data:De,generation:D},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:306,columnNumber:30},this):b.jsxDEV(pu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:306,columnNumber:83},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:296,columnNumber:7},this),b.jsxDEV(zE,{open:_,onClose:()=>w(!1),sourceRef:d,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV(Aw,{mode:p,setMode:m,isCollapsed:ee,onToggleCollapse:we,onCopy:U,copied:g,onClose:()=>w(!1),large:!0},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:312,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:311,columnNumber:9},this),b.jsxDEV("div",{className:"font-mono text-sm leading-relaxed",children:p==="json"?b.jsxDEV(dh,{data:De,generation:q},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:321,columnNumber:30},this):b.jsxDEV(pu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:321,columnNumber:85},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:320,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:310,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:294,columnNumber:5},this)}const e4=100,Dw=500;let t4=0;const BE={"escalation.created":"text-status-warning","escalation.claimed":"text-blue-400","escalation.released":"text-text-tertiary","escalation.resolved":"text-status-success","task.created":"text-accent","task.completed":"text-status-success","task.failed":"text-status-error","task.escalated":"text-status-warning","workflow.started":"text-accent","workflow.completed":"text-status-success","workflow.failed":"text-status-error","activity.started":"text-blue-400","activity.completed":"text-status-success","activity.failed":"text-status-error",milestone:"text-violet-400"};function Cw({event:i,forceExpanded:s=!1}){var D,z;const[a,o]=B.useState(s),u=BE[i.type]||"text-text-tertiary";B.useEffect(()=>{o(s)},[s]);const d=s,p=d?"text-xs":"text-[9px]",m=d?"text-xs":"text-[9px]",g=d?"text-xs":"text-[9px]",x=d?"w-3.5 h-3.5":"w-2.5 h-2.5",_=d?"py-2 px-4":"py-1 px-3",w=d?"pb-4 px-4":"pb-2 px-3";return b.jsxDEV("div",{className:"border-b border-surface-border/30 last:border-b-0",children:[b.jsxDEV("button",{onClick:()=>o(!a),className:`flex items-center gap-2 ${_} w-full text-left hover:bg-surface-hover/50 transition-colors`,children:[b.jsxDEV("span",{className:`${p} font-mono text-text-tertiary whitespace-nowrap tabular-nums shrink-0`,children:new Date(i.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("span",{className:`${m} font-medium px-1 py-0.5 rounded ${u} bg-surface-sunken whitespace-nowrap shrink-0`,children:i.type},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:61,columnNumber:9},this),b.jsxDEV("span",{className:`${g} text-text-tertiary font-mono flex-1 min-w-0 truncate`,children:[(D=i.data)!=null&&D.workflowId?String(i.data.workflowId):"",(z=i.data)!=null&&z.escalationId?` esc:${String(i.data.escalationId).slice(0,12)}`:""]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:64,columnNumber:9},this),b.jsxDEV("svg",{className:`${x} text-text-tertiary shrink-0 transition-transform duration-150 ${a?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:72,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:54,columnNumber:7},this),b.jsxDEV(ly,{open:a,children:b.jsxDEV("div",{className:w,children:b.jsxDEV(W5,{data:i.data},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:77,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:76,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:53,columnNumber:5},this)}function n4({open:i,onToggle:s}){const[a,o]=B.useState([]),[u,d]=B.useState(!1),p=B.useRef(null),m=B.useRef(new Map);return NE("lt.events.>",B.useCallback(g=>{const x=String(g.type||"unknown");if(x.startsWith("mesh."))return;const _=`${x}:${g.timestamp||""}:${g.escalationId||g.workflowId||g.taskId||""}`,w=Date.now(),D=m.current.get(_);if(!(D&&w-D<Dw)){if(m.current.set(_,w),m.current.size>200)for(const[z,q]of m.current)w-q>Dw*2&&m.current.delete(z);o(z=>[{id:++t4,type:x,timestamp:g.timestamp||new Date().toISOString(),data:g},...z].slice(0,e4))}},[])),B.useEffect(()=>{i&&p.current&&(p.current.scrollTop=0)},[a.length,i]),b.jsxDEV("div",{className:"fixed bottom-0 left-0 right-0 z-40 border-t border-surface-border bg-surface-raised",children:[b.jsxDEV("button",{onClick:s,className:"flex items-center gap-2 w-full px-4 py-1.5 text-left hover:bg-surface-hover transition-colors",children:[i?b.jsxDEV(ZC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:133,columnNumber:17},this):b.jsxDEV(KC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:133,columnNumber:74},this),b.jsxDEV("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Event Stream"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:134,columnNumber:9},this),a.length>0&&b.jsxDEV("span",{className:"text-[9px] text-text-tertiary",children:[a.length," events"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:138,columnNumber:11},this),a.length>0&&!i&&b.jsxDEV("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${BE[a[0].type]||"text-text-tertiary"} bg-surface-sunken`,children:a[0].type},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:143,columnNumber:11},this),a.length>0&&b.jsxDEV("span",{className:"ml-auto flex items-center gap-1",children:[b.jsxDEV("span",{className:"text-text-tertiary hover:text-text-primary p-0.5 cursor-pointer",title:"Fullscreen",onClick:g=>{g.stopPropagation(),d(!0)},children:b.jsxDEV(Kw,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:154,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:149,columnNumber:13},this),b.jsxDEV("span",{className:"text-text-tertiary hover:text-text-primary p-0.5 cursor-pointer",title:"Clear events",onClick:g=>{g.stopPropagation(),o([])},children:b.jsxDEV(WC,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:161,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:156,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:148,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:129,columnNumber:7},this),b.jsxDEV(ly,{open:i,children:b.jsxDEV("div",{ref:p,className:"h-48 overflow-y-auto",children:a.length===0?b.jsxDEV("p",{className:"text-[10px] text-text-tertiary py-4 text-center",children:"Waiting for events..."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:171,columnNumber:13},this):a.map(g=>b.jsxDEV(Cw,{event:g},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:173,columnNumber:33},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:169,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:168,columnNumber:7},this),b.jsxDEV(zE,{open:u,onClose:()=>d(!1),sourceRef:p,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV("button",{onClick:()=>d(!1),className:"p-2 rounded text-text-tertiary hover:text-text-primary hover:bg-surface-raised transition-colors duration-150 bg-surface-sunken/80 backdrop-blur-sm",title:"Close (Esc)",children:b.jsxDEV(Ww,{className:"w-5 h-5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:185,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:180,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:179,columnNumber:9},this),a.length===0?b.jsxDEV("p",{className:"text-sm text-text-tertiary py-8",children:"No events captured"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:189,columnNumber:11},this):a.map(g=>b.jsxDEV(Cw,{event:g,forceExpanded:!0},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:191,columnNumber:31},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:178,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:127,columnNumber:5},this)}function s4(){return ii({queryKey:["docs"],queryFn:()=>Nt("/docs"),staleTime:5*6e4})}function a4(i){return ii({queryKey:["docs",i],queryFn:()=>Nt(`/docs/read?path=${encodeURIComponent(i)}`),enabled:!!i,staleTime:5*6e4})}function r4(){const[i,s]=B.useState([]),[a,o]=B.useState([]),[u,d]=B.useState(null),p=B.useRef(u),m=B.useRef(i),g=B.useRef(a);p.current=u,m.current=i,g.current=a;const x=B.useCallback((q,F)=>{var ee;const Z=p.current;if(Z){const te=((ee=F==null?void 0:F.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...Z,scrollTop:te}])}o([]),d({path:q,scrollTop:0})},[]),_=B.useCallback(q=>{var te;const F=m.current;if(F.length===0)return;const Z=F[F.length-1],ee=p.current;if(ee){const we=((te=q==null?void 0:q.current)==null?void 0:te.scrollTop)??0;o([...g.current,{...ee,scrollTop:we}])}s(F.slice(0,-1)),d(Z),requestAnimationFrame(()=>{q!=null&&q.current&&(q.current.scrollTop=Z.scrollTop)})},[]),w=B.useCallback(q=>{var te;const F=g.current;if(F.length===0)return;const Z=F[F.length-1],ee=p.current;if(ee){const we=((te=q==null?void 0:q.current)==null?void 0:te.scrollTop)??0;s([...m.current,{...ee,scrollTop:we}])}o(F.slice(0,-1)),d(Z),requestAnimationFrame(()=>{q!=null&&q.current&&(q.current.scrollTop=Z.scrollTop)})},[]),D=B.useCallback(q=>{var ee,te;const F=p.current;if(!F)return;const Z=((ee=q==null?void 0:q.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...F,scrollTop:Z}]),o([]),d({...F,scrollTop:((te=q==null?void 0:q.current)==null?void 0:te.scrollTop)??0})},[]),z=B.useCallback(()=>{s([]),o([]),d(null)},[]);return{current:u,backStack:i,forwardStack:a,navigate:x,goBack:_,goForward:w,pushScrollPosition:D,reset:z}}function i4(i,s){const[a,o]=i.split("#");let u=a;if(u.startsWith("./")||u.startsWith("../")){const p=((s?s.replace(/[^/]+$/,""):"")+u).split("/"),m=[];for(const g of p)g===".."?m.pop():g&&g!=="."&&m.push(g);u=m.join("/")}return{path:u,anchor:o}}function o4({content:i,currentPath:s,onNavigate:a,onAnchorClick:o}){const u=d=>{var x;const p=d.target,m=p.closest("[data-anchor]");if(m){d.preventDefault(),o();const _=m.dataset.anchor,w=(x=m.closest(".docs-content"))==null?void 0:x.querySelector(`#${CSS.escape(_)}`);w==null||w.scrollIntoView({behavior:"smooth",block:"start"});return}const g=p.closest("[data-doc-link]");if(g){d.preventDefault();const{path:_,anchor:w}=i4(g.dataset.docLink,s);a(_,w);return}};return b.jsxDEV(uy,{content:i,className:"docs-content",onClick:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:144,columnNumber:10},this)}function l4(i){const s=[],a=new Map;for(const o of i){const u=o.path.split("/");if(u.length===1){s.push(o);continue}let d=a;for(let p=0;p<u.length-1;p++){const m=u[p];d.has(m)||d.set(m,{label:m,children:[],subdirs:new Map});const g=d.get(m);p===u.length-2?g.children.push(o):d=g.subdirs}}return{topLevel:s,dirs:a}}function c4({docs:i,selected:s,onSelect:a}){const{topLevel:o,dirs:u}=l4(i),d=m=>`block w-full text-left px-3 py-1 text-xs rounded truncate transition-colors ${s===m?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"}`;function p(m,g){return b.jsxDEV("details",{open:!0,children:[b.jsxDEV("summary",{className:"flex items-center gap-1.5 px-3 py-1 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary cursor-pointer",children:[b.jsxDEV(tT,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:209,columnNumber:11},this),m.label]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:208,columnNumber:9},this),b.jsxDEV("div",{className:"pl-2 space-y-0.5",children:[[...m.subdirs.values()].map(x=>p(x)),m.children.map(x=>b.jsxDEV("button",{className:d(x.path),onClick:()=>a(x.path),children:x.title},x.path,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:215,columnNumber:13},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:212,columnNumber:9},this)]},m.label,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:207,columnNumber:7},this)}return b.jsxDEV("div",{className:"space-y-0.5",children:[o.map(m=>b.jsxDEV("button",{className:d(m.path),onClick:()=>a(m.path),children:m.title},m.path,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:227,columnNumber:9},this)),[...u.values()].map(m=>p(m))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:225,columnNumber:5},this)}function u4(i){if(!i.startsWith("#docs"))return null;const s=i.slice(1).split(":"),a=s[1]||"README.md",o=s[2]||void 0;return{path:a,anchor:o}}function f4(i){return!i||i==="README.md"?"#docs":`#docs:${i}`}function d4({open:i,onClose:s}){var oe,W,Q;const[a,o]=B.useState(!1),{data:u}=s4(),d=r4(),{data:p,isLoading:m}=a4(((oe=d.current)==null?void 0:oe.path)??null),g=B.useRef(null),[x,_]=B.useState(null);B.useEffect(()=>{x&&(p!=null&&p.content)&&g.current&&requestAnimationFrame(()=>{var le;const H=(le=g.current)==null?void 0:le.querySelector(`#${CSS.escape(x)}`);H==null||H.scrollIntoView({behavior:"smooth",block:"start"}),_(null)})},[x,p]);const w=B.useCallback(()=>{var ie;const H=u4(window.location.hash),le=(H==null?void 0:H.path)??"README.md";((ie=d.current)==null?void 0:ie.path)!==le&&d.navigate(le,g),H!=null&&H.anchor&&_(H.anchor)},[d]),D=B.useRef(!0);B.useEffect(()=>{if(!i||!d.current)return;if(D.current){D.current=!1;return}const H=f4(d.current.path);window.location.hash!==H&&window.history.replaceState(null,"",window.location.pathname+window.location.search+H)},[i,(W=d.current)==null?void 0:W.path]),B.useEffect(()=>{if(!i)return;const H=()=>{window.location.hash.startsWith("#docs")&&w()};return window.addEventListener("hashchange",H),()=>window.removeEventListener("hashchange",H)},[i,w]);const z=B.useCallback((H,le)=>{le&&_(le),d.navigate(H,g)},[d]),q=B.useCallback(H=>{d.navigate(H,g)},[d]),F=B.useCallback(()=>{d.goBack(g)},[d]),Z=B.useCallback(()=>{d.goForward(g)},[d]),ee=B.useCallback(()=>{d.pushScrollPosition(g)},[d]);if(B.useEffect(()=>{if(i){D.current=!0,w();const H=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(H)}},[i]),!(i||a))return null;const we=()=>{o(!1),setTimeout(()=>{s(),d.reset()},200)},De=((Q=d.current)==null?void 0:Q.path)??null,U=d.backStack.length>0,ne=d.forwardStack.length>0;return b.jsxDEV("div",{className:"fixed inset-y-0 right-0 z-50 flex",children:[b.jsxDEV("div",{className:`fixed inset-0 bg-black/20 transition-opacity duration-200 ${a&&i?"opacity-100":"opacity-0"}`,onClick:we},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:359,columnNumber:7},this),b.jsxDEV("div",{className:`relative ml-auto w-[40vw] min-w-[800px] max-w-[90vw] h-full bg-surface-raised border-l border-surface-border flex flex-col shadow-xl transition-transform duration-200 ease-out ${a&&i?"translate-x-0":"translate-x-full"}`,children:[b.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-surface-border shrink-0",children:[b.jsxDEV("div",{className:"flex items-center gap-1",children:[b.jsxDEV("button",{onClick:F,disabled:!U,className:`p-0.5 transition-colors ${U?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Back",children:b.jsxDEV(eT,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:375,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:369,columnNumber:13},this),b.jsxDEV("button",{onClick:Z,disabled:!ne,className:`p-0.5 transition-colors ${ne?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Forward",children:b.jsxDEV(zS,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:383,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:377,columnNumber:13},this),b.jsxDEV(Xw,{className:"w-4 h-4 text-accent ml-1",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:385,columnNumber:13},this),b.jsxDEV("span",{className:"text-sm font-medium text-text-primary",children:"Documentation"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:386,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:368,columnNumber:11},this),b.jsxDEV("button",{onClick:we,className:"p-1 text-text-tertiary hover:text-text-primary",children:b.jsxDEV(F0,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:389,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:388,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:367,columnNumber:9},this),b.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxDEV("div",{className:"w-48 shrink-0 border-r border-surface-border overflow-y-auto py-2",children:u!=null&&u.docs?b.jsxDEV(c4,{docs:u.docs,selected:De,onSelect:q},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:398,columnNumber:15},this):b.jsxDEV("div",{className:"px-3 py-2 text-xs text-text-tertiary",children:"Loading..."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:400,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:396,columnNumber:11},this),b.jsxDEV("div",{ref:g,className:"flex-1 overflow-y-auto px-6 py-4",children:De?m?b.jsxDEV("div",{className:"animate-pulse space-y-2",children:[b.jsxDEV("div",{className:"h-6 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:413,columnNumber:17},this),b.jsxDEV("div",{className:"h-4 bg-surface-sunken rounded w-full"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:414,columnNumber:17},this),b.jsxDEV("div",{className:"h-4 bg-surface-sunken rounded w-3/4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:415,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:412,columnNumber:15},this):p!=null&&p.content?b.jsxDEV(o4,{content:p.content,currentPath:De,onNavigate:z,onAnchorClick:ee},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:418,columnNumber:15},this):b.jsxDEV("p",{className:"text-xs text-text-tertiary",children:"Document not found."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:425,columnNumber:15},this):b.jsxDEV("div",{className:"flex flex-col items-center justify-center h-full text-text-tertiary",children:[b.jsxDEV(zS,{className:"w-5 h-5 mb-2"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:408,columnNumber:17},this),b.jsxDEV("p",{className:"text-xs",children:"Select a document"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:409,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:407,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:405,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:394,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:365,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:357,columnNumber:5},this)}const qE=B.createContext(null);function h4(i){if(i.includes("/escalations"))return["escalation","human-queue"]}const Tw=2e3;function m4(i){const a=i.filter(u=>!u.pending).slice(-8);return a.length===0?"":`[Prior conversation]
|
|
274
|
+
${w.trimEnd()}`)),a=a.replace(/`([^`]+)`/g,'<code class="bg-surface-sunken px-1 py-0.5 rounded text-[11px]">$1</code>'),a=a.replace(/^#### (.+)$/gm,(g,x)=>`<h4 id="${Qd(x)}" class="text-xs font-semibold text-text-primary mt-4 mb-1">${x}</h4>`).replace(/^### (.+)$/gm,(g,x)=>`<h3 id="${Qd(x)}" class="text-sm font-semibold text-text-primary mt-5 mb-1.5">${x}</h3>`).replace(/^## (.+)$/gm,(g,x)=>`<h2 id="${Qd(x)}" class="text-base font-semibold text-text-primary mt-6 mb-2 pb-1 border-b border-surface-border">${x}</h2>`).replace(/^# (.+)$/gm,(g,x)=>`<h1 id="${Qd(x)}" class="text-lg font-bold text-text-primary mb-3">${x}</h1>`),a=a.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(#([^)]+)\)/g,'<a data-anchor="$2" class="text-accent hover:underline cursor-pointer">$1</a>').replace(/\[([^\]]+)\]\(([^)]*\.md(?:#[^)]*)?)\)/g,'<a data-doc-link="$2" class="text-accent hover:underline cursor-pointer">$1</a>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-accent hover:underline">$1</a>').replace(/^ - (.+)$/gm,'<li class="ml-8 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^ - (.+)$/gm,'<li class="ml-8 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^- (.+)$/gm,'<li class="ml-4 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^\d+\. (.+)$/gm,'<li class="ml-4 list-decimal text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^---+$/gm,'<hr class="border-surface-border my-4" />').replace(/(?:^> (.+)$\n?)+/gm,g=>{const x=g.replace(/^> /gm,"").trim(),_=/⚠️|warning|caution/i.test(x),w=/note:|ℹ️|info/i.test(x);return`<div class="${_?"bg-status-warning/5":w?"bg-accent/5":"bg-surface-sunken/50"} ${_?"border-status-warning":w?"border-accent":"border-text-tertiary"} border-l-2 rounded-r-md px-3 py-2 my-3 text-xs text-text-secondary leading-relaxed">${x}</div>`}).replace(/\n\n/g,"\0PARA\0").replace(/\n/g,"<br/>");const u=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=g=>new RegExp(`(${u(g)}[\\s\\S]*?<\\/li>(?:<br\\/>)?)+`,"g");a=a.replace(d('<li class="ml-8 list-disc'),g=>`<ul class="mb-3">${g}</ul>`),a=a.replace(d('<li class="ml-4 list-disc'),g=>`<ul class="mb-3">${g}</ul>`),a=a.replace(d('<li class="ml-4 list-decimal'),g=>`<ol class="list-decimal mb-3">${g}</ol>`),a=a.replace(/\x00CODE(\d+)\x00/g,(g,x)=>s[parseInt(x,10)]);const p="text-xs leading-relaxed text-text-secondary mb-2",m=/<\/(h[1-4]|pre|table|ul|ol|hr|div)>/;return a=a.split("\0PARA\0").map(g=>{const x=g.trim();if(!x)return"";const _=[];let w=x,D;for(;(D=m.exec(w))!==null;){const z=D.index+D[0].length;_.push(w.slice(0,z)),w=w.slice(z).replace(/^<br\/>/,"").trim(),m.lastIndex=0}return w&&_.push(w),_.map(z=>{const q=z.trim();return q?/^\s*<(h[1-4]|pre|table|ul|ol|hr|div)/.test(q)?q:`<p class="${p}">${q}</p>`:""}).join("")}).join(""),a}const G5=/(\*\*|^#{1,4}\s|^- |^\d+\.\s|```|^\|.*\|$|\[.+\]\(.+\))/m;function Q5(i){return G5.test(i)}function uy({content:i,className:s,onClick:a}){const o=B.useMemo(()=>J5(i),[i]);return b.jsxDEV("div",{className:s,onClick:a,dangerouslySetInnerHTML:{__html:o}},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/MarkdownRenderer.tsx",lineNumber:136,columnNumber:10},this)}function X5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h8M4 18h12"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:4,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:3,columnNumber:5},this)}function Z5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7l-5 5 5 5M16 7l5 5-5 5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:12,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:11,columnNumber:5},this)}function K5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:20,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:19,columnNumber:5},this)}function W5({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:27,columnNumber:5},this)}function e4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9L3.5 3.5M9 15v4.5M9 15H4.5M9 15l-5.5 5.5M15 9h4.5M15 9V4.5M15 9l5.5-5.5M15 15h4.5M15 15v4.5m0-4.5l5.5 5.5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:36,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:35,columnNumber:5},this)}function t4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:44,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:43,columnNumber:5},this)}function dh({data:i,depth:s=0,generation:a}){const u=a!==void 0&&a>0&&a%2===1?!1:s>0,[d,p]=B.useState(u),[m,g]=B.useState(a);if(a!==void 0&&a!==m&&(g(a),p(a%2===0&&s>0)),i==null)return b.jsxDEV("span",{className:"text-text-tertiary italic",children:"null"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:25,columnNumber:12},this);if(typeof i=="string")return b.jsxDEV("span",{className:"text-text-primary",children:['"',i,'"']},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:29,columnNumber:12},this);if(typeof i=="number"||typeof i=="boolean")return b.jsxDEV("span",{className:"text-text-primary font-medium",children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:33,columnNumber:12},this);if(Array.isArray(i))return i.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"[]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:37,columnNumber:35},this):d?b.jsxDEV("button",{onClick:()=>p(!1),className:"text-text-secondary hover:text-text-primary",children:["[",i.length," items]"]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:41,columnNumber:9},this):b.jsxDEV("span",{children:[b.jsxDEV("button",{onClick:()=>p(!0),className:"text-text-tertiary hover:text-text-primary",children:"["},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:52,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:i.map((x,_)=>b.jsxDEV("div",{children:[b.jsxDEV(dh,{data:x,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:61,columnNumber:15},this),_<i.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:62,columnNumber:39},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:60,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:66,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:51,columnNumber:7},this);if(typeof i=="object"){const x=Object.entries(i);return x.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"{}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:73,columnNumber:38},this):d?b.jsxDEV("button",{onClick:()=>p(!1),className:"text-text-secondary hover:text-text-primary",children:["{","...","}"]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:77,columnNumber:9},this):b.jsxDEV("span",{children:[b.jsxDEV("button",{onClick:()=>p(!0),className:"text-text-tertiary hover:text-text-primary",children:"{"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:88,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:x.map(([_,w],D)=>b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"text-text-secondary",children:_},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:97,columnNumber:15},this),b.jsxDEV("span",{className:"text-text-tertiary",children:": "},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:98,columnNumber:15},this),b.jsxDEV(dh,{data:w,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:99,columnNumber:15},this),D<x.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:100,columnNumber:42},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:96,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:94,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:87,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:109,columnNumber:10},this)}function pu({data:i,depth:s=0}){if(i==null)return b.jsxDEV("span",{className:"text-text-tertiary italic",children:"null"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:118,columnNumber:12},this);if(typeof i=="string")return i.length>40&&Q5(i)?b.jsxDEV(uy,{content:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:123,columnNumber:14},this):b.jsxDEV("span",{className:"text-text-primary",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:125,columnNumber:12},this);if(typeof i=="number"||typeof i=="boolean")return b.jsxDEV("span",{className:"text-text-primary font-medium",children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:129,columnNumber:12},this);if(Array.isArray(i))return i.length===0?b.jsxDEV("span",{className:"text-text-tertiary italic",children:"empty list"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:133,columnNumber:35},this):b.jsxDEV("div",{className:"space-y-2",children:i.map((a,o)=>b.jsxDEV("div",{className:"flex items-baseline gap-2",children:[b.jsxDEV("span",{className:"text-text-tertiary text-[10px] shrink-0",children:[o+1,"."]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:138,columnNumber:13},this),b.jsxDEV("div",{className:"flex-1",children:b.jsxDEV(pu,{data:a,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:140,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:139,columnNumber:13},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:137,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:135,columnNumber:7},this);if(typeof i=="object"){const a=Object.entries(i);return a.length===0?b.jsxDEV("span",{className:"text-text-tertiary italic",children:"empty"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:150,columnNumber:38},this):b.jsxDEV("div",{className:s>0?"pl-4 border-l border-surface-border space-y-3":"space-y-3",children:a.map(([o,u])=>{const d=u===null||typeof u!="object";return b.jsxDEV("div",{children:[b.jsxDEV("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-0.5",children:o.replace(/[_-]/g," ")},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:157,columnNumber:15},this),d?b.jsxDEV("p",{className:"text-sm text-text-primary",children:b.jsxDEV(pu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:162,columnNumber:19},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:161,columnNumber:17},this):b.jsxDEV(pu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:165,columnNumber:17},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:156,columnNumber:13},this)})},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:152,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:174,columnNumber:10},this)}function Aw({mode:i,setMode:s,isCollapsed:a,onToggleCollapse:o,onCopy:u,copied:d,onFullscreen:p,onClose:m,large:g}){const x=g?"w-5 h-5":"w-3.5 h-3.5",_=`${g?"p-2":"p-1.5"} rounded text-text-tertiary hover:text-text-primary hover:bg-surface-raised transition-colors duration-150`;return b.jsxDEV("div",{className:"flex items-center gap-0.5 bg-surface-sunken/80 rounded-md backdrop-blur-sm",children:[i==="json"&&b.jsxDEV("button",{onClick:o,className:_,title:a?"Expand all":"Collapse all",children:a?b.jsxDEV(t4,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:207,columnNumber:26},this):b.jsxDEV(e4,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:207,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:206,columnNumber:9},this),b.jsxDEV("button",{onClick:()=>s(i==="json"?"tree":"json"),className:_,title:i==="json"?"Outline view":"JSON view",children:i==="json"?b.jsxDEV(X5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:211,columnNumber:28},this):b.jsxDEV(Z5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:211,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:210,columnNumber:7},this),b.jsxDEV("button",{onClick:u,className:_,title:"Copy to clipboard",children:d?b.jsxDEV(W5,{className:`${x} text-status-success`},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:214,columnNumber:19},this):b.jsxDEV(K5,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:214,columnNumber:77},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:213,columnNumber:7},this),p&&b.jsxDEV("button",{onClick:p,className:_,title:"Fullscreen",children:b.jsxDEV(Kw,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:218,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:217,columnNumber:9},this),m&&b.jsxDEV("button",{onClick:m,className:_,title:"Close (Esc)",children:b.jsxDEV(Ww,{className:x},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:223,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:222,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:204,columnNumber:5},this)}function n4({data:i,label:s,variant:a,defaultCollapsed:o=!1,defaultMode:u}){const d=B.useRef(null),[p,m]=B.useState(u??"json"),[g,x]=B.useState(!1),[_,w]=B.useState(!1),[D,z]=B.useState(0),[q,Y]=B.useState(1),Z=D%2===0,ee=q%2===0,te=B.useCallback(()=>z(H=>H+1),[]),we=B.useCallback(()=>Y(H=>H+1),[]);let De=i;if(typeof i=="string")try{De=JSON.parse(i)}catch{}const U=async()=>{const H=typeof i=="string"?i:JSON.stringify(De,null,2);await navigator.clipboard.writeText(H),x(!0),setTimeout(()=>x(!1),2e3)},ne=B.useCallback(()=>{Y(1),w(!0)},[]),oe=a==="panel",W=oe?"border border-accent-muted/40 rounded-lg p-3 bg-surface-hover/30":"",Q=oe?"font-mono text-xs leading-relaxed bg-white rounded-md p-4 overflow-x-auto break-all":"font-mono text-xs leading-relaxed bg-surface-sunken rounded-md p-4 overflow-x-auto break-all";return b.jsxDEV("div",{className:W,children:[s&&b.jsxDEV(I5,{children:s},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:295,columnNumber:17},this),b.jsxDEV("div",{ref:d,className:"relative",children:[b.jsxDEV("div",{className:"absolute top-2 right-2 z-[5]",children:b.jsxDEV(Aw,{mode:p,setMode:m,isCollapsed:Z,onToggleCollapse:te,onCopy:U,copied:g,onFullscreen:ne},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:298,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:297,columnNumber:9},this),b.jsxDEV("div",{className:Q,children:p==="json"?b.jsxDEV(dh,{data:De,generation:D},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:306,columnNumber:30},this):b.jsxDEV(pu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:306,columnNumber:83},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:296,columnNumber:7},this),b.jsxDEV(zE,{open:_,onClose:()=>w(!1),sourceRef:d,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV(Aw,{mode:p,setMode:m,isCollapsed:ee,onToggleCollapse:we,onCopy:U,copied:g,onClose:()=>w(!1),large:!0},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:312,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:311,columnNumber:9},this),b.jsxDEV("div",{className:"font-mono text-sm leading-relaxed",children:p==="json"?b.jsxDEV(dh,{data:De,generation:q},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:321,columnNumber:30},this):b.jsxDEV(pu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:321,columnNumber:85},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:320,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:310,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:294,columnNumber:5},this)}const s4=100,Dw=500;let a4=0;const BE={"escalation.created":"text-status-warning","escalation.claimed":"text-blue-400","escalation.released":"text-text-tertiary","escalation.resolved":"text-status-success","task.created":"text-accent","task.completed":"text-status-success","task.failed":"text-status-error","task.escalated":"text-status-warning","workflow.started":"text-accent","workflow.completed":"text-status-success","workflow.failed":"text-status-error","activity.started":"text-blue-400","activity.completed":"text-status-success","activity.failed":"text-status-error",milestone:"text-violet-400"};function Cw({event:i,forceExpanded:s=!1}){var D,z;const[a,o]=B.useState(s),u=BE[i.type]||"text-text-tertiary";B.useEffect(()=>{o(s)},[s]);const d=s,p=d?"text-xs":"text-[9px]",m=d?"text-xs":"text-[9px]",g=d?"text-xs":"text-[9px]",x=d?"w-3.5 h-3.5":"w-2.5 h-2.5",_=d?"py-2 px-4":"py-1 px-3",w=d?"pb-4 px-4":"pb-2 px-3";return b.jsxDEV("div",{className:"border-b border-surface-border/30 last:border-b-0",children:[b.jsxDEV("button",{onClick:()=>o(!a),className:`flex items-center gap-2 ${_} w-full text-left hover:bg-surface-hover/50 transition-colors`,children:[b.jsxDEV("span",{className:`${p} font-mono text-text-tertiary whitespace-nowrap tabular-nums shrink-0`,children:new Date(i.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("span",{className:`${m} font-medium px-1 py-0.5 rounded ${u} bg-surface-sunken whitespace-nowrap shrink-0`,children:i.type},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:61,columnNumber:9},this),b.jsxDEV("span",{className:`${g} text-text-tertiary font-mono flex-1 min-w-0 truncate`,children:[(D=i.data)!=null&&D.workflowId?String(i.data.workflowId):"",(z=i.data)!=null&&z.escalationId?` esc:${String(i.data.escalationId).slice(0,12)}`:""]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:64,columnNumber:9},this),b.jsxDEV("svg",{className:`${x} text-text-tertiary shrink-0 transition-transform duration-150 ${a?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:72,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:54,columnNumber:7},this),b.jsxDEV(cy,{open:a,children:b.jsxDEV("div",{className:w,children:b.jsxDEV(n4,{data:i.data},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:77,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:76,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:75,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:53,columnNumber:5},this)}function r4({open:i,onToggle:s}){const[a,o]=B.useState([]),[u,d]=B.useState(!1),p=B.useRef(null),m=B.useRef(new Map);return NE("lt.events.>",B.useCallback(g=>{const x=String(g.type||"unknown");if(x.startsWith("mesh."))return;const _=`${x}:${g.timestamp||""}:${g.escalationId||g.workflowId||g.taskId||""}`,w=Date.now(),D=m.current.get(_);if(!(D&&w-D<Dw)){if(m.current.set(_,w),m.current.size>200)for(const[z,q]of m.current)w-q>Dw*2&&m.current.delete(z);o(z=>[{id:++a4,type:x,timestamp:g.timestamp||new Date().toISOString(),data:g},...z].slice(0,s4))}},[])),B.useEffect(()=>{i&&p.current&&(p.current.scrollTop=0)},[a.length,i]),b.jsxDEV("div",{className:"fixed bottom-0 left-0 right-0 z-40 border-t border-surface-border bg-surface-raised",children:[b.jsxDEV("button",{onClick:s,className:"flex items-center gap-2 w-full px-4 py-1.5 text-left hover:bg-surface-hover transition-colors",children:[i?b.jsxDEV(KC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:133,columnNumber:17},this):b.jsxDEV(WC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:133,columnNumber:74},this),b.jsxDEV("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Event Stream"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:134,columnNumber:9},this),a.length>0&&b.jsxDEV("span",{className:"text-[9px] text-text-tertiary",children:[a.length," events"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:138,columnNumber:11},this),a.length>0&&!i&&b.jsxDEV("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${BE[a[0].type]||"text-text-tertiary"} bg-surface-sunken`,children:a[0].type},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:143,columnNumber:11},this),a.length>0&&b.jsxDEV("span",{className:"ml-auto flex items-center gap-1",children:[b.jsxDEV("span",{className:"text-text-tertiary hover:text-text-primary p-0.5 cursor-pointer",title:"Fullscreen",onClick:g=>{g.stopPropagation(),d(!0)},children:b.jsxDEV(Kw,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:154,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:149,columnNumber:13},this),b.jsxDEV("span",{className:"text-text-tertiary hover:text-text-primary p-0.5 cursor-pointer",title:"Clear events",onClick:g=>{g.stopPropagation(),o([])},children:b.jsxDEV(eT,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:161,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:156,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:148,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:129,columnNumber:7},this),b.jsxDEV(cy,{open:i,children:b.jsxDEV("div",{ref:p,className:"h-48 overflow-y-auto",children:a.length===0?b.jsxDEV("p",{className:"text-[10px] text-text-tertiary py-4 text-center",children:"Waiting for events..."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:171,columnNumber:13},this):a.map(g=>b.jsxDEV(Cw,{event:g},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:173,columnNumber:33},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:169,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:168,columnNumber:7},this),b.jsxDEV(zE,{open:u,onClose:()=>d(!1),sourceRef:p,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV("button",{onClick:()=>d(!1),className:"p-2 rounded text-text-tertiary hover:text-text-primary hover:bg-surface-raised transition-colors duration-150 bg-surface-sunken/80 backdrop-blur-sm",title:"Close (Esc)",children:b.jsxDEV(Ww,{className:"w-5 h-5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:185,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:180,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:179,columnNumber:9},this),a.length===0?b.jsxDEV("p",{className:"text-sm text-text-tertiary py-8",children:"No events captured"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:189,columnNumber:11},this):a.map(g=>b.jsxDEV(Cw,{event:g,forceExpanded:!0},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:191,columnNumber:31},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:178,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:127,columnNumber:5},this)}function i4(){return ii({queryKey:["docs"],queryFn:()=>Nt("/docs"),staleTime:5*6e4})}function o4(i){return ii({queryKey:["docs",i],queryFn:()=>Nt(`/docs/read?path=${encodeURIComponent(i)}`),enabled:!!i,staleTime:5*6e4})}function l4(){const[i,s]=B.useState([]),[a,o]=B.useState([]),[u,d]=B.useState(null),p=B.useRef(u),m=B.useRef(i),g=B.useRef(a);p.current=u,m.current=i,g.current=a;const x=B.useCallback((q,Y)=>{var ee;const Z=p.current;if(Z){const te=((ee=Y==null?void 0:Y.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...Z,scrollTop:te}])}o([]),d({path:q,scrollTop:0})},[]),_=B.useCallback(q=>{var te;const Y=m.current;if(Y.length===0)return;const Z=Y[Y.length-1],ee=p.current;if(ee){const we=((te=q==null?void 0:q.current)==null?void 0:te.scrollTop)??0;o([...g.current,{...ee,scrollTop:we}])}s(Y.slice(0,-1)),d(Z),requestAnimationFrame(()=>{q!=null&&q.current&&(q.current.scrollTop=Z.scrollTop)})},[]),w=B.useCallback(q=>{var te;const Y=g.current;if(Y.length===0)return;const Z=Y[Y.length-1],ee=p.current;if(ee){const we=((te=q==null?void 0:q.current)==null?void 0:te.scrollTop)??0;s([...m.current,{...ee,scrollTop:we}])}o(Y.slice(0,-1)),d(Z),requestAnimationFrame(()=>{q!=null&&q.current&&(q.current.scrollTop=Z.scrollTop)})},[]),D=B.useCallback(q=>{var ee,te;const Y=p.current;if(!Y)return;const Z=((ee=q==null?void 0:q.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...Y,scrollTop:Z}]),o([]),d({...Y,scrollTop:((te=q==null?void 0:q.current)==null?void 0:te.scrollTop)??0})},[]),z=B.useCallback(()=>{s([]),o([]),d(null)},[]);return{current:u,backStack:i,forwardStack:a,navigate:x,goBack:_,goForward:w,pushScrollPosition:D,reset:z}}function c4(i,s){const[a,o]=i.split("#");let u=a;if(u.startsWith("./")||u.startsWith("../")){const p=((s?s.replace(/[^/]+$/,""):"")+u).split("/"),m=[];for(const g of p)g===".."?m.pop():g&&g!=="."&&m.push(g);u=m.join("/")}return{path:u,anchor:o}}function u4({content:i,currentPath:s,onNavigate:a,onAnchorClick:o}){const u=d=>{var x;const p=d.target,m=p.closest("[data-anchor]");if(m){d.preventDefault(),o();const _=m.dataset.anchor,w=(x=m.closest(".docs-content"))==null?void 0:x.querySelector(`#${CSS.escape(_)}`);w==null||w.scrollIntoView({behavior:"smooth",block:"start"});return}const g=p.closest("[data-doc-link]");if(g){d.preventDefault();const{path:_,anchor:w}=c4(g.dataset.docLink,s);a(_,w);return}};return b.jsxDEV(uy,{content:i,className:"docs-content",onClick:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:144,columnNumber:10},this)}function f4(i){const s=[],a=new Map;for(const o of i){const u=o.path.split("/");if(u.length===1){s.push(o);continue}let d=a;for(let p=0;p<u.length-1;p++){const m=u[p];d.has(m)||d.set(m,{label:m,children:[],subdirs:new Map});const g=d.get(m);p===u.length-2?g.children.push(o):d=g.subdirs}}return{topLevel:s,dirs:a}}function d4({docs:i,selected:s,onSelect:a}){const{topLevel:o,dirs:u}=f4(i),d=m=>`block w-full text-left px-3 py-1 text-xs rounded truncate transition-colors ${s===m?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"}`;function p(m,g){return b.jsxDEV("details",{open:!0,children:[b.jsxDEV("summary",{className:"flex items-center gap-1.5 px-3 py-1 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary cursor-pointer",children:[b.jsxDEV(nT,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:209,columnNumber:11},this),m.label]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:208,columnNumber:9},this),b.jsxDEV("div",{className:"pl-2 space-y-0.5",children:[[...m.subdirs.values()].map(x=>p(x)),m.children.map(x=>b.jsxDEV("button",{className:d(x.path),onClick:()=>a(x.path),children:x.title},x.path,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:215,columnNumber:13},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:212,columnNumber:9},this)]},m.label,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:207,columnNumber:7},this)}return b.jsxDEV("div",{className:"space-y-0.5",children:[o.map(m=>b.jsxDEV("button",{className:d(m.path),onClick:()=>a(m.path),children:m.title},m.path,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:227,columnNumber:9},this)),[...u.values()].map(m=>p(m))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:225,columnNumber:5},this)}function h4(i){if(!i.startsWith("#docs"))return null;const s=i.slice(1).split(":"),a=s[1]||"README.md",o=s[2]||void 0;return{path:a,anchor:o}}function m4(i){return!i||i==="README.md"?"#docs":`#docs:${i}`}function p4({open:i,onClose:s}){var oe,W,Q;const[a,o]=B.useState(!1),{data:u}=i4(),d=l4(),{data:p,isLoading:m}=o4(((oe=d.current)==null?void 0:oe.path)??null),g=B.useRef(null),[x,_]=B.useState(null);B.useEffect(()=>{x&&(p!=null&&p.content)&&g.current&&requestAnimationFrame(()=>{var le;const H=(le=g.current)==null?void 0:le.querySelector(`#${CSS.escape(x)}`);H==null||H.scrollIntoView({behavior:"smooth",block:"start"}),_(null)})},[x,p]);const w=B.useCallback(()=>{var ie;const H=h4(window.location.hash),le=(H==null?void 0:H.path)??"README.md";((ie=d.current)==null?void 0:ie.path)!==le&&d.navigate(le,g),H!=null&&H.anchor&&_(H.anchor)},[d]),D=B.useRef(!0);B.useEffect(()=>{if(!i||!d.current)return;if(D.current){D.current=!1;return}const H=m4(d.current.path);window.location.hash!==H&&window.history.replaceState(null,"",window.location.pathname+window.location.search+H)},[i,(W=d.current)==null?void 0:W.path]),B.useEffect(()=>{if(!i)return;const H=()=>{window.location.hash.startsWith("#docs")&&w()};return window.addEventListener("hashchange",H),()=>window.removeEventListener("hashchange",H)},[i,w]);const z=B.useCallback((H,le)=>{le&&_(le),d.navigate(H,g)},[d]),q=B.useCallback(H=>{d.navigate(H,g)},[d]),Y=B.useCallback(()=>{d.goBack(g)},[d]),Z=B.useCallback(()=>{d.goForward(g)},[d]),ee=B.useCallback(()=>{d.pushScrollPosition(g)},[d]);if(B.useEffect(()=>{if(i){D.current=!0,w();const H=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(H)}},[i]),!(i||a))return null;const we=()=>{o(!1),setTimeout(()=>{s(),d.reset()},200)},De=((Q=d.current)==null?void 0:Q.path)??null,U=d.backStack.length>0,ne=d.forwardStack.length>0;return b.jsxDEV("div",{className:"fixed inset-y-0 right-0 z-50 flex",children:[b.jsxDEV("div",{className:`fixed inset-0 bg-black/20 transition-opacity duration-200 ${a&&i?"opacity-100":"opacity-0"}`,onClick:we},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:359,columnNumber:7},this),b.jsxDEV("div",{className:`relative ml-auto w-[40vw] min-w-[800px] max-w-[90vw] h-full bg-surface-raised border-l border-surface-border flex flex-col shadow-xl transition-transform duration-200 ease-out ${a&&i?"translate-x-0":"translate-x-full"}`,children:[b.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-surface-border shrink-0",children:[b.jsxDEV("div",{className:"flex items-center gap-1",children:[b.jsxDEV("button",{onClick:Y,disabled:!U,className:`p-0.5 transition-colors ${U?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Back",children:b.jsxDEV(tT,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:375,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:369,columnNumber:13},this),b.jsxDEV("button",{onClick:Z,disabled:!ne,className:`p-0.5 transition-colors ${ne?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Forward",children:b.jsxDEV(zS,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:383,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:377,columnNumber:13},this),b.jsxDEV(Xw,{className:"w-4 h-4 text-accent ml-1",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:385,columnNumber:13},this),b.jsxDEV("span",{className:"text-sm font-medium text-text-primary",children:"Documentation"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:386,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:368,columnNumber:11},this),b.jsxDEV("button",{onClick:we,className:"p-1 text-text-tertiary hover:text-text-primary",children:b.jsxDEV(J0,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:389,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:388,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:367,columnNumber:9},this),b.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxDEV("div",{className:"w-48 shrink-0 border-r border-surface-border overflow-y-auto py-2",children:u!=null&&u.docs?b.jsxDEV(d4,{docs:u.docs,selected:De,onSelect:q},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:398,columnNumber:15},this):b.jsxDEV("div",{className:"px-3 py-2 text-xs text-text-tertiary",children:"Loading..."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:400,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:396,columnNumber:11},this),b.jsxDEV("div",{ref:g,className:"flex-1 overflow-y-auto px-6 py-4",children:De?m?b.jsxDEV("div",{className:"animate-pulse space-y-2",children:[b.jsxDEV("div",{className:"h-6 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:413,columnNumber:17},this),b.jsxDEV("div",{className:"h-4 bg-surface-sunken rounded w-full"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:414,columnNumber:17},this),b.jsxDEV("div",{className:"h-4 bg-surface-sunken rounded w-3/4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:415,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:412,columnNumber:15},this):p!=null&&p.content?b.jsxDEV(u4,{content:p.content,currentPath:De,onNavigate:z,onAnchorClick:ee},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:418,columnNumber:15},this):b.jsxDEV("p",{className:"text-xs text-text-tertiary",children:"Document not found."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:425,columnNumber:15},this):b.jsxDEV("div",{className:"flex flex-col items-center justify-center h-full text-text-tertiary",children:[b.jsxDEV(zS,{className:"w-5 h-5 mb-2"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:408,columnNumber:17},this),b.jsxDEV("p",{className:"text-xs",children:"Select a document"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:409,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:407,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:405,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:394,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:365,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:357,columnNumber:5},this)}const qE=B.createContext(null);function b4(i){if(i.includes("/escalations"))return["escalation","human-queue"]}const Tw=2e3;function y4(i){const a=i.filter(u=>!u.pending).slice(-8);return a.length===0?"":`[Prior conversation]
|
|
275
275
|
${a.map(u=>`${u.role==="user"?"User":"Assistant"}: ${u.content}`).join(`
|
|
276
276
|
`)}
|
|
277
277
|
[End prior conversation]
|
|
278
278
|
|
|
279
|
-
`}function
|
|
280
|
-
... (truncated)`});const oe=`${m4(u.concat(we))}${ee}`;try{const H=(await Nt("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:oe,tags:U.suggestedTags,context:U,wait:!1,direct:!0})})).workflow_id;m(H),d(le=>le.map(ie=>ie.id===De.id?{...ie,workflowId:H}:ie)),_.current&&clearInterval(_.current),_.current=setInterval(async()=>{var le;try{const ie=await Nt(`/workflows/${H}/result`),ve=(le=ie==null?void 0:ie.result)==null?void 0:le.data;if(ve){_.current&&clearInterval(_.current),_.current=null,m(null);const Ge=p4(ve);let tt;try{tt=(await Nt(`/workflow-states/${H}/execution`)).duration_ms}catch{}d(ae=>ae.map(pe=>pe.id===De.id?{...pe,content:Ge,timestamp:new Date().toISOString(),pending:!1,durationMs:tt}:pe))}}catch{}},3e3)}catch{d(Q=>Q.map(H=>H.id===De.id?{...H,content:"Failed to submit query. Please try again.",pending:!1}:H))}},[u,w]),Z=B.useCallback(async ee=>{const te=u.find(U=>U.id===ee);if(!(te!=null&&te.workflowId)||te.compilationStatus==="compiling"||te.compilationStatus==="done")return;const we=u.indexOf(te),De=u.slice(0,we).reverse().find(U=>U.role==="user");if(De){d(U=>U.map(ne=>ne.id===ee?{...ne,compilationStatus:"compiling"}:ne));try{const U=await Nt("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:De.content,summary:te.content})}),ne=await Nt("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:te.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:U.tool_name,description:U.description,tags:U.tags,app_id:"longtail"})});await Nt(`/yaml-workflows/${ne.id}/deploy`,{method:"POST"}),d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"done"}:W))}catch(U){const ne=U instanceof Error?U.message:"Compilation failed";d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"error",compilationError:ne}:W))}}},[u]);return b.jsxDEV(qE.Provider,{value:{helpOpen:a,setHelpOpen:o,toggleHelp:D,messages:u,sendMessage:F,pageContext:w,setPageContext:z,activeWorkflowId:p,clearMessages:q,compileMessage:Z},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useHelpAssistant.tsx",lineNumber:302,columnNumber:5},this)}function LE(){const i=B.useContext(qE);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function y4(){const{helpOpen:i,toggleHelp:s}=LE();return b.jsxDEV("button",{onClick:s,className:"fixed right-3 z-[45] flex items-center justify-center w-10 h-10 rounded-full bg-surface-raised shadow-lg hover:scale-110 transition-transform duration-150 border border-accent/30",style:{bottom:"calc(var(--feed-height, 32px) + 12px)"},"aria-label":i?"Close help":"Ask for help",children:i?b.jsxDEV(F0,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:15,columnNumber:9},this):b.jsxDEV("img",{src:"/logo512.png",alt:"Help",className:"w-8 h-8 -rotate-[120deg]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:17,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:8,columnNumber:5},this)}const HE=6048e5,g4=864e5,Ow=6e4,Rw=525600,jw=43200,Mw=1440,kw=Symbol.for("constructDateFrom");function ar(i,s){return typeof i=="function"?i(s):i&&typeof i=="object"&&kw in i?i[kw](s):i instanceof Date?new i.constructor(s):new Date(s)}function ts(i,s){return ar(s||i,i)}let v4={};function wu(){return v4}function xu(i,s){var m,g,x,_;const a=wu(),o=(s==null?void 0:s.weekStartsOn)??((g=(m=s==null?void 0:s.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??a.weekStartsOn??((_=(x=a.locale)==null?void 0:x.options)==null?void 0:_.weekStartsOn)??0,u=ts(i,s==null?void 0:s.in),d=u.getDay(),p=(d<o?7:0)+d-o;return u.setDate(u.getDate()-p),u.setHours(0,0,0,0),u}function hh(i,s){return xu(i,{...s,weekStartsOn:1})}function PE(i,s){const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=ar(a,0);u.setFullYear(o+1,0,4),u.setHours(0,0,0,0);const d=hh(u),p=ar(a,0);p.setFullYear(o,0,4),p.setHours(0,0,0,0);const m=hh(p);return a.getTime()>=d.getTime()?o+1:a.getTime()>=m.getTime()?o:o-1}function mh(i){const s=ts(i),a=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return a.setUTCFullYear(s.getFullYear()),+i-+a}function $E(i,...s){const a=ar.bind(null,i||s.find(o=>typeof o=="object"));return s.map(a)}function Vw(i,s){const a=ts(i,s==null?void 0:s.in);return a.setHours(0,0,0,0),a}function x4(i,s,a){const[o,u]=$E(a==null?void 0:a.in,i,s),d=Vw(o),p=Vw(u),m=+d-mh(d),g=+p-mh(p);return Math.round((m-g)/g4)}function N4(i,s){const a=PE(i,s),o=ar(i,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),hh(o)}function S4(i,s){const a=+ts(i)-+ts(s);return a<0?-1:a>0?1:a}function w4(i){return ar(i,Date.now())}function E4(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function _4(i){return!(!E4(i)&&typeof i!="number"||isNaN(+ts(i)))}function A4(i){return s=>{const o=(i?Math[i]:Math.trunc)(s);return o===0?0:o}}function D4(i,s){const a=ts(i,s==null?void 0:s.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const C4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},T4=(i,s,a)=>{let o;const u=C4[i];return typeof u=="string"?o=u:s===1?o=u.one:o=u.other.replace("{{count}}",s.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+o:o+" ago":o};function v0(i){return(s={})=>{const a=s.width?String(s.width):i.defaultWidth;return i.formats[a]||i.formats[i.defaultWidth]}}const O4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},R4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},j4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M4={date:v0({formats:O4,defaultWidth:"full"}),time:v0({formats:R4,defaultWidth:"full"}),dateTime:v0({formats:j4,defaultWidth:"full"})},k4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},V4=(i,s,a,o)=>k4[i];function ru(i){return(s,a)=>{const o=a!=null&&a.context?String(a.context):"standalone";let u;if(o==="formatting"&&i.formattingValues){const p=i.defaultFormattingWidth||i.defaultWidth,m=a!=null&&a.width?String(a.width):p;u=i.formattingValues[m]||i.formattingValues[p]}else{const p=i.defaultWidth,m=a!=null&&a.width?String(a.width):i.defaultWidth;u=i.values[m]||i.values[p]}const d=i.argumentCallback?i.argumentCallback(s):s;return u[d]}}const U4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},B4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},q4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},L4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},H4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},P4=(i,s)=>{const a=Number(i),o=a%100;if(o>20||o<10)switch(o%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},$4={ordinalNumber:P4,era:ru({values:U4,defaultWidth:"wide"}),quarter:ru({values:z4,defaultWidth:"wide",argumentCallback:i=>i-1}),month:ru({values:B4,defaultWidth:"wide"}),day:ru({values:q4,defaultWidth:"wide"}),dayPeriod:ru({values:L4,defaultWidth:"wide",formattingValues:H4,defaultFormattingWidth:"wide"})};function iu(i){return(s,a={})=>{const o=a.width,u=o&&i.matchPatterns[o]||i.matchPatterns[i.defaultMatchWidth],d=s.match(u);if(!d)return null;const p=d[0],m=o&&i.parsePatterns[o]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?Y4(m,w=>w.test(p)):I4(m,w=>w.test(p));let x;x=i.valueCallback?i.valueCallback(g):g,x=a.valueCallback?a.valueCallback(x):x;const _=s.slice(p.length);return{value:x,rest:_}}}function I4(i,s){for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s(i[a]))return a}function Y4(i,s){for(let a=0;a<i.length;a++)if(s(i[a]))return a}function F4(i){return(s,a={})=>{const o=s.match(i.matchPattern);if(!o)return null;const u=o[0],d=s.match(i.parsePattern);if(!d)return null;let p=i.valueCallback?i.valueCallback(d[0]):d[0];p=a.valueCallback?a.valueCallback(p):p;const m=s.slice(u.length);return{value:p,rest:m}}}const J4=/^(\d+)(th|st|nd|rd)?/i,G4=/\d+/i,Q4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},X4={any:[/^b/i,/^(a|c)/i]},Z4={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K4={any:[/1/i,/2/i,/3/i,/4/i]},W4={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},eR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},aR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rR={ordinalNumber:F4({matchPattern:J4,parsePattern:G4,valueCallback:i=>parseInt(i,10)}),era:iu({matchPatterns:Q4,defaultMatchWidth:"wide",parsePatterns:X4,defaultParseWidth:"any"}),quarter:iu({matchPatterns:Z4,defaultMatchWidth:"wide",parsePatterns:K4,defaultParseWidth:"any",valueCallback:i=>i+1}),month:iu({matchPatterns:W4,defaultMatchWidth:"wide",parsePatterns:eR,defaultParseWidth:"any"}),day:iu({matchPatterns:tR,defaultMatchWidth:"wide",parsePatterns:nR,defaultParseWidth:"any"}),dayPeriod:iu({matchPatterns:sR,defaultMatchWidth:"any",parsePatterns:aR,defaultParseWidth:"any"})},IE={code:"en-US",formatDistance:T4,formatLong:M4,formatRelative:V4,localize:$4,match:rR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iR(i,s){const a=ts(i,s==null?void 0:s.in);return x4(a,D4(a))+1}function oR(i,s){const a=ts(i,s==null?void 0:s.in),o=+hh(a)-+N4(a);return Math.round(o/HE)+1}function YE(i,s){var _,w,D,z;const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=wu(),d=(s==null?void 0:s.firstWeekContainsDate)??((w=(_=s==null?void 0:s.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??u.firstWeekContainsDate??((z=(D=u.locale)==null?void 0:D.options)==null?void 0:z.firstWeekContainsDate)??1,p=ar((s==null?void 0:s.in)||i,0);p.setFullYear(o+1,0,d),p.setHours(0,0,0,0);const m=xu(p,s),g=ar((s==null?void 0:s.in)||i,0);g.setFullYear(o,0,d),g.setHours(0,0,0,0);const x=xu(g,s);return+a>=+m?o+1:+a>=+x?o:o-1}function lR(i,s){var m,g,x,_;const a=wu(),o=(s==null?void 0:s.firstWeekContainsDate)??((g=(m=s==null?void 0:s.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((_=(x=a.locale)==null?void 0:x.options)==null?void 0:_.firstWeekContainsDate)??1,u=YE(i,s),d=ar((s==null?void 0:s.in)||i,0);return d.setFullYear(u,0,o),d.setHours(0,0,0,0),xu(d,s)}function cR(i,s){const a=ts(i,s==null?void 0:s.in),o=+xu(a,s)-+lR(a,s);return Math.round(o/HE)+1}function ct(i,s){const a=i<0?"-":"",o=Math.abs(i).toString().padStart(s,"0");return a+o}const Zr={y(i,s){const a=i.getFullYear(),o=a>0?a:1-a;return ct(s==="yy"?o%100:o,s.length)},M(i,s){const a=i.getMonth();return s==="M"?String(a+1):ct(a+1,2)},d(i,s){return ct(i.getDate(),s.length)},a(i,s){const a=i.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(i,s){return ct(i.getHours()%12||12,s.length)},H(i,s){return ct(i.getHours(),s.length)},m(i,s){return ct(i.getMinutes(),s.length)},s(i,s){return ct(i.getSeconds(),s.length)},S(i,s){const a=s.length,o=i.getMilliseconds(),u=Math.trunc(o*Math.pow(10,a-3));return ct(u,s.length)}},ll={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Uw={G:function(i,s,a){const o=i.getFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})}},y:function(i,s,a){if(s==="yo"){const o=i.getFullYear(),u=o>0?o:1-o;return a.ordinalNumber(u,{unit:"year"})}return Zr.y(i,s)},Y:function(i,s,a,o){const u=YE(i,o),d=u>0?u:1-u;if(s==="YY"){const p=d%100;return ct(p,2)}return s==="Yo"?a.ordinalNumber(d,{unit:"year"}):ct(d,s.length)},R:function(i,s){const a=PE(i);return ct(a,s.length)},u:function(i,s){const a=i.getFullYear();return ct(a,s.length)},Q:function(i,s,a){const o=Math.ceil((i.getMonth()+1)/3);switch(s){case"Q":return String(o);case"QQ":return ct(o,2);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})}},q:function(i,s,a){const o=Math.ceil((i.getMonth()+1)/3);switch(s){case"q":return String(o);case"qq":return ct(o,2);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})}},M:function(i,s,a){const o=i.getMonth();switch(s){case"M":case"MM":return Zr.M(i,s);case"Mo":return a.ordinalNumber(o+1,{unit:"month"});case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})}},L:function(i,s,a){const o=i.getMonth();switch(s){case"L":return String(o+1);case"LL":return ct(o+1,2);case"Lo":return a.ordinalNumber(o+1,{unit:"month"});case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})}},w:function(i,s,a,o){const u=cR(i,o);return s==="wo"?a.ordinalNumber(u,{unit:"week"}):ct(u,s.length)},I:function(i,s,a){const o=oR(i);return s==="Io"?a.ordinalNumber(o,{unit:"week"}):ct(o,s.length)},d:function(i,s,a){return s==="do"?a.ordinalNumber(i.getDate(),{unit:"date"}):Zr.d(i,s)},D:function(i,s,a){const o=iR(i);return s==="Do"?a.ordinalNumber(o,{unit:"dayOfYear"}):ct(o,s.length)},E:function(i,s,a){const o=i.getDay();switch(s){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})}},e:function(i,s,a,o){const u=i.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(s){case"e":return String(d);case"ee":return ct(d,2);case"eo":return a.ordinalNumber(d,{unit:"day"});case"eee":return a.day(u,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(u,{width:"short",context:"formatting"});case"eeee":default:return a.day(u,{width:"wide",context:"formatting"})}},c:function(i,s,a,o){const u=i.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(s){case"c":return String(d);case"cc":return ct(d,s.length);case"co":return a.ordinalNumber(d,{unit:"day"});case"ccc":return a.day(u,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(u,{width:"narrow",context:"standalone"});case"cccccc":return a.day(u,{width:"short",context:"standalone"});case"cccc":default:return a.day(u,{width:"wide",context:"standalone"})}},i:function(i,s,a){const o=i.getDay(),u=o===0?7:o;switch(s){case"i":return String(u);case"ii":return ct(u,s.length);case"io":return a.ordinalNumber(u,{unit:"day"});case"iii":return a.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(o,{width:"short",context:"formatting"});case"iiii":default:return a.day(o,{width:"wide",context:"formatting"})}},a:function(i,s,a){const u=i.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},b:function(i,s,a){const o=i.getHours();let u;switch(o===12?u=ll.noon:o===0?u=ll.midnight:u=o/12>=1?"pm":"am",s){case"b":case"bb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(i,s,a){const o=i.getHours();let u;switch(o>=17?u=ll.evening:o>=12?u=ll.afternoon:o>=4?u=ll.morning:u=ll.night,s){case"B":case"BB":case"BBB":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},h:function(i,s,a){if(s==="ho"){let o=i.getHours()%12;return o===0&&(o=12),a.ordinalNumber(o,{unit:"hour"})}return Zr.h(i,s)},H:function(i,s,a){return s==="Ho"?a.ordinalNumber(i.getHours(),{unit:"hour"}):Zr.H(i,s)},K:function(i,s,a){const o=i.getHours()%12;return s==="Ko"?a.ordinalNumber(o,{unit:"hour"}):ct(o,s.length)},k:function(i,s,a){let o=i.getHours();return o===0&&(o=24),s==="ko"?a.ordinalNumber(o,{unit:"hour"}):ct(o,s.length)},m:function(i,s,a){return s==="mo"?a.ordinalNumber(i.getMinutes(),{unit:"minute"}):Zr.m(i,s)},s:function(i,s,a){return s==="so"?a.ordinalNumber(i.getSeconds(),{unit:"second"}):Zr.s(i,s)},S:function(i,s){return Zr.S(i,s)},X:function(i,s,a){const o=i.getTimezoneOffset();if(o===0)return"Z";switch(s){case"X":return Bw(o);case"XXXX":case"XX":return Qi(o);case"XXXXX":case"XXX":default:return Qi(o,":")}},x:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"x":return Bw(o);case"xxxx":case"xx":return Qi(o);case"xxxxx":case"xxx":default:return Qi(o,":")}},O:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+zw(o,":");case"OOOO":default:return"GMT"+Qi(o,":")}},z:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+zw(o,":");case"zzzz":default:return"GMT"+Qi(o,":")}},t:function(i,s,a){const o=Math.trunc(+i/1e3);return ct(o,s.length)},T:function(i,s,a){return ct(+i,s.length)}};function zw(i,s=""){const a=i>0?"-":"+",o=Math.abs(i),u=Math.trunc(o/60),d=o%60;return d===0?a+String(u):a+String(u)+s+ct(d,2)}function Bw(i,s){return i%60===0?(i>0?"-":"+")+ct(Math.abs(i)/60,2):Qi(i,s)}function Qi(i,s=""){const a=i>0?"-":"+",o=Math.abs(i),u=ct(Math.trunc(o/60),2),d=ct(o%60,2);return a+u+s+d}const qw=(i,s)=>{switch(i){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},FE=(i,s)=>{switch(i){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},uR=(i,s)=>{const a=i.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return qw(i,s);let d;switch(o){case"P":d=s.dateTime({width:"short"});break;case"PP":d=s.dateTime({width:"medium"});break;case"PPP":d=s.dateTime({width:"long"});break;case"PPPP":default:d=s.dateTime({width:"full"});break}return d.replace("{{date}}",qw(o,s)).replace("{{time}}",FE(u,s))},fR={p:FE,P:uR},dR=/^D+$/,hR=/^Y+$/,mR=["D","DD","YY","YYYY"];function pR(i){return dR.test(i)}function bR(i){return hR.test(i)}function yR(i,s,a){const o=gR(i,s,a);if(console.warn(o),mR.includes(i))throw new RangeError(o)}function gR(i,s,a){const o=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${s}\`) for formatting ${o} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NR=/^'([^]*?)'?$/,SR=/''/g,wR=/[a-zA-Z]/;function JE(i,s,a){var _,w,D,z;const o=wu(),u=o.locale??IE,d=o.firstWeekContainsDate??((w=(_=o.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??1,p=o.weekStartsOn??((z=(D=o.locale)==null?void 0:D.options)==null?void 0:z.weekStartsOn)??0,m=ts(i,a==null?void 0:a.in);if(!_4(m))throw new RangeError("Invalid time value");let g=s.match(xR).map(q=>{const F=q[0];if(F==="p"||F==="P"){const Z=fR[F];return Z(q,u.formatLong)}return q}).join("").match(vR).map(q=>{if(q==="''")return{isToken:!1,value:"'"};const F=q[0];if(F==="'")return{isToken:!1,value:ER(q)};if(Uw[F])return{isToken:!0,value:q};if(F.match(wR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+F+"`");return{isToken:!1,value:q}});u.localize.preprocessor&&(g=u.localize.preprocessor(m,g));const x={firstWeekContainsDate:d,weekStartsOn:p,locale:u};return g.map(q=>{if(!q.isToken)return q.value;const F=q.value;(bR(F)||pR(F))&&yR(F,s,String(i));const Z=Uw[F[0]];return Z(m,F,u.localize,x)}).join("")}function ER(i){const s=i.match(NR);return s?s[1].replace(SR,"'"):i}function _R(i,s,a){const o=wu(),u=(a==null?void 0:a.locale)??o.locale??IE,d=S4(i,s);if(isNaN(d))throw new RangeError("Invalid time value");const p=Object.assign({},a,{addSuffix:a==null?void 0:a.addSuffix,comparison:d}),[m,g]=$E(a==null?void 0:a.in,...d>0?[s,i]:[i,s]),x=A4((a==null?void 0:a.roundingMethod)??"round"),_=g.getTime()-m.getTime(),w=_/Ow,D=mh(g)-mh(m),z=(_-D)/Ow,q=a==null?void 0:a.unit;let F;if(q?F=q:w<1?F="second":w<60?F="minute":w<Mw?F="hour":z<jw?F="day":z<Rw?F="month":F="year",F==="second"){const Z=x(_/1e3);return u.formatDistance("xSeconds",Z,p)}else if(F==="minute"){const Z=x(w);return u.formatDistance("xMinutes",Z,p)}else if(F==="hour"){const Z=x(w/60);return u.formatDistance("xHours",Z,p)}else if(F==="day"){const Z=x(z/Mw);return u.formatDistance("xDays",Z,p)}else if(F==="month"){const Z=x(z/jw);return Z===12&&q!=="month"?u.formatDistance("xYears",1,p):u.formatDistance("xMonths",Z,p)}else{const Z=x(z/Rw);return u.formatDistance("xYears",Z,p)}}function AR(i,s){return _R(i,w4(i),s)}function DR(i){const s=new Date(i);return s.getTime()>Date.now()?"just now":AR(s,{addSuffix:!0})}function B6(i){return i<=0?"Expired":fy(i)}function CR(i){return i==null?"--":fy(i)}function fy(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const p=i/1e3;return Number.isInteger(p)?`${p}s`:`${p.toFixed(1)}s`}const s=Math.floor(i/1e3),a=Math.floor(s/86400),o=Math.floor(s%86400/3600),u=Math.floor(s%3600/60),d=s%60;return a>0?o>0?`${a}d ${o}h`:`${a}d`:o>0?u>0?`${o}h ${u}m`:`${o}h`:d>0?`${u}m ${d}s`:`${u}m`}function q6(i,s){const a=new Date(i).getTime(),o=s?new Date(s).getTime():Date.now();return fy(o-a)}function GE({options:i,children:s,className:a=""}){const[o,u]=B.useState(!1),[d,p]=B.useState(null),[m,g]=B.useState(null),x=B.useRef(null),_=B.useRef(void 0),w=B.useRef(void 0),D=220,z=B.useCallback(()=>{if(!x.current)return;const ee=x.current.getBoundingClientRect(),te=window.innerWidth-D-8,we=Math.max(8,Math.min(ee.left,te));g({top:ee.bottom+4,left:we})},[]),q=B.useCallback(async(ee,te)=>{try{await navigator.clipboard.writeText(ee),p(te),clearTimeout(_.current),_.current=setTimeout(()=>p(null),1200)}catch{}},[]),F=B.useCallback(()=>{clearTimeout(w.current),z(),u(!0)},[z]),Z=B.useCallback(()=>{w.current=setTimeout(()=>u(!1),150)},[]);return B.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(w.current)},[]),b.jsxDEV("span",{ref:x,className:`inline-flex items-center cursor-default ${a}`,onMouseEnter:F,onMouseLeave:Z,children:[s,o&&m&&Gw.createPortal(b.jsxDEV("span",{className:"fixed z-[9999] bg-surface-raised border border-surface-border rounded shadow-lg py-1 min-w-[180px]",style:{top:m.top,left:m.left},onMouseEnter:F,onMouseLeave:Z,children:i.map(ee=>b.jsxDEV("button",{onClick:te=>{te.stopPropagation(),q(ee.value,ee.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[b.jsxDEV("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ee.label},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:85,columnNumber:15},this),b.jsxDEV("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:d===ee.label?"✓":ee.value},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:88,columnNumber:15},this)]},ee.label,!0,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:80,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:73,columnNumber:9},this),document.body)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:65,columnNumber:5},this)}function TR(i,s){const a=new Date(i);switch(s){case"relative":return DR(i);case"datetime":return JE(a,"MMM d, yyyy h:mm a");case"time":return a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function OR(i){const s=new Date(i);return[{label:"ms",value:String(s.getTime())},{label:"utc",value:s.toISOString()},{label:"local",value:JE(s,"MMM d, yyyy h:mm:ss a")}]}function RR({date:i,format:s="relative",className:a=""}){const[,o]=B.useState(0);B.useEffect(()=>{if(s!=="relative")return;const d=setInterval(()=>o(p=>p+1),3e4);return()=>clearInterval(d)},[s]);const u=B.useMemo(()=>OR(i),[i]);return b.jsxDEV(GE,{options:u,children:b.jsxDEV("time",{dateTime:i,className:`text-xs text-text-tertiary ${a}`,children:TR(i,s)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateValue.tsx",lineNumber:56,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateValue.tsx",lineNumber:55,columnNumber:5},this)}function jR({ms:i,className:s=""}){const a=CR(i),o=B.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:a}],[i,a]);return i==null?b.jsxDEV("span",{className:`text-xs text-text-tertiary ${s}`,children:"--"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:29,columnNumber:12},this):b.jsxDEV(GE,{options:o,children:b.jsxDEV("span",{className:`text-xs text-text-tertiary ${s}`,children:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:34,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:33,columnNumber:5},this)}const MR=["sm","md","lg","full"],Lw={sm:"w-[28rem] max-h-[40vh]",md:"w-[36rem] max-h-[60vh]",lg:"w-[48rem] max-h-[80vh]",full:"inset-4 w-auto max-h-none"},Hw={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function kR({which:i}){const s="stroke-current";switch(i){case"sm":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:27,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:27,columnNumber:15},this);case"md":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:29,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:29,columnNumber:15},this);case"lg":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:31,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:31,columnNumber:15},this);case"full":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:33,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:33,columnNumber:15},this)}}function VR({msg:i}){const[s,a]=B.useState(0);B.useEffect(()=>{const p=new Date(i.timestamp).getTime(),m=()=>a(Math.floor((Date.now()-p)/1e3));m();const g=setInterval(m,1e3);return()=>clearInterval(g)},[i.timestamp]);const o=Math.floor(s/60),u=s%60,d=o>0?`${o}m ${u}s`:`${u}s`;return b.jsxDEV("span",{className:"inline-flex flex-col gap-1.5",children:[b.jsxDEV("span",{className:"inline-flex items-center gap-1",children:[b.jsxDEV("span",{className:"text-text-tertiary",children:"Thinking"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:55,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:56,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:57,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-muted ml-1 tabular-nums",children:d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:59,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:54,columnNumber:7},this),i.workflowId&&b.jsxDEV(uu,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[b.jsxDEV(Y0,{className:"w-2.5 h-2.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:66,columnNumber:11},this),"watch execution"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:62,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:53,columnNumber:5},this)}function UR({msg:i,compileMessage:s}){const a=i.role==="assistant";return b.jsxDEV("div",{className:`flex items-center gap-1.5 ${a?"justify-start":"justify-end"}`,children:[b.jsxDEV(RR,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:78,columnNumber:7},this),i.durationMs!=null&&b.jsxDEV(b.Fragment,{children:[b.jsxDEV("span",{className:"text-text-muted/30 text-[8px]",children:"·"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:81,columnNumber:11},this),b.jsxDEV(jR,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:80,columnNumber:9},this),i.workflowId&&b.jsxDEV(uu,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:b.jsxDEV(Y0,{className:"w-2.5 h-2.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:91,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:86,columnNumber:9},this),a&&i.workflowId&&!i.pending&&b.jsxDEV("button",{onClick:()=>s(i.id),disabled:i.compilationStatus==="compiling"||i.compilationStatus==="done",className:"transition-colors",title:i.compilationStatus==="done"?"Compiled — future queries will match this pipeline":i.compilationStatus==="error"?i.compilationError??"Compilation failed":i.compilationStatus==="compiling"?"Compiling...":"Compile to fast pipeline",children:b.jsxDEV(aT,{className:`w-2.5 h-2.5 ${i.compilationStatus==="done"?"text-status-success":i.compilationStatus==="error"?"text-status-error":i.compilationStatus==="compiling"?"text-accent/40 animate-pulse":"text-text-muted/40 hover:text-accent"}`,strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:109,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:95,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:77,columnNumber:5},this)}function zR(){const{helpOpen:i,setHelpOpen:s,messages:a,sendMessage:o,pageContext:u,activeWorkflowId:d,clearMessages:p,compileMessage:m}=LE(),[g,x]=B.useState(""),[_,w]=B.useState("md"),[D,z]=B.useState(!0),q=B.useRef(null),F=B.useRef(null);if(B.useEffect(()=>{q.current&&(q.current.scrollTop=q.current.scrollHeight)},[a]),B.useEffect(()=>{i&&F.current&&F.current.focus()},[i]),B.useEffect(()=>{if(!i)return;const U=ne=>{ne.key==="Escape"&&(_==="full"?w("lg"):_==="lg"?w("md"):_==="md"?w("sm"):s(!1))};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i,_,s]),!i)return null;const Z=()=>{const U=g.trim();!U||d||(o(U),x(""),F.current&&(F.current.style.height="auto"))},ee=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),Z())},te=_==="full",we=u.page.replace(/-/g," "),De=te?{}:{bottom:"calc(var(--feed-height, 32px) + 76px)"};return b.jsxDEV("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${te?Lw.full:`right-6 ${Lw[_]}`} ${D?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:De,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[b.jsxDEV("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[b.jsxDEV("div",{className:"min-w-0 flex-1",children:[b.jsxDEV("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:206,columnNumber:11},this),b.jsxDEV("p",{className:"text-[10px] text-text-tertiary truncate",children:we},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:207,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:205,columnNumber:9},this),b.jsxDEV("div",{className:"flex items-center gap-1 ml-2",children:[b.jsxDEV("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:MR.map(U=>b.jsxDEV("button",{onClick:()=>w(U),className:`p-1 rounded transition-colors ${U===_?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":U===_,"aria-label":Hw[U],title:Hw[U],children:b.jsxDEV(kR,{which:U},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:225,columnNumber:17},this)},U,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:212,columnNumber:15},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:210,columnNumber:11},this),a.length>0&&b.jsxDEV("button",{onClick:p,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:b.jsxDEV(nT,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:236,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:230,columnNumber:13},this),b.jsxDEV("button",{onClick:()=>s(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:b.jsxDEV(F0,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:245,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:239,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:209,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:202,columnNumber:7},this),b.jsxDEV("div",{ref:q,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[a.length===0&&b.jsxDEV("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:255,columnNumber:11},this),a.map(U=>b.jsxDEV("div",{className:`text-xs leading-relaxed ${U.role==="user"?"text-right":"text-left"}`,children:[b.jsxDEV("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${U.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:U.pending?b.jsxDEV(VR,{msg:U},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:272,columnNumber:17},this):U.role==="assistant"?b.jsxDEV(uy,{content:U.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:274,columnNumber:17},this):U.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:264,columnNumber:13},this),!U.pending&&b.jsxDEV("div",{className:"mt-0.5",children:b.jsxDEV(UR,{msg:U,compileMessage:m},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:281,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:280,columnNumber:15},this)]},U.id,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:260,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:251,columnNumber:7},this),b.jsxDEV("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[b.jsxDEV("textarea",{ref:F,value:g,onChange:U=>{x(U.target.value);const ne=U.target;ne.style.height="auto",ne.style.height=`${Math.min(ne.scrollHeight,120)}px`},onKeyDown:ee,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:292,columnNumber:9},this),b.jsxDEV("button",{onClick:Z,disabled:!g.trim()||!!d,className:"px-2.5 py-1.5 text-accent hover:text-accent-hover disabled:text-text-muted transition-colors self-end","aria-label":"Send",children:b.jsxDEV(sT,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:314,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:308,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:289,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:189,columnNumber:5},this)}function BR(){const{isSuperAdmin:i,hasRoleType:s,hasRole:a}=Ki(),{collapsed:o,toggle:u}=UE(),[d,p]=B.useState(!1),[m,g]=B.useState(()=>window.location.hash.startsWith("#docs")),x=Zi(),_=B.useRef(null);return B.useEffect(()=>{const w=_.current;w&&(w.classList.remove("animate-page-in"),w.offsetWidth,w.classList.add("animate-page-in"))},[x.pathname]),B.useEffect(()=>{const w=()=>{window.location.hash.startsWith("#docs")&&g(!0)};return window.addEventListener("hashchange",w),()=>window.removeEventListener("hashchange",w)},[]),b.jsxDEV("div",{className:"h-screen bg-surface flex flex-col",style:{"--feed-height":d?"224px":"32px"},children:[b.jsxDEV(O5,{onToggleEventFeed:()=>p(w=>!w),onToggleDocs:()=>g(w=>!w)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:45,columnNumber:7},this),b.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxDEV("aside",{className:`${o?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[b.jsxDEV("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[(i||s("admin")||a("engineer"))&&b.jsxDEV(B5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:57,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(L5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:58,columnNumber:79},this),(i||s("admin"))&&b.jsxDEV(U5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:59,columnNumber:56},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:56,columnNumber:11},this),b.jsxDEV("button",{onClick:u,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${o?"flex justify-center":"flex items-center px-7"}`,"aria-label":o?"Expand sidebar":"Collapse sidebar",children:o?b.jsxDEV(rT,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:71,columnNumber:15},this):b.jsxDEV(iT,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:73,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:63,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:50,columnNumber:9},this),b.jsxDEV("main",{className:"flex-1 overflow-y-auto",children:b.jsxDEV("div",{ref:_,className:`max-w-dashboard mx-auto px-10 py-10 animate-page-in ${d?"pb-60":"pb-16"}`,children:b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:81,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:80,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:79,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:48,columnNumber:7},this),b.jsxDEV(n4,{open:d,onToggle:()=>p(w=>!w)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:87,columnNumber:7},this),b.jsxDEV(d4,{open:m,onClose:()=>{g(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:88,columnNumber:7},this),b.jsxDEV(y4,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:89,columnNumber:7},this),b.jsxDEV(zR,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:90,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:43,columnNumber:5},this)}function qR(){const{isAuthenticated:i}=Ki(),s=Zi();return i?b.jsxDEV(A5,{children:b.jsxDEV(b4,{children:b.jsxDEV(BR,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:106,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:105,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:104,columnNumber:5},this):b.jsxDEV(Wr,{to:"/login",state:{from:s.pathname},replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:100,columnNumber:12},this)}function QE({provider:i,className:s="w-5 h-5"}){switch(i){case"google":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:[b.jsxDEV("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:11,columnNumber:11},this),b.jsxDEV("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:12,columnNumber:11},this),b.jsxDEV("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:13,columnNumber:11},this),b.jsxDEV("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:10,columnNumber:9},this);case"github":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:b.jsxDEV("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:19,columnNumber:9},this);case"microsoft":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:[b.jsxDEV("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:26,columnNumber:11},this),b.jsxDEV("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:27,columnNumber:11},this),b.jsxDEV("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:28,columnNumber:11},this),b.jsxDEV("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:29,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:25,columnNumber:9},this);case"anthropic":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:b.jsxDEV("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767L16.906 20.48h-3.674l-1.343-3.461H6.396l-1.34 3.461H1.5l5.07-16.96zm2.327 5.14l-2.065 5.326h4.108l-2.043-5.326z"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:35,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:34,columnNumber:9},this);default:return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[b.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:41,columnNumber:11},this),b.jsxDEV("path",{d:"M12 8v4l3 3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:40,columnNumber:9},this)}}async function LR(){return Nt("/auth/oauth/providers")}async function HR(i,s){const a=s?`?label=${encodeURIComponent(s)}`:"";return Nt(`/auth/oauth/connections/${i}${a}`,{method:"DELETE"})}function L6(){return ii({queryKey:["oauth-connections"],queryFn:()=>Nt("/auth/oauth/connections")})}function H6(){const i=Vs();return Sa({mutationFn:({provider:s,label:a})=>HR(s,a),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function PR(){var ne;const{login:i,isAuthenticated:s}=Ki(),a=Qw(),o=Zi(),u=new URLSearchParams(o.search),d=u.get("token"),p=u.get("error"),m=((ne=o.state)==null?void 0:ne.from)??u.get("returnTo")??"/",g=B.useRef(!1);d&&!g.current&&(g.current=!0,i(d,void 0,{displayName:u.get("displayName"),username:u.get("username")}));const[x,_]=B.useState(""),[w,D]=B.useState(""),[z,q]=B.useState(p||""),[F,Z]=B.useState(!1),[ee,te]=B.useState(!!d),[we,De]=B.useState([]);if(B.useEffect(()=>{d||LR().then(De).catch(()=>{})},[]),B.useEffect(()=>{if(!ee)return;const oe=setTimeout(()=>a(m,{replace:!0}),1500);return()=>clearTimeout(oe)},[ee]),s&&!ee)return b.jsxDEV(Wr,{to:m,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:54,columnNumber:12},this);const U=async oe=>{var W,Q;if(oe.preventDefault(),q(""),!x.trim()||!w){q("Username and password are required");return}Z(!0);try{const H=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:x.trim(),password:w})}),le=await H.json();if(!H.ok){q(le.error||"Login failed");return}te(!0),i(le.token,{username:x.trim(),password:w},{displayName:(W=le.user)==null?void 0:W.display_name,username:(Q=le.user)==null?void 0:Q.external_id})}catch{q("Unable to connect to server")}finally{Z(!1)}};return b.jsxDEV("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:b.jsxDEV("div",{className:"w-full max-w-md p-10",children:[b.jsxDEV("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ee?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:b.jsxDEV(oy,{size:"lg",hideLabel:ee},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:101,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:94,columnNumber:9},this),b.jsxDEV("form",{onSubmit:U,className:`space-y-5 transition-opacity duration-300 ${ee?"opacity-0":""}`,children:[b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:109,columnNumber:13},this),b.jsxDEV("input",{id:"username",type:"text",value:x,onChange:oe=>_(oe.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ee,autoComplete:"username"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:115,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:108,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:128,columnNumber:13},this),b.jsxDEV("input",{id:"password",type:"password",value:w,onChange:oe=>D(oe.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:134,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:127,columnNumber:11},this),z&&b.jsxDEV("p",{className:"text-sm text-status-error",children:z},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:145,columnNumber:21},this),b.jsxDEV("button",{type:"submit",className:"btn-primary w-full",disabled:F||ee,children:F?"Signing in...":"Sign In"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:147,columnNumber:11},this),we.length>0&&b.jsxDEV(b.Fragment,{children:[b.jsxDEV("div",{className:"flex items-center gap-3 mt-6",children:[b.jsxDEV("div",{className:"flex-1 h-px bg-border"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:154,columnNumber:17},this),b.jsxDEV("span",{className:"text-xs text-text-tertiary",children:"or continue with"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:155,columnNumber:17},this),b.jsxDEV("div",{className:"flex-1 h-px bg-border"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:156,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:153,columnNumber:15},this),b.jsxDEV("div",{className:"space-y-2",children:we.filter(oe=>oe.provider!=="anthropic").map(oe=>b.jsxDEV("a",{href:`/api/auth/oauth/${oe.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[b.jsxDEV(QE,{provider:oe.provider},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:165,columnNumber:21},this),"Sign in with ",oe.name]},oe.provider,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:160,columnNumber:19},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:158,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:152,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:93,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:92,columnNumber:5},this)}function Pw(){const{isAuthenticated:i}=Ki(),s=Qw(),a=Zi(),o=new URLSearchParams(a.search),u=o.get("state")||"";B.useEffect(()=>{i||s(`/login?returnTo=${encodeURIComponent(a.pathname+a.search)}`)},[i]);const[d,p]=B.useState(""),[m,g]=B.useState(o.get("label")||"default"),[x,_]=B.useState(""),[w,D]=B.useState(!1),z=d.trim().startsWith("sk-ant-oat"),q=d.trim().startsWith("sk-ant-api"),F=Z=>{Z.preventDefault();const ee=d.trim();if(!ee){_("A token or API key is required");return}if(!ee.startsWith("sk-ant-")){_('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}D(!0),_("");const te=`/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ee)}&state=${encodeURIComponent(u)}`;window.location.href=te};return b.jsxDEV("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:b.jsxDEV("div",{className:"w-full max-w-md p-10",children:[b.jsxDEV("div",{className:"mb-10",children:b.jsxDEV(oy,{size:"lg"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:67,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:66,columnNumber:9},this),b.jsxDEV("div",{className:"flex items-center gap-2 mb-6",children:[b.jsxDEV(QE,{provider:"anthropic",className:"w-6 h-6"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:71,columnNumber:11},this),b.jsxDEV("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:70,columnNumber:9},this),b.jsxDEV("p",{className:"text-sm text-text-secondary mb-4",children:"Connect your Anthropic account so Claude Code tasks run under your credentials. Your token is encrypted at rest."},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:77,columnNumber:9},this),b.jsxDEV("form",{onSubmit:F,className:"space-y-5",children:[b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:84,columnNumber:13},this),b.jsxDEV("input",{id:"token",type:"password",value:d,onChange:Z=>p(Z.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:90,columnNumber:13},this),z&&b.jsxDEV("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:101,columnNumber:15},this),q&&b.jsxDEV("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:106,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:83,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:113,columnNumber:13},this),b.jsxDEV("input",{id:"label",type:"text",value:m,onChange:Z=>g(Z.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:119,columnNumber:13},this),b.jsxDEV("p",{className:"text-xs text-text-tertiary mt-1",children:'A name for this credential. Use different labels to store multiple credentials (e.g., "subscription", "api-batch").'},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:128,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:112,columnNumber:11},this),x&&b.jsxDEV("p",{className:"text-sm text-status-error",children:x},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:134,columnNumber:21},this),b.jsxDEV("button",{type:"submit",className:"btn-primary w-full",disabled:w,children:w?"Validating...":"Connect"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:136,columnNumber:11},this),b.jsxDEV("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:144,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:82,columnNumber:9},this),b.jsxDEV("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"font-medium text-text-secondary",children:"Recommended:"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:154,columnNumber:13},this)," ","Run"," ",b.jsxDEV("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:156,columnNumber:13},this)," ","in your terminal to generate an OAuth token that uses your subscription."]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:153,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"font-medium text-text-secondary",children:"Alternative:"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:160,columnNumber:13},this)," ","Use an API key from"," ",b.jsxDEV("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:162,columnNumber:13},this)," ","(billed per-token)."]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:152,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:64,columnNumber:5},this)}function x0({roleTypes:i,roleNames:s,redirectTo:a="/"}){const{isSuperAdmin:o,hasRole:u,hasRoleType:d}=Ki();return o?b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:18,columnNumber:28},this):i&&i.some(p=>d(p))?b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:21,columnNumber:66},this):s&&s.some(p=>u(p))?b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:24,columnNumber:62},this):b.jsxDEV(Wr,{to:a,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:26,columnNumber:10},this)}const $w=B.lazy(()=>rt(()=>import("./ProcessesListPage-ByVoBCQ3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(i=>({default:i.ProcessesListPage}))),$R=B.lazy(()=>rt(()=>import("./ProcessDetailPage-hFMhf9qa.js"),__vite__mapDeps([16,2,1,4,17,18,19,15,14,9,6,20,21,22])).then(i=>({default:i.ProcessDetailPage}))),IR=B.lazy(()=>rt(()=>import("./McpOverview-CUgSxkQe.js"),__vite__mapDeps([23,2,24,25,26,27,12,28,14,6])).then(i=>({default:i.McpOverview}))),YR=B.lazy(()=>rt(()=>import("./McpRunsPage-DKvTklh9.js"),__vite__mapDeps([29,2,25,26,27,5,6,7,8,15,14,9,30,12,11,10,13,31])).then(i=>({default:i.McpRunsPage}))),FR=B.lazy(()=>rt(()=>import("./McpRunDetailPage-D6gaxH3_.js"),__vite__mapDeps([32,2,25,17,19,12,33,6,34,35,11,36,13,14])).then(i=>({default:i.McpRunDetailPage}))),JR=B.lazy(()=>rt(()=>import("./McpQueryPage-lV6kfDG5.js"),__vite__mapDeps([37,12,7,8,11,2,10,13,14,9,30,15,31,5,6,4,38])).then(i=>({default:i.McpQueryPage}))),GR=B.lazy(()=>rt(()=>import("./McpQueryDetailPage-BWbinTM_.js"),__vite__mapDeps([39,2,12,19,38,26,4,14,40,34,41,42,43,25,3,1,44,6,33,45,36])).then(i=>({default:i.McpQueryDetailPage}))),QR=B.lazy(()=>rt(()=>import("./EscalationsOverview-DpXDnQux.js"),__vite__mapDeps([46,2,4,12,28,6,14])).then(i=>({default:i.EscalationsOverview}))),XR=B.lazy(()=>rt(()=>import("./AvailableEscalationsPage-Dbd1qUK_.js"),__vite__mapDeps([47,2,4,48,5,6,7,8,10,49,12,50,51,17,22,52,11,53,20,14,15,9,54,31,13])).then(i=>({default:i.AvailableEscalationsPage}))),ZR=B.lazy(()=>rt(()=>import("./OperatorDashboard-C9SSV96T.js"),__vite__mapDeps([55,4,2,48,5,6,7,8,12,10,31,52,11,53,20,14,15,9,54,13])).then(i=>({default:i.OperatorDashboard}))),KR=B.lazy(()=>rt(()=>import("./index-DDYFpi4l.js"),__vite__mapDeps([56,2,48,12,34,54,3,17,4,6,21,22,51,50,19,20,14,33])).then(i=>({default:i.EscalationDetailPage}))),WR=B.lazy(()=>rt(()=>import("./WorkflowsOverview-CLnLRpOu.js"),__vite__mapDeps([57,2,3,4,12,28,6,14])).then(i=>({default:i.WorkflowsOverview}))),e6=B.lazy(()=>rt(()=>import("./index-BizfauqT.js"),__vite__mapDeps([58,2,3,12,14,42,43,6,7,8,59,45,19])).then(i=>({default:i.StartWorkflowPage}))),t6=B.lazy(()=>rt(()=>import("./index-BizfauqT.js"),__vite__mapDeps([58,2,3,12,14,42,43,6,7,8,59,45,19])).then(i=>({default:i.DurableInvokePage}))),n6=B.lazy(()=>rt(()=>import("./WorkflowsDashboard-DZjuiFZ0.js"),__vite__mapDeps([60,2,9,30,3,4,5,6,7,8,15,14,12,11,10,13,31])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),s6=B.lazy(()=>rt(()=>import("./WorkflowsDashboard-DZjuiFZ0.js"),__vite__mapDeps([60,2,9,30,3,4,5,6,7,8,15,14,12,11,10,13,31])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),a6=B.lazy(()=>rt(()=>import("./YamlWorkflowsPage-VjdhnLmO.js"),__vite__mapDeps([61,2,26,5,6,62,19,12,11,8,44,41,42,43,14,59,45])).then(i=>({default:i.YamlWorkflowsPage}))),r6=B.lazy(()=>rt(()=>import("./TasksListPage-DSUmD84y.js"),__vite__mapDeps([63,1,2,3,5,6,7,8,19,53,45,10,11,12,15,14])).then(i=>({default:i.TasksListPage}))),i6=B.lazy(()=>rt(()=>import("./TaskDetailPage-C-nzaNea.js"),__vite__mapDeps([64,1,2,19,53,12,6,14])).then(i=>({default:i.TaskDetailPage}))),Iw=B.lazy(()=>rt(()=>import("./WorkflowExecutionPage-DjVxfZaF.js"),__vite__mapDeps([65,2,3,4,35,11,36,19,6,1,12,34,13,14])).then(i=>({default:i.WorkflowExecutionPage}))),o6=B.lazy(()=>rt(()=>import("./AdminDashboard-DUrSBQOl.js"),__vite__mapDeps([66,1,2,4,24,18,6,14])).then(i=>({default:i.AdminDashboard}))),l6=B.lazy(()=>rt(()=>import("./index-Cg5nfiYX.js"),__vite__mapDeps([67,2,3,7,8,11,31,5,6,12,68,14,15])).then(i=>({default:i.WorkersPage}))),c6=B.lazy(()=>rt(()=>import("./index-D1wVX50Z.js"),__vite__mapDeps([69,2,3,7,8,70,49,6,11,31,5,12,20,14,68,15,71,48,42,43])).then(i=>({default:i.WorkflowConfigsPage}))),Yw=B.lazy(()=>rt(()=>import("./index-D1wVX50Z.js"),__vite__mapDeps([69,2,3,7,8,70,49,6,11,31,5,12,20,14,68,15,71,48,42,43])).then(i=>({default:i.WorkflowConfigDetailPage}))),u6=B.lazy(()=>rt(()=>import("./index-Cf60K3x9.js"),__vite__mapDeps([72,2,24,8,70,49,6,12,11,10,5,62,41,42,43,14,31,19])).then(i=>({default:i.McpServersPage}))),Fw=B.lazy(()=>rt(()=>import("./index-Ds0JoXS2.js"),__vite__mapDeps([73,2,24,71,12,40,14,6])).then(i=>({default:i.McpServerDetailPage}))),f6=B.lazy(()=>rt(()=>import("./index-Di12t56M.js"),__vite__mapDeps([74,2,22,5,6,7,8,10,11,9,70,49,31,12,20,14,43,48,45])).then(i=>({default:i.UsersPage}))),d6=B.lazy(()=>rt(()=>import("./RolesPage-SMedMuqa.js"),__vite__mapDeps([75,2,48,7,8,70,49,6,12,20,14,31])).then(i=>({default:i.RolesPage}))),h6=B.lazy(()=>rt(()=>import("./index-BcR6PfpY.js"),__vite__mapDeps([76,2,12,49,6,50,14])).then(i=>({default:i.MaintenancePage}))),m6=B.lazy(()=>rt(()=>import("./index-BUK3qR-1.js"),__vite__mapDeps([77,2,18,7,8,34,11,5,6,31,14,49,68])).then(i=>({default:i.ControlPlanePage}))),p6=B.lazy(()=>rt(()=>import("./CredentialsPage-DJablIbs.js"),__vite__mapDeps([78,2,12,45,70,49,6,14])).then(i=>({default:i.CredentialsPage})));function b6(){return b.jsxDEV("div",{className:"animate-pulse space-y-4",children:[b.jsxDEV("div",{className:"h-8 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:129,columnNumber:7},this),b.jsxDEV("div",{className:"h-40 bg-surface-sunken rounded"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:130,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/App.tsx",lineNumber:128,columnNumber:5},this)}function Ze({children:i}){return b.jsxDEV(B.Suspense,{fallback:b.jsxDEV(b6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:137,columnNumber:25},this),children:b.jsxDEV("div",{className:"animate-page-enter",children:i},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:138,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:137,columnNumber:5},this)}const XE=new kC({defaultOptions:{queries:{staleTime:1e4,retry:(i,s)=>s instanceof Error&&s.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{XE.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),window.location.pathname!=="/login"&&(window.location.href=`/login?returnTo=${encodeURIComponent(window.location.pathname)}`)});const y6=zC([{path:"/login",element:b.jsxDEV(PR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:174,columnNumber:30},void 0)},{path:"/connect/anthropic",element:b.jsxDEV(Pw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:175,columnNumber:42},void 0)},{path:"/connect/:provider",element:b.jsxDEV(Pw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:176,columnNumber:42},void 0)},{path:"/",element:b.jsxDEV(qR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:179,columnNumber:14},void 0),children:[{index:!0,element:b.jsxDEV(Ze,{children:b.jsxDEV($w,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:182,columnNumber:37},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:182,columnNumber:31},void 0)},{path:"processes/all",element:b.jsxDEV(Ze,{children:b.jsxDEV($w,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:185,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:185,columnNumber:41},void 0)},{path:"processes/detail/:originId",element:b.jsxDEV(Ze,{children:b.jsxDEV($R,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:186,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:186,columnNumber:54},void 0)},{path:"credentials",element:b.jsxDEV(Ze,{children:b.jsxDEV(p6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:189,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:189,columnNumber:39},void 0)},{path:"connections",element:b.jsxDEV(Wr,{to:"/credentials",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:190,columnNumber:39},void 0)},{path:"escalations",element:b.jsxDEV(Ze,{children:b.jsxDEV(QR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:193,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:193,columnNumber:39},void 0)},{path:"escalations/available",element:b.jsxDEV(Ze,{children:b.jsxDEV(XR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:194,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:194,columnNumber:49},void 0)},{path:"escalations/queue",element:b.jsxDEV(Ze,{children:b.jsxDEV(ZR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:195,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:195,columnNumber:45},void 0)},{path:"escalations/detail/:id",element:b.jsxDEV(Ze,{children:b.jsxDEV(KR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:196,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:196,columnNumber:50},void 0)},{element:b.jsxDEV(x0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:200,columnNumber:18},void 0),children:[{path:"workflows",element:b.jsxDEV(Ze,{children:b.jsxDEV(WR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:202,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:202,columnNumber:41},void 0)},{path:"workflows/executions",element:b.jsxDEV(Ze,{children:b.jsxDEV(s6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:203,columnNumber:58},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:203,columnNumber:52},void 0)},{path:"workflows/durable/executions",element:b.jsxDEV(Ze,{children:b.jsxDEV(n6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:204,columnNumber:66},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:204,columnNumber:60},void 0)},{path:"workflows/durable/executions/:workflowId",element:b.jsxDEV(Ze,{children:b.jsxDEV(Iw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:205,columnNumber:78},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:205,columnNumber:72},void 0)},{path:"workflows/tasks",element:b.jsxDEV(Ze,{children:b.jsxDEV(r6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:206,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:206,columnNumber:47},void 0)},{path:"workflows/tasks/detail/:id",element:b.jsxDEV(Ze,{children:b.jsxDEV(i6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:207,columnNumber:64},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:207,columnNumber:58},void 0)},{path:"workflows/executions/:workflowId",element:b.jsxDEV(Ze,{children:b.jsxDEV(Iw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:208,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:208,columnNumber:64},void 0)},{path:"workflows/start",element:b.jsxDEV(Ze,{children:b.jsxDEV(e6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:47},void 0)},{path:"workflows/durable/invoke",element:b.jsxDEV(Ze,{children:b.jsxDEV(t6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:62},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:56},void 0)},{path:"workflows/cron",element:b.jsxDEV(Wr,{to:"/workflows/start?mode=schedule",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:211,columnNumber:46},void 0)},{path:"workflows/workers",element:b.jsxDEV(Ze,{children:b.jsxDEV(l6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:212,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:212,columnNumber:49},void 0)},{path:"workflows/registry",element:b.jsxDEV(Ze,{children:b.jsxDEV(c6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:50},void 0)},{path:"workflows/registry/new",element:b.jsxDEV(Ze,{children:b.jsxDEV(Yw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:54},void 0)},{path:"workflows/registry/:workflowType",element:b.jsxDEV(Ze,{children:b.jsxDEV(Yw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:215,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:215,columnNumber:64},void 0)}]},{element:b.jsxDEV(x0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:221,columnNumber:18},void 0),children:[{path:"mcp",element:b.jsxDEV(Ze,{children:b.jsxDEV(IR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:223,columnNumber:41},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:223,columnNumber:35},void 0)},{path:"mcp/queries",element:b.jsxDEV(Ze,{children:b.jsxDEV(JR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:43},void 0)},{path:"mcp/queries/:workflowId",element:b.jsxDEV(Ze,{children:b.jsxDEV(GR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:225,columnNumber:61},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:225,columnNumber:55},void 0)},{path:"mcp/tools",element:b.jsxDEV(Wr,{to:"/mcp/servers",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:226,columnNumber:41},void 0)},{path:"mcp/servers",element:b.jsxDEV(Ze,{children:b.jsxDEV(u6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:43},void 0)},{path:"mcp/servers/new",element:b.jsxDEV(Ze,{children:b.jsxDEV(Fw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:47},void 0)},{path:"mcp/servers/:serverId",element:b.jsxDEV(Ze,{children:b.jsxDEV(Fw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:53},void 0)},{path:"mcp/workflows",element:b.jsxDEV(Ze,{children:b.jsxDEV(a6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:230,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:230,columnNumber:45},void 0)},{path:"mcp/executions",element:b.jsxDEV(Ze,{children:b.jsxDEV(YR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:52},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:46},void 0)},{path:"mcp/executions/:jobId",element:b.jsxDEV(Ze,{children:b.jsxDEV(FR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:53},void 0)}]},{element:b.jsxDEV(x0,{roleTypes:["admin","superadmin"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:18},void 0),children:[{path:"admin",element:b.jsxDEV(Ze,{children:b.jsxDEV(o6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:240,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:240,columnNumber:37},void 0)},{path:"admin/users",element:b.jsxDEV(Ze,{children:b.jsxDEV(f6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:241,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:241,columnNumber:43},void 0)},{path:"admin/bots",element:b.jsxDEV(Wr,{to:"/admin/users?tab=service-accounts",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:242,columnNumber:42},void 0)},{path:"admin/escalation-chains",element:b.jsxDEV(Wr,{to:"/admin/roles",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:243,columnNumber:55},void 0)},{path:"admin/roles",element:b.jsxDEV(Ze,{children:b.jsxDEV(d6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:244,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:244,columnNumber:43},void 0)},{path:"admin/maintenance",element:b.jsxDEV(Ze,{children:b.jsxDEV(h6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:245,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:245,columnNumber:49},void 0)},{path:"admin/controlplane",element:b.jsxDEV(Ze,{children:b.jsxDEV(m6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:246,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:246,columnNumber:50},void 0)}]}]}]);function g6(){return b.jsxDEV(VC,{client:XE,children:b.jsxDEV(_5,{children:b.jsxDEV(yT,{children:b.jsxDEV(BC,{router:y6},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:255,columnNumber:5},this)}hT.createRoot(document.getElementById("root")).render(b.jsxDEV(B.StrictMode,{children:b.jsxDEV(g6,{},void 0,!1,{fileName:"/app/dashboard/src/main.tsx",lineNumber:8,columnNumber:5},void 0)},void 0,!1,{fileName:"/app/dashboard/src/main.tsx",lineNumber:7,columnNumber:3},void 0));export{L6 as A,H6 as B,ly as C,jR as D,zE as F,W5 as J,xO as N,QE as O,H5 as S,q6 as a,Nt as b,RR as c,D6 as d,T6 as e,CR as f,R6 as g,_6 as h,Ki as i,b as j,M6 as k,k6 as l,V6 as m,U6 as n,z6 as o,A6 as p,D5 as q,O6 as r,C6 as s,j6 as t,NE as u,JE as v,GE as w,B6 as x,fy as y,w6 as z};
|
|
281
|
-
//# sourceMappingURL=index-
|
|
279
|
+
`}function g4(i){const s=i.summary,a=i.title;if(s){const o=s.search(/\n\s*\{[\s\S]*"title"\s*:/);return o>0?s.slice(0,o).trim():s}return a||(typeof i=="string"?i:"Query completed.")}function v4({children:i}){const s=Zi(),[a,o]=B.useState(!1),[u,d]=B.useState([]),[p,m]=B.useState(null),[g,x]=B.useState({}),_=B.useRef(null),w={page:s.pathname.split("/").filter(Boolean).join("-")||"home",route:s.pathname,params:{},...g,suggestedTags:g.suggestedTags??b4(s.pathname)};B.useEffect(()=>()=>{_.current&&clearInterval(_.current)},[]);const D=B.useCallback(()=>o(ee=>!ee),[]),z=B.useCallback(ee=>{x(ee)},[]),q=B.useCallback(()=>{d([]),m(null)},[]),Y=B.useCallback(async ee=>{var W;const te=new Date().toISOString(),we={id:`user-${Date.now()}`,role:"user",content:ee,timestamp:te},De={id:`pending-${Date.now()}`,role:"assistant",content:"",timestamp:te,pending:!0};d(Q=>[...Q,we,De]);const U={...w};(W=U.entities)!=null&&W.yamlContent&&U.entities.yamlContent.length>Tw&&(U.entities={...U.entities,yamlContent:U.entities.yamlContent.slice(0,Tw)+`
|
|
280
|
+
... (truncated)`});const oe=`${y4(u.concat(we))}${ee}`;try{const H=(await Nt("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:oe,tags:U.suggestedTags,context:U,wait:!1,direct:!0})})).workflow_id;m(H),d(le=>le.map(ie=>ie.id===De.id?{...ie,workflowId:H}:ie)),_.current&&clearInterval(_.current),_.current=setInterval(async()=>{var le;try{const ie=await Nt(`/workflows/${H}/result`),ve=(le=ie==null?void 0:ie.result)==null?void 0:le.data;if(ve){_.current&&clearInterval(_.current),_.current=null,m(null);const Qe=g4(ve);let nt;try{nt=(await Nt(`/workflow-states/${H}/execution`)).duration_ms}catch{}d(ae=>ae.map(pe=>pe.id===De.id?{...pe,content:Qe,timestamp:new Date().toISOString(),pending:!1,durationMs:nt}:pe))}}catch{}},3e3)}catch{d(Q=>Q.map(H=>H.id===De.id?{...H,content:"Failed to submit query. Please try again.",pending:!1}:H))}},[u,w]),Z=B.useCallback(async ee=>{const te=u.find(U=>U.id===ee);if(!(te!=null&&te.workflowId)||te.compilationStatus==="compiling"||te.compilationStatus==="done")return;const we=u.indexOf(te),De=u.slice(0,we).reverse().find(U=>U.role==="user");if(De){d(U=>U.map(ne=>ne.id===ee?{...ne,compilationStatus:"compiling"}:ne));try{const U=await Nt("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:De.content,summary:te.content})}),ne=await Nt("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:te.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:U.tool_name,description:U.description,tags:U.tags,app_id:"longtail"})});await Nt(`/yaml-workflows/${ne.id}/deploy`,{method:"POST"}),d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"done"}:W))}catch(U){const ne=U instanceof Error?U.message:"Compilation failed";d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"error",compilationError:ne}:W))}}},[u]);return b.jsxDEV(qE.Provider,{value:{helpOpen:a,setHelpOpen:o,toggleHelp:D,messages:u,sendMessage:Y,pageContext:w,setPageContext:z,activeWorkflowId:p,clearMessages:q,compileMessage:Z},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useHelpAssistant.tsx",lineNumber:302,columnNumber:5},this)}function LE(){const i=B.useContext(qE);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function x4(){const{helpOpen:i,toggleHelp:s}=LE();return b.jsxDEV("button",{onClick:s,className:"fixed right-3 z-[45] flex items-center justify-center w-10 h-10 rounded-full bg-surface-raised shadow-lg hover:scale-110 transition-transform duration-150 border border-accent/30",style:{bottom:"calc(var(--feed-height, 32px) + 12px)"},"aria-label":i?"Close help":"Ask for help",children:i?b.jsxDEV(J0,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:15,columnNumber:9},this):b.jsxDEV("img",{src:"/logo512.png",alt:"Help",className:"w-8 h-8 -rotate-[120deg]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:17,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:8,columnNumber:5},this)}const HE=6048e5,N4=864e5,Ow=6e4,Rw=525600,jw=43200,Mw=1440,kw=Symbol.for("constructDateFrom");function ar(i,s){return typeof i=="function"?i(s):i&&typeof i=="object"&&kw in i?i[kw](s):i instanceof Date?new i.constructor(s):new Date(s)}function ts(i,s){return ar(s||i,i)}let S4={};function wu(){return S4}function xu(i,s){var m,g,x,_;const a=wu(),o=(s==null?void 0:s.weekStartsOn)??((g=(m=s==null?void 0:s.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??a.weekStartsOn??((_=(x=a.locale)==null?void 0:x.options)==null?void 0:_.weekStartsOn)??0,u=ts(i,s==null?void 0:s.in),d=u.getDay(),p=(d<o?7:0)+d-o;return u.setDate(u.getDate()-p),u.setHours(0,0,0,0),u}function hh(i,s){return xu(i,{...s,weekStartsOn:1})}function PE(i,s){const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=ar(a,0);u.setFullYear(o+1,0,4),u.setHours(0,0,0,0);const d=hh(u),p=ar(a,0);p.setFullYear(o,0,4),p.setHours(0,0,0,0);const m=hh(p);return a.getTime()>=d.getTime()?o+1:a.getTime()>=m.getTime()?o:o-1}function mh(i){const s=ts(i),a=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return a.setUTCFullYear(s.getFullYear()),+i-+a}function $E(i,...s){const a=ar.bind(null,i||s.find(o=>typeof o=="object"));return s.map(a)}function Vw(i,s){const a=ts(i,s==null?void 0:s.in);return a.setHours(0,0,0,0),a}function w4(i,s,a){const[o,u]=$E(a==null?void 0:a.in,i,s),d=Vw(o),p=Vw(u),m=+d-mh(d),g=+p-mh(p);return Math.round((m-g)/N4)}function E4(i,s){const a=PE(i,s),o=ar(i,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),hh(o)}function _4(i,s){const a=+ts(i)-+ts(s);return a<0?-1:a>0?1:a}function A4(i){return ar(i,Date.now())}function D4(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function C4(i){return!(!D4(i)&&typeof i!="number"||isNaN(+ts(i)))}function T4(i){return s=>{const o=(i?Math[i]:Math.trunc)(s);return o===0?0:o}}function O4(i,s){const a=ts(i,s==null?void 0:s.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const R4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},j4=(i,s,a)=>{let o;const u=R4[i];return typeof u=="string"?o=u:s===1?o=u.one:o=u.other.replace("{{count}}",s.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+o:o+" ago":o};function x0(i){return(s={})=>{const a=s.width?String(s.width):i.defaultWidth;return i.formats[a]||i.formats[i.defaultWidth]}}const M4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},k4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},V4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U4={date:x0({formats:M4,defaultWidth:"full"}),time:x0({formats:k4,defaultWidth:"full"}),dateTime:x0({formats:V4,defaultWidth:"full"})},z4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},B4=(i,s,a,o)=>z4[i];function ru(i){return(s,a)=>{const o=a!=null&&a.context?String(a.context):"standalone";let u;if(o==="formatting"&&i.formattingValues){const p=i.defaultFormattingWidth||i.defaultWidth,m=a!=null&&a.width?String(a.width):p;u=i.formattingValues[m]||i.formattingValues[p]}else{const p=i.defaultWidth,m=a!=null&&a.width?String(a.width):i.defaultWidth;u=i.values[m]||i.values[p]}const d=i.argumentCallback?i.argumentCallback(s):s;return u[d]}}const q4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},L4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},H4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},P4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},I4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},F4=(i,s)=>{const a=Number(i),o=a%100;if(o>20||o<10)switch(o%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},Y4={ordinalNumber:F4,era:ru({values:q4,defaultWidth:"wide"}),quarter:ru({values:L4,defaultWidth:"wide",argumentCallback:i=>i-1}),month:ru({values:H4,defaultWidth:"wide"}),day:ru({values:P4,defaultWidth:"wide"}),dayPeriod:ru({values:$4,defaultWidth:"wide",formattingValues:I4,defaultFormattingWidth:"wide"})};function iu(i){return(s,a={})=>{const o=a.width,u=o&&i.matchPatterns[o]||i.matchPatterns[i.defaultMatchWidth],d=s.match(u);if(!d)return null;const p=d[0],m=o&&i.parsePatterns[o]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?G4(m,w=>w.test(p)):J4(m,w=>w.test(p));let x;x=i.valueCallback?i.valueCallback(g):g,x=a.valueCallback?a.valueCallback(x):x;const _=s.slice(p.length);return{value:x,rest:_}}}function J4(i,s){for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s(i[a]))return a}function G4(i,s){for(let a=0;a<i.length;a++)if(s(i[a]))return a}function Q4(i){return(s,a={})=>{const o=s.match(i.matchPattern);if(!o)return null;const u=o[0],d=s.match(i.parsePattern);if(!d)return null;let p=i.valueCallback?i.valueCallback(d[0]):d[0];p=a.valueCallback?a.valueCallback(p):p;const m=s.slice(u.length);return{value:p,rest:m}}}const X4=/^(\d+)(th|st|nd|rd)?/i,Z4=/\d+/i,K4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},W4={any:[/^b/i,/^(a|c)/i]},eR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tR={any:[/1/i,/2/i,/3/i,/4/i]},nR={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sR={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},aR={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},rR={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},iR={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},oR={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lR={ordinalNumber:Q4({matchPattern:X4,parsePattern:Z4,valueCallback:i=>parseInt(i,10)}),era:iu({matchPatterns:K4,defaultMatchWidth:"wide",parsePatterns:W4,defaultParseWidth:"any"}),quarter:iu({matchPatterns:eR,defaultMatchWidth:"wide",parsePatterns:tR,defaultParseWidth:"any",valueCallback:i=>i+1}),month:iu({matchPatterns:nR,defaultMatchWidth:"wide",parsePatterns:sR,defaultParseWidth:"any"}),day:iu({matchPatterns:aR,defaultMatchWidth:"wide",parsePatterns:rR,defaultParseWidth:"any"}),dayPeriod:iu({matchPatterns:iR,defaultMatchWidth:"any",parsePatterns:oR,defaultParseWidth:"any"})},IE={code:"en-US",formatDistance:j4,formatLong:U4,formatRelative:B4,localize:Y4,match:lR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cR(i,s){const a=ts(i,s==null?void 0:s.in);return w4(a,O4(a))+1}function uR(i,s){const a=ts(i,s==null?void 0:s.in),o=+hh(a)-+E4(a);return Math.round(o/HE)+1}function FE(i,s){var _,w,D,z;const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=wu(),d=(s==null?void 0:s.firstWeekContainsDate)??((w=(_=s==null?void 0:s.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??u.firstWeekContainsDate??((z=(D=u.locale)==null?void 0:D.options)==null?void 0:z.firstWeekContainsDate)??1,p=ar((s==null?void 0:s.in)||i,0);p.setFullYear(o+1,0,d),p.setHours(0,0,0,0);const m=xu(p,s),g=ar((s==null?void 0:s.in)||i,0);g.setFullYear(o,0,d),g.setHours(0,0,0,0);const x=xu(g,s);return+a>=+m?o+1:+a>=+x?o:o-1}function fR(i,s){var m,g,x,_;const a=wu(),o=(s==null?void 0:s.firstWeekContainsDate)??((g=(m=s==null?void 0:s.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((_=(x=a.locale)==null?void 0:x.options)==null?void 0:_.firstWeekContainsDate)??1,u=FE(i,s),d=ar((s==null?void 0:s.in)||i,0);return d.setFullYear(u,0,o),d.setHours(0,0,0,0),xu(d,s)}function dR(i,s){const a=ts(i,s==null?void 0:s.in),o=+xu(a,s)-+fR(a,s);return Math.round(o/HE)+1}function ct(i,s){const a=i<0?"-":"",o=Math.abs(i).toString().padStart(s,"0");return a+o}const Zr={y(i,s){const a=i.getFullYear(),o=a>0?a:1-a;return ct(s==="yy"?o%100:o,s.length)},M(i,s){const a=i.getMonth();return s==="M"?String(a+1):ct(a+1,2)},d(i,s){return ct(i.getDate(),s.length)},a(i,s){const a=i.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(i,s){return ct(i.getHours()%12||12,s.length)},H(i,s){return ct(i.getHours(),s.length)},m(i,s){return ct(i.getMinutes(),s.length)},s(i,s){return ct(i.getSeconds(),s.length)},S(i,s){const a=s.length,o=i.getMilliseconds(),u=Math.trunc(o*Math.pow(10,a-3));return ct(u,s.length)}},ll={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Uw={G:function(i,s,a){const o=i.getFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})}},y:function(i,s,a){if(s==="yo"){const o=i.getFullYear(),u=o>0?o:1-o;return a.ordinalNumber(u,{unit:"year"})}return Zr.y(i,s)},Y:function(i,s,a,o){const u=FE(i,o),d=u>0?u:1-u;if(s==="YY"){const p=d%100;return ct(p,2)}return s==="Yo"?a.ordinalNumber(d,{unit:"year"}):ct(d,s.length)},R:function(i,s){const a=PE(i);return ct(a,s.length)},u:function(i,s){const a=i.getFullYear();return ct(a,s.length)},Q:function(i,s,a){const o=Math.ceil((i.getMonth()+1)/3);switch(s){case"Q":return String(o);case"QQ":return ct(o,2);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})}},q:function(i,s,a){const o=Math.ceil((i.getMonth()+1)/3);switch(s){case"q":return String(o);case"qq":return ct(o,2);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})}},M:function(i,s,a){const o=i.getMonth();switch(s){case"M":case"MM":return Zr.M(i,s);case"Mo":return a.ordinalNumber(o+1,{unit:"month"});case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})}},L:function(i,s,a){const o=i.getMonth();switch(s){case"L":return String(o+1);case"LL":return ct(o+1,2);case"Lo":return a.ordinalNumber(o+1,{unit:"month"});case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})}},w:function(i,s,a,o){const u=dR(i,o);return s==="wo"?a.ordinalNumber(u,{unit:"week"}):ct(u,s.length)},I:function(i,s,a){const o=uR(i);return s==="Io"?a.ordinalNumber(o,{unit:"week"}):ct(o,s.length)},d:function(i,s,a){return s==="do"?a.ordinalNumber(i.getDate(),{unit:"date"}):Zr.d(i,s)},D:function(i,s,a){const o=cR(i);return s==="Do"?a.ordinalNumber(o,{unit:"dayOfYear"}):ct(o,s.length)},E:function(i,s,a){const o=i.getDay();switch(s){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})}},e:function(i,s,a,o){const u=i.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(s){case"e":return String(d);case"ee":return ct(d,2);case"eo":return a.ordinalNumber(d,{unit:"day"});case"eee":return a.day(u,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(u,{width:"short",context:"formatting"});case"eeee":default:return a.day(u,{width:"wide",context:"formatting"})}},c:function(i,s,a,o){const u=i.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(s){case"c":return String(d);case"cc":return ct(d,s.length);case"co":return a.ordinalNumber(d,{unit:"day"});case"ccc":return a.day(u,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(u,{width:"narrow",context:"standalone"});case"cccccc":return a.day(u,{width:"short",context:"standalone"});case"cccc":default:return a.day(u,{width:"wide",context:"standalone"})}},i:function(i,s,a){const o=i.getDay(),u=o===0?7:o;switch(s){case"i":return String(u);case"ii":return ct(u,s.length);case"io":return a.ordinalNumber(u,{unit:"day"});case"iii":return a.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(o,{width:"short",context:"formatting"});case"iiii":default:return a.day(o,{width:"wide",context:"formatting"})}},a:function(i,s,a){const u=i.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},b:function(i,s,a){const o=i.getHours();let u;switch(o===12?u=ll.noon:o===0?u=ll.midnight:u=o/12>=1?"pm":"am",s){case"b":case"bb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(i,s,a){const o=i.getHours();let u;switch(o>=17?u=ll.evening:o>=12?u=ll.afternoon:o>=4?u=ll.morning:u=ll.night,s){case"B":case"BB":case"BBB":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},h:function(i,s,a){if(s==="ho"){let o=i.getHours()%12;return o===0&&(o=12),a.ordinalNumber(o,{unit:"hour"})}return Zr.h(i,s)},H:function(i,s,a){return s==="Ho"?a.ordinalNumber(i.getHours(),{unit:"hour"}):Zr.H(i,s)},K:function(i,s,a){const o=i.getHours()%12;return s==="Ko"?a.ordinalNumber(o,{unit:"hour"}):ct(o,s.length)},k:function(i,s,a){let o=i.getHours();return o===0&&(o=24),s==="ko"?a.ordinalNumber(o,{unit:"hour"}):ct(o,s.length)},m:function(i,s,a){return s==="mo"?a.ordinalNumber(i.getMinutes(),{unit:"minute"}):Zr.m(i,s)},s:function(i,s,a){return s==="so"?a.ordinalNumber(i.getSeconds(),{unit:"second"}):Zr.s(i,s)},S:function(i,s){return Zr.S(i,s)},X:function(i,s,a){const o=i.getTimezoneOffset();if(o===0)return"Z";switch(s){case"X":return Bw(o);case"XXXX":case"XX":return Qi(o);case"XXXXX":case"XXX":default:return Qi(o,":")}},x:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"x":return Bw(o);case"xxxx":case"xx":return Qi(o);case"xxxxx":case"xxx":default:return Qi(o,":")}},O:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+zw(o,":");case"OOOO":default:return"GMT"+Qi(o,":")}},z:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+zw(o,":");case"zzzz":default:return"GMT"+Qi(o,":")}},t:function(i,s,a){const o=Math.trunc(+i/1e3);return ct(o,s.length)},T:function(i,s,a){return ct(+i,s.length)}};function zw(i,s=""){const a=i>0?"-":"+",o=Math.abs(i),u=Math.trunc(o/60),d=o%60;return d===0?a+String(u):a+String(u)+s+ct(d,2)}function Bw(i,s){return i%60===0?(i>0?"-":"+")+ct(Math.abs(i)/60,2):Qi(i,s)}function Qi(i,s=""){const a=i>0?"-":"+",o=Math.abs(i),u=ct(Math.trunc(o/60),2),d=ct(o%60,2);return a+u+s+d}const qw=(i,s)=>{switch(i){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},YE=(i,s)=>{switch(i){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},hR=(i,s)=>{const a=i.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return qw(i,s);let d;switch(o){case"P":d=s.dateTime({width:"short"});break;case"PP":d=s.dateTime({width:"medium"});break;case"PPP":d=s.dateTime({width:"long"});break;case"PPPP":default:d=s.dateTime({width:"full"});break}return d.replace("{{date}}",qw(o,s)).replace("{{time}}",YE(u,s))},mR={p:YE,P:hR},pR=/^D+$/,bR=/^Y+$/,yR=["D","DD","YY","YYYY"];function gR(i){return pR.test(i)}function vR(i){return bR.test(i)}function xR(i,s,a){const o=NR(i,s,a);if(console.warn(o),yR.includes(i))throw new RangeError(o)}function NR(i,s,a){const o=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${s}\`) for formatting ${o} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const SR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ER=/^'([^]*?)'?$/,_R=/''/g,AR=/[a-zA-Z]/;function JE(i,s,a){var _,w,D,z;const o=wu(),u=o.locale??IE,d=o.firstWeekContainsDate??((w=(_=o.locale)==null?void 0:_.options)==null?void 0:w.firstWeekContainsDate)??1,p=o.weekStartsOn??((z=(D=o.locale)==null?void 0:D.options)==null?void 0:z.weekStartsOn)??0,m=ts(i,a==null?void 0:a.in);if(!C4(m))throw new RangeError("Invalid time value");let g=s.match(wR).map(q=>{const Y=q[0];if(Y==="p"||Y==="P"){const Z=mR[Y];return Z(q,u.formatLong)}return q}).join("").match(SR).map(q=>{if(q==="''")return{isToken:!1,value:"'"};const Y=q[0];if(Y==="'")return{isToken:!1,value:DR(q)};if(Uw[Y])return{isToken:!0,value:q};if(Y.match(AR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return{isToken:!1,value:q}});u.localize.preprocessor&&(g=u.localize.preprocessor(m,g));const x={firstWeekContainsDate:d,weekStartsOn:p,locale:u};return g.map(q=>{if(!q.isToken)return q.value;const Y=q.value;(vR(Y)||gR(Y))&&xR(Y,s,String(i));const Z=Uw[Y[0]];return Z(m,Y,u.localize,x)}).join("")}function DR(i){const s=i.match(ER);return s?s[1].replace(_R,"'"):i}function CR(i,s,a){const o=wu(),u=(a==null?void 0:a.locale)??o.locale??IE,d=_4(i,s);if(isNaN(d))throw new RangeError("Invalid time value");const p=Object.assign({},a,{addSuffix:a==null?void 0:a.addSuffix,comparison:d}),[m,g]=$E(a==null?void 0:a.in,...d>0?[s,i]:[i,s]),x=T4((a==null?void 0:a.roundingMethod)??"round"),_=g.getTime()-m.getTime(),w=_/Ow,D=mh(g)-mh(m),z=(_-D)/Ow,q=a==null?void 0:a.unit;let Y;if(q?Y=q:w<1?Y="second":w<60?Y="minute":w<Mw?Y="hour":z<jw?Y="day":z<Rw?Y="month":Y="year",Y==="second"){const Z=x(_/1e3);return u.formatDistance("xSeconds",Z,p)}else if(Y==="minute"){const Z=x(w);return u.formatDistance("xMinutes",Z,p)}else if(Y==="hour"){const Z=x(w/60);return u.formatDistance("xHours",Z,p)}else if(Y==="day"){const Z=x(z/Mw);return u.formatDistance("xDays",Z,p)}else if(Y==="month"){const Z=x(z/jw);return Z===12&&q!=="month"?u.formatDistance("xYears",1,p):u.formatDistance("xMonths",Z,p)}else{const Z=x(z/Rw);return u.formatDistance("xYears",Z,p)}}function TR(i,s){return CR(i,A4(i),s)}function OR(i){const s=new Date(i);return s.getTime()>Date.now()?"just now":TR(s,{addSuffix:!0})}function P6(i){return i<=0?"Expired":fy(i)}function RR(i){return i==null?"--":fy(i)}function fy(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const p=i/1e3;return Number.isInteger(p)?`${p}s`:`${p.toFixed(1)}s`}const s=Math.floor(i/1e3),a=Math.floor(s/86400),o=Math.floor(s%86400/3600),u=Math.floor(s%3600/60),d=s%60;return a>0?o>0?`${a}d ${o}h`:`${a}d`:o>0?u>0?`${o}h ${u}m`:`${o}h`:d>0?`${u}m ${d}s`:`${u}m`}function $6(i,s){const a=new Date(i).getTime(),o=s?new Date(s).getTime():Date.now();return fy(o-a)}function GE({options:i,children:s,className:a=""}){const[o,u]=B.useState(!1),[d,p]=B.useState(null),[m,g]=B.useState(null),x=B.useRef(null),_=B.useRef(void 0),w=B.useRef(void 0),D=220,z=B.useCallback(()=>{if(!x.current)return;const ee=x.current.getBoundingClientRect(),te=window.innerWidth-D-8,we=Math.max(8,Math.min(ee.left,te));g({top:ee.bottom+4,left:we})},[]),q=B.useCallback(async(ee,te)=>{try{await navigator.clipboard.writeText(ee),p(te),clearTimeout(_.current),_.current=setTimeout(()=>p(null),1200)}catch{}},[]),Y=B.useCallback(()=>{clearTimeout(w.current),z(),u(!0)},[z]),Z=B.useCallback(()=>{w.current=setTimeout(()=>u(!1),150)},[]);return B.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(w.current)},[]),b.jsxDEV("span",{ref:x,className:`inline-flex items-center cursor-default ${a}`,onMouseEnter:Y,onMouseLeave:Z,children:[s,o&&m&&Gw.createPortal(b.jsxDEV("span",{className:"fixed z-[9999] bg-surface-raised border border-surface-border rounded shadow-lg py-1 min-w-[180px]",style:{top:m.top,left:m.left},onMouseEnter:Y,onMouseLeave:Z,children:i.map(ee=>b.jsxDEV("button",{onClick:te=>{te.stopPropagation(),q(ee.value,ee.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[b.jsxDEV("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ee.label},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:85,columnNumber:15},this),b.jsxDEV("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:d===ee.label?"✓":ee.value},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:88,columnNumber:15},this)]},ee.label,!0,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:80,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:73,columnNumber:9},this),document.body)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:65,columnNumber:5},this)}function jR(i,s){const a=new Date(i);switch(s){case"relative":return OR(i);case"datetime":return JE(a,"MMM d, yyyy h:mm a");case"time":return a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function MR(i){const s=new Date(i);return[{label:"ms",value:String(s.getTime())},{label:"utc",value:s.toISOString()},{label:"local",value:JE(s,"MMM d, yyyy h:mm:ss a")}]}function kR({date:i,format:s="relative",className:a=""}){const[,o]=B.useState(0);B.useEffect(()=>{if(s!=="relative")return;const d=setInterval(()=>o(p=>p+1),3e4);return()=>clearInterval(d)},[s]);const u=B.useMemo(()=>MR(i),[i]);return b.jsxDEV(GE,{options:u,children:b.jsxDEV("time",{dateTime:i,className:`text-xs text-text-tertiary ${a}`,children:jR(i,s)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateValue.tsx",lineNumber:56,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateValue.tsx",lineNumber:55,columnNumber:5},this)}function VR({ms:i,className:s=""}){const a=RR(i),o=B.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:a}],[i,a]);return i==null?b.jsxDEV("span",{className:`text-xs text-text-tertiary ${s}`,children:"--"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:29,columnNumber:12},this):b.jsxDEV(GE,{options:o,children:b.jsxDEV("span",{className:`text-xs text-text-tertiary ${s}`,children:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:34,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:33,columnNumber:5},this)}const UR=["sm","md","lg","full"],Lw={sm:"w-[28rem] max-h-[40vh]",md:"w-[36rem] max-h-[60vh]",lg:"w-[48rem] max-h-[80vh]",full:"inset-4 w-auto max-h-none"},Hw={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function zR({which:i}){const s="stroke-current";switch(i){case"sm":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:27,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:27,columnNumber:15},this);case"md":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:29,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:29,columnNumber:15},this);case"lg":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:31,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:31,columnNumber:15},this);case"full":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:33,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:33,columnNumber:15},this)}}function BR({msg:i}){const[s,a]=B.useState(0);B.useEffect(()=>{const p=new Date(i.timestamp).getTime(),m=()=>a(Math.floor((Date.now()-p)/1e3));m();const g=setInterval(m,1e3);return()=>clearInterval(g)},[i.timestamp]);const o=Math.floor(s/60),u=s%60,d=o>0?`${o}m ${u}s`:`${u}s`;return b.jsxDEV("span",{className:"inline-flex flex-col gap-1.5",children:[b.jsxDEV("span",{className:"inline-flex items-center gap-1",children:[b.jsxDEV("span",{className:"text-text-tertiary",children:"Thinking"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:55,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:56,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:57,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:58,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-muted ml-1 tabular-nums",children:d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:59,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:54,columnNumber:7},this),i.workflowId&&b.jsxDEV(uu,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[b.jsxDEV(Y0,{className:"w-2.5 h-2.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:66,columnNumber:11},this),"watch execution"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:62,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:53,columnNumber:5},this)}function qR({msg:i,compileMessage:s}){const a=i.role==="assistant";return b.jsxDEV("div",{className:`flex items-center gap-1.5 ${a?"justify-start":"justify-end"}`,children:[b.jsxDEV(kR,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:78,columnNumber:7},this),i.durationMs!=null&&b.jsxDEV(b.Fragment,{children:[b.jsxDEV("span",{className:"text-text-muted/30 text-[8px]",children:"·"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:81,columnNumber:11},this),b.jsxDEV(VR,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:80,columnNumber:9},this),i.workflowId&&b.jsxDEV(uu,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:b.jsxDEV(Y0,{className:"w-2.5 h-2.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:91,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:86,columnNumber:9},this),a&&i.workflowId&&!i.pending&&b.jsxDEV("button",{onClick:()=>s(i.id),disabled:i.compilationStatus==="compiling"||i.compilationStatus==="done",className:"transition-colors",title:i.compilationStatus==="done"?"Compiled — future queries will match this pipeline":i.compilationStatus==="error"?i.compilationError??"Compilation failed":i.compilationStatus==="compiling"?"Compiling...":"Compile to fast pipeline",children:b.jsxDEV(rT,{className:`w-2.5 h-2.5 ${i.compilationStatus==="done"?"text-status-success":i.compilationStatus==="error"?"text-status-error":i.compilationStatus==="compiling"?"text-accent/40 animate-pulse":"text-text-muted/40 hover:text-accent"}`,strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:109,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:95,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:77,columnNumber:5},this)}function LR(){const{helpOpen:i,setHelpOpen:s,messages:a,sendMessage:o,pageContext:u,activeWorkflowId:d,clearMessages:p,compileMessage:m}=LE(),[g,x]=B.useState(""),[_,w]=B.useState("md"),[D,z]=B.useState(!0),q=B.useRef(null),Y=B.useRef(null);if(B.useEffect(()=>{q.current&&(q.current.scrollTop=q.current.scrollHeight)},[a]),B.useEffect(()=>{i&&Y.current&&Y.current.focus()},[i]),B.useEffect(()=>{if(!i)return;const U=ne=>{ne.key==="Escape"&&(_==="full"?w("lg"):_==="lg"?w("md"):_==="md"?w("sm"):s(!1))};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i,_,s]),!i)return null;const Z=()=>{const U=g.trim();!U||d||(o(U),x(""),Y.current&&(Y.current.style.height="auto"))},ee=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),Z())},te=_==="full",we=u.page.replace(/-/g," "),De=te?{}:{bottom:"calc(var(--feed-height, 32px) + 76px)"};return b.jsxDEV("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${te?Lw.full:`right-6 ${Lw[_]}`} ${D?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:De,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[b.jsxDEV("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[b.jsxDEV("div",{className:"min-w-0 flex-1",children:[b.jsxDEV("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:206,columnNumber:11},this),b.jsxDEV("p",{className:"text-[10px] text-text-tertiary truncate",children:we},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:207,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:205,columnNumber:9},this),b.jsxDEV("div",{className:"flex items-center gap-1 ml-2",children:[b.jsxDEV("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:UR.map(U=>b.jsxDEV("button",{onClick:()=>w(U),className:`p-1 rounded transition-colors ${U===_?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":U===_,"aria-label":Hw[U],title:Hw[U],children:b.jsxDEV(zR,{which:U},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:225,columnNumber:17},this)},U,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:212,columnNumber:15},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:210,columnNumber:11},this),a.length>0&&b.jsxDEV("button",{onClick:p,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:b.jsxDEV(sT,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:236,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:230,columnNumber:13},this),b.jsxDEV("button",{onClick:()=>s(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:b.jsxDEV(J0,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:245,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:239,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:209,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:202,columnNumber:7},this),b.jsxDEV("div",{ref:q,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[a.length===0&&b.jsxDEV("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:255,columnNumber:11},this),a.map(U=>b.jsxDEV("div",{className:`text-xs leading-relaxed ${U.role==="user"?"text-right":"text-left"}`,children:[b.jsxDEV("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${U.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:U.pending?b.jsxDEV(BR,{msg:U},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:272,columnNumber:17},this):U.role==="assistant"?b.jsxDEV(uy,{content:U.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:274,columnNumber:17},this):U.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:264,columnNumber:13},this),!U.pending&&b.jsxDEV("div",{className:"mt-0.5",children:b.jsxDEV(qR,{msg:U,compileMessage:m},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:281,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:280,columnNumber:15},this)]},U.id,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:260,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:251,columnNumber:7},this),b.jsxDEV("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[b.jsxDEV("textarea",{ref:Y,value:g,onChange:U=>{x(U.target.value);const ne=U.target;ne.style.height="auto",ne.style.height=`${Math.min(ne.scrollHeight,120)}px`},onKeyDown:ee,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:292,columnNumber:9},this),b.jsxDEV("button",{onClick:Z,disabled:!g.trim()||!!d,className:"px-2.5 py-1.5 text-accent hover:text-accent-hover disabled:text-text-muted transition-colors self-end","aria-label":"Send",children:b.jsxDEV(aT,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:314,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:308,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:289,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:189,columnNumber:5},this)}function HR(){const{isSuperAdmin:i,hasRoleType:s,hasRole:a}=Ki(),{collapsed:o,toggle:u}=UE(),[d,p]=B.useState(!1),[m,g]=B.useState(()=>window.location.hash.startsWith("#docs")),x=Zi(),_=B.useRef(null);return B.useEffect(()=>{const w=_.current;w&&(w.classList.remove("animate-page-in"),w.offsetWidth,w.classList.add("animate-page-in"))},[x.pathname]),B.useEffect(()=>{const w=()=>{window.location.hash.startsWith("#docs")&&g(!0)};return window.addEventListener("hashchange",w),()=>window.removeEventListener("hashchange",w)},[]),b.jsxDEV("div",{className:"h-screen bg-surface flex flex-col",style:{"--feed-height":d?"224px":"32px"},children:[b.jsxDEV(R5,{onToggleEventFeed:()=>p(w=>!w),onToggleDocs:()=>g(w=>!w)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:46,columnNumber:7},this),b.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxDEV("aside",{className:`${o?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[b.jsxDEV("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[(i||s("admin")||a("engineer"))&&b.jsxDEV(q5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:58,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(H5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:59,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV($5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:60,columnNumber:79},this),(i||s("admin"))&&b.jsxDEV(z5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:61,columnNumber:56},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:57,columnNumber:11},this),b.jsxDEV("button",{onClick:u,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${o?"flex justify-center":"flex items-center px-7"}`,"aria-label":o?"Expand sidebar":"Collapse sidebar",children:o?b.jsxDEV(iT,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:73,columnNumber:15},this):b.jsxDEV(oT,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:75,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:65,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:51,columnNumber:9},this),b.jsxDEV("main",{className:"flex-1 overflow-y-auto",children:b.jsxDEV("div",{ref:_,className:`max-w-dashboard mx-auto px-10 py-10 animate-page-in ${d?"pb-60":"pb-16"}`,children:b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:83,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:82,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:81,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:49,columnNumber:7},this),b.jsxDEV(r4,{open:d,onToggle:()=>p(w=>!w)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:89,columnNumber:7},this),b.jsxDEV(p4,{open:m,onClose:()=>{g(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:90,columnNumber:7},this),b.jsxDEV(x4,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:91,columnNumber:7},this),b.jsxDEV(LR,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:92,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:44,columnNumber:5},this)}function PR(){const{isAuthenticated:i}=Ki(),s=Zi();return i?b.jsxDEV(D5,{children:b.jsxDEV(v4,{children:b.jsxDEV(HR,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:108,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:107,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:106,columnNumber:5},this):b.jsxDEV(Wr,{to:"/login",state:{from:s.pathname},replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:102,columnNumber:12},this)}function QE({provider:i,className:s="w-5 h-5"}){switch(i){case"google":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:[b.jsxDEV("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:11,columnNumber:11},this),b.jsxDEV("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:12,columnNumber:11},this),b.jsxDEV("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:13,columnNumber:11},this),b.jsxDEV("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:10,columnNumber:9},this);case"github":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:b.jsxDEV("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:19,columnNumber:9},this);case"microsoft":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:[b.jsxDEV("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:26,columnNumber:11},this),b.jsxDEV("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:27,columnNumber:11},this),b.jsxDEV("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:28,columnNumber:11},this),b.jsxDEV("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:29,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:25,columnNumber:9},this);case"anthropic":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:b.jsxDEV("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767L16.906 20.48h-3.674l-1.343-3.461H6.396l-1.34 3.461H1.5l5.07-16.96zm2.327 5.14l-2.065 5.326h4.108l-2.043-5.326z"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:35,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:34,columnNumber:9},this);default:return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[b.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:41,columnNumber:11},this),b.jsxDEV("path",{d:"M12 8v4l3 3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:40,columnNumber:9},this)}}async function $R(){return Nt("/auth/oauth/providers")}async function IR(i,s){const a=s?`?label=${encodeURIComponent(s)}`:"";return Nt(`/auth/oauth/connections/${i}${a}`,{method:"DELETE"})}function I6(){return ii({queryKey:["oauth-connections"],queryFn:()=>Nt("/auth/oauth/connections")})}function F6(){const i=Vs();return Sa({mutationFn:({provider:s,label:a})=>IR(s,a),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function FR(){var ne;const{login:i,isAuthenticated:s}=Ki(),a=Qw(),o=Zi(),u=new URLSearchParams(o.search),d=u.get("token"),p=u.get("error"),m=((ne=o.state)==null?void 0:ne.from)??u.get("returnTo")??"/",g=B.useRef(!1);d&&!g.current&&(g.current=!0,i(d,void 0,{displayName:u.get("displayName"),username:u.get("username")}));const[x,_]=B.useState(""),[w,D]=B.useState(""),[z,q]=B.useState(p||""),[Y,Z]=B.useState(!1),[ee,te]=B.useState(!!d),[we,De]=B.useState([]);if(B.useEffect(()=>{d||$R().then(De).catch(()=>{})},[]),B.useEffect(()=>{if(!ee)return;const oe=setTimeout(()=>a(m,{replace:!0}),1500);return()=>clearTimeout(oe)},[ee]),s&&!ee)return b.jsxDEV(Wr,{to:m,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:54,columnNumber:12},this);const U=async oe=>{var W,Q;if(oe.preventDefault(),q(""),!x.trim()||!w){q("Username and password are required");return}Z(!0);try{const H=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:x.trim(),password:w})}),le=await H.json();if(!H.ok){q(le.error||"Login failed");return}te(!0),i(le.token,{username:x.trim(),password:w},{displayName:(W=le.user)==null?void 0:W.display_name,username:(Q=le.user)==null?void 0:Q.external_id})}catch{q("Unable to connect to server")}finally{Z(!1)}};return b.jsxDEV("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:b.jsxDEV("div",{className:"w-full max-w-md p-10",children:[b.jsxDEV("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ee?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:b.jsxDEV(ly,{size:"lg",hideLabel:ee},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:101,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:94,columnNumber:9},this),b.jsxDEV("form",{onSubmit:U,className:`space-y-5 transition-opacity duration-300 ${ee?"opacity-0":""}`,children:[b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:109,columnNumber:13},this),b.jsxDEV("input",{id:"username",type:"text",value:x,onChange:oe=>_(oe.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ee,autoComplete:"username"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:115,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:108,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:128,columnNumber:13},this),b.jsxDEV("input",{id:"password",type:"password",value:w,onChange:oe=>D(oe.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:134,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:127,columnNumber:11},this),z&&b.jsxDEV("p",{className:"text-sm text-status-error",children:z},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:145,columnNumber:21},this),b.jsxDEV("button",{type:"submit",className:"btn-primary w-full",disabled:Y||ee,children:Y?"Signing in...":"Sign In"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:147,columnNumber:11},this),we.length>0&&b.jsxDEV(b.Fragment,{children:[b.jsxDEV("div",{className:"flex items-center gap-3 mt-6",children:[b.jsxDEV("div",{className:"flex-1 h-px bg-border"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:154,columnNumber:17},this),b.jsxDEV("span",{className:"text-xs text-text-tertiary",children:"or continue with"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:155,columnNumber:17},this),b.jsxDEV("div",{className:"flex-1 h-px bg-border"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:156,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:153,columnNumber:15},this),b.jsxDEV("div",{className:"space-y-2",children:we.filter(oe=>oe.provider!=="anthropic").map(oe=>b.jsxDEV("a",{href:`/api/auth/oauth/${oe.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[b.jsxDEV(QE,{provider:oe.provider},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:165,columnNumber:21},this),"Sign in with ",oe.name]},oe.provider,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:160,columnNumber:19},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:158,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:152,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:93,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:92,columnNumber:5},this)}function Pw(){const{isAuthenticated:i}=Ki(),s=Qw(),a=Zi(),o=new URLSearchParams(a.search),u=o.get("state")||"";B.useEffect(()=>{i||s(`/login?returnTo=${encodeURIComponent(a.pathname+a.search)}`)},[i]);const[d,p]=B.useState(""),[m,g]=B.useState(o.get("label")||"default"),[x,_]=B.useState(""),[w,D]=B.useState(!1),z=d.trim().startsWith("sk-ant-oat"),q=d.trim().startsWith("sk-ant-api"),Y=Z=>{Z.preventDefault();const ee=d.trim();if(!ee){_("A token or API key is required");return}if(!ee.startsWith("sk-ant-")){_('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}D(!0),_("");const te=`/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ee)}&state=${encodeURIComponent(u)}`;window.location.href=te};return b.jsxDEV("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:b.jsxDEV("div",{className:"w-full max-w-md p-10",children:[b.jsxDEV("div",{className:"mb-10",children:b.jsxDEV(ly,{size:"lg"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:67,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:66,columnNumber:9},this),b.jsxDEV("div",{className:"flex items-center gap-2 mb-6",children:[b.jsxDEV(QE,{provider:"anthropic",className:"w-6 h-6"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:71,columnNumber:11},this),b.jsxDEV("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:70,columnNumber:9},this),b.jsxDEV("p",{className:"text-sm text-text-secondary mb-4",children:"Connect your Anthropic account so Claude Code tasks run under your credentials. Your token is encrypted at rest."},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:77,columnNumber:9},this),b.jsxDEV("form",{onSubmit:Y,className:"space-y-5",children:[b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:84,columnNumber:13},this),b.jsxDEV("input",{id:"token",type:"password",value:d,onChange:Z=>p(Z.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:90,columnNumber:13},this),z&&b.jsxDEV("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:101,columnNumber:15},this),q&&b.jsxDEV("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:106,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:83,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:113,columnNumber:13},this),b.jsxDEV("input",{id:"label",type:"text",value:m,onChange:Z=>g(Z.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:119,columnNumber:13},this),b.jsxDEV("p",{className:"text-xs text-text-tertiary mt-1",children:'A name for this credential. Use different labels to store multiple credentials (e.g., "subscription", "api-batch").'},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:128,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:112,columnNumber:11},this),x&&b.jsxDEV("p",{className:"text-sm text-status-error",children:x},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:134,columnNumber:21},this),b.jsxDEV("button",{type:"submit",className:"btn-primary w-full",disabled:w,children:w?"Validating...":"Connect"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:136,columnNumber:11},this),b.jsxDEV("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:144,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:82,columnNumber:9},this),b.jsxDEV("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"font-medium text-text-secondary",children:"Recommended:"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:154,columnNumber:13},this)," ","Run"," ",b.jsxDEV("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:156,columnNumber:13},this)," ","in your terminal to generate an OAuth token that uses your subscription."]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:153,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"font-medium text-text-secondary",children:"Alternative:"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:160,columnNumber:13},this)," ","Use an API key from"," ",b.jsxDEV("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:162,columnNumber:13},this)," ","(billed per-token)."]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:152,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:64,columnNumber:5},this)}function N0({roleTypes:i,roleNames:s,redirectTo:a="/"}){const{isSuperAdmin:o,hasRole:u,hasRoleType:d}=Ki();return o?b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:18,columnNumber:28},this):i&&i.some(p=>d(p))?b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:21,columnNumber:66},this):s&&s.some(p=>u(p))?b.jsxDEV(Xd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:24,columnNumber:62},this):b.jsxDEV(Wr,{to:a,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:26,columnNumber:10},this)}const $w=B.lazy(()=>tt(()=>import("./ProcessesListPage-bIsd9N_h.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(i=>({default:i.ProcessesListPage}))),YR=B.lazy(()=>tt(()=>import("./ProcessDetailPage-Dln8622H.js"),__vite__mapDeps([16,2,1,4,17,18,19,15,14,9,6,20,21,22])).then(i=>({default:i.ProcessDetailPage}))),JR=B.lazy(()=>tt(()=>import("./McpOverview-B_kJYHea.js"),__vite__mapDeps([23,2,24,25,26,27,12,28,14,6])).then(i=>({default:i.McpOverview}))),GR=B.lazy(()=>tt(()=>import("./McpRunsPage-BY8C6k78.js"),__vite__mapDeps([29,2,25,26,27,5,6,7,8,15,14,9,30,12,11,10,13,31])).then(i=>({default:i.McpRunsPage}))),QR=B.lazy(()=>tt(()=>import("./McpRunDetailPage-B8c0OszR.js"),__vite__mapDeps([32,2,25,17,19,12,33,6,34,35,11,36,13,14])).then(i=>({default:i.McpRunDetailPage}))),XR=B.lazy(()=>tt(()=>import("./McpQueryPage-BgAq_bQg.js"),__vite__mapDeps([37,12,7,8,11,2,10,13,14,9,30,15,31,5,6,4,38])).then(i=>({default:i.McpQueryPage}))),ZR=B.lazy(()=>tt(()=>import("./McpQueryDetailPage-Czsmovqw.js"),__vite__mapDeps([39,2,12,19,38,40,26,4,14,41,34,42,43,44,25,3,1,6,33,45,36])).then(i=>({default:i.McpQueryDetailPage}))),KR=B.lazy(()=>tt(()=>import("./EscalationsOverview-BMKBlkPx.js"),__vite__mapDeps([46,2,4,12,28,6,14])).then(i=>({default:i.EscalationsOverview}))),WR=B.lazy(()=>tt(()=>import("./AvailableEscalationsPage-CpBfGV1h.js"),__vite__mapDeps([47,2,4,48,5,6,7,8,10,49,12,50,51,17,22,52,11,53,20,14,15,9,54,31,13])).then(i=>({default:i.AvailableEscalationsPage}))),e6=B.lazy(()=>tt(()=>import("./OperatorDashboard-C8MSTzey.js"),__vite__mapDeps([55,4,2,48,5,6,7,8,12,10,31,52,11,53,20,14,15,9,54,13])).then(i=>({default:i.OperatorDashboard}))),t6=B.lazy(()=>tt(()=>import("./index-ABcJHHlN.js"),__vite__mapDeps([56,2,48,12,34,54,3,17,4,6,21,22,51,50,19,20,14,33])).then(i=>({default:i.EscalationDetailPage}))),n6=B.lazy(()=>tt(()=>import("./WorkflowsOverview-CIp_lTNl.js"),__vite__mapDeps([57,2,3,4,12,28,6,14])).then(i=>({default:i.WorkflowsOverview}))),s6=B.lazy(()=>tt(()=>import("./index-BmVCyB6C.js"),__vite__mapDeps([58,2,3,12,14,43,44,6,7,8,59,45,19])).then(i=>({default:i.StartWorkflowPage}))),a6=B.lazy(()=>tt(()=>import("./index-BmVCyB6C.js"),__vite__mapDeps([58,2,3,12,14,43,44,6,7,8,59,45,19])).then(i=>({default:i.DurableInvokePage}))),r6=B.lazy(()=>tt(()=>import("./WorkflowsDashboard-Ugzbs8mV.js"),__vite__mapDeps([60,2,9,30,3,4,5,6,7,8,15,14,12,11,10,13,31])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),i6=B.lazy(()=>tt(()=>import("./WorkflowsDashboard-Ugzbs8mV.js"),__vite__mapDeps([60,2,9,30,3,4,5,6,7,8,15,14,12,11,10,13,31])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),o6=B.lazy(()=>tt(()=>import("./YamlWorkflowsPage-BICF0fRO.js"),__vite__mapDeps([61,2,26,40,5,6,62,19,12,11,8,42,43,44,14,59,45])).then(i=>({default:i.YamlWorkflowsPage}))),l6=B.lazy(()=>tt(()=>import("./TasksListPage-Dkq1Vtbt.js"),__vite__mapDeps([63,1,2,3,5,6,7,8,19,53,45,10,11,12,15,14])).then(i=>({default:i.TasksListPage}))),c6=B.lazy(()=>tt(()=>import("./TaskDetailPage-SuMBdARt.js"),__vite__mapDeps([64,1,2,19,53,12,6,14])).then(i=>({default:i.TaskDetailPage}))),Iw=B.lazy(()=>tt(()=>import("./WorkflowExecutionPage-CVlg38C3.js"),__vite__mapDeps([65,2,3,4,35,11,36,19,6,1,12,34,13,14])).then(i=>({default:i.WorkflowExecutionPage}))),u6=B.lazy(()=>tt(()=>import("./AdminDashboard-Cngijp4Q.js"),__vite__mapDeps([66,1,2,4,24,18,6,14])).then(i=>({default:i.AdminDashboard}))),f6=B.lazy(()=>tt(()=>import("./index-DX6zxr6t.js"),__vite__mapDeps([67,2,3,7,8,11,31,5,6,12,68,14,15])).then(i=>({default:i.WorkersPage}))),d6=B.lazy(()=>tt(()=>import("./index-B91h_jZ0.js"),__vite__mapDeps([69,2,3,7,8,70,49,6,11,31,5,12,20,14,68,15,71,48,43,44])).then(i=>({default:i.WorkflowConfigsPage}))),Fw=B.lazy(()=>tt(()=>import("./index-B91h_jZ0.js"),__vite__mapDeps([69,2,3,7,8,70,49,6,11,31,5,12,20,14,68,15,71,48,43,44])).then(i=>({default:i.WorkflowConfigDetailPage}))),h6=B.lazy(()=>tt(()=>import("./index-C90ZPzXk.js"),__vite__mapDeps([72,2,24,8,70,49,6,12,11,10,5,62,42,43,44,14,31,19])).then(i=>({default:i.McpServersPage}))),Yw=B.lazy(()=>tt(()=>import("./index-DNytWfSZ.js"),__vite__mapDeps([73,2,24,71,12,41,14,6])).then(i=>({default:i.McpServerDetailPage}))),m6=B.lazy(()=>tt(()=>import("./index-K40Qw1tk.js"),__vite__mapDeps([74,2,22,5,6,7,8,10,11,9,70,49,31,12,20,14,44,48,45])).then(i=>({default:i.UsersPage}))),p6=B.lazy(()=>tt(()=>import("./RolesPage-kH-Njt25.js"),__vite__mapDeps([75,2,48,7,8,70,49,6,12,20,14,31])).then(i=>({default:i.RolesPage}))),b6=B.lazy(()=>tt(()=>import("./index-BbI2dzhJ.js"),__vite__mapDeps([76,2,12,49,6,50,14])).then(i=>({default:i.MaintenancePage}))),y6=B.lazy(()=>tt(()=>import("./index-lCyNr5Xk.js"),__vite__mapDeps([77,2,18,7,8,34,11,5,6,31,14,49,68])).then(i=>({default:i.ControlPlanePage}))),g6=B.lazy(()=>tt(()=>import("./CredentialsPage-DlS7Kf40.js"),__vite__mapDeps([78,2,12,45,70,49,6,14])).then(i=>({default:i.CredentialsPage}))),v6=B.lazy(()=>tt(()=>import("./index-C1E5GTs9.js"),__vite__mapDeps([79,2,12,11,8,45,14,6])).then(i=>({default:i.FilesPage})));function x6(){return b.jsxDEV("div",{className:"animate-pulse space-y-4",children:[b.jsxDEV("div",{className:"h-8 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:132,columnNumber:7},this),b.jsxDEV("div",{className:"h-40 bg-surface-sunken rounded"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:133,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/App.tsx",lineNumber:131,columnNumber:5},this)}function Ge({children:i}){return b.jsxDEV(B.Suspense,{fallback:b.jsxDEV(x6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:140,columnNumber:25},this),children:b.jsxDEV("div",{className:"animate-page-enter",children:i},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:141,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:140,columnNumber:5},this)}const XE=new kC({defaultOptions:{queries:{staleTime:1e4,retry:(i,s)=>s instanceof Error&&s.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{XE.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),window.location.pathname!=="/login"&&(window.location.href=`/login?returnTo=${encodeURIComponent(window.location.pathname)}`)});const N6=zC([{path:"/login",element:b.jsxDEV(FR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:177,columnNumber:30},void 0)},{path:"/connect/anthropic",element:b.jsxDEV(Pw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:178,columnNumber:42},void 0)},{path:"/connect/:provider",element:b.jsxDEV(Pw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:179,columnNumber:42},void 0)},{path:"/",element:b.jsxDEV(PR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:182,columnNumber:14},void 0),children:[{index:!0,element:b.jsxDEV(Ge,{children:b.jsxDEV($w,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:185,columnNumber:37},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:185,columnNumber:31},void 0)},{path:"processes/all",element:b.jsxDEV(Ge,{children:b.jsxDEV($w,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:188,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:188,columnNumber:41},void 0)},{path:"processes/detail/:originId",element:b.jsxDEV(Ge,{children:b.jsxDEV(YR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:189,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:189,columnNumber:54},void 0)},{path:"credentials",element:b.jsxDEV(Ge,{children:b.jsxDEV(g6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:192,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:192,columnNumber:39},void 0)},{path:"connections",element:b.jsxDEV(Wr,{to:"/credentials",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:193,columnNumber:39},void 0)},{path:"escalations",element:b.jsxDEV(Ge,{children:b.jsxDEV(KR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:196,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:196,columnNumber:39},void 0)},{path:"escalations/available",element:b.jsxDEV(Ge,{children:b.jsxDEV(WR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:197,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:197,columnNumber:49},void 0)},{path:"escalations/queue",element:b.jsxDEV(Ge,{children:b.jsxDEV(e6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:198,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:198,columnNumber:45},void 0)},{path:"escalations/detail/:id",element:b.jsxDEV(Ge,{children:b.jsxDEV(t6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:199,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:199,columnNumber:50},void 0)},{element:b.jsxDEV(N0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:203,columnNumber:18},void 0),children:[{path:"workflows",element:b.jsxDEV(Ge,{children:b.jsxDEV(n6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:205,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:205,columnNumber:41},void 0)},{path:"workflows/executions",element:b.jsxDEV(Ge,{children:b.jsxDEV(i6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:206,columnNumber:58},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:206,columnNumber:52},void 0)},{path:"workflows/durable/executions",element:b.jsxDEV(Ge,{children:b.jsxDEV(r6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:207,columnNumber:66},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:207,columnNumber:60},void 0)},{path:"workflows/durable/executions/:workflowId",element:b.jsxDEV(Ge,{children:b.jsxDEV(Iw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:208,columnNumber:78},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:208,columnNumber:72},void 0)},{path:"workflows/tasks",element:b.jsxDEV(Ge,{children:b.jsxDEV(l6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:209,columnNumber:47},void 0)},{path:"workflows/tasks/detail/:id",element:b.jsxDEV(Ge,{children:b.jsxDEV(c6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:64},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:210,columnNumber:58},void 0)},{path:"workflows/executions/:workflowId",element:b.jsxDEV(Ge,{children:b.jsxDEV(Iw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:211,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:211,columnNumber:64},void 0)},{path:"workflows/start",element:b.jsxDEV(Ge,{children:b.jsxDEV(s6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:212,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:212,columnNumber:47},void 0)},{path:"workflows/durable/invoke",element:b.jsxDEV(Ge,{children:b.jsxDEV(a6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:62},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:56},void 0)},{path:"workflows/cron",element:b.jsxDEV(Wr,{to:"/workflows/start?mode=schedule",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:46},void 0)},{path:"workflows/workers",element:b.jsxDEV(Ge,{children:b.jsxDEV(f6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:215,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:215,columnNumber:49},void 0)},{path:"workflows/registry",element:b.jsxDEV(Ge,{children:b.jsxDEV(d6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:216,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:216,columnNumber:50},void 0)},{path:"workflows/registry/new",element:b.jsxDEV(Ge,{children:b.jsxDEV(Fw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:217,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:217,columnNumber:54},void 0)},{path:"workflows/registry/:workflowType",element:b.jsxDEV(Ge,{children:b.jsxDEV(Fw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:218,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:218,columnNumber:64},void 0)}]},{element:b.jsxDEV(N0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:18},void 0),children:[{path:"mcp",element:b.jsxDEV(Ge,{children:b.jsxDEV(JR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:226,columnNumber:41},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:226,columnNumber:35},void 0)},{path:"mcp/queries",element:b.jsxDEV(Ge,{children:b.jsxDEV(XR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:43},void 0)},{path:"mcp/queries/:workflowId",element:b.jsxDEV(Ge,{children:b.jsxDEV(ZR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:61},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:55},void 0)},{path:"mcp/tools",element:b.jsxDEV(Wr,{to:"/mcp/servers",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:229,columnNumber:41},void 0)},{path:"mcp/servers",element:b.jsxDEV(Ge,{children:b.jsxDEV(h6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:230,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:230,columnNumber:43},void 0)},{path:"mcp/servers/new",element:b.jsxDEV(Ge,{children:b.jsxDEV(Yw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:47},void 0)},{path:"mcp/servers/:serverId",element:b.jsxDEV(Ge,{children:b.jsxDEV(Yw,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:53},void 0)},{path:"mcp/workflows",element:b.jsxDEV(Ge,{children:b.jsxDEV(o6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:233,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:233,columnNumber:45},void 0)},{path:"mcp/executions",element:b.jsxDEV(Ge,{children:b.jsxDEV(GR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:52},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:46},void 0)},{path:"mcp/executions/:jobId",element:b.jsxDEV(Ge,{children:b.jsxDEV(QR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:235,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:235,columnNumber:53},void 0)},{path:"files",element:b.jsxDEV(Ge,{children:b.jsxDEV(v6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:238,columnNumber:37},void 0)}]},{element:b.jsxDEV(N0,{roleTypes:["admin","superadmin"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:244,columnNumber:18},void 0),children:[{path:"admin",element:b.jsxDEV(Ge,{children:b.jsxDEV(u6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:246,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:246,columnNumber:37},void 0)},{path:"admin/users",element:b.jsxDEV(Ge,{children:b.jsxDEV(m6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:247,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:247,columnNumber:43},void 0)},{path:"admin/bots",element:b.jsxDEV(Wr,{to:"/admin/users?tab=service-accounts",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:248,columnNumber:42},void 0)},{path:"admin/escalation-chains",element:b.jsxDEV(Wr,{to:"/admin/roles",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:249,columnNumber:55},void 0)},{path:"admin/roles",element:b.jsxDEV(Ge,{children:b.jsxDEV(p6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:250,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:250,columnNumber:43},void 0)},{path:"admin/maintenance",element:b.jsxDEV(Ge,{children:b.jsxDEV(b6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:251,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:251,columnNumber:49},void 0)},{path:"admin/controlplane",element:b.jsxDEV(Ge,{children:b.jsxDEV(y6,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:252,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:252,columnNumber:50},void 0)}]}]}]);function S6(){return b.jsxDEV(VC,{client:XE,children:b.jsxDEV(A5,{children:b.jsxDEV(gT,{children:b.jsxDEV(BC,{router:N6},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:264,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:263,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:262,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:261,columnNumber:5},this)}mT.createRoot(document.getElementById("root")).render(b.jsxDEV(B.StrictMode,{children:b.jsxDEV(S6,{},void 0,!1,{fileName:"/app/dashboard/src/main.tsx",lineNumber:8,columnNumber:5},void 0)},void 0,!1,{fileName:"/app/dashboard/src/main.tsx",lineNumber:7,columnNumber:3},void 0));export{I6 as A,F6 as B,cy as C,VR as D,zE as F,n4 as J,NO as N,QE as O,I5 as S,$6 as a,Nt as b,kR as c,R6 as d,M6 as e,RR as f,V6 as g,T6 as h,Ki as i,b as j,z6 as k,B6 as l,q6 as m,L6 as n,H6 as o,O6 as p,C5 as q,k6 as r,j6 as s,U6 as t,NE as u,JE as v,GE as w,P6 as x,fy as y,D6 as z};
|
|
281
|
+
//# sourceMappingURL=index-Cmgrk7PQ.js.map
|